summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--automation/source/server/statemnt.cxx41
-rw-r--r--avmedia/source/framework/makefile.mk1
-rw-r--r--basctl/source/basicide/makefile.mk2
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx6
-rwxr-xr-xbasic/source/runtime/runtime.cxx2
-rw-r--r--chart2/prj/build.lst1
-rw-r--r--chart2/qa/unoapi/knownissues.xcl25
-rw-r--r--chart2/qa/unoapi/sch.sce4
-rw-r--r--chart2/qa/unoapi/testdocuments/TransparencyChart.sxsbin10846 -> 10810 bytes
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx36
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx31
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx8
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx32
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.hxx3
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx1
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx2
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertLegend.src4
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx4
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx42
-rw-r--r--chart2/source/controller/main/ChartController.hxx2
-rw-r--r--chart2/source/controller/main/ChartController_EditData.cxx4
-rw-r--r--chart2/source/controller/main/ChartController_Insert.cxx194
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx6
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx32
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx4
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx58
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx47
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.cxx24
-rw-r--r--chart2/source/controller/main/CommandDispatchContainer.hxx3
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx15
-rw-r--r--chart2/source/controller/main/UndoGuard.cxx42
-rw-r--r--chart2/source/inc/LifeTime.hxx4
-rw-r--r--chart2/source/model/main/Axis.cxx101
-rwxr-xr-x[-rw-r--r--]chart2/source/model/main/ChartModel.cxx73
-rw-r--r--chart2/source/model/main/ChartModel.hxx11
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx8
-rw-r--r--chart2/source/model/main/DataSeries.cxx173
-rw-r--r--chart2/source/model/main/Diagram.cxx171
-rw-r--r--chart2/source/model/main/FormattedString.cxx10
-rw-r--r--chart2/source/model/main/Title.cxx19
-rw-r--r--chart2/source/tools/CharacterProperties.cxx12
-rw-r--r--chart2/source/tools/DiagramHelper.cxx22
-rw-r--r--chart2/source/tools/LifeTime.cxx22
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx2
-rw-r--r--chart2/source/view/axes/TickmarkHelper.cxx16
-rw-r--r--chart2/source/view/main/ChartView.cxx4
-rw-r--r--comphelper/inc/comphelper/propertycontainerhelper.hxx2
-rw-r--r--comphelper/inc/comphelper/stillreadwriteinteraction.hxx69
-rw-r--r--comphelper/source/misc/makefile.mk1
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx121
-rw-r--r--comphelper/source/misc/stillreadwriteinteraction.cxx144
-rwxr-xr-xcui/source/dialogs/SpellDialog.cxx42
-rw-r--r--cui/source/inc/SpellDialog.hxx13
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.cxx4
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.hxx2
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx4
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.hxx9
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx2
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx7
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx8
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx10
-rw-r--r--dbaccess/source/ui/inc/dbwiz.hxx5
-rw-r--r--dbaccess/source/ui/inc/dbwizsetup.hxx4
-rw-r--r--default_images/sw/res/writerteam.pngbin169171 -> 0 bytes
-rw-r--r--desktop/source/app/app.cxx17
-rw-r--r--desktop/source/deployment/dp_xml.cxx209
-rw-r--r--desktop/source/deployment/gui/dp_gui.hrc2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx18
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.src12
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_extlistbox.cxx11
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_extlistbox.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx8
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx10
-rw-r--r--desktop/source/deployment/inc/dp_xml.h104
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx6
-rw-r--r--desktop/source/migration/pages.cxx16
-rw-r--r--desktop/source/migration/pages.hxx8
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/oo3extensionmigration.cxx73
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/oo3extensionmigration.hxx8
-rw-r--r--desktop/source/migration/wizard.cxx9
-rw-r--r--desktop/source/migration/wizard.hxx3
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx45
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx14
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx243
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx32
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx53
-rw-r--r--drawinglayer/source/processor3d/shadow3dextractor.cxx76
-rw-r--r--drawinglayer/source/processor3d/zbufferprocessor3d.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/inc/editeng/editeng.hxx3
-rw-r--r--editeng/inc/editeng/outliner.hxx2
-rw-r--r--editeng/source/editeng/editeng.cxx14
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/editview.cxx78
-rw-r--r--editeng/source/editeng/edtspell.cxx12
-rw-r--r--editeng/source/editeng/edtspell.hxx8
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit.cxx13
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit.hxx5
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit2.cxx24
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rwxr-xr-x[-rw-r--r--]editeng/source/editeng/impedit4.cxx72
-rw-r--r--editeng/source/outliner/outlin2.cxx4
-rw-r--r--embeddedobj/source/inc/oleembobj.hxx2
-rw-r--r--embeddedobj/source/msole/oleembed.cxx105
-rw-r--r--embeddedobj/source/msole/olemisc.cxx3
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx4
-rw-r--r--extensions/source/abpilot/abpfinalpage.hxx2
-rw-r--r--extensions/source/abpilot/abspilot.cxx11
-rw-r--r--extensions/source/abpilot/abspilot.hxx2
-rw-r--r--extensions/source/abpilot/tableselectionpage.cxx2
-rw-r--r--extensions/source/abpilot/tableselectionpage.hxx2
-rw-r--r--extensions/source/abpilot/typeselectionpage.cxx9
-rw-r--r--extensions/source/abpilot/typeselectionpage.hxx2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx4
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.hxx4
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx6
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx6
-rw-r--r--extensions/source/dbpilots/gridwizard.hxx5
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx27
-rw-r--r--extensions/source/dbpilots/groupboxwiz.hxx14
-rw-r--r--extensions/source/dbpilots/listcombowizard.cxx15
-rw-r--r--extensions/source/dbpilots/listcombowizard.hxx9
-rwxr-xr-x[-rw-r--r--]extensions/source/update/check/download.cxx89
-rw-r--r--extensions/source/update/check/download.hxx2
-rwxr-xr-x[-rw-r--r--]extensions/source/update/check/updatecheck.cxx86
-rw-r--r--extensions/source/update/check/updatecheck.hxx2
-rwxr-xr-x[-rw-r--r--]extensions/source/update/check/updatecheckconfig.cxx2
-rw-r--r--extensions/source/update/check/updatehdl.cxx107
-rw-r--r--extensions/source/update/check/updatehdl.hrc3
-rw-r--r--extensions/source/update/check/updatehdl.hxx6
-rw-r--r--extensions/source/update/check/updatehdl.src15
-rw-r--r--filter/inc/filter/msfilter/escherex.hxx1
-rw-r--r--filter/source/msfilter/escherex.cxx28
-rw-r--r--filter/source/msfilter/eschesdo.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx7
-rw-r--r--filter/source/msfilter/svdfppt.cxx8
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--forms/source/component/ListBox.cxx20
-rw-r--r--forms/source/component/ListBox.hxx3
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx4
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx2
-rw-r--r--framework/inc/classes/menumanager.hxx3
-rw-r--r--framework/inc/uielement/toolbarmanager.hxx6
-rw-r--r--framework/source/classes/menumanager.cxx2
-rw-r--r--framework/source/services/backingwindow.cxx154
-rw-r--r--framework/source/services/backingwindow.hxx20
-rw-r--r--framework/source/services/fwk_services.src2
-rw-r--r--framework/source/services/pathsettings.cxx1
-rw-r--r--framework/source/uielement/macrosmenucontroller.cxx3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx78
-rw-r--r--i18npool/source/breakiterator/data/ja.dic1
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt1
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt3
-rw-r--r--instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt3
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt3
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt12
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt3
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt3
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt2
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt6
-rw-r--r--instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt1
-rw-r--r--instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt1
-rw-r--r--instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt1
-rw-r--r--instsetoo_native/util/makefile.mk2
-rw-r--r--instsetoo_native/util/openoffice.lst8
-rw-r--r--l10ntools/inc/export.hxx2
-rw-r--r--[-rwxr-xr-x]l10ntools/scripts/localize.pl10
-rw-r--r--l10ntools/source/export.cxx12
-rw-r--r--l10ntools/source/localize.cxx14
-rw-r--r--l10ntools/source/merge.cxx16
-rwxr-xr-x[-rw-r--r--]linguistic/source/dicimp.cxx48
-rw-r--r--offapi/com/sun/star/awt/ItemListEvent.idl76
-rw-r--r--offapi/com/sun/star/awt/UnoControlListBoxModel.idl7
-rw-r--r--offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl6
-rw-r--r--offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl3
-rw-r--r--offapi/com/sun/star/awt/UnoControlThrobber.idl6
-rw-r--r--offapi/com/sun/star/awt/UnoControlThrobberModel.idl3
-rw-r--r--offapi/com/sun/star/awt/XItemList.idl286
-rw-r--r--offapi/com/sun/star/awt/XItemListListener.idl85
-rw-r--r--offapi/com/sun/star/awt/XSimpleAnimation.idl2
-rw-r--r--offapi/com/sun/star/awt/XThrobber.idl2
-rw-r--r--offapi/com/sun/star/awt/makefile.mk5
-rw-r--r--offapi/com/sun/star/awt/tree/XTreeControl.idl11
-rw-r--r--offapi/com/sun/star/chart/ChartDocument.idl12
-rw-r--r--offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl20
-rw-r--r--offapi/com/sun/star/drawing/Shape.idl8
-rwxr-xr-x[-rw-r--r--]offapi/com/sun/star/text/TextFrame.idl9
-rw-r--r--offapi/com/sun/star/ui/dialogs/Wizard.idl75
-rw-r--r--offapi/com/sun/star/ui/dialogs/WizardButton.idl60
-rw-r--r--offapi/com/sun/star/ui/dialogs/WizardTravelType.idl (renamed from sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx)33
-rw-r--r--offapi/com/sun/star/ui/dialogs/XWizard.idl228
-rw-r--r--offapi/com/sun/star/ui/dialogs/XWizardController.idl85
-rw-r--r--offapi/com/sun/star/ui/dialogs/XWizardPage.idl86
-rw-r--r--offapi/com/sun/star/ui/dialogs/makefile.mk8
-rw-r--r--offapi/com/sun/star/util/InvalidStateException.idl (renamed from sd/source/ui/inc/fuspell.hxx)47
-rw-r--r--offapi/com/sun/star/util/makefile.mk1
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu2
-rw-r--r--[-rwxr-xr-x]officecfg/registry/data/org/openoffice/Setup.xcu31
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Math.xcs2
-rw-r--r--officecfg/registry/schema/org/openoffice/Setup.xcs16
-rw-r--r--oox/inc/oox/drawingml/customshapegeometry.hxx4
-rw-r--r--oox/inc/oox/drawingml/customshapeproperties.hxx81
-rw-r--r--oox/inc/oox/drawingml/shape.hxx4
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx3
-rw-r--r--oox/source/drawingml/customshapegeometry.cxx1120
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx201
-rw-r--r--oox/source/drawingml/shape.cxx39
-rw-r--r--oox/source/drawingml/shapecontext.cxx5
-rw-r--r--oox/source/drawingml/shapepropertiescontext.cxx2
-rw-r--r--oox/source/token/properties.txt17
-rw-r--r--oox/source/token/tokens.txt26
-rw-r--r--package/source/xstor/owriteablestream.cxx2
-rw-r--r--package/source/xstor/xfactory.cxx2
-rw-r--r--package/source/xstor/xstorage.cxx8
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx17
-rw-r--r--postprocess/checkdeliver/checkdeliver.pl61
-rw-r--r--qadevOOo/runner/lib/MultiPropertyTest.java20
-rw-r--r--qadevOOo/tests/java/ifc/beans/_XPropertySet.java484
-rw-r--r--qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java34
-rw-r--r--qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java4
-rw-r--r--qadevOOo/tests/java/ifc/chart/_LineDiagram.java6
-rw-r--r--qadevOOo/tests/java/ifc/drawing/_LineProperties.java16
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccArea.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccAxis.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDataPoint.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDataSeries.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccDiagram.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccFloor.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccGrid.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccLegend.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccLegendEntry.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccTitle.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccWall.java8
-rw-r--r--qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartAxis.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartData.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartDocument.java14
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXChartView.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDataPoint.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChXDataRow.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartArea.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartGrid.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartLegend.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartLine.java7
-rw-r--r--qadevOOo/tests/java/mod/_sch/ChartTitle.java7
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java12
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java9
-rw-r--r--qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java14
-rw-r--r--sal/osl/w32/diagnose.c1
-rw-r--r--sc/inc/dpgroup.hxx1
-rw-r--r--sc/source/core/data/docpool.cxx8
-rw-r--r--sc/source/core/data/dpgroup.cxx41
-rwxr-xr-xsc/source/core/data/dpobject.cxx5
-rwxr-xr-xsc/source/core/data/dpoutput.cxx160
-rwxr-xr-xsc/source/core/data/dptabdat.cxx10
-rwxr-xr-xsc/source/core/data/dptabres.cxx15
-rw-r--r--sc/source/core/data/table4.cxx2
-rw-r--r--sc/source/core/data/table5.cxx21
-rw-r--r--sc/source/filter/excel/excdoc.cxx3
-rwxr-xr-xsc/source/filter/excel/xichart.cxx3
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx4
-rw-r--r--sc/source/ui/app/inputhdl.cxx2
-rw-r--r--sc/source/ui/app/makefile.mk2
-rw-r--r--sc/source/ui/cctrl/makefile.mk1
-rw-r--r--sc/source/ui/drawfunc/makefile.mk4
-rw-r--r--sc/source/ui/inc/spelldialog.hxx4
-rw-r--r--sc/source/ui/view/spelldialog.cxx6
-rw-r--r--scp2/source/calc/file_calc.scp6
-rw-r--r--scp2/source/javafilter/registryitem_javafilter.scp8
-rw-r--r--scp2/source/ooo/common_brand.scp6
-rw-r--r--scp2/source/ooo/file_library_ooo.scp50
-rwxr-xr-xscp2/source/ooo/file_ooo.scp34
-rw-r--r--scp2/source/ooo/module_systemint.scp2
-rw-r--r--scp2/source/ooo/ooo_brand.scp2
-rw-r--r--scp2/source/ooo/registryitem_ooo.scp22
-rwxr-xr-xscp2/source/ooo/ure.scp2
-rwxr-xr-xscp2/source/ooo/ure_standalone.scp18
-rw-r--r--scp2/source/ooo/vc_redist.scp29
-rw-r--r--scp2/source/sdkoo/sdkoo.scp10
-rw-r--r--[-rwxr-xr-x]scp2/source/winexplorerext/registryitem_winexplorerext.scp24
-rw-r--r--scp2/source/xsltfilter/file_xsltfilter.scp2
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx31
-rwxr-xr-x[-rw-r--r--]sd/inc/Outliner.hxx21
-rwxr-xr-x[-rw-r--r--]sd/inc/OutlinerIterator.hxx31
-rwxr-xr-x[-rw-r--r--]sd/inc/drawdoc.hxx14
-rwxr-xr-x[-rw-r--r--]sd/inc/sdmod.hxx2
-rwxr-xr-xsd/inc/shapelist.hxx4
-rwxr-xr-x[-rw-r--r--]sd/inc/stlpool.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/textapi.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/core/CustomAnimationEffect.cxx9
-rwxr-xr-xsd/source/core/drawdoc2.cxx31
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc4.cxx77
-rwxr-xr-xsd/source/core/shapelist.cxx19
-rwxr-xr-x[-rw-r--r--]sd/source/core/stlpool.cxx50
-rwxr-xr-x[-rw-r--r--]sd/source/core/text/textapi.cxx27
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/eppt.hxx18
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/epptso.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlattr.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlattr.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlex.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlex.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/ppt97animations.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/ppt97animations.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptatom.cpp22
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptatom.hxx19
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptinanimations.cxx58
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptinanimations.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleViewForwarder.cxx21
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.cxx443
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.hrc50
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.hxx114
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.src113
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationCreateDialog.cxx7
-rw-r--r--sd/source/ui/animations/CustomAnimationSchemesPane.hrc32
-rw-r--r--sd/source/ui/animations/CustomAnimationSchemesPane.src71
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationmanager.cxx4
-rwxr-xr-xsd/source/ui/annotations/annotationmanagerimpl.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationwindow.cxx110
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationwindow.hxx1
-rwxr-xr-xsd/source/ui/app/makefile.mk3
-rwxr-xr-xsd/source/ui/app/optsitem.cxx229
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdmod.cxx17
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdmod2.cxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/LayerDialogContent.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/SpellDialogChildWindow.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/animobjs.cxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgass.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgassim.cxx284
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgassim.hxx51
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgctrls.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgsnap.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/docprev.cxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/filedlg.cxx88
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/headerfooterdlg.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/inspagob.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/prntopts.cxx16
-rwxr-xr-xsd/source/ui/dlg/sdtreelb.cxx55
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tpaction.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/docshel4.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/docshell.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationClassifier.cxx7
-rwxr-xr-xsd/source/ui/framework/configuration/ConfigurationController.cxx26
-rwxr-xr-xsd/source/ui/framework/configuration/ConfigurationTracer.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationTracer.hxx4
-rwxr-xr-xsd/source/ui/framework/configuration/ConfigurationUpdater.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationUpdater.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ResourceId.cxx11
-rwxr-xr-xsd/source/ui/framework/factories/BasicPaneFactory.cxx26
-rwxr-xr-xsd/source/ui/framework/factories/BasicPaneFactory.hxx6
-rwxr-xr-xsd/source/ui/framework/factories/TaskPanelFactory.cxx17
-rwxr-xr-xsd/source/ui/framework/factories/TaskPanelFactory.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ReadOnlyModeObserver.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ReadOnlyModeObserver.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ResourceManager.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ResourceManager.hxx2
-rwxr-xr-xsd/source/ui/framework/tools/FrameworkHelper.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconstr.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fudraw.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuoutl.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fupoor.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusearch.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusnapln.cxx1
-rw-r--r--sd/source/ui/func/fuspell.cxx166
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/futransf.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/makefile.mk4
-rw-r--r--sd/source/ui/func/outlinfo.cxx301
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/sdundogr.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/unoaprms.cxx46
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AccessibleViewForwarder.hxx3
-rwxr-xr-xsd/source/ui/inc/DrawController.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/DrawDocShell.hxx3
-rwxr-xr-xsd/source/ui/inc/DrawViewShell.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/GraphicViewShell.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/LayerDialogContent.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/MasterPageObserver.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/OutlineView.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/OutlineViewShell.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideSorterViewShell.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideView.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SpellDialogChildWindow.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ToolBarManager.hxx16
-rwxr-xr-xsd/source/ui/inc/View.hxx3
-rwxr-xr-xsd/source/ui/inc/ViewShell.hxx7
-rwxr-xr-xsd/source/ui/inc/ViewShellBase.hxx29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewShellManager.hxx43
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/Window.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/animobjs.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/bmcache.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgass.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgctrls.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/docprev.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/filedlg.hxx31
-rwxr-xr-xsd/source/ui/inc/framework/FrameworkHelper.hxx17
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/ResourceId.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconstr.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fudraw.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuoutl.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fupoor.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/futransf.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/headerfooterdlg.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/optsitem.hxx28
-rw-r--r--sd/source/ui/inc/outlinfo.hxx125
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/prntopts.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/sdtreelb.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/sdundogr.hxx1
-rw-r--r--sd/source/ui/inc/showview.hxx88
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/slideshow.hxx1
-rwxr-xr-xsd/source/ui/inc/taskpane/ScrollPanel.hxx5
-rwxr-xr-xsd/source/ui/inc/taskpane/SubToolPanel.hxx18
-rwxr-xr-xsd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx17
-rwxr-xr-xsd/source/ui/inc/taskpane/TitledControl.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/PropertySet.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/SlotStateListener.hxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tpaction.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unoaprms.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unosrch.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/zoomlist.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterCanvas.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterTextView.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshow.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshowimpl.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshowimpl.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx37
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx10
-rw-r--r--sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx66
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsPageCache.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/makefile.mk1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlideSorterController.cxx69
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsPageSelector.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx89
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx6
-rwxr-xr-xsd/source/ui/slidesorter/controller/SlsSlotManager.cxx94
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx23
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx2
-rwxr-xr-xsd/source/ui/slidesorter/model/SlideSorterModel.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterService.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterService.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlideSorterView.cxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsLayouter.cxx55
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx15
-rwxr-xr-xsd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx16
-rw-r--r--sd/source/ui/toolpanel/EmptyWindow.cxx96
-rw-r--r--sd/source/ui/toolpanel/EmptyWindow.hxx57
-rwxr-xr-xsd/source/ui/toolpanel/LayoutMenu.cxx8
-rwxr-xr-xsd/source/ui/toolpanel/LayoutMenu.hxx4
-rwxr-xr-xsd/source/ui/toolpanel/ScrollPanel.cxx9
-rw-r--r--sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx98
-rw-r--r--sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx70
-rwxr-xr-xsd/source/ui/toolpanel/SubToolPanel.cxx58
-rwxr-xr-xsd/source/ui/toolpanel/TaskPaneShellManager.cxx13
-rwxr-xr-xsd/source/ui/toolpanel/TaskPaneTreeNode.cxx28
-rwxr-xr-xsd/source/ui/toolpanel/TestMenu.cxx6
-rwxr-xr-xsd/source/ui/toolpanel/TestMenu.hxx3
-rwxr-xr-xsd/source/ui/toolpanel/TestPanel.cxx5
-rwxr-xr-xsd/source/ui/toolpanel/TestPanel.hxx4
-rwxr-xr-xsd/source/ui/toolpanel/TitleToolBox.cxx67
-rwxr-xr-xsd/source/ui/toolpanel/TitleToolBox.hxx52
-rwxr-xr-xsd/source/ui/toolpanel/TitledControl.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx86
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainer.cxx148
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainer.hxx10
-rwxr-xr-xsd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageObserver.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/makefile.mk3
-rwxr-xr-xsd/source/ui/toolpanel/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/PropertySet.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/SdGlobalResourceContainer.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/SlotStateListener.cxx18
-rwxr-xr-xsd/source/ui/unoidl/DrawController.cxx12
-rwxr-xr-xsd/source/ui/unoidl/makefile.mk1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unocpres.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unocpres.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unoobj.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unoobj.hxx1
-rwxr-xr-xsd/source/ui/unoidl/unopage.cxx29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unopage.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unosrch.cxx5
-rw-r--r--sd/source/ui/unoidl/unovwcrs.cxx209
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unowcntr.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unowcntr.hxx3
-rwxr-xr-xsd/source/ui/view/Outliner.cxx64
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/OutlinerIterator.cxx36
-rwxr-xr-xsd/source/ui/view/ToolBarManager.cxx98
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx66
-rwxr-xr-xsd/source/ui/view/ViewShellImplementation.cxx42
-rwxr-xr-xsd/source/ui/view/ViewShellManager.cxx207
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/bmcache.cxx109
-rwxr-xr-xsd/source/ui/view/drviews1.cxx1
-rwxr-xr-xsd/source/ui/view/drviews2.cxx42
-rwxr-xr-xsd/source/ui/view/drviews6.cxx26
-rwxr-xr-xsd/source/ui/view/drviewsa.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/grviewsh.cxx18
-rw-r--r--sd/source/ui/view/makefile.mk1
-rwxr-xr-xsd/source/ui/view/outlnvsh.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/outlview.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview.cxx83
-rwxr-xr-xsd/source/ui/view/sdview4.cxx5
-rwxr-xr-xsd/source/ui/view/sdwindow.cxx29
-rw-r--r--sd/source/ui/view/showview.cxx170
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/viewshe2.cxx40
-rwxr-xr-xsd/source/ui/view/viewshel.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/zoomlist.cxx13
-rw-r--r--[-rwxr-xr-x]sd/uiconfig/sdraw/menubar/menubar.xml2
-rwxr-xr-xsd/uiconfig/simpress/menubar/menubar.xml2
-rw-r--r--sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu19
-rw-r--r--sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs19
-rwxr-xr-xsdext/source/pdfimport/config/description.xml2
-rw-r--r--sdext/source/pdfimport/filterdet.cxx4
-rw-r--r--sdext/source/pdfimport/filterdet.hxx4
-rwxr-xr-xsdext/source/pdfimport/inc/pdfihelper.hxx4
-rw-r--r--sdext/source/pdfimport/misc/pwdinteract.cxx19
-rw-r--r--sdext/source/pdfimport/pdfiadaptor.cxx2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfparse.cxx37
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx165
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.hxx11
-rw-r--r--sdext/source/pdfimport/tree/genericelements.hxx13
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.cxx7
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.hxx5
-rwxr-xr-xsdext/source/pdfimport/wrapper/wrapper.cxx92
-rwxr-xr-xsetup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx4
-rw-r--r--setup_native/source/win32/customactions/languagepacks/respintest.cxx2
-rwxr-xr-xsetup_native/source/win32/customactions/patch/swappatchfiles.cxx26
-rw-r--r--setup_native/source/win32/customactions/quickstarter/quickstarter.cxx4
-rw-r--r--setup_native/source/win32/customactions/rebase/rebase.cxx10
-rw-r--r--setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx2
-rwxr-xr-x[-rw-r--r--]setup_native/source/win32/customactions/reg64/reg64.cxx12
-rw-r--r--setup_native/source/win32/customactions/regactivex/regactivex.cxx2
-rwxr-xr-xsetup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx6
-rw-r--r--setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx12
-rw-r--r--setup_native/source/win32/customactions/shellextensions/layerlinks.cxx20
-rwxr-xr-xsetup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx42
-rwxr-xr-xsetup_native/source/win32/customactions/shellextensions/postuninstall.cxx4
-rw-r--r--setup_native/source/win32/customactions/shellextensions/registerextensions.cxx10
-rw-r--r--setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx6
-rw-r--r--sfx2/inc/sfx2/docfac.hxx1
-rw-r--r--sfx2/inc/sfx2/tbxctrl.hxx1
-rw-r--r--sfx2/prj/build.lst2
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx10
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx64
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx2
-rw-r--r--sfx2/source/doc/docfac.cxx129
-rw-r--r--sfx2/source/doc/makefile.mk7
-rwxr-xr-xsfx2/source/doc/syspath.cxx48
-rw-r--r--sfx2/source/doc/syspath.hxx44
-rw-r--r--sfx2/source/doc/syspathw32.cxx83
-rw-r--r--sfx2/source/view/viewprn.cxx45
-rw-r--r--sfx2/workben/custompanel/CalcWindowState.xcu2
-rw-r--r--sfx2/workben/custompanel/DrawWindowState.xcu2
-rw-r--r--sfx2/workben/custompanel/ImpressWindowState.xcu2
-rw-r--r--sfx2/workben/custompanel/WriterWindowState.xcu4
-rw-r--r--sfx2/workben/custompanel/description.xml2
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx4
-rwxr-xr-xsolenv/bin/deliver.pl16
-rwxr-xr-xsolenv/bin/gsicheck18
-rw-r--r--solenv/bin/make_installer.pl10
-rw-r--r--solenv/bin/mhids.pl8
-rw-r--r--solenv/bin/modules/CreatePDBRelocators.pm2
-rw-r--r--solenv/bin/modules/installer/globals.pm10
-rw-r--r--solenv/bin/modules/installer/scriptitems.pm14
-rw-r--r--solenv/bin/modules/installer/windows/admin.pm6
-rw-r--r--solenv/bin/modules/installer/windows/component.pm16
-rw-r--r--solenv/bin/modules/installer/windows/directory.pm216
-rw-r--r--solenv/bin/modules/installer/windows/idtglobal.pm41
-rw-r--r--solenv/bin/modules/installer/windows/property.pm12
-rw-r--r--solenv/bin/modules/installer/windows/registry.pm10
-rw-r--r--solenv/bin/modules/installer/windows/shortcut.pm4
-rw-r--r--solenv/bin/modules/installer/worker.pm3
-rw-r--r--solenv/bin/modules/installer/ziplist.pm10
-rw-r--r--solenv/config/sdev300.ini1
-rw-r--r--solenv/config/ssolar.cmn1
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/rules.mk2
-rw-r--r--soltools/prj/build.lst2
-rwxr-xr-x[-rw-r--r--]soltools/util/makefile.pmk4
-rw-r--r--starmath/inc/node.hxx13
-rw-r--r--starmath/inc/parse.hxx2
-rw-r--r--starmath/inc/starmath.hrc2
-rw-r--r--starmath/source/commands.src7
-rw-r--r--starmath/source/makefile.mk1
-rw-r--r--starmath/source/node.cxx5
-rwxr-xr-x[-rw-r--r--]starmath/source/parse.cxx73
-rwxr-xr-x[-rw-r--r--]starmath/source/smres.src2
-rw-r--r--svl/source/items/nranges.cxx2
-rw-r--r--svtools/inc/svtools/filter.hxx5
-rw-r--r--svtools/inc/svtools/roadmapwizard.hxx15
-rw-r--r--svtools/inc/svtools/table/tablecontrol.hxx3
-rw-r--r--svtools/inc/svtools/toolboxcontroller.hxx26
-rw-r--r--svtools/inc/svtools/wizardmachine.hxx48
-rw-r--r--svtools/prj/build.lst3
-rw-r--r--svtools/source/contnr/svimpbox.cxx42
-rw-r--r--svtools/source/contnr/svlbox.cxx11
-rw-r--r--svtools/source/contnr/svtreebx.cxx45
-rw-r--r--svtools/source/dialogs/roadmapwizard.cxx55
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx97
-rw-r--r--svtools/source/filter.vcl/filter/filter.cxx8
-rw-r--r--svtools/source/filter.vcl/jpeg/jpeg.cxx15
-rw-r--r--svtools/source/inc/jpeg.hxx11
-rw-r--r--svtools/source/inc/svimpbox.hxx2
-rw-r--r--svtools/source/misc/imageresourceaccess.cxx12
-rw-r--r--svtools/source/misc/langtab.src2
-rw-r--r--svtools/source/table/tablecontrol.cxx43
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx6
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx1
-rw-r--r--svtools/source/table/tabledatawindow.cxx5
-rw-r--r--svtools/source/toolpanel/toolpanel.cxx2
-rw-r--r--svtools/source/uno/miscservices.cxx23
-rwxr-xr-xsvtools/source/uno/svtxgridcontrol.cxx23
-rwxr-xr-xsvtools/source/uno/svtxgridcontrol.hxx2
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx104
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx29
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx1
-rw-r--r--svtools/source/uno/unowizard.hxx117
-rw-r--r--svtools/source/uno/wizard/makefile.mk48
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx452
-rw-r--r--svtools/source/uno/wizard/wizardpagecontroller.cxx190
-rw-r--r--svtools/source/uno/wizard/wizardpagecontroller.hxx75
-rw-r--r--svtools/source/uno/wizard/wizardshell.cxx279
-rw-r--r--svtools/source/uno/wizard/wizardshell.hxx147
-rw-r--r--svtools/util/makefile.mk1
-rw-r--r--svtools/workben/unodialog/roadmapskeleton.cxx4
-rw-r--r--svtools/workben/unodialog/roadmapskeleton.hxx2
-rw-r--r--svx/inc/svdstr.hrc2
-rw-r--r--svx/inc/svx/SpellDialogChildWindow.hxx8
-rw-r--r--svx/inc/svx/sdrmasterpagedescriptor.hxx2
-rw-r--r--svx/inc/svx/svddef.hxx3
-rw-r--r--svx/inc/svx/svdobj.hxx11
-rw-r--r--svx/inc/svx/svdpage.hxx1
-rw-r--r--svx/inc/svx/sxopitm.hxx6
-rw-r--r--[-rwxr-xr-x]svx/inc/svx/unoshprp.hxx1
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx240
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.hxx12
-rw-r--r--svx/source/dialog/svxruler.cxx40
-rw-r--r--svx/source/engine3d/scene3d.cxx14
-rw-r--r--svx/source/engine3d/view3d.cxx170
-rw-r--r--svx/source/intro/makefile.mk4
-rw-r--r--svx/source/intro/ooo.src2
-rw-r--r--svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx27
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrpage.cxx16
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgroup.cxx69
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx13
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx11
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx8
-rw-r--r--svx/source/svdraw/sdrhittesthelper.cxx2
-rw-r--r--svx/source/svdraw/sdrmasterpagedescriptor.cxx12
-rw-r--r--svx/source/svdraw/svdattr.cxx2
-rw-r--r--svx/source/svdraw/svdedtv.cxx6
-rw-r--r--svx/source/svdraw/svdedtv1.cxx4
-rw-r--r--svx/source/svdraw/svdedtv2.cxx11
-rw-r--r--svx/source/svdraw/svdfmtf.cxx63
-rw-r--r--svx/source/svdraw/svdmrkv.cxx6
-rw-r--r--svx/source/svdraw/svdobj.cxx39
-rw-r--r--svx/source/svdraw/svdocirc.cxx5
-rw-r--r--svx/source/svdraw/svdoedge.cxx43
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx104
-rw-r--r--svx/source/svdraw/svdoutl.cxx5
-rw-r--r--svx/source/svdraw/svdpage.cxx52
-rw-r--r--svx/source/svdraw/svdpagv.cxx6
-rw-r--r--svx/source/svdraw/svdstr.src5
-rw-r--r--svx/source/unodraw/unoshape.cxx18
-rw-r--r--sw/inc/PostItMgr.hxx3
-rw-r--r--sw/inc/SidebarWin.hxx2
-rw-r--r--sw/inc/SwNumberTree.hxx7
-rw-r--r--sw/inc/crsrsh.hxx1
-rw-r--r--sw/inc/doc.hxx2
-rwxr-xr-x[-rw-r--r--]sw/inc/dochdl.hrc4
-rw-r--r--sw/inc/editsh.hxx7
-rw-r--r--sw/inc/postithelper.hxx1
-rw-r--r--sw/inc/swcrsr.hxx1
-rw-r--r--sw/inc/swtblfmt.hxx2
-rw-r--r--sw/inc/undobj.hxx10
-rw-r--r--[-rwxr-xr-x]sw/inc/viewsh.hxx3
-rw-r--r--sw/inc/viscrs.hxx2
-rw-r--r--sw/inc/warnpassword.hxx47
-rw-r--r--sw/qa/unoapi/knownissues.xcl3
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx13
-rw-r--r--sw/source/core/access/accportions.cxx6
-rw-r--r--sw/source/core/access/accportions.hxx1
-rw-r--r--sw/source/core/crsr/crsrsh.cxx13
-rw-r--r--sw/source/core/crsr/crstrvl1.cxx4
-rw-r--r--sw/source/core/crsr/swcrsr.cxx80
-rw-r--r--sw/source/core/crsr/viscrs.cxx10
-rw-r--r--sw/source/core/doc/docnew.cxx233
-rw-r--r--sw/source/core/docnode/nodes.cxx18
-rw-r--r--sw/source/core/edit/edlingu.cxx58
-rw-r--r--sw/source/core/fields/postithelper.cxx16
-rw-r--r--sw/source/core/inc/SwGrammarMarkUp.hxx2
-rw-r--r--sw/source/core/swg/SwXMLSectionList.cxx26
-rw-r--r--sw/source/core/text/SwGrammarMarkUp.cxx15
-rw-r--r--sw/source/core/text/inftxt.cxx2
-rw-r--r--sw/source/core/text/inftxt.hxx2
-rw-r--r--sw/source/core/text/porlay.cxx5
-rw-r--r--sw/source/core/text/txttab.cxx12
-rw-r--r--sw/source/core/undo/unbkmk.cxx17
-rw-r--r--sw/source/core/undo/unins.cxx15
-rw-r--r--sw/source/core/undo/unmove.cxx10
-rw-r--r--sw/source/core/unocore/unotbl.cxx87
-rw-r--r--[-rwxr-xr-x]sw/source/core/view/viewsh.cxx15
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx73
-rw-r--r--sw/source/filter/rtf/wrtrtf.cxx4
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx40
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.hxx13
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx3
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx3
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx12
-rwxr-xr-x[-rw-r--r--]sw/source/filter/ww8/wrtww8.cxx61
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx91
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx1
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
-rw-r--r--sw/source/ui/app/apphdl.cxx16
-rw-r--r--sw/source/ui/app/docsh.cxx1
-rw-r--r--sw/source/ui/cctrl/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sw/source/ui/config/optpage.cxx22
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx6
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx7
-rw-r--r--sw/source/ui/dbui/mailmergewizard.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.hxx2
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmlayoutpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.cxx4
-rw-r--r--sw/source/ui/dbui/mmpreparemergepage.hxx2
-rw-r--r--sw/source/ui/dialog/SwSpellDialogChildWindow.cxx146
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/dochdl.src9
-rwxr-xr-x[-rw-r--r--]sw/source/ui/dochdl/gloshdl.cxx45
-rw-r--r--sw/source/ui/docvw/PostItMgr.cxx28
-rwxr-xr-x[-rw-r--r--]sw/source/ui/docvw/SidebarWin.cxx0
-rw-r--r--sw/source/ui/inc/SwSpellDialogChildWindow.hxx4
-rw-r--r--sw/source/ui/inc/view.hxx2
-rw-r--r--sw/source/ui/ribbar/makefile.mk5
-rw-r--r--sw/source/ui/shells/basesh.cxx5
-rw-r--r--sw/source/ui/shells/makefile.mk1
-rw-r--r--sw/source/ui/uiview/makefile.mk5
-rw-r--r--sw/source/ui/uiview/viewdraw.cxx7
-rw-r--r--sw/source/ui/uno/makefile.mk3
-rw-r--r--[-rwxr-xr-x]sw/source/ui/uno/unotxdoc.cxx15
-rw-r--r--sw/source/ui/uno/warnpassword.cxx86
-rw-r--r--sw/source/ui/utlui/makefile.mk4
-rwxr-xr-xtestautomation/extensions/optional/input/platform/extensions.info2
-rwxr-xr-xtestautomation/framework/optional/includes/basic_gridcontrol.inc33
-rwxr-xr-xtestautomation/framework/optional/input/gridcontrol.odtbin12000 -> 12600 bytes
-rwxr-xr-xtestautomation/framework/required/includes/script_organizers.inc49
-rw-r--r--testautomation/global/input/officeinfo.txt7
-rw-r--r--testautomation/graphics/optional/includes/global/export_graphic.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/math/required/includes/m_005_.inc4
-rwxr-xr-xtestautomation/writer/optional/includes/regexp/search.inc4
-rwxr-xr-x[-rw-r--r--]testautomation/writer/tools/includes/w_tools.inc5
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindow.hxx18
-rw-r--r--toolkit/inc/toolkit/awt/vclxwindows.hxx39
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx8
-rw-r--r--toolkit/inc/toolkit/controls/roadmapcontrol.hxx6
-rw-r--r--toolkit/inc/toolkit/controls/unocontrol.hxx14
-rw-r--r--toolkit/inc/toolkit/controls/unocontrolmodel.hxx1
-rw-r--r--toolkit/inc/toolkit/controls/unocontrols.hxx125
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx4
-rw-r--r--toolkit/inc/toolkit/helper/servicenames.hxx6
-rw-r--r--toolkit/source/awt/vclxmenu.cxx44
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx10
-rw-r--r--toolkit/source/awt/vclxwindow.cxx319
-rw-r--r--toolkit/source/awt/vclxwindows.cxx193
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx40
-rw-r--r--toolkit/source/controls/tksimpleanimation.cxx5
-rw-r--r--toolkit/source/controls/tkthrobber.cxx19
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx8
-rw-r--r--toolkit/source/controls/tree/treecontrol.hxx1
-rw-r--r--toolkit/source/controls/unocontrol.cxx52
-rw-r--r--toolkit/source/controls/unocontrolmodel.cxx23
-rw-r--r--toolkit/source/controls/unocontrols.cxx610
-rw-r--r--toolkit/source/helper/property.cxx4
-rw-r--r--toolkit/source/helper/registerservices.cxx16
-rw-r--r--toolkit/source/helper/servicenames.cxx8
-rw-r--r--tools/inc/tools/diagnose_ex.h11
-rw-r--r--unotools/inc/unotools/configmgr.hxx3
-rw-r--r--unotools/source/config/configmgr.cxx15
-rw-r--r--uui/source/iahndl-authentication.cxx12
-rwxr-xr-x[-rw-r--r--]uui/source/iahndl.cxx24
-rwxr-xr-x[-rw-r--r--]uui/source/iahndl.hxx3
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx20
-rw-r--r--vcl/aqua/source/window/salframe.cxx95
-rw-r--r--vcl/inc/vcl/help.hxx1
-rw-r--r--vcl/inc/vcl/impfont.hxx4
-rw-r--r--vcl/inc/vcl/lstbox.hxx1
-rw-r--r--vcl/inc/vcl/syswin.hxx2
-rw-r--r--vcl/source/app/help.cxx30
-rw-r--r--vcl/source/control/lstbox.cxx11
-rw-r--r--vcl/source/fontsubset/cff.cxx31
-rw-r--r--vcl/source/gdi/metric.cxx7
-rw-r--r--vcl/source/gdi/outdev.cxx10
-rw-r--r--vcl/source/gdi/outdev3.cxx1
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/gdi/pngread.cxx2
-rwxr-xr-xvcl/source/gdi/sallayout.cxx13
-rw-r--r--vcl/source/window/menu.cxx4
-rw-r--r--vcl/source/window/syswin.cxx61
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx3
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx4
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx33
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkframe.hxx1
-rw-r--r--vcl/unx/inc/saldisp.hxx1
-rw-r--r--vcl/unx/inc/salgdi.h13
-rw-r--r--vcl/unx/kde/kdedata.cxx3
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx2
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx5
-rw-r--r--vcl/unx/source/app/saldata.cxx6
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx30
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx787
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx2
-rw-r--r--vcl/util/makefile.mk1
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx17
-rw-r--r--[-rwxr-xr-x]vcl/win/source/window/salframe.cxx4
-rw-r--r--writerfilter/source/doctok/resources.xmi402
-rw-r--r--xmloff/inc/xmlnmspe.hxx3
-rw-r--r--xmloff/inc/xmloff/shapeexport.hxx3
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx6
-rw-r--r--xmloff/qa/unoapi/knownissues.xcl11
-rw-r--r--xmloff/qa/unoapi/xmloff.sce4
-rw-r--r--xmloff/source/core/xmlexp.cxx2
-rw-r--r--xmloff/source/core/xmlimp.cxx4
-rw-r--r--xmloff/source/core/xmltoken.cxx6
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx9
-rw-r--r--xmloff/source/draw/shapeexport.cxx35
-rw-r--r--xmloff/source/draw/ximpshap.cxx23
-rw-r--r--xmloff/source/draw/ximpshap.hxx3
-rw-r--r--xmloff/source/text/txtimp.cxx26
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx2
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx3
880 files changed, 12434 insertions, 12536 deletions
diff --git a/automation/source/server/statemnt.cxx b/automation/source/server/statemnt.cxx
index 2d1cccd9fc51..bfe6c30364ad 100644
--- a/automation/source/server/statemnt.cxx
+++ b/automation/source/server/statemnt.cxx
@@ -5311,13 +5311,13 @@ BOOL StatementControl::Execute()
{ // Wir fälschen einen Parameter
if ( aUId.HasNumeric() )
{
- nParams = PARAM_ULONG_1;
+ nParams |= PARAM_ULONG_1;
nLNr1 = USHORT( aUId.GetNum() );
DBG_ASSERT( nLNr1 <= 0xFFFF, "ID on ToolBox > 0xFFFF" );
}
else
{
- nParams = PARAM_STR_1;
+ nParams |= PARAM_STR_1;
aString1 = aUId.GetStr();
}
}
@@ -5330,9 +5330,9 @@ BOOL StatementControl::Execute()
BOOL bItemFound = FALSE;\
{\
SmartId aButtonId;\
- if( nParams == PARAM_STR_1 )\
+ if( nParams & PARAM_STR_1 )\
aButtonId = SmartId( aString1 );\
- if( nParams == PARAM_ULONG_1 )\
+ if( nParams & PARAM_ULONG_1 )\
aButtonId = SmartId( nLNr1 );\
for ( nItemPos = 0; nItemPos < pTB->GetItemCount() && !aButtonId.Matches(pTB->GetItemCommand(pTB->GetItemId(nItemPos))) &&\
!aButtonId.Matches(pTB->GetHelpId(pTB->GetItemId(nItemPos))) ; nItemPos++ ) {}\
@@ -5341,12 +5341,12 @@ BOOL StatementControl::Execute()
ReportError( aUId, GEN_RES_STR1( S_HELPID_ON_TOOLBOX_NOT_FOUND, MethodString( nMethodId ) ) );\
else\
{\
- if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled )\
+ if ( !pTB->IsItemEnabled( pTB->GetItemId(nItemPos) ) && nMethodId != _M_IsEnabled && nMethodId != M_GetState )\
{\
ReportError( aUId, GEN_RES_STR1( S_BUTTON_DISABLED_ON_TOOLBOX, MethodString( nMethodId ) ) );\
bItemFound = FALSE;\
}\
- else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) )\
+ else if ( !pTB->IsItemVisible( pTB->GetItemId(nItemPos) ) && nMethodId != M_GetState )\
{\
ReportError( aUId, GEN_RES_STR1( S_BUTTON_HIDDEN_ON_TOOLBOX, MethodString( nMethodId ) ) );\
bItemFound = FALSE;\
@@ -5738,19 +5738,28 @@ BOOL StatementControl::Execute()
pRet->GenReturn ( RET_Value, aUId, comm_ULONG( pItem->GetButtonFlags() & ~SV_STATE_MASK ));
break;
case M_Check :
- pItem->SetStateChecked();
- pTree->CheckButtonHdl();
- pTree->InvalidateEntry( pThisEntry );
+ if ( !pItem->IsStateChecked() )
+ {
+ pItem->SetStateChecked();
+ pTree->CheckButtonHdl();
+ pTree->InvalidateEntry( pThisEntry );
+ }
break;
case M_UnCheck :
- pItem->SetStateUnchecked();
- pTree->CheckButtonHdl();
- pTree->InvalidateEntry( pThisEntry );
+ if ( pItem->IsStateChecked() || pItem->IsStateTristate() )
+ {
+ pItem->SetStateUnchecked();
+ pTree->CheckButtonHdl();
+ pTree->InvalidateEntry( pThisEntry );
+ }
break;
case M_TriState :
- pItem->SetStateTristate();
- pTree->CheckButtonHdl();
- pTree->InvalidateEntry( pThisEntry );
+ if ( !pItem->IsStateTristate() )
+ {
+ pItem->SetStateTristate();
+ pTree->CheckButtonHdl();
+ pTree->InvalidateEntry( pThisEntry );
+ }
break;
default:
ReportError( aUId, GEN_RES_STR1( S_INTERNAL_ERROR, MethodString( nMethodId ) ) );
@@ -6282,6 +6291,8 @@ protected:
MouseEvent aMEvnt(aPos,1,MOUSE_SIMPLECLICK|MOUSE_SELECT,MOUSE_LEFT,KEY_MOD1);
pTC->getSelEngine()->SelMouseButtonDown( aMEvnt );
pTC->getSelEngine()->SelMouseButtonUp( aMEvnt );
+ if ( pTC->IsRowSelected( nNr1-1 ) )
+ pTC->Select();
}
else
ReportError( aUId, GEN_RES_STR2c2( S_METHOD_FAILED, MethodString( nMethodId ), "find pos" ) );
diff --git a/avmedia/source/framework/makefile.mk b/avmedia/source/framework/makefile.mk
index 34669d3e9f8a..4185f3cbfc49 100644
--- a/avmedia/source/framework/makefile.mk
+++ b/avmedia/source/framework/makefile.mk
@@ -50,6 +50,7 @@ SLOFILES= \
$(SLO)$/soundhandler.obj
EXCEPTIONSFILES = \
+ $(SLO)$/mediatoolbox.obj \
$(SLO)$/soundhandler.obj
# --- Targets ----------------------------------
diff --git a/basctl/source/basicide/makefile.mk b/basctl/source/basicide/makefile.mk
index 62c4755112d1..b225b987b24b 100644
--- a/basctl/source/basicide/makefile.mk
+++ b/basctl/source/basicide/makefile.mk
@@ -49,6 +49,7 @@ CDEFS+=-DBASICDEBUG
EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \
$(SLO)$/scriptdocument.obj \
+ $(SLO)$/basicbox.obj \
$(SLO)$/basidesh.obj \
$(SLO)$/basides1.obj \
$(SLO)$/basides2.obj \
@@ -75,7 +76,6 @@ EXCEPTIONSFILES=$(SLO)$/basicrenderable.obj \
$(SLO)$/documentenumeration.obj
SLOFILES = $(EXCEPTIONSFILES) \
- $(SLO)$/basicbox.obj \
$(SLO)$/baside2b.obj \
$(SLO)$/brkdlg.obj \
$(SLO)$/objdlg.obj \
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 11955ceb22f9..e03aadfe1577 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -364,7 +364,8 @@ namespace basegfx
if(fTools::moreOrEqual(fCutB, fZero) && fTools::less(fCutB, fOne))
{
// cut is in both ranges. Add points for A and B
- if(fTools::equalZero(fCutA))
+ // #i111715# use fTools::equal instead of fTools::equalZero for better accuracy
+ if(fTools::equal(fCutA, fZero))
{
// ignore for start point in first edge; this is handled
// by outer methods and would just produce a double point
@@ -379,7 +380,8 @@ namespace basegfx
rTempPointsA.push_back(temporaryPoint(aCutPoint, a, fCutA));
}
- if(fTools::equalZero(fCutB))
+ // #i111715# use fTools::equal instead of fTools::equalZero for better accuracy
+ if(fTools::equal(fCutB, fZero))
{
// ignore for start point in first edge; this is handled
// by outer methods and would just produce a double point
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 29e49b0ffde8..ef3e4c056cb6 100755
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -906,7 +906,7 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg )
{
// TEST, has to be vb here always
#ifdef DBG_UTIL
- SbError nTmp = StarBASIC::GetSfxFromVBError( nError );
+ SbError nTmp = StarBASIC::GetSfxFromVBError( USHORT( nError ) );
DBG_ASSERT( nTmp, "No VB error!" );
#endif
diff --git a/chart2/prj/build.lst b/chart2/prj/build.lst
index 3cdc9a26e3f5..469eb7554d6b 100644
--- a/chart2/prj/build.lst
+++ b/chart2/prj/build.lst
@@ -24,3 +24,4 @@ ch chart2\source\controller\chartapiwrapper nmake - all ch_source_controlle
ch chart2\source\controller\main nmake - all ch_source_controller_main ch_inc NULL
ch chart2\source\controller\menus nmake - all ch_source_controller_menus ch_inc NULL
ch chart2\prj get - all ch_prj NULL
+ch chart2\qa\unoapi nmake - all ch_qa_unoapi NULL
diff --git a/chart2/qa/unoapi/knownissues.xcl b/chart2/qa/unoapi/knownissues.xcl
index 99c0b9aa096e..155132922661 100644
--- a/chart2/qa/unoapi/knownissues.xcl
+++ b/chart2/qa/unoapi/knownissues.xcl
@@ -1,7 +1,5 @@
#i83851
sch.ChXChartDocument::com::sun::star::frame::XModel
-#i83832
-sch.ChXChartDocument::com::sun::star::beans::XPropertySet
#i83833
sch.ChXChartDocument::com::sun::star::chart::XChartDocument
#i83834
@@ -12,8 +10,6 @@ sch.ChXChartView::com::sun::star::view::XSelectionSupplier
#i83855
sch.ChXDiagram::com::sun::star::chart::LineDiagram
-#i83857
-sch.ChXDiagram::com::sun::star::drawing::XShape
#i83853
sch.ChXDiagram::com::sun::star::beans::XPropertySet
#i83854
@@ -23,19 +19,9 @@ sch.ChXDiagram::com::sun::star::chart::ChartAxisZSupplier
#i83856
sch.ChXDiagram::com::sun::star::chart::StockDiagram
-#i83706
-sch.ChartLegend::com::sun::star::drawing::LineProperties
-sch.ChartLegend::com::sun::star::drawing::FillProperties
-sch.ChartLegend::com::sun::star::chart::ChartLegend
-sch.ChartLegend::com::sun::star::style::CharacterProperties
sch.ChartLegend::com::sun::star::drawing::XShape
-
#i83830
sch.ChartTitle::com::sun::star::drawing::XShape
-#i83831
-sch.ChartTitle::com::sun::star::style::CharacterProperties
-#i83827
-sch.ChartTitle::com::sun::star::chart::ChartTitle
#i78867
sch.ChXChartDocument::com::sun::star::xml::UserDefinedAttributeSupplier
@@ -50,14 +36,5 @@ sch.ChXDataPoint::com::sun::star::xml::UserDefinedAttributeSupplier
#i83865
sch.ChXDataPoint::com::sun::star::drawing::LineProperties
-
-#i83866
-sch.ChXDataPoint::com::sun::star::chart::Chart3DBarProperties
-
-#i87138
-sch.ChXDiagram
-# -> disabled in sch.sce
-
-### i87295 ###
-sch.ChXChartAxis::com::sun::star::beans::XPropertySet
+#112078
sch.ChartLegend::com::sun::star::beans::XPropertySet
diff --git a/chart2/qa/unoapi/sch.sce b/chart2/qa/unoapi/sch.sce
index 6f2df6fbb36d..b35dec7c2ef4 100644
--- a/chart2/qa/unoapi/sch.sce
+++ b/chart2/qa/unoapi/sch.sce
@@ -16,9 +16,9 @@
-o sch.ChXChartData
-o sch.ChXChartDataArray
-o sch.ChXChartView
-#i83867 -o sch.ChXDataPoint
+-o sch.ChXDataPoint
#i83868 -o sch.ChXDataRow
-#i87138 -o sch.ChXDiagram
+-o sch.ChXDiagram
-o sch.ChartArea
-o sch.ChartGrid
-o sch.ChartLegend
diff --git a/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs b/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs
index 95d6d22451c2..c3a5833ae27a 100644
--- a/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs
+++ b/chart2/qa/unoapi/testdocuments/TransparencyChart.sxs
Binary files differ
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index 7ac8cec0ad62..6d53fb8b01f6 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -149,43 +149,43 @@ void lcl_AddPropertiesToVector(
Property( C2U( "AutoMax" ),
PROP_AXIS_AUTO_MAX,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "AutoMin" ),
PROP_AXIS_AUTO_MIN,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "AutoStepMain" ),
PROP_AXIS_AUTO_STEPMAIN,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "AutoStepHelp" ),
PROP_AXIS_AUTO_STEPHELP,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "Logarithmic" ),
PROP_AXIS_LOGARITHMIC,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "ReverseDirection" ),
PROP_AXIS_REVERSEDIRECTION,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
//todo: this property is missing in the API
rOutProperties.push_back(
@@ -219,8 +219,8 @@ void lcl_AddPropertiesToVector(
Property( C2U( "AutoOrigin" ),
PROP_AXIS_AUTO_ORIGIN,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
//Properties for interval marks:
rOutProperties.push_back(
@@ -312,15 +312,15 @@ void lcl_AddPropertiesToVector(
Property( C2U( "Overlap" ),
PROP_AXIS_OVERLAP,
::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "GapWidth" ),
PROP_AXIS_GAP_WIDTH,
::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
}
const Sequence< Property > & lcl_GetPropertySequence()
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 14a20e133ff1..f93a0190116d 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -170,20 +170,20 @@ void lcl_AddPropertiesToVector(
Property( C2U( "HasMainTitle" ),
PROP_DOCUMENT_HAS_MAIN_TITLE,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "HasSubTitle" ),
PROP_DOCUMENT_HAS_SUB_TITLE,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
rOutProperties.push_back(
Property( C2U( "HasLegend" ),
PROP_DOCUMENT_HAS_LEGEND,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
// really needed?
rOutProperties.push_back(
@@ -196,8 +196,8 @@ void lcl_AddPropertiesToVector(
Property( C2U( "DataSourceLabelsInFirstColumn" ),
PROP_DOCUMENT_LABELS_IN_FIRST_COLUMN,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
//add-in
rOutProperties.push_back(
@@ -223,7 +223,8 @@ void lcl_AddPropertiesToVector(
Property( C2U( "RefreshAddInAllowed" ),
PROP_DOCUMENT_UPDATE_ADDIN,
::getBooleanCppuType(),
- beans::PropertyAttribute::BOUND ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::TRANSIENT ));
// table:null-date // i99104
rOutProperties.push_back(
@@ -742,6 +743,7 @@ Reference< drawing::XShape > SAL_CALL ChartDocumentWrapper::getTitle()
{
if( !m_xTitle.is() )
{
+ ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY ));
m_xTitle = new TitleWrapper( TitleHelper::MAIN_TITLE, m_spChart2ModelContact );
}
return m_xTitle;
@@ -752,6 +754,7 @@ Reference< drawing::XShape > SAL_CALL ChartDocumentWrapper::getSubTitle()
{
if( !m_xSubTitle.is() )
{
+ ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY ));
m_xSubTitle = new TitleWrapper( TitleHelper::SUB_TITLE, m_spChart2ModelContact );
}
return m_xSubTitle;
@@ -1499,6 +1502,16 @@ void SAL_CALL ChartDocumentWrapper::setDelegator(
const uno::Reference< uno::XInterface >& rDelegator )
throw (uno::RuntimeException)
{
+ if( m_bIsDisposed )
+ {
+ if( rDelegator.is() )
+ throw lang::DisposedException(
+ C2U("ChartDocumentWrapper is disposed" ),
+ static_cast< ::cppu::OWeakObject* >( this ));
+ else
+ return;
+ }
+
if( rDelegator.is())
{
m_xDelegator = rDelegator;
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index e05279b15aae..eb3c76dd2c40 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -1251,7 +1251,13 @@ void WrappedDataRowSourceProperty::setPropertyValue( const Any& rOuterValue, con
{
::com::sun::star::chart::ChartDataRowSource eChartDataRowSource = ::com::sun::star::chart::ChartDataRowSource_ROWS;
if( ! (rOuterValue >>= eChartDataRowSource) )
- throw lang::IllegalArgumentException( C2U("Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value"), 0, 0 );
+ {
+ sal_Int32 nNew = ::com::sun::star::chart::ChartDataRowSource_ROWS;
+ if( !(rOuterValue >>= nNew) )
+ throw lang::IllegalArgumentException( C2U("Property DataRowSource requires ::com::sun::star::chart::ChartDataRowSource value"), 0, 0 );
+ else
+ eChartDataRowSource = ::com::sun::star::chart::ChartDataRowSource(nNew);
+ }
m_aOuterValue = rOuterValue;
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 5d4f3e718ff9..02ffcb942c99 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -242,8 +242,8 @@ void lcl_AddPropertiesToVector(
Property( C2U( "Alignment" ),
PROP_LEGEND_ALIGNMENT,
::getCppuType( reinterpret_cast< const ::com::sun::star::chart::ChartLegendPosition * >(0)),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
}
const Sequence< Property > & lcl_GetPropertySequence()
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index ec972f8b21ba..20785faa8b66 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -30,6 +30,8 @@
#include "TitleWrapper.hxx"
#include "macros.hxx"
#include "ContainerHelper.hxx"
+#include "ControllerLockGuard.hxx"
+
#include <comphelper/InlineContainer.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/RelativePosition.hpp>
@@ -225,6 +227,9 @@ TitleWrapper::TitleWrapper( ::chart::TitleHelper::eTitleType eTitleType,
m_aEventListenerContainer( m_aMutex ),
m_eTitleType(eTitleType)
{
+ ControllerLockGuard aCtrlLockGuard( Reference< frame::XModel >( m_spChart2ModelContact->getChart2Document(), uno::UNO_QUERY ));
+ if( !getTitleObject().is() ) //#i83831# create an empty title at the model, thus references to properties can be mapped mapped correctly
+ TitleHelper::createTitle( m_eTitleType, OUString(), m_spChart2ModelContact->getChartModel(), m_spChart2ModelContact->m_xContext );
}
TitleWrapper::~TitleWrapper()
@@ -451,6 +456,33 @@ Any SAL_CALL TitleWrapper::getPropertyDefault( const OUString& rPropertyName )
return aRet;
}
+void SAL_CALL TitleWrapper::addPropertyChangeListener( const OUString& rPropertyName, const Reference< beans::XPropertyChangeListener >& xListener )
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
+ if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) )
+ {
+ Reference< beans::XPropertySet > xPropSet( getFirstCharacterPropertySet(), uno::UNO_QUERY );
+ if( xPropSet.is() )
+ xPropSet->addPropertyChangeListener( rPropertyName, xListener );
+ }
+ else
+ WrappedPropertySet::addPropertyChangeListener( rPropertyName, xListener );
+}
+void SAL_CALL TitleWrapper::removePropertyChangeListener( const OUString& rPropertyName, const Reference< beans::XPropertyChangeListener >& xListener )
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
+ if( CharacterProperties::IsCharacterPropertyHandle( nHandle ) )
+ {
+ Reference< beans::XPropertySet > xPropSet( getFirstCharacterPropertySet(), uno::UNO_QUERY );
+ if( xPropSet.is() )
+ xPropSet->removePropertyChangeListener( rPropertyName, xListener );
+ }
+ else
+ WrappedPropertySet::removePropertyChangeListener( rPropertyName, xListener );
+}
+
// ================================================================================
//ReferenceSizePropertyProvider
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index fba346702d2a..63902e452ee3 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -104,6 +104,9 @@ protected:
virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index fef3e1c10b05..1c7b495bd566 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -976,7 +976,6 @@ void WrappedStatisticPropertySetProperty::setValueToSeries(
const Reference< beans::XPropertySet >& /* xSeriesPropertySet */
, Reference< beans::XPropertySet > /* xNewValue */ ) const
{
- OSL_ENSURE( false, "Trying to set a read-only property" );
}
//-----------------------------------------------------------------------------
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index ea0b8361ae45..4ca8f7161f6e 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -386,7 +386,6 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries(
{
bool bMatchesPrefix =
aNewGraphicURL.matchAsciiL( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_GRAPHOBJ_URLPREFIX ));
- OSL_ENSURE( bMatchesPrefix, "Invalid URL for Symbol Bitmap" );
if( bMatchesPrefix )
{
GraphicObject aGrObj = GraphicObject(
@@ -407,6 +406,7 @@ void WrappedSymbolBitmapURLProperty::setValueToSeries(
C2U("URL"), -1, uno::makeAny( aNewGraphicURL ),
beans::PropertyState_DIRECT_VALUE );
aSymbol.Graphic.set( xGraphProv->queryGraphic( aArgs ));
+ OSL_ENSURE( aSymbol.Graphic.is(), "Invalid URL for Symbol Bitmap" );
xSeriesPropertySet->setPropertyValue( C2U("Symbol"), uno::makeAny( aSymbol ) );
}
catch( const uno::Exception & ex )
diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.src b/chart2/source/controller/dialogs/dlg_InsertLegend.src
index 9e957b4b203b..95a1d5516ab5 100644
--- a/chart2/source/controller/dialogs/dlg_InsertLegend.src
+++ b/chart2/source/controller/dialogs/dlg_InsertLegend.src
@@ -39,9 +39,9 @@ ModalDialog DLG_LEGEND
HelpID = SID_INSERT_CHART_LEGEND ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 135 , 80 ) ;
+ Size = MAP_APPFONT ( 156 , 80 ) ;
Moveable = TRUE ;
- BUTTONS_OK_CANCEL_HELP_STACKED( 79 )
+ BUTTONS_OK_CANCEL_HELP_STACKED( 101 )
RESOURCE_LEGENDDISPLAY( 6, 6 )
RESOURCE_LEGENDPOSITION( 15, 6 + RSC_CD_FIXEDTEXT_HEIGHT +6 )
};
diff --git a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
index 4218b322a948..17f6518eabe4 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
+++ b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc
@@ -35,7 +35,7 @@ CheckBox CBX_SHOWLEGEND \
{ \
HelpID = HID_SCH_LEGEND_SHOW ; \
Pos = MAP_APPFONT ( xpos , ypos ) ; \
- Size = MAP_APPFONT ( 67 , 12 ) ; \
+ Size = MAP_APPFONT ( 95 , 12 ) ; \
Text [ en-US ] = "~Display legend" ; \
TabStop = TRUE ; \
};
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 244d23ed8eff..1696fcdc17c2 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -1133,7 +1133,7 @@ void ChartTypeTabPage::initializePage()
}
}
-sal_Bool ChartTypeTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool ChartTypeTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
//commit changes to model
if( !m_bDoLiveUpdate && m_pCurrentMainType )
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 233d9ee910c6..b40cbb1956db 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -73,7 +73,7 @@ public:
virtual ~ChartTypeTabPage();
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
virtual ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartTypeTemplate > getCurrentTemplate() const;
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 10f0421d4013..7c5f0fb3967b 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -382,10 +382,10 @@ void DataSourceTabPage::DeactivatePage()
void DataSourceTabPage::commitPage()
{
- commitPage(eFinish);
+ commitPage(::svt::WizardTypes::eFinish);
}
-sal_Bool DataSourceTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool DataSourceTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
//ranges may have been edited in the meanwhile (dirty is true in that case here)
if( isValid() )
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 44ffa2b3cdf2..e65b503bfcc2 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -89,7 +89,7 @@ public:
protected:
// OWizardPage
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
//TabPage
virtual void DeactivatePage();
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index f1e4a1e5ff64..3ba6ca0f74b2 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -221,10 +221,10 @@ void RangeChooserTabPage::DeactivatePage()
void RangeChooserTabPage::commitPage()
{
- commitPage(eFinish);
+ commitPage(::svt::WizardTypes::eFinish);
}
-sal_Bool RangeChooserTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool RangeChooserTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
//ranges may have been edited in the meanwhile (dirty is true in that case here)
if( isValid() )
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 9a2b05628fa2..4d985669195c 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -73,7 +73,7 @@ protected: //methods
//OWizardPage
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
//TabPage
virtual void DeactivatePage();
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index 8c97de81dd5d..03988116854e 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -125,7 +125,7 @@ void TitlesAndObjectsTabPage::initializePage()
m_bCommitToModel = true;
}
-sal_Bool TitlesAndObjectsTabPage::commitPage( CommitPageReason /*eReason*/ )
+sal_Bool TitlesAndObjectsTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReason*/ )
{
if( m_apTitleResources->IsModified() ) //titles may have changed in the meanwhile
commitToModel();
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
index d6bb869c2f6d..1cd9c6162a46 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx
@@ -59,7 +59,7 @@ public:
virtual ~TitlesAndObjectsTabPage();
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason eReason );
virtual bool canAdvance() const;
protected:
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 4c0c7dc38ae3..bf8afc65e78f 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -410,7 +410,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT
m_apDropTargetHelper.reset();
}
{
- awt::Size aPageSize( ChartModelHelper::getPageSize(m_aModel->getModel()) );
+ awt::Size aPageSize( ChartModelHelper::getPageSize(getModel()) );
// calls to VCL
::vos::OGuard aSolarGuard( Application::GetSolarMutex());
@@ -420,7 +420,7 @@ APPHELPER_XSERVICEINFO_IMPL(ChartController,CHART_CONTROLLER_SERVICE_IMPLEMENTAT
m_pChartWindow->Show();
m_apDropTargetHelper.reset(
new ChartDropTargetHelper( m_pChartWindow->GetDropTarget(),
- uno::Reference< chart2::XChartDocument >( m_aModel->getModel(), uno::UNO_QUERY )));
+ uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY )));
impl_createDrawViewController();
}
@@ -514,7 +514,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
if( m_aSelection.hasSelection() )
this->impl_selectObjectAndNotiy();
else
- ChartModelHelper::triggerRangeHighlighting( m_aModel->getModel() );
+ ChartModelHelper::triggerRangeHighlighting( getModel() );
impl_initializeAccessible();
@@ -601,7 +601,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
//select chart area per default:
select( uno::makeAny( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, rtl::OUString() ) ) );
- uno::Reference< lang::XMultiServiceFactory > xFact( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< lang::XMultiServiceFactory > xFact( getModel(), uno::UNO_QUERY );
if( xFact.is())
{
m_xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
@@ -615,7 +615,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
if( m_pChartWindow )
m_pChartWindow->Invalidate();
- uno::Reference< chart2::XUndoSupplier > xUndoSupplier( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< chart2::XUndoSupplier > xUndoSupplier( getModel(), uno::UNO_QUERY );
if( xUndoSupplier.is())
m_xUndoManager.set( xUndoSupplier->getUndoManager());
@@ -735,7 +735,7 @@ void ChartController::impl_createDrawViewController()
if( m_pDrawModelWrapper )
{
m_pDrawViewWrapper = new DrawViewWrapper(&m_pDrawModelWrapper->getSdrModel(),m_pChartWindow,true);
- m_pDrawViewWrapper->attachParentReferenceDevice( m_aModel->getModel());
+ m_pDrawViewWrapper->attachParentReferenceDevice( getModel() );
}
}
}
@@ -776,7 +776,7 @@ void ChartController::impl_deleteDrawViewController()
if( m_aModel.is())
{
uno::Reference< view::XSelectionChangeListener > xSelectionChangeListener;
- uno::Reference< chart2::data::XDataReceiver > xDataReceiver( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< chart2::data::XDataReceiver > xDataReceiver( getModel(), uno::UNO_QUERY );
if( xDataReceiver.is() )
xSelectionChangeListener = uno::Reference< view::XSelectionChangeListener >( xDataReceiver->getRangeHighlighter(), uno::UNO_QUERY );
if( xSelectionChangeListener.is() )
@@ -874,7 +874,7 @@ void ChartController::impl_deleteDrawViewController()
throw(uno::RuntimeException)
{
::vos::OGuard aGuard( Application::GetSolarMutex());
- if( m_aLifeTimeManager.impl_isDisposed() )
+ if( m_aLifeTimeManager.impl_isDisposed(false) )
return; //behave passive if already disposed or suspended
//--remove listener
@@ -959,6 +959,8 @@ bool ChartController::impl_releaseThisModel( const uno::Reference< uno::XInterfa
bReleaseModel = true;
}
}
+ if( bReleaseModel )
+ m_aDispatchContainer.setModel( 0 );
return bReleaseModel;
}
@@ -1059,7 +1061,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
, sal_Int32 /* nSearchFlags */)
throw(uno::RuntimeException)
{
- if ( !m_aLifeTimeManager.impl_isDisposed() )
+ if ( !m_aLifeTimeManager.impl_isDisposed() && getModel().is() )
{
if( rTargetFrameName.getLength() &&
rTargetFrameName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("_self")))
@@ -1103,7 +1105,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
//----------------------------------
else if(aCommand.equals("Update")) //Update Chart
{
- ChartViewHelper::setViewToDirtyState( m_aModel->getModel() );
+ ChartViewHelper::setViewToDirtyState( getModel() );
if( m_pChartWindow )
m_pChartWindow->Invalidate();
}
@@ -1325,12 +1327,12 @@ void SAL_CALL ChartController::executeDispatch_ChartType()
{
// using assignment for broken gcc 3.3
UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard(
- ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHARTTYPE ))), m_xUndoManager, m_aModel->getModel() );
+ ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHARTTYPE ))), m_xUndoManager, getModel() );
// /--
::vos::OGuard aSolarGuard( Application::GetSolarMutex());
//prepare and open dialog
- ChartTypeDialog aDlg( m_pChartWindow, m_aModel->getModel(), m_xCC );
+ ChartTypeDialog aDlg( m_pChartWindow, getModel(), m_xCC );
if( aDlg.Execute() == RET_OK )
{
impl_adaptDataSeriesAutoResize();
@@ -1343,14 +1345,14 @@ void SAL_CALL ChartController::executeDispatch_SourceData()
{
//-------------------------------------------------------------
//convert properties to ItemSet
- uno::Reference< XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
DBG_ASSERT( xChartDoc.is(), "Invalid XChartDocument" );
if( !xChartDoc.is())
return;
// using assignment for broken gcc 3.3
UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard(
- ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_DATA_RANGES ))), m_xUndoManager, m_aModel->getModel() );
+ ::rtl::OUString( String( SchResId( STR_ACTION_EDIT_DATA_RANGES ))), m_xUndoManager, getModel() );
if( xChartDoc.is())
{
// /--
@@ -1367,20 +1369,20 @@ void SAL_CALL ChartController::executeDispatch_SourceData()
void SAL_CALL ChartController::executeDispatch_MoveSeries( sal_Bool bForward )
{
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
//get selected series
::rtl::OUString aObjectCID(m_aSelection.getSelectedCID());
uno::Reference< XDataSeries > xGivenDataSeries( ObjectIdentifier::getDataSeriesForCID( //yyy todo also legendentries and labels?
- aObjectCID, m_aModel->getModel() ) );
+ aObjectCID, getModel() ) );
UndoGuardWithSelection aUndoGuard(
ActionDescriptionProvider::createDescription(
(bForward ? ActionDescriptionProvider::MOVE_TOTOP : ActionDescriptionProvider::MOVE_TOBOTTOM),
::rtl::OUString( String( SchResId( STR_OBJECT_DATASERIES )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel());
- bool bChanged = DiagramHelper::moveSeries( ChartModelHelper::findDiagram( m_aModel->getModel() ), xGivenDataSeries, bForward );
+ bool bChanged = DiagramHelper::moveSeries( ChartModelHelper::findDiagram( getModel() ), xGivenDataSeries, bForward );
if( bChanged )
{
m_aSelection.setSelection( ObjectIdentifier::getMovedSeriesCID( aObjectCID, bForward ) );
@@ -1432,7 +1434,7 @@ void SAL_CALL ChartController::modified( const lang::EventObject& /* aEvent */ )
{
// the source can also be a subobject of the ChartModel
// @todo: change the source in ChartModel to always be the model itself ?
-// if( m_aModel->getModel() == aEvent.Source )
+// if( getModel() == aEvent.Source )
//todo? update menu states ?
@@ -1511,7 +1513,7 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
uno::Sequence< uno::Any > aArguments(5);
uno::Reference<view::XSelectionSupplier> xSelectionSupplier(this);
aArguments[0]=uno::makeAny(xSelectionSupplier);
- uno::Reference<frame::XModel> xModel(m_aModel->getModel());
+ uno::Reference<frame::XModel> xModel(getModel());
aArguments[1]=uno::makeAny(xModel);
aArguments[2]=uno::makeAny(m_xChartView);
uno::Reference< XAccessible > xParent;
diff --git a/chart2/source/controller/main/ChartController.hxx b/chart2/source/controller/main/ChartController.hxx
index 81f4ba5a549e..f2b64eb7a9c5 100644
--- a/chart2/source/controller/main/ChartController.hxx
+++ b/chart2/source/controller/main/ChartController.hxx
@@ -597,7 +597,7 @@ private:
//private methods
sal_Bool impl_isDisposedOrSuspended() const;
- ::std::auto_ptr< ReferenceSizeProvider > impl_createReferenceSizeProvider() const;
+ ::std::auto_ptr< ReferenceSizeProvider > impl_createReferenceSizeProvider();
void impl_adaptDataSeriesAutoResize();
void impl_createDrawViewController();
diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx
index 5b6d9c1a60b7..0248732a63a7 100644
--- a/chart2/source/controller/main/ChartController_EditData.cxx
+++ b/chart2/source/controller/main/ChartController_EditData.cxx
@@ -54,7 +54,7 @@ namespace chart
void ChartController::executeDispatch_EditData()
{
- Reference< chart2::XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY );
+ Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
if( xChartDoc.is())
{
Window* pParent( NULL );
@@ -67,7 +67,7 @@ void ChartController::executeDispatch_EditData()
// using assignment for broken gcc 3.3
UndoLiveUpdateGuardWithData aUndoGuard = UndoLiveUpdateGuardWithData(
::rtl::OUString( String( SchResId( STR_ACTION_EDIT_CHART_DATA ))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC );
// the dialog has no OK/Cancel
aDataEditorDialog.Execute();
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 13b0174a7d02..0a7a4057ef9a 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -122,12 +122,12 @@ void ChartController::executeDispatch_InsertAxes()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AXES )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
InsertAxisOrGridDialogData aDialogInput;
- uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(m_aModel->getModel());
+ uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(getModel());
AxisHelper::getAxisOrGridExcistence( aDialogInput.aExistenceList, xDiagram, sal_True );
AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, sal_True );
@@ -136,7 +136,7 @@ void ChartController::executeDispatch_InsertAxes()
if( aDlg.Execute() == RET_OK )
{
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
InsertAxisOrGridDialogData aDialogOutput;
aDlg.getResult( aDialogOutput );
@@ -160,12 +160,12 @@ void ChartController::executeDispatch_InsertGrid()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_GRIDS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
InsertAxisOrGridDialogData aDialogInput;
- uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(m_aModel->getModel());
+ uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram(getModel());
AxisHelper::getAxisOrGridExcistence( aDialogInput.aExistenceList, xDiagram, sal_False );
AxisHelper::getAxisOrGridPossibilities( aDialogInput.aPossibilityList, xDiagram, sal_False );
@@ -174,7 +174,7 @@ void ChartController::executeDispatch_InsertGrid()
if( aDlg.Execute() == RET_OK )
{
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
InsertAxisOrGridDialogData aDialogOutput;
aDlg.getResult( aDialogOutput );
bool bChanged = AxisHelper::changeVisibilityOfGrids( xDiagram
@@ -197,22 +197,22 @@ void ChartController::executeDispatch_InsertTitles()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_TITLES )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
TitleDialogData aDialogInput;
- aDialogInput.readFromModel( m_aModel->getModel() );
+ aDialogInput.readFromModel( getModel() );
::vos::OGuard aGuard( Application::GetSolarMutex());
SchTitleDlg aDlg( m_pChartWindow, aDialogInput );
if( aDlg.Execute() == RET_OK )
{
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
TitleDialogData aDialogOutput( impl_createReferenceSizeProvider());
aDlg.getResult( aDialogOutput );
- bool bChanged = aDialogOutput.writeDifferenceToModel( m_aModel->getModel(), m_xCC, &aDialogInput );
+ bool bChanged = aDialogOutput.writeDifferenceToModel( getModel(), m_xCC, &aDialogInput );
if( bChanged )
aUndoGuard.commitAction();
}
@@ -228,9 +228,9 @@ void ChartController::executeDispatch_DeleteLegend()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
- LegendHelper::hideLegend( m_aModel->getModel() );
+ LegendHelper::hideLegend( getModel() );
aUndoGuard.commitAction();
}
@@ -239,9 +239,9 @@ void ChartController::executeDispatch_InsertLegend()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
- Reference< chart2::XLegend > xLegend = LegendHelper::showLegend( m_aModel->getModel(), m_xCC );
+ Reference< chart2::XLegend > xLegend = LegendHelper::showLegend( getModel(), m_xCC );
aUndoGuard.commitAction();
}
@@ -250,19 +250,19 @@ void ChartController::executeDispatch_OpenLegendDialog()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
//prepare and open dialog
::vos::OGuard aGuard( Application::GetSolarMutex());
SchLegendDlg aDlg( m_pChartWindow, m_xCC );
- aDlg.init( m_aModel->getModel() );
+ aDlg.init( getModel() );
if( aDlg.Execute() == RET_OK )
{
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel() );
- bool bChanged = aDlg.writeToModel( m_aModel->getModel() );
+ ControllerLockGuard aCLGuard( getModel() );
+ bool bChanged = aDlg.writeToModel( getModel() );
if( bChanged )
aUndoGuard.commitAction();
}
@@ -281,11 +281,11 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_DATALABELS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
//if a series is selected insert labels for that series only:
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel()), uno::UNO_QUERY );
if( xSeries.is() )
{
// add labels
@@ -305,10 +305,10 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
try
{
wrapper::AllDataLabelItemConverter aItemConverter(
- m_aModel->getModel(),
+ getModel(),
m_pDrawModelWrapper->GetItemPool(),
m_pDrawModelWrapper->getSdrModel(),
- uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY ));
+ uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ));
SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
aItemConverter.FillItemSet( aItemSet );
@@ -316,7 +316,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
::vos::OGuard aGuard( Application::GetSolarMutex());
//get number formatter
- uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( getModel(), uno::UNO_QUERY );
NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
SvNumberFormatter* pNumberFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
@@ -327,7 +327,7 @@ void ChartController::executeDispatch_InsertMenu_DataLabels()
SfxItemSet aOutItemSet = aItemConverter.CreateEmptyItemSet();
aDlg.FillItemSet( aOutItemSet );
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now
if( bChanged )
aUndoGuard.commitAction();
@@ -343,7 +343,7 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars()
{
//if a series is selected insert error bars for that series only:
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is())
{
executeDispatch_InsertYErrorBars();
@@ -354,12 +354,12 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_ERRORS ) ),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
wrapper::AllSeriesStatisticsConverter aItemConverter(
- m_aModel->getModel(), m_pDrawModelWrapper->GetItemPool() );
+ getModel(), m_pDrawModelWrapper->GetItemPool() );
SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
aItemConverter.FillItemSet( aItemSet );
@@ -367,9 +367,9 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars()
::vos::OGuard aGuard( Application::GetSolarMutex());
InsertErrorBarsDialog aDlg(
m_pChartWindow, aItemSet,
- uno::Reference< chart2::XChartDocument >( m_aModel->getModel(), uno::UNO_QUERY ));
+ uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ));
aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
- InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( m_aModel->getModel(), m_xChartView, rtl::OUString() ) );
+ InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, rtl::OUString() ) );
if( aDlg.Execute() == RET_OK )
{
@@ -377,7 +377,7 @@ void ChartController::executeDispatch_InsertMenu_YErrorBars()
aDlg.FillItemSet( aOutItemSet );
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now
if( bChanged )
aUndoGuard.commitAction();
@@ -394,9 +394,9 @@ void ChartController::executeDispatch_InsertMeanValue()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
lcl_InsertMeanValueLine( m_xCC ).operator()(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()));
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ));
aUndoGuard.commitAction();
}
@@ -405,10 +405,10 @@ void ChartController::executeDispatch_InsertMenu_MeanValues()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
{
//if a series is selected insert mean value only for that series:
@@ -417,7 +417,7 @@ void ChartController::executeDispatch_InsertMenu_MeanValues()
else
{
::std::vector< uno::Reference< chart2::XDataSeries > > aSeries(
- DiagramHelper::getDataSeriesFromDiagram( ChartModelHelper::findDiagram( m_aModel->getModel())));
+ DiagramHelper::getDataSeriesFromDiagram( ChartModelHelper::findDiagram( getModel() )));
::std::for_each( aSeries.begin(), aSeries.end(), lcl_InsertMeanValueLine( m_xCC ));
}
aUndoGuard.commitAction();
@@ -427,7 +427,7 @@ void ChartController::executeDispatch_InsertMenu_Trendlines()
{
//if a series is selected insert only for that series:
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is())
{
executeDispatch_InsertTrendline();
@@ -437,12 +437,12 @@ void ChartController::executeDispatch_InsertMenu_Trendlines()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ObjectNameProvider::getName_ObjectForAllSeries( OBJECTTYPE_DATA_CURVE ) ),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
wrapper::AllSeriesStatisticsConverter aItemConverter(
- m_aModel->getModel(), m_pDrawModelWrapper->GetItemPool() );
+ getModel(), m_pDrawModelWrapper->GetItemPool() );
SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
aItemConverter.FillItemSet( aItemSet );
@@ -457,7 +457,7 @@ void ChartController::executeDispatch_InsertMenu_Trendlines()
aDlg.FillItemSet( aOutItemSet );
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
bool bChanged = aItemConverter.ApplyItemSet( aOutItemSet );//model should be changed now
if( bChanged )
aUndoGuard.commitAction();
@@ -472,13 +472,13 @@ void ChartController::executeDispatch_InsertMenu_Trendlines()
void ChartController::executeDispatch_InsertTrendline()
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel()), uno::UNO_QUERY );
if( xRegCurveCnt.is())
{
UndoLiveUpdateGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
// add a linear curve
RegressionCurveHelper::addRegressionCurve(
@@ -493,7 +493,7 @@ void ChartController::executeDispatch_InsertTrendline()
wrapper::RegressionCurveItemConverter aItemConverter(
xCurveProp, xRegCurveCnt, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
m_pDrawModelWrapper->getSdrModel(),
- uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY ));
+ uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ));
// open dialog
SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
@@ -502,11 +502,11 @@ void ChartController::executeDispatch_InsertTrendline()
ObjectIdentifier::createDataCurveCID(
ObjectIdentifier::getSeriesParticleFromCID( m_aSelection.getSelectedCID()),
RegressionCurveHelper::getRegressionCurveIndex( xRegCurveCnt, xCurve ), false ));
- aDialogParameter.init( m_aModel->getModel() );
+ aDialogParameter.init( getModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
::vos::OGuard aGuard( Application::GetSolarMutex());
SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider,
- uno::Reference< util::XNumberFormatsSupplier >( m_aModel->getModel(), uno::UNO_QUERY ));
+ uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ));
// note: when a user pressed "OK" but didn't change any settings in the
// dialog, the SfxTabDialog returns "Cancel"
@@ -515,7 +515,7 @@ void ChartController::executeDispatch_InsertTrendline()
const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet();
if( pOutItemSet )
{
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
aItemConverter.ApplyItemSet( *pOutItemSet );
}
aUndoGuard.commitAction();
@@ -526,13 +526,13 @@ void ChartController::executeDispatch_InsertTrendline()
void ChartController::executeDispatch_InsertYErrorBars()
{
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is())
{
UndoLiveUpdateGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_ERROR_BARS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
// add error bars with standard deviation
uno::Reference< beans::XPropertySet > xErrorBarProp(
@@ -540,9 +540,9 @@ void ChartController::executeDispatch_InsertYErrorBars()
// get an appropriate item converter
wrapper::ErrorBarItemConverter aItemConverter(
- m_aModel->getModel(), xErrorBarProp, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
+ getModel(), xErrorBarProp, m_pDrawModelWrapper->getSdrModel().GetItemPool(),
m_pDrawModelWrapper->getSdrModel(),
- uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY ));
+ uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY ));
// open dialog
SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
@@ -550,13 +550,13 @@ void ChartController::executeDispatch_InsertYErrorBars()
ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter(
ObjectIdentifier::createClassifiedIdentifierWithParent(
OBJECTTYPE_DATA_ERRORS, ::rtl::OUString(), m_aSelection.getSelectedCID()));
- aDialogParameter.init( m_aModel->getModel() );
+ aDialogParameter.init( getModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get());
::vos::OGuard aGuard( Application::GetSolarMutex());
SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider,
- uno::Reference< util::XNumberFormatsSupplier >( m_aModel->getModel(), uno::UNO_QUERY ));
+ uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ));
aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
- InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( m_aModel->getModel(), m_xChartView, m_aSelection.getSelectedCID()));
+ InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, m_aSelection.getSelectedCID()));
// note: when a user pressed "OK" but didn't change any settings in the
// dialog, the SfxTabDialog returns "Cancel"
@@ -565,7 +565,7 @@ void ChartController::executeDispatch_InsertYErrorBars()
const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet();
if( pOutItemSet )
{
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
aItemConverter.ApplyItemSet( *pOutItemSet );
}
aUndoGuard.commitAction();
@@ -576,11 +576,11 @@ void ChartController::executeDispatch_InsertYErrorBars()
void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 )
{
uno::Reference< chart2::XRegressionCurve > xRegCurve(
- ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( !xRegCurve.is() )
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
xRegCurve.set( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) );
}
if( xRegCurve.is())
@@ -592,7 +592,7 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 )
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
xEqProp->setPropertyValue( C2U("ShowEquation"), uno::makeAny( true ));
xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( bInsertR2 ));
aUndoGuard.commitAction();
@@ -603,13 +603,13 @@ void ChartController::executeDispatch_InsertTrendlineEquation( bool bInsertR2 )
void ChartController::executeDispatch_InsertR2Value()
{
uno::Reference< beans::XPropertySet > xEqProp(
- ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xEqProp.is())
{
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( true ));
aUndoGuard.commitAction();
}
@@ -618,13 +618,13 @@ void ChartController::executeDispatch_InsertR2Value()
void ChartController::executeDispatch_DeleteR2Value()
{
uno::Reference< beans::XPropertySet > xEqProp(
- ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xEqProp.is())
{
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false ));
aUndoGuard.commitAction();
}
@@ -633,13 +633,13 @@ void ChartController::executeDispatch_DeleteR2Value()
void ChartController::executeDispatch_DeleteMeanValue()
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xRegCurveCnt.is())
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
RegressionCurveHelper::removeMeanValueLine( xRegCurveCnt );
aUndoGuard.commitAction();
}
@@ -648,13 +648,13 @@ void ChartController::executeDispatch_DeleteMeanValue()
void ChartController::executeDispatch_DeleteTrendline()
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xRegCurveCnt.is())
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
RegressionCurveHelper::removeAllExceptMeanValueLine( xRegCurveCnt );
aUndoGuard.commitAction();
}
@@ -663,13 +663,13 @@ void ChartController::executeDispatch_DeleteTrendline()
void ChartController::executeDispatch_DeleteTrendlineEquation()
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xRegCurveCnt.is())
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE_EQUATION )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
RegressionCurveHelper::removeEquations( xRegCurveCnt );
aUndoGuard.commitAction();
}
@@ -678,13 +678,13 @@ void ChartController::executeDispatch_DeleteTrendlineEquation()
void ChartController::executeDispatch_DeleteYErrorBars()
{
uno::Reference< chart2::XDataSeries > xDataSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()));
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ));
if( xDataSeries.is())
{
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_CURVE )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
StatisticsHelper::removeErrorBars( xDataSeries );
aUndoGuard.commitAction();
}
@@ -693,12 +693,12 @@ void ChartController::executeDispatch_DeleteYErrorBars()
void ChartController::executeDispatch_InsertDataLabels()
{
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
{
UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT,
::rtl::OUString( String( SchResId( STR_OBJECT_DATALABELS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
DataSeriesHelper::insertDataLabelsToSeriesAndAllPoints( xSeries );
aUndoGuard.commitAction();
}
@@ -708,20 +708,20 @@ void ChartController::executeDispatch_InsertDataLabel()
{
UndoGuard aUndoGuard = UndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::INSERT,
::rtl::OUString( String( SchResId( STR_OBJECT_LABEL )))),
- m_xUndoManager, m_aModel->getModel() );
- DataSeriesHelper::insertDataLabelToPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel() ) );
+ m_xUndoManager, getModel() );
+ DataSeriesHelper::insertDataLabelToPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ) );
aUndoGuard.commitAction();
}
void ChartController::executeDispatch_DeleteDataLabels()
{
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE,
::rtl::OUString( String( SchResId( STR_OBJECT_DATALABELS )))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel() );
DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints( xSeries );
aUndoGuard.commitAction();
}
@@ -731,8 +731,8 @@ void ChartController::executeDispatch_DeleteDataLabel()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::DELETE,
::rtl::OUString( String( SchResId( STR_OBJECT_LABEL )))),
- m_xUndoManager, m_aModel->getModel());
- DataSeriesHelper::deleteDataLabelsFromPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), m_aModel->getModel() ) );
+ m_xUndoManager, getModel() );
+ DataSeriesHelper::deleteDataLabelsFromPoint( ObjectIdentifier::getObjectPropertySet( m_aSelection.getSelectedCID(), getModel() ) );
aUndoGuard.commitAction();
}
@@ -740,8 +740,8 @@ void ChartController::executeDispatch_ResetAllDataPoints()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT,
::rtl::OUString( String( SchResId( STR_OBJECT_DATAPOINTS )))),
- m_xUndoManager, m_aModel->getModel());
- uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ m_xUndoManager, getModel() );
+ uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
xSeries->resetAllDataPoints();
aUndoGuard.commitAction();
@@ -750,8 +750,8 @@ void ChartController::executeDispatch_ResetDataPoint()
{
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription( ActionDescriptionProvider::FORMAT,
::rtl::OUString( String( SchResId( STR_OBJECT_DATAPOINT )))),
- m_xUndoManager, m_aModel->getModel());
- uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel()), uno::UNO_QUERY );
+ m_xUndoManager, getModel() );
+ uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() ), uno::UNO_QUERY );
if( xSeries.is() )
{
sal_Int32 nPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( m_aSelection.getSelectedCID() );
@@ -769,13 +769,13 @@ void ChartController::executeDispatch_InsertAxisTitle()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_TITLE )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
sal_Int32 nDimensionIndex = -1;
sal_Int32 nCooSysIndex = -1;
sal_Int32 nAxisIndex = -1;
- AxisHelper::getIndicesForAxis( xAxis, ChartModelHelper::findDiagram(m_aModel->getModel()), nCooSysIndex, nDimensionIndex, nAxisIndex );
+ AxisHelper::getIndicesForAxis( xAxis, ChartModelHelper::findDiagram(getModel()), nCooSysIndex, nDimensionIndex, nAxisIndex );
TitleHelper::eTitleType eTitleType = TitleHelper::X_AXIS_TITLE;
if( nDimensionIndex==0 )
@@ -786,14 +786,14 @@ void ChartController::executeDispatch_InsertAxisTitle()
eTitleType = TitleHelper::Z_AXIS_TITLE;
::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider());
- xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), m_aModel->getModel(), m_xCC, apRefSizeProvider.get() );
+ xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getModel(), m_xCC, apRefSizeProvider.get() );
aUndoGuard.commitAction();
}
/*
if( xTitle.is() )
{
- OUString aTitleCID = ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, m_aModel->getModel() );
+ OUString aTitleCID = ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, getModel() );
select( uno::makeAny(aTitleCID) );
executeDispatch_EditText();
}
@@ -810,11 +810,11 @@ void ChartController::executeDispatch_InsertAxis()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_AXIS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() )
{
AxisHelper::makeAxisVisible( xAxis );
@@ -832,11 +832,11 @@ void ChartController::executeDispatch_DeleteAxis()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_AXIS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() )
{
AxisHelper::makeAxisInvisible( xAxis );
@@ -854,11 +854,11 @@ void ChartController::executeDispatch_InsertMajorGrid()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() )
{
AxisHelper::makeGridVisible( xAxis->getGridProperties() );
@@ -876,11 +876,11 @@ void ChartController::executeDispatch_DeleteMajorGrid()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() )
{
AxisHelper::makeGridInvisible( xAxis->getGridProperties() );
@@ -898,11 +898,11 @@ void ChartController::executeDispatch_InsertMinorGrid()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::INSERT, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() )
{
Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
@@ -922,11 +922,11 @@ void ChartController::executeDispatch_DeleteMinorGrid()
UndoGuard aUndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_GRID )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
try
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() )
{
Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index 3105ee53bf14..619d308ffad2 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -139,7 +139,7 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::POS_SIZE,
ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aCID ))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
SfxAbstractTabDialog * pDlg = NULL;
try
@@ -166,11 +166,11 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
Rectangle aObjectRect;
aItemSet.Put(*pOutItemSet);//overwrite old values with new values (-> all items are set)
lcl_getPositionAndSizeFromItemSet( aItemSet, aObjectRect, aSelectedSize );
- awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel() ) );
+ awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID()
- , m_aModel->getModel()
+ , getModel()
, awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
, awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) );
if( bChanged )
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 3c5a0b135622..649b9cb62f9d 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -676,7 +676,7 @@ rtl::OUString lcl_getObjectCIDForCommand( const ::rtl::OString& rDispatchCommand
void SAL_CALL ChartController::executeDispatch_FormatObject(const ::rtl::OUString& rDispatchCommand)
{
- uno::Reference< XChartDocument > xChartDocument( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< XChartDocument > xChartDocument( getModel(), uno::UNO_QUERY );
rtl::OString aCommand( rtl::OUStringToOString( rDispatchCommand, RTL_TEXTENCODING_ASCII_US ) );
rtl::OUString rObjectCID = lcl_getObjectCIDForCommand( aCommand, xChartDocument, m_aSelection.getSelectedCID() );
executeDlg_ObjectProperties( rObjectCID );
@@ -720,7 +720,7 @@ void SAL_CALL ChartController::executeDlg_ObjectProperties( const ::rtl::OUStrin
UndoGuard aUndoGuard( ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::FORMAT,
ObjectNameProvider::getName( ObjectIdentifier::getObjectType( aObjectCID ))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
bool bSuccess = ChartController::executeDlg_ObjectProperties_withoutUndoGuard( aObjectCID, false );
if( bSuccess )
@@ -738,7 +738,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl:
}
try
{
- NumberFormatterWrapper aNumberFormatterWrapper( uno::Reference< util::XNumberFormatsSupplier >(m_aModel->getModel(), uno::UNO_QUERY) );
+ NumberFormatterWrapper aNumberFormatterWrapper( uno::Reference< util::XNumberFormatsSupplier >(getModel(), uno::UNO_QUERY) );
//-------------------------------------------------------------
//get type of object
@@ -750,19 +750,19 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl:
}
if( OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType )
{
- if( !DiagramHelper::isSupportingFloorAndWall( ChartModelHelper::findDiagram( m_aModel->getModel() ) ) )
+ if( !DiagramHelper::isSupportingFloorAndWall( ChartModelHelper::findDiagram( getModel() ) ) )
return bRet;
}
//-------------------------------------------------------------
//convert properties to ItemSet
- awt::Size aPageSize( ChartModelHelper::getPageSize(m_aModel->getModel()) );
+ awt::Size aPageSize( ChartModelHelper::getPageSize(getModel()) );
::std::auto_ptr< ReferenceSizeProvider > pRefSizeProv(
impl_createReferenceSizeProvider());
::std::auto_ptr< ::comphelper::ItemConverter > apItemConverter(
- createItemConverter( rObjectCID, m_aModel->getModel(), m_xCC,
+ createItemConverter( rObjectCID, getModel(), m_xCC,
m_pDrawModelWrapper->getSdrModel(),
&aNumberFormatterWrapper,
ExplicitValueProvider::getExplicitValueProvider(m_xChartView),
@@ -776,24 +776,24 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl:
//-------------------------------------------------------------
//prepare dialog
ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( rObjectCID );
- aDialogParameter.init( m_aModel->getModel() );
+ aDialogParameter.init( getModel() );
ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() );
::vos::OGuard aGuard( Application::GetSolarMutex());
SchAttribTabDlg aDlg( m_pChartWindow, &aItemSet, &aDialogParameter, &aViewElementListProvider
- , uno::Reference< util::XNumberFormatsSupplier >( m_aModel->getModel(), uno::UNO_QUERY ) );
+ , uno::Reference< util::XNumberFormatsSupplier >( getModel(), uno::UNO_QUERY ) );
if(aDialogParameter.HasSymbolProperties())
{
SfxItemSet* pSymbolShapeProperties=NULL;
uno::Reference< beans::XPropertySet > xObjectProperties =
- ObjectIdentifier::getObjectPropertySet( rObjectCID, m_aModel->getModel() );
- wrapper::DataPointItemConverter aSymbolItemConverter( m_aModel->getModel(), m_xCC
- , xObjectProperties, ObjectIdentifier::getDataSeriesForCID( rObjectCID, m_aModel->getModel() )
+ ObjectIdentifier::getObjectPropertySet( rObjectCID, getModel() );
+ wrapper::DataPointItemConverter aSymbolItemConverter( getModel(), m_xCC
+ , xObjectProperties, ObjectIdentifier::getDataSeriesForCID( rObjectCID, getModel() )
, m_pDrawModelWrapper->getSdrModel().GetItemPool()
, m_pDrawModelWrapper->getSdrModel()
, &aNumberFormatterWrapper
- , uno::Reference< lang::XMultiServiceFactory >( m_aModel->getModel(), uno::UNO_QUERY )
+ , uno::Reference< lang::XMultiServiceFactory >( getModel(), uno::UNO_QUERY )
, wrapper::GraphicPropertyItemConverter::FILLED_DATA_POINT );
pSymbolShapeProperties = new SfxItemSet( aSymbolItemConverter.CreateEmptyItemSet() );
@@ -807,7 +807,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl:
if( aDialogParameter.HasStatisticProperties() )
{
aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
- InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( m_aModel->getModel(), m_xChartView, rObjectCID ) );
+ InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, rObjectCID ) );
}
//-------------------------------------------------------------
@@ -817,7 +817,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl:
const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet();
if(pOutItemSet)
{
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel());
apItemConverter->ApplyItemSet( *pOutItemSet );//model should be changed now
bRet = true;
}
@@ -839,12 +839,12 @@ void SAL_CALL ChartController::executeDispatch_View3D()
// using assignment for broken gcc 3.3
UndoLiveUpdateGuard aUndoGuard = UndoLiveUpdateGuard(
::rtl::OUString( String( SchResId( STR_ACTION_EDIT_3D_VIEW ))),
- m_xUndoManager, m_aModel->getModel());
+ m_xUndoManager, getModel());
// /--
//open dialog
::vos::OGuard aSolarGuard( Application::GetSolarMutex());
- View3DDialog aDlg( m_pChartWindow, m_aModel->getModel(), m_pDrawModelWrapper->GetColorTable() );
+ View3DDialog aDlg( m_pChartWindow, getModel(), m_pDrawModelWrapper->GetColorTable() );
if( aDlg.Execute() == RET_OK )
aUndoGuard.commitAction();
// \--
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 4df362ee80d2..a6e82430d8f6 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -80,7 +80,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel )
if(!pTextObj)
return;
- m_xUndoManager->preAction( m_aModel->getModel());
+ m_xUndoManager->preAction( getModel());
SdrOutliner* pOutliner = m_pDrawViewWrapper->getOutliner();
//pOutliner->SetRefDevice(m_pChartWindow);
//pOutliner->SetStyleSheetPool((SfxStyleSheetPool*)pStyleSheetPool);
@@ -159,7 +159,7 @@ bool ChartController::EndTextEdit()
ObjectIdentifier::getObjectPropertySet( aObjectCID, getModel() );
// lock controllers till end of block
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
TitleHelper::setCompleteString( aString, uno::Reference<
::com::sun::star::chart2::XTitle >::query( xPropSet ), m_xCC );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 11fa5e74054e..ffe752f43a7a 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -205,13 +205,13 @@ bool lcl_deleteDataCurve(
namespace chart
{
-::std::auto_ptr< ReferenceSizeProvider > ChartController::impl_createReferenceSizeProvider() const
+::std::auto_ptr< ReferenceSizeProvider > ChartController::impl_createReferenceSizeProvider()
{
- awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel()) );
+ awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
return ::std::auto_ptr< ReferenceSizeProvider >(
new ReferenceSizeProvider( aPageSize,
- Reference< chart2::XChartDocument >( m_aModel->getModel(), uno::UNO_QUERY )));
+ Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY )));
}
void ChartController::impl_adaptDataSeriesAutoResize()
@@ -229,7 +229,7 @@ void ChartController::executeDispatch_NewArrangement()
try
{
- Reference< frame::XModel > xModel( m_aModel->getModel());
+ Reference< frame::XModel > xModel( getModel() );
Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ));
if( xDiagram.is())
{
@@ -286,8 +286,8 @@ void ChartController::executeDispatch_ScaleText()
// using assignment for broken gcc 3.3
UndoGuard aUndoGuard = UndoGuard(
::rtl::OUString( String( SchResId( STR_ACTION_SCALE_TEXT ))),
- m_xUndoManager, m_aModel->getModel());
- ControllerLockGuard aCtlLockGuard( m_aModel->getModel());
+ m_xUndoManager, getModel() );
+ ControllerLockGuard aCtlLockGuard( getModel() );
::std::auto_ptr< ReferenceSizeProvider > apRefSizeProv( impl_createReferenceSizeProvider());
OSL_ASSERT( apRefSizeProv.get());
if( apRefSizeProv.get())
@@ -379,7 +379,7 @@ void ChartController::impl_PasteGraphic(
{
// note: the XPropertySet of the model is the old API. Also the property
// "AdditionalShapes" that is used there.
- uno::Reference< beans::XPropertySet > xModelProp( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xModelProp( getModel(), uno::UNO_QUERY );
DrawModelWrapper * pDrawModelWrapper( this->GetDrawModelWrapper());
if( ! (xGraphic.is() && xModelProp.is()))
return;
@@ -395,7 +395,7 @@ void ChartController::impl_PasteGraphic(
xPage->add( xGraphicShape );
//need to change the model state manually
{
- uno::Reference< util::XModifiable > xModifiable( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY );
if( xModifiable.is() )
xModifiable->setModified( true );
}
@@ -459,7 +459,7 @@ void ChartController::impl_PasteShapes( SdrModel* pModel )
}
}
- Reference< util::XModifiable > xModifiable( m_aModel->getModel(), uno::UNO_QUERY );
+ Reference< util::XModifiable > xModifiable( getModel(), uno::UNO_QUERY );
if ( xModifiable.is() )
{
xModifiable->setModified( true );
@@ -643,7 +643,7 @@ bool ChartController::executeDispatch_Delete()
return false;
//remove chart object
- uno::Reference< chart2::XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< chart2::XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
if( !xChartDoc.is() )
return false;
@@ -656,9 +656,9 @@ bool ChartController::executeDispatch_Delete()
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_TITLE )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel());
TitleHelper::removeTitle(
- ObjectIdentifier::getTitleTypeForCID( aCID ), m_aModel->getModel());
+ ObjectIdentifier::getTitleTypeForCID( aCID ), getModel() );
bReturn = true;
aUndoGuard.commitAction();
break;
@@ -675,7 +675,7 @@ bool ChartController::executeDispatch_Delete()
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_LEGEND )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
xLegendProp->setPropertyValue( C2U("Show"), uno::makeAny( false ));
bReturn = true;
aUndoGuard.commitAction();
@@ -685,7 +685,7 @@ bool ChartController::executeDispatch_Delete()
}
case OBJECTTYPE_DATA_SERIES:
- bReturn = lcl_deleteDataSeries( aCID, m_aModel->getModel(), m_xUndoManager );
+ bReturn = lcl_deleteDataSeries( aCID, getModel(), m_xUndoManager );
break;
case OBJECTTYPE_LEGEND_ENTRY:
@@ -693,9 +693,9 @@ bool ChartController::executeDispatch_Delete()
ObjectType eParentObjectType = ObjectIdentifier::getObjectType(
ObjectIdentifier::getFullParentParticle( aCID ));
if( eParentObjectType == OBJECTTYPE_DATA_SERIES )
- bReturn = lcl_deleteDataSeries( aCID, m_aModel->getModel(), m_xUndoManager );
+ bReturn = lcl_deleteDataSeries( aCID, getModel(), m_xUndoManager );
else if( eParentObjectType == OBJECTTYPE_DATA_CURVE )
- bReturn = lcl_deleteDataCurve( aCID, m_aModel->getModel(), m_xUndoManager );
+ bReturn = lcl_deleteDataCurve( aCID, getModel(), m_xUndoManager );
break;
}
@@ -703,14 +703,14 @@ bool ChartController::executeDispatch_Delete()
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt(
ObjectIdentifier::getObjectPropertySet(
- ObjectIdentifier::getFullParentParticle( aCID ), m_aModel->getModel()), uno::UNO_QUERY );
+ ObjectIdentifier::getFullParentParticle( aCID ), getModel()), uno::UNO_QUERY );
if( xRegCurveCnt.is())
{
// using assignment for broken gcc 3.3
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String( SchResId( STR_OBJECT_AVERAGE_LINE )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
RegressionCurveHelper::removeMeanValueLine( xRegCurveCnt );
bReturn = true;
aUndoGuard.commitAction();
@@ -719,16 +719,16 @@ bool ChartController::executeDispatch_Delete()
}
case OBJECTTYPE_DATA_CURVE:
- bReturn = lcl_deleteDataCurve( aCID, m_aModel->getModel(), m_xUndoManager );
+ bReturn = lcl_deleteDataCurve( aCID, getModel(), m_xUndoManager );
break;
case OBJECTTYPE_DATA_CURVE_EQUATION:
{
uno::Reference< beans::XPropertySet > xEqProp(
- ObjectIdentifier::getObjectPropertySet( aCID, m_aModel->getModel()));
+ ObjectIdentifier::getObjectPropertySet( aCID, getModel()));
if( xEqProp.is())
{
- uno::Reference< frame::XModel > xModel( m_aModel->getModel());
+ uno::Reference< frame::XModel > xModel( getModel() );
// using assignment for broken gcc 3.3
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
@@ -748,10 +748,10 @@ bool ChartController::executeDispatch_Delete()
case OBJECTTYPE_DATA_ERRORS:
{
uno::Reference< beans::XPropertySet > xErrorBarProp(
- ObjectIdentifier::getObjectPropertySet( aCID, m_aModel->getModel()));
+ ObjectIdentifier::getObjectPropertySet( aCID, getModel() ));
if( xErrorBarProp.is())
{
- uno::Reference< frame::XModel > xModel( m_aModel->getModel());
+ uno::Reference< frame::XModel > xModel( getModel() );
// using assignment for broken gcc 3.3
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
@@ -773,14 +773,14 @@ bool ChartController::executeDispatch_Delete()
case OBJECTTYPE_DATA_LABEL:
{
uno::Reference< beans::XPropertySet > xObjectProperties =
- ObjectIdentifier::getObjectPropertySet( aCID, m_aModel->getModel() );
+ ObjectIdentifier::getObjectPropertySet( aCID, getModel() );
if( xObjectProperties.is() )
{
UndoGuard aUndoGuard = UndoGuard(
ActionDescriptionProvider::createDescription(
ActionDescriptionProvider::DELETE, ::rtl::OUString( String(
SchResId( aObjectType == OBJECTTYPE_DATA_LABEL ? STR_OBJECT_LABEL : STR_OBJECT_DATALABELS )))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
chart2::DataPointLabel aLabel;
xObjectProperties->getPropertyValue( C2U( "Label" ) ) >>= aLabel;
aLabel.ShowNumber = false;
@@ -789,7 +789,7 @@ bool ChartController::executeDispatch_Delete()
aLabel.ShowLegendSymbol = false;
if( aObjectType == OBJECTTYPE_DATA_LABELS )
{
- uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, m_aModel->getModel() ));
+ uno::Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID( aCID, getModel() ));
::chart::DataSeriesHelper::setPropertyAlsoToAllAttributedDataPoints( xSeries, C2U( "Label" ), uno::makeAny(aLabel) );
}
else
@@ -844,7 +844,7 @@ bool ChartController::executeDispatch_Delete()
void ChartController::executeDispatch_ToggleLegend()
{
- Reference< frame::XModel > xModel( m_aModel->getModel());
+ Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard = UndoGuard(
::rtl::OUString( String( SchResId( STR_ACTION_TOGGLE_LEGEND ))), m_xUndoManager, xModel );
Reference< beans::XPropertySet > xLegendProp( LegendHelper::getLegend( xModel ), uno::UNO_QUERY );
@@ -878,10 +878,10 @@ void ChartController::executeDispatch_ToggleLegend()
void ChartController::executeDispatch_ToggleGridHorizontal()
{
- Reference< frame::XModel > xModel( m_aModel->getModel());
+ Reference< frame::XModel > xModel( getModel() );
UndoGuard aUndoGuard = UndoGuard(
::rtl::OUString( String( SchResId( STR_ACTION_TOGGLE_GRID_HORZ ))), m_xUndoManager, xModel );
- Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( m_aModel->getModel()));
+ Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( getModel() ));
if( xDiagram.is())
{
sal_Int32 nDimensionIndex = 1;
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 8b3deca4e2dd..56908ac4ef79 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -255,7 +255,7 @@ const short HITPIX=2; //hit-tolerance in pixel
if( bIsEmbedded )
{
//change map mode to fit new size
- awt::Size aModelPageSize = ChartModelHelper::getPageSize( m_aModel->getModel() );
+ awt::Size aModelPageSize = ChartModelHelper::getPageSize( getModel() );
sal_Int32 nScaleXNumerator = aLogicSize.Width();
sal_Int32 nScaleXDenominator = aModelPageSize.Width;
sal_Int32 nScaleYNumerator = aLogicSize.Height();
@@ -292,7 +292,7 @@ const short HITPIX=2; //hit-tolerance in pixel
else
{
//change visarea
- ChartModelHelper::setPageSize( awt::Size( aLogicSize.Width(), aLogicSize.Height() ), m_aModel->getModel() );
+ ChartModelHelper::setPageSize( awt::Size( aLogicSize.Width(), aLogicSize.Height() ), getModel() );
pWindow->SetPosSizePixel( X, Y, Width, Height, Flags );
}
pWindow->Invalidate();
@@ -507,6 +507,11 @@ void ChartController::execute_Paint( const Rectangle& rRect )
{
try
{
+ uno::Reference< frame::XModel > xModel( getModel() );
+ //DBG_ASSERT( xModel.is(), "ChartController::execute_Paint: have no model to paint");
+ if( !xModel.is() )
+ return;
+
//better performance for big data
uno::Reference< beans::XPropertySet > xProp( m_xChartView, uno::UNO_QUERY );
if( xProp.is() )
@@ -693,7 +698,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
m_aSelection.adaptSelectionToNewPos( aMPos, pDrawViewWrapper
, rMEvt.IsRight(), m_bWaitingForDoubleClick );
- if( !m_aSelection.isRotateableObjectSelected( m_aModel->getModel() ) )
+ if( !m_aSelection.isRotateableObjectSelected( getModel() ) )
{
m_eDragMode = SDRDRAG_MOVE;
pDrawViewWrapper->SetDragMode(m_eDragMode);
@@ -726,14 +731,14 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
else if( eKind==HDL_UPLFT || eKind==HDL_UPRGT || eKind==HDL_LWLFT || eKind==HDL_LWRGT )
eRotationDirection = DragMethod_RotateDiagram::ROTATIONDIRECTION_Z;
}
- pDragMethod = new DragMethod_RotateDiagram( *pDrawViewWrapper, m_aSelection.getSelectedCID(), m_aModel->getModel(), eRotationDirection );
+ pDragMethod = new DragMethod_RotateDiagram( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel(), eRotationDirection );
}
}
else
{
rtl::OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( m_aSelection.getSelectedCID() ) );
if( aDragMethodServiceName.equals( ObjectIdentifier::getPieSegmentDragMethodServiceName() ) )
- pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ pDragMethod = new DragMethod_PieSegment( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel() );
}
pDrawViewWrapper->SdrView::BegDragObj(aMPos, NULL, pHitSelectionHdl, nDrgLog, pDragMethod);
}
@@ -773,7 +778,7 @@ void ChartController::execute_Tracking( const TrackingEvent& /* rTEvt */ )
void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
{
- ControllerLockGuard aCLGuard( m_aModel->getModel());
+ ControllerLockGuard aCLGuard( getModel() );
bool bMouseUpWithoutMouseDown = !m_bWaitingForMouseUp;
m_bWaitingForMouseUp = false;
bool bNotifySelectionChange = false;
@@ -834,7 +839,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
if( pChartDragMethod )
{
UndoGuard aUndoGuard( pChartDragMethod->getUndoDescription(),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
if( pDrawViewWrapper->EndDragObj(false) )
{
@@ -852,7 +857,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
if( pObj )
{
Rectangle aObjectRect = pObj->GetSnapRect();
- awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel() ) );
+ awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height );
const E3dObject* pE3dObject = dynamic_cast< const E3dObject*>( pObj );
@@ -867,9 +872,9 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
ActionDescriptionProvider::createDescription(
eActionType,
ObjectNameProvider::getName( ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() ))),
- m_xUndoManager, m_aModel->getModel() );
+ m_xUndoManager, getModel() );
bool bChanged = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID()
- , m_aModel->getModel()
+ , getModel()
, awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight())
, awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) );
if( bChanged )
@@ -890,7 +895,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
if( !bDraggingDone ) //mouse wasn't moved while dragging
{
bool bClickedTwiceOnDragableObject = SelectionHelper::isDragableObjectHitTwice( aMPos, m_aSelection.getSelectedCID(), *pDrawViewWrapper );
- bool bIsRotateable = m_aSelection.isRotateableObjectSelected( m_aModel->getModel() );
+ bool bIsRotateable = m_aSelection.isRotateableObjectSelected( getModel() );
//toggel between move and rotate
if( bIsRotateable && bClickedTwiceOnDragableObject && SDRDRAG_MOVE==m_eDragMode )
@@ -1030,7 +1035,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
{
sal_Int16 nUniqueId = 1;
ObjectType eObjectType = ObjectIdentifier::getObjectType( m_aSelection.getSelectedCID() );
- Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( m_aModel->getModel() );
+ Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( getModel() );
OUString aFormatCommand( lcl_getFormatCommandForObjectCID( m_aSelection.getSelectedCID() ) );
lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, aFormatCommand );
@@ -1040,7 +1045,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
if( OBJECTTYPE_DATA_SERIES == eObjectType || OBJECTTYPE_DATA_POINT == eObjectType )
{
bool bIsPoint = ( OBJECTTYPE_DATA_POINT == eObjectType );
- uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() );
uno::Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
Reference< chart2::XRegressionCurve > xTrendline( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xCurveCnt ) );
bool bHasEquation = RegressionCurveHelper::hasEquation( xTrendline );
@@ -1205,7 +1210,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
//-----
else if( OBJECTTYPE_AXIS == eObjectType || OBJECTTYPE_GRID == eObjectType || OBJECTTYPE_SUBGRID == eObjectType )
{
- Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), m_aModel->getModel() );
+ Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() && xDiagram.is() )
{
sal_Int32 nDimensionIndex = -1;
@@ -1349,7 +1354,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
if( ! bReturn )
{
// Natvigation (Tab/F3/Home/End)
- uno::Reference< XChartDocument > xChartDoc( m_aModel->getModel(), uno::UNO_QUERY );
+ uno::Reference< XChartDocument > xChartDoc( getModel(), uno::UNO_QUERY );
ObjectKeyNavigation aObjNav( m_aSelection.getSelectedOID(), xChartDoc, ExplicitValueProvider::getExplicitValueProvider( m_xChartView ));
awt::KeyEvent aKeyEvent( ::svt::AcceleratorExecute::st_VCLKey2AWTKey( aKeyCode ));
bReturn = aObjNav.handleKeyEvent( aKeyEvent );
@@ -1361,7 +1366,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
{
aNewSelection = aNewOID.getAny();
}
- if ( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), m_aModel->getModel() ) )
+ if ( m_eDragMode == SDRDRAG_ROTATE && !SelectionHelper::isRotateableObject( aNewOID.getObjectCID(), getModel() ) )
{
m_eDragMode = SDRDRAG_MOVE;
}
@@ -1494,7 +1499,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
{
awt::Point aPos( xShape->getPosition() );
awt::Size aSize( xShape->getSize() );
- awt::Size aPageSize( ChartModelHelper::getPageSize( m_aModel->getModel() ) );
+ awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) );
aPos.X = static_cast< long >( static_cast< double >( aPos.X ) + fShiftAmountX );
aPos.Y = static_cast< long >( static_cast< double >( aPos.Y ) + fShiftAmountY );
if( aPos.X + aSize.Width > aPageSize.Width )
@@ -1582,7 +1587,7 @@ bool ChartController::requestQuickHelp(
{
uno::Reference< frame::XModel > xChartModel;
if( m_aModel.is())
- xChartModel.set( m_aModel->getModel());
+ xChartModel.set( getModel() );
if( !xChartModel.is())
return false;
@@ -1743,7 +1748,7 @@ bool ChartController::impl_moveOrResizeObject(
bool bNeedShift = true;
bool bNeedResize = ( eType == CENTERED_RESIZE_OBJECT );
- uno::Reference< frame::XModel > xChartModel( m_aModel->getModel());
+ uno::Reference< frame::XModel > xChartModel( getModel() );
uno::Reference< beans::XPropertySet > xObjProp(
ObjectIdentifier::getObjectPropertySet( rCID, xChartModel ));
if( xObjProp.is())
@@ -1825,7 +1830,7 @@ bool ChartController::impl_DragDataPoint( const ::rtl::OUString & rCID, double f
sal_Int32 nDataPointIndex = ObjectIdentifier::getIndexFromParticleOrCID( rCID );
uno::Reference< chart2::XDataSeries > xSeries(
- ObjectIdentifier::getDataSeriesForCID( rCID, m_aModel->getModel()));
+ ObjectIdentifier::getDataSeriesForCID( rCID, getModel() ));
if( xSeries.is())
{
try
@@ -1996,7 +2001,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
{
if( (m_eDragMode == SDRDRAG_ROTATE)
&& SelectionHelper::isRotateableObject( aHitObjectCID
- , m_aModel->getModel() ) )
+ , getModel() ) )
pWindow->SetPointer( Pointer( POINTER_ROTATE ) );
else
{
diff --git a/chart2/source/controller/main/CommandDispatchContainer.cxx b/chart2/source/controller/main/CommandDispatchContainer.cxx
index 3761d0c33ce0..e0d689340760 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.cxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.cxx
@@ -72,7 +72,7 @@ void CommandDispatchContainer::setModel(
m_aCachedDispatches.clear();
DisposeHelper::DisposeAllElements( m_aToBeDisposedDispatches );
m_aToBeDisposedDispatches.clear();
- m_xModel.set( xModel );
+ m_xModel = xModel;
}
// void CommandDispatchContainer::setUndoManager(
@@ -102,33 +102,33 @@ Reference< frame::XDispatch > CommandDispatchContainer::getDispatchForURL(
}
else
{
- if( rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Undo" ))
- || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Redo" )))
+ uno::Reference< frame::XModel > xModel( m_xModel );
+
+ if( xModel.is() && (rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Undo" ))
+ || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Redo" ))) )
{
- CommandDispatch * pDispatch = new UndoCommandDispatch( m_xContext, m_xModel );
+ CommandDispatch * pDispatch = new UndoCommandDispatch( m_xContext, xModel );
xResult.set( pDispatch );
pDispatch->initialize();
m_aCachedDispatches[ C2U(".uno:Undo") ].set( xResult );
m_aCachedDispatches[ C2U(".uno:Redo") ].set( xResult );
m_aToBeDisposedDispatches.push_back( xResult );
}
- else if( rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Context" ))
- || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModifiedStatus" )))
+ else if( xModel.is() && (rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Context" ))
+ || rURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ModifiedStatus" ))) )
{
- Reference< view::XSelectionSupplier > xSelSupp;
- if( m_xModel.is())
- xSelSupp.set( m_xModel->getCurrentController(), uno::UNO_QUERY );
- CommandDispatch * pDispatch = new StatusBarCommandDispatch( m_xContext, m_xModel, xSelSupp );
+ Reference< view::XSelectionSupplier > xSelSupp( xModel->getCurrentController(), uno::UNO_QUERY );
+ CommandDispatch * pDispatch = new StatusBarCommandDispatch( m_xContext, xModel, xSelSupp );
xResult.set( pDispatch );
pDispatch->initialize();
m_aCachedDispatches[ C2U(".uno:Context") ].set( xResult );
m_aCachedDispatches[ C2U(".uno:ModifiedStatus") ].set( xResult );
m_aToBeDisposedDispatches.push_back( xResult );
}
- else if( m_xModel.is() &&
+ else if( xModel.is() &&
(m_aContainerDocumentCommands.find( rURL.Path ) != m_aContainerDocumentCommands.end()) )
{
- xResult.set( getContainerDispatchForURL( m_xModel->getCurrentController(), rURL ));
+ xResult.set( getContainerDispatchForURL( xModel->getCurrentController(), rURL ));
// ToDo: can those dispatches be cached?
m_aCachedDispatches[ rURL.Complete ].set( xResult );
}
diff --git a/chart2/source/controller/main/CommandDispatchContainer.hxx b/chart2/source/controller/main/CommandDispatchContainer.hxx
index 2cee65405ef4..1c8769e0a6d9 100644
--- a/chart2/source/controller/main/CommandDispatchContainer.hxx
+++ b/chart2/source/controller/main/CommandDispatchContainer.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/DispatchDescriptor.hpp>
+#include <cppuhelper/weakref.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <set>
@@ -140,7 +141,7 @@ private:
mutable tDisposeVector m_aToBeDisposedDispatches;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XModel > m_xModel;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > m_xUndoManager;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > m_xChartDispatcher;
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 0fefa3d52310..fe73d15500f5 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -194,13 +194,17 @@ ImplObjectHierarchy::ImplObjectHierarchy(
void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartDocument )
{
+ m_aChildMap = tChildMap();//clear tree
+
if( !xChartDocument.is() )
return;
//@todo: change ObjectIdentifier to take an XChartDocument rather than XModel
Reference< frame::XModel > xModel( xChartDocument, uno::UNO_QUERY );
Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xChartDocument ) );
- ObjectHierarchy::tOID aDiaOID( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xModel ) ) );
+ ObjectHierarchy::tOID aDiaOID;
+ if( xDiagram.is() )
+ aDiaOID = ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForObject( xDiagram, xModel ) );
ObjectHierarchy::tChildContainer aTopLevelContainer;
// First Level
@@ -209,9 +213,12 @@ void ImplObjectHierarchy::createTree( const Reference< XChartDocument >& xChartD
if( m_bOrderingForElementSelector )
{
aTopLevelContainer.push_back( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
- aTopLevelContainer.push_back( aDiaOID );
- createWallAndFloor( aTopLevelContainer, xDiagram );
- createLegendTree( aTopLevelContainer, xChartDocument, xDiagram );
+ if( xDiagram.is() )
+ {
+ aTopLevelContainer.push_back( aDiaOID );
+ createWallAndFloor( aTopLevelContainer, xDiagram );
+ createLegendTree( aTopLevelContainer, xChartDocument, xDiagram );
+ }
}
// Main Title
diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx
index 61bed4029db5..8513b6ba9093 100644
--- a/chart2/source/controller/main/UndoGuard.cxx
+++ b/chart2/source/controller/main/UndoGuard.cxx
@@ -55,7 +55,7 @@ UndoGuard_Base::~UndoGuard_Base()
void UndoGuard_Base::commitAction()
{
- if( !m_bActionPosted )
+ if( !m_bActionPosted && m_xUndoManager.is() )
m_xUndoManager->postAction( m_aUndoString );
m_bActionPosted = true;
}
@@ -67,12 +67,13 @@ UndoGuard::UndoGuard( const OUString& rUndoString
, const uno::Reference< frame::XModel > & xModel )
: UndoGuard_Base( rUndoString, xUndoManager, xModel )
{
- m_xUndoManager->preAction( m_xModel );
+ if( m_xUndoManager.is() )
+ m_xUndoManager->preAction( m_xModel );
}
UndoGuard::~UndoGuard()
{
- if( !m_bActionPosted )
+ if( !m_bActionPosted && m_xUndoManager.is() )
m_xUndoManager->cancelAction();
}
@@ -83,12 +84,13 @@ UndoLiveUpdateGuard::UndoLiveUpdateGuard( const OUString& rUndoString
, const uno::Reference< frame::XModel > & xModel )
: UndoGuard_Base( rUndoString, xUndoManager, xModel )
{
- m_xUndoManager->preAction( m_xModel );
+ if( m_xUndoManager.is() )
+ m_xUndoManager->preAction( m_xModel );
}
UndoLiveUpdateGuard::~UndoLiveUpdateGuard()
{
- if( !m_bActionPosted )
+ if( !m_bActionPosted && m_xUndoManager.is() )
m_xUndoManager->cancelActionWithUndo( m_xModel );
}
@@ -99,16 +101,19 @@ UndoLiveUpdateGuardWithData::UndoLiveUpdateGuardWithData( const OUString& rUndoS
, const uno::Reference< frame::XModel > & xModel )
: UndoGuard_Base( rUndoString, xUndoManager, xModel )
{
- Sequence< beans::PropertyValue > aArgs(1);
- aArgs[0] = beans::PropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("WithData")), -1, uno::Any(),
- beans::PropertyState_DIRECT_VALUE );
- m_xUndoManager->preActionWithArguments( m_xModel, aArgs );
+ if( m_xUndoManager.is() )
+ {
+ Sequence< beans::PropertyValue > aArgs(1);
+ aArgs[0] = beans::PropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("WithData")), -1, uno::Any(),
+ beans::PropertyState_DIRECT_VALUE );
+ m_xUndoManager->preActionWithArguments( m_xModel, aArgs );
+ }
}
UndoLiveUpdateGuardWithData::~UndoLiveUpdateGuardWithData()
{
- if( !m_bActionPosted )
+ if( !m_bActionPosted && m_xUndoManager.is() )
m_xUndoManager->cancelActionWithUndo( m_xModel );
}
@@ -119,16 +124,19 @@ UndoGuardWithSelection::UndoGuardWithSelection( const rtl::OUString& rUndoString
, const uno::Reference< frame::XModel > & xModel )
: UndoGuard_Base( rUndoString, xUndoManager, xModel )
{
- Sequence< beans::PropertyValue > aArgs(1);
- aArgs[0] = beans::PropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM("WithSelection")), -1, uno::Any(),
- beans::PropertyState_DIRECT_VALUE );
- m_xUndoManager->preActionWithArguments( m_xModel, aArgs );
+ if( m_xUndoManager.is() )
+ {
+ Sequence< beans::PropertyValue > aArgs(1);
+ aArgs[0] = beans::PropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("WithSelection")), -1, uno::Any(),
+ beans::PropertyState_DIRECT_VALUE );
+ m_xUndoManager->preActionWithArguments( m_xModel, aArgs );
+ }
}
UndoGuardWithSelection::~UndoGuardWithSelection()
{
- if( !m_bActionPosted )
+ if( !m_bActionPosted && m_xUndoManager.is() )
m_xUndoManager->cancelAction();
}
diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx
index cb199b7c2947..8e278168259f 100644
--- a/chart2/source/inc/LifeTime.hxx
+++ b/chart2/source/inc/LifeTime.hxx
@@ -52,7 +52,7 @@ public:
OOO_DLLPUBLIC_CHARTTOOLS LifeTimeManager( ::com::sun::star::lang::XComponent* pComponent, sal_Bool bLongLastingCallsCancelable = sal_False );
OOO_DLLPUBLIC_CHARTTOOLS virtual ~LifeTimeManager();
-OOO_DLLPUBLIC_CHARTTOOLS sal_Bool impl_isDisposed();
+OOO_DLLPUBLIC_CHARTTOOLS bool impl_isDisposed( bool bAssert=true );
OOO_DLLPUBLIC_CHARTTOOLS sal_Bool dispose() throw(::com::sun::star::uno::RuntimeException);
public:
@@ -105,7 +105,7 @@ OOO_DLLPUBLIC_CHARTTOOLS CloseableLifeTimeManager( ::com::sun::star::util::XC
, sal_Bool bLongLastingCallsCancelable = sal_False );
OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager();
-OOO_DLLPUBLIC_CHARTTOOLS sal_Bool impl_isDisposedOrClosed();
+OOO_DLLPUBLIC_CHARTTOOLS bool impl_isDisposedOrClosed( bool bAssert=true );
OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_close_startTryClose(sal_Bool bDeliverOwnership)
throw ( ::com::sun::star::uno::Exception );
OOO_DLLPUBLIC_CHARTTOOLS sal_Bool g_close_isNeedToCancelLongLastingCalls( sal_Bool bDeliverOwnership, ::com::sun::star::util::CloseVetoException& ex )
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index cab49e8d0149..fd1d78ebe071 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -299,6 +299,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) :
m_aSubGridProperties(),
m_xTitle()
{
+ osl_incrementInterlockedCount(&m_refCount);
setFastPropertyValue_NoBroadcast(
::chart::LineProperties::PROP_LINE_COLOR, uno::makeAny( static_cast< sal_Int32 >( 0xb3b3b3 ) ) ); // gray30
@@ -308,6 +309,7 @@ Axis::Axis( Reference< uno::XComponentContext > const & /* xContext */ ) :
ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
AllocateSubGrids();
+ osl_decrementInterlockedCount(&m_refCount);
}
Axis::Axis( const Axis & rOther ) :
@@ -365,28 +367,44 @@ Axis::~Axis()
void Axis::AllocateSubGrids()
{
- sal_Int32 nNewSubIncCount = m_aScaleData.IncrementData.SubIncrements.getLength();
- sal_Int32 nOldSubIncCount = m_aSubGridProperties.getLength();
-
- if( nOldSubIncCount > nNewSubIncCount )
- {
- // remove superfluous entries
- for( sal_Int32 i = nNewSubIncCount; i < nOldSubIncCount; ++i )
- ModifyListenerHelper::removeListener( m_aSubGridProperties[ i ], m_xModifyEventForwarder );
- m_aSubGridProperties.realloc( nNewSubIncCount );
- }
- else if( nOldSubIncCount < nNewSubIncCount )
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ Reference< lang::XEventListener > xEventListener;
+ std::vector< Reference< beans::XPropertySet > > aOldBroadcasters;
+ std::vector< Reference< beans::XPropertySet > > aNewBroadcasters;
{
- m_aSubGridProperties.realloc( nNewSubIncCount );
+ MutexGuard aGuard( m_aMutex );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ xEventListener = this;
+
+ sal_Int32 nNewSubIncCount = m_aScaleData.IncrementData.SubIncrements.getLength();
+ sal_Int32 nOldSubIncCount = m_aSubGridProperties.getLength();
- // allocate new entries
- for( sal_Int32 i = nOldSubIncCount; i < nNewSubIncCount; ++i )
+ if( nOldSubIncCount > nNewSubIncCount )
{
- m_aSubGridProperties[ i ] = new GridProperties();
- LineProperties::SetLineInvisible( m_aSubGridProperties[ i ] );
- ModifyListenerHelper::addListener( m_aSubGridProperties[ i ], m_xModifyEventForwarder );
+ // remove superfluous entries
+ for( sal_Int32 i = nNewSubIncCount; i < nOldSubIncCount; ++i )
+ aOldBroadcasters.push_back( m_aSubGridProperties[ i ] );
+ m_aSubGridProperties.realloc( nNewSubIncCount );
+ }
+ else if( nOldSubIncCount < nNewSubIncCount )
+ {
+ m_aSubGridProperties.realloc( nNewSubIncCount );
+
+ // allocate new entries
+ for( sal_Int32 i = nOldSubIncCount; i < nNewSubIncCount; ++i )
+ {
+ m_aSubGridProperties[ i ] = new GridProperties();
+ LineProperties::SetLineInvisible( m_aSubGridProperties[ i ] );
+ aNewBroadcasters.push_back( m_aSubGridProperties[ i ] );
+ }
}
}
+ //don't keep the mutex locked while calling out
+ std::vector< Reference< beans::XPropertySet > >::iterator aBroadcaster = aOldBroadcasters.begin();
+ for( ;aBroadcaster != aOldBroadcasters.end(); ++aBroadcaster )
+ ModifyListenerHelper::removeListener( *aBroadcaster, xModifyEventForwarder );
+ for( aBroadcaster = aNewBroadcasters.begin(); aBroadcaster != aNewBroadcasters.end(); ++aBroadcaster )
+ ModifyListenerHelper::addListener( *aBroadcaster, xModifyEventForwarder );
}
// --------------------------------------------------------------------------------
@@ -395,20 +413,29 @@ void Axis::AllocateSubGrids()
void SAL_CALL Axis::setScaleData( const chart2::ScaleData& rScaleData )
throw (uno::RuntimeException)
{
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ Reference< lang::XEventListener > xEventListener;
+ Reference< chart2::data::XLabeledDataSequence > xOldCategories;
+ Reference< chart2::data::XLabeledDataSequence > xNewCategories = rScaleData.Categories;
{
- // /--
MutexGuard aGuard( m_aMutex );
- if( m_aScaleData.Categories.is())
- {
- ModifyListenerHelper::removeListener( m_aScaleData.Categories, m_xModifyEventForwarder );
- EventListenerHelper::removeListener( m_aScaleData.Categories, this );
- }
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ xEventListener = this;
+ xOldCategories = m_aScaleData.Categories;
m_aScaleData = rScaleData;
- ModifyListenerHelper::addListener( m_aScaleData.Categories, m_xModifyEventForwarder );
- EventListenerHelper::addListener( m_aScaleData.Categories, this );
+ }
+ AllocateSubGrids();
- AllocateSubGrids();
- // \--
+ //don't keep the mutex locked while calling out
+ if( xOldCategories.is() && xOldCategories != xNewCategories )
+ {
+ ModifyListenerHelper::removeListener( xOldCategories, xModifyEventForwarder );
+ EventListenerHelper::removeListener( xOldCategories, xEventListener );
+ }
+ if( xNewCategories.is() && xOldCategories != xNewCategories )
+ {
+ ModifyListenerHelper::addListener( xNewCategories, m_xModifyEventForwarder );
+ EventListenerHelper::addListener( xNewCategories, xEventListener );
}
fireModifyEvent();
}
@@ -457,19 +484,23 @@ Reference< chart2::XTitle > SAL_CALL Axis::getTitleObject()
// \--
}
-void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& Title )
+void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& xNewTitle )
throw (uno::RuntimeException)
{
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ Reference< chart2::XTitle > xOldTitle;
{
- // /--
MutexGuard aGuard( GetMutex() );
- if( m_xTitle.is())
- ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder );
- m_xTitle = Title;
- if( m_xTitle.is())
- ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
- // \--
+ xOldTitle = m_xTitle;
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ m_xTitle = xNewTitle;
}
+
+ //don't keep the mutex locked while calling out
+ if( xOldTitle.is() && xOldTitle != xNewTitle )
+ ModifyListenerHelper::removeListener( xOldTitle, xModifyEventForwarder );
+ if( xNewTitle.is() && xOldTitle != xNewTitle )
+ ModifyListenerHelper::addListener( xNewTitle, xModifyEventForwarder );
fireModifyEvent();
}
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 2a34844c169d..950169395c95 100644..100755
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -150,15 +150,28 @@ ChartModel::ChartModel( const ChartModel & rOther )
OSL_TRACE( "ChartModel: Copy-CTOR called" );
osl_incrementInterlockedCount(&m_refCount);
- m_xChartTypeManager.set( CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager ));
- m_xTitle.set( CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
- ModifyListenerHelper::addListener( m_xTitle, this );
- m_xPageBackground.set( CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground ));
- ModifyListenerHelper::addListener( m_xPageBackground, this );
+ Reference< util::XModifyListener > xListener;
+ Reference< chart2::XTitle > xNewTitle = CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle );
+ Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< Reference< chart2::XDiagram > >()( rOther.m_xDiagram );
+ Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground );
+ Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager );
+ Reference< container::XNameAccess > xXMLNamespaceMap = CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap );
+
+ {
+ MutexGuard aGuard( m_aModelMutex );
+ xListener = this;
+ m_xTitle = xNewTitle;
+ m_xDiagram = xNewDiagram;
+ m_xPageBackground = xNewPageBackground;
+ m_xChartTypeManager = xChartTypeManager;
+ m_xXMLNamespaceMap = xXMLNamespaceMap;
+ }
- m_xXMLNamespaceMap.set( CreateRefClone< Reference< container::XNameAccess > >()( rOther.m_xXMLNamespaceMap ));
+ ModifyListenerHelper::addListener( xNewTitle, xListener );
+ ModifyListenerHelper::addListener( xNewDiagram, xListener );
+ ModifyListenerHelper::addListener( xNewPageBackground, xListener );
+ xListener.clear();
- CloneRefVector< Reference< chart2::XDiagram > >( rOther.m_aDiagrams, m_aDiagrams );
osl_decrementInterlockedCount(&m_refCount);
}
@@ -512,8 +525,7 @@ void SAL_CALL ChartModel::dispose() throw(uno::RuntimeException)
m_xNumberFormatsSupplier.clear();
DisposeHelper::DisposeAndClear( m_xOwnNumberFormatsSupplier );
DisposeHelper::DisposeAndClear( m_xChartTypeManager );
- DisposeHelper::DisposeAllElements( m_aDiagrams );
- m_aDiagrams.clear();
+ DisposeHelper::DisposeAndClear( m_xDiagram );
DisposeHelper::DisposeAndClear( m_xTitle );
DisposeHelper::DisposeAndClear( m_xPageBackground );
DisposeHelper::DisposeAndClear( m_xXMLNamespaceMap );
@@ -554,7 +566,7 @@ void SAL_CALL ChartModel::addEventListener( const uno::Reference< lang::XEventLi
void SAL_CALL ChartModel::removeEventListener( const uno::Reference< lang::XEventListener > & xListener )
throw(uno::RuntimeException)
{
- if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
+ if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< lang::XEventListener >*)0), xListener );
@@ -573,7 +585,7 @@ void SAL_CALL ChartModel::addCloseListener( const uno::Reference< util::XClose
void SAL_CALL ChartModel::removeCloseListener( const uno::Reference< util::XCloseListener > & xListener )
throw(uno::RuntimeException)
{
- if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
+ if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
m_aLifeTimeManager.m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< util::XCloseListener >*)0), xListener );
@@ -684,38 +696,26 @@ uno::Reference< document::XDocumentProperties > SAL_CALL
uno::Reference< chart2::XDiagram > SAL_CALL ChartModel::getFirstDiagram()
throw (uno::RuntimeException)
{
- // /--
MutexGuard aGuard( m_aModelMutex );
- if( m_aDiagrams.size() )
- return m_aDiagrams[ 0 ];
- return uno::Reference< chart2::XDiagram >();
- // \--
+ return m_xDiagram;
}
-void ChartModel::impl_removeAllDiagrams()
-{
- ModifyListenerHelper::removeListenerFromAllElements( m_aDiagrams, this );
- m_aDiagrams.clear();
-}
-
-void ChartModel::impl_appendDiagram( const Reference< chart2::XDiagram > & xDiagram )
-{
- Reference< util::XModifyBroadcaster > xBroadcaster( xDiagram, uno::UNO_QUERY );
- ModifyListenerHelper::addListener( xDiagram, this );
- m_aDiagrams.push_back( xDiagram );
-}
-
-
void SAL_CALL ChartModel::setFirstDiagram( const uno::Reference< chart2::XDiagram >& xDiagram )
throw (uno::RuntimeException)
{
+ Reference< chart2::XDiagram > xOldDiagram;
+ Reference< util::XModifyListener > xListener;
{
- // /--
MutexGuard aGuard( m_aModelMutex );
- impl_removeAllDiagrams();
- impl_appendDiagram( xDiagram );
- // \--
+ if( xDiagram == m_xDiagram )
+ return;
+ xOldDiagram = m_xDiagram;
+ m_xDiagram = xDiagram;
+ xListener = this;
}
+ //don't keep the mutex locked while calling out
+ ModifyListenerHelper::removeListener( xOldDiagram, xListener );
+ ModifyListenerHelper::addListener( xDiagram, xListener );
setModified( sal_True );
}
@@ -885,10 +885,7 @@ void SAL_CALL ChartModel::setArguments( const Sequence< beans::PropertyValue >&
if( xDia.is())
xTemplate->changeDiagramData( xDia, xDataSource, aArguments );
else
- {
- impl_removeAllDiagrams();
- impl_appendDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ));
- }
+ setFirstDiagram( xTemplate->createDiagramByDataSource( xDataSource, aArguments ) );
}
}
}
diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx
index 860f71f909ea..23da02f3f83a 100644
--- a/chart2/source/model/main/ChartModel.hxx
+++ b/chart2/source/model/main/ChartModel.hxx
@@ -162,11 +162,8 @@ private:
m_xChartTypeManager;
// Diagram Access
- typedef ::std::vector< ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > >
- tDiagramContainer;
-
- tDiagramContainer m_aDiagrams;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >
+ m_xDiagram;
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >
m_xTitle;
@@ -231,10 +228,6 @@ private:
void impl_adjustAdditionalShapesPositionAndSize(
const ::com::sun::star::awt::Size& aVisualAreaSize );
- void impl_removeAllDiagrams();
- void impl_appendDiagram( const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XDiagram > & xDiagram );
-
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >
impl_getNumberFormatsSupplier();
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index 113be99915cb..1868c38e094f 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -413,8 +413,6 @@ void SAL_CALL ChartModel::initNew()
try
{
// create default chart
- impl_removeAllDiagrams();
-
Reference< chart2::XChartTypeTemplate > xTemplate( impl_createDefaultChartTypeTemplate() );
if( xTemplate.is())
{
@@ -433,7 +431,7 @@ void SAL_CALL ChartModel::initNew()
Reference< chart2::XDiagram > xDiagram( xTemplate->createDiagramByDataSource( xDataSource, aParam ) );
- impl_appendDiagram( xDiagram );
+ setFirstDiagram( xDiagram );
bool bIsRTL = Application::GetSettings().GetLayoutRTL();
//reverse x axis for rtl charts
@@ -750,7 +748,7 @@ void SAL_CALL ChartModel::removeModifyListener(
const uno::Reference< util::XModifyListener >& xListener )
throw(uno::RuntimeException)
{
- if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
+ if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
m_aLifeTimeManager.m_aListenerContainer.removeInterface(
@@ -852,7 +850,7 @@ void SAL_CALL ChartModel::addStorageChangeListener( const Reference< document::X
void SAL_CALL ChartModel::removeStorageChangeListener( const Reference< document::XStorageChangeListener >& xListener )
throw (uno::RuntimeException)
{
- if( m_aLifeTimeManager.impl_isDisposedOrClosed() )
+ if( m_aLifeTimeManager.impl_isDisposedOrClosed(false) )
return; //behave passive if already disposed or closed
m_aLifeTimeManager.m_aListenerContainer.removeInterface(
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index bdb46665004f..89197aa5ba3f 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -360,64 +360,76 @@ Reference< beans::XPropertySet >
throw (lang::IndexOutOfBoundsException,
uno::RuntimeException)
{
- Reference< beans::XPropertySet > aResult;
+ Reference< beans::XPropertySet > xResult;
- // /--
- MutexGuard aGuard( GetMutex() );
+ Sequence< Reference< chart2::data::XLabeledDataSequence > > aSequences;
+ {
+ MutexGuard aGuard( GetMutex() );
+ aSequences = ContainerHelper::ContainerToSequence( m_aDataSequences );
+ }
- if( ! m_aDataSequences.empty() )
+ ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
+ DataSeriesHelper::getAllDataSequencesByRole( aSequences , C2U("values"), true ) );
+ if( !aValuesSeries.empty() )
{
- ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
- DataSeriesHelper::getAllDataSequencesByRole(
- ContainerHelper::ContainerToSequence( m_aDataSequences ),
- C2U("values"), true ));
- if( ! aValuesSeries.empty())
+ Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues() );
+ if( 0 <= nIndex && nIndex < xSeq->getData().getLength() )
{
- Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues());
- if( 0 <= nIndex && nIndex < xSeq->getData().getLength())
{
- tDataPointAttributeContainer::iterator aIt(
- m_aAttributedDataPoints.find( nIndex ));
-
- if( aIt == m_aAttributedDataPoints.end())
+ MutexGuard aGuard( GetMutex() );
+ tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex ) );
+ if( aIt != m_aAttributedDataPoints.end() )
+ xResult = (*aIt).second;
+ }
+ if( !xResult.is() )
+ {
+ Reference< beans::XPropertySet > xParentProperties;
+ Reference< util::XModifyListener > xModifyEventForwarder;
{
- // create a new XPropertySet for this data point
- aResult.set( new DataPoint( this ));
- ModifyListenerHelper::addListener( aResult, m_xModifyEventForwarder );
- m_aAttributedDataPoints[ nIndex ] = aResult;
+ MutexGuard aGuard( GetMutex() );
+ xParentProperties = this;
+ xModifyEventForwarder = m_xModifyEventForwarder;
}
- else
+
+ // create a new XPropertySet for this data point
+ xResult.set( new DataPoint( xParentProperties ) );
{
- aResult = (*aIt).second;
+ MutexGuard aGuard( GetMutex() );
+ m_aAttributedDataPoints[ nIndex ] = xResult;
}
+ ModifyListenerHelper::addListener( xResult, xModifyEventForwarder );
}
}
- else
- {
- throw lang::IndexOutOfBoundsException();
- }
}
else
{
throw lang::IndexOutOfBoundsException();
}
- return aResult;
- // \--
+ return xResult;
}
void SAL_CALL DataSeries::resetDataPoint( sal_Int32 nIndex )
throw (uno::RuntimeException)
{
- MutexGuard aGuard( GetMutex() );
- tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex ));
- if( aIt != m_aAttributedDataPoints.end())
+ Reference< beans::XPropertySet > xDataPointProp;
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ tDataPointAttributeContainer::iterator aIt( m_aAttributedDataPoints.find( nIndex ));
+ if( aIt != m_aAttributedDataPoints.end())
+ {
+ xDataPointProp = (*aIt).second;
+ m_aAttributedDataPoints.erase(aIt);
+ }
+
+ }
+ if( xDataPointProp.is() )
{
- Reference< beans::XPropertySet > xDataPointProp( (*aIt).second );
Reference< util::XModifyBroadcaster > xBroadcaster( xDataPointProp, uno::UNO_QUERY );
- if( xBroadcaster.is() && m_xModifyEventForwarder.is())
- xBroadcaster->removeModifyListener( m_xModifyEventForwarder );
- m_aAttributedDataPoints.erase(aIt);
+ if( xBroadcaster.is() && xModifyEventForwarder.is())
+ xBroadcaster->removeModifyListener( xModifyEventForwarder );
fireModifyEvent();
}
}
@@ -425,9 +437,15 @@ void SAL_CALL DataSeries::resetDataPoint( sal_Int32 nIndex )
void SAL_CALL DataSeries::resetAllDataPoints()
throw (uno::RuntimeException)
{
- MutexGuard aGuard( GetMutex() );
- ModifyListenerHelper::removeListenerFromAllMapElements( m_aAttributedDataPoints, m_xModifyEventForwarder );
- m_aAttributedDataPoints.clear();
+ tDataPointAttributeContainer aOldAttributedDataPoints;
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ std::swap( aOldAttributedDataPoints, m_aAttributedDataPoints );
+ }
+ ModifyListenerHelper::removeListenerFromAllMapElements( aOldAttributedDataPoints, xModifyEventForwarder );
+ aOldAttributedDataPoints.clear();
fireModifyEvent();
}
@@ -435,25 +453,31 @@ void SAL_CALL DataSeries::resetAllDataPoints()
void SAL_CALL DataSeries::setData( const uno::Sequence< Reference< chart2::data::XLabeledDataSequence > >& aData )
throw (uno::RuntimeException)
{
- // /--
- MutexGuard aGuard( GetMutex() );
- ModifyListenerHelper::removeListenerFromAllElements( m_aDataSequences, m_xModifyEventForwarder );
- EventListenerHelper::removeListenerFromAllElements( m_aDataSequences, this );
- m_aDataSequences = ContainerHelper::SequenceToVector( aData );
- EventListenerHelper::addListenerToAllElements( m_aDataSequences, this );
- ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
+ tDataSequenceContainer aOldDataSequences;
+ tDataSequenceContainer aNewDataSequences;
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ Reference< lang::XEventListener > xListener;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ xListener = this;
+ std::swap( aOldDataSequences, m_aDataSequences );
+ aNewDataSequences = ContainerHelper::SequenceToVector( aData );
+ m_aDataSequences = aNewDataSequences;
+ }
+ ModifyListenerHelper::removeListenerFromAllElements( aOldDataSequences, xModifyEventForwarder );
+ EventListenerHelper::removeListenerFromAllElements( aOldDataSequences, xListener );
+ EventListenerHelper::addListenerToAllElements( aNewDataSequences, xListener );
+ ModifyListenerHelper::addListenerToAllElements( aNewDataSequences, xModifyEventForwarder );
fireModifyEvent();
- // \--
}
// ____ XDataSource ____
Sequence< Reference< chart2::data::XLabeledDataSequence > > SAL_CALL DataSeries::getDataSequences()
throw (uno::RuntimeException)
{
- // /--
MutexGuard aGuard( GetMutex() );
return ContainerHelper::ContainerToSequence( m_aDataSequences );
- // \--
}
@@ -463,12 +487,16 @@ void SAL_CALL DataSeries::addRegressionCurve(
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- if( ::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve )
- != m_aRegressionCurves.end())
- throw lang::IllegalArgumentException();
-
- m_aRegressionCurves.push_back( xRegressionCurve );
- ModifyListenerHelper::addListener( xRegressionCurve, m_xModifyEventForwarder );
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ if( ::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve )
+ != m_aRegressionCurves.end())
+ throw lang::IllegalArgumentException();
+ m_aRegressionCurves.push_back( xRegressionCurve );
+ }
+ ModifyListenerHelper::addListener( xRegressionCurve, xModifyEventForwarder );
fireModifyEvent();
}
@@ -477,25 +505,30 @@ void SAL_CALL DataSeries::removeRegressionCurve(
throw (container::NoSuchElementException,
uno::RuntimeException)
{
- if( ! xRegressionCurve.is())
+ if( !xRegressionCurve.is() )
throw container::NoSuchElementException();
- tRegressionCurveContainerType::iterator aIt(
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ tRegressionCurveContainerType::iterator aIt(
::std::find( m_aRegressionCurves.begin(), m_aRegressionCurves.end(), xRegressionCurve ) );
+ if( aIt == m_aRegressionCurves.end())
+ throw container::NoSuchElementException(
+ C2U( "The given regression curve is no element of this series" ),
+ static_cast< uno::XWeak * >( this ));
+ m_aRegressionCurves.erase( aIt );
+ }
- if( aIt == m_aRegressionCurves.end())
- throw container::NoSuchElementException(
- C2U( "The given regression curve is no element of this series" ),
- static_cast< uno::XWeak * >( this ));
-
- ModifyListenerHelper::removeListener( xRegressionCurve, m_xModifyEventForwarder );
- m_aRegressionCurves.erase( aIt );
+ ModifyListenerHelper::removeListener( xRegressionCurve, xModifyEventForwarder );
fireModifyEvent();
}
uno::Sequence< uno::Reference< chart2::XRegressionCurve > > SAL_CALL DataSeries::getRegressionCurves()
throw (uno::RuntimeException)
{
+ MutexGuard aGuard( GetMutex() );
return ContainerHelper::ContainerToSequence( m_aRegressionCurves );
}
@@ -503,10 +536,18 @@ void SAL_CALL DataSeries::setRegressionCurves(
const Sequence< Reference< chart2::XRegressionCurve > >& aRegressionCurves )
throw (uno::RuntimeException)
{
- ModifyListenerHelper::removeListenerFromAllElements( m_aRegressionCurves, m_xModifyEventForwarder );
- m_aRegressionCurves.clear();
- for( sal_Int32 i=0; i<aRegressionCurves.getLength(); ++i )
- addRegressionCurve( aRegressionCurves[i] );
+ tRegressionCurveContainerType aOldCurves;
+ tRegressionCurveContainerType aNewCurves( ContainerHelper::SequenceToVector( aRegressionCurves ) );
+ Reference< util::XModifyListener > xModifyEventForwarder;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xModifyEventForwarder = m_xModifyEventForwarder;
+ std::swap( aOldCurves, m_aRegressionCurves );
+ m_aRegressionCurves = aNewCurves;
+ }
+ ModifyListenerHelper::removeListenerFromAllElements( aOldCurves, xModifyEventForwarder );
+ ModifyListenerHelper::addListenerToAllElements( aNewCurves, xModifyEventForwarder );
+ fireModifyEvent();
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index b24f4059ba74..ff8a0c4030bc 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -309,72 +309,91 @@ Diagram::~Diagram()
uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getWall()
throw (uno::RuntimeException)
{
- // /--
- MutexGuard aGuard( GetMutex() );
- if( ! m_xWall.is())
+ uno::Reference< beans::XPropertySet > xRet;
+ bool bAddListener = false;
{
- m_xWall.set( new Wall());
- ModifyListenerHelper::addListener( m_xWall, m_xModifyEventForwarder );
+ MutexGuard aGuard( GetMutex() );
+ if( !m_xWall.is() )
+ {
+ m_xWall.set( new Wall() );
+ bAddListener = true;
+ }
+ xRet = m_xWall;
}
- return m_xWall;
- // \--
+ if(bAddListener)
+ ModifyListenerHelper::addListener( xRet, m_xModifyEventForwarder );
+ return xRet;
}
uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getFloor()
throw (uno::RuntimeException)
{
- // /--
- MutexGuard aGuard( GetMutex() );
- if( ! m_xFloor.is())
+ uno::Reference< beans::XPropertySet > xRet;
+ bool bAddListener = false;
{
- m_xFloor.set( new Wall());
- ModifyListenerHelper::addListener( m_xFloor, m_xModifyEventForwarder );
+ MutexGuard aGuard( GetMutex() );
+ if( !m_xFloor.is() )
+ {
+ m_xFloor.set( new Wall() );
+ bAddListener = true;
+ }
+ xRet = m_xFloor;
}
- return m_xFloor;
- // \--
+ if(bAddListener)
+ ModifyListenerHelper::addListener( xRet, m_xModifyEventForwarder );
+ return xRet;
}
uno::Reference< chart2::XLegend > SAL_CALL Diagram::getLegend()
throw (uno::RuntimeException)
{
- // /--
MutexGuard aGuard( GetMutex() );
return m_xLegend;
- // \--
}
-void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xLegend )
+void SAL_CALL Diagram::setLegend( const uno::Reference< chart2::XLegend >& xNewLegend )
throw (uno::RuntimeException)
{
- // /--
- ::osl::ClearableMutexGuard aGuard( GetMutex() );
- if( xLegend != m_xLegend )
+ Reference< chart2::XLegend > xOldLegend;
{
- if( m_xLegend.is())
- ModifyListenerHelper::removeListener( m_xLegend, m_xModifyEventForwarder );
- m_xLegend = xLegend;
- if( m_xLegend.is())
- ModifyListenerHelper::addListener( m_xLegend, m_xModifyEventForwarder );
- aGuard.clear();
- // \--
- fireModifyEvent();
+ MutexGuard aGuard( GetMutex() );
+ if( m_xLegend == xNewLegend )
+ return;
+ xOldLegend = m_xLegend;
+ m_xLegend = xNewLegend;
}
+ if( xOldLegend.is())
+ ModifyListenerHelper::removeListener( xOldLegend, m_xModifyEventForwarder );
+ if( xNewLegend.is())
+ ModifyListenerHelper::addListener( xNewLegend, m_xModifyEventForwarder );
+ fireModifyEvent();
}
Reference< chart2::XColorScheme > SAL_CALL Diagram::getDefaultColorScheme()
throw (uno::RuntimeException)
{
- if( ! m_xColorScheme.is())
+ Reference< chart2::XColorScheme > xRet;
+ {
+ MutexGuard aGuard( GetMutex() );
+ xRet = m_xColorScheme;
+ }
+
+ if( !xRet.is())
{
- m_xColorScheme.set( createConfigColorScheme( m_xContext ));
+ xRet.set( createConfigColorScheme( m_xContext ));
+ MutexGuard aGuard( GetMutex() );
+ m_xColorScheme = xRet;
}
- return m_xColorScheme;
+ return xRet;
}
void SAL_CALL Diagram::setDefaultColorScheme( const Reference< chart2::XColorScheme >& xColorScheme )
throw (uno::RuntimeException)
{
- m_xColorScheme.set( xColorScheme );
+ {
+ MutexGuard aGuard( GetMutex() );
+ m_xColorScheme.set( xColorScheme );
+ }
fireModifyEvent();
}
@@ -382,27 +401,26 @@ void SAL_CALL Diagram::setDefaultColorScheme( const Reference< chart2::XColorSch
uno::Reference< chart2::XTitle > SAL_CALL Diagram::getTitleObject()
throw (uno::RuntimeException)
{
- // /--
MutexGuard aGuard( GetMutex() );
return m_xTitle;
- // \--
}
-void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& Title )
+void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& xNewTitle )
throw (uno::RuntimeException)
{
- // /--
- ::osl::ClearableMutexGuard aGuard( GetMutex() );
-
- if( m_xTitle != Title )
+ Reference< chart2::XTitle > xOldTitle;
{
- ModifyListenerHelper::removeListener( m_xTitle, m_xModifyEventForwarder );
- m_xTitle = Title;
- ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
- // \--
- aGuard.clear();
- fireModifyEvent();
+ MutexGuard aGuard( GetMutex() );
+ if( m_xTitle == xNewTitle )
+ return;
+ xOldTitle = m_xTitle;
+ m_xTitle = xNewTitle;
}
+ if( xOldTitle.is())
+ ModifyListenerHelper::removeListener( xOldTitle, m_xModifyEventForwarder );
+ if( xNewTitle.is())
+ ModifyListenerHelper::addListener( xNewTitle, m_xModifyEventForwarder );
+ fireModifyEvent();
}
// ____ X3DDefaultSetter ____
@@ -430,18 +448,19 @@ void SAL_CALL Diagram::addCoordinateSystem(
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- if( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )
- != m_aCoordSystems.end())
- throw lang::IllegalArgumentException();
-
- if( m_aCoordSystems.size()>=1 )
{
- OSL_ENSURE( false, "more than one coordinatesystem is not supported yet by the fileformat" );
- return;
- }
-
- m_aCoordSystems.push_back( aCoordSys );
+ MutexGuard aGuard( GetMutex() );
+ if( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys )
+ != m_aCoordSystems.end())
+ throw lang::IllegalArgumentException();
+ if( m_aCoordSystems.size()>=1 )
+ {
+ OSL_ENSURE( false, "more than one coordinatesystem is not supported yet by the fileformat" );
+ return;
+ }
+ m_aCoordSystems.push_back( aCoordSys );
+ }
ModifyListenerHelper::addListener( aCoordSys, m_xModifyEventForwarder );
fireModifyEvent();
}
@@ -451,15 +470,16 @@ void SAL_CALL Diagram::removeCoordinateSystem(
throw (container::NoSuchElementException,
uno::RuntimeException)
{
- ::std::vector< uno::Reference< chart2::XCoordinateSystem > >::iterator
- aIt( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys ));
- if( aIt == m_aCoordSystems.end())
- throw container::NoSuchElementException(
- C2U( "The given coordinate-system is no element of the container" ),
- static_cast< uno::XWeak * >( this ));
-
- m_aCoordSystems.erase( aIt );
-
+ {
+ MutexGuard aGuard( GetMutex() );
+ ::std::vector< uno::Reference< chart2::XCoordinateSystem > >::iterator
+ aIt( ::std::find( m_aCoordSystems.begin(), m_aCoordSystems.end(), aCoordSys ));
+ if( aIt == m_aCoordSystems.end())
+ throw container::NoSuchElementException(
+ C2U( "The given coordinate-system is no element of the container" ),
+ static_cast< uno::XWeak * >( this ));
+ m_aCoordSystems.erase( aIt );
+ }
ModifyListenerHelper::removeListener( aCoordSys, m_xModifyEventForwarder );
fireModifyEvent();
}
@@ -467,6 +487,7 @@ void SAL_CALL Diagram::removeCoordinateSystem(
uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > SAL_CALL Diagram::getCoordinateSystems()
throw (uno::RuntimeException)
{
+ MutexGuard aGuard( GetMutex() );
return ContainerHelper::ContainerToSequence( m_aCoordSystems );
}
@@ -475,17 +496,20 @@ void SAL_CALL Diagram::setCoordinateSystems(
throw (lang::IllegalArgumentException,
uno::RuntimeException)
{
- Sequence< Reference< chart2::XCoordinateSystem > > aNew(aCoordinateSystems);
-
- if( aNew.getLength()>1 )
+ tCoordinateSystemContainerType aNew;
+ tCoordinateSystemContainerType aOld;
+ if( aCoordinateSystems.getLength()>0 )
{
- OSL_ENSURE( false, "more than one coordinatesystem is not supported yet by the fileformat" );
- aNew.realloc(1);
+ OSL_ENSURE( aCoordinateSystems.getLength()<=1, "more than one coordinatesystem is not supported yet by the fileformat" );
+ aNew.push_back( aCoordinateSystems[0] );
}
-
- ModifyListenerHelper::removeListenerFromAllElements( m_aCoordSystems, m_xModifyEventForwarder );
- m_aCoordSystems = ContainerHelper::SequenceToVector( aNew );
- ModifyListenerHelper::addListenerToAllElements( m_aCoordSystems, m_xModifyEventForwarder );
+ {
+ MutexGuard aGuard( GetMutex() );
+ std::swap( aOld, m_aCoordSystems );
+ m_aCoordSystems = aNew;
+ }
+ ModifyListenerHelper::removeListenerFromAllElements( aOld, m_xModifyEventForwarder );
+ ModifyListenerHelper::addListenerToAllElements( aNew, m_xModifyEventForwarder );
fireModifyEvent();
}
@@ -493,6 +517,7 @@ void SAL_CALL Diagram::setCoordinateSystems(
Reference< util::XCloneable > SAL_CALL Diagram::createClone()
throw (uno::RuntimeException)
{
+ MutexGuard aGuard( GetMutex() );
return Reference< util::XCloneable >( new Diagram( *this ));
}
diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx
index ae810266df29..9d38fafd3cf7 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -122,11 +122,13 @@ uno::Reference< util::XCloneable > SAL_CALL FormattedString::createClone()
void SAL_CALL FormattedString::setString( const ::rtl::OUString& String )
throw (uno::RuntimeException)
{
- // /--
- MutexGuard aGuard( GetMutex());
- m_aString = String;
+ {
+ MutexGuard aGuard( GetMutex());
+ m_aString = String;
+ }
+ //don't keep the mutex locked while calling out
fireModifyEvent();
- // \--
+
}
// ____ XModifyBroadcaster ____
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 0a215c2d4c15..d7c5691d160d 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -256,24 +256,25 @@ uno::Reference< util::XCloneable > SAL_CALL Title::createClone()
uno::Sequence< uno::Reference< chart2::XFormattedString > > SAL_CALL Title::getText()
throw (uno::RuntimeException)
{
- // /--
MutexGuard aGuard( GetMutex() );
return m_aStrings;
- // \--
}
-void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& Strings )
+void SAL_CALL Title::setText( const uno::Sequence< uno::Reference< chart2::XFormattedString > >& rNewStrings )
throw (uno::RuntimeException)
{
- // /--
- MutexGuard aGuard( GetMutex() );
+ uno::Sequence< uno::Reference< chart2::XFormattedString > > aOldStrings;
+ {
+ MutexGuard aGuard( GetMutex() );
+ std::swap( m_aStrings, aOldStrings );
+ m_aStrings = rNewStrings;
+ }
+ //don't keep the mutex locked while calling out
ModifyListenerHelper::removeListenerFromAllElements(
- ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder );
- m_aStrings = Strings;
+ ContainerHelper::SequenceToVector( aOldStrings ), m_xModifyEventForwarder );
ModifyListenerHelper::addListenerToAllElements(
- ContainerHelper::SequenceToVector( m_aStrings ), m_xModifyEventForwarder );
+ ContainerHelper::SequenceToVector( rNewStrings ), m_xModifyEventForwarder );
fireModifyEvent();
- // \--
}
// ================================================================================
diff --git a/chart2/source/tools/CharacterProperties.cxx b/chart2/source/tools/CharacterProperties.cxx
index 3b39609f8b85..cca655780a79 100644
--- a/chart2/source/tools/CharacterProperties.cxx
+++ b/chart2/source/tools/CharacterProperties.cxx
@@ -254,8 +254,8 @@ void CharacterProperties::AddPropertiesToVector(
Property( C2U( "CharLocale" ),
PROP_CHAR_LOCALE,
::getCppuType( reinterpret_cast< const lang::Locale * >(0)),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
// CharShadowed
rOutProperties.push_back(
Property( C2U( "CharShadowed" ),
@@ -385,8 +385,8 @@ void CharacterProperties::AddPropertiesToVector(
Property( C2U( "CharLocaleAsian" ),
PROP_CHAR_ASIAN_LOCALE,
::getCppuType( reinterpret_cast< const lang::Locale * >(0)),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
// CharacterPropertiesComplex
// ===
@@ -452,8 +452,8 @@ void CharacterProperties::AddPropertiesToVector(
Property( C2U( "CharLocaleComplex" ),
PROP_CHAR_COMPLEX_LOCALE,
::getCppuType( reinterpret_cast< const lang::Locale * >(0)),
- beans::PropertyAttribute::BOUND
- | beans::PropertyAttribute::MAYBEDEFAULT ));
+ //#i111967# no PropertyChangeEvent is fired on change so far
+ beans::PropertyAttribute::MAYBEDEFAULT ));
// Writing Mode left to right vs right to left
rOutProperties.push_back(
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 4ce623ae460c..36afef60a6d4 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -475,18 +475,20 @@ sal_Int32 DiagramHelper::getDimension( const Reference< XDiagram > & xDiagram )
try
{
- Reference< XCoordinateSystemContainer > xCooSysCnt(
- xDiagram, uno::UNO_QUERY_THROW );
- Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
- xCooSysCnt->getCoordinateSystems());
-
- for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i )
+ Reference< XCoordinateSystemContainer > xCooSysCnt( xDiagram, uno::UNO_QUERY );
+ if( xCooSysCnt.is() )
{
- Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] );
- if(xCooSys.is())
+ Sequence< Reference< XCoordinateSystem > > aCooSysSeq(
+ xCooSysCnt->getCoordinateSystems());
+
+ for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i )
{
- nResult = xCooSys->getDimension();
- break;
+ Reference< XCoordinateSystem > xCooSys( aCooSysSeq[i] );
+ if(xCooSys.is())
+ {
+ nResult = xCooSys->getDimension();
+ break;
+ }
}
}
}
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 38aa07718d4a..444e894a101d 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -62,12 +62,15 @@ LifeTimeManager::~LifeTimeManager()
{
}
- sal_Bool LifeTimeManager
-::impl_isDisposed()
+bool LifeTimeManager::impl_isDisposed( bool bAssert )
{
if( m_bDisposed || m_bInDispose )
{
- OSL_ENSURE( sal_False, "This component is already disposed " );
+ if( bAssert )
+ {
+ OSL_ENSURE( sal_False, "This component is already disposed " );
+ (void)(bAssert);
+ }
return sal_True;
}
return sal_False;
@@ -185,15 +188,18 @@ CloseableLifeTimeManager::~CloseableLifeTimeManager()
{
}
- sal_Bool CloseableLifeTimeManager
-::impl_isDisposedOrClosed()
+bool CloseableLifeTimeManager::impl_isDisposedOrClosed( bool bAssert )
{
- if( impl_isDisposed() )
+ if( impl_isDisposed( bAssert ) )
return sal_True;
if( m_bClosed )
{
- OSL_ENSURE( sal_False, "This object is already closed" );
+ if( bAssert )
+ {
+ OSL_ENSURE( sal_False, "This object is already closed" );
+ (void)(bAssert);//avoid warnings
+ }
return sal_True;
}
return sal_False;
@@ -206,6 +212,8 @@ CloseableLifeTimeManager::~CloseableLifeTimeManager()
//no mutex is allowed to be acquired
{
osl::ResettableGuard< osl::Mutex > aGuard( m_aAccessMutex );
+ if( impl_isDisposedOrClosed(false) )
+ return sal_False;
//Mutex needs to be acquired exactly ones; will be released inbetween
if( !impl_canStartApiCall() )
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index 0a6137af3041..890bf87df96e 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -498,7 +498,7 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic(
{
//scaling dependent
//@todo autocalculate IntervalCount dependent on MainIncrement and scaling
- rExplicitSubIncrement.IntervalCount = 5;
+ rExplicitSubIncrement.IntervalCount = 9;
}
lcl_ensureMaximumSubIncrementCount( rExplicitSubIncrement.IntervalCount );
if(!(rSubIncrement.PostEquidistant>>=rExplicitSubIncrement.PostEquidistant))
diff --git a/chart2/source/view/axes/TickmarkHelper.cxx b/chart2/source/view/axes/TickmarkHelper.cxx
index 4d1f48795fa7..9e2e2707c035 100644
--- a/chart2/source/view/axes/TickmarkHelper.cxx
+++ b/chart2/source/view/axes/TickmarkHelper.cxx
@@ -472,15 +472,17 @@ sal_Int32 TickmarkHelper::getMaxTickCount( sal_Int32 nDepth ) const
if( m_rIncrement.Distance<=0.0)
return 0;
- sal_Int32 nIntervalCount;
+ double fSub;
if(m_rIncrement.PostEquidistant )
- nIntervalCount = static_cast<sal_Int32>
- ( approxSub( m_fScaledVisibleMax, m_fScaledVisibleMin )
- / m_rIncrement.Distance );
+ fSub = approxSub( m_fScaledVisibleMax, m_fScaledVisibleMin );
else
- nIntervalCount = static_cast<sal_Int32>
- ( approxSub( m_rScale.Maximum, m_rScale.Minimum )
- / m_rIncrement.Distance );
+ fSub = approxSub( m_rScale.Maximum, m_rScale.Minimum );
+
+ if (!isFinite(fSub))
+ return 0;
+
+ sal_Int32 nIntervalCount = static_cast<sal_Int32>( fSub / m_rIncrement.Distance );
+
nIntervalCount+=3;
for(sal_Int32 nN=0; nN<nDepth-1; nN++)
{
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index c13216a041d7..2347824664c5 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -211,7 +211,11 @@ void SAL_CALL ChartView::initialize( const uno::Sequence< uno::Any >& aArguments
ChartView::~ChartView()
{
if( m_pDrawModelWrapper.get() )
+ {
EndListening( m_pDrawModelWrapper->getSdrModel(), FALSE /*bAllDups*/ );
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ m_pDrawModelWrapper.reset();
+ }
m_xDrawPage = NULL;
impl_deleteCoordinateSystems();
}
diff --git a/comphelper/inc/comphelper/propertycontainerhelper.hxx b/comphelper/inc/comphelper/propertycontainerhelper.hxx
index 247e1a678e02..82848203699c 100644
--- a/comphelper/inc/comphelper/propertycontainerhelper.hxx
+++ b/comphelper/inc/comphelper/propertycontainerhelper.hxx
@@ -42,7 +42,7 @@ namespace comphelper
//.........................................................................
// infos about one single property
-struct COMPHELPER_DLLPRIVATE PropertyDescription
+struct COMPHELPER_DLLPUBLIC PropertyDescription
{
// the possibilities where a property holding object may be located
enum LocationType
diff --git a/comphelper/inc/comphelper/stillreadwriteinteraction.hxx b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx
new file mode 100644
index 000000000000..1ade47220c6f
--- /dev/null
+++ b/comphelper/inc/comphelper/stillreadwriteinteraction.hxx
@@ -0,0 +1,69 @@
+/*************************************************************************
+*
+* 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 _COMPHELPER_STILLREADWRITEINTERACTION_HXX_
+#define _COMPHELPER_STRILLREADWRITEINTERACTION_HXX_
+
+//_______________________________________________
+// includes
+#include <ucbhelper/interceptedinteraction.hxx>
+
+#ifndef __COM_SUN_STAR_TASK_XINTERACTIONHANDLER_HPP__
+#include <com/sun/star/task/XInteractionHandler.hpp>
+#endif
+
+#include <ucbhelper/interceptedinteraction.hxx>
+#include "comphelper/comphelperdllapi.h"
+
+//_______________________________________________
+// namespace
+
+namespace comphelper{
+class COMPHELPER_DLLPUBLIC StillReadWriteInteraction : public ::ucbhelper::InterceptedInteraction
+{
+private:
+ static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
+ static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1;
+
+ sal_Bool m_bUsed;
+ sal_Bool m_bHandledByMySelf;
+ sal_Bool m_bHandledByInternalHandler;
+
+public:
+ StillReadWriteInteraction(const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler);
+
+ void resetInterceptions();
+ void resetErrorStates();
+ sal_Bool wasWriteError();
+
+private:
+ virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest);
+
+};
+}
+#endif
diff --git a/comphelper/source/misc/makefile.mk b/comphelper/source/misc/makefile.mk
index 94837ce49df9..5ad7e3ed289e 100644
--- a/comphelper/source/misc/makefile.mk
+++ b/comphelper/source/misc/makefile.mk
@@ -92,6 +92,7 @@ SLOFILES= \
$(SLO)$/comphelper_module.obj \
$(SLO)$/comphelper_services.obj \
$(SLO)$/componentbase.obj \
+ $(SLO)$/stillreadwriteinteraction.obj \
# --- Targets ----------------------------------
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 1710a43027cf..1bc40a454d43 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_comphelper.hxx"
#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/stillreadwriteinteraction.hxx>
//_______________________________________________
// includes
@@ -59,22 +60,10 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#endif
-#ifndef __COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP__
-#include <com/sun/star/ucb/InteractiveIOException.hpp>
-#endif
-
-#ifndef __COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP__
-#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
-#endif
-
#ifndef __COM_SUN_STAR_UCB_COMMANDFAILEDEXCEPTION_HPP__
#include <com/sun/star/ucb/CommandFailedException.hpp>
#endif
-#ifndef __COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP__
-#include <com/sun/star/task/XInteractionAbort.hpp>
-#endif
-
#ifndef __COM_SUN_STAR_URI_XURIREFERENCEFACTORY_HPP__
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#endif
@@ -673,114 +662,6 @@ sal_Bool MediaDescriptor::impl_openStreamWithPostData( const css::uno::Reference
}
/*-----------------------------------------------*/
-class StillReadWriteInteraction : public ::ucbhelper::InterceptedInteraction
-{
- private:
- static const sal_Int32 HANDLE_INTERACTIVEIOEXCEPTION = 0;
- static const sal_Int32 HANDLE_UNSUPPORTEDDATASINKEXCEPTION = 1;
-
- sal_Bool m_bUsed;
- sal_Bool m_bHandledByMySelf;
- sal_Bool m_bHandledByInternalHandler;
-
- public:
- StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler)
- : m_bUsed (sal_False)
- , m_bHandledByMySelf (sal_False)
- , m_bHandledByInternalHandler(sal_False)
- {
- ::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions;
- ::ucbhelper::InterceptedInteraction::InterceptedRequest aInterceptedRequest;
-
- aInterceptedRequest.Handle = HANDLE_INTERACTIVEIOEXCEPTION;
- aInterceptedRequest.Request <<= css::ucb::InteractiveIOException();
- aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
- aInterceptedRequest.MatchExact = sal_False;
- lInterceptions.push_back(aInterceptedRequest);
-
- aInterceptedRequest.Handle = HANDLE_UNSUPPORTEDDATASINKEXCEPTION;
- aInterceptedRequest.Request <<= css::ucb::UnsupportedDataSinkException();
- aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
- aInterceptedRequest.MatchExact = sal_False;
- lInterceptions.push_back(aInterceptedRequest);
-
- setInterceptedHandler(xHandler);
- setInterceptions(lInterceptions);
- }
-
- void resetInterceptions()
- {
- setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
- }
-
- void resetErrorStates()
- {
- m_bUsed = sal_False;
- m_bHandledByMySelf = sal_False;
- m_bHandledByInternalHandler = sal_False;
- }
-
- sal_Bool wasWriteError()
- {
- return (m_bUsed && m_bHandledByMySelf);
- }
-
- private:
- virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest,
- const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest)
- {
- // we are used!
- m_bUsed = sal_True;
-
- // check if its a real interception - might some parameters are not the right ones ...
- sal_Bool bAbort = sal_False;
- switch(aRequest.Handle)
- {
- case HANDLE_INTERACTIVEIOEXCEPTION:
- {
- css::ucb::InteractiveIOException exIO;
- xRequest->getRequest() >>= exIO;
- bAbort = (
- (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED )
- || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
-#ifdef MACOSX
- // this is a workaround for MAC, on this platform if the file is locked
- // the returned error code looks to be wrong
- || (exIO.Code == css::ucb::IOErrorCode_GENERAL )
-#endif
- );
- }
- break;
-
- case HANDLE_UNSUPPORTEDDATASINKEXCEPTION:
- {
- bAbort = sal_True;
- }
- break;
- }
-
- // handle interaction by ourself
- if (bAbort)
- {
- m_bHandledByMySelf = sal_True;
- css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation(
- xRequest->getContinuations(),
- ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)));
- if (!xAbort.is())
- return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND;
- xAbort->select();
- return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
- }
-
- // Otherwhise use internal handler.
- if (m_xInterceptedHandler.is())
- {
- m_bHandledByInternalHandler = sal_True;
- m_xInterceptedHandler->handle(xRequest);
- }
- return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
- }
-};
/*-----------------------------------------------
25.03.2004 12:29
diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx
new file mode 100644
index 000000000000..9054f0754b5e
--- /dev/null
+++ b/comphelper/source/misc/stillreadwriteinteraction.cxx
@@ -0,0 +1,144 @@
+/*************************************************************************
+*
+* 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_comphelper.hxx"
+#include <comphelper/stillreadwriteinteraction.hxx>
+
+#ifndef __COM_SUN_STAR_UCB_INTERACTIVEIOEXCEPTION_HPP__
+#include <com/sun/star/ucb/InteractiveIOException.hpp>
+#endif
+
+#ifndef __COM_SUN_STAR_TASK_XINTERACTIONABORT_HPP__
+#include <com/sun/star/task/XInteractionAbort.hpp>
+#endif
+
+#ifndef __COM_SUN_STAR_UCB_UNSUPPORTEDDATASINKEXCEPTION_HPP__
+#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
+#endif
+
+namespace comphelper{
+
+ namespace css = ::com::sun::star;
+
+StillReadWriteInteraction::StillReadWriteInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler)
+ : m_bUsed (sal_False)
+ , m_bHandledByMySelf (sal_False)
+ , m_bHandledByInternalHandler(sal_False)
+{
+ ::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest > lInterceptions;
+ ::ucbhelper::InterceptedInteraction::InterceptedRequest aInterceptedRequest;
+
+ aInterceptedRequest.Handle = HANDLE_INTERACTIVEIOEXCEPTION;
+ aInterceptedRequest.Request <<= css::ucb::InteractiveIOException();
+ aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
+ aInterceptedRequest.MatchExact = sal_False;
+ lInterceptions.push_back(aInterceptedRequest);
+
+ aInterceptedRequest.Handle = HANDLE_UNSUPPORTEDDATASINKEXCEPTION;
+ aInterceptedRequest.Request <<= css::ucb::UnsupportedDataSinkException();
+ aInterceptedRequest.Continuation = ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0));
+ aInterceptedRequest.MatchExact = sal_False;
+ lInterceptions.push_back(aInterceptedRequest);
+
+ setInterceptedHandler(xHandler);
+ setInterceptions(lInterceptions);
+}
+
+void StillReadWriteInteraction::resetInterceptions()
+{
+ setInterceptions(::std::vector< ::ucbhelper::InterceptedInteraction::InterceptedRequest >());
+}
+
+void StillReadWriteInteraction::resetErrorStates()
+{
+ m_bUsed = sal_False;
+ m_bHandledByMySelf = sal_False;
+ m_bHandledByInternalHandler = sal_False;
+}
+
+sal_Bool StillReadWriteInteraction::wasWriteError()
+{
+ return (m_bUsed && m_bHandledByMySelf);
+}
+
+ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction::intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest >& xRequest)
+{
+ // we are used!
+ m_bUsed = sal_True;
+
+ // check if its a real interception - might some parameters are not the right ones ...
+ sal_Bool bAbort = sal_False;
+ switch(aRequest.Handle)
+ {
+ case HANDLE_INTERACTIVEIOEXCEPTION:
+ {
+ css::ucb::InteractiveIOException exIO;
+ xRequest->getRequest() >>= exIO;
+ bAbort = (
+ (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED )
+ || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION )
+ || (exIO.Code == css::ucb::IOErrorCode_NOT_EXISTING )
+#ifdef MACOSX
+ // this is a workaround for MAC, on this platform if the file is locked
+ // the returned error code looks to be wrong
+ || (exIO.Code == css::ucb::IOErrorCode_GENERAL )
+#endif
+ );
+ }
+ break;
+
+ case HANDLE_UNSUPPORTEDDATASINKEXCEPTION:
+ {
+ bAbort = sal_True;
+ }
+ break;
+ }
+
+ // handle interaction by ourself
+ if (bAbort)
+ {
+ m_bHandledByMySelf = sal_True;
+ css::uno::Reference< css::task::XInteractionContinuation > xAbort = ::ucbhelper::InterceptedInteraction::extractContinuation(
+ xRequest->getContinuations(),
+ ::getCppuType(static_cast< css::uno::Reference< css::task::XInteractionAbort >* >(0)));
+ if (!xAbort.is())
+ return ::ucbhelper::InterceptedInteraction::E_NO_CONTINUATION_FOUND;
+ xAbort->select();
+ return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
+ }
+
+ // Otherwhise use internal handler.
+ if (m_xInterceptedHandler.is())
+ {
+ m_bHandledByInternalHandler = sal_True;
+ m_xInterceptedHandler->handle(xRequest);
+ }
+ return ::ucbhelper::InterceptedInteraction::E_INTERCEPTED;
+}
+}
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 6a2962716f27..303b54688eea 100755
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -389,14 +389,14 @@ void SpellDialog::UpdateBoxes_Impl()
}
// -----------------------------------------------------------------------
-void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence)
+void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrentError )
{
//initially or after the last error of a sentence MarkNextError will fail
//then GetNextSentence() has to be called followed again by MarkNextError()
//MarkNextError is not initally called if the UndoEdit mode is active
bool bNextSentence = false;
- if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError()) ||
- true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence) && aSentenceED.MarkNextError()))
+ if((!aSentenceED.IsUndoEditMode() && aSentenceED.MarkNextError( bIgnoreCurrentError )) ||
+ true == ( bNextSentence = GetNextSentence_Impl(bUseSavedSentence, aSentenceED.IsUndoEditMode()) && aSentenceED.MarkNextError( false )))
{
const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
if( pSpellErrorDescription )
@@ -795,14 +795,12 @@ IMPL_LINK( SpellDialog, IgnoreHdl, Button *, EMPTYARG )
}
else
{
- //in case the error has been changed manually it has to be restored
+ //in case the error has been changed manually it has to be restored,
+ // since the users choice now was to ignore the error
aSentenceED.RestoreCurrentError();
- rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true));
- aSentenceED.ResetModified();
// the word is being ignored
- SpellContinue_Impl();
- bModified = false;
+ SpellContinue_Impl( false, true );
}
return 1;
}
@@ -1074,11 +1072,8 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd)
-----------------------------------------------------------------------*/
IMPL_LINK(SpellDialog, CancelHdl, Button *, EMPTYARG )
{
- //apply changes first - if there are any
- if(aSentenceED.IsModified())
- {
- rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(false));
- }
+ //apply changes and ignored text parts first - if there are any
+ rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), false);
Close();
return 0;
}
@@ -1158,15 +1153,17 @@ void SpellDialog::InvalidateDialog()
/*-- 10.09.2003 08:35:56---------------------------------------------------
-----------------------------------------------------------------------*/
-bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence)
+bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck)
{
bool bRet = false;
- if(!bUseSavedSentence && aSentenceED.IsModified())
+ if(!bUseSavedSentence /*&& aSentenceED.IsModified()*/)
{
- rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(false));
+ //apply changes and ignored text parts
+ rParent.ApplyChangedSentence(aSentenceED.CreateSpellPortions(true), bRecheck);
}
+ aSentenceED.ResetIgnoreErrorsAt();
aSentenceED.ResetModified();
- SpellPortions aSentence = bUseSavedSentence ? m_aSavedSentence : rParent.GetNextWrongSentence();
+ SpellPortions aSentence = bUseSavedSentence ? m_aSavedSentence : rParent.GetNextWrongSentence( bRecheck );
if(!bUseSavedSentence)
m_aSavedSentence = aSentence;
bool bHasReplaced = false;
@@ -1177,8 +1174,8 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence)
if(!ApplyChangeAllList_Impl(aSentence, bHasReplaced))
{
- rParent.ApplyChangedSentence(aSentence);
- aSentence = rParent.GetNextWrongSentence();
+ rParent.ApplyChangedSentence(aSentence, bRecheck);
+ aSentence = rParent.GetNextWrongSentence( bRecheck );
}
else
break;
@@ -1642,8 +1639,10 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
/*-- 10.09.2003 13:38:14---------------------------------------------------
-----------------------------------------------------------------------*/
-bool SentenceEditWindow_Impl::MarkNextError()
+bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError )
{
+ if (bIgnoreCurrentError)
+ m_aIgnoreErrorsAt.insert( m_nErrorStart );
ExtTextEngine* pTextEngine = GetTextEngine();
USHORT nTextLen = pTextEngine->GetTextLen(0);
if(m_nErrorEnd >= nTextLen - 1)
@@ -1981,7 +1980,8 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore
aPortion1.eLanguage = eLang;
aPortion1.sText = pTextEngine->GetText(
TextSelection(TextPaM(0, nStart), TextPaM(0, aStart->nPosition)));
- if( bSetIgnoreFlag && m_nErrorStart == nStart )
+ bool bIsIgnoreError = m_aIgnoreErrorsAt.find( nStart ) != m_aIgnoreErrorsAt.end();
+ if( bSetIgnoreFlag && bIsIgnoreError /*m_nErrorStart == nStart*/ )
{
aPortion1.bIgnoreThisError = true;
}
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index a2deb5192389..8d233b71e890 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -50,6 +50,8 @@
#include <svtools/xtextedt.hxx>
#include <editeng/SpellPortions.hxx>
+#include <set>
+
class ScrollBar;
class TextEngine;
class ExtTextView;
@@ -72,11 +74,12 @@ class SentenceEditWindow_Impl : public MultiLineEdit/*, public SfxListener*/
using MultiLineEdit::SetText;
private:
+ std::set< USHORT > m_aIgnoreErrorsAt;
USHORT m_nErrorStart;
USHORT m_nErrorEnd;
bool m_bIsUndoEditMode;
- Link m_aModifyLink;
+ Link m_aModifyLink;
void CallModifyLink() {m_aModifyLink.Call(this);}
@@ -93,7 +96,7 @@ public:
void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd );
void SetText( const String& rStr );
- bool MarkNextError();
+ bool MarkNextError( bool bIgnoreCurrentError );
void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage);
void MoveErrorMarkTo(USHORT nErrorStart, USHORT nErrorEnd, bool bGrammar);
String GetErrorText() const;
@@ -121,6 +124,8 @@ public:
void UndoActionEnd( USHORT nId );
void MoveErrorEnd(long nOffset);
+
+ void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); }
};
@@ -221,7 +226,7 @@ private:
void InitUserDicts();
void UpdateBoxes_Impl();
void Init_Impl();
- void SpellContinue_Impl(bool UseSavedSentence = false);
+ void SpellContinue_Impl(bool UseSavedSentence = false, bool bIgnoreCurrentError = false );
void LockFocusChanges( bool bLock ) {bFocusLocked = bLock;}
void Impl_Restore();
@@ -230,7 +235,7 @@ private:
/** Retrieves the next sentence.
*/
- bool GetNextSentence_Impl(bool bUseSavedSentence);
+ bool GetNextSentence_Impl(bool bUseSavedSentence, bool bRechek /*for rechecking the curretn sentence*/);
/** Corrects all errors that have been selected to be changed always
*/
bool ApplyChangeAllList_Impl(SpellPortions& rSentence, bool& bHasReplaced);
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index b63d9afc647e..880f8d263c6b 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1830,7 +1830,7 @@ void OfaTreeOptionsDialog::ApplyLanguageOptions(const SfxItemSet& rSet)
while ( _pViewFrame )
{
_pViewFrame->GetDispatcher()->Execute(pItem->Which(), SFX_CALLMODE_ASYNCHRON, pItem, 0L);
- _pViewFrame = SfxViewFrame::GetNext( *pViewFrame );
+ _pViewFrame = SfxViewFrame::GetNext( *_pViewFrame );
}
}
}
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index 53bcfb581d91..5ee29ff5d35f 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -314,9 +314,9 @@ namespace dbmm
}
//--------------------------------------------------------------------
- sal_Bool MacroMigrationDialog::onFinish( sal_Int32 _nResult )
+ sal_Bool MacroMigrationDialog::onFinish()
{
- return MacroMigrationDialog_Base::onFinish( _nResult );
+ return MacroMigrationDialog_Base::onFinish();
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
index 68137db3eb80..d2af622316da 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
@@ -68,7 +68,7 @@ namespace dbmm
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual sal_Bool leaveState( WizardState _nState );
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
- virtual sal_Bool onFinish( sal_Int32 _nResult );
+ virtual sal_Bool onFinish();
// Dialog overridables
virtual BOOL Close();
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 4e35663c5a81..c2bd3986e27a 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -188,12 +188,12 @@ namespace dbmm
}
//--------------------------------------------------------------------
- sal_Bool SaveDBDocPage::commitPage( CommitPageReason _eReason )
+ sal_Bool SaveDBDocPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if ( !MacroMigrationPage::commitPage( _eReason ) )
return sal_False;
- if ( eTravelBackward == _eReason )
+ if ( ::svt::WizardTypes::eTravelBackward == _eReason )
return sal_True;
if ( !m_aLocationController.prepareCommit() )
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
index 550e134e6db3..8c269982999d 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx
@@ -109,11 +109,10 @@ namespace dbmm
m_aLocationController;
protected:
- // OWizardPage overridables
- virtual void initializePage();
- virtual bool canAdvance() const;
- // IWizardPage overridables
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ // IWizardPageController overridables
+ virtual void initializePage();
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
+ virtual bool canAdvance() const;
private:
DECL_LINK( OnLocationModified, Edit* );
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 367d95a2ed23..f53054d37339 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -289,7 +289,7 @@ namespace dbaui
callModifiedHdl();
}
// -----------------------------------------------------------------------
- sal_Bool OConnectionTabPageSetup::commitPage( CommitPageReason /*_eReason*/ )
+ sal_Bool OConnectionTabPageSetup::commitPage( ::svt::WizardTypes::CommitPageReason /*_eReason*/ )
{
return commitURL();
}
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index 2a4380f0c70b..79a16c880c54 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -89,7 +89,7 @@ namespace dbaui
virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 087b817dd07e..8e5b61dc9076 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -204,11 +204,16 @@ namespace dbaui
Reset(*m_pItemSetHelper->getOutputSet());
}
// -----------------------------------------------------------------------
- sal_Bool OGenericAdministrationPage::commitPage( CommitPageReason )
+ sal_Bool OGenericAdministrationPage::commitPage( ::svt::WizardTypes::CommitPageReason )
{
return sal_True;
}
// -----------------------------------------------------------------------
+ bool OGenericAdministrationPage::canAdvance() const
+ {
+ return true;
+ }
+ // -----------------------------------------------------------------------
void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, USHORT _nID, sal_Bool& _bChangedSomething, bool _bRevertValue )
{
if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) )
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 20bb0ea688cc..32ba0064a824 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -113,7 +113,8 @@ namespace dbaui
//=========================================================================
class IDatabaseSettingsDialog;
class IItemSetHelper;
- class OGenericAdministrationPage : public SfxTabPage, public svt::IWizardPage
+ class OGenericAdministrationPage :public SfxTabPage
+ ,public ::svt::IWizardPageController
{
private:
Link m_aModifiedHandler; /// to be called if something on the page has been modified
@@ -165,9 +166,10 @@ namespace dbaui
*/
sal_Bool getSelectedDataSource(::rtl::OUString& _sReturn,::rtl::OUString& _sCurr);
- // svt::IWizardPage
+ // svt::IWizardPageController
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
+ virtual bool canAdvance() const;
void SetRoadmapStateValue( sal_Bool _bDoEnable ) { m_abEnableRoadmap = _bDoEnable; }
bool GetRoadmapStateValue() const { return m_abEnableRoadmap; }
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index cdecbd295df6..7fcf2ae8429d 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -405,16 +405,16 @@ sal_Bool ODbTypeWizDialog::saveDatasource()
return sal_True;
}
// -----------------------------------------------------------------------------
-IWizardPage* ODbTypeWizDialog::getWizardPage(TabPage* _pCurrentPage) const
+IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPage ) const
{
OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage);
return pPage;
}
// -----------------------------------------------------------------------------
-sal_Bool ODbTypeWizDialog::onFinish(sal_Int32 _nResult)
+sal_Bool ODbTypeWizDialog::onFinish()
{
saveDatasource();
- return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish(_nResult) : sal_False;
+ return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish() : sal_False;
}
//.........................................................................
} // namespace dbaui
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 5a601bd56c92..b09c691864a3 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -789,7 +789,7 @@ IMPL_LINK(ODbTypeWizDialogSetup, OnRecentDocumentSelected, OGeneralPage*, /*_pGe
IMPL_LINK(ODbTypeWizDialogSetup, OnSingleDocumentChosen, OGeneralPage*, /*_pGeneralPage*/)
{
if ( prepareLeaveCurrentState( eFinish ) )
- onFinish( RET_OK );
+ onFinish();
return 0L;
}
@@ -1078,7 +1078,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
return aExistenceCheck.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
}
// -----------------------------------------------------------------------------
- IWizardPage* ODbTypeWizDialogSetup::getWizardPage(TabPage* _pCurrentPage) const
+ IWizardPageController* ODbTypeWizDialogSetup::getPageController( TabPage* _pCurrentPage ) const
{
OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage);
return pPage;
@@ -1206,7 +1206,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
}
// -----------------------------------------------------------------------------
- sal_Bool ODbTypeWizDialogSetup::onFinish(sal_Int32 _nResult)
+ sal_Bool ODbTypeWizDialogSetup::onFinish()
{
if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPage::eOpenExisting )
{
@@ -1214,7 +1214,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
// wants us to load could be a non-database document. Instead, we asynchronously
// open the selected document. Thus, the wizard's return value is RET_CANCEL,
// which means to not continue loading the database document
- if ( !OWizardMachine::onFinish( RET_CANCEL ) )
+ if ( !OWizardMachine::Finnish( RET_CANCEL ) )
return sal_False;
Reference< XComponentLoader > xFrameLoader;
@@ -1237,7 +1237,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
skipUntil(PAGE_DBSETUPWIZARD_FINAL);
}
if (getCurrentState() == PAGE_DBSETUPWIZARD_FINAL)
- return SaveDatabaseDocument() ? OWizardMachine::onFinish( _nResult ) : sal_False;
+ return SaveDatabaseDocument() ? OWizardMachine::onFinish() : sal_False;
else
{
enableButtons( WZB_FINISH, sal_False );
diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx
index 3f36739fc08c..94b3fd683336 100644
--- a/dbaccess/source/ui/inc/dbwiz.hxx
+++ b/dbaccess/source/ui/inc/dbwiz.hxx
@@ -111,8 +111,9 @@ protected:
virtual TabPage* createPage(WizardState _nState);
virtual WizardState determineNextState(WizardState _nCurrentState) const;
virtual sal_Bool leaveState(WizardState _nState);
- virtual ::svt::IWizardPage* getWizardPage(TabPage* _pCurrentPage) const;
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual ::svt::IWizardPageController*
+ getPageController( TabPage* _pCurrentPage ) const;
+ virtual sal_Bool onFinish();
protected:
inline sal_Bool isUIEnabled() const { return m_bUIEnabled; }
diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx
index 0fcdd989a850..039fc64392de 100644
--- a/dbaccess/source/ui/inc/dbwizsetup.hxx
+++ b/dbaccess/source/ui/inc/dbwizsetup.hxx
@@ -149,8 +149,8 @@ protected:
virtual TabPage* createPage(WizardState _nState);
virtual sal_Bool leaveState(WizardState _nState);
virtual void enterState(WizardState _nState);
- virtual ::svt::IWizardPage* getWizardPage(TabPage* _pCurrentPage) const;
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual ::svt::IWizardPageController* getPageController( TabPage* _pCurrentPage ) const;
+ virtual sal_Bool onFinish();
protected:
inline sal_Bool isUIEnabled() const { return m_bUIEnabled; }
diff --git a/default_images/sw/res/writerteam.png b/default_images/sw/res/writerteam.png
deleted file mode 100644
index cfce490c5e68..000000000000
--- a/default_images/sw/res/writerteam.png
+++ /dev/null
Binary files differ
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index efba60ca75b9..6f00d47332ac 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -359,6 +359,8 @@ namespace
: public rtl::Static< String, Version > {};
struct AboutBoxVersion
: public rtl::Static< String, AboutBoxVersion > {};
+ struct OOOVendor
+ : public rtl::Static< String, OOOVendor > {};
struct Extension
: public rtl::Static< String, Extension > {};
struct XMLFileFormatName
@@ -422,6 +424,21 @@ void ReplaceStringHookProc( UniString& rStr )
rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATNAME", rXMLFileFormatName );
rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATVERSION", rXMLFileFormatVersion );
}
+ if ( rStr.SearchAscii( "%OOOVENDOR" ) != STRING_NOTFOUND )
+ {
+ String &rOOOVendor = OOOVendor::get();
+
+ if ( !rOOOVendor.Len() )
+ {
+ rtl::OUString aTmp;
+ Any aRet = ::utl::ConfigManager::GetDirectConfigProperty(
+ ::utl::ConfigManager::OOOVENDOR );
+ aRet >>= aTmp;
+ rOOOVendor = aTmp;
+
+ }
+ rStr.SearchAndReplaceAllAscii( "%OOOVENDOR" ,rOOOVendor );
+ }
if ( rStr.SearchAscii( "%WRITERCOMPATIBILITYVERSIONOOO11" ) != STRING_NOTFOUND )
{
diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx
index 0453ab8372c0..65c48d70c92d 100644
--- a/desktop/source/deployment/dp_xml.cxx
+++ b/desktop/source/deployment/dp_xml.cxx
@@ -44,6 +44,20 @@ namespace dp_misc
//==============================================================================
void xml_parse(
+ Reference<xml::input::XRoot> const & xRoot,
+ ::ucbhelper::Content & ucb_content,
+ Reference<XComponentContext> const & xContext )
+{
+ const Any arg(xRoot);
+ const Reference<xml::sax::XDocumentHandler> xDocHandler(
+ xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ OUSTR("com.sun.star.xml.input.SaxDocumentHandler"),
+ Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW );
+ xml_parse( xDocHandler, ucb_content, xContext );
+ }
+
+//==============================================================================
+void xml_parse(
Reference<xml::sax::XDocumentHandler> const & xDocHandler,
::ucbhelper::Content & ucb_content,
Reference<XComponentContext> const & xContext )
@@ -61,199 +75,4 @@ void xml_parse(
xParser->parseStream( source );
}
-//==============================================================================
-void xml_parse(
- Reference<xml::input::XRoot> const & xRoot,
- ::ucbhelper::Content & ucb_content,
- Reference<XComponentContext> const & xContext )
-{
- const Any arg(xRoot);
- const Reference<xml::sax::XDocumentHandler> xDocHandler(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- OUSTR("com.sun.star.xml.input.SaxDocumentHandler"),
- Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW );
- xml_parse( xDocHandler, ucb_content, xContext );
-}
-
-//##############################################################################
-
-//______________________________________________________________________________
-XmlRootElement::XmlRootElement(
- OUString const & uri, OUString const & localname )
- : m_uri( uri )
-{
- m_localname = localname;
-}
-
-//______________________________________________________________________________
-XmlRootElement::~XmlRootElement()
-{
-}
-
-// XRoot
-//______________________________________________________________________________
-void XmlRootElement::startDocument(
- Reference<xml::input::XNamespaceMapping> const & xMapping )
- throw (xml::sax::SAXException, RuntimeException)
-{
- m_xNamespaceMapping = xMapping;
-
- try {
- m_uid = m_xNamespaceMapping->getUidByUri( m_uri );
- }
- catch (container::NoSuchElementException & exc) {
- throw xml::sax::SAXException(
- exc.Message, static_cast<OWeakObject *>(this), Any(exc) );
- }
-}
-
-//______________________________________________________________________________
-void XmlRootElement::endDocument()
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlRootElement::processingInstruction(
- OUString const &, OUString const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlRootElement::setDocumentLocator(
- Reference<xml::sax::XLocator> const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-Reference<xml::input::XElement> XmlRootElement::startRootElement(
- sal_Int32 uid, OUString const & localname,
- Reference<xml::input::XAttributes> const & xAttributes )
- throw (xml::sax::SAXException, RuntimeException)
-{
- check_xmlns( uid );
- if (! localname.equals( m_localname )) {
- throw xml::sax::SAXException(
- OUSTR("unexpected root element ") + localname,
- static_cast<OWeakObject *>(this), Any() );
- }
- m_xAttributes = xAttributes;
-
- return this;
-}
-
-//##############################################################################
-
-//______________________________________________________________________________
-XmlElement::~XmlElement()
-{
-}
-
-//______________________________________________________________________________
-void XmlElement::check_xmlns( sal_Int32 uid ) const
- throw (xml::sax::SAXException)
-{
- if (uid != m_uid)
- {
- ::rtl::OUStringBuffer buf;
- buf.appendAscii(
- RTL_CONSTASCII_STRINGPARAM("illegal xml namespace uri=\"") );
- try {
- buf.append( m_xNamespaceMapping->getUriByUid( uid ) );
- }
- catch (container::NoSuchElementException & exc) {
- throw xml::sax::SAXException(
- exc.Message, static_cast<OWeakObject *>(
- const_cast<XmlElement *>(this) ), Any(exc) );
- }
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
- throw xml::sax::SAXException(
- buf.makeStringAndClear(),
- static_cast<OWeakObject *>( const_cast<XmlElement *>(this) ),
- Any() );
- }
-}
-
-// XElement
-//______________________________________________________________________________
-Reference<xml::input::XElement> XmlElement::getParent()
- throw (RuntimeException)
-{
- return m_xParent;
-}
-
-//______________________________________________________________________________
-OUString XmlElement::getLocalName()
- throw (RuntimeException)
-{
- return m_localname;
-}
-
-//______________________________________________________________________________
-sal_Int32 XmlElement::getUid()
- throw (RuntimeException)
-{
- return m_uid;
-}
-
-//______________________________________________________________________________
-Reference<xml::input::XAttributes> XmlElement::getAttributes()
- throw (RuntimeException)
-{
- return m_xAttributes;
-}
-
-//______________________________________________________________________________
-void XmlElement::ignorableWhitespace(
- OUString const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlElement::characters( OUString const & chars )
- throw (xml::sax::SAXException, RuntimeException)
-{
- m_characters += chars;
-}
-
-//______________________________________________________________________________
-void XmlElement::processingInstruction(
- OUString const &, OUString const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
-}
-
-//______________________________________________________________________________
-void XmlElement::endElement()
- throw (xml::sax::SAXException, RuntimeException)
-{
- m_got_endElement = true;
-}
-
-//______________________________________________________________________________
-Reference<xml::input::XElement> XmlElement::startChildElement(
- sal_Int32 uid, OUString const & localName,
- Reference<xml::input::XAttributes> const & )
- throw (xml::sax::SAXException, RuntimeException)
-{
- ::rtl::OUStringBuffer buf;
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("unexpected element "
- "{ tag=\"") );
- buf.append( localName );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\", uri=\"") );
- try {
- buf.append( m_xNamespaceMapping->getUriByUid( uid ) );
- }
- catch (container::NoSuchElementException & exc) {
- throw xml::sax::SAXException(
- exc.Message, static_cast<OWeakObject *>(this), Any(exc) );
- }
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" }!") );
- throw xml::sax::SAXException(
- buf.makeStringAndClear(), static_cast<OWeakObject *>(this), Any() );
-}
-
}
diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc
index 8da4db5ca74f..1d2f4869cc7f 100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -138,6 +138,8 @@
#define RID_IMG_LOCKED_HC (RID_DEPLOYMENT_GUI_START+59)
#define RID_IMG_EXTENSION (RID_DEPLOYMENT_GUI_START+60)
#define RID_IMG_EXTENSION_HC (RID_DEPLOYMENT_GUI_START+61)
+#define RID_IMG_SHARED (RID_DEPLOYMENT_GUI_START+62)
+#define RID_IMG_SHARED_HC (RID_DEPLOYMENT_GUI_START+63)
#define RID_STR_ADD_PACKAGES (RID_DEPLOYMENT_GUI_START+70)
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 21ec1ce46ff5..71fda4d9b3e0 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -239,7 +239,10 @@ void ExtBoxWithBtns_Impl::RecalcAll()
const sal_Int32 nActive = getSelIndex();
if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND )
+ {
SetButtonPos( GetEntryRect( nActive ) );
+ SetButtonStatus( GetEntryData( nActive) );
+ }
else
{
m_pOptionsBtn->Hide();
@@ -257,21 +260,6 @@ void ExtBoxWithBtns_Impl::selectEntry( const long nPos )
return;
ExtensionBox_Impl::selectEntry( nPos );
-
- if ( ( nPos >= 0 ) && ( nPos < GetEntryCount() ) )
- {
- if ( IsReallyVisible() )
- {
- SetButtonPos( GetEntryRect( nPos ) );
- }
- SetButtonStatus( GetEntryData( nPos) );
- }
- else
- {
- m_pOptionsBtn->Hide();
- m_pEnableBtn->Hide();
- m_pRemoveBtn->Hide();
- }
}
// -----------------------------------------------------------------------
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src
index d55421d50d75..7c47365999a0 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.src
@@ -165,11 +165,21 @@ Image RID_IMG_WARNING_HC
Image RID_IMG_LOCKED
{
- ImageBitmap = Bitmap { File = "shared_16.png"; };
+ ImageBitmap = Bitmap { File = "lock_16.png"; };
};
Image RID_IMG_LOCKED_HC
{
+ ImageBitmap = Bitmap { File = "lock_16_h.png"; };
+};
+
+Image RID_IMG_SHARED
+{
+ ImageBitmap = Bitmap { File = "shared_16.png"; };
+};
+
+Image RID_IMG_SHARED_HC
+{
ImageBitmap = Bitmap { File = "shared_16_h.png"; };
};
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 2e02a90f59fd..bcaa3252ea8f 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -177,6 +177,8 @@ ExtensionBox_Impl::ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pMan
m_nTopIndex( 0 ),
m_nActiveHeight( 0 ),
m_nExtraHeight( 2 ),
+ m_aSharedImage( DialogHelper::getResId( RID_IMG_SHARED ) ),
+ m_aSharedImageHC( DialogHelper::getResId( RID_IMG_SHARED_HC ) ),
m_aLockedImage( DialogHelper::getResId( RID_IMG_LOCKED ) ),
m_aLockedImageHC( DialogHelper::getResId( RID_IMG_LOCKED_HC ) ),
m_aWarningImage( DialogHelper::getResId( RID_IMG_WARNING ) ),
@@ -469,13 +471,15 @@ void ExtensionBox_Impl::selectEntry( const long nPos )
if ( IsReallyVisible() )
{
- m_bNeedsRecalc = true;
m_bAdjustActive = true;
}
}
if ( IsReallyVisible() )
+ {
+ m_bNeedsRecalc = true;
Invalidate();
+ }
guard.clear();
}
@@ -618,7 +622,10 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
if ( pEntry->m_bShared )
{
aPos = rRect.TopRight() + Point( -(RIGHT_ICON_OFFSET + SMALL_ICON_SIZE), TOP_OFFSET );
- DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage );
+ if ( pEntry->m_bLocked )
+ DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage );
+ else
+ DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aSharedImageHC : m_aSharedImage );
}
if ( ( pEntry->m_eState == AMBIGUOUS ) || pEntry->m_bMissingDeps )
{
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index ad62bfd1a2d8..16ef974deff9 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -135,6 +135,8 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
long m_nActiveHeight;
long m_nExtraHeight;
Size m_aOutputSize;
+ Image m_aSharedImage;
+ Image m_aSharedImageHC;
Image m_aLockedImage;
Image m_aLockedImageHC;
Image m_aWarningImage;
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 061988d5b04d..578ff04a6c88 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -92,6 +92,8 @@ namespace
: public rtl::Static< String, Version > {};
struct AboutBoxVersion
: public rtl::Static< String, AboutBoxVersion > {};
+ struct OOOVendor
+ : public rtl::Static< String, OOOVendor > {};
struct Extension
: public rtl::Static< String, Extension > {};
}
@@ -107,6 +109,7 @@ void ReplaceProductNameHookProc( String& rStr )
String &rVersion = Version::get();
String &rAboutBoxVersion = AboutBoxVersion::get();
String &rExtension = Extension::get();
+ String &rOOOVendor = OOOVendor::get();
if ( !rProductName.Len() )
{
@@ -123,6 +126,10 @@ void ReplaceProductNameHookProc( String& rStr )
aRet >>= aTmp;
rAboutBoxVersion = aTmp;
+ aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OOOVENDOR );
+ aRet >>= aTmp;
+ rOOOVendor = aTmp;
+
if ( !rExtension.Len() )
{
aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTEXTENSION );
@@ -135,6 +142,7 @@ void ReplaceProductNameHookProc( String& rStr )
rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rProductName );
rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion );
rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion );
+ rStr.SearchAndReplaceAllAscii( "%OOOVENDOR", rOOOVendor );
rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension );
}
}
diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
index 38a1870782ed..e58ff1e71acd 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -216,16 +216,6 @@ public:
*/
::rtl::OUString getIconURL( sal_Bool bHighContrast ) const;
- /**
- Allow direct access to the XPath functionality.
-
- @return
- direct access to the XPath functionality; null iff this instance was
- constructed with a null <code>element</code>
- */
- ::com::sun::star::uno::Reference< ::com::sun::star::xml::xpath::XXPathAPI >
- getXpath() const;
-
private:
SAL_DLLPRIVATE ::boost::optional< ::rtl::OUString > getOptionalValue(
::rtl::OUString const & expression) const;
diff --git a/desktop/source/deployment/inc/dp_xml.h b/desktop/source/deployment/inc/dp_xml.h
index 41c12f282428..300051bd1512 100644
--- a/desktop/source/deployment/inc/dp_xml.h
+++ b/desktop/source/deployment/inc/dp_xml.h
@@ -52,110 +52,6 @@ void xml_parse(
::ucbhelper::Content & ucb_content,
css::uno::Reference< css::uno::XComponentContext > const & xContext );
-//==============================================================================
-void xml_parse(
- css::uno::Reference< css::xml::input::XRoot > const & xRoot,
- ::ucbhelper::Content & ucb_content,
- css::uno::Reference< css::uno::XComponentContext > const & xContext );
-
-//==============================================================================
-class XmlElement : public ::cppu::WeakImplHelper1< css::xml::input::XElement >
-{
-protected:
- css::uno::Reference<css::xml::input::XNamespaceMapping> m_xNamespaceMapping;
- const css::uno::Reference<css::xml::input::XElement> m_xParent;
- sal_Int32 m_uid;
- ::rtl::OUString m_localname;
- css::uno::Reference<css::xml::input::XAttributes> m_xAttributes;
- ::rtl::OUString m_characters;
- bool m_got_endElement;
-
- void check_xmlns( sal_Int32 uid ) const throw (css::xml::sax::SAXException);
-
- inline XmlElement()
- : m_uid( -1 ),
- m_got_endElement( false )
- {}
- virtual ~XmlElement();
-public:
- inline bool isParsed() const { return m_got_endElement; }
-
- inline XmlElement(
- css::uno::Reference<css::xml::input::XNamespaceMapping>
- const & xMapping,
- css::uno::Reference<css::xml::input::XElement> const & xParent,
- sal_Int32 uid, ::rtl::OUString const & localname,
- css::uno::Reference< css::xml::input::XAttributes >
- const & xAttributes )
- : m_xNamespaceMapping( xMapping ),
- m_xParent( xParent ),
- m_uid( uid ),
- m_localname( localname ),
- m_xAttributes( xAttributes ),
- m_got_endElement( false )
- {}
-
- // XElement
- virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL
- getParent() throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLocalName()
- throw (css::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getUid()
- throw (css::uno::RuntimeException);
- virtual css::uno::Reference<css::xml::input::XAttributes> SAL_CALL
- getAttributes() throw (css::uno::RuntimeException);
- virtual void SAL_CALL ignorableWhitespace(
- ::rtl::OUString const & rWhitespaces )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL characters( ::rtl::OUString const & rChars )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL processingInstruction(
- ::rtl::OUString const & Target, ::rtl::OUString const & Data )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL endElement()
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL
- startChildElement(
- sal_Int32 nUid, ::rtl::OUString const & rLocalName,
- css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
-};
-
-//==============================================================================
-class XmlRootElement : public ::cppu::ImplInheritanceHelper1<
- XmlElement, css::xml::input::XRoot >
-{
- const ::rtl::OUString m_uri;
-
-protected:
- virtual ~XmlRootElement();
-public:
- inline ::rtl::OUString const & getUri() const
- { return m_uri; }
-
- XmlRootElement(
- ::rtl::OUString const & uri, ::rtl::OUString const & localname );
-
- // XRoot
- virtual void SAL_CALL startDocument(
- css::uno::Reference<css::xml::input::XNamespaceMapping>
- const & xMapping )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL endDocument()
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL processingInstruction(
- ::rtl::OUString const & target, ::rtl::OUString const & data )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual void SAL_CALL setDocumentLocator(
- css::uno::Reference<css::xml::sax::XLocator> const & xLocator )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
- virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL
- startRootElement(
- sal_Int32 uid, ::rtl::OUString const & localname,
- css::uno::Reference<css::xml::input::XAttributes> const & xAttributes )
- throw (css::xml::sax::SAXException, css::uno::RuntimeException);
-};
-
}
#endif
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 28f45918e9e2..049f781dfd90 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -264,12 +264,6 @@ DescriptionInfoset::getUpdateDownloadUrls() const
::boost::optional< ::rtl::OUString >();
}
-css::uno::Reference< css::xml::xpath::XXPathAPI > DescriptionInfoset::getXpath()
- const
-{
- return m_xpath;
-}
-
::boost::optional< ::rtl::OUString > DescriptionInfoset::getOptionalValue(
::rtl::OUString const & expression) const
{
diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx
index 11cc61ed84ff..53ec488c2082 100644
--- a/desktop/source/migration/pages.cxx
+++ b/desktop/source/migration/pages.cxx
@@ -357,9 +357,9 @@ MigrationPage::MigrationPage(
m_ftBody.SetText( aText );
}
-sal_Bool MigrationPage::commitPage( CommitPageReason _eReason )
+sal_Bool MigrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
{
- if (_eReason == eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone)
+ if (_eReason == svt::WizardTypes::eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone)
{
GetParent()->EnterWait();
FirstStartWizard* pWizard = dynamic_cast< FirstStartWizard* >( GetParent() );
@@ -433,7 +433,7 @@ UserPage::UserPage( svt::OWizardMachine* parent, const ResId& resid)
}
}
-sal_Bool UserPage::commitPage( CommitPageReason )
+sal_Bool UserPage::commitPage( svt::WizardTypes::CommitPageReason )
{
SvtUserOptions aUserOpt;
aUserOpt.SetFirstName(m_edFirst.GetText());
@@ -463,9 +463,9 @@ UpdateCheckPage::UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resi
_setBold(m_ftHead);
}
-sal_Bool UpdateCheckPage::commitPage( CommitPageReason _eReason )
+sal_Bool UpdateCheckPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
{
- if ( _eReason == eTravelForward )
+ if ( _eReason == svt::WizardTypes::eTravelForward )
{
try {
Reference < XNameReplace > xUpdateAccess;
@@ -589,9 +589,9 @@ void RegistrationPage::updateButtonStates()
m_rbNever.Show( m_bNeverVisible );
}
-sal_Bool RegistrationPage::commitPage( CommitPageReason _eReason )
+sal_Bool RegistrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason )
{
- if ( _eReason == eFinish )
+ if ( _eReason == svt::WizardTypes::eFinish )
{
::utl::RegOptions aOptions;
rtl::OUString aEvent;
@@ -665,7 +665,7 @@ void RegistrationPage::executeSingleMode()
// the registration modes "Now" and "Later" are handled by the page
RegistrationPage::RegistrationMode eMode = pPage->getRegistrationMode();
if ( eMode == RegistrationPage::rmNow || eMode == RegistrationPage::rmLater )
- pPage->commitPage( IWizardPage::eFinish );
+ pPage->commitPage( WizardTypes::eFinish );
if ( eMode != RegistrationPage::rmLater )
::utl::RegOptions().removeReminder();
}
diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx
index 9740773fe602..776268eb475c 100644
--- a/desktop/source/migration/pages.hxx
+++ b/desktop/source/migration/pages.hxx
@@ -125,7 +125,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber;
public:
MigrationPage( svt::OWizardMachine* parent, const ResId& resid, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber );
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
protected:
virtual void ActivatePage();
@@ -148,7 +148,7 @@ private:
public:
UserPage( svt::OWizardMachine* parent, const ResId& resid);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
protected:
virtual void ActivatePage();
};
@@ -161,7 +161,7 @@ private:
CheckBox m_cbUpdateCheck;
public:
UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resid);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
protected:
virtual void ActivatePage();
@@ -188,7 +188,7 @@ protected:
virtual bool canAdvance() const;
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason );
public:
RegistrationPage( Window* parent, const ResId& resid);
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 11bf8129cc04..b7da88b85013 100755..100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -139,17 +139,7 @@ OO3ExtensionMigration::~OO3ExtensionMigration()
}
}
-void OO3ExtensionMigration::registerConfigurationPackage( const uno::Reference< deployment::XPackage > & xPkg)
-{
- const ::rtl::OUString sMediaType = xPkg->getPackageType()->getMediaType();
- if ( (sMediaType.equals(sConfigurationDataType) || sMediaType.equals(sConfigurationSchemaType) ) )
- {
- xPkg->revokePackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ());
- xPkg->registerPackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ());
- }
-}
-
- void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions )
+void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions )
{
osl::Directory aScanRootDir( sSourceDir );
osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
@@ -382,35 +372,6 @@ bool OO3ExtensionMigration::migrateExtension( const ::rtl::OUString& sSourceDir
return false;
}
-bool OO3ExtensionMigration::copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
-{
- bool bRet = false;
-
- INetURLObject aSourceObj( sSourceDir );
- INetURLObject aDestObj( sTargetDir );
- String aName = aDestObj.getName();
- aDestObj.removeSegment();
- aDestObj.setFinalSlash();
-
- try
- {
- ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
- ::rtl::OUString aTransferName = ::rtl::OUString::createFromAscii( "transfer" );
- if ( xInfo->hasCommandByName( aTransferName ) )
- {
- aDestPath.executeCommand( aTransferName, uno::makeAny(
- ucb::TransferInfo( sal_False, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, ucb::NameClash::OVERWRITE ) ) );
- bRet = true;
- }
- }
- catch( uno::Exception& )
- {
- }
-
- return bRet;
-}
-
// -----------------------------------------------------------------------------
// XServiceInfo
@@ -496,32 +457,6 @@ TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL )
return aResult;
}
-// -----------------------------------------------------------------------------
-// XJob
-// -----------------------------------------------------------------------------
-
-void OO3ExtensionMigration::copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
-{
- ::rtl::OUString sEx1( m_sSourceDir );
- sEx1 += sExcludeDir1;
- ::rtl::OUString sEx2( m_sSourceDir );
- sEx2 += sExcludeDir2;
-
- TStringVectorPtr aList = getContent( sSourceDir );
- TStringVector::const_iterator aI = aList->begin();
- while ( aI != aList->end() )
- {
- ::rtl::OUString sSourceLocalName = aI->copy( sSourceDir.getLength() );
- ::rtl::OUString aTemp = aI->copy( m_sSourceDir.getLength() );
- if ( aTemp != sExcludeDir1 && aTemp != sExcludeDir2 )
- {
- ::rtl::OUString sTargetName = sTargetDir + sSourceLocalName;
- copy( (*aI), sTargetName );
- }
- ++aI;
- }
-}
-
Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& )
throw (lang::IllegalArgumentException, Exception, RuntimeException)
{
@@ -559,12 +494,6 @@ TmpRepositoryCommandEnv::TmpRepositoryCommandEnv()
{
}
-TmpRepositoryCommandEnv::TmpRepositoryCommandEnv(
- uno::Reference< task::XInteractionHandler> const & handler)
- : m_forwardHandler(handler)
-{
-}
-
TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv()
{
}
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
index a001f41d92c5..fb7e69c2b87f 100755..100644
--- a/desktop/source/migration/services/oo3extensionmigration.hxx
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -97,16 +97,10 @@ namespace migration
};
::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
- void copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
- bool copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
ScanResult scanExtensionFolder( const ::rtl::OUString& sExtFolder );
void scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions );
bool scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlFilePath );
bool migrateExtension( const ::rtl::OUString& sSourceDir );
- /* fills m_scriptElements and m_dialogElements
- */
- void registerConfigurationPackage(
- const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg);
public:
OO3ExtensionMigration(::com::sun::star::uno::Reference<
@@ -142,8 +136,6 @@ namespace migration
public:
virtual ~TmpRepositoryCommandEnv();
TmpRepositoryCommandEnv();
- TmpRepositoryCommandEnv(
- ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> const & handler);
// XCommandEnvironment
virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL
diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx
index 48ee2abc71ca..81a789a613b9 100644
--- a/desktop/source/migration/wizard.cxx
+++ b/desktop/source/migration/wizard.cxx
@@ -219,11 +219,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep
defaultButton(WZB_NEXT);
}
-void FirstStartWizard::EnableButtonsWhileMigration()
-{
- enableButtons(0xff, sal_True);
-}
-
void FirstStartWizard::DisableButtonsWhileMigration()
{
enableButtons(0xff, sal_False);
@@ -439,10 +434,10 @@ sal_Bool FirstStartWizard::leaveState(WizardState)
return sal_True;
}
-sal_Bool FirstStartWizard::onFinish(sal_Int32 _nResult)
+sal_Bool FirstStartWizard::onFinish()
{
// return sal_True;
- if (svt::RoadmapWizard::onFinish(_nResult))
+ if ( svt::RoadmapWizard::onFinish() )
{
#ifndef OS2 // cannot enable quickstart on first startup, see shutdownicon.cxx comments.
enableQuickstart();
diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx
index e41bfe373cde..3317880f8bd6 100644
--- a/desktop/source/migration/wizard.hxx
+++ b/desktop/source/migration/wizard.hxx
@@ -62,7 +62,6 @@ public:
virtual short Execute();
virtual long PreNotify( NotifyEvent& rNEvt );
- void EnableButtonsWhileMigration();
void DisableButtonsWhileMigration();
private:
@@ -97,7 +96,7 @@ protected:
virtual TabPage* createPage(WizardState _nState);
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual sal_Bool leaveState(WizardState _nState );
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool onFinish();
virtual void enterState(WizardState _nState);
// from svt::RoadmapWizard
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
index 0f426c6ad2ba..6c67bded2b17 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -62,11 +62,48 @@ namespace drawinglayer
To get better text quality, it is suggested to handle tis primitive directly
in a renderer. In that case, e.g. hintings on the system can be supported.
+
+ @param maTextTransform
+ The text transformation contains the text start position (always baselined)
+ as translation, the FontSize as scale (where width relative to height defines
+ font scaling and width == height means no font scaling) and the font rotation
+ and shear.
+ When shear is used and a renderer does not support it, it may be better to use
+ the decomposition which will do everything correctly. Same is true for mirroring
+ which would be expressed as negative scalings.
+
+ @param rText
+ The text to be used. Only a part may be used, but a bigger part of the string
+ may be necessary for correct layouting (e.g. international)
+
+ @param aTextPosition
+ The index to the first character to use from rText
+
+ @param aTextLength
+ The number of characters to use from rText
+
+ @param rDXArray
+ The distances between the characters. This parameter may be empty, in that case
+ the renderer is responsible to do something useful. If it is given, it has to be of
+ the size aTextLength. Its values are in logical coordinates and describe the
+ distance for each character to use. This is independent from the font width which
+ is given with maTextTransform. The first value is the offset to use from the start
+ point in FontCoordinateSystem X-Direction (given by maTextTransform) to the start
+ point of the second character
+
+ @param rFontAttribute
+ The font definition
+
+ @param rLocale
+ The locale to use
+
+ @param rFontColor
+ The font color to use
*/
class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- /// text range transformation from unit range ([0.0 .. 1.0]) to text range
+ /// text transformation (FontCoordinateSystem)
basegfx::B2DHomMatrix maTextTransform;
/// The text, used from maTextPosition up to maTextPosition + maTextLength
@@ -78,10 +115,10 @@ namespace drawinglayer
/// The length for maText usage, starting from maTextPosition
xub_StrLen maTextLength;
- /// The DX array scale-independent in unit coordinates
+ /// The DX array in logic units
::std::vector< double > maDXArray;
- /// The font to use
+ /// The font definition
attribute::FontAttribute maFontAttribute;
/// The Locale for the text
@@ -90,7 +127,7 @@ namespace drawinglayer
/// font color
basegfx::BColor maFontColor;
- /// #i96669# add simple range buffering for this primitive
+ /// #i96669# internal: add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
protected:
diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
index 23d8e7edd913..93ebfeab48e7 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
@@ -54,9 +54,12 @@ namespace drawinglayer
class Shadow3DExtractingProcessor : public BaseProcessor3D
{
private:
+ /// typedef for data handling
+ typedef std::vector< primitive2d::BasePrimitive2D* > BasePrimitive2DVector;
+
/// result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence)
- primitive2d::Primitive2DSequence maPrimitive2DSequence;
- primitive2d::Primitive2DSequence* mpPrimitive2DSequence;
+ BasePrimitive2DVector maPrimitive2DSequence;
+ BasePrimitive2DVector* mpPrimitive2DSequence;
/// object transformation for scene for 2d definition
basegfx::B2DHomMatrix maObjectTransformation;
@@ -93,6 +96,10 @@ namespace drawinglayer
*/
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
+ /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence
+ const primitive2d::Primitive2DSequence getPrimitive2DSequenceFromBasePrimitive2DVector(
+ const BasePrimitive2DVector& rVector) const;
+
public:
Shadow3DExtractingProcessor(
const geometry::ViewInformation3D& rViewInformation,
@@ -100,9 +107,10 @@ namespace drawinglayer
const basegfx::B3DVector& rLightNormal,
double fShadowSlant,
const basegfx::B3DRange& rContained3DRange);
+ virtual ~Shadow3DExtractingProcessor();
/// data read access
- const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ const primitive2d::Primitive2DSequence getPrimitive2DSequence() const;
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; }
const basegfx::B3DHomMatrix& getEyeToView() const { return maEyeToView; }
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 238c47419eb9..6fa1cef2d23f 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -94,8 +94,10 @@ namespace
basegfx::BColor maTextLineColor;
basegfx::BColor maOverlineColor;
- /// clipping, font, etc.
- Region maRegion;
+ /// clipping
+ basegfx::B2DPolyPolygon maClipPolyPoygon;
+
+ /// font, etc.
Font maFont;
RasterOp maRasterOp;
sal_uInt32 mnLayoutMode;
@@ -110,7 +112,7 @@ namespace
bool mbTextFillColor : 1;
bool mbTextLineColor : 1;
bool mbOverlineColor : 1;
- bool mbRegion : 1;
+ bool mbClipPolyPolygonActive : 1;
public:
PropertyHolder()
@@ -122,7 +124,7 @@ namespace
maTextFillColor(),
maTextLineColor(),
maOverlineColor(),
- maRegion(),
+ maClipPolyPoygon(),
maFont(),
maRasterOp(ROP_OVERPAINT),
mnLayoutMode(0),
@@ -134,7 +136,7 @@ namespace
mbTextFillColor(false),
mbTextLineColor(false),
mbOverlineColor(false),
- mbRegion(false)
+ mbClipPolyPolygonActive(false)
{
}
@@ -179,10 +181,10 @@ namespace
bool getOverlineColorActive() const { return mbOverlineColor; }
void setOverlineColorActive(bool bNew) { if(bNew != mbOverlineColor) mbOverlineColor = bNew; }
- const Region& getRegion() const { return maRegion; }
- void setRegion(const Region& rRegion) { if(rRegion != maRegion) maRegion = rRegion; }
- bool getRegionActive() const { return mbRegion; }
- void setRegionActive(bool bNew) { if(bNew != mbRegion) mbRegion = bNew; }
+ const basegfx::B2DPolyPolygon& getClipPolyPolygon() const { return maClipPolyPoygon; }
+ void setClipPolyPolygon(const basegfx::B2DPolyPolygon& rNew) { if(rNew != maClipPolyPoygon) maClipPolyPoygon = rNew; }
+ bool getClipPolyPolygonActive() const { return mbClipPolyPolygonActive; }
+ void setClipPolyPolygonActive(bool bNew) { if(bNew != mbClipPolyPolygonActive) mbClipPolyPolygonActive = bNew; }
const Font& getFont() const { return maFont; }
void setFont(const Font& rFont) { if(rFont != maFont) maFont = rFont; }
@@ -235,6 +237,12 @@ namespace
return maPropertyHolders.size();
}
+ void PushDefault()
+ {
+ PropertyHolder* pNew = new PropertyHolder();
+ maPropertyHolders.push_back(pNew);
+ }
+
void Push(sal_uInt16 nPushFlags)
{
if(nPushFlags)
@@ -291,8 +299,8 @@ namespace
}
if(!(nPushFlags & PUSH_CLIPREGION ))
{
- pLast->setRegion(pTip->getRegion());
- pLast->setRegionActive(pTip->getRegionActive());
+ pLast->setClipPolyPolygon(pTip->getClipPolyPolygon());
+ pLast->setClipPolyPolygonActive(pTip->getClipPolyPolygonActive());
}
if(!(nPushFlags & PUSH_RASTEROP ))
{
@@ -336,11 +344,11 @@ namespace
}
}
}
-
- // execute the pop
- delete maPropertyHolders.back();
- maPropertyHolders.pop_back();
}
+
+ // execute the pop
+ delete maPropertyHolders.back();
+ maPropertyHolders.pop_back();
}
}
@@ -465,25 +473,18 @@ namespace
// the buffer to not delete them in the destructor.
aTargets.clear();
- if(xRetval.hasElements() && rPropertyHolder.getRegionActive())
+ if(xRetval.hasElements() && rPropertyHolder.getClipPolyPolygonActive())
{
- const Region& rRegion = rPropertyHolder.getRegion();
+ const basegfx::B2DPolyPolygon& rClipPolyPolygon = rPropertyHolder.getClipPolyPolygon();
- if(!rRegion.IsEmpty())
+ if(rClipPolyPolygon.count())
{
- basegfx::B2DPolyPolygon aClipPolyPolygon(getB2DPolyPolygonFromRegion(rRegion));
+ const drawinglayer::primitive2d::Primitive2DReference xMask(
+ new drawinglayer::primitive2d::MaskPrimitive2D(
+ rClipPolyPolygon,
+ xRetval));
- if(aClipPolyPolygon.count())
- {
- aClipPolyPolygon.transform(rPropertyHolder.getTransformation());
-
- const drawinglayer::primitive2d::Primitive2DReference xMask(
- new drawinglayer::primitive2d::MaskPrimitive2D(
- aClipPolyPolygon,
- xRetval));
-
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
- }
+ xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xMask, 1);
}
}
@@ -943,14 +944,17 @@ namespace
default : // case HATCH_SINGLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_SINGLE;
+ break;
}
case HATCH_DOUBLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_DOUBLE;
+ break;
}
case HATCH_TRIPLE :
{
aHatchStyle = drawinglayer::attribute::HATCHSTYLE_TRIPLE;
+ break;
}
}
@@ -969,53 +973,56 @@ namespace
a new target for embracing new geometry to the current region
*/
void HandleNewClipRegion(
- const Region* pRegion,
+ const basegfx::B2DPolyPolygon& rClipPolyPolygon,
TargetHolders& rTargetHolders,
PropertyHolders& rPropertyHolders)
{
- const bool bNewActive(pRegion && !pRegion->IsEmpty());
+ const bool bNewActive(rClipPolyPolygon.count());
- // #i108636# The handlig of new ClipRegions was not done as good as possible
- // in the first version of this interpreter; e.g. when a ClipRegion was set
+ // #i108636# The handlig of new ClipPolyPolygons was not done as good as possible
+ // in the first version of this interpreter; e.g. when a ClipPolyPolygon was set
// initially and then using a lot of push/pop actions, the pop always leads
- // to setting a 'new' ClipRegion which indeed is the return to the ClipRegion
+ // to setting a 'new' ClipPolyPolygon which indeed is the return to the ClipPolyPolygon
// of the properties next on the stack.
- // This ClipRegion is identical to the current one, so there is no need to
+ //
+ // This ClipPolyPolygon is identical to the current one, so there is no need to
// create a MaskPrimitive2D containing the up-to-now created primitives, but
// this was done before. While this does not lead to wrong primitive
// representations of the metafile data, it creates unneccesarily expensive
- // representations. Just detecting when no really 'new' ClipRegion gets set
+ // representations. Just detecting when no really 'new' ClipPolyPolygon gets set
// solves the problem.
- if(!rPropertyHolders.Current().getRegionActive() && !bNewActive)
+ if(!rPropertyHolders.Current().getClipPolyPolygonActive() && !bNewActive)
{
- // no active region exchanged by no new one, done
+ // no active ClipPolyPolygon exchanged by no new one, done
return;
}
- if(rPropertyHolders.Current().getRegionActive() && bNewActive)
+ if(rPropertyHolders.Current().getClipPolyPolygonActive() && bNewActive)
{
- // active region and new active region
- if(rPropertyHolders.Current().getRegion() == *pRegion)
+ // active ClipPolyPolygon and new active ClipPolyPolygon
+ if(rPropertyHolders.Current().getClipPolyPolygon() == rClipPolyPolygon)
{
- // new region is the same as the old region, done
+ // new is the same as old, done
return;
}
}
- // Here the old region and the new one are definitively different, maybe
+ // Here the old and the new are definitively different, maybe
// old one and/or new one is not active.
- // Handle deletion of old region.The process evtl. created primitives which
- // belong to this active region. These need to be embedded to a
+ // Handle deletion of old ClipPolyPolygon. The process evtl. created primitives which
+ // belong to this active ClipPolyPolygon. These need to be embedded to a
// MaskPrimitive2D accordingly.
- if(rPropertyHolders.Current().getRegionActive() && rTargetHolders.size() > 1)
+ if(rPropertyHolders.Current().getClipPolyPolygonActive() && rTargetHolders.size() > 1)
{
drawinglayer::primitive2d::Primitive2DSequence aSubContent;
- if(!rPropertyHolders.Current().getRegion().IsEmpty() && rTargetHolders.Current().size())
+ if(rPropertyHolders.Current().getClipPolyPolygon().count()
+ && rTargetHolders.Current().size())
{
- aSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
+ aSubContent = rTargetHolders.Current().getPrimitive2DSequence(
+ rPropertyHolders.Current());
}
rTargetHolders.Pop();
@@ -1030,11 +1037,11 @@ namespace
// apply new settings to current properties by setting
// the new region now
- rPropertyHolders.Current().setRegionActive(bNewActive);
+ rPropertyHolders.Current().setClipPolyPolygonActive(bNewActive);
if(bNewActive)
{
- rPropertyHolders.Current().setRegion(*pRegion);
+ rPropertyHolders.Current().setClipPolyPolygon(rClipPolyPolygon);
// prepare new content holder for new active region
rTargetHolders.Push();
@@ -2134,8 +2141,11 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence xSubContent;
{
rTargetHolders.Push();
+ // #i# for sub-Mteafile contents, do start with new, default render state
+ rPropertyHolders.PushDefault();
interpretMetafile(aGDIMetaFile, rTargetHolders, rPropertyHolders, rViewInformation);
xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
+ rPropertyHolders.Pop();
rTargetHolders.Pop();
}
@@ -2411,13 +2421,18 @@ namespace
if(pA->IsClipping())
{
- // new clipping
- HandleNewClipRegion(&pA->GetRegion(), rTargetHolders, rPropertyHolders);
+ // new clipping. Get PolyPolygon and transform with current transformation
+ basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(pA->GetRegion()));
+
+ aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation());
+ HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
else
{
// end clipping
- HandleNewClipRegion(0, rTargetHolders, rPropertyHolders);
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
break;
@@ -2431,49 +2446,60 @@ namespace
if(rRectangle.IsEmpty())
{
// intersect with empty rectangle will always give empty
- // region; start new clipping with empty region
- const Region aNewRegion;
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // ClipPolyPolygon; start new clipping with empty PolyPolygon
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
else
{
- if(rPropertyHolders.Current().getRegionActive())
+ // create transformed ClipRange
+ basegfx::B2DRange aClipRange(
+ rRectangle.Left(), rRectangle.Top(),
+ rRectangle.Right(), rRectangle.Bottom());
+
+ aClipRange.transform(rPropertyHolders.Current().getTransformation());
+
+ if(rPropertyHolders.Current().getClipPolyPolygonActive())
{
- if(rPropertyHolders.Current().getRegion().IsEmpty())
+ if(0 == rPropertyHolders.Current().getClipPolyPolygon().count())
{
- // nothing to do, empty active clip region will stay
+ // nothing to do, empty active clipPolyPolygon will stay
// empty when intersecting
}
else
{
- // AND existing region and new rectangle
+ // AND existing region and new ClipRange
const basegfx::B2DPolyPolygon aOriginalPolyPolygon(
- getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion()));
+ rPropertyHolders.Current().getClipPolyPolygon());
basegfx::B2DPolyPolygon aClippedPolyPolygon;
if(aOriginalPolyPolygon.count())
{
- const basegfx::B2DRange aIntersectRange(
- rRectangle.Left(), rRectangle.Top(),
- rRectangle.Right(), rRectangle.Bottom());
-
aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(
- aOriginalPolyPolygon, aIntersectRange, true, false);
+ aOriginalPolyPolygon,
+ aClipRange,
+ true,
+ false);
}
if(aClippedPolyPolygon != aOriginalPolyPolygon)
{
// start new clipping with intersected region
- const Region aNewRegion(aClippedPolyPolygon);
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ HandleNewClipRegion(
+ aClippedPolyPolygon,
+ rTargetHolders,
+ rPropertyHolders);
}
}
}
else
{
- // start new clipping with rectangle
- const Region aNewRegion(rRectangle);
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // start new clipping with ClipRange
+ const basegfx::B2DPolyPolygon aNewClipPolyPolygon(
+ basegfx::tools::createPolygonFromRect(aClipRange));
+
+ HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
@@ -2488,50 +2514,48 @@ namespace
if(rNewRegion.IsEmpty())
{
// intersect with empty region will always give empty
- // region; start new clipping with empty region
- const Region aNewRegion;
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // region; start new clipping with empty PolyPolygon
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
else
{
- if(rPropertyHolders.Current().getRegionActive())
+ // get new ClipPolyPolygon, transform it with current transformation
+ basegfx::B2DPolyPolygon aNewClipPolyPolygon(getB2DPolyPolygonFromRegion(rNewRegion));
+ aNewClipPolyPolygon.transform(rPropertyHolders.Current().getTransformation());
+
+ if(rPropertyHolders.Current().getClipPolyPolygonActive())
{
- if(rPropertyHolders.Current().getRegion().IsEmpty())
+ if(0 == rPropertyHolders.Current().getClipPolyPolygon().count())
{
- // nothing to do, empty active clip region will stay empty
+ // nothing to do, empty active clipPolyPolygon will stay empty
// when intersecting with any region
}
else
{
// AND existing and new region
const basegfx::B2DPolyPolygon aOriginalPolyPolygon(
- getB2DPolyPolygonFromRegion(rPropertyHolders.Current().getRegion()));
+ rPropertyHolders.Current().getClipPolyPolygon());
basegfx::B2DPolyPolygon aClippedPolyPolygon;
if(aOriginalPolyPolygon.count())
{
- const basegfx::B2DPolyPolygon aClipPolyPolygon(
- getB2DPolyPolygonFromRegion(rNewRegion));
-
- if(aClipPolyPolygon.count())
- {
- aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
- aOriginalPolyPolygon, aClipPolyPolygon, true, false);
- }
+ aClippedPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
+ aOriginalPolyPolygon, aNewClipPolyPolygon, true, false);
}
if(aClippedPolyPolygon != aOriginalPolyPolygon)
{
- // start new clipping with intersected region
- const Region aNewRegion(aClippedPolyPolygon);
- HandleNewClipRegion(&aNewRegion, rTargetHolders, rPropertyHolders);
+ // start new clipping with intersected ClipPolyPolygon
+ HandleNewClipRegion(aClippedPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
}
else
{
- // start new clipping with new region
- HandleNewClipRegion(&rNewRegion, rTargetHolders, rPropertyHolders);
+ // start new clipping with new ClipPolyPolygon
+ HandleNewClipRegion(aNewClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
@@ -2542,24 +2566,31 @@ namespace
/** CHECKED, WORKS WELL */
const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*)pAction;
- if(rPropertyHolders.Current().getRegionActive())
+ if(rPropertyHolders.Current().getClipPolyPolygonActive())
{
- if(rPropertyHolders.Current().getRegion().IsEmpty())
+ if(0 == rPropertyHolders.Current().getClipPolyPolygon().count())
{
// nothing to do
}
else
{
- // move using old interface
- Region aRegion(rPropertyHolders.Current().getRegion());
-
const sal_Int32 nHor(pA->GetHorzMove());
const sal_Int32 nVer(pA->GetVertMove());
if(0 != nHor || 0 != nVer)
{
- aRegion.Move(nHor, nVer);
- HandleNewClipRegion(&aRegion, rTargetHolders, rPropertyHolders);
+ // prepare translation, add current transformation
+ basegfx::B2DVector aVector(pA->GetHorzMove(), pA->GetVertMove());
+ aVector *= rPropertyHolders.Current().getTransformation();
+ basegfx::B2DHomMatrix aTransform(
+ basegfx::tools::createTranslateB2DHomMatrix(aVector));
+
+ // transform existing region
+ basegfx::B2DPolyPolygon aClipPolyPolygon(
+ rPropertyHolders.Current().getClipPolyPolygon());
+
+ aClipPolyPolygon.transform(aTransform);
+ HandleNewClipRegion(aClipPolyPolygon, rTargetHolders, rPropertyHolders);
}
}
}
@@ -2764,10 +2795,12 @@ namespace
const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION);
const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP);
- if(bRegionMayChange && rPropertyHolders.Current().getRegionActive())
+ if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
{
// end evtl. clipping
- HandleNewClipRegion(0, rTargetHolders, rPropertyHolders);
+ const basegfx::B2DPolyPolygon aEmptyPolyPolygon;
+
+ HandleNewClipRegion(aEmptyPolyPolygon, rTargetHolders, rPropertyHolders);
}
if(bRasterOpMayChange && rPropertyHolders.Current().isRasterOpActive())
@@ -2784,10 +2817,11 @@ namespace
HandleNewRasterOp(rPropertyHolders.Current().getRasterOp(), rTargetHolders, rPropertyHolders);
}
- if(bRegionMayChange && rPropertyHolders.Current().getRegionActive())
+ if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
{
// start evtl. clipping
- HandleNewClipRegion(&rPropertyHolders.Current().getRegion(), rTargetHolders, rPropertyHolders);
+ HandleNewClipRegion(
+ rPropertyHolders.Current().getClipPolyPolygon(), rTargetHolders, rPropertyHolders);
}
break;
@@ -2935,8 +2969,11 @@ namespace
drawinglayer::primitive2d::Primitive2DSequence xSubContent;
{
rTargetHolders.Push();
+ // #i# for sub-Mteafile contents, do start with new, default render state
+ rPropertyHolders.PushDefault();
interpretMetafile(rContent, rTargetHolders, rPropertyHolders, rViewInformation);
xSubContent = rTargetHolders.Current().getPrimitive2DSequence(rPropertyHolders.Current());
+ rPropertyHolders.Pop();
rTargetHolders.Pop();
}
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 0bc1b57113b8..983cc8f58d4f 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1225,17 +1225,16 @@ namespace drawinglayer
{
// need to handle PolyPolygonHatchPrimitive2D here to support XPATHFILL_SEQ_BEGIN/XPATHFILL_SEQ_END
SvtGraphicFill* pSvtGraphicFill = 0;
+ const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate);
+ const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
+ aLocalPolyPolygon.transform(maCurrentTransformation);
if(!mnSvtGraphicFillCount)
{
- const primitive2d::PolyPolygonHatchPrimitive2D& rHatchCandidate = static_cast< const primitive2d::PolyPolygonHatchPrimitive2D& >(rCandidate);
- basegfx::B2DPolyPolygon aLocalPolyPolygon(rHatchCandidate.getB2DPolyPolygon());
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
if(aLocalPolyPolygon.count())
{
// re-create a VCL hatch as base data
- const attribute::FillHatchAttribute& rFillHatchAttribute = rHatchCandidate.getFillHatch();
SvtGraphicFill::HatchType eHatch(SvtGraphicFill::hatchSingle);
switch(rFillHatchAttribute.getStyle())
@@ -1289,9 +1288,22 @@ namespace drawinglayer
// Do use decomposition; encapsulate with SvtGraphicFill
impStartSvtGraphicFill(pSvtGraphicFill);
- process(rCandidate.get2DDecomposition(getViewInformation2D()));
- impEndSvtGraphicFill(pSvtGraphicFill);
+ // #i111954# do NOT use decomposition, but use direct VCL-command
+ // process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ const PolyPolygon aToolsPolyPolygon(aLocalPolyPolygon);
+ const HatchStyle aHatchStyle(
+ attribute::HATCHSTYLE_SINGLE == rFillHatchAttribute.getStyle() ? HATCH_SINGLE :
+ attribute::HATCHSTYLE_DOUBLE == rFillHatchAttribute.getStyle() ? HATCH_DOUBLE :
+ HATCH_TRIPLE);
+
+ mpOutputDevice->DrawHatch(aToolsPolyPolygon,
+ Hatch(aHatchStyle,
+ Color(rFillHatchAttribute.getColor()),
+ basegfx::fround(rFillHatchAttribute.getDistance()),
+ basegfx::fround(rFillHatchAttribute.getAngle() / F_PI1800)));
+
+ impEndSvtGraphicFill(pSvtGraphicFill);
break;
}
case PRIMITIVE2D_ID_POLYPOLYGONGRADIENTPRIMITIVE2D :
@@ -1429,7 +1441,11 @@ namespace drawinglayer
{
// there is already a clip polygon set; build clipped union of
// current mask polygon and new one
- maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(aMask, maClipPolyPolygon, false, false);
+ maClipPolyPolygon = basegfx::tools::clipPolyPolygonOnPolyPolygon(
+ aMask,
+ maClipPolyPolygon,
+ true, // #i106516# we want the inside of aMask, not the outside
+ false);
}
else
{
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index a1b1393a2fac..6a280fcad95e 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -284,20 +284,37 @@ namespace drawinglayer
if(bAllowUsingDrawTransparent && 1 == rContent.getLength())
{
const primitive2d::Primitive2DReference xReference(rContent[0]);
- const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = dynamic_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(xReference.get());
+ const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get());
- if(pPoPoColor && PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D == pPoPoColor->getPrimitive2DID())
+ if(pBasePrimitive)
{
- // single transparent PolyPolygon identified, use directly
- const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor()));
- mpOutputDevice->SetFillColor(Color(aPolygonColor));
- mpOutputDevice->SetLineColor();
-
- basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon());
- aLocalPolyPolygon.transform(maCurrentTransformation);
-
- mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence());
- bDrawTransparentUsed = true;
+ switch(pBasePrimitive->getPrimitive2DID())
+ {
+ case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D:
+ {
+ // single transparent PolyPolygon identified, use directly
+ const primitive2d::PolyPolygonColorPrimitive2D* pPoPoColor = static_cast< const primitive2d::PolyPolygonColorPrimitive2D* >(pBasePrimitive);
+ OSL_ENSURE(pPoPoColor, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(pPoPoColor->getBColor()));
+ mpOutputDevice->SetFillColor(Color(aPolygonColor));
+ mpOutputDevice->SetLineColor();
+
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(pPoPoColor->getB2DPolyPolygon());
+ aLocalPolyPolygon.transform(maCurrentTransformation);
+
+ mpOutputDevice->DrawTransparent(aLocalPolyPolygon, rUniTransparenceCandidate.getTransparence());
+ bDrawTransparentUsed = true;
+ break;
+ }
+ // #i# need to wait for #i101378# which is in CWS vcl112 to directly paint transparent hairlines
+ //case PRIMITIVE2D_ID_POLYGONHAIRLINEPRIMITIVE2D:
+ //{
+ // // single transparent PolygonHairlinePrimitive2D identified, use directly
+ // const primitive2d::PolygonHairlinePrimitive2D* pPoHair = static_cast< const primitive2d::PolygonHairlinePrimitive2D* >(pBasePrimitive);
+ // OSL_ENSURE(pPoHair, "OOps, PrimitiveID and PrimitiveType do not match (!)");
+ // break;
+ //}
+ }
}
}
@@ -469,19 +486,29 @@ namespace drawinglayer
// This is wrong in principle, but looks nicer. This could also be done here directly
// without VCL usage if needed
const primitive2d::FillHatchPrimitive2D& rFillHatchPrimitive = static_cast< const primitive2d::FillHatchPrimitive2D& >(rCandidate);
+ const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch();
// create hatch polygon in range size and discrete coordinates
basegfx::B2DRange aHatchRange(rFillHatchPrimitive.getObjectRange());
aHatchRange.transform(maCurrentTransformation);
const basegfx::B2DPolygon aHatchPolygon(basegfx::tools::createPolygonFromRect(aHatchRange));
+ if(rFillHatchAttributes.isFillBackground())
+ {
+ // #i111846# background fill is active; draw fill polygon
+ const basegfx::BColor aPolygonColor(maBColorModifierStack.getModifiedColor(rFillHatchPrimitive.getBColor()));
+
+ mpOutputDevice->SetFillColor(Color(aPolygonColor));
+ mpOutputDevice->SetLineColor();
+ mpOutputDevice->DrawPolygon(aHatchPolygon);
+ }
+
// set hatch line color
const basegfx::BColor aHatchColor(maBColorModifierStack.getModifiedColor(rFillHatchPrimitive.getBColor()));
mpOutputDevice->SetFillColor();
mpOutputDevice->SetLineColor(Color(aHatchColor));
// get hatch style
- const attribute::FillHatchAttribute& rFillHatchAttributes = rFillHatchPrimitive.getFillHatch();
HatchStyle eHatchStyle(HATCH_SINGLE);
switch(rFillHatchAttributes.getStyle())
diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx
index 2abbcaa9f83f..9e0c0674ea66 100644
--- a/drawinglayer/source/processor3d/shadow3dextractor.cxx
+++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx
@@ -51,6 +51,25 @@ namespace drawinglayer
{
namespace processor3d
{
+ /// helper to convert from BasePrimitive2DVector to primitive2d::Primitive2DSequence
+ const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequenceFromBasePrimitive2DVector(
+ const BasePrimitive2DVector& rVector) const
+ {
+ const sal_uInt32 nCount(rVector.size());
+ primitive2d::Primitive2DSequence aRetval(nCount);
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ aRetval[a] = rVector[a];
+ }
+
+ // all entries taken over; no need to delete entries, just reset to
+ // mark as empty
+ const_cast< BasePrimitive2DVector& >(rVector).clear();
+
+ return aRetval;
+ }
+
// as tooling, the process() implementation takes over API handling and calls this
// virtual render method when the primitive implementation is BasePrimitive3D-based.
void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
@@ -64,8 +83,8 @@ namespace drawinglayer
const primitive3d::ShadowPrimitive3D& rPrimitive = static_cast< const primitive3d::ShadowPrimitive3D& >(rCandidate);
// set new target
- primitive2d::Primitive2DSequence aNewSubList;
- primitive2d::Primitive2DSequence* pLastTargetSequence = mpPrimitive2DSequence;
+ BasePrimitive2DVector aNewSubList;
+ BasePrimitive2DVector* pLastTargetSequence = mpPrimitive2DSequence;
mpPrimitive2DSequence = &aNewSubList;
// activate convert
@@ -84,21 +103,26 @@ namespace drawinglayer
mbConvert = bLastConvert;
mpPrimitive2DSequence = pLastTargetSequence;
- // create 2d shadow primitive with result
- const primitive2d::Primitive2DReference xRef(new primitive2d::ShadowPrimitive2D(rPrimitive.getShadowTransform(), rPrimitive.getShadowColor(), aNewSubList));
+ // create 2d shadow primitive with result. This also fetches all entries
+ // from aNewSubList, so there is no need to delete them
+ primitive2d::BasePrimitive2D* pNew = new primitive2d::ShadowPrimitive2D(
+ rPrimitive.getShadowTransform(),
+ rPrimitive.getShadowColor(),
+ getPrimitive2DSequenceFromBasePrimitive2DVector(aNewSubList));
if(basegfx::fTools::more(rPrimitive.getShadowTransparence(), 0.0))
{
// create simpleTransparencePrimitive, add created primitives
- const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1L);
- const primitive2d::Primitive2DReference xRef2(new primitive2d::UnifiedTransparencePrimitive2D(aNewTransPrimitiveVector, rPrimitive.getShadowTransparence()));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef2);
- }
- else
- {
- // add directly
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef);
+ const primitive2d::Primitive2DReference xRef(pNew);
+ const primitive2d::Primitive2DSequence aNewTransPrimitiveVector(&xRef, 1);
+
+ pNew = new primitive2d::UnifiedTransparencePrimitive2D(
+ aNewTransPrimitiveVector,
+ rPrimitive.getShadowTransparence());
}
+
+ mpPrimitive2DSequence->push_back(pNew);
+
break;
}
case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D :
@@ -161,8 +185,10 @@ namespace drawinglayer
if(a2DHairline.count())
{
a2DHairline.transform(getObjectTransformation());
- const primitive2d::Primitive2DReference xRef(new primitive2d::PolygonHairlinePrimitive2D(a2DHairline, maPrimitiveColor));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef);
+ mpPrimitive2DSequence->push_back(
+ new primitive2d::PolygonHairlinePrimitive2D(
+ a2DHairline,
+ maPrimitiveColor));
}
}
break;
@@ -190,8 +216,10 @@ namespace drawinglayer
if(a2DFill.count())
{
a2DFill.transform(getObjectTransformation());
- const primitive2d::Primitive2DReference xRef(new primitive2d::PolyPolygonColorPrimitive2D(a2DFill, maPrimitiveColor));
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(*mpPrimitive2DSequence, xRef);
+ mpPrimitive2DSequence->push_back(
+ new primitive2d::PolyPolygonColorPrimitive2D(
+ a2DFill,
+ maPrimitiveColor));
}
}
break;
@@ -251,6 +279,16 @@ namespace drawinglayer
}
}
+ Shadow3DExtractingProcessor::~Shadow3DExtractingProcessor()
+ {
+ OSL_ENSURE(0 == maPrimitive2DSequence.size(),
+ "OOps, someone used Shadow3DExtractingProcessor, but did not fetch the results (!)");
+ for(sal_uInt32 a(0); a < maPrimitive2DSequence.size(); a++)
+ {
+ delete maPrimitive2DSequence[a];
+ }
+ }
+
basegfx::B2DPolygon Shadow3DExtractingProcessor::impDoShadowProjection(const basegfx::B3DPolygon& rSource)
{
basegfx::B2DPolygon aRetval;
@@ -291,6 +329,12 @@ namespace drawinglayer
return aRetval;
}
+
+ const primitive2d::Primitive2DSequence Shadow3DExtractingProcessor::getPrimitive2DSequence() const
+ {
+ return getPrimitive2DSequenceFromBasePrimitive2DVector(maPrimitive2DSequence);
+ }
+
} // end of namespace processor3d
} // end of namespace drawinglayer
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index 326b9d392999..b06718d01ccb 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -487,7 +487,7 @@ private:
boost::shared_ptr< drawinglayer::texture::GeoTexSvx > mpTransparenceGeoTexSvx;
drawinglayer::attribute::MaterialAttribute3D maMaterial;
basegfx::B3DPolyPolygon maPolyPolygon;
- sal_uInt32 mfCenterZ;
+ double mfCenterZ;
// bitfield
bool mbModulate : 1;
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 3d9afded321f..84f4802e7b44 100644..100755
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -232,6 +232,7 @@ public:
ESelection WordRight( const ESelection& rSelection, USHORT nWordType ) const;
ESelection CursorLeft( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
ESelection CursorRight( const ESelection& rSelection, USHORT nCharacterIteratorMode ) const;
+ ESelection SelectSentence( const ESelection& rCurSel ) const;
void Clear();
void SetText( const String& rStr );
@@ -396,7 +397,7 @@ public:
// put spell position to start of current sentence
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
- void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
//deinitialize sentence spelling
void EndSpelling();
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index a4efc98674fc..d167d2a30f8f 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -1023,7 +1023,7 @@ public:
// put spell position to start of current sentence
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
- void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
void EndSpelling();
/** sets a link that is called at the beginning of a drag operation at an edit view */
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 8621f173c250..1b61a405dc18 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -813,6 +813,14 @@ ESelection EditEngine::CursorRight( const ESelection& rSelection, USHORT nCharac
return pE->pImpEditEngine->CreateESel( aSel );
}
+ESelection EditEngine::SelectSentence( const ESelection& rCurSel ) const
+{
+ EditEngine* pE = (EditEngine*)this;
+ EditSelection aCurSel( pE->pImpEditEngine->CreateSel( rCurSel ) );
+ EditSelection aSentenceSel( pE->pImpEditEngine->SelectSentence( aCurSel ) );
+ return pE->pImpEditEngine->CreateESel( aSentenceSel );
+}
+
sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView )
{
DBG_CHKTHIS( EditEngine, 0 );
@@ -2198,7 +2206,7 @@ void EditEngine::EndSpelling()
bool EditEngine::SpellSentence(EditView& rView, ::svx::SpellPortions& rToFill, bool bIsGrammarChecking )
{
DBG_CHKTHIS( EditEngine, 0 );
- return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking );
+ return pImpEditEngine->SpellSentence( rView, rToFill, bIsGrammarChecking );
}
/*-- 08.09.2008 11:38:32---------------------------------------------------
@@ -2211,10 +2219,10 @@ void EditEngine::PutSpellingToSentenceStart( EditView& rEditView )
/*-- 13.10.2003 16:43:27---------------------------------------------------
-----------------------------------------------------------------------*/
-void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking )
+void EditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck )
{
DBG_CHKTHIS( EditEngine, 0 );
- pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bIsGrammarChecking );
+ pImpEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck );
}
sal_Bool EditEngine::HasConvertibleTextPortion( LanguageType nLang )
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index de4a2673829e..642b5e0d9f17 100644..100755
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -40,6 +40,7 @@
#include <svl/languageoptions.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/langtab.hxx>
+#include <svtools/filter.hxx>
#include <svl/srchitem.hxx>
@@ -62,6 +63,8 @@
#include <editeng/acorrcfg.hxx>
#include <editeng/unolingu.hxx>
#include <editeng/fontitem.hxx>
+#include <unotools/lingucfg.hxx>
+#include <osl/file.hxx>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/beans/PropertyValues.hdl>
@@ -71,6 +74,8 @@
#include <vcl/settings.hxx>
#include <unotools/lingucfg.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
using ::rtl::OUString;
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -1004,6 +1009,26 @@ sal_Bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, sal_Bool bMa
return pImpEditView->IsWrongSpelledWord( aPaM , bMarkIfWrong );
}
+
+static Image lcl_GetImageFromPngUrl( const OUString &rFileUrl )
+{
+ Image aRes;
+ OUString aTmp;
+ osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
+// ::rtl::OString aPath = OString( aTmp.getStr(), aTmp.getLength(), osl_getThreadTextEncoding() );
+#if defined(WNT)
+// aTmp = lcl_Win_GetShortPathName( aTmp );
+#endif
+ Graphic aGraphic;
+ const String aFilterName( RTL_CONSTASCII_USTRINGPARAM( IMP_PNG ) );
+ if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic ) )
+ {
+ aRes = Image( aGraphic.GetBitmapEx() );
+ }
+ return aRes;
+}
+
+
void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
{
#ifndef SVX_LIGHT
@@ -1114,25 +1139,54 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack )
else
aPopupMenu.RemoveItem( MN_AUTOCORR ); // Loeschen?
- Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
+ SvtLinguConfig aCfg;
+ const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ Reference< XDictionaryList > xDicList( SvxGetDictionaryList() );
Sequence< Reference< XDictionary > > aDics;
+ const Reference< XDictionary > *pDic = NULL;
if (xDicList.is())
- aDics = xDicList->getDictionaries();
- const Reference< XDictionary > *pDic = aDics.getConstArray();
- sal_uInt16 nLanguage = PIMPEE->GetLanguage( aPaM2 );
- sal_uInt16 nDicCount = (USHORT)aDics.getLength();
- for ( sal_uInt16 i = 0; i < nDicCount; i++ )
{
- Reference< XDictionary > xDic( pDic[i], UNO_QUERY );
+ // add the default positive dictionary to dic-list (if not already done).
+ // This is to ensure that there is at least one dictionary to which
+ // words could be added.
+ uno::Reference< linguistic2::XDictionary > xDic( SvxGetOrCreatePosDic( xDicList ) );
if (xDic.is())
+ xDic->setActive( sal_True );
+
+ aDics = xDicList->getDictionaries();
+ pDic = aDics.getConstArray();
+ sal_uInt16 nCheckedLanguage = PIMPEE->GetLanguage( aPaM2 );
+ sal_uInt16 nDicCount = (USHORT)aDics.getLength();
+ for (sal_uInt16 i = 0; i < nDicCount; i++)
{
- sal_uInt16 nActLanguage = SvxLocaleToLanguage( xDic->getLocale() );
- if( xDic->isActive() &&
- xDic->getDictionaryType() == DictionaryType_POSITIVE &&
- (nLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage ) )
+ uno::Reference< linguistic2::XDictionary > xDicTmp( pDic[i], uno::UNO_QUERY );
+ if (!xDicTmp.is() || SvxGetIgnoreAllList() == xDicTmp)
+ continue;
+
+ uno::Reference< frame::XStorable > xStor( xDicTmp, uno::UNO_QUERY );
+ LanguageType nActLanguage = SvxLocaleToLanguage( xDicTmp->getLocale() );
+ if( xDicTmp->isActive()
+ && xDicTmp->getDictionaryType() != linguistic2::DictionaryType_NEGATIVE
+ && (nCheckedLanguage == nActLanguage || LANGUAGE_NONE == nActLanguage )
+ && (!xStor.is() || !xStor->isReadonly()) )
{
- pInsertMenu->InsertItem( MN_DICTSTART + i, xDic->getName() );
+ // the extra 1 is because of the (possible) external
+ // linguistic entry above
+ USHORT nPos = MN_DICTSTART + i;
+ pInsertMenu->InsertItem( nPos, xDicTmp->getName() );
+
+ uno::Reference< lang::XServiceInfo > xSvcInfo( xDicTmp, uno::UNO_QUERY );
+ if (xSvcInfo.is())
+ {
+ OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
+ xSvcInfo->getImplementationName(), bHC) );
+ if (aDictionaryImageUrl.getLength() > 0)
+ {
+ Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
+ pInsertMenu->SetItemImage( nPos, aImage );
+ }
+ }
}
}
}
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index fed1394e5fd0..f01381a4ae62 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -208,6 +208,9 @@ void EditSpellWrapper::CheckSpellTo()
pSpellInfo->aSpellTo.nIndex = aPaM.GetNode()->Len();
}
}
+
+//////////////////////////////////////////////////////////////////////
+
SV_IMPL_VARARR( WrongRanges, WrongRange );
WrongList::WrongList()
@@ -220,6 +223,14 @@ WrongList::~WrongList()
{
}
+void WrongList::MarkInvalid( USHORT nS, USHORT nE )
+{
+ if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) )
+ nInvalidStart = nS;
+ if ( nInvalidEnd < nE )
+ nInvalidEnd = nE;
+}
+
void WrongList::TextInserted( sal_uInt16 nPos, sal_uInt16 nNew, sal_Bool bPosIsSep )
{
if ( !IsInvalid() )
@@ -527,6 +538,7 @@ sal_Bool WrongList::DbgIsBuggy() const
}
#endif
+//////////////////////////////////////////////////////////////////////
EdtAutoCorrDoc::EdtAutoCorrDoc( ImpEditEngine* pE, ContentNode* pN,
sal_uInt16 nCrsr, xub_Unicode cIns )
diff --git a/editeng/source/editeng/edtspell.hxx b/editeng/source/editeng/edtspell.hxx
index cfe0aaf57e87..851848c5ede0 100644
--- a/editeng/source/editeng/edtspell.hxx
+++ b/editeng/source/editeng/edtspell.hxx
@@ -97,13 +97,7 @@ public:
BOOL IsInvalid() const { return nInvalidStart != NOT_INVALID; }
void SetValid() { nInvalidStart = NOT_INVALID; nInvalidEnd = 0; }
- void MarkInvalid( USHORT nS, USHORT nE )
- {
- if ( ( nInvalidStart == NOT_INVALID ) || ( nInvalidStart > nS ) )
- nInvalidStart = nS;
- if ( nInvalidEnd < nE )
- nInvalidEnd = nE;
- }
+ void MarkInvalid( USHORT nS, USHORT nE );
USHORT Count() const { return WrongRanges::Count(); }
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index b327d2a685bd..9ac7de8e2b7d 100644..100755
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1489,7 +1489,7 @@ void ImpEditView::HideDDCursor()
void ImpEditView::ShowDDCursor( const Rectangle& rRect )
{
- if ( !pDragAndDropInfo->bVisCursor )
+ if ( pDragAndDropInfo && !pDragAndDropInfo->bVisCursor )
{
if ( pOutWin->GetCursor() )
pOutWin->GetCursor()->Hide();
@@ -1544,6 +1544,8 @@ void ImpEditView::dragGestureRecognized( const ::com::sun::star::datatransfer::d
vos::OGuard aVclGuard( Application::GetSolarMutex() );
+ pDragAndDropInfo = NULL;
+
Point aMousePosPixel( rDGE.DragOriginX, rDGE.DragOriginY );
EditSelection aCopySel( GetEditSelection() );
@@ -1717,7 +1719,7 @@ void ImpEditView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDro
DBG_ASSERT( pDragAndDropInfo, "Drop - No Drag&Drop info?!" );
- if ( pDragAndDropInfo->bDragAccepted )
+ if ( pDragAndDropInfo && pDragAndDropInfo->bDragAccepted )
{
pEditEngine->GetBeginDropHdl().Call(GetEditViewPtr());
BOOL bChanges = FALSE;
@@ -1817,7 +1819,7 @@ void ImpEditView::dragExit( const ::com::sun::star::datatransfer::dnd::DropTarge
HideDDCursor();
- if ( !pDragAndDropInfo->bStarterOfDD )
+ if ( pDragAndDropInfo && !pDragAndDropInfo->bStarterOfDD )
{
delete pDragAndDropInfo;
pDragAndDropInfo = NULL;
@@ -1837,7 +1839,7 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
{
// sal_Int8 nSupportedActions = bReadOnly ? datatransfer::dnd::DNDConstants::ACTION_COPY : datatransfer::dnd::DNDConstants::ACTION_COPY_OR_MOVE;
- if ( pDragAndDropInfo->bHasValidData /* && ( nSupportedActions & rDTDE.DropAction ) MT: Default = 0x80 ?! */ )
+ if ( pDragAndDropInfo && pDragAndDropInfo->bHasValidData /* && ( nSupportedActions & rDTDE.DropAction ) MT: Default = 0x80 ?! */ )
{
bAccept = sal_True;
@@ -1957,7 +1959,8 @@ void ImpEditView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTarge
if ( !bAccept )
{
HideDDCursor();
- pDragAndDropInfo->bDragAccepted = FALSE;
+ if (pDragAndDropInfo)
+ pDragAndDropInfo->bDragAccepted = FALSE;
rDTDE.Context->rejectDrag();
}
}
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 3bacfc949e3b..ede5acacc698 100644..100755
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -164,6 +164,7 @@ struct SpellInfo
EESpellState eState;
EPaM aSpellStart;
EPaM aSpellTo;
+ EditPaM aCurSentenceStart;
sal_Bool bSpellToEnd;
sal_Bool bMultipleDoc;
::svx::SpellPortions aLastSpellPortions;
@@ -697,6 +698,8 @@ private:
*/
void ImplFillTextMarkingVector(const ::com::sun::star::lang::Locale& rLocale, EEngineData::TextMarkingVector& rTextMarkingVector, const String& rTxt, const USHORT nIdx, const USHORT nLen) const;
+ SpellInfo * CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs );
+
protected:
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
@@ -953,7 +956,7 @@ public:
//put spelling back to start of current sentence - needed after switch of grammar support
void PutSpellingToSentenceStart( EditView& rEditView );
//applies a changed sentence
- void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking );
+ void ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck );
//deinitialize sentence spelling
void EndSpelling();
//adds one or more portions of text to the SpellPortions depending on language changes
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index bbdfa47e6a57..778942730e71 100644..100755
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2755,6 +2755,11 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
EditPaM aCurPaM( aPaM ); // fuers Invalidieren
+ // get word boundaries in order to clear possible WrongList entries
+ // and invalidate all the necessary text (everything after and including the
+ // start of the word)
+ EditSelection aCurWord( SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD ) );
+
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
SfxVoidItem aTabItem( EE_FEATURE_TAB );
@@ -2809,7 +2814,13 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
}
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
DBG_ASSERT( pPortion, "Blinde Portion in InsertText" );
- pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
+
+ // now remove the Wrongs (red spell check marks) from both words...
+ WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
+ if (pWrongs && pWrongs->HasWrongs())
+ pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
+ // ... and mark both words as 'to be checked again'
+ pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
}
if ( nEnd < aText.Len() )
aPaM = ImpInsertParaBreak( aPaM );
@@ -4198,7 +4209,18 @@ long ImpEditEngine::GetXPos( ParaPortion* pParaPortion, EditLine* pLine, USHORT
DBG_ERROR("svx::ImpEditEngine::GetXPos(), index out of range!");
}
+#if 0
long nPosInPortion = pLine->GetCharPosArray().GetObject( nPos );
+#else
+ // #i74188# (positioning the cursor after deleting components of combined indic characters)
+ SvxFont aTmpFont( pParaPortion->GetNode()->GetCharAttribs().GetDefFont() );
+ SeekCursor( pParaPortion->GetNode(), nPos+1, aTmpFont );
+ aTmpFont.SetPhysFont( GetRefDevice() );
+ ImplInitDigitMode( GetRefDevice(), 0, 0, 0, aTmpFont.GetLanguage() );
+ String sSegment(*pParaPortion->GetNode(), pLine->GetStart(), nPos+1);
+ long nPosInPortion = aTmpFont.QuickGetTextSize( GetRefDevice(),
+ sSegment, 0, nPos+1, NULL ).Width();
+#endif
if ( !pPortion->IsRightToLeft() )
{
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index dbc6767d1f91..08f50a0da884 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3613,7 +3613,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRec, sal_Bool b
ContentNode* pNode = GetEditDoc().SaveGetObject( 0 );
SeekCursor( pNode, 1, aTmpFont );
Color aFontColor( aTmpFont.GetColor() );
- if( aFontColor == COL_AUTO )
+ if( (aFontColor == COL_AUTO) || IsForceAutoColor() )
aFontColor = GetAutoColor();
// #i69346# check for reverse color of input method attribute
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index c45c6faf2b6a..482cd6d71338 100644..100755
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1455,6 +1455,23 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller()
return xSpeller;
}
+
+SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs )
+{
+ pSpellInfo = new SpellInfo;
+ pSpellInfo->bMultipleDoc = bMultipleDocs;
+ EditSelection aSentenceSel( SelectSentence( rSel ) );
+// pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
+// pSpellInfo->aSpellTo = CreateEPaM( rSel.HasRange()? aSentenceSel.Max() : aSentenceSel.Min() );
+ // always spell draw objects completely, startting at the top.
+ // (spelling in only a selection or not starting with the top requires
+ // further changes elsewehe to work properly)
+ pSpellInfo->aSpellStart = EPaM();
+ pSpellInfo->aSpellTo = EPaM( EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND );
+ return pSpellInfo;
+}
+
+
EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
{
#ifdef SVX_LIGHT
@@ -1475,9 +1492,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, sal_Bool bMultipleDoc )
}
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
- pSpellInfo = new SpellInfo;
- pSpellInfo->bMultipleDoc = bMultipleDoc;
- pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() );
+ pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc );
sal_Bool bIsStart = sal_False;
if ( bMultipleDoc )
@@ -1945,11 +1960,9 @@ void ImpEditEngine::EndSpelling()
void ImpEditEngine::StartSpelling(EditView& rEditView, sal_Bool bMultipleDoc)
{
DBG_ASSERT(!pSpellInfo, "pSpellInfo already set?");
- pSpellInfo = new SpellInfo;
- pSpellInfo->bMultipleDoc = bMultipleDoc;
rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() );
+ pSpellInfo = CreateSpellInfo( aCurSel, bMultipleDoc );
}
/*-- 13.10.2003 16:43:27---------------------------------------------------
Search for the next wrong word within the given selection
@@ -2002,33 +2015,31 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
/*-- 13.10.2003 16:43:27---------------------------------------------------
-----------------------------------------------------------------------*/
-bool ImpEditEngine::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rToFill, bool /*bIsGrammarChecking*/ )
+bool ImpEditEngine::SpellSentence(EditView& rEditView,
+ ::svx::SpellPortions& rToFill,
+ bool /*bIsGrammarChecking*/ )
{
#ifdef SVX_LIGHT
#else
bool bRet = false;
+ EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
//the pSpellInfo has to be created on demand
if(!pSpellInfo)
- {
- pSpellInfo = new SpellInfo;
- pSpellInfo->bMultipleDoc = sal_True;
- rEditView.pImpEditView->SetEditSelection( aEditDoc.GetStartPaM() );
- EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
- pSpellInfo->aSpellStart = CreateEPaM( SelectWord( aCurSel, ::com::sun::star::i18n::WordType::DICTIONARY_WORD ).Min() );
- }
+ pSpellInfo = CreateSpellInfo( aCurSel, true );
+ pSpellInfo->aCurSentenceStart = aCurSel.Min();
DBG_ASSERT( xSpeller.is(), "Kein Speller gesetzt!" );
pSpellInfo->aLastSpellPortions.clear();
pSpellInfo->aLastSpellContentSelections.clear();
rToFill.clear();
- EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() );
//if no selection previously exists the range is extended to the end of the object
if(aCurSel.Min() == aCurSel.Max())
{
ContentNode* pLastNode = aEditDoc.SaveGetObject( aEditDoc.Count()-1);
aCurSel.Max() = EditPaM(pLastNode, pLastNode->Len());
}
+ // check for next error in aCurSel and set aCurSel to that one if any was found
Reference< XSpellAlternatives > xAlt = ImpFindNextError(aCurSel);
- if(xAlt.is())
+ if (xAlt.is())
{
bRet = true;
//find the sentence boundaries
@@ -2060,6 +2071,7 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, ::svx::SpellPortions& rTo
aCurSel = aNextSel;
}
while( xAlt.is() );
+
//set the selection to the end of the current sentence
rEditView.pImpEditView->SetEditSelection(aSentencePaM.Max());
}
@@ -2173,13 +2185,20 @@ void ImpEditEngine::AddPortionIterated(
/*-- 13.10.2003 16:43:33---------------------------------------------------
-----------------------------------------------------------------------*/
-void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool /*bIsGrammarChecking*/ )
+void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
+ const ::svx::SpellPortions& rNewPortions,
+ bool bRecheck )
{
#ifdef SVX_LIGHT
#else
DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized");
if(pSpellInfo)
{
+ // get current paragraph length to calculate later on how the sentence length changed,
+ // in order to place the cursor at the end of the sentence again
+ EditSelection aOldSel( rEditView.pImpEditView->GetEditSelection() );
+ xub_StrLen nOldLen = aOldSel.Max().GetNode()->Len();
+
UndoActionStart( EDITUNDO_INSERT );
if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size())
{
@@ -2266,9 +2285,24 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, const ::svx::Spell
}
}
UndoActionEnd( EDITUNDO_INSERT );
+
+ EditPaM aNext;
+ if (bRecheck)
+ aNext = pSpellInfo->aCurSentenceStart;
+ else
+ {
+ // restore cursor position to the end of the modified sentence.
+ // (This will define the continuation position for spell/grammar checking)
+ // First: check if the sentence/para length changed
+ sal_Int32 nDelta = rEditView.pImpEditView->GetEditSelection().Max().GetNode()->Len() - nOldLen;
+ xub_StrLen nEndOfSentence = aOldSel.Max().GetIndex() + nDelta;
+ aNext = EditPaM( aOldSel.Max().GetNode(), nEndOfSentence );
+ }
+ rEditView.pImpEditView->SetEditSelection( aNext );
+
+ FormatAndUpdate();
+ aEditDoc.SetModified(TRUE);
}
- FormatAndUpdate();
- aEditDoc.SetModified(TRUE);
#endif
}
/*-- 08.09.2008 11:33:02---------------------------------------------------
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 1a49c087265a..81db53b3d474 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -807,7 +807,7 @@ void Outliner::PutSpellingToSentenceStart( EditView& rEditView )
/*-- 13.10.2003 16:56:25---------------------------------------------------
-----------------------------------------------------------------------*/
-void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bIsGrammarChecking )
+void Outliner::ApplyChangedSentence(EditView& rEditView, const ::svx::SpellPortions& rNewPortions, bool bRecheck )
{
- pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bIsGrammarChecking );
+ pEditEngine->ApplyChangedSentence( rEditView, rNewPortions, bRecheck );
}
diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx
index 11ecce69834b..fa25274b3136 100644
--- a/embeddedobj/source/inc/oleembobj.hxx
+++ b/embeddedobj/source/inc/oleembobj.hxx
@@ -186,6 +186,8 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5
::rtl::OUString m_aTempURL;
+ ::rtl::OUString m_aTempDumpURL;
+
// STAMPIT solution
// the following member is used during verb execution to detect whether the verb execution modifies the object
VerbExecutionController m_aVerbExecutionController;
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index f57dcb8e7fd8..78ad2c2e5885 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -46,10 +46,16 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/system/XSystemShellExecute.hpp>
+#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <rtl/logfile.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/mimeconfighelper.hxx>
+#include <comphelper/storagehelper.hxx>
#include <targetstatecontrol.hxx>
@@ -674,6 +680,85 @@ sal_Int32 SAL_CALL OleEmbeddedObject::getCurrentState()
return m_nObjectState;
}
+namespace
+{
+ bool lcl_CopyStream(uno::Reference<io::XInputStream> xIn, uno::Reference<io::XOutputStream> xOut)
+ {
+ const sal_Int32 nChunkSize = 4096;
+ uno::Sequence< sal_Int8 > aData(nChunkSize);
+ sal_Int32 nTotalRead = 0;
+ sal_Int32 nRead;
+ do
+ {
+ nRead = xIn->readBytes(aData, nChunkSize);
+ nTotalRead += nRead;
+ xOut->writeBytes(aData);
+ } while (nRead == nChunkSize);
+ return nTotalRead != 0;
+ }
+
+ //Dump the objects content to a tempfile, just the "CONTENTS" stream if
+ //there is one for non-compound documents, otherwise the whole content.
+ //
+ //On success a file is returned which must be removed by the caller
+ rtl::OUString lcl_ExtractObject(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory,
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xObjectStream)
+ {
+ rtl::OUString sUrl;
+
+ // the solution is only active for Unix systems
+#ifndef WNT
+ uno::Reference <beans::XPropertySet> xNativeTempFile(
+ xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.TempFile"))), uno::UNO_QUERY_THROW);
+ uno::Reference < io::XStream > xStream(xNativeTempFile, uno::UNO_QUERY_THROW);
+
+ uno::Sequence< uno::Any > aArgs( 2 );
+ aArgs[0] <<= xObjectStream;
+ aArgs[1] <<= (sal_Bool)sal_True; // do not create copy
+ uno::Reference< container::XNameContainer > xNameContainer(
+ xFactory->createInstanceWithArguments(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")),
+ aArgs ), uno::UNO_QUERY_THROW );
+
+ uno::Reference< io::XStream > xCONTENTS;
+ xNameContainer->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONTENTS"))) >>= xCONTENTS;
+
+ sal_Bool bCopied = xCONTENTS.is() && lcl_CopyStream(xCONTENTS->getInputStream(), xStream->getOutputStream());
+
+ uno::Reference< io::XSeekable > xSeekableStor(xObjectStream, uno::UNO_QUERY);
+ if (xSeekableStor.is())
+ xSeekableStor->seek(0);
+
+ if (!bCopied)
+ bCopied = lcl_CopyStream(xObjectStream->getInputStream(), xStream->getOutputStream());
+
+ if (bCopied)
+ {
+ xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")),
+ uno::makeAny(sal_False));
+ uno::Any aUrl = xNativeTempFile->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Uri")));
+ aUrl >>= sUrl;
+
+ xNativeTempFile = uno::Reference<beans::XPropertySet>();
+
+ uno::Reference<ucb::XSimpleFileAccess> xSimpleFileAccess(
+ xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))),
+ uno::UNO_QUERY_THROW);
+
+ xSimpleFileAccess->setReadOnly(sUrl, sal_True);
+ }
+ else
+ {
+ xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")),
+ uno::makeAny(sal_True));
+ }
+#endif
+ return sUrl;
+ }
+}
+
//----------------------------------------------
void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
throw ( lang::IllegalArgumentException,
@@ -789,10 +874,28 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
}
if ( !m_pOwnView || !m_pOwnView->Open() )
- throw embed::UnreachableStateException();
+ {
+ //Make a RO copy and see if the OS can find something to at
+ //least display the content for us
+ if (!m_aTempDumpURL.getLength())
+ m_aTempDumpURL = lcl_ExtractObject(m_xFactory, m_xObjectStream);
+
+ if (m_aTempDumpURL.getLength())
+ {
+ uno::Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute( m_xFactory->createInstance(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))),
+ uno::UNO_QUERY_THROW);
+ xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::DEFAULTS);
+ }
+ else
+ throw embed::UnreachableStateException();
+ }
}
else
+ {
+
throw embed::UnreachableStateException();
+ }
}
}
diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx
index 698ae719fbf0..adf07e1f522e 100644
--- a/embeddedobj/source/msole/olemisc.cxx
+++ b/embeddedobj/source/msole/olemisc.cxx
@@ -158,6 +158,9 @@ OleEmbeddedObject::~OleEmbeddedObject()
if ( m_aTempURL.getLength() )
KillFile_Impl( m_aTempURL, m_xFactory );
+
+ if ( m_aTempDumpURL.getLength() )
+ KillFile_Impl( m_aTempDumpURL, m_xFactory );
}
//------------------------------------------------------
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index d633b597878d..2ffeb0d09739 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -141,12 +141,12 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool FinalPage::commitPage( CommitPageReason _eReason )
+ sal_Bool FinalPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
- if ( ( eTravelBackward != _eReason )
+ if ( ( ::svt::WizardTypes::eTravelBackward != _eReason )
&& ( !m_aLocationController.prepareCommit() )
)
return sal_False;
diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx
index 415bc31f2bc1..27d6522d7df6 100644
--- a/extensions/source/abpilot/abpfinalpage.hxx
+++ b/extensions/source/abpilot/abpfinalpage.hxx
@@ -66,7 +66,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index b315893b6447..d8007873a2c4 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -213,14 +213,11 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool OAddessBookSourcePilot::onFinish(sal_Int32 _nResult)
+ sal_Bool OAddessBookSourcePilot::onFinish()
{
- if (!OAddessBookSourcePilot_Base::onFinish(_nResult))
+ if ( !OAddessBookSourcePilot_Base::onFinish() )
return sal_False;
- if (RET_OK != _nResult)
- return sal_True;
-
implCommitAll();
addressconfig::markPilotSuccess( getORB() );
@@ -283,9 +280,7 @@ namespace abp
if ( aTables.empty() )
{
- if ( ( _eReason == eValidateNoUI )
- || ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() )
- )
+ if ( RET_YES != QueryBox( this, ModuleRes( RID_QRY_NOTABLES ) ).Execute() )
{
// cannot ask the user, or the user chose to use this data source, though there are no tables
bAllow = sal_False;
diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx
index b0f3b900871b..0abdacd0281d 100644
--- a/extensions/source/abpilot/abspilot.hxx
+++ b/extensions/source/abpilot/abspilot.hxx
@@ -79,7 +79,7 @@ namespace abp
virtual ::svt::OWizardPage* createPage( WizardState _nState );
virtual void enterState( WizardState _nState );
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
- virtual sal_Bool onFinish( sal_Int32 _nResult );
+ virtual sal_Bool onFinish();
// RoadmapWizard
virtual String getStateDisplayName( WizardState _nState ) const;
diff --git a/extensions/source/abpilot/tableselectionpage.cxx b/extensions/source/abpilot/tableselectionpage.cxx
index 0cefba92ab5a..869c806ea819 100644
--- a/extensions/source/abpilot/tableselectionpage.cxx
+++ b/extensions/source/abpilot/tableselectionpage.cxx
@@ -109,7 +109,7 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool TableSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool TableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/abpilot/tableselectionpage.hxx b/extensions/source/abpilot/tableselectionpage.hxx
index 36bc792fd0e7..d2d878c65d5f 100644
--- a/extensions/source/abpilot/tableselectionpage.hxx
+++ b/extensions/source/abpilot/tableselectionpage.hxx
@@ -51,7 +51,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 6188b7d21628..fd83630e81d9 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -207,18 +207,15 @@ namespace abp
}
//---------------------------------------------------------------------
- sal_Bool TypeSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool TypeSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!AddressBookSourcePage::commitPage(_eReason))
return sal_False;
if (AST_INVALID == getSelectedType( ))
{
- if ( _eReason != eValidateNoUI )
- {
- ErrorBox aError(this, ModuleRes(RID_ERR_NEEDTYPESELECTION));
- aError.Execute();
- }
+ ErrorBox aError(this, ModuleRes(RID_ERR_NEEDTYPESELECTION));
+ aError.Execute();
return sal_False;
}
diff --git a/extensions/source/abpilot/typeselectionpage.hxx b/extensions/source/abpilot/typeselectionpage.hxx
index 18c8d6b9697d..9df17bb1d77f 100644
--- a/extensions/source/abpilot/typeselectionpage.hxx
+++ b/extensions/source/abpilot/typeselectionpage.hxx
@@ -83,7 +83,7 @@ namespace abp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// TabDialog overridables
virtual void ActivatePage();
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 7b58c8de8560..88d8e2eb352e 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -164,7 +164,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OTableSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OTableSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OControlWizardPage::commitPage(_eReason))
return sal_False;
@@ -493,7 +493,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool ODBFieldPage::commitPage( CommitPageReason _eReason )
+ sal_Bool ODBFieldPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OMaybeListSelectionPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/commonpagesdbp.hxx b/extensions/source/dbpilots/commonpagesdbp.hxx
index 3cbe1ac2b514..a20587b36d72 100644
--- a/extensions/source/dbpilots/commonpagesdbp.hxx
+++ b/extensions/source/dbpilots/commonpagesdbp.hxx
@@ -64,7 +64,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
protected:
DECL_LINK( OnListboxSelection, ListBox* );
@@ -131,7 +131,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
// own overridables
virtual String& getDBFieldSetting() = 0;
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index b97eb60504b4..c5d816486ecc 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -156,7 +156,7 @@ namespace dbp
_rList.Clear();
const ::rtl::OUString* pItems = _rItems.getConstArray();
const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
- WizardState nPos;
+ ::svt::WizardTypes::WizardState nPos;
sal_Int32 nIndex = 0;
for (;pItems < pEnd; ++pItems, ++nIndex)
{
@@ -172,7 +172,7 @@ namespace dbp
_rList.Clear();
const ::rtl::OUString* pItems = _rItems.getConstArray();
const ::rtl::OUString* pEnd = pItems + _rItems.getLength();
- WizardState nPos;
+ ::svt::WizardTypes::WizardState nPos;
sal_Int32 nIndex = 0;
for (;pItems < pEnd; ++pItems)
{
@@ -254,7 +254,7 @@ namespace dbp
m_pFormDatasource->SetText(sDataSource);
m_pFormTable->SetText(sCommand);
- WizardState nCommandTypeResourceId = 0;
+ ::svt::WizardTypes::WizardState nCommandTypeResourceId = 0;
switch (nCommandType)
{
case CommandType::TABLE:
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 9e5d048eeab3..7606fc7bec65 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -289,9 +289,9 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OGridWizard::onFinish(sal_Int32 _nResult)
+ sal_Bool OGridWizard::onFinish()
{
- if (!OControlWizard::onFinish(_nResult))
+ if ( !OControlWizard::onFinish() )
return sal_False;
implApplySettings();
@@ -366,7 +366,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OGridFieldsSelection::commitPage( CommitPageReason _eReason )
+ sal_Bool OGridFieldsSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGridPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/gridwizard.hxx b/extensions/source/dbpilots/gridwizard.hxx
index d0f255ede729..85b91d274345 100644
--- a/extensions/source/dbpilots/gridwizard.hxx
+++ b/extensions/source/dbpilots/gridwizard.hxx
@@ -68,8 +68,7 @@ namespace dbp
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual void enterState( WizardState _nState );
virtual sal_Bool leaveState( WizardState _nState );
-
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool onFinish();
virtual sal_Bool approveControl(sal_Int16 _nClassId);
@@ -114,7 +113,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
protected:
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index 7bf3138bf5fe..9956cfe86428 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -79,7 +79,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- OWizardPage* OGroupBoxWizard::createPage(WizardState _nState)
+ OWizardPage* OGroupBoxWizard::createPage(::svt::WizardTypes::WizardState _nState)
{
switch (_nState)
{
@@ -106,7 +106,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- WizardTypes::WizardState OGroupBoxWizard::determineNextState( WizardState _nCurrentState ) const
+ WizardTypes::WizardState OGroupBoxWizard::determineNextState( ::svt::WizardTypes::WizardState _nCurrentState ) const
{
switch (_nCurrentState)
{
@@ -133,7 +133,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- void OGroupBoxWizard::enterState(WizardState _nState)
+ void OGroupBoxWizard::enterState(::svt::WizardTypes::WizardState _nState)
{
// some stuff to do before calling the base class (modifying our settings)
switch (_nState)
@@ -187,18 +187,15 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OGroupBoxWizard::onFinish(sal_Int32 _nResult)
+ sal_Bool OGroupBoxWizard::onFinish()
{
- if (RET_OK != _nResult)
- return OControlWizard::onFinish(_nResult);
-
// commit the basic control setttings
commitControlSettings(&m_aSettings);
// create the radio buttons
createRadios();
- return OControlWizard::onFinish(_nResult);
+ return OControlWizard::onFinish();
}
//=====================================================================
@@ -265,7 +262,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool ORadioSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool ORadioSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
@@ -277,7 +274,7 @@ namespace dbp
rSettings.aValues.clear();
rSettings.aLabels.reserve(m_aExistingRadios.GetEntryCount());
rSettings.aValues.reserve(m_aExistingRadios.GetEntryCount());
- for (WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
+ for (::svt::WizardTypes::WizardState i=0; i<m_aExistingRadios.GetEntryCount(); ++i)
{
rSettings.aLabels.push_back(m_aExistingRadios.GetEntry(i));
rSettings.aValues.push_back(String::CreateFromInt32((sal_Int32)(i + 1)));
@@ -393,7 +390,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool ODefaultFieldSelectionPage::commitPage( CommitPageReason _eReason )
+ sal_Bool ODefaultFieldSelectionPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OMaybeListSelectionPage::commitPage(_eReason))
return sal_False;
@@ -416,7 +413,7 @@ namespace dbp
,m_aValue (this, ModuleRes(ET_OPTIONVALUE))
,m_aOptionsLabel (this, ModuleRes(FT_RADIOBUTTONS))
,m_aOptions (this, ModuleRes(LB_RADIOBUTTONS))
- ,m_nLastSelection((WizardState)-1)
+ ,m_nLastSelection((::svt::WizardTypes::WizardState)-1)
{
FreeResource();
@@ -440,7 +437,7 @@ namespace dbp
//---------------------------------------------------------------------
void OOptionValuesPage::implTraveledOptions()
{
- if ((WizardState)-1 != m_nLastSelection)
+ if ((::svt::WizardTypes::WizardState)-1 != m_nLastSelection)
{
// save the value for the last option
DBG_ASSERT((size_t)m_nLastSelection < m_aUncommittedValues.size(), "OOptionValuesPage::implTraveledOptions: invalid previous selection index!");
@@ -480,7 +477,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OOptionValuesPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OOptionValuesPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
@@ -548,7 +545,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OFinalizeGBWPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OFinalizeGBWPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OGBWPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/groupboxwiz.hxx b/extensions/source/dbpilots/groupboxwiz.hxx
index 97a2cd1a3109..de0f9767f3a4 100644
--- a/extensions/source/dbpilots/groupboxwiz.hxx
+++ b/extensions/source/dbpilots/groupboxwiz.hxx
@@ -73,8 +73,7 @@ namespace dbp
virtual ::svt::OWizardPage* createPage( WizardState _nState );
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual void enterState( WizardState _nState );
-
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool onFinish();
virtual sal_Bool approveControl(sal_Int16 _nClassId);
@@ -117,7 +116,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
DECL_LINK( OnMoveEntry, PushButton* );
@@ -145,7 +144,7 @@ namespace dbp
protected:
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
OOptionGroupSettings& getSettings() { return static_cast<OGroupBoxWizard*>(getDialog())->getSettings(); }
};
@@ -164,7 +163,8 @@ namespace dbp
ListBox m_aOptions;
StringArray m_aUncommittedValues;
- WizardState m_nLastSelection;
+ ::svt::WizardTypes::WizardState
+ m_nLastSelection;
public:
OOptionValuesPage( OControlWizard* _pParent );
@@ -175,7 +175,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
void implTraveledOptions();
@@ -217,7 +217,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
};
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx
index 2e810654baa4..bf3f56781d63 100644
--- a/extensions/source/dbpilots/listcombowizard.cxx
+++ b/extensions/source/dbpilots/listcombowizard.cxx
@@ -226,14 +226,11 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OListComboWizard::onFinish(sal_Int32 _nResult)
+ sal_Bool OListComboWizard::onFinish()
{
- if (!OControlWizard::onFinish(_nResult))
+ if ( !OControlWizard::onFinish() )
return sal_False;
- if (RET_OK != _nResult)
- return sal_True;
-
implApplySettings();
return sal_True;
}
@@ -362,14 +359,14 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OContentTableSelection::commitPage( CommitPageReason _eReason )
+ sal_Bool OContentTableSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
OListComboSettings& rSettings = getSettings();
rSettings.sListContentTable = m_aSelectTable.GetSelectEntry();
- if (!rSettings.sListContentTable.Len() && (eTravelBackward != _eReason))
+ if (!rSettings.sListContentTable.Len() && (::svt::WizardTypes::eTravelBackward != _eReason))
// need to select a table
return sal_False;
@@ -440,7 +437,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OContentFieldSelection::commitPage( CommitPageReason _eReason )
+ sal_Bool OContentFieldSelection::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
@@ -518,7 +515,7 @@ namespace dbp
}
//---------------------------------------------------------------------
- sal_Bool OLinkFieldsPage::commitPage( CommitPageReason _eReason )
+ sal_Bool OLinkFieldsPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
if (!OLCPage::commitPage(_eReason))
return sal_False;
diff --git a/extensions/source/dbpilots/listcombowizard.hxx b/extensions/source/dbpilots/listcombowizard.hxx
index 7dcf32316236..05f7f70ea65d 100644
--- a/extensions/source/dbpilots/listcombowizard.hxx
+++ b/extensions/source/dbpilots/listcombowizard.hxx
@@ -80,8 +80,7 @@ namespace dbp
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
virtual void enterState( WizardState _nState );
virtual sal_Bool leaveState( WizardState _nState );
-
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool onFinish();
virtual sal_Bool approveControl(sal_Int16 _nClassId);
@@ -129,7 +128,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
protected:
@@ -163,7 +162,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
};
@@ -190,7 +189,7 @@ namespace dbp
// OWizardPage overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
private:
diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx
index dd7da492ff57..09d90f1eaa83 100644..100755
--- a/extensions/source/update/check/download.cxx
+++ b/extensions/source/update/check/download.cxx
@@ -169,7 +169,9 @@ progress_callback( void *clientp, double dltotal, double dlnow, double ultotal,
if( ! out->StopCondition.check() )
{
- double fPercent = (dlnow + out->Offset) * 100 / (dltotal + out->Offset);
+ double fPercent = 0;
+ if ( dltotal + out->Offset )
+ fPercent = (dlnow + out->Offset) * 100 / (dltotal + out->Offset);
if( fPercent < 0 )
fPercent = 0;
@@ -262,6 +264,9 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx
rtl::OString aURL(rtl::OUStringToOString(rURL, RTL_TEXTENCODING_UTF8));
curl_easy_setopt(pCURL, CURLOPT_URL, aURL.getStr());
+ // abort on http errors
+ curl_easy_setopt(pCURL, CURLOPT_FAILONERROR, 1);
+
// enable redirection
curl_easy_setopt(pCURL, CURLOPT_FOLLOWLOCATION, 1);
@@ -300,6 +305,19 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx
ret = true;
}
+ if ( CURLE_PARTIAL_FILE == cc )
+ {
+ // this sometimes happens, when a user throws away his user data, but has already
+ // completed the download of an update.
+ double fDownloadSize;
+ curl_easy_getinfo( pCURL, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &fDownloadSize );
+ if ( -1 == fDownloadSize )
+ {
+ out.Handler->downloadFinished(out.File);
+ ret = true;
+ }
+ }
+
// Avoid target file being removed
else if( (CURLE_ABORTED_BY_CALLBACK == cc) || out.StopCondition.check() )
ret = true;
@@ -313,7 +331,30 @@ bool curl_run(const rtl::OUString& rURL, OutData& out, const rtl::OString& aProx
if( NULL != error_message )
aMessage = error_message;
- out.Handler->downloadStalled( rtl::OStringToOUString(aMessage, RTL_TEXTENCODING_UTF8) );
+ if ( CURLE_HTTP_RETURNED_ERROR == cc )
+ {
+ long nError;
+ curl_easy_getinfo( pCURL, CURLINFO_RESPONSE_CODE, &nError );
+
+ if ( 403 == nError )
+ aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( " 403: Access denied!" ) );
+ else if ( 404 == nError )
+ aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( " 404: File not found!" ) );
+ else if ( 416 == nError )
+ {
+ // we got this error probably, because we already downloaded the file
+ out.Handler->downloadFinished(out.File);
+ ret = true;
+ }
+ else
+ {
+ aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( ":error code = " ) );
+ aMessage += aMessage.valueOf( nError );
+ aMessage += rtl::OString( RTL_CONSTASCII_STRINGPARAM( " !" ) );
+ }
+ }
+ if ( !ret )
+ out.Handler->downloadStalled( rtl::OStringToOUString(aMessage, RTL_TEXTENCODING_UTF8) );
}
curl_easy_cleanup(pCURL);
@@ -330,14 +371,52 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl
OSL_ASSERT( m_aHandler.is() );
OutData out(m_aCondition);
+ rtl::OUString aFile( rFile );
+
+ // when rFile is empty, there is no remembered file name. If there is already a file with the
+ // same name ask the user if she wants to resume a download or restart the download
+ if ( !aFile.getLength() )
+ {
+ // GetFileName()
+ rtl::OUString aURL( rURL );
+ // ensure no trailing '/'
+ sal_Int32 nLen = aURL.getLength();
+ while( (nLen > 0) && ('/' == aURL[ nLen-1 ]) )
+ aURL = aURL.copy( 0, --nLen );
+
+ // extract file name last '/'
+ sal_Int32 nIndex = aURL.lastIndexOf('/');
+ aFile = rDestinationDir + aURL.copy( nIndex );
+
+ // check for existing file
+ oslFileError rc = osl_openFile( aFile.pData, &out.FileHandle, osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
+ osl_closeFile(out.FileHandle);
+ out.FileHandle = NULL;
+
+ if( osl_File_E_EXIST == rc )
+ {
+ if ( m_aHandler->checkDownloadDestination( aURL.copy( nIndex+1 ) ) )
+ {
+ osl_removeFile( aFile.pData );
+ aFile = rtl::OUString();
+ }
+ else
+ m_aHandler->downloadStarted( aFile, 0 );
+ }
+ else
+ {
+ osl_removeFile( aFile.pData );
+ aFile = rtl::OUString();
+ }
+ }
- out.File = rFile;
+ out.File = aFile;
out.DestinationDir = rDestinationDir;
out.Handler = m_aHandler;
- if( rFile.getLength() > 0 )
+ if( aFile.getLength() > 0 )
{
- oslFileError rc = osl_openFile(rFile.pData, &out.FileHandle, osl_File_OpenFlag_Write);
+ oslFileError rc = osl_openFile(aFile.pData, &out.FileHandle, osl_File_OpenFlag_Write);
if( osl_File_E_None == rc )
{
diff --git a/extensions/source/update/check/download.hxx b/extensions/source/update/check/download.hxx
index 1b2fb678417b..ff16ef52f7fb 100644
--- a/extensions/source/update/check/download.hxx
+++ b/extensions/source/update/check/download.hxx
@@ -35,6 +35,8 @@
struct DownloadInteractionHandler : public rtl::IReference
{
+ virtual bool checkDownloadDestination(const rtl::OUString& rFileName) = 0;
+
// called if the destination file already exists, but resume is false
virtual bool downloadTargetExists(const rtl::OUString& rFileName) = 0;
diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx
index 10632cd23fbd..d65a97e49dc6 100644..100755
--- a/extensions/source/update/check/updatecheck.cxx
+++ b/extensions/source/update/check/updatecheck.cxx
@@ -800,6 +800,8 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues,
aModel.getUpdateEntry(m_aUpdateInfo);
bool obsoleteUpdateInfo = isObsoleteUpdateInfo(aUpdateEntryVersion);
+ bool bContinueDownload = false;
+ bool bDownloadAvailable = false;
m_bHasExtensionUpdate = checkForPendingUpdates( xContext );
m_bShowExtUpdDlg = false;
@@ -808,10 +810,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues,
if( aLocalFileName.getLength() > 0 )
{
- bool downloadPaused = aModel.isDownloadPaused();
-
- enableDownload(true, downloadPaused);
- setUIState(downloadPaused ? UPDATESTATE_DOWNLOAD_PAUSED : UPDATESTATE_DOWNLOADING);
+ bContinueDownload = true;
// Try to get the number of bytes already on disk
osl::DirectoryItem aDirectoryItem;
@@ -820,16 +819,36 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues,
osl::FileStatus aFileStatus(FileStatusMask_FileSize);
if( osl::DirectoryItem::E_None == aDirectoryItem.getFileStatus(aFileStatus) )
{
- // Calculate initial percent value.
- if( aModel.getDownloadSize() > 0 )
+ sal_Int64 nDownloadSize = aModel.getDownloadSize();
+ sal_Int64 nFileSize = aFileStatus.getFileSize();
+
+ if( nDownloadSize > 0 )
{
- sal_Int32 nPercent = (sal_Int32) (100 * aFileStatus.getFileSize() / aModel.getDownloadSize());
- getUpdateHandler()->setProgress(nPercent);
+ if ( nDownloadSize <= nFileSize ) // we have already downloaded everthing
+ {
+ bContinueDownload = false;
+ bDownloadAvailable = true;
+ m_aImageName = getImageFromFileName( aLocalFileName );
+ }
+ else // Calculate initial percent value.
+ {
+ sal_Int32 nPercent = (sal_Int32) (100 * nFileSize / nDownloadSize);
+ getUpdateHandler()->setProgress( nPercent );
+ }
}
}
}
+
+ if ( bContinueDownload )
+ {
+ bool downloadPaused = aModel.isDownloadPaused();
+
+ enableDownload(true, downloadPaused);
+ setUIState(downloadPaused ? UPDATESTATE_DOWNLOAD_PAUSED : UPDATESTATE_DOWNLOADING);
+ }
+
}
- else
+ if ( !bContinueDownload )
{
// We do this intentionally only if no download is in progress ..
if( obsoleteUpdateInfo )
@@ -842,13 +861,18 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues,
// Data is outdated, probably due to installed update
rtl::Reference< UpdateCheckConfig > aConfig = UpdateCheckConfig::get( xContext, *this );
aConfig->clearUpdateFound();
+ aConfig->clearLocalFileName();
+
m_aUpdateInfo = UpdateInfo();
}
else
{
enableAutoCheck(aModel.isAutoCheckEnabled());
- setUIState(getUIState(m_aUpdateInfo));
+ if ( bDownloadAvailable )
+ setUIState( UPDATESTATE_DOWNLOAD_AVAIL );
+ else
+ setUIState(getUIState(m_aUpdateInfo));
}
}
}
@@ -937,6 +961,10 @@ UpdateCheck::install()
aParameter += UNISTRING(" &");
#endif
+
+ rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext );
+ rModel->clearLocalFileName();
+
xShellExecute->execute(aInstallImage, aParameter, nFlags);
ShutdownThread *pShutdownThread = new ShutdownThread( m_xContext );
(void) pShutdownThread;
@@ -1102,6 +1130,23 @@ UpdateCheck::downloadTargetExists(const rtl::OUString& rFileName)
}
//------------------------------------------------------------------------------
+bool UpdateCheck::checkDownloadDestination( const rtl::OUString& rFileName )
+{
+ osl::ClearableMutexGuard aGuard(m_aMutex);
+
+ rtl::Reference< UpdateHandler > aUpdateHandler( getUpdateHandler() );
+
+ bool bReload = false;
+
+ if( aUpdateHandler->isVisible() )
+ {
+ bReload = aUpdateHandler->showOverwriteWarning( rFileName );
+ }
+
+ return bReload;
+}
+
+//------------------------------------------------------------------------------
void
UpdateCheck::downloadStalled(const rtl::OUString& rErrorMessage)
@@ -1132,15 +1177,18 @@ UpdateCheck::downloadProgressAt(sal_Int8 nPercent)
void
UpdateCheck::downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize)
{
- osl::MutexGuard aGuard(m_aMutex);
+ if ( nFileSize > 0 )
+ {
+ osl::MutexGuard aGuard(m_aMutex);
- rtl::Reference< UpdateCheckConfig > aModel(UpdateCheckConfig::get(m_xContext));
- aModel->storeLocalFileName(rLocalFileName, nFileSize);
+ rtl::Reference< UpdateCheckConfig > aModel(UpdateCheckConfig::get(m_xContext));
+ aModel->storeLocalFileName(rLocalFileName, nFileSize);
- // Bring-up release note for position 1 ..
- const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 1, aModel->isAutoDownloadEnabled()));
- if( aURL.getLength() > 0 )
- showReleaseNote(aURL);
+ // Bring-up release note for position 1 ..
+ const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 1, aModel->isAutoDownloadEnabled()));
+ if( aURL.getLength() > 0 )
+ showReleaseNote(aURL);
+ }
}
//------------------------------------------------------------------------------
@@ -1153,9 +1201,6 @@ UpdateCheck::downloadFinished(const rtl::OUString& rLocalFileName)
// no more retries
m_pThread->terminate();
- rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get(m_xContext);
- rModel->clearLocalFileName();
-
m_aImageName = getImageFromFileName(rLocalFileName);
UpdateInfo aUpdateInfo(m_aUpdateInfo);
@@ -1163,6 +1208,7 @@ UpdateCheck::downloadFinished(const rtl::OUString& rLocalFileName)
setUIState(UPDATESTATE_DOWNLOAD_AVAIL);
// Bring-up release note for position 2 ..
+ rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext );
const rtl::OUString aURL(getReleaseNote(aUpdateInfo, 2, rModel->isAutoDownloadEnabled()));
if( aURL.getLength() > 0 )
showReleaseNote(aURL);
diff --git a/extensions/source/update/check/updatecheck.hxx b/extensions/source/update/check/updatecheck.hxx
index 59a1727f4bd9..7283288769e0 100644
--- a/extensions/source/update/check/updatecheck.hxx
+++ b/extensions/source/update/check/updatecheck.hxx
@@ -111,6 +111,8 @@ public:
virtual void downloadProgressAt(sal_Int8 nProcent);
virtual void downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFileSize);
virtual void downloadFinished(const rtl::OUString& rLocalFileName);
+ // checks if the download target already exists and asks user what to do next
+ virtual bool checkDownloadDestination( const rtl::OUString& rFile );
// Cancels the download action (and resumes checking if enabled)
void cancelDownload();
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index b3e559c5f136..9f78b33270c2 100644..100755
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -398,7 +398,7 @@ UpdateCheckConfig::storeLocalFileName(const rtl::OUString& rLocalFileName, sal_I
if( m_xContainer->hasByName(aNameList[i]) )
m_xContainer->replaceByName(aNameList[i], aValueList[i]);
else
- m_xContainer->insertByName(aNameList[i],aValueList[i]);
+ m_xContainer->insertByName(aNameList[i], aValueList[i]);
}
commitChanges();
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index cd1c5f1f721a..bb38c34a0b4e 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -52,6 +52,7 @@
#include "com/sun/star/awt/XThrobber.hpp"
#include "com/sun/star/awt/XTopWindow.hpp"
#include "com/sun/star/awt/XVclWindowPeer.hpp"
+#include "com/sun/star/awt/XVclContainer.hpp"
#include "com/sun/star/awt/XWindow.hpp"
#include "com/sun/star/awt/XWindow2.hpp"
@@ -101,7 +102,8 @@ UpdateHandler::UpdateHandler( const uno::Reference< uno::XComponentContext > & r
mbVisible( false ),
mbStringsLoaded( false ),
mbMinimized( false ),
- mbListenerAdded(false)
+ mbListenerAdded(false),
+ mbShowsMessageBox(false)
{
}
@@ -232,6 +234,11 @@ void UpdateHandler::setVisible( bool bVisible )
//--------------------------------------------------------------------
void UpdateHandler::setProgress( sal_Int32 nPercent )
{
+ if ( nPercent > 100 )
+ nPercent = 100;
+ else if ( nPercent < 0 )
+ nPercent = 0;
+
if ( nPercent != mnPercent )
{
osl::MutexGuard aGuard( maMutex );
@@ -478,7 +485,18 @@ void SAL_CALL UpdateHandler::handle( uno::Reference< task::XInteractionRequest >
void SAL_CALL UpdateHandler::queryTermination( const lang::EventObject& )
throw ( frame::TerminationVetoException, uno::RuntimeException )
{
- setVisible( false );
+ if ( mbShowsMessageBox )
+ {
+ uno::Reference< awt::XTopWindow > xTopWindow( mxUpdDlg, uno::UNO_QUERY );
+ if ( xTopWindow.is() )
+ xTopWindow->toFront();
+
+ throw frame::TerminationVetoException(
+ UNISTRING("The office cannot be closed while displaying a warning!"),
+ uno::Reference<XInterface>(static_cast<frame::XTerminateListener*>(this), uno::UNO_QUERY));
+ }
+ else
+ setVisible( false );
}
//------------------------------------------------------------------------------
@@ -707,6 +725,9 @@ void UpdateHandler::loadStrings()
msInstallError = loadString( xBundle, RID_UPDATE_STR_INSTALL_ERROR );
msOverwriteWarning = loadString( xBundle, RID_UPDATE_STR_OVERWRITE_WARNING );
msPercent = loadString( xBundle, RID_UPDATE_STR_PERCENT );
+ msReloadWarning = loadString( xBundle, RID_UPDATE_STR_RELOAD_WARNING );
+ msReloadReload = loadString( xBundle, RID_UPDATE_STR_RELOAD_RELOAD );
+ msReloadContinue = loadString( xBundle, RID_UPDATE_STR_RELOAD_CONTINUE );
msStatusFL = loadString( xBundle, RID_UPDATE_FT_STATUS );
msDescription = loadString( xBundle, RID_UPDATE_FT_DESCRIPTION );
@@ -943,12 +964,14 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText ) const
uno::Reference< awt::XMessageBox > xMsgBox( xToolkit->createWindow( aDescriptor ), uno::UNO_QUERY );
if ( xMsgBox.is() )
{
+ mbShowsMessageBox = true;
sal_Int16 nRet;
// xMsgBox->setCaptionText( msCancelTitle );
xMsgBox->setMessageText( rWarningText );
nRet = xMsgBox->execute();
if ( nRet == 2 ) // RET_YES == 2
bRet = true;
+ mbShowsMessageBox = false;
}
uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY );
@@ -959,6 +982,86 @@ bool UpdateHandler::showWarning( const rtl::OUString &rWarningText ) const
}
//--------------------------------------------------------------------
+bool UpdateHandler::showWarning( const rtl::OUString &rWarningText,
+ const rtl::OUString &rBtnText_1,
+ const rtl::OUString &rBtnText_2 ) const
+{
+ bool bRet = false;
+
+ uno::Reference< awt::XControl > xControl( mxUpdDlg, uno::UNO_QUERY );
+ if ( !xControl.is() ) return bRet;
+
+ uno::Reference< awt::XWindowPeer > xPeer = xControl->getPeer();
+ if ( !xPeer.is() ) return bRet;
+
+ uno::Reference< awt::XToolkit > xToolkit = xPeer->getToolkit();
+ if ( !xToolkit.is() ) return bRet;
+
+ awt::WindowDescriptor aDescriptor;
+
+ sal_Int32 nWindowAttributes = awt::WindowAttribute::BORDER | awt::WindowAttribute::MOVEABLE | awt::WindowAttribute::CLOSEABLE;
+ nWindowAttributes |= awt::VclWindowPeerAttribute::YES_NO;
+ nWindowAttributes |= awt::VclWindowPeerAttribute::DEF_NO;
+
+ aDescriptor.Type = awt::WindowClass_MODALTOP;
+ aDescriptor.WindowServiceName = UNISTRING( "warningbox" );
+ aDescriptor.ParentIndex = -1;
+ aDescriptor.Parent = xPeer;
+ aDescriptor.Bounds = awt::Rectangle( 10, 10, 250, 150 );
+ aDescriptor.WindowAttributes = nWindowAttributes;
+
+ uno::Reference< awt::XMessageBox > xMsgBox( xToolkit->createWindow( aDescriptor ), uno::UNO_QUERY );
+ if ( xMsgBox.is() )
+ {
+ uno::Reference< awt::XVclContainer > xMsgBoxCtrls( xMsgBox, uno::UNO_QUERY );
+ if ( xMsgBoxCtrls.is() )
+ {
+ uno::Sequence< uno::Reference< awt::XWindow > > xChildren = xMsgBoxCtrls->getWindows();
+
+ for ( long i=0; i < xChildren.getLength(); i++ )
+ {
+ uno::Reference< awt::XVclWindowPeer > xMsgBoxCtrl( xChildren[i], uno::UNO_QUERY );
+ if ( xMsgBoxCtrl.is() )
+ {
+ bool bIsDefault = true;
+ uno::Any aValue = xMsgBoxCtrl->getProperty( UNISTRING("DefaultButton") );
+ aValue >>= bIsDefault;
+ if ( bIsDefault )
+ xMsgBoxCtrl->setProperty( UNISTRING("Text"), uno::Any( rBtnText_1 ) );
+ else
+ xMsgBoxCtrl->setProperty( UNISTRING("Text"), uno::Any( rBtnText_2 ) );
+ }
+ }
+ }
+
+ sal_Int16 nRet;
+ // xMsgBox->setCaptionText( msCancelTitle );
+ mbShowsMessageBox = true;
+ xMsgBox->setMessageText( rWarningText );
+ nRet = xMsgBox->execute();
+ if ( nRet == 2 ) // RET_YES == 2
+ bRet = true;
+
+ mbShowsMessageBox = false;
+ }
+
+ uno::Reference< lang::XComponent > xComponent( xMsgBox, uno::UNO_QUERY );
+ if ( xComponent.is() )
+ xComponent->dispose();
+
+ return bRet;
+}
+
+//--------------------------------------------------------------------
+bool UpdateHandler::showOverwriteWarning( const rtl::OUString& rFileName ) const
+{
+ rtl::OUString aMsg( msReloadWarning );
+ searchAndReplaceAll( aMsg, UNISTRING( "%FILENAME" ), rFileName );
+ searchAndReplaceAll( aMsg, UNISTRING( "%DOWNLOAD_PATH" ), msDownloadPath );
+ return showWarning( aMsg, msReloadContinue, msReloadReload );
+}
+
+//--------------------------------------------------------------------
bool UpdateHandler::showOverwriteWarning() const
{
return showWarning( msOverwriteWarning );
diff --git a/extensions/source/update/check/updatehdl.hrc b/extensions/source/update/check/updatehdl.hrc
index 6389a661bf6c..ad3d472eaf68 100644
--- a/extensions/source/update/check/updatehdl.hrc
+++ b/extensions/source/update/check/updatehdl.hrc
@@ -47,6 +47,9 @@
#define RID_UPDATE_STR_PERCENT RID_UPDATE_HDL_START + 18
#define RID_UPDATE_STR_DOWNLOAD_DESCR RID_UPDATE_HDL_START + 19
#define RID_UPDATE_STR_INSTALL_ERROR RID_UPDATE_HDL_START + 20
+ #define RID_UPDATE_STR_RELOAD_WARNING RID_UPDATE_HDL_START + 21
+ #define RID_UPDATE_STR_RELOAD_RELOAD RID_UPDATE_HDL_START + 22
+ #define RID_UPDATE_STR_RELOAD_CONTINUE RID_UPDATE_HDL_START + 23
#define RID_UPDATE_FT_DESCRIPTION RID_UPDATE_HDL_START + 25
#define RID_UPDATE_FT_STATUS RID_UPDATE_HDL_START + 26
diff --git a/extensions/source/update/check/updatehdl.hxx b/extensions/source/update/check/updatehdl.hxx
index 696e2cdda0cf..bd525853dda1 100644
--- a/extensions/source/update/check/updatehdl.hxx
+++ b/extensions/source/update/check/updatehdl.hxx
@@ -98,6 +98,7 @@ private:
bool mbStringsLoaded;
bool mbMinimized;
bool mbListenerAdded;
+ mutable bool mbShowsMessageBox;
osl::Mutex maMutex;
@@ -125,6 +126,9 @@ private:
rtl::OUString msInstallError; // RID_UPDATE_STR_INSTALL_ERROR
rtl::OUString msOverwriteWarning; // RID_UPDATE_STR_OVERWRITE_WARNING
rtl::OUString msPercent; // RID_UPDATE_STR_PERCENT
+ rtl::OUString msReloadWarning; // RID_UPDATE_STR_OVERWRITE_WARNING
+ rtl::OUString msReloadReload; // RID_UPDATE_STR_OVERWRITE_WARNING
+ rtl::OUString msReloadContinue; // RID_UPDATE_STR_OVERWRITE_WARNING
rtl::OUString msStatusFL; // RID_UPDATE_FT_STATUS
rtl::OUString msDescription; // RID_UPDATE_FT_DESCRIPTION
rtl::OUString msClose; // RID_UPDATE_BTN_CLOSE
@@ -184,6 +188,8 @@ public:
rtl::OUString getBubbleTitle( UpdateState eState );
rtl::OUString getDefaultInstErrMsg();
bool showWarning( const rtl::OUString &rWarning ) const;
+ bool showWarning( const rtl::OUString &rWarning, const rtl::OUString& rBtnText_1, const rtl::OUString& rBtnText_2 ) const;
+ bool showOverwriteWarning( const rtl::OUString &rFileName ) const;
bool showOverwriteWarning() const;
// Allows runtime exceptions to be thrown by const methods
diff --git a/extensions/source/update/check/updatehdl.src b/extensions/source/update/check/updatehdl.src
index d371a80b33cb..58f88b7e4852 100644
--- a/extensions/source/update/check/updatehdl.src
+++ b/extensions/source/update/check/updatehdl.src
@@ -122,6 +122,21 @@ String RID_UPDATE_STR_OVERWRITE_WARNING
Text [ en-US ] = "A file with that name already exists! Do you want to overwrite the existing file?";
};
+String RID_UPDATE_STR_RELOAD_WARNING
+{
+ Text [ en-US ] = "A file with the name '%FILENAME' already exists in '%DOWNLOAD_PATH'! Do you want to continue with the download or delete and reload the file?";
+};
+
+String RID_UPDATE_STR_RELOAD_RELOAD
+{
+ Text [ en-US ] = "Reload File";
+};
+
+String RID_UPDATE_STR_RELOAD_CONTINUE
+{
+ Text [ en-US ] = "Continue";
+};
+
String RID_UPDATE_STR_PERCENT
{
Text [ en-US ] = "%PERCENT%";
diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx
index b98f5dc85147..51058e2eabd8 100644
--- a/filter/inc/filter/msfilter/escherex.hxx
+++ b/filter/inc/filter/msfilter/escherex.hxx
@@ -1197,6 +1197,7 @@ class MSFILTER_DLLPUBLIC EscherPropertyContainer
void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT );
+ sal_Bool CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape );
sal_Bool CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject );
/** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index ff5be3476da7..2ad33b1e6195 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1101,6 +1101,32 @@ void EscherPropertyContainer::ImplCreateGraphicAttributes( const ::com::sun::sta
}
}
+sal_Bool EscherPropertyContainer::CreateShapeProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
+{
+ uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY );
+ if ( aXPropSet.is() )
+ {
+ sal_Bool bVal = false;
+ ::com::sun::star::uno::Any aAny;
+ sal_uInt32 nShapeAttr = 0;
+ EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), sal_True );
+ if ( aAny >>= bVal )
+ {
+ if ( !bVal )
+ nShapeAttr |= 0x20002; // set fHidden = true
+ }
+ EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), sal_True );
+ if ( aAny >>= bVal )
+ {
+ if ( !bVal )
+ nShapeAttr |= 0x10000; // set fPrint = false;
+ }
+ if ( nShapeAttr )
+ AddOpt( ESCHER_Prop_fPrint, nShapeAttr );
+ }
+ return sal_True;
+}
+
sal_Bool EscherPropertyContainer::CreateOLEGraphicProperties(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape )
{
@@ -4199,7 +4225,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( sal_Bool bFirst )
nRule = GetClosestPoint( aPoly, aRefPoint );
if ( aType == "drawing.Ellipse" )
- nRule <<= 1; // In PPT hat eine Ellipse 8 Möglichkeiten sich zu connecten
+ nRule <<= 1; // In PPT hat eine Ellipse 8 M?glichkeiten sich zu connecten
}
}
return nRule;
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index facc6e799d04..950a32cd0645 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -729,6 +729,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( rObj.GetAngle() )
ImplFlipBoundingBox( rObj, aPropOpt );
+ aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
if( mpEscherEx->GetGroupLevel() > 1 )
mpEscherEx->AddChildAnchor( rObj.GetRect() );
@@ -826,6 +827,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
rObj.GetRect() );
}
rObj.SetAngle( nAngle );
+ aPropOpt.CreateShapeProperties( rObj.GetShapeRef() );
mpEscherEx->Commit( aPropOpt, rObj.GetRect() );
// write the childanchor
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index c96dab01c9c1..05411501218e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5416,6 +5416,13 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
pRet =
ProcessObj( rSt, aObjData, pClientData, aTextRect, pRet);
+ if ( pRet )
+ {
+ sal_Int32 nGroupProperties( GetPropertyValue( DFF_Prop_fPrint ) );
+ pRet->SetVisible( ( nGroupProperties & 2 ) == 0 );
+ pRet->SetPrintable( ( nGroupProperties & 1 ) != 0 );
+ }
+
if ( mbTracing )
mpTracer->RemoveAttribute( aObjData.nSpFlags & SP_FGROUP
? rtl::OUString::createFromAscii( "GroupShape" )
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 8d8e48832dc9..73868d3a9f55 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -5087,6 +5087,10 @@ void PPTStyleTextPropReader::ReadParaProps( SvStream& rIn, SdrPowerPointImport&
rIn >> nCharCount
>> aParaPropSet.pParaSet->mnDepth; // Einruecktiefe
+ aParaPropSet.pParaSet->mnDepth =
+ std::min(sal_uInt16(9),
+ aParaPropSet.pParaSet->mnDepth);
+
nCharCount--;
rIn >> nMask;
@@ -5320,8 +5324,8 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
DffRecordHeader aTextHd;
rIn >> aTextHd;
sal_uInt32 nMaxLen = aTextHd.nRecLen;
- if ( nMaxLen > 0xFFFF )
- nMaxLen = 0xFFFF;
+ if ( nMaxLen >= 0xFFFF )
+ nMaxLen = 0xFFFE;
if( aTextHd.nRecType == PPT_PST_TextCharsAtom )
{
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index c868a3ec3157..8115f36d76f8 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1926,6 +1926,7 @@ void PDFExport::ImplWriteBitmapEx( PDFWriter& rWriter, VirtualDevice& rDummyVDev
SvMemoryStream aStrm;
Bitmap aMask;
+ bool bTrueColorJPG = true;
if ( bUseJPGCompression )
{
sal_uInt32 nZippedFileSize; // sj: we will calculate the filesize of a zipped bitmap
@@ -1956,12 +1957,13 @@ void PDFExport::ImplWriteBitmapEx( PDFWriter& rWriter, VirtualDevice& rDummyVDev
aFilterData[ 1 ].Value <<= nColorMode;
/*sal_uInt16 nError =*/ aGraphicFilter.ExportGraphic( aGraphic, String(), aStrm, nFormatName, &aFilterData );
+ bTrueColorJPG = ((aGraphicFilter.GetExportGraphicHint() & GRFILTER_OUTHINT_GREY) == 0);
aStrm.Seek( STREAM_SEEK_TO_END );
if ( aStrm.Tell() > nZippedFileSize )
bUseJPGCompression = sal_False;
}
if ( bUseJPGCompression )
- rWriter.DrawJPGBitmap( aStrm, true, aSizePixel, Rectangle( aPoint, aSize ), aMask );
+ rWriter.DrawJPGBitmap( aStrm, bTrueColorJPG, aSizePixel, Rectangle( aPoint, aSize ), aMask );
else if ( aBitmapEx.IsTransparent() )
rWriter.DrawBitmapEx( aPoint, aSize, aBitmapEx );
else
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index f2ad20613a22..d2de4882dead 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -174,6 +174,8 @@ namespace frm
m_eListSourceType = ListSourceType_VALUELIST;
m_aBoundColumn <<= (sal_Int16)1;
initValueProperty( PROPERTY_SELECT_SEQ, PROPERTY_ID_SELECT_SEQ);
+
+ startAggregatePropertyListening( PROPERTY_STRINGITEMLIST );
}
//------------------------------------------------------------------
@@ -191,6 +193,8 @@ namespace frm
,m_nBoundColumnType( DataType::SQLNULL )
{
DBG_CTOR(OListBoxModel,NULL);
+
+ startAggregatePropertyListening( PROPERTY_STRINGITEMLIST );
}
//------------------------------------------------------------------
@@ -453,6 +457,22 @@ namespace frm
}
//------------------------------------------------------------------------------
+ void OListBoxModel::_propertyChanged( const PropertyChangeEvent& i_rEvent ) throw ( RuntimeException )
+ {
+ if ( i_rEvent.PropertyName == PROPERTY_STRINGITEMLIST )
+ {
+ ControlModelLock aLock( *this );
+ // SYNCHRONIZED ----->
+ // our aggregate internally changed its StringItemList property - reflect this in our "overridden"
+ // version of the property
+ setNewStringItemList( i_rEvent.NewValue, aLock );
+ // <----- SYNCHRONIZED
+ return;
+ }
+ OBoundControlModel::_propertyChanged( i_rEvent );
+ }
+
+ //------------------------------------------------------------------------------
void OListBoxModel::describeAggregateProperties( Sequence< Property >& _rAggregateProps ) const
{
OBoundControlModel::describeAggregateProperties( _rAggregateProps );
diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx
index 04db6069d89e..46ab6b872fb8 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -134,6 +134,9 @@ protected:
// XEventListener
virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw (::com::sun::star::uno::RuntimeException);
+ // OPropertyChangeListener
+ virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& _rEvt ) throw ( ::com::sun::star::uno::RuntimeException );
+
// prevent method hiding
using OBoundControlModel::getFastPropertyValue;
using OBoundControlModel::setPropertyValues;
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index c0296892cb65..ac59a4f65b99 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -147,6 +147,7 @@ VistaFilePickerImpl::VistaFilePickerImpl()
, m_lLastFiles ()
, m_iEventHandler(new VistaFilePickerEventHandler(this))
, m_bInExecute (sal_False)
+ , m_bWasExecuted (sal_False)
, m_sDirectory ()
, m_sFilename ()
{
@@ -851,6 +852,8 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
// tasks must be done differently .-) (e.g. see impl_sta_getSelectedFiles())
m_bInExecute = sal_True;
+ m_bWasExecuted = sal_True;
+
aLock.clear();
// <- SYNCHRONIZED
@@ -1092,6 +1095,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest)
return;
css::uno::Any aValue;
+ if( m_bWasExecuted )
switch (nId)
{
case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PASSWORD :
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index 3b0fa43b0dad..6be17935609b 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -329,6 +329,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
/// @todo document me
::sal_Bool m_bInExecute;
+ ::sal_Bool m_bWasExecuted;
+
// handle to parent window
HWND m_hParentWindow;
diff --git a/framework/inc/classes/menumanager.hxx b/framework/inc/classes/menumanager.hxx
index 5c14edde9c03..8826716f1d6f 100644
--- a/framework/inc/classes/menumanager.hxx
+++ b/framework/inc/classes/menumanager.hxx
@@ -82,13 +82,14 @@ class MenuManager : public ThreadHelpBase ,
Menu* pMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
-
+#if 0
MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
REFERENCE< XFRAME >& rFrame,
AddonMenu* pAddonMenu,
sal_Bool bDelete,
sal_Bool bDeleteChildren );
+#endif
virtual ~MenuManager();
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index e7d670e9559b..5e780edb366b 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -60,6 +60,9 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
+//shizhoubo
+#include <com/sun/star/frame/XToolbarController.hpp>
+//end
//_________________________________________________________________________________________________________________
// other includes
//_________________________________________________________________________________________________________________
@@ -185,6 +188,9 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL );
void CreateControllers();
void UpdateControllers();
+ //for update controller via Support Visiable by shizhoubo
+ void UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController);
+ //end
void AddFrameActionListener();
void AddImageOrientationListener();
void UpdateImageOrientation();
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 0b2f30093ca8..61cb8eb4a253 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -357,6 +357,7 @@ MenuManager::MenuManager(
SetHdl();
}
+#if 0
// #110897#
MenuManager::MenuManager(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
@@ -413,6 +414,7 @@ MenuManager::MenuManager(
SetHdl();
}
+#endif
void MenuManager::SetHdl()
{
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index fb3d6a18eb79..0f6815a69cc3 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -41,6 +41,7 @@
#include "tools/urlobj.hxx"
#include "unotools/dynamicmenuoptions.hxx"
+#include "unotools/historyoptions.hxx"
#include "svtools/imagemgr.hxx"
#include "svtools/svtools.hrc"
@@ -48,14 +49,18 @@
#include "comphelper/sequenceashashmap.hxx"
#include "comphelper/configurationhelper.hxx"
+#include "cppuhelper/implbase1.hxx"
+
#include "rtl/strbuf.hxx"
#include "rtl/ustrbuf.hxx"
+#include "osl/file.h"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/system/XSystemShellExecute.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
#include "com/sun/star/task/XJobExecutor.hpp"
+#include "com/sun/star/util/XStringWidth.hpp"
using namespace ::com::sun::star::beans;
@@ -110,6 +115,20 @@ Size DecoToolBox::getMinSize()
return maMinSize;
}
+class RecentFilesStringLength : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XStringWidth >
+{
+ public:
+ RecentFilesStringLength() {}
+ virtual ~RecentFilesStringLength() {}
+
+ // XStringWidth
+ sal_Int32 SAL_CALL queryStringWidth( const ::rtl::OUString& aString )
+ throw (::com::sun::star::uno::RuntimeException)
+ {
+ return aString.getLength();
+ }
+};
+
#define STC_BUTTON_STYLE (WB_LEFT | WB_VCENTER | WB_FLATBUTTON | WB_BEVELBUTTON)
BackingWindow::BackingWindow( Window* i_pParent ) :
@@ -134,7 +153,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
mnLayoutStyle( 0 ),
mpAccExec( NULL ),
mnBtnPos( 120 ),
- mnBtnTop( 150 )
+ mnBtnTop( 150 ),
+ mpRecentMenu( NULL )
{
mnColumnWidth[0] = mnColumnWidth[1] = 0;
mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0;
@@ -233,6 +253,7 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
BackingWindow::~BackingWindow()
{
+ delete mpRecentMenu;
delete mpAccExec;
}
@@ -261,6 +282,116 @@ void BackingWindow::DataChanged( const DataChangedEvent& rDCEvt )
}
}
+void BackingWindow::prepareRecentFileMenu()
+{
+ if( ! mpRecentMenu )
+ mpRecentMenu = new PopupMenu();
+ mpRecentMenu->Clear();
+ maRecentFiles.clear();
+
+ // get recent file list and dispatch arguments
+ Sequence< Sequence< PropertyValue > > aHistoryList( SvtHistoryOptions().GetList( ePICKLIST ) );
+
+ sal_Int32 nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength();
+
+ if( ( nPickListMenuItems > 0 ) )
+ {
+ maRecentFiles.reserve( nPickListMenuItems );
+ for ( sal_Int32 i = 0; i < nPickListMenuItems; i++ )
+ {
+ Sequence< PropertyValue >& rPickListEntry = aHistoryList[i];
+ rtl::OUString aURL, aFilter, aFilterOpt, aTitle;
+
+ for ( sal_Int32 j = 0; j < rPickListEntry.getLength(); j++ )
+ {
+ const Any& a = rPickListEntry[j].Value;
+
+ if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_URL )
+ a >>= aURL;
+ else if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_FILTER )
+ {
+ a >>= aFilter;
+ sal_Int32 nPos = aFilter.indexOf( '|' );
+ if ( nPos >= 0 )
+ {
+ if ( nPos < ( aFilter.getLength() - 1 ) )
+ aFilterOpt = aFilter.copy( nPos+1 );
+ aFilter = aFilter.copy( 0, nPos-1 );
+ }
+ }
+ else if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_TITLE )
+ a >>= aTitle;
+ }
+ maRecentFiles.push_back( LoadRecentFile() );
+ maRecentFiles.back().aTargetURL = aURL;
+
+ sal_Int32 nArgs = aFilterOpt.getLength() ? 4 : 3;
+ Sequence< PropertyValue >& rArgsList( maRecentFiles.back().aArgSeq );
+ rArgsList.realloc( nArgs );
+
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
+ rArgsList[nArgs].Value = makeAny( aFilter );
+
+ if( aFilterOpt.getLength() )
+ {
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterOptions" ));
+ rArgsList[nArgs].Value = makeAny( aFilterOpt );
+ }
+
+ // documents in the picklist will never be opened as templates
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AsTemplate" ));
+ rArgsList[nArgs].Value = makeAny( (sal_Bool) sal_False );
+
+ nArgs--;
+ rArgsList[nArgs].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Referer" ));
+ rArgsList[nArgs].Value = makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:user" ) ) );
+
+ // and finally create an entry in the popupmenu
+ rtl::OUString aMenuTitle;
+ INetURLObject aURLObj( aURL );
+
+ if ( aURLObj.GetProtocol() == INET_PROT_FILE )
+ {
+ // Do handle file URL differently => convert it to a system
+ // path and abbreviate it with a special function:
+ String aFileSystemPath( aURLObj.getFSysPath( INetURLObject::FSYS_DETECT ) );
+
+ rtl::OUString aSystemPath( aFileSystemPath );
+ rtl::OUString aCompactedSystemPath;
+
+ oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, NULL );
+ if ( !nError )
+ aMenuTitle = String( aCompactedSystemPath );
+ else
+ aMenuTitle = aSystemPath;
+ }
+ else
+ {
+ // Use INetURLObject to abbreviate all other URLs
+ Reference< util::XStringWidth > xStringLength( new RecentFilesStringLength() );
+ aMenuTitle = aURLObj.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS );
+ }
+ rtl::OUStringBuffer aBuf( aMenuTitle.getLength() + 5 );
+ if( i < 9 )
+ {
+ aBuf.append( sal_Unicode( '~' ) );
+ aBuf.append( i+1 );
+ }
+ else if( i == 9 )
+ aBuf.appendAscii( "1~0" );
+ else
+ aBuf.append( i+1 );
+ aBuf.appendAscii( ": " );
+ aBuf.append( aMenuTitle );
+ mpRecentMenu->InsertItem( static_cast<USHORT>(i+1), aBuf.makeStringAndClear() );
+ }
+ maOpenButton.SetPopupMenu( mpRecentMenu );
+ }
+}
+
void BackingWindow::initBackground()
{
SetBackground( GetSettings().GetStyleSettings().GetWorkspaceGradient() );
@@ -327,6 +458,9 @@ void BackingWindow::initBackground()
loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton );
loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton );
+ maOpenButton.SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
+ maOpenButton.SetSelectHdl( LINK( this, BackingWindow, SelectHdl ) );
+ prepareRecentFileMenu();
}
void BackingWindow::initControls()
@@ -515,7 +649,7 @@ void BackingWindow::initControls()
maWriterButton.GrabFocus();
}
-void BackingWindow::loadImage( const ResId& i_rId, ImageButton& i_rButton )
+void BackingWindow::loadImage( const ResId& i_rId, PushButton& i_rButton )
{
BitmapEx aBmp( i_rId );
Size aImgSize( aBmp.GetSizePixel() );
@@ -530,7 +664,7 @@ void BackingWindow::layoutButton(
const char* i_pURL, int nColumn,
const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
- ImageButton& i_rBtn,
+ PushButton& i_rBtn,
MnemonicGenerator& i_rMnemns,
const String& i_rStr
)
@@ -908,6 +1042,20 @@ IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton )
return 0;
}
+IMPL_LINK( BackingWindow, SelectHdl, Button*, pButton )
+{
+ if( pButton == &maOpenButton )
+ {
+ sal_Int32 nItem = sal_Int32(maOpenButton.GetCurItemId())-1;
+ if( nItem >= 0 && nItem < sal_Int32(maRecentFiles.size()) )
+ {
+ Reference< XDispatchProvider > xFrame( mxFrame, UNO_QUERY );
+ dispatchURL( maRecentFiles[nItem].aTargetURL, rtl::OUString(), xFrame, maRecentFiles[nItem].aArgSeq );
+ }
+ }
+ return 0;
+}
+
struct ImplDelayedDispatch
{
Reference< XDispatch > xDispatch;
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index c4d4c9b0b76b..eaf5e9ec5a23 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -31,6 +31,7 @@
#include "rtl/ustring.hxx"
#include "vcl/button.hxx"
+#include "vcl/menubtn.hxx"
#include "vcl/fixed.hxx"
#include "vcl/bitmapex.hxx"
#include "vcl/toolbox.hxx"
@@ -77,6 +78,12 @@ namespace framework
class BackingWindow : public Window
{
+ struct LoadRecentFile
+ {
+ rtl::OUString aTargetURL;
+ com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aArgSeq;
+ };
+
com::sun::star::uno::Reference<com::sun::star::frame::XDesktop> mxDesktop;
com::sun::star::uno::Reference<com::sun::star::frame::XDispatchProvider > mxDesktopDispatchProvider;
com::sun::star::uno::Reference<com::sun::star::frame::XFrame> mxFrame;
@@ -89,7 +96,7 @@ namespace framework
ImageButton maWriterButton;
ImageButton maCalcButton;
ImageButton maImpressButton;
- ImageButton maOpenButton;
+ MenuButton maOpenButton;
ImageButton maDrawButton;
ImageButton maDBButton;
ImageButton maMathButton;
@@ -123,6 +130,9 @@ namespace framework
long mnBtnPos;
long mnBtnTop;
+ PopupMenu* mpRecentMenu;
+ std::vector< LoadRecentFile > maRecentFiles;
+
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
static const int nItemId_Info = 3;
@@ -132,11 +142,11 @@ namespace framework
static const int nShadowRight = 45;
static const int nShadowBottom = 50;
- void loadImage( const ResId& i_rId, ImageButton& i_rButton );
+ void loadImage( const ResId& i_rId, PushButton& i_rButton );
void layoutButton( const char* i_pURL, int nColumn, const std::set<rtl::OUString>& i_rURLS,
SvtModuleOptions& i_rOpt, SvtModuleOptions::EModule i_eMod,
- ImageButton& i_rBtn,
+ PushButton& i_rBtn,
MnemonicGenerator& i_rMnemonicGen,
const String& i_rStr = String()
);
@@ -148,10 +158,12 @@ namespace framework
);
DECL_LINK( ClickHdl, Button* );
+ DECL_LINK( SelectHdl, Button* );
DECL_LINK( ToolboxHdl, void* );
void initControls();
void initBackground();
+ void prepareRecentFileMenu();
public:
BackingWindow( Window* pParent );
~BackingWindow();
@@ -160,7 +172,7 @@ namespace framework
virtual void Resize();
virtual long Notify( NotifyEvent& rNEvt );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- virtual void GetFocus();
+ virtual void GetFocus();
void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
};
diff --git a/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 7ad8b4c3cede..ef037c75778a 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -51,7 +51,7 @@ Window DLG_BACKING
};
String STR_BACKING_FILE
{
- Text [ en-US ] = "~Open a document...";
+ Text [ en-US ] = "~Open...";
};
String STR_BACKING_EXTHELP
{
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index e99e08895a3f..5227cb9f302c 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -855,6 +855,7 @@ void PathSettings::impl_setPathValue( sal_Int32 nID ,
::rtl::OUString sVal;
aVal >>= sVal;
OUStringList lList = impl_convertOldStyle2Path(sVal);
+ impl_subst(lList, fa_getSubstitution(), sal_False);
impl_purgeKnownPaths(aChangePath, lList);
if (! impl_isValidPath(lList))
throw css::lang::IllegalArgumentException();
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 2905d0c0bd05..30b0fe5fec1c 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -93,6 +93,9 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo
if ( pVCLPopupMenu )
pPopupMenu = (PopupMenu *)pVCLPopupMenu->GetMenu();
+ if (!pPopupMenu)
+ return;
+
// insert basic
String aCommand = String::CreateFromAscii( ".uno:MacroDialog" );
String aDisplayName = RetrieveLabelFromCommand( aCommand );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index abb263497854..f965d38f6b46 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -517,7 +517,47 @@ void ToolBarManager::UpdateControllers()
}
m_bUpdateControllers = sal_False;
}
+//for update toolbar controller via Support Visible by shizhoubo
+void ToolBarManager::UpdateController( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xController)
+{
+ RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::UpdateControllers" );
+
+ if ( !m_bUpdateControllers )
+ {
+ m_bUpdateControllers = sal_True;
+ try
+ { if(xController.is())
+ {
+ Reference< XUpdatable > xUpdatable( xController, UNO_QUERY );
+ if ( xUpdatable.is() )
+ xUpdatable->update();
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+
+ /* m_bUpdateControllers = sal_True;
+ ToolBarControllerMap::iterator pIter = m_aControllerMap.begin();
+ while ( pIter != m_aControllerMap.end() )
+ {
+ try
+ {
+ Reference< XUpdatable > xUpdatable( pIter->second, UNO_QUERY );
+ if ( xUpdatable.is() )
+ xUpdatable->update();
+ }
+ catch ( Exception& )
+ {
+ }
+ ++pIter;
+ }*/
+
+ }
+ m_bUpdateControllers = sal_False;
+}
+//end
void ToolBarManager::frameAction( const FrameActionEvent& Action )
throw ( RuntimeException )
{
@@ -1072,6 +1112,19 @@ void ToolBarManager::CreateControllers()
Sequence< Any > aArgs( comphelper::containerToSequence( aPropertyVector ));
xInit->initialize( aArgs );
+ //for Support Visiblitly by shizhoubo
+ if (pController)
+ {
+ // rtl::OUString aCommandURL = pController->m_aCommandURL;
+ if(aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:SwitchXFormsDesignMode" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ViewDataSourceBrowser" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaLeftToRight" )) ||
+ aCommandURL == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:ParaRightToLeft" ))
+ )
+ pController->setFastPropertyValue_NoBroadcast(1,makeAny(sal_True));
+ }
+
+ //end
}
// Request a item window from the toolbar controller and set it at the VCL toolbar
@@ -1092,6 +1145,31 @@ void ToolBarManager::CreateControllers()
}
}
}
+ //for update Controller via support visiable state by shizhoubo
+ Reference< XPropertySet > xPropSet( xController, UNO_QUERY );
+ if ( xPropSet.is() )
+ {
+ try
+ {
+ sal_Bool bSupportVisiable = sal_True;
+ Any a( xPropSet->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SupportsVisiable" ))) );
+ a >>= bSupportVisiable;
+ if ( bSupportVisiable )
+ {
+ Reference< XToolbarController > xTbxController( xController, UNO_QUERY );
+ UpdateController(xTbxController);
+ }
+ }
+ catch ( RuntimeException& )
+ {
+ throw;
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+ //end
+
}
AddFrameActionListener();
diff --git a/i18npool/source/breakiterator/data/ja.dic b/i18npool/source/breakiterator/data/ja.dic
index ed76e4b4a271..d2923833e57d 100644
--- a/i18npool/source/breakiterator/data/ja.dic
+++ b/i18npool/source/breakiterator/data/ja.dic
@@ -21386,6 +21386,7 @@
シャッター
シャット
シャットアウト
+シャットダウン
シャッãƒ
シャツ
シャトル
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt
index 3ab09afdb990..dea5e9767a6e 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/ControlE.idt
@@ -56,7 +56,6 @@ InstallChangeFolder Cancel NewDialog DestinationFolder 1 2
InstallChangeFolder Cancel Reset 0 1 1
InstallChangeFolder OK NewDialog DestinationFolder 1 3
InstallChangeFolder OK SetTargetPath [_BrowseProperty] 1 2
-InstallChangeFolder OK DoAction SetOfficeInstallLocation 1 4
InstallChangeFolder Up DirectoryListUp 0 1 0
InstallWelcome Back NewDialog SplashBitmap Display_IsBitmapDlg 1
InstallWelcome Cancel SpawnDialog CancelSetup 1 0
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
index d9971918d3f5..7af1c7b26429 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/CustomAc.idt
@@ -5,9 +5,6 @@ setAllUsersProfile2K 51 ALLUSERSPROFILE [%ALLUSERSPROFILE]
SetAllUsersProfileNT 51 ALLUSERSPROFILE [%SystemRoot]\Profiles\All Users
setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
-SetOfficeInstallLocation 51 OFFICEINSTALLLOCATION [OFFICEDIRECTORYGID]
-SetBasisInstallLocation 51 BASISINSTALLLOCATION [BASISDIRECTORYGID]
-SetUreInstallLocation 51 UREINSTALLLOCATION [UREDIRECTORYGID]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
RunningOffice 19 OOO_CUSTOMACTION_4
diff --git a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
index 5db654cb045c..90ba9c6a6005 100644
--- a/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_ooolangpack/windows/msi_templates/InstallE.idt
@@ -56,9 +56,6 @@ ScheduleReboot ISSCHEDULEREBOOT 3125
SelfRegModules 2850
SelfUnregModules 1100
SetARPInstallLocation 990
-SetOfficeInstallLocation Not Installed 575
-SetBasisInstallLocation Not Installed 576
-SetUreInstallLocation Not Installed 577
SetODBCFolders 550
StartServices VersionNT 2800
StopServices VersionNT 950
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt
index 0be369431d84..ede3f7cb4f42 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AdminExe.idt
@@ -11,6 +11,3 @@ InstallFinalize 400
InstallInitialize 250
InstallValidate 200
ScheduleReboot ISSCHEDULEREBOOT 375
-SetOfficeInstallLocation 410
-SetBasisInstallLocation 420
-SetUreInstallLocation 430
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
index a4a5415fd928..9bb051e56492 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
@@ -1,17 +1,5 @@
Property Signature_
s72 s72
AppSearch Property Signature_
-UREUNINSTALLLOCATION ureuninstalluser
-UREUNINSTALLLOCATION ureuninstallmachine
-BASISUNINSTALLLOCATION basisuninstalluser
-BASISUNINSTALLLOCATION basisuninstallmachine
-OFFICEUNINSTALLLOCATION officeuninstalluser
-OFFICEUNINSTALLLOCATION officeuninstallmachine
-UREINSTALLLOCATION ureuninstalluser
-UREINSTALLLOCATION ureuninstallmachine
-BASISINSTALLLOCATION basisuninstalluser
-BASISINSTALLLOCATION basisuninstallmachine
-OFFICEINSTALLLOCATION officeuninstalluser
-OFFICEINSTALLLOCATION officeuninstallmachine
INSTALLLOCATION installuser
INSTALLLOCATION installmachine
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
index 80514fd1904b..17a47e8e9889 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
@@ -122,9 +122,6 @@ setAllUsersProfile2K 51 ALLUSERSPROFILE [%ALLUSERSPROFILE]
SetAllUsersProfileNT 51 ALLUSERSPROFILE [%SystemRoot]\Profiles\All Users
setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
-SetOfficeInstallLocation 51 OFFICEINSTALLLOCATION [OFFICEDIRECTORYGID]
-SetBasisInstallLocation 51 BASISINSTALLLOCATION [BASISDIRECTORYGID]
-SetUreInstallLocation 51 UREINSTALLLOCATION [UREDIRECTORYGID]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
SetLanguageSelected 51 LANG_SELECTED 1
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
index 11f97a0bb797..defde2299409 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
@@ -173,9 +173,6 @@ ScheduleReboot ISSCHEDULEREBOOT 3125
SelfRegModules 2850
SelfUnregModules 1100
SetARPInstallLocation 990
-SetOfficeInstallLocation Not Installed 575
-SetBasisInstallLocation Not Installed 576
-SetUreInstallLocation Not Installed 577
SetODBCFolders 550
StartServices VersionNT 2800
StopServices VersionNT 950
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
index 6009edf00041..edc952694014 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt
@@ -44,7 +44,7 @@ Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE
RebootYesNo Yes
ReinstallModeText omus
REMOVEOLDPRODUCTS 1
-SecureCustomProperties NEWPRODUCTS;SAMEPRODUCTS;OLDPRODUCTS;OLDPRODUCTSSAMEMAJOR;OLDPRODUCTS2;BETAPRODUCTS;STUBPRODUCTS;O2LPENUS;O2LPPT;O2LPRU;O2LPEL;O2LPNL;O2LPFR;O2LPES;O2LPFI;O2LPHU;O2LPCA;O2LPIT;O2LPCS;O2LPSK;O2LPENGB;O2LPDA;O2LPSV;O2LPNO;O2LPPL;O2LPDE;O2LPPTBR;O2LPTH;O2LPET;O2LPJA;O2LPKO;O2LPZHCN;O2LPZHTW;O2LPTR;O2LPHI;O2LPAR;O2LPHE
+SecureCustomProperties NEWPRODUCTS;SAMEPRODUCTS;OLDPRODUCTS;OLDPRODUCTSSAMEMAJOR;OLDPRODUCTS2;BETAPRODUCTS;STUBPRODUCTS;O2LPAF;O2LPAR;O2LPASIN;O2LPBEBY;O2LPBO;O2LPBG;O2LPBR;O2LPBRX;O2LPBN;O2LPBNBD;O2LPBNIN;O2LPBS;O2LPBY;O2LPCA;O2LPCS;O2LPCY;O2LPDA;O2LPDE;O2LPDGO;O2LPDZ;O2LPEL;O2LPENGB;O2LPENUS;O2LPENZA;O2LPEO;O2LPES;O2LPET;O2LPEU;O2LPFA;O2LPFI;O2LPFR;O2LPGA;O2LPGD;O2LPGL;O2LPGU;O2LPGUIN;O2LPHE;O2LPHI;O2LPHIIN;O2LPHR;O2LPHU;O2LPIS;O2LPIT;O2LPJA;O2LPKID;O2LPKY;O2LPKA;O2LPKK;O2LPKM;O2LPKN;O2LPKO;O2LPKOK;O2LPKS;O2LPKU;O2LPLO;O2LPLT;O2LPLV;O2LPMAI;O2LPMK;O2LPMN;O2LPMNI;O2LPMS;O2LPMLIN;O2LPMRIN;O2LPMY;O2LPNE;O2LPNB;O2LPNL;O2LPNN;O2LPNO;O2LPNR;O2LPNS;O2LPOM;O2LPOC;O2LPORIN;O2LPPAP;O2LPPAIN;O2LPPL;O2LPPS;O2LPPT;O2LPPTBR;O2LPRU;O2LPRW;O2LPSAT;O2LPSAIN;O2LPSI;O2LPSC;O2LPSD;O2LPSK;O2LPSL;O2LPSH;O2LPSR;O2LPSS;O2LPST;O2LPSV;O2LPSW;O2LPSWTZ;O2LPTEIN;O2LPTIER;O2LPTAIN;O2LPTH;O2LPTN;O2LPTR;O2LPTS;O2LPTG;O2LPUG;O2LPURIN;O2LPUK;O2LPUZ;O2LPVE;O2LPVI;O2LPXH;O2LPZHCN;O2LPZHTW;O2LPZU
SetupType Typical
SELECT_WORD 0
SELECT_EXCEL 0
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
index 349aa0604ca3..2fb2d2963727 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt
@@ -1,11 +1,5 @@
Signature_ Root Key Name Type
s72 i2 s255 S255 I2
RegLocator Signature_
-ureuninstalluser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] UREINSTALLLOCATION 2
-ureuninstallmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] UREINSTALLLOCATION 2
-basisuninstalluser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] BASISINSTALLLOCATION 2
-basisuninstallmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] BASISINSTALLLOCATION 2
-officeuninstalluser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] OFFICEINSTALLLOCATION 2
-officeuninstallmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] OFFICEINSTALLLOCATION 2
installuser 1 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
installmachine 2 Software\OpenOffice.org\LAYERNAMETEMPLATE\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2
diff --git a/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt b/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt
index b9a99b9fb502..ede3f7cb4f42 100644
--- a/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt
+++ b/instsetoo_native/inc_ure/windows/msi_templates/AdminExe.idt
@@ -11,4 +11,3 @@ InstallFinalize 400
InstallInitialize 250
InstallValidate 200
ScheduleReboot ISSCHEDULEREBOOT 375
-SetUreInstallLocation 430
diff --git a/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt
index c6607481274c..ed030dc3e17c 100644
--- a/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_ure/windows/msi_templates/CustomAc.idt
@@ -6,6 +6,5 @@ setAllUsersProfile2K 51 ALLUSERSPROFILE [%ALLUSERSPROFILE]
SetAllUsersProfileNT 51 ALLUSERSPROFILE [%SystemRoot]\Profiles\All Users
setUserProfileNT 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
-SetUreInstallLocation 51 UREINSTALLLOCATION [UREDIRECTORYGID]
SameProductFound 19 The same version of this product is already installed.
NewProductFound 19 A newer version of [ProductName] was found. To install an older version, the newer version needs to be removed first.
diff --git a/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt b/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt
index 0fbfa4bcf8b6..c1de8e4a19fe 100644
--- a/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_ure/windows/msi_templates/InstallE.idt
@@ -56,7 +56,6 @@ ScheduleReboot ISSCHEDULEREBOOT 3125
SelfRegModules 2850
SelfUnregModules 1100
SetARPInstallLocation Not Installed 990
-SetUreInstallLocation Not Installed 577
SetODBCFolders 550
StartServices VersionNT 2800
StopServices VersionNT 950
diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk
index 28b9c33628c5..885fba22411b 100644
--- a/instsetoo_native/util/makefile.mk
+++ b/instsetoo_native/util/makefile.mk
@@ -209,7 +209,7 @@ $(MAKETARGETS){$(PKGFORMAT:^".")} : $(ADDDEPS)
.ENDIF # "$(MAKETARGETS:e)"=="" && "$(MAKETARGETS:s/_//)"!="$(MAKETARGETS)"
.ENDIF # "$(MAKETARGETS)"!=""
openoffice_%{$(PKGFORMAT:^".") .archive} :
- $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH)
+ $(PERL) -w $(SOLARENV)$/bin$/make_installer.pl -f $(PRJ)$/util$/openoffice.lst -l $(subst,$(@:s/_/ /:1)_, $(@:b)) -p OpenOffice -u $(OUT) -buildid $(BUILD) -msitemplate $(MSIOFFICETEMPLATEDIR) -msilanguage $(COMMONMISC)$/win_ulffiles -format $(@:e:s/.//) $(VERBOSESWITCH) -log
$(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product OpenOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml > $(MISC)/$(@:b)_$(RTL_OS)_$(RTL_ARCH)$(@:e).update.xml
$(foreach,i,$(alllangiso) openofficewithjre_$i) : $$@{$(PKGFORMAT:^".")}
diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst
index 297ce32ef8c9..5fb95b4821f9 100644
--- a/instsetoo_native/util/openoffice.lst
+++ b/instsetoo_native/util/openoffice.lst
@@ -37,6 +37,7 @@ Globals
UPDATE_DATABASE_LISTNAME finals_instsetoo.txt
PACKAGEMAP package_names.txt,package_names_ext.txt
WINDOWSPATCHLEVEL 6
+ OOOVENDOR Oracle
OOODOWNLOADNAME 1
STARTCENTER_LAYOUT_STYLE 0
BUILDIDCWS {buildidcws}
@@ -82,7 +83,6 @@ OpenOffice
OPENSOURCE 1
SETSTATICPATH 1
OOODOWNLOADNAME 1
- PROGRAMFILESROOT 1
XPDINSTALLER 0
BETAUPGRADECODE
STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A}
@@ -147,7 +147,6 @@ OpenOffice_wJRE
OPENSOURCE 1
SETSTATICPATH 1
OOODOWNLOADNAME 1
- PROGRAMFILESROOT 1
XPDINSTALLER 1
BETAUPGRADECODE
STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A}
@@ -217,7 +216,6 @@ OpenOffice_Dev
OPENSOURCE 1
SETSTATICPATH 1
OOODOWNLOADNAME 1
- PROGRAMFILESROOT 1
XPDINSTALLER 1
BETAUPGRADECODE
STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A}
@@ -266,7 +264,6 @@ URE
SERVICESPROJEKT 1
SETSTATICPATH 1
NOVERSIONINDIRNAME 1
- PROGRAMFILESROOT 1
PCPFILENAME ure.pcp
POOLPRODUCT 0
GLOBALFILEGID gid_File_Dl_Cppu
@@ -425,7 +422,6 @@ BrOffice
SPELLCHECKERFILE spellchecker_selection.txt
OPENSOURCE 1
OOODOWNLOADNAME 1
- PROGRAMFILESROOT 1
XPDINSTALLER 0
BETAUPGRADECODE
STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A}
@@ -496,7 +492,6 @@ BrOffice_wJRE
SPELLCHECKERFILE spellchecker_selection.txt
OPENSOURCE 1
OOODOWNLOADNAME 1
- PROGRAMFILESROOT 1
XPDINSTALLER 1
BETAUPGRADECODE
STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A}
@@ -567,7 +562,6 @@ BrOffice_Dev
SPELLCHECKERFILE spellchecker_selection.txt
OPENSOURCE 1
OOODOWNLOADNAME 1
- PROGRAMFILESROOT 1
XPDINSTALLER 1
BETAUPGRADECODE
STUBUPGRADECODE {0E7B27B8-D658-4BF9-98D6-EC361582EB4A}
diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx
index 13fad506b54d..d1474503882f 100644
--- a/l10ntools/inc/export.hxx
+++ b/l10ntools/inc/export.hxx
@@ -461,6 +461,8 @@ public:
bTitleFirst[ nId ] = true;
}
BOOL GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+ BOOL GetTransex3Text( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel = FALSE );
+
};
//
diff --git a/l10ntools/scripts/localize.pl b/l10ntools/scripts/localize.pl
index 82ef331a63d5..4aea1d933992 100755..100644
--- a/l10ntools/scripts/localize.pl
+++ b/l10ntools/scripts/localize.pl
@@ -272,7 +272,9 @@ sub write_sdf
foreach my $lang( keys( %{ $string_hash } ) )
{
my @sdf_file;
+ next , if( $lang eq "en-US" );
+ mkdir $l10n_file."/$lang";
# mkdir!!!!
my $current_l10n_file = $l10n_file."/$lang/localize.sdf";
print "Writing '$current_l10n_file'\n";
@@ -380,11 +382,9 @@ sub merge_gsicheck{
my ( $TMPHANDLE , $tmpfile ) = File::Temp::tempfile();
close ( $TMPHANDLE );
- if( $ENV{WRAPCMD} ){
- $command = "$ENV{WRAPCMD} gsicheck";
- }else{
- $command = "gsicheck";
- }
+ $command = "$ENV{WRAPCMD} " if( $ENV{WRAPCMD} );
+ $command .= "$ENV{SOLARVER}/$ENV{INPATH}/bin/gsicheck";
+
my $errfile = $sdffile.".err";
$command .= " -k -c -wcf $tmpfile -wef $errfile -l \"\" $sdffile";
#my $rc = system( $command );
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index a3df11c2920b..59f29525eda4 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -2096,7 +2096,7 @@ BOOL Export::PrepareTextToMerge( ByteString &rText, USHORT nTyp,
}
ByteString sContent;
- pEntrys->GetText( sContent, nTyp, nLangIndex );
+ pEntrys->GetTransex3Text( sContent, nTyp, nLangIndex );
//if ( !sContent.Len() && ( ! nLangIndex.EqualsIgnoreCaseAscii("en-US") )) {
if ( !sContent.Len() && ( ! Export::isSourceLanguage( nLangIndex ) )) {
rText = sOrigText;
@@ -2158,7 +2158,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_TEXT, sCur , TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TEXT, sCur , TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2211,7 +2211,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_QUICKHELPTEXT, sCur, TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2258,7 +2258,7 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
sCur = aLanguages[ n ];
ByteString sText;
- BOOL bText = pEntry->GetText( sText, STRING_TYP_TITLE, sCur, TRUE );
+ BOOL bText = pEntry->GetTransex3Text( sText, STRING_TYP_TITLE, sCur, TRUE );
if ( bText && sText.Len() && sText != "-" ) {
ByteString sOutput;
if ( bNextMustBeDefineEOL) {
@@ -2343,9 +2343,9 @@ void Export::MergeRest( ResData *pResData, USHORT nMode )
//printf("Lang %s, List Index %d\n",sCur.GetBuffer(),(int)nLIndex);
ByteString sText;
BOOL bText;
- bText = pEntrys->GetText( sText, STRING_TYP_TEXT, sCur, TRUE );
+ bText = pEntrys->GetTransex3Text( sText, STRING_TYP_TEXT, sCur, TRUE );
if( !bText )
- bText = pEntrys->GetText( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
+ bText = pEntrys->GetTransex3Text( sText , STRING_TYP_TEXT, SOURCE_LANGUAGE , FALSE );
// Use fallback, if data is missing in sdf file
//if( !bText && pResData->sResTyp.Equals( "pairedlist" ) ){
diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx
index 2bbec4257c76..1d1428ff2dc0 100644
--- a/l10ntools/source/localize.cxx
+++ b/l10ntools/source/localize.cxx
@@ -960,8 +960,16 @@ int _cdecl main( int argc, char *argv[] )
aIter.SetLanguageRestriction( sLanguages );
if ( bExport ){
if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
- aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());}
+ if( *iter == "ooo" )
+ aIter.Extract( sFileName );
+ else
+ {
+ ByteString sFileNameWithExt( sFileName );
+ sFileNameWithExt += ByteString( "." );
+ sFileNameWithExt += ByteString( (*iter).c_str() );
+ aIter.Extract( sFileNameWithExt );
+ }
+ if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
}
}
if( hasPwd )
@@ -974,7 +982,7 @@ int _cdecl main( int argc, char *argv[] )
if ( bExport ){
if( bQuiet2 ){ /*printf("");*/fflush( stdout );}
aIter.Extract( sFileName );
- if( bQuiet2 ){ printf("\n %d files found!\n",aIter.GetFileCnt());}
+ if( bQuiet2 ){ printf("\n%d files found!\n",aIter.GetFileCnt());}
}
}
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index 3284b7026107..e15a5c8a28fa 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -50,6 +50,22 @@ ByteString PFormEntrys::Dump(){
return sRet;
}
+BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn,
+ USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
+{
+ BOOL rc = GetText( rReturn , nTyp , nLangIndex , bDel );
+ ByteString test( rReturn );
+ for( USHORT idx = 0; idx < rReturn.Len(); idx++ )
+ {
+ if( rReturn.GetChar( idx ) == '\"' && ( idx >= 1 ) && rReturn.GetChar( idx-1 ) == '\\' )
+ {
+ rReturn.Erase( idx-1 , 1 );
+ }
+ }
+ //if( !rReturn.Equals( test ) )
+ // printf("*CHANGED******************\n%s\n%s\n",test.GetBuffer(),rReturn.GetBuffer());
+ return rc;
+}
/*****************************************************************************/
BOOL PFormEntrys::GetText( ByteString &rReturn,
USHORT nTyp, const ByteString &nLangIndex, BOOL bDel )
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 969321ec3991..fe53bf344ac3 100644..100755
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -74,6 +74,12 @@ static const sal_Char* pVerStr5 = "WBSWG5";
static const sal_Char* pVerStr6 = "WBSWG6";
static const sal_Char* pVerOOo7 = "OOoUserDict1";
+static const INT16 DIC_VERSION_DONTKNOW = -1;
+static const INT16 DIC_VERSION_2 = 2;
+static const INT16 DIC_VERSION_5 = 5;
+static const INT16 DIC_VERSION_6 = 6;
+static const INT16 DIC_VERSION_7 = 7;
+
static sal_Bool getTag(const ByteString &rLine,
const sal_Char *pTagName, ByteString &rTagValue)
{
@@ -89,7 +95,7 @@ static sal_Bool getTag(const ByteString &rLine,
INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg )
{
// Sniff the header
- INT16 nDicVersion;
+ INT16 nDicVersion = DIC_VERSION_DONTKNOW;
sal_Char pMagicHeader[MAX_HEADER_LENGTH];
nLng = LANGUAGE_NONE;
@@ -107,7 +113,7 @@ INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg )
sal_Bool bSuccess;
ByteString aLine;
- nDicVersion = 7;
+ nDicVersion = DIC_VERSION_7;
// 1st skip magic / header line
rpStream->ReadLine(aLine);
@@ -160,17 +166,17 @@ INT16 ReadDicVersion( SvStreamPtr &rpStream, USHORT &nLng, BOOL &bNeg )
// Check version magic
if (0 == strcmp( pMagicHeader, pVerStr6 ))
- nDicVersion = 6;
+ nDicVersion = DIC_VERSION_6;
else if (0 == strcmp( pMagicHeader, pVerStr5 ))
- nDicVersion = 5;
+ nDicVersion = DIC_VERSION_5;
else if (0 == strcmp( pMagicHeader, pVerStr2 ))
- nDicVersion = 2;
+ nDicVersion = DIC_VERSION_2;
else
- nDicVersion = -1;
+ nDicVersion = DIC_VERSION_DONTKNOW;
- if (2 == nDicVersion ||
- 5 == nDicVersion ||
- 6 == nDicVersion)
+ if (DIC_VERSION_2 == nDicVersion ||
+ DIC_VERSION_5 == nDicVersion ||
+ DIC_VERSION_6 == nDicVersion)
{
// The language of the dictionary
*rpStream >> nLng;
@@ -203,7 +209,7 @@ DictionaryNeo::DictionaryNeo() :
nLanguage (LANGUAGE_NONE)
{
nCount = 0;
- nDicVersion = -1;
+ nDicVersion = DIC_VERSION_DONTKNOW;
bNeedEntries = FALSE;
bIsModified = bIsActive = FALSE;
bIsReadonly = FALSE;
@@ -220,7 +226,7 @@ DictionaryNeo::DictionaryNeo(const OUString &rName,
nLanguage (nLang)
{
nCount = 0;
- nDicVersion = -1;
+ nDicVersion = DIC_VERSION_DONTKNOW;
bNeedEntries = TRUE;
bIsModified = bIsActive = FALSE;
bIsReadonly = !bWriteable;
@@ -230,8 +236,8 @@ DictionaryNeo::DictionaryNeo(const OUString &rName,
BOOL bExists = FileExists( rMainURL );
if( !bExists )
{
- // save new dictionaries with in 6.0 Format (uses UTF8)
- nDicVersion = 6;
+ // save new dictionaries with in Format 7 (UTF8 plain text)
+ nDicVersion = DIC_VERSION_7;
//! create physical representation of an **empty** dictionary
//! that could be found by the dictionary-list implementation
@@ -303,13 +309,13 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL)
eDicType = bNegativ ? DictionaryType_NEGATIVE : DictionaryType_POSITIVE;
rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
- if (nDicVersion >= 6)
+ if (nDicVersion >= DIC_VERSION_6)
eEnc = RTL_TEXTENCODING_UTF8;
nCount = 0;
- if (6 == nDicVersion ||
- 5 == nDicVersion ||
- 2 == nDicVersion)
+ if (DIC_VERSION_6 == nDicVersion ||
+ DIC_VERSION_5 == nDicVersion ||
+ DIC_VERSION_2 == nDicVersion)
{
USHORT nLen = 0;
sal_Char aWordBuf[ BUFSIZE ];
@@ -363,7 +369,7 @@ ULONG DictionaryNeo::loadEntries(const OUString &rMainURL)
*(aWordBuf + nLen) = 0;
}
}
- else if (7 == nDicVersion)
+ else if (DIC_VERSION_7 == nDicVersion)
{
sal_Bool bSuccess;
ByteString aLine;
@@ -436,10 +442,10 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL)
ULONG nErr = sal::static_int_cast< ULONG >(-1);
rtl_TextEncoding eEnc = osl_getThreadTextEncoding();
- if (nDicVersion >= 6)
+ if (nDicVersion >= DIC_VERSION_6)
eEnc = RTL_TEXTENCODING_UTF8;
- if (nDicVersion == 7)
+ if (nDicVersion == DIC_VERSION_7)
{
pStream->WriteLine(ByteString (pVerOOo7));
if (0 != (nErr = pStream->GetError()))
@@ -482,7 +488,7 @@ ULONG DictionaryNeo::saveEntries(const OUString &rURL)
// write version
const sal_Char *pVerStr = NULL;
- if (6 == nDicVersion)
+ if (DIC_VERSION_6 == nDicVersion)
pVerStr = pVerStr6;
else
pVerStr = eDicType == DictionaryType_POSITIVE ? pVerStr2 : pVerStr5;
diff --git a/offapi/com/sun/star/awt/ItemListEvent.idl b/offapi/com/sun/star/awt/ItemListEvent.idl
new file mode 100644
index 000000000000..f9d2658bd5bd
--- /dev/null
+++ b/offapi/com/sun/star/awt/ItemListEvent.idl
@@ -0,0 +1,76 @@
+/*************************************************************************
+ * 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 __offapi_com_sun_star_awt_ListItemEvent_idl__
+#define __offapi_com_sun_star_awt_ListItemEvent_idl__
+
+#include <com/sun/star/lang/EventObject.idl>
+#include <com/sun/star/beans/Optional.idl>
+
+//==================================================================================================================
+
+module com { module sun { module star { module awt {
+
+//==================================================================================================================
+
+/** is the event broadcasted by a <type>XListItems</type> implementation for changes
+ in its item list.
+ */
+struct ItemListEvent : ::com::sun::star::lang::EventObject
+{
+ /** specifies the position of the item which is affected by the event
+
+ <p>In case the event is not related to a single item, but to the complete list, the value of this
+ member is undefined.</p>
+ */
+ long ItemPosition;
+
+ /** the text of the item.
+
+ <p>If the event being notified did not touch the text of an item, this member is empty. For instance, upon
+ invocation of <member>XItemList::setItemImage</member>, only <code>ItemImageURL</code> will be set, and
+ <code>ItemText</code> will be empty.</p>
+ */
+ ::com::sun::star::beans::Optional< string >
+ ItemText;
+
+ /** the URL of the image of the item
+
+ <p>If the event being notified did not touch the image of an item, this member is empty. For instance, upon
+ invocation of <member>XItemList::setItemText</member>, only <code>ItemText</code> will be set, and
+ <code>ItemImageURL</code> will be empty.</p>
+ */
+ ::com::sun::star::beans::Optional< string >
+ ItemImageURL;
+};
+
+//==================================================================================================================
+
+}; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
index 5017b05635ad..1cd36de93231 100644
--- a/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlListBoxModel.idl
@@ -39,6 +39,8 @@
#include <com/sun/star/util/Color.idl>
#endif
+#include <com/sun/star/awt/XItemList.idl>
+
//=============================================================================
@@ -208,6 +210,11 @@ published service UnoControlListBoxModel
this is possible.</p>
*/
[optional, property] short MouseWheelBehavior;
+
+ /** allows mmanipulating the list of items in the list box more fine-grained than the
+ <member>StringItemList</member> property.
+ */
+ [optional] interface XItemList;
};
//=============================================================================
diff --git a/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl b/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl
index 63364622c4ce..cf45f0aea0f0 100644
--- a/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl
+++ b/offapi/com/sun/star/awt/UnoControlSimpleAnimation.idl
@@ -45,9 +45,11 @@
/** specifies a simple animation control.
<p>The model of an <type>UnoControlSimpleAnimation</type> control must support
- the <type>UnoControlSimpleAnimationModel</type> service.
+ the <type>UnoControlSimpleAnimationModel</type> service.</p>
+
+ @since OOo 2.2
*/
-service UnoControlSimpleAnimation
+published service UnoControlSimpleAnimation
{
service com::sun::star::awt::UnoControl;
diff --git a/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl b/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl
index 1460adaa49d1..ca301483263f 100644
--- a/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlSimpleAnimationModel.idl
@@ -45,9 +45,10 @@
<p> </p>
@see UnoControlScrollBarModel
+ @since OOo 2.2
*/
-service UnoControlSimpleAnimationModel
+published service UnoControlSimpleAnimationModel
{
service com::sun::star::awt::UnoControlModel;
diff --git a/offapi/com/sun/star/awt/UnoControlThrobber.idl b/offapi/com/sun/star/awt/UnoControlThrobber.idl
index a798d1d842e2..f5194075019a 100644
--- a/offapi/com/sun/star/awt/UnoControlThrobber.idl
+++ b/offapi/com/sun/star/awt/UnoControlThrobber.idl
@@ -45,9 +45,11 @@
/** specifies a simple animation control.
<p>The model of an <type>UnoControlThrobber</type> control must support
- the <type>UnoControlThrobberModel</type> service.
+ the <type>UnoControlThrobberModel</type> service.</p>
+
+ @since OOo 2.2
*/
-service UnoControlThrobber
+published service UnoControlThrobber
{
service com::sun::star::awt::UnoControl;
diff --git a/offapi/com/sun/star/awt/UnoControlThrobberModel.idl b/offapi/com/sun/star/awt/UnoControlThrobberModel.idl
index 9b2f31853f2d..f2eacad5b76b 100644
--- a/offapi/com/sun/star/awt/UnoControlThrobberModel.idl
+++ b/offapi/com/sun/star/awt/UnoControlThrobberModel.idl
@@ -45,9 +45,10 @@
<p> </p>
@see UnoControlScrollBarModel
+ @since OOo 2.2
*/
-service UnoControlThrobberModel
+published service UnoControlThrobberModel
{
service com::sun::star::awt::UnoControlModel;
};
diff --git a/offapi/com/sun/star/awt/XItemList.idl b/offapi/com/sun/star/awt/XItemList.idl
new file mode 100644
index 000000000000..6419ea94d0b0
--- /dev/null
+++ b/offapi/com/sun/star/awt/XItemList.idl
@@ -0,0 +1,286 @@
+/*************************************************************************
+ * 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 __offapi_com_sun_star_awt_XItemList_idl__
+#define __offapi_com_sun_star_awt_XItemList_idl__
+
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+#include <com/sun/star/beans/Pair.idl>
+
+//==================================================================================================================
+
+module com { module sun { module star { module awt {
+
+interface XItemListListener;
+
+//==================================================================================================================
+
+/** provides convenient access to the list of items in a list box
+ */
+interface XItemList
+{
+ /** is the number of items in the list
+ */
+ [attribute, readonly] long ItemCount;
+
+ /** inserts a new item into the list
+
+ @param Position
+ the position at which the item should be inserted. Must be greater or equal to 0, and
+ lesser than or equal to <member>ItemCount</member>.
+
+ @param ItemText
+ the text of the item to be inserted.
+
+ @param ItemImageURL
+ the URL of the image to display for the item
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void insertItem(
+ [in] long Position,
+ [in] string ItemText,
+ [in] string ItemImageURL
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** inserts an item which has only a text, but no image
+
+ @param Position
+ the position at which the item should be inserted. Must be greater or equal to 0, and
+ lesser than or equal to <member>ItemCount</member>.
+
+ @param ItemText
+ the text of the item to be inserted.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void insertItemText(
+ [in] long Position,
+ [in] string ItemText
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** inserts an item which has only an image, but no text
+
+ @param Position
+ the position at which the item should be inserted. Must be greater or equal to 0, and
+ lesser than or equal to <member>ItemCount</member>.
+
+ @param ItemImageURL
+ the URL of the image to display for the item
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void insertItemImage(
+ [in] long Position,
+ [in] string ItemImageURL
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** removes an item from the list
+
+ @param Position
+ the position of the item which should be removed. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void removeItem(
+ [in] long Position
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** removes all items from the list
+ */
+ void removeAllItems();
+
+ /** sets a new text for an existing item
+
+ @param Position
+ the position of the item whose text is to be changed. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @param ItemText
+ the new text of the item
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void setItemText(
+ [in] long Position,
+ [in] string ItemText
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** sets a new image for an existing item
+
+ @param Position
+ the position of the item whose image is to be changed. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @param ItemImageURL
+ the new URL of the image to display for the item
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void setItemImage(
+ [in] long Position,
+ [in] string ItemImageURL
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** sets both a new position and text for an existing item
+
+ @param Position
+ the position of the item whose text and image is to be changed. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @param ItemText
+ the new text of the item
+
+ @param ItemImageURL
+ the new URL of the image to display for the item
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ void setItemTextAndImage(
+ [in] long Position,
+ [in] string ItemText,
+ [in] string ItemImageURL
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** associates an implementation dependend value with the given list item.
+
+ <p>You can use this to store data for an item which does not interfere with the displayed
+ text and image, but can be used by the client of the list box for an arbitrary purpose.</p>
+
+ @param Position
+ the position of the item whose data value should be set. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @param ItemData
+ the data to associate with the list item
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+
+ @see getItemData
+ */
+ void setItemData(
+ [in] long Position,
+ [in] any ItemData
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves the text of an existing item
+
+ @param Position
+ the position of the item whose text should be retrieved. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ string getItemText(
+ [in] long Position
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves the URL of the image of an existing item
+
+ @param Position
+ the position of the item whose image should be retrieved. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ string getItemImage(
+ [in] long Position
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves both the text and the image URL of an existing item
+
+ @param Position
+ the position of the item whose text and image should be retrieved. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+ */
+ ::com::sun::star::beans::Pair< string, string >
+ getItemTextAndImage(
+ [in] long Position
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves the implementation dependend value associated with the given list item.
+ @see setItemData
+
+ @param Position
+ the position of the item whose data value should be retrieved. Must be greater or equal to 0, and
+ lesser than <member>ItemCount</member>.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if <code>Position</code> is invalid.
+
+ @see setItemData
+ */
+ any getItemData(
+ [in] long Position
+ )
+ raises ( ::com::sun::star::lang::IndexOutOfBoundsException );
+
+ /** retrieves the texts and images of all items in the list
+ */
+ sequence< ::com::sun::star::beans::Pair< string, string > >
+ getAllItems();
+
+ /** registers a listener which is notified about changes in the item list.
+ */
+ void addItemListListener( [in] XItemListListener Listener );
+
+ /** revokes a listener which is notified about changes in the item list.
+ */
+ void removeItemListListener( [in] XItemListListener Listener );
+};
+
+//==================================================================================================================
+
+}; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/awt/XItemListListener.idl b/offapi/com/sun/star/awt/XItemListListener.idl
new file mode 100644
index 000000000000..d41d8b104a02
--- /dev/null
+++ b/offapi/com/sun/star/awt/XItemListListener.idl
@@ -0,0 +1,85 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __offapi_com_sun_star_awt_XItemListListener_idl__
+#define __offapi_com_sun_star_awt_XItemListListener_idl__
+
+#include <com/sun/star/lang/XEventListener.idl>
+#include <com/sun/star/awt/ItemListEvent.idl>
+
+//==================================================================================================================
+
+module com { module sun { module star { module awt {
+
+//==================================================================================================================
+
+/** describes a listener for changes in a item list
+ @see XListItems
+ */
+interface XItemListListener : ::com::sun::star::lang::XEventListener
+{
+ /** is called when an item is inserted into the list
+ */
+ void listItemInserted(
+ [in] ItemListEvent Event
+ );
+
+ /** is called when an item is removed from the list
+ */
+ void listItemRemoved(
+ [in] ItemListEvent Event
+ );
+
+ /** is called when an item in the list is modified, i.e. its text or image changed
+ */
+ void listItemModified(
+ [in] ItemListEvent Event
+ );
+ /** is called when the list has been completely cleared, i.e. after an invocation of
+ <member>XItemList::removeAllItems</member>
+ */
+ void allItemsRemoved(
+ [in] ::com::sun::star::lang::EventObject Event
+ );
+
+ /** is called when the changes to the item list which occured are too complex to be notified
+ in single events.
+
+ <p>Consumers of this event should discard their cached information about the current item list,
+ and completely refresh it from the <type>XItemList</type>'s current state.</p>
+ */
+ void itemListChanged(
+ [in] ::com::sun::star::lang::EventObject Event
+ );
+};
+
+//==================================================================================================================
+
+}; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/awt/XSimpleAnimation.idl b/offapi/com/sun/star/awt/XSimpleAnimation.idl
index 174e69c8184c..1cfd758590b9 100644
--- a/offapi/com/sun/star/awt/XSimpleAnimation.idl
+++ b/offapi/com/sun/star/awt/XSimpleAnimation.idl
@@ -43,7 +43,7 @@
/** Controls the animation control.
*/
-interface XSimpleAnimation: com::sun::star::uno::XInterface
+published interface XSimpleAnimation: com::sun::star::uno::XInterface
{
//-------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/awt/XThrobber.idl b/offapi/com/sun/star/awt/XThrobber.idl
index 934f85e8aa22..0a4ac133524a 100644
--- a/offapi/com/sun/star/awt/XThrobber.idl
+++ b/offapi/com/sun/star/awt/XThrobber.idl
@@ -43,7 +43,7 @@
/** Controls the animation control.
*/
-interface XThrobber: com::sun::star::uno::XInterface
+published interface XThrobber: com::sun::star::uno::XInterface
{
//-------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/awt/makefile.mk b/offapi/com/sun/star/awt/makefile.mk
index 1e2350a3a1d3..55734fd75ca6 100644
--- a/offapi/com/sun/star/awt/makefile.mk
+++ b/offapi/com/sun/star/awt/makefile.mk
@@ -328,7 +328,10 @@ IDLFILES=\
MenuLogo.idl \
XMenuExtended2.idl \
XMenuBarExtended.idl \
- XPopupMenuExtended.idl
+ XPopupMenuExtended.idl \
+ XItemList.idl \
+ XItemListListener.idl \
+ ItemListEvent.idl
# ------------------------------------------------------------------
diff --git a/offapi/com/sun/star/awt/tree/XTreeControl.idl b/offapi/com/sun/star/awt/tree/XTreeControl.idl
index a65b9eece27f..a5341257ba45 100644
--- a/offapi/com/sun/star/awt/tree/XTreeControl.idl
+++ b/offapi/com/sun/star/awt/tree/XTreeControl.idl
@@ -219,6 +219,17 @@ interface XTreeControl
*/
XTreeNode getClosestNodeForLocation( [in] long x, [in] long y );
+ /** returns the rectangle occupied by the visual representation of the given node
+
+ @param Node
+ the node whose geometry should be obtained
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ if the given node is <NULL/>, or does not belong to the tree's data model
+ */
+ ::com::sun::star::awt::Rectangle
+ getNodeRect( [in] XTreeNode Node )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+
// ------------
// tree editing
// ------------
diff --git a/offapi/com/sun/star/chart/ChartDocument.idl b/offapi/com/sun/star/chart/ChartDocument.idl
index dd52f2e02ba3..2c5227329778 100644
--- a/offapi/com/sun/star/chart/ChartDocument.idl
+++ b/offapi/com/sun/star/chart/ChartDocument.idl
@@ -39,9 +39,8 @@
#include <com/sun/star/xml/UserDefinedAttributeSupplier.idl>
#endif
-// #ifndef com_sun_star_chart2_data_XDataReceiver_idl
-// #include <com/sun/star/chart2/data/XDataReceiver.idl>
-// #endif
+#include <com/sun/star/drawing/XDrawPageSupplier.idl>
+
//=============================================================================
@@ -73,12 +72,7 @@ published service ChartDocument
interface ::com::sun::star::chart::XChartDocument;
interface ::com::sun::star::beans::XPropertySet;
- /** If this interface is implemented, it is possible to connect
- data to a chart via the improved data connection method using
- an <type scope="com::sun::star::chart2::data">XDataProvider</type>.
- */
- // BM: #i32138# XDataReceiver is not yet published
-// [optional] interface ::com::sun::star::chart2::data::XDataReceiver;
+ [optional] interface ::com::sun::star::drawing::XDrawPageSupplier;
//-------------------------------------------------------------------------
diff --git a/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl b/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl
index 7b3f9a223f39..d5e8420fc32f 100644
--- a/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl
+++ b/offapi/com/sun/star/drawing/EnhancedCustomShapeHandle.idl
@@ -68,6 +68,26 @@ service EnhancedCustomShapeHandle
*/
[optional, property] ::com::sun::star::drawing::EnhancedCustomShapeParameterPair Polar;
+ /** RefX, if this attribute is set, it specifies the index of the adjustment
+ value which is connected to the horizontal position of the handle
+ */
+ [optional, property] long RefX;
+
+ /** RefY, if this attribute is set, it specifies the index of the adjustment
+ value which is connected to the vertical position of the handle
+ */
+ [optional, property] long RefY;
+
+ /** RefAngle, if this attribute is set, it specifies the index of the adjustment
+ value which is connected to the angle of the handle
+ */
+ [optional, property] long RefAngle;
+
+ /** RefR, if this attribute is set, it specifies the index of the adjustment
+ value which is connected to the radius of the handle
+ */
+ [optional, property] long RefR;
+
/** If the attribute RangeXMinimum is set, it specifies the horizontal minimum range of the handle.
*/
[optional, property] ::com::sun::star::drawing::EnhancedCustomShapeParameter RangeXMinimum;
diff --git a/offapi/com/sun/star/drawing/Shape.idl b/offapi/com/sun/star/drawing/Shape.idl
index f57369e87f49..3bf1c6fa15cc 100644
--- a/offapi/com/sun/star/drawing/Shape.idl
+++ b/offapi/com/sun/star/drawing/Shape.idl
@@ -136,6 +136,14 @@ published service Shape
//-------------------------------------------------------------------------
/** If this is <FALSE/>, the <type>Shape</type> is not visible
+ on screen outputs. Please note that the <type>Shape</type> may still
+ be visible when printed, see <member>Printable</member>.
+ */
+ [optional, property] boolean Visible;
+
+ //-------------------------------------------------------------------------
+
+ /** If this is <FALSE/>, the <type>Shape</type> is not visible
on printer outputs.
*/
[optional, property] boolean Printable;
diff --git a/offapi/com/sun/star/text/TextFrame.idl b/offapi/com/sun/star/text/TextFrame.idl
index e1ab64c2e674..e43b3d79197c 100644..100755
--- a/offapi/com/sun/star/text/TextFrame.idl
+++ b/offapi/com/sun/star/text/TextFrame.idl
@@ -112,6 +112,13 @@ published service TextFrame
*/
[property] short SizeType;
//-------------------------------------------------------------------------
+ /** determines if the text frame should be editable in a read-only document.
+ (This is usually used in forms.)
+
+ */
+ [optional, property] boolean EditInReadonly;
+
+ //-------------------------------------------------------------------------
/** determines the interpretation of the width and relative
width properties.
@@ -119,12 +126,14 @@ published service TextFrame
@since OOo 2.4
*/
[optional, property] short WidthType;
+
//-----------------------------------------------------------------------------
/** contains the writing direction, as represented by the
<type scope="com::sun::star::text">WritingMode2</type> constants
*/
[optional, property] short WritingMode;
+ //-----------------------------------------------------------------------------
/** controls, if the frame follows the text flow or can leave its layout environment
<p>If set, the frame follows the text flow and doesn't leaves the layout
diff --git a/offapi/com/sun/star/ui/dialogs/Wizard.idl b/offapi/com/sun/star/ui/dialogs/Wizard.idl
new file mode 100644
index 000000000000..4e6b13f44ca2
--- /dev/null
+++ b/offapi/com/sun/star/ui/dialogs/Wizard.idl
@@ -0,0 +1,75 @@
+/*************************************************************************
+ * 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_ui_dialogs_Wizard_idl__
+#define __com_sun_star_ui_dialogs_Wizard_idl__
+
+#include <com/sun/star/ui/dialogs/XWizard.idl>
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+
+//==================================================================================================================
+
+module com { module sun { module star { module ui { module dialogs {
+
+interface XWizardController;
+
+//==================================================================================================================
+
+/** provides a framework for implementing a wizard dialog.
+ */
+service Wizard : XWizard
+{
+ /** creates a wizard with a single execution path
+ @param PageIds
+ the IDs of the pages which constitute the execution path. IDs must be in ascending order.
+ */
+ createSinglePathWizard(
+ [in] sequence< short > PageIds,
+ [in] XWizardController Controller
+ )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ );
+
+ /** creates a wizard with a multiple possible execution paths
+
+ @param PageIds
+ the IDs of the pages which constitute the execution paths. IDs in each path must be in ascending order.
+ */
+ createMultiplePathsWizard(
+ [in] sequence< sequence< short > > PageIds,
+ [in] XWizardController Controller
+ )
+ raises ( ::com::sun::star::lang::IllegalArgumentException
+ );
+};
+
+//==================================================================================================================
+
+}; }; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/ui/dialogs/WizardButton.idl b/offapi/com/sun/star/ui/dialogs/WizardButton.idl
new file mode 100644
index 000000000000..34c0d8074889
--- /dev/null
+++ b/offapi/com/sun/star/ui/dialogs/WizardButton.idl
@@ -0,0 +1,60 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_ui_dialogs_WizardButton_idl__
+#define __com_sun_star_ui_dialogs_WizardButton_idl__
+
+//==================================================================================================================
+
+module com { module sun { module star { module ui { module dialogs {
+
+//==================================================================================================================
+
+/** denotes the buttons found in a <type>Wizard</type>
+ */
+constants WizardButton
+{
+ /// denotes none of the buttons in the wizard
+ const short NONE = 0;
+ /// denotes the button used to travel forward through the wizard
+ const short NEXT = 1;
+ /// denotes the button used to travel backward through the wizard
+ const short PREVIOUS = 2;
+ /// denotes the button used to finish the wizard
+ const short FINISH = 3;
+ /// denotes the button used to cancel the wizard
+ const short CANCEL = 4;
+ /// denotes the button used to request help
+ const short HELP = 5;
+};
+
+//==================================================================================================================
+
+}; }; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx b/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl
index a0ad5422496a..271a006346b7 100644
--- a/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx
+++ b/offapi/com/sun/star/ui/dialogs/WizardTravelType.idl
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -25,27 +24,31 @@
*
************************************************************************/
-#ifndef SD_SLIDESORTER_IDLE_DETECTOR_HXX
-#define SD_SLIDESORTER_IDLE_DETECTOR_HXX
+#ifndef __com_sun_star_ui_dialogs_WizardTravelType_idl__
+#define __com_sun_star_ui_dialogs_WizardTravelType_idl__
-class Window;
+//==================================================================================================================
-namespace sd { namespace slidesorter { namespace cache {
+module com { module sun { module star { module ui { module dialogs {
-class IdleDetector
-{
-public:
- IdleDetector (const ::Window* pWindow, const bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation);
- bool operator() (void);
+//==================================================================================================================
-private:
- const ::Window* mpWindow;
- const bool mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
+/** denotes ways to leave a <type>Wizard</type>'s page
+ */
+constants WizardTravelType
+{
+ /// indicates the wizard page is left due to forward traveling through the wizard
+ const short FORWARD = 1;
+ /// indicates the wizard page is left due to backward traveling through the wizard
+ const short BACKWARD = 2;
+ /// indicates the wizard page is left since the wizard is about to be finished
+ const short FINISH = 3;
};
+//==================================================================================================================
+}; }; }; }; };
-
-} } } // end of namespace ::sd::slidesorter::cache
+//==================================================================================================================
#endif
diff --git a/offapi/com/sun/star/ui/dialogs/XWizard.idl b/offapi/com/sun/star/ui/dialogs/XWizard.idl
new file mode 100644
index 000000000000..445f7bbf2a44
--- /dev/null
+++ b/offapi/com/sun/star/ui/dialogs/XWizard.idl
@@ -0,0 +1,228 @@
+/*************************************************************************
+ * 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_ui_dialogs_XWizard_idl__
+#define __com_sun_star_ui_dialogs_XWizard_idl__
+
+#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
+#include <com/sun/star/util/InvalidStateException.idl>
+#include <com/sun/star/container/NoSuchElementException.idl>
+#include <com/sun/star/awt/XWindow.idl>
+
+//==================================================================================================================
+module com { module sun { module star { module ui { module dialogs {
+
+//==================================================================================================================
+
+interface XWizardPage;
+
+/** is the main interface implemented by the <type>Wizard</type> services.
+
+ <p>A wizard is a dialog which guides the user through a number of tasks (usually input of data), which the user can
+ accomplish either sequentially or out-of-order. For this, a wizard is comprised of a number of tab pages,
+ each page representing a single <em>step</em>.</p>
+
+ <p>Sequential navigation in a wizard is done via a <em>Next</em> and a <em>Back</em> button. Non-sequential navigation
+ is done via a roadmap, which is displayed on the left hand side of the wizard dialog, lists all available
+ steps, and allows jumping to a certain step (where the creator of the wizard can restrict the available steps
+ depending on the current situation in the wizard, see below).</p>
+
+ <p>A sequence of steps in a wizard dialog is called a <em>path</em>. A given wizard can support one or multiple paths,
+ which are declared at the time of construction of the wizard.</p>
+
+ <p>In the simplest case, where the wizard supports only one path, all available steps are displayed in the roadmap,
+ and the user can simply travel through them as desired.</p>
+
+ <p>If the wizard is more complex, and supports multiple paths, things become more complicated. In a given situation
+ of the wizard, where the user is at step <em>k</em> of the current path, the <em>potential</em> or <em>conflicting</em>
+ paths are those whose first <em>k</em> steps are the same as in the current path. Obviously, there's at least one
+ potential path in every situation: the current one. If there is more than one, then the future steps in the dialog
+ are not finally decided. In such a case, the roadmap will display future steps up to the point where the potential
+ paths diverge, and then an item <quot><code>...</code></quot> indicating that the order of steps is undecided.</p>
+
+ <p>An <type>XWizardController</type> can declare a certain path as active path by calling the <member>activatePath</member>
+ method. Usually, this is done depending on user input. For instance, your wizard could have radio buttons on the
+ first page which effectively decide about which path to take in the wizard.</p>
+
+ <p>Single steps in the wizard can be freely enabled and disabled, using the <member>enablePage</member> method.
+ Disabled pages are skipped during sequential traveling, and not selectable in the roadmap.</p>
+
+ <p>The state of the <em>Next</em> button in the dialog will be automatically maintained in most situations,
+ depending on the results of calls to the <member>XWizardController::canAdvance</member> and <member>XWizardPage::canAdvance</member>
+ methods. More sophisticated wizard logic, however, will need manual calls to the <member>enableButton</member> method.
+ Also, the <em>Finish</em> button needs to be maintained by the wizard's controller, too, as it cannot be decided
+ generically in which situations it should be enabled or disabled.</p>
+
+ @see XWizardController
+ @see XWizardPage
+ */
+interface XWizard
+{
+ interface XExecutableDialog;
+
+ /** is the help URL of the wizard's main window.
+ */
+ [attribute] string HelpURL;
+
+ [attribute, readonly] ::com::sun::star::awt::XWindow
+ DialogWindow;
+
+ /** provides access to the current page of the wizard
+ */
+ XWizardPage
+ getCurrentPage();
+
+ /** enables or disables a certain button in the wizard
+
+ <p>Normally, you will want to use this method for the <em>Finish</em> button only: The <em>Next</em>
+ and <em>Back</em> buttons are usually maintained automatically, the <em>Help</em> and <em>Cancel</em>
+ buttons are unlikely to ever being disabled.</p>
+
+ @param WizardButton
+ denotes the button to enable or disable, as one of the <type>WizardButton</type> constants. Must not be
+ <member>WizardButton::NONE</member>.
+ @param Enable
+ specifies whether the button should be enabled (<TRUE/>) or disabled (<FALSE/>)
+ */
+ void enableButton( [in] short WizardButton, [in] boolean Enable );
+
+ /** sets a button in the wizard as default button
+
+ <p>In general, the default button in a wizard is the one which is activated when the user presses
+ the <em>return</em> key while the focus is in a control which does not handle this key itself (such as
+ ordinary input controls).</p>
+
+ <p>You can use this method, for instance, to make the <em>Next</em> button the default button on all pages
+ except the last one, where <em>Finish</em> should be defaulted.</p>
+ */
+ void setDefaultButton( [in] short WizardButton );
+
+ /** travels to the next page, if possible
+
+ <p>Calling this method is equivalent to the user pressing the <em>Next</em> button in the wizard. Consequently,
+ the method will fail if in the current state of the wizard, it is not allowed to advance to a next page.</p>
+ */
+ boolean travelNext();
+
+ /** travels to the next page, if possible
+
+ <p>Calling this method is equivalent to the user pressing the <em>Back</em> button in the wizard.</p>
+ */
+ boolean travelPrevious();
+
+ /** enables or disables the given page
+
+ <p>You can use this method when not all pages of your wizard are necessarily needed in all cases. For instance,
+ assume that your first wizard page contains a check box, which the user can check to enter additional data.
+ If you place this data on the second page, then you will want to enable this second page if and only if the
+ checkbox is checked.</p>
+
+ <p>If a page is disabled, it can reached neither by clicking the respective item in the wizard's roadmap,
+ nor by sequential traveling. Still, the page's item is displayed in the roadmap, though disabled.</p>
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if there is no page with the given ID
+ @throws ::com::sun::star::util::InvalidStateException
+ if the page shall be disabled, but is active currently.
+ */
+ void enablePage( [in] short PageID, [in] boolean Enable )
+ raises ( ::com::sun::star::container::NoSuchElementException
+ , ::com::sun::star::util::InvalidStateException );
+
+ /** updates the wizard elements which are related to traveling.
+
+ <p>For instance, the <em>Next</em> button is disabled if the current page's <member>XWizardPage::canAdvance</member>
+ method returns <FALSE/>.</p>
+
+ <p>You usually call this method from within a wizard page whose state changed in a way that it affects the
+ user's ability to reach other pages.</p>
+ */
+ void updateTravelUI();
+
+ /** advances to the given page, if possible.
+
+ <p>Calling this method is equivalent to the user repeatedly pressing the <em>Next</em> button, until the
+ given page is reached. Consequently, the method will fail if one of the intermediate pages does not allow
+ advancing to the next page.</p>
+ */
+ boolean advanceTo( [in] short PageId );
+
+ /** goes back to the given page, if possible.
+
+ <p>Calling this method is equivalent to the user repeatedly pressing the <em>Back</em> button, until the
+ given page is reached.</p>
+ */
+ boolean goBackTo( [in] short PageId );
+
+ /** activates a path
+
+ <p>If the wizard has been created with multiple paths of control flow, then this method allows switching to
+ another path.</p>
+
+ <p>You can only activate a path which shares the first <code>k</code> pages with the path
+ which is previously active (if any), where <code>k</code> is the index of the current page within the current
+ path.</p>
+
+ <p><strong>Example</strong>: Say you have paths, <code>(0,1,2,5)</code> and <code>(0,1,4,5)</code> (with
+ the numbers denoting page IDs). This means that after page <code>1</code>, you either continue with page
+ <code>2</code> or state <code>4</code>,and after this, you finish in state <code>5</code>.<br/>
+ Now if the first path is active, and your current state is <code>1</code>, then you can easily switch to the
+ second path, since both paths start with <code>(0,1)</code>.<br/>
+ However, if your current state is <code>2</code>, then you can not switch to the second path anymore.</p>
+
+ @param PathIndex
+ the index of the path, as used in the <member>Wizard::createMultiplePathsWizard</member> constructor.
+ @param Final
+ <p>If <TRUE/>, the path will be completely activated, even if it is a conflicting path (i.e. there is another
+ path which shares the first <code>k</code> states with the to-be-activated path.)</p>
+
+ <p>If <FALSE/>, then the new path is checked for conflicts with other paths. If such conflicts exists, the path
+ is not completely activated, but only up to the point where it does <em>not</em> conflict.</p>
+
+ <p>In this latter case, you need another activatePath method (usually triggered by the user doing some decisions
+ and entering some data on the reachable pages) before the wizard can actually be finished.</p>
+
+ <p>With the paths in the example above, if you activate the second path, then only steps <code>0</code> and
+ <code>1</code> are activated, since they are common to both paths. Steps <code>2</code>, <code>4</code>,
+ and <code>5</code> are not reachable, yet.</p>
+
+ @throws ::com::sun::star::container::NoSuchElementException
+ if there is no path with the given index
+ @throws ::com::sun::star::util::InvalidStateException
+ if the path cannot be activated in the current state of the wizard.
+ */
+ void activatePath( [in] short PathIndex, [in] boolean Final )
+ raises ( ::com::sun::star::container::NoSuchElementException
+ , ::com::sun::star::util::InvalidStateException );
+};
+
+//==================================================================================================================
+
+}; }; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/ui/dialogs/XWizardController.idl b/offapi/com/sun/star/ui/dialogs/XWizardController.idl
new file mode 100644
index 000000000000..6a51a67360fe
--- /dev/null
+++ b/offapi/com/sun/star/ui/dialogs/XWizardController.idl
@@ -0,0 +1,85 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_ui_dialogs_XWizardController_idl__
+#define __com_sun_star_ui_dialogs_XWizardController_idl__
+
+#include <com/sun/star/ui/dialogs/XWizardPage.idl>
+
+//==================================================================================================================
+
+module com { module sun { module star { module ui { module dialogs {
+
+//==================================================================================================================
+
+/** is the interface of a client-provided controller of a custom <type>Wizard</type>.
+ */
+interface XWizardController
+{
+ /** creates a page
+
+ <p>Wizard pages are created on demand, when the respective page is reached during traveling through the
+ wizard. Effectively, this means the method is called at most once for each possible page ID.</p>
+
+ @param ParentWindow
+ the parent window to use for the page window
+ @param PageId
+ the ID of the page.
+ @return
+ the requested page.
+ */
+ XWizardPage createPage( [in] ::com::sun::star::awt::XWindow ParentWindow, [in] short PageId );
+
+ /** provides the title of a page given by ID
+
+ <p>The page titles are displayed in the wizard's roadmap.</p>
+ */
+ string getPageTitle( [in] short PageId );
+
+ boolean canAdvance();
+
+ /** called when a new page in the wizard is being activated
+ */
+ void onActivatePage( [in] short PageId );
+
+ /** called when a page in the wizard is being deactivated
+ */
+ void onDeactivatePage( [in] short PageId );
+
+ /** called when the wizard is about to be finished.
+
+ <p>This method allows the controller to do any final checks, and ultimatively veto finishing the wizard.</p>
+ */
+ boolean confirmFinish();
+};
+
+//==================================================================================================================
+
+}; }; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/ui/dialogs/XWizardPage.idl b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl
new file mode 100644
index 000000000000..149f8c14709b
--- /dev/null
+++ b/offapi/com/sun/star/ui/dialogs/XWizardPage.idl
@@ -0,0 +1,86 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_ui_dialogs_XWizardPage_idl__
+#define __com_sun_star_ui_dialogs_XWizardPage_idl__
+
+#include <com/sun/star/awt/XWindow.idl>
+
+//==================================================================================================================
+
+module com { module sun { module star { module ui { module dialogs {
+
+//==================================================================================================================
+
+/** is a single page of a <type>Wizard</type>
+ */
+interface XWizardPage : ::com::sun::star::lang::XComponent
+{
+ /** provides read-only access to the window of the page
+ */
+ [attribute, readonly] ::com::sun::star::awt::XWindow Window;
+
+ /** denotes the ID of the page.
+
+ <p>Within a wizard, no two pages are allowed to have the same ID.</p>
+ */
+ [attribute, readonly] short PageId;
+
+ /** called when the page is activated
+ */
+ void activatePage();
+
+ /** is called when the page is about to be left
+
+ <p>An implementation can veto the leave by returning <FALSE/> here. Usually, the decision about this
+ depends on the current state of the page.</p>
+
+ @param Reason
+ is one of the <type>WizardTravelType</type> contants denoting the reason why the page should be
+ committed.
+ */
+ boolean commitPage( [in] short Reason );
+
+ /** determines whether it is allowed to travel to a later page in the wizard
+
+ <p>You should base this decision on the state of the page only, not on a global state of the wizard. Usually,
+ you return <FALSE/> here if and only if not all necessary input on the page has been provided by the user,
+ or the provided input is not valid.</p>
+
+ <p>If checked for validity is expensive, or if you prefer giving your user more detailed feedback on validity
+ than a disabled <code>Next</code> button in the wizard, then move your checks to the <member>commitPage</member>
+ method.</p>
+ */
+ boolean canAdvance();
+};
+
+//==================================================================================================================
+
+}; }; }; }; };
+
+//==================================================================================================================
+
+#endif
diff --git a/offapi/com/sun/star/ui/dialogs/makefile.mk b/offapi/com/sun/star/ui/dialogs/makefile.mk
index fa11ba35e173..07d762fb0ec6 100644
--- a/offapi/com/sun/star/ui/dialogs/makefile.mk
+++ b/offapi/com/sun/star/ui/dialogs/makefile.mk
@@ -64,7 +64,13 @@ IDLFILES=\
XControlInformation.idl \
XAsynchronousExecutableDialog.idl \
XDialogClosedListener.idl \
- DialogClosedEvent.idl
+ DialogClosedEvent.idl \
+ XWizard.idl \
+ XWizardController.idl \
+ Wizard.idl \
+ XWizardPage.idl \
+ WizardButton.idl \
+ WizardTravelType.idl
# ------------------------------------------------------------------
diff --git a/sd/source/ui/inc/fuspell.hxx b/offapi/com/sun/star/util/InvalidStateException.idl
index 1bb37d3a873d..7d59abbcbac6 100644
--- a/sd/source/ui/inc/fuspell.hxx
+++ b/offapi/com/sun/star/util/InvalidStateException.idl
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -25,47 +24,27 @@
*
************************************************************************/
-#ifndef SD_FU_SPELL_HXX
-#define SD_FU_SPELL_HXX
+#ifndef __com_sun_star_util_InvalidStateException_idl__
+#define __com_sun_star_util_InvalidStateException_idl__
-#include "fupoor.hxx"
+#include <com/sun/star/uno/Exception.idl>
-namespace sd {
+//==================================================================================================================
-extern USHORT SidArraySpell[];
+module com { module sun { module star { module util {
-class Outliner;
+//==================================================================================================================
-class FuSpell
- : public FuPoor
+/** is thrown when an object's state does not allow to call requested functionality.
+ */
+exception InvalidStateException : com::sun::star::uno::Exception
{
-public:
- TYPEINFO();
-
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- virtual void DoExecute( SfxRequest& rReq );
-
- void StartSpelling();
-
- ::sd::Outliner* GetOutliner() const { return pSdOutliner; }
-
-protected:
- virtual ~FuSpell (void);
-
- ::sd::Outliner* pSdOutliner;
- BOOL bOwnOutliner;
-
-private:
- FuSpell (
- ViewShell* pViewSh,
- ::sd::Window* pWin,
- ::sd::View* pView,
- SdDrawDocument* pDoc,
- SfxRequest& rReq);
};
-} // end of namespace sd
+//==================================================================================================================
-#endif
+}; }; }; };
+//==================================================================================================================
+#endif
diff --git a/offapi/com/sun/star/util/makefile.mk b/offapi/com/sun/star/util/makefile.mk
index 75b5dde890c0..aa0374296ddb 100644
--- a/offapi/com/sun/star/util/makefile.mk
+++ b/offapi/com/sun/star/util/makefile.mk
@@ -53,6 +53,7 @@ IDLFILES=\
ElementChange.idl \
Endianness.idl \
FileIOException.idl\
+ InvalidStateException.idl\
Language.idl\
NumberFormat.idl\
NumberFormatProperties.idl\
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu
index 1a3db34f6e6d..7570fda066ca 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu
@@ -156,7 +156,7 @@
</node>
<node oor:name=".uno:ToolBox" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">Formula Elements</value>
+ <value xml:lang="en-US">Elements</value>
</prop>
</node>
<node oor:name=".uno:FormelCursor" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 63b22726378b..e8b483b8622d 100755..100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -37,6 +37,10 @@
<prop oor:name="ooSetupVersionAboutBox" install:module="brand">
<value>${ABOUTBOXPRODUCTVERSION}</value>
</prop>
+ <prop oor:name="ooVendor" install:module="brand">
+ <value>${OOOVENDOR}</value>
+ </prop>
+
<prop oor:name="ooSetupExtension" install:module="brand">
<value >${PRODUCTEXTENSION}</value>
</prop>
@@ -86,6 +90,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >scalc</value>
</prop>
@@ -127,6 +134,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >sdraw</value>
</prop>
@@ -168,6 +178,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >simpress</value>
</prop>
@@ -207,6 +220,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >smath</value>
</prop>
@@ -246,6 +262,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >sglobal</value>
</prop>
@@ -287,6 +306,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >swriter</value>
</prop>
@@ -434,6 +456,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >sweb</value>
</prop>
@@ -686,6 +711,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >schart</value>
</prop>
@@ -725,6 +753,9 @@
<prop oor:name="ooSetupFactoryTemplateFile">
<value ></value>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged">
+ <value >false</value>
+ </prop>
<prop oor:name="ooSetupFactoryShortName">
<value >dbapp</value>
</prop>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Math.xcs b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
index c1f9e8aa96b2..caa8726b7c72 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Math.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Math.xcs
@@ -351,7 +351,7 @@
<prop oor:name="ToolboxVisible" oor:type="xs:boolean">
<!-- OldPath: Math/View -->
<!-- OldLocation: Soffice.cfg -->
- <!-- UIHints: View - Formula Elements -->
+ <!-- UIHints: View - Elements -->
<info>
<author>TL</author>
<desc>Toggles the visibility of the ToolBox (Selection Box).</desc>
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index a3d5ba6e5d21..76c4bb17782b 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -155,6 +155,12 @@
<desc>Specifies the name of the standard template file for the factory.</desc>
</info>
</prop>
+ <prop oor:name="ooSetupFactorySystemDefaultTemplateChanged" oor:type="xs:boolean">
+ <!-- UIHints: setup -->
+ <info>
+ <desc>Indicates if the system default template has been changed.</desc>
+ </info>
+ </prop>
<prop oor:name="ooSetupFactoryWindowAttributes" oor:type="xs:string">
<!-- UIHints: setup -->
<info>
@@ -261,7 +267,15 @@
</info>
<value/>
</prop>
- <prop oor:name="ooSetupExtension" oor:type="xs:string">
+ <prop oor:name="ooVendor" oor:type="xs:string">
+ <info>
+ <author>IHI</author>
+ <desc>Specifies the vendor who build the product.</desc>
+ </info>
+ <value/>
+ </prop>
+
+ <prop oor:name="ooSetupExtension" oor:type="xs:string">
<info>
<desc>Specifies the version number that appears on the user interface.</desc>
</info>
diff --git a/oox/inc/oox/drawingml/customshapegeometry.hxx b/oox/inc/oox/drawingml/customshapegeometry.hxx
index 75a788acb609..4fec38cf09eb 100644
--- a/oox/inc/oox/drawingml/customshapegeometry.hxx
+++ b/oox/inc/oox/drawingml/customshapegeometry.hxx
@@ -41,11 +41,11 @@ namespace oox { namespace drawingml {
class CustomShapeGeometryContext : public ::oox::core::ContextHandler
{
public:
- CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, Shape& rShape );
+ CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
private:
- Shape& mrShape;
+ CustomShapeProperties& mrCustomShapeProperties;
};
// ---------------------------------------------------------------------
diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx
index ff1f26533036..171437095f03 100644
--- a/oox/inc/oox/drawingml/customshapeproperties.hxx
+++ b/oox/inc/oox/drawingml/customshapeproperties.hxx
@@ -30,9 +30,10 @@
#include "oox/helper/propertymap.hxx"
#include "oox/drawingml/color.hxx"
+#include "oox/core/xmlfilterbase.hxx"
#include <com/sun/star/graphic/XGraphic.hpp>
#include <boost/shared_ptr.hpp>
-#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include "oox/helper/helper.hxx"
#include "tokens.hxx"
#include <vector>
#include <map>
@@ -44,7 +45,9 @@
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
+#ifndef __com_sun_star_beans_PropertyValues_hpp__
#include <com/sun/star/beans/PropertyValues.hpp>
+#endif
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <com/sun/star/drawing/XShape.hpp>
@@ -60,6 +63,55 @@ struct CustomShapeGuide
rtl::OUString maFormula;
};
+struct AdjustHandle
+{
+ sal_Bool polar;
+ com::sun::star::drawing::EnhancedCustomShapeParameterPair
+ pos;
+
+ // depending to the type (polar or not):
+ OptValue< rtl::OUString > gdRef1; // gdRefX or gdRefR
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ min1; // minX or minR
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ max1; // maxX or maxR
+ OptValue< rtl::OUString > gdRef2; // gdRefY or gdRefAng
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ min2; // minX or minAng
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ max2; // maxY or maxAng
+
+ AdjustHandle( sal_Bool bPolar ) : polar( bPolar ) {};
+};
+
+struct ConnectionSite
+{
+ com::sun::star::drawing::EnhancedCustomShapeParameterPair
+ pos;
+ com::sun::star::drawing::EnhancedCustomShapeParameter
+ ang;
+};
+
+struct GeomRect
+{
+ com::sun::star::drawing::EnhancedCustomShapeParameter l;
+ com::sun::star::drawing::EnhancedCustomShapeParameter t;
+ com::sun::star::drawing::EnhancedCustomShapeParameter r;
+ com::sun::star::drawing::EnhancedCustomShapeParameter b;
+};
+
+struct Path2D
+{
+ sal_Int64 w;
+ sal_Int64 h;
+ sal_Int32 fill;
+ sal_Bool stroke;
+ sal_Bool extrusionOk;
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeParameterPair > parameter;
+
+ Path2D() : w( 0 ), h( 0 ), fill( XML_norm ), stroke( sal_True ), extrusionOk( sal_True ) {};
+};
+
class CustomShapeProperties
{
public:
@@ -68,19 +120,36 @@ public:
virtual ~CustomShapeProperties();
void apply( const CustomShapePropertiesPtr& );
- void pushToPropSet( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet,
+ void pushToPropSet( const ::oox::core::FilterBase& rFilterBase,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet,
const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > & xShape) const;
void setShapePresetType( const rtl::OUString& rShapePresetType ){ maShapePresetType = rShapePresetType; };
- std::vector< CustomShapeGuide >& getAdjustmentValues(){ return maAdjustmentValues; };
+
+ std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; };
+ std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; };
+ std::vector< AdjustHandle >& getAdjustHandleList(){ return maAdjustHandleList; };
+ std::vector< ConnectionSite >& getConnectionSiteList(){ return maConnectionSiteList; };
+ OptValue< GeomRect >& getTextRect(){ return maTextRect; };
+ std::vector< Path2D >& getPath2DList(){ return maPath2DList; };
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& getSegments(){ return maSegments; };
double getValue( const std::vector< CustomShapeGuide >&, sal_uInt32 nIndex ) const;
- ::basegfx::B2DPolyPolygon& getPolygon() { return maPolygon; }
+ static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide );
+ static sal_Int32 GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const rtl::OUString& rFormulaName );
+
private:
rtl::OUString maShapePresetType;
- std::vector< CustomShapeGuide > maAdjustmentValues;
- ::basegfx::B2DPolyPolygon maPolygon;
+ std::vector< CustomShapeGuide > maAdjustmentGuideList;
+ std::vector< CustomShapeGuide > maGuideList;
+ std::vector< AdjustHandle > maAdjustHandleList;
+ std::vector< ConnectionSite > maConnectionSiteList;
+ OptValue< GeomRect > maTextRect;
+ std::vector< Path2D > maPath2DList;
+
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >
+ maSegments;
};
} }
diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx
index c951369dbf78..f4228ab24790 100644
--- a/oox/inc/oox/drawingml/shape.hxx
+++ b/oox/inc/oox/drawingml/shape.hxx
@@ -30,7 +30,7 @@
#include "oox/helper/propertymap.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
-//#include "oox/drawingml/customshapeproperties.hxx"
+#include "oox/drawingml/customshapeproperties.hxx"
#include "oox/drawingml/textliststyle.hxx"
#include <com/sun/star/frame/XModel.hpp>
@@ -126,6 +126,7 @@ public:
void setName( const rtl::OUString& rName ) { msName = rName; }
::rtl::OUString getName( ) { return msName; }
void setId( const rtl::OUString& rId ) { msId = rId; }
+ void setHidden( sal_Bool bHidden ) { mbHidden = bHidden; }
void setSubType( sal_Int32 nSubType ) { mnSubType = nSubType; }
sal_Int32 getSubType() const { return mnSubType; }
void setSubTypeIndex( sal_uInt32 nSubTypeIndex ) { mnSubTypeIndex = nSubTypeIndex; }
@@ -206,6 +207,7 @@ private:
sal_Int32 mnRotation;
sal_Bool mbFlipH;
sal_Bool mbFlipV;
+ sal_Bool mbHidden;
};
::rtl::OUString GetShapeType( sal_Int32 nType );
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 77cf21698c62..da4fc3e5b83f 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -241,7 +241,8 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount;
if( bLogScale )
{
- rIntervalCount <<= sal_Int32( 10 );
+ if( mrModel.mofMinorUnit.has() )
+ rIntervalCount <<= sal_Int32( 9 );
}
else
{
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 79c0c2e28d99..a0fcc3142f51 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -26,22 +26,22 @@
************************************************************************/
#include "oox/drawingml/customshapegeometry.hxx"
-#include "oox/drawingml/customshapeproperties.hxx"
#include <com/sun/star/xml/sax/FastToken.hpp>
#include <comphelper/stl_types.hxx>
#include <hash_map>
-#include <basegfx/polygon/b2dpolygon.hxx>
-
#include "oox/helper/helper.hxx"
+#include "oox/helper/attributelist.hxx"
+#include "oox/token/tokenmap.hxx"
#include "oox/helper/propertymap.hxx"
#include "oox/core/namespaces.hxx"
#include "tokens.hxx"
using ::rtl::OUString;
-using namespace ::basegfx;
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::xml::sax;
namespace oox { namespace drawingml {
@@ -97,25 +97,374 @@ typedef std::hash_map< rtl::OUString, FormularCommand, comphelper::UStringHash,
static const FormulaCommandHMap* pCommandHashMap;
+//
+rtl::OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
+{
+ rtl::OUString aRet;
+ switch( rParameter.Type )
+ {
+ case EnhancedCustomShapeParameterType::NORMAL :
+ {
+ if ( rParameter.Value.getValueTypeClass() == TypeClass_DOUBLE )
+ {
+ double fValue = 0.0;
+ if ( rParameter.Value >>= fValue )
+ aRet = rtl::OUString::valueOf( fValue );
+ }
+ else
+ {
+ sal_Int32 nValue = 0;
+ if ( rParameter.Value >>= nValue )
+ aRet = rtl::OUString::valueOf( nValue );
+ }
+ }
+ break;
+ case EnhancedCustomShapeParameterType::EQUATION :
+ {
+ if ( rParameter.Value.getValueTypeClass() == TypeClass_LONG )
+ {
+ sal_Int32 nFormulaIndex;
+ if ( rParameter.Value >>= nFormulaIndex )
+ {
+ aRet = CREATE_OUSTRING( "?" )
+ + rtl::OUString::valueOf( nFormulaIndex )
+ + CREATE_OUSTRING( " " );
+ }
+ }
+ else
+ {
+ // ups... we should have an index here and not the formula name
+ }
+ }
+ break;
+ case EnhancedCustomShapeParameterType::ADJUSTMENT :
+ {
+ if ( rParameter.Value.getValueTypeClass() == TypeClass_LONG )
+ {
+ sal_Int32 nAdjustmentIndex;
+ if ( rParameter.Value >>= nAdjustmentIndex )
+ {
+ aRet = CREATE_OUSTRING( "$" )
+ + rtl::OUString::valueOf( nAdjustmentIndex )
+ + CREATE_OUSTRING( " " );
+ }
+ }
+ else
+ {
+ // ups... we should have an index here and not the formula name
+ }
+ }
+ break;
+ case EnhancedCustomShapeParameterType::LEFT :
+ {
+ const rtl::OUString sLeft( CREATE_OUSTRING( "left" ) );
+ aRet = sLeft;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::TOP :
+ {
+ const rtl::OUString sTop( CREATE_OUSTRING( "top" ) );
+ aRet = sTop;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::RIGHT :
+ {
+ const rtl::OUString sRight( CREATE_OUSTRING( "right" ) );
+ aRet = sRight;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::BOTTOM :
+ {
+ const rtl::OUString sBottom( CREATE_OUSTRING( "bottom" ) );
+ aRet = sBottom;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::XSTRETCH :
+ {
+ const rtl::OUString sXStretch( CREATE_OUSTRING( "xstretch" ) );
+ aRet = sXStretch;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::YSTRETCH :
+ {
+ const rtl::OUString sYStretch( CREATE_OUSTRING( "ystretch" ) );
+ aRet = sYStretch;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::HASSTROKE :
+ {
+ const rtl::OUString sHasStroke( CREATE_OUSTRING( "hasstroke" ) );
+ aRet = sHasStroke;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::HASFILL :
+ {
+ const rtl::OUString sHasFill( CREATE_OUSTRING( "hasfill" ) );
+ aRet = sHasFill;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::WIDTH :
+ {
+ const rtl::OUString sWidth( CREATE_OUSTRING( "width" ) );
+ aRet = sWidth;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::HEIGHT :
+ {
+ const rtl::OUString sHeight( CREATE_OUSTRING( "height" ) );
+ aRet = sHeight;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::LOGWIDTH :
+ {
+ const rtl::OUString sLogWidth( CREATE_OUSTRING( "logwidth" ) );
+ aRet = sLogWidth;
+ }
+ break;
+ case EnhancedCustomShapeParameterType::LOGHEIGHT :
+ {
+ const rtl::OUString sLogHeight( CREATE_OUSTRING( "logheight" ) );
+ aRet = sLogHeight;
+ }
+ break;
+ }
+ return aRet;
+}
+
+// ---------------------------------------------------------------------
+
+static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCustomShapeProperties, const::rtl::OUString& rValue, sal_Bool bNoSymbols )
+{
+ com::sun::star::drawing::EnhancedCustomShapeParameter aRet;
+ if ( rValue.getLength() )
+ {
+ sal_Bool bConstant = sal_True;
+ sal_Int32 nConstant = 0;
+ sal_Char nVal = 0;
+
+ // first check if its a constant value
+ switch( StaticTokenMap::get().getTokenFromUnicode( rValue ) )
+ {
+ case XML_3cd4 : nConstant = 270 * 60000; break;
+ case XML_3cd8 : nConstant = 135 * 60000; break;
+ case XML_5cd8 : nConstant = 225 * 60000; break;
+ case XML_7cd8 : nConstant = 315 * 60000; break;
+ case XML_cd2 : nConstant = 180 * 60000; break;
+ case XML_cd4 : nConstant = 90 * 60000; break;
+ case XML_cd8 : nConstant = 45 * 60000; break;
+
+ case XML_b : // variable height of the shape defined in spPr
+ case XML_h :
+ {
+ if ( bNoSymbols )
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "height" );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ else
+ aRet.Type = EnhancedCustomShapeParameterType::HEIGHT; // TODO: HEIGHT needs to be implemented
+ }
+ break;
+
+
+ case XML_hd8 : // !!PASSTHROUGH INTENDED
+ nVal += 2; // */ h 1.0 8.0
+ case XML_hd6 : // */ h 1.0 6.0
+ nVal++;
+ case XML_hd5 : // */ h 1.0 5.0
+ nVal++;
+ case XML_hd4 : // */ h 1.0 4.0
+ nVal += 2;
+ case XML_hd2 : // */ h 1.0 2.0
+ case XML_vc : // */ h 1.0 2.0
+ {
+ nVal += '2';
+
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "height/" ) + rtl::OUString( nVal );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+
+ case XML_t :
+ case XML_l :
+ {
+ nConstant = 0;
+ aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
+ }
+ break;
+
+ case XML_ls : // longest side: max w h
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "max(width,height)" );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+ case XML_ss : // shortest side: min w h
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "min(width,height)" );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+ case XML_ssd8 : // */ ss 1.0 8.0
+ nVal += 2;
+ case XML_ssd6 : // */ ss 1.0 6.0
+ nVal += 2;
+ case XML_ssd4 : // */ ss 1.0 4.0
+ nVal += 2;
+ case XML_ssd2 : // */ ss 1.0 2.0
+ {
+ nVal += '2';
+
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "min(width,height)/" ) + rtl::OUString( nVal );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+
+ case XML_r : // variable width of the shape defined in spPr
+ case XML_w :
+ {
+ if ( bNoSymbols )
+ {
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "width" );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ else
+ aRet.Type = EnhancedCustomShapeParameterType::WIDTH;
+ }
+ break;
+
+ case XML_wd10 : // */ w 1.0 10.0
+ nVal += 2;
+ case XML_wd8 : // */ w 1.0 8.0
+ nVal += 2;
+ case XML_wd6 : // */ w 1.0 6.0
+ nVal++;
+ case XML_wd5 : // */ w 1.0 5.0
+ nVal++;
+ case XML_wd4 : // */ w 1.0 4.0
+ nVal += 2;
+ case XML_hc : // */ w 1.0 2.0
+ case XML_wd2 : // */ w 1.0 2.0
+ {
+ nVal += '2';
+
+ CustomShapeGuide aGuide;
+ aGuide.maName = rValue;
+ aGuide.maFormula = CREATE_OUSTRING( "width/" ) + rtl::OUString( nVal );
+
+ aRet.Value = Any( CustomShapeProperties::SetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), aGuide ) );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ break;
+
+ default:
+ bConstant = sal_False;
+ break;
+ }
+ if ( bConstant )
+ {
+ if ( nConstant )
+ {
+ aRet.Value = Any( nConstant );
+ aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
+ }
+ }
+ else
+ {
+ sal_Unicode n = rValue[ 0 ];
+ if ( ( n == '+' ) || ( n == '-' ) )
+ {
+ if ( rValue.getLength() > 0 )
+ n = rValue[ 1 ];
+ }
+ if ( ( n >= '0' ) && ( n <= '9' ) )
+ { // seems to be a ST_Coordinate
+ aRet.Value = Any( rValue.toInt32() );
+ aRet.Type = EnhancedCustomShapeParameterType::NORMAL;
+ }
+ else
+ {
+ sal_Int32 nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getAdjustmentGuideList(), rValue );
+ if ( nGuideIndex >= 0 )
+ {
+ aRet.Value = Any( nGuideIndex );
+ aRet.Type = EnhancedCustomShapeParameterType::ADJUSTMENT;
+ }
+ else
+ {
+ nGuideIndex = CustomShapeProperties::GetCustomShapeGuideValue( rCustomShapeProperties.getGuideList(), rValue );
+ if ( nGuideIndex >= 0 )
+ {
+ aRet.Value = Any( nGuideIndex );
+ aRet.Type = EnhancedCustomShapeParameterType::EQUATION;
+ }
+ else
+ aRet.Value = Any( rValue );
+ }
+ }
+ }
+ }
+ return aRet;
+}
+
+static EnhancedCustomShapeParameter GetAdjAngle( CustomShapeProperties& rCustomShapeProperties, const ::rtl::OUString& rValue )
+{
+ EnhancedCustomShapeParameter aAngle( GetAdjCoordinate( rCustomShapeProperties, rValue, sal_True ) );
+ if ( aAngle.Type == EnhancedCustomShapeParameterType::NORMAL )
+ {
+ sal_Int32 nValue = 0;
+ aAngle.Value >>= nValue;
+ double fValue = ( static_cast< double >( nValue ) / 60000.0 ) * 360.0;
+ aAngle.Value <<= fValue;
+ }
+ return aAngle;
+}
+
// ---------------------------------------------------------------------
// CT_GeomGuideList
-class AdjustmentValueContext : public ContextHandler
+class GeomGuideListContext : public ContextHandler
{
public:
- AdjustmentValueContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ GeomGuideListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
protected:
- CustomShapeProperties& mrCustomShapeProperties;
+ std::vector< CustomShapeGuide >& mrGuideList;
+ CustomShapeProperties& mrCustomShapeProperties;
};
-AdjustmentValueContext::AdjustmentValueContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties )
+GeomGuideListContext::GeomGuideListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList )
: ContextHandler( rParent )
+, mrGuideList( rGuideList )
, mrCustomShapeProperties( rCustomShapeProperties )
{
}
-static rtl::OUString convertToOOEquation( const rtl::OUString& rSource )
+static rtl::OUString convertToOOEquation( CustomShapeProperties& rCustomShapeProperties, const rtl::OUString& rSource )
{
if ( !pCommandHashMap )
{
@@ -138,28 +487,140 @@ static rtl::OUString convertToOOEquation( const rtl::OUString& rSource )
rtl::OUString aEquation;
if ( aTokens.size() )
{
+ sal_Int32 i, nParameters = aTokens.size() - 1;
+ if ( nParameters > 3 )
+ nParameters = 3;
+
+ rtl::OUString sParameters[ 3 ];
+
+ for ( i = 0; i < nParameters; i++ )
+ sParameters[ i ] = GetFormulaParameter( GetAdjCoordinate( rCustomShapeProperties, aTokens[ i + 1 ], sal_False ) );
+
const FormulaCommandHMap::const_iterator aIter( pCommandHashMap->find( aTokens[ 0 ] ) );
if ( aIter != pCommandHashMap->end() )
{
switch( aIter->second )
{
case FC_MULDIV :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*" ) + sParameters[ 1 ]
+ + CREATE_OUSTRING( "/" ) + sParameters[ 2 ];
+ }
+ break;
case FC_PLUSMINUS :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "+" ) + sParameters[ 1 ]
+ + CREATE_OUSTRING( "-" ) + sParameters[ 2 ];
+ }
+ break;
case FC_PLUSDIV :
+ {
+ if ( nParameters == 3 )
+ aEquation = CREATE_OUSTRING( "(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "+" )
+ + sParameters[ 1 ] + CREATE_OUSTRING( ")/" ) + sParameters[ 2 ];
+ }
+ break;
case FC_IFELSE :
+ {
+ if ( nParameters == 3 )
+ aEquation = CREATE_OUSTRING( "if(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," )
+ + sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_ABS :
+ {
+ if ( nParameters == 1 )
+ aEquation = CREATE_OUSTRING( "abs(" ) + sParameters[ 0 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_AT2 :
+ {
+ if ( nParameters == 2 )
+ aEquation = CREATE_OUSTRING( "atan2(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," )
+ + sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_CAT2 :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(cos(arctan(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")))" );
+ }
+ break;
case FC_COS :
+ {
+ if ( nParameters == 2 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*cos(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_MAX :
+ {
+ if ( nParameters == 2 )
+ aEquation = CREATE_OUSTRING( "max(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_MIN :
+ {
+ if ( nParameters == 2 )
+ aEquation = CREATE_OUSTRING( "min(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "," ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_MOD :
+ {
+ if ( nParameters == 3 )
+ aEquation = CREATE_OUSTRING( "sqrt(" )
+ + sParameters[ 0 ] + CREATE_OUSTRING( "*" ) + sParameters[ 0 ] + CREATE_OUSTRING( "+" )
+ + sParameters[ 1 ] + CREATE_OUSTRING( "*" ) + sParameters[ 1 ] + CREATE_OUSTRING( "+" )
+ + sParameters[ 2 ] + CREATE_OUSTRING( "*" ) + sParameters[ 2 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_PIN :
+ {
+ if ( nParameters == 3 ) // if(x-y,x,if(y-z,z,y))
+ aEquation = CREATE_OUSTRING( "if(" ) + sParameters[ 0 ] + CREATE_OUSTRING( "-" ) + sParameters[ 1 ]
+ + CREATE_OUSTRING( "," ) + sParameters[ 0 ] + CREATE_OUSTRING( ",if(" ) + sParameters[ 2 ]
+ + CREATE_OUSTRING( "-" ) + sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 1 ]
+ + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( "))" );
+ }
+ break;
case FC_SAT2 :
+ {
+ if ( nParameters == 3 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*(sin(arctan(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( "," ) + sParameters[ 2 ] + CREATE_OUSTRING( ")))" );
+ }
+ break;
case FC_SIN :
+ {
+ if ( nParameters == 2 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*sin(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_SQRT :
+ {
+ if ( nParameters == 1 )
+ aEquation = CREATE_OUSTRING( "sqrt(" ) + sParameters[ 0 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_TAN :
+ {
+ if ( nParameters == 2 )
+ aEquation = sParameters[ 0 ] + CREATE_OUSTRING( "*tan(" ) +
+ sParameters[ 1 ] + CREATE_OUSTRING( ")" );
+ }
+ break;
case FC_VAL :
+ {
+ if ( nParameters == 1 )
+ aEquation = sParameters[ 0 ];
+ }
+ break;
default :
break;
}
@@ -168,99 +629,544 @@ static rtl::OUString convertToOOEquation( const rtl::OUString& rSource )
return aEquation;
}
-Reference< XFastContextHandler > AdjustmentValueContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+Reference< XFastContextHandler > GeomGuideListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
{
if ( aElementToken == ( NMSP_DRAWINGML | XML_gd ) ) // CT_GeomGuide
{
CustomShapeGuide aGuide;
aGuide.maName = xAttribs->getOptionalValue( XML_name );
- aGuide.maFormula = convertToOOEquation( xAttribs->getOptionalValue( XML_fmla ) );
- std::vector< CustomShapeGuide >& rAdjustmentValues( mrCustomShapeProperties.getAdjustmentValues() );
- rAdjustmentValues.push_back( aGuide );
+ aGuide.maFormula = convertToOOEquation( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_fmla ) );
+ mrGuideList.push_back( aGuide );
}
return this;
}
// ---------------------------------------------------------------------
-class PathListContext : public ContextHandler
+static const rtl::OUString GetGeomGuideName( const ::rtl::OUString& rValue )
+{
+ return rValue;
+}
+
+// ---------------------------------------------------------------------
+// CT_AdjPoint2D
+class AdjPoint2DContext : public ContextHandler
+{
+public:
+ AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+};
+
+AdjPoint2DContext::AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler( rParent )
+{
+ rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_x ), sal_True );
+ rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_y ), sal_True );
+}
+
+// ---------------------------------------------------------------------
+// CT_XYAdjustHandle
+class XYAdjustHandleContext : public ContextHandler
{
public:
- PathListContext( ContextHandler& rParent, Shape& rShape );
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endFastElement( sal_Int32 aElementToken ) throw (SAXException, RuntimeException);
+ XYAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
protected:
- Shape& mrShape;
- sal_Int32 maPointToken;
- ::basegfx::B2DPolygon maPolygon;
+ AdjustHandle& mrAdjustHandle;
+ CustomShapeProperties& mrCustomShapeProperties;
};
-PathListContext::PathListContext( ContextHandler& rParent, Shape& rShape )
+XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
: ContextHandler( rParent )
-, mrShape( rShape )
+, mrAdjustHandle( rAdjustHandle )
+, mrCustomShapeProperties( rCustomShapeProperties )
{
+ const rtl::OUString aEmptyDefault;
+ AttributeList aAttribs( xAttribs );
+ if ( aAttribs.hasAttribute( XML_gdRefX ) )
+ {
+ mrAdjustHandle.gdRef1 = GetGeomGuideName( aAttribs.getString( XML_gdRefX, aEmptyDefault ) );
+ }
+ if ( aAttribs.hasAttribute( XML_minX ) )
+ {
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minX, aEmptyDefault ), sal_True );
+ }
+ if ( aAttribs.hasAttribute( XML_maxX ) )
+ {
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxX, aEmptyDefault ), sal_True );
+ }
+ if ( aAttribs.hasAttribute( XML_gdRefY ) )
+ {
+ mrAdjustHandle.gdRef2 = GetGeomGuideName( aAttribs.getString( XML_gdRefY, aEmptyDefault ) );
+ }
+ if ( aAttribs.hasAttribute( XML_minY ) )
+ {
+ mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minY, aEmptyDefault ), sal_True );
+ }
+ if ( aAttribs.hasAttribute( XML_maxY ) )
+ {
+ mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxY, aEmptyDefault ), sal_True );
+ }
}
-Reference< XFastContextHandler > PathListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+Reference< XFastContextHandler > XYAdjustHandleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
{
- switch( aElementToken ) {
- case NMSP_DRAWINGML | XML_path:
- maPolygon.clear();
- break;
- case NMSP_DRAWINGML | XML_close:
- maPolygon.setClosed( true );
- break;
- case NMSP_DRAWINGML | XML_pt:
- {
- OUString sX, sY;
-
- sX = xAttribs->getOptionalValue( XML_x );
- sY = xAttribs->getOptionalValue( XML_y );
-
- double dX, dY;
-
- dX = sX.toDouble();
- dY = sY.toDouble();
-
- maPolygon.append( B2DPoint ( dX, dY ) );
- break;
- }
- case NMSP_DRAWINGML | XML_lnTo:
- case NMSP_DRAWINGML | XML_moveTo:
- maPointToken = aElementToken;
- break;
- }
-
- return this;
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pos ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D
+ return xContext;
}
-void PathListContext::endFastElement( sal_Int32 aElementToken ) throw (SAXException, RuntimeException)
+// ---------------------------------------------------------------------
+// CT_PolarAdjustHandle
+class PolarAdjustHandleContext : public ContextHandler
+{
+public:
+ PolarAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ AdjustHandle& mrAdjustHandle;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
+: ContextHandler( rParent )
+, mrAdjustHandle( rAdjustHandle )
+, mrCustomShapeProperties( rCustomShapeProperties )
{
- switch( aElementToken ) {
- case NMSP_DRAWINGML|XML_pathLst:
+ const rtl::OUString aEmptyDefault;
+ AttributeList aAttribs( xAttribs );
+ if ( aAttribs.hasAttribute( XML_gdRefR ) )
+ {
+ mrAdjustHandle.gdRef1 = GetGeomGuideName( aAttribs.getString( XML_gdRefR, aEmptyDefault ) );
+ }
+ if ( aAttribs.hasAttribute( XML_minR ) )
+ {
+ mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minR, aEmptyDefault ), sal_True );
+ }
+ if ( aAttribs.hasAttribute( XML_maxR ) )
{
- B2DPolyPolygon& rPoly = mrShape.getCustomShapeProperties()->getPolygon();
- if( rPoly.count() ) {
- if( rPoly.areControlPointsUsed() ) {
- if( rPoly.isClosed() )
- mrShape.setServiceName( "com.sun.star.drawing.ClosedBezierShape" );
+ mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxR, aEmptyDefault ), sal_True );
+ }
+ if ( aAttribs.hasAttribute( XML_gdRefAng ) )
+ {
+ mrAdjustHandle.gdRef2 = GetGeomGuideName( aAttribs.getString( XML_gdRefAng, aEmptyDefault ) );
+ }
+ if ( aAttribs.hasAttribute( XML_minAng ) )
+ {
+ mrAdjustHandle.min2 = GetAdjAngle( mrCustomShapeProperties, aAttribs.getString( XML_minAng, aEmptyDefault ) );
+ }
+ if ( aAttribs.hasAttribute( XML_maxAng ) )
+ {
+ mrAdjustHandle.max2 = GetAdjAngle( mrCustomShapeProperties, aAttribs.getString( XML_maxAng, aEmptyDefault ) );
+ }
+}
+
+Reference< XFastContextHandler > PolarAdjustHandleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pos ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandle.pos ); // CT_AdjPoint2D
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_AdjustHandleList
+class AdjustHandleListContext : public ContextHandler
+{
+public:
+ AdjustHandleListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ std::vector< AdjustHandle >& mrAdjustHandleList;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+AdjustHandleListContext::AdjustHandleListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList )
+: ContextHandler( rParent )
+, mrAdjustHandleList( rAdjustHandleList )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+Reference< XFastContextHandler > AdjustHandleListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_ahXY ) ) // CT_XYAdjustHandle
+ {
+ AdjustHandle aAdjustHandle( sal_False );
+ mrAdjustHandleList.push_back( aAdjustHandle );
+ xContext = new XYAdjustHandleContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
+ }
+ else if ( aElementToken == ( NMSP_DRAWINGML | XML_ahPolar ) ) // CT_PolarAdjustHandle
+ {
+ AdjustHandle aAdjustHandle( sal_True );
+ mrAdjustHandleList.push_back( aAdjustHandle );
+ xContext = new PolarAdjustHandleContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
+ }
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_ConnectionSite
+class ConnectionSiteContext : public ContextHandler
+{
+public:
+ ConnectionSiteContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ ConnectionSite& mrConnectionSite;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+ConnectionSiteContext::ConnectionSiteContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite )
+: ContextHandler( rParent )
+, mrConnectionSite( rConnectionSite )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ mrConnectionSite.ang = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_ang ) );
+}
+
+Reference< XFastContextHandler > ConnectionSiteContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pos ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_Path2DMoveTo
+class Path2DMoveToContext : public ContextHandler
+{
+public:
+ Path2DMoveToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ EnhancedCustomShapeParameterPair& mrAdjPoint2D;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+Path2DMoveToContext::Path2DMoveToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler( rParent )
+, mrAdjPoint2D( rAdjPoint2D )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+Reference< XFastContextHandler > Path2DMoveToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_Path2DLineTo
+class Path2DLineToContext : public ContextHandler
+{
+public:
+ Path2DLineToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ EnhancedCustomShapeParameterPair& mrAdjPoint2D;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+Path2DLineToContext::Path2DLineToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler( rParent )
+, mrAdjPoint2D( rAdjPoint2D )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+Reference< XFastContextHandler > Path2DLineToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjPoint2D ); // CT_AdjPoint2D
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_Path2DQuadBezierTo
+class Path2DQuadBezierToContext : public ContextHandler
+{
+public:
+ Path2DQuadBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rPt1, EnhancedCustomShapeParameterPair& rPt2 );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ EnhancedCustomShapeParameterPair& mrPt1;
+ EnhancedCustomShapeParameterPair& mrPt2;
+ int nCount;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler& rParent,
+ CustomShapeProperties& rCustomShapeProperties,
+ EnhancedCustomShapeParameterPair& rPt1,
+ EnhancedCustomShapeParameterPair& rPt2 )
+: ContextHandler( rParent )
+, mrPt1( rPt1 )
+, mrPt2( rPt2 )
+, nCount( 0 )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+}
+
+Reference< XFastContextHandler > Path2DQuadBezierToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_Path2DCubicBezierTo
+class Path2DCubicBezierToContext : public ContextHandler
+{
+public:
+ Path2DCubicBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties,
+ EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair& );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ CustomShapeProperties& mrCustomShapeProperties;
+ EnhancedCustomShapeParameterPair& mrControlPt1;
+ EnhancedCustomShapeParameterPair& mrControlPt2;
+ EnhancedCustomShapeParameterPair& mrEndPt;
+ int nCount;
+};
+
+Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties,
+ EnhancedCustomShapeParameterPair& rControlPt1,
+ EnhancedCustomShapeParameterPair& rControlPt2,
+ EnhancedCustomShapeParameterPair& rEndPt )
+: ContextHandler( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+, mrControlPt1( rControlPt1 )
+, mrControlPt2( rControlPt2 )
+, mrEndPt( rEndPt )
+, nCount( 0 )
+{
+}
+
+Reference< XFastContextHandler > Path2DCubicBezierToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_pt ) )
+ xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties,
+ nCount++ ? nCount == 2 ? mrControlPt2 : mrEndPt : mrControlPt1 ); // CT_AdjPoint2D
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_Path2DContext
+class Path2DContext : public ContextHandler
+{
+public:
+ Path2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D );
+ virtual ~Path2DContext();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
+ createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+ Path2D& mrPath2D;
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& mrSegments;
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+Path2DContext::Path2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D )
+: ContextHandler( rParent )
+, mrPath2D( rPath2D )
+, mrSegments( rSegments )
+, mrCustomShapeProperties( rCustomShapeProperties )
+{
+ const rtl::OUString aEmptyString;
+
+ AttributeList aAttribs( xAttribs );
+ rPath2D.w = aAttribs.getString( XML_w, aEmptyString ).toInt64();
+ rPath2D.h = aAttribs.getString( XML_h, aEmptyString ).toInt64();
+ rPath2D.fill = aAttribs.getToken( XML_fill, XML_norm );
+ rPath2D.stroke = aAttribs.getBool( XML_stroke, sal_True );
+ rPath2D.extrusionOk = aAttribs.getBool( XML_extrusionOk, sal_True );
+}
+
+Path2DContext::~Path2DContext()
+{
+ EnhancedCustomShapeSegment aNewSegment;
+ if ( mrPath2D.fill == XML_none )
+ {
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::NOFILL;
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+ }
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::ENDSUBPATH;
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+}
+
+Reference< XFastContextHandler > Path2DContext::createFastChildContext( sal_Int32 aElementToken,
+ const Reference< XFastAttributeList >& xAttribs ) throw ( SAXException, RuntimeException )
+{
+ Reference< XFastContextHandler > xContext;
+ switch( aElementToken )
+ {
+ case NMSP_DRAWINGML | XML_close :
+ {
+ EnhancedCustomShapeSegment aNewSegment;
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::CLOSESUBPATH;
+ aNewSegment.Count = 0;
+ mrSegments.push_back( aNewSegment );
+ }
+ break;
+ case NMSP_DRAWINGML | XML_moveTo :
+ {
+ EnhancedCustomShapeSegment aNewSegment;
+ aNewSegment.Command = EnhancedCustomShapeSegmentCommand::MOVETO;
+ aNewSegment.Count = 1;
+ mrSegments.push_back( aNewSegment );
+
+ EnhancedCustomShapeParameterPair aAdjPoint2D;
+ mrPath2D.parameter.push_back( aAdjPoint2D );
+ xContext = new Path2DMoveToContext( *this, mrCustomShapeProperties, mrPath2D.parameter.back() );
+ }
+ break;
+ case NMSP_DRAWINGML | XML_lnTo :
+ {
+
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::LINETO ) )
+ mrSegments.back().Count++;
+ else
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::LINETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameterPair aAdjPoint2D;
+ mrPath2D.parameter.push_back( aAdjPoint2D );
+ xContext = new Path2DLineToContext( *this, mrCustomShapeProperties, mrPath2D.parameter.back() );
+ }
+ break;
+ case NMSP_DRAWINGML | XML_arcTo : // CT_Path2DArcTo
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::ARCTO ) )
+ mrSegments.back().Count++;
else
- mrShape.setServiceName( "com.sun.star.drawing.OpenBezierShape" );
- } else {
- if( rPoly.isClosed() )
- mrShape.setServiceName( "com.sun.star.drawing.PolyPolygonPathShape" );
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::ARCTO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameter aWidth = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_wR ), sal_True );
+ EnhancedCustomShapeParameter aHeight = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_hR ), sal_True );
+ EnhancedCustomShapeParameter aStartAngle = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_stAng ) );
+ EnhancedCustomShapeParameter swAngle = GetAdjAngle( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_swAng ) );
+
+ EnhancedCustomShapeParameterPair aPt1; // TODO: conversion from (wr hr stAng swAng)
+ EnhancedCustomShapeParameterPair aPt2; // to (x1 y1 x2 y2 x3 y3 x y) needed
+ EnhancedCustomShapeParameterPair aPt3;
+ EnhancedCustomShapeParameterPair aPt;
+ mrPath2D.parameter.push_back( aPt1 );
+ mrPath2D.parameter.push_back( aPt2 );
+ mrPath2D.parameter.push_back( aPt3 );
+ mrPath2D.parameter.push_back( aPt );
+ }
+ break;
+ case NMSP_DRAWINGML | XML_quadBezTo :
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO ) )
+ mrSegments.back().Count++;
else
- mrShape.setServiceName( "com.sun.star.drawing.PolyLinePathShape" );
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameterPair aPt1;
+ EnhancedCustomShapeParameterPair aPt2;
+ mrPath2D.parameter.push_back( aPt1 );
+ mrPath2D.parameter.push_back( aPt2 );
+ xContext = new Path2DQuadBezierToContext( *this, mrCustomShapeProperties,
+ mrPath2D.parameter[ mrPath2D.parameter.size() - 2 ],
+ mrPath2D.parameter.back() );
}
+ break;
+ case NMSP_DRAWINGML | XML_cubicBezTo :
+ {
+ if ( !mrSegments.empty() && ( mrSegments.back().Command == EnhancedCustomShapeSegmentCommand::CURVETO ) )
+ mrSegments.back().Count++;
+ else
+ {
+ EnhancedCustomShapeSegment aSegment;
+ aSegment.Command = EnhancedCustomShapeSegmentCommand::CURVETO;
+ aSegment.Count = 1;
+ mrSegments.push_back( aSegment );
+ }
+ EnhancedCustomShapeParameterPair aControlPt1;
+ EnhancedCustomShapeParameterPair aControlPt2;
+ EnhancedCustomShapeParameterPair aEndPt;
+ mrPath2D.parameter.push_back( aControlPt1 );
+ mrPath2D.parameter.push_back( aControlPt2 );
+ mrPath2D.parameter.push_back( aEndPt );
+ xContext = new Path2DCubicBezierToContext( *this, mrCustomShapeProperties,
+ mrPath2D.parameter[ mrPath2D.parameter.size() - 3 ],
+ mrPath2D.parameter[ mrPath2D.parameter.size() - 2 ],
+ mrPath2D.parameter.back() );
}
break;
}
- case NMSP_DRAWINGML|XML_path:
- if( maPolygon.count() > 0 )
- mrShape.getCustomShapeProperties()->getPolygon().append( maPolygon );
- break;
+ return xContext;
+}
+
+// ---------------------------------------------------------------------
+// CT_Path2DList
+class Path2DListContext : public ContextHandler
+{
+public:
+ Path2DListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments,
+ std::vector< Path2D >& rPath2DList );
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+
+protected:
+
+ CustomShapeProperties& mrCustomShapeProperties;
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& mrSegments;
+ std::vector< Path2D >& mrPath2DList;
+};
+
+Path2DListContext::Path2DListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< EnhancedCustomShapeSegment >& rSegments,
+ std::vector< Path2D >& rPath2DList )
+: ContextHandler( rParent )
+, mrCustomShapeProperties( rCustomShapeProperties )
+, mrSegments( rSegments )
+, mrPath2DList( rPath2DList )
+{
+}
+
+::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL Path2DListContext::createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException)
+{
+ Reference< XFastContextHandler > xContext;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_path ) )
+ {
+ Path2D aPath2D;
+ mrPath2DList.push_back( aPath2D );
+ xContext = new Path2DContext( *this, xAttribs, mrCustomShapeProperties, mrSegments, mrPath2DList.back() );
}
+ return xContext;
}
// ---------------------------------------------------------------------
@@ -1066,29 +1972,53 @@ static OUString GetTextShapeType( sal_Int32 nType )
// ---------------------------------------------------------------------
// CT_CustomGeometry2D
-CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& /* xAttribs */, Shape& rShape )
+CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& /* xAttribs */, CustomShapeProperties& rCustomShapeProperties )
: ContextHandler( rParent )
-, mrShape( rShape )
+, mrCustomShapeProperties( rCustomShapeProperties )
{
}
-Reference< XFastContextHandler > CustomShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
+Reference< XFastContextHandler > CustomShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
{
+ Reference< XFastContextHandler > xContext;
switch( aElementToken )
{
- // todo
- case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list
- case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list
- case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list
- case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list
- case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list
- break;
- case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list
- return new PathListContext( *this, mrShape );
- }
+ case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list
+ xContext = new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() );
+ break;
+ case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list
+ xContext = new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getGuideList() );
+ break;
+ case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list
+ xContext = new AdjustHandleListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustHandleList() );
+ break;
+ case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list
+ xContext = this;
+ break;
+ case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list
+ {
+ GeomRect aGeomRect;
+ aGeomRect.l = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_l ), sal_True );
+ aGeomRect.t = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_t ), sal_True );
+ aGeomRect.r = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_r ), sal_True );
+ aGeomRect.b = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_b ), sal_True );
+ mrCustomShapeProperties.getTextRect() = aGeomRect;
+ }
+ break;
+ case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list
+ xContext = new Path2DListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getSegments(), mrCustomShapeProperties.getPath2DList() );
+ break;
- Reference< XFastContextHandler > xEmpty;
- return xEmpty;
+ // from cxnLst:
+ case NMSP_DRAWINGML|XML_cxn: // CT_ConnectionSite
+ {
+ ConnectionSite aConnectionSite;
+ mrCustomShapeProperties.getConnectionSiteList().push_back( aConnectionSite );
+ xContext = new ConnectionSiteContext( *this, xAttribs, mrCustomShapeProperties, mrCustomShapeProperties.getConnectionSiteList().back() );
+ }
+ break;
+ }
+ return xContext;
}
// ---------------------------------------------------------------------
@@ -1108,7 +2038,7 @@ PresetShapeGeometryContext::PresetShapeGeometryContext( ContextHandler& rParent,
Reference< XFastContextHandler > PresetShapeGeometryContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
{
if ( aElementToken == ( NMSP_DRAWINGML | XML_avLst ) )
- return new AdjustmentValueContext( *this, mrCustomShapeProperties );
+ return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() );
else
return this;
}
@@ -1129,20 +2059,10 @@ PresetTextShapeContext::PresetTextShapeContext( ContextHandler& rParent, const R
Reference< XFastContextHandler > PresetTextShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
{
- switch( aElementToken )
- {
- // todo
- case NMSP_DRAWINGML|XML_avLst: // CT_GeomGuideList adjust value list
- case NMSP_DRAWINGML|XML_gdLst: // CT_GeomGuideList guide list
- case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list
- case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list
- case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list
- case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list
- break;
- }
-
- Reference< XFastContextHandler > xEmpty;
- return xEmpty;
+ if ( aElementToken == ( NMSP_DRAWINGML | XML_avLst ) )
+ return new GeomGuideListContext( *this, mrCustomShapeProperties, mrCustomShapeProperties.getAdjustmentGuideList() );
+ else
+ return this;
}
} }
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 4459c5936cfa..62e42701b273 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -32,6 +32,7 @@
#include "oox/core/namespaces.hxx"
#include "properties.hxx"
#include "tokens.hxx"
+#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/graphic/XGraphicTransformer.hpp>
@@ -39,6 +40,7 @@
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
using rtl::OUString;
+using namespace ::oox::core;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -54,13 +56,41 @@ CustomShapeProperties::~CustomShapeProperties()
{
}
+sal_Int32 CustomShapeProperties::SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide )
+{
+ sal_uInt32 nIndex = 0;
+ for( ; nIndex < rGuideList.size(); nIndex++ )
+ {
+ if ( rGuideList[ nIndex ].maName == rGuide.maName )
+ break;
+ }
+ if ( nIndex == rGuideList.size() )
+ rGuideList.push_back( rGuide );
+ return static_cast< sal_Int32 >( nIndex );
+}
+
+// returns the index into the guidelist for a given formula name,
+// if the return value is < 0 then the guide value could not be found
+sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const rtl::OUString& rFormulaName )
+{
+ sal_Int32 nIndex = 0;
+ for( ; nIndex < static_cast< sal_Int32 >( rGuideList.size() ); nIndex++ )
+ {
+ if ( rGuideList[ nIndex ].maName == rFormulaName )
+ break;
+ }
+ if ( nIndex == static_cast< sal_Int32 >( rGuideList.size() ) )
+ nIndex = -1;
+ return nIndex;
+}
+
void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCustomShapeProperties */ )
{
// not sure if this needs to be implemented
}
-void CustomShapeProperties::pushToPropSet(
- const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
+void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */,
+ const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
{
if ( maShapePresetType.getLength() )
{
@@ -69,64 +99,155 @@ void CustomShapeProperties::pushToPropSet(
if( xDefaulter.is() )
xDefaulter->createCustomShapeDefaults( maShapePresetType );
- const OUString sType = CREATE_OUSTRING( "Type" );
- const OUString sCustomShapeGeometry( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeGeometry" ) );
- uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
- uno::Sequence< beans::PropertyValue > aGeoPropSeq;
- if ( aGeoPropSet >>= aGeoPropSeq )
+ if ( maAdjustmentGuideList.size() )
{
- sal_Int32 i, nCount = aGeoPropSeq.getLength();
- for ( i = 0; i < nCount; i++ )
+ const OUString sType = CREATE_OUSTRING( "Type" );
+ const OUString sCustomShapeGeometry( RTL_CONSTASCII_USTRINGPARAM( "CustomShapeGeometry" ) );
+ uno::Any aGeoPropSet = xPropSet->getPropertyValue( sCustomShapeGeometry );
+ uno::Sequence< beans::PropertyValue > aGeoPropSeq;
+ if ( aGeoPropSet >>= aGeoPropSeq )
{
- const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) );
- if ( aGeoPropSeq[ i ].Name.equals( sAdjustmentValues ) )
+ sal_Int32 i, nCount = aGeoPropSeq.getLength();
+ for ( i = 0; i < nCount; i++ )
{
- uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
- if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq )
+ const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM( "AdjustmentValues" ) );
+ if ( aGeoPropSeq[ i ].Name.equals( sAdjustmentValues ) )
{
- sal_uInt32 j, nHighest = 0;
- for( j = 0; j < maAdjustmentValues.size(); j++ )
+ uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue > aAdjustmentSeq;
+ if ( aGeoPropSeq[ i ].Value >>= aAdjustmentSeq )
{
- const rtl::OUString& rS( maAdjustmentValues[ j ].maName );
- if ( rS.getLength() > 3 )
+ std::vector< CustomShapeGuide >::const_iterator aIter( maAdjustmentGuideList.begin() );
+ while( aIter != maAdjustmentGuideList.end() )
{
- sal_uInt32 nVal = rS.copy( 3 ).toInt32();
- if ( ( nVal < 10 ) && ( nVal > nHighest ) )
- nHighest = nVal;
- }
- }
- if ( nHighest > static_cast< sal_uInt32 >( aAdjustmentSeq.getLength() ) )
- aAdjustmentSeq.realloc( nHighest );
-
- for ( j = 0; j < maAdjustmentValues.size(); j++ )
- {
- if( maAdjustmentValues[ j ].maName.getLength() > 3 )
- {
- sal_uInt32 nVal = maAdjustmentValues[ j ].maName.copy( 3 ).toInt32();
- if ( nVal-- )
+ if ( (*aIter).maName.getLength() > 3 )
{
- double fNewAdj = getValue( maAdjustmentValues, nVal );
- aAdjustmentSeq[ nVal ].State = beans::PropertyState_DIRECT_VALUE;
- aAdjustmentSeq[ nVal ].Value <<= fNewAdj;
+ sal_Int32 nAdjustmentIndex = (*aIter).maName.copy( 3 ).toInt32() - 1;
+ if ( ( nAdjustmentIndex >= 0 ) && ( nAdjustmentIndex < aAdjustmentSeq.getLength() ) )
+ {
+ EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
+ aAdjustmentVal.Value <<= (*aIter).maFormula.toInt32();
+ aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
+ aAdjustmentSeq[ nAdjustmentIndex ] = aAdjustmentVal;
+ }
}
+ aIter++;
}
+ aGeoPropSeq[ i ].Value <<= aAdjustmentSeq;
+ xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) );
}
- aGeoPropSeq[ i ].Value <<= aAdjustmentSeq;
- xPropSet->setPropertyValue( sCustomShapeGeometry, Any( aGeoPropSeq ) );
}
- }
- else if ( aGeoPropSeq[ i ].Name.equals( sType ) )
- {
- aGeoPropSeq[ i ].Value <<= maShapePresetType;
+ else if ( aGeoPropSeq[ i ].Name.equals( sType ) )
+ {
+ aGeoPropSeq[ i ].Value <<= maShapePresetType;
+ }
}
}
}
}
else
{
+ sal_uInt32 i;
PropertyMap aPropertyMap;
aPropertyMap[ PROP_Type ] <<= CREATE_OUSTRING( "non-primitive" );
+ awt::Size aSize( xShape->getSize() );
+ awt::Rectangle aViewBox( 0, 0, aSize.Width * 360, aSize.Height * 360 );
+ if ( maPath2DList.size() )
+ { // TODO: each polygon may have its own size, but I think it is rather been used
+ // so we are only taking care of the first
+ if ( maPath2DList[ 0 ].w )
+ aViewBox.Width = static_cast< sal_Int32 >( maPath2DList[ 0 ].w );
+ if ( maPath2DList[ 0 ].h )
+ aViewBox.Height = static_cast< sal_Int32 >( maPath2DList[ 0 ].h );
+ }
+ aPropertyMap[ PROP_ViewBox ] <<= aViewBox;
+
+ Sequence< EnhancedCustomShapeAdjustmentValue > aAdjustmentValues( maAdjustmentGuideList.size() );
+ for ( i = 0; i < maAdjustmentGuideList.size(); i++ )
+ {
+ EnhancedCustomShapeAdjustmentValue aAdjustmentVal;
+ aAdjustmentVal.Value <<= maAdjustmentGuideList[ i ].maFormula.toInt32();
+ aAdjustmentVal.State = PropertyState_DIRECT_VALUE;
+ aAdjustmentValues[ i ] = aAdjustmentVal;
+ }
+ aPropertyMap[ PROP_AdjustmentValues ] <<= aAdjustmentValues;
+
+ Sequence< rtl::OUString > aEquations( maGuideList.size() );
+ for ( i = 0; i < maGuideList.size(); i++ )
+ aEquations[ i ] = maGuideList[ i ].maFormula;
+ aPropertyMap[ PROP_Equations ] <<= aEquations;
+
+ PropertyMap aPath;
+ Sequence< EnhancedCustomShapeSegment > aSegments( maSegments.size() );
+ for ( i = 0; i < maSegments.size(); i++ )
+ aSegments[ i ] = maSegments[ i ];
+ aPath[ PROP_Segments ] <<= aSegments;
+ sal_uInt32 j, k, nParameterPairs = 0;
+ for ( i = 0; i < maPath2DList.size(); i++ )
+ nParameterPairs += maPath2DList[ i ].parameter.size();
+ Sequence< EnhancedCustomShapeParameterPair > aParameterPairs( nParameterPairs );
+ for ( i = 0, k = 0; i < maPath2DList.size(); i++ )
+ for ( j = 0; j < maPath2DList[ i ].parameter.size(); j++ )
+ aParameterPairs[ k++ ] = maPath2DList[ i ].parameter[ j ];
+ aPath[ PROP_Coordinates ] <<= aParameterPairs;
+ Sequence< PropertyValue > aPathSequence = aPath.makePropertyValueSequence();
+ aPropertyMap[ PROP_Path ] <<= aPathSequence;
+
+ Sequence< PropertyValues > aHandles( maAdjustHandleList.size() );
+ for ( i = 0; i < maAdjustHandleList.size(); i++ )
+ {
+ PropertyMap aHandle;
+ // maAdjustmentHandle[ i ].gdRef1 ... maAdjustmentHandle[ i ].gdRef2 ... :(
+ // gdRef1 && gdRef2 -> we do not offer such reference, so it is difficult
+ // to determine the correct adjustment handle that should be updated with the adjustment
+ // position. here is the solution: the adjustment value that is used within the position
+ // has to be updated, in case the position is a formula the first usage of a
+ // adjument value is decisive
+ if ( maAdjustHandleList[ i ].polar )
+ {
+ aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos;
+ if ( maAdjustHandleList[ i ].min1.has() )
+ aHandle[ PROP_RadiusRangeMinimum ] <<= maAdjustHandleList[ i ].min1.get();
+ if ( maAdjustHandleList[ i ].max1.has() )
+ aHandle[ PROP_RadiusRangeMaximum ] <<= maAdjustHandleList[ i ].max1.get();
+
+ /* TODO: AngleMin & AngleMax
+ if ( maAdjustHandleList[ i ].min2.has() )
+ aHandle[ PROP_ ] = maAdjustHandleList[ i ].min2.get();
+ if ( maAdjustHandleList[ i ].max2.has() )
+ aHandle[ PROP_ ] = maAdjustHandleList[ i ].max2.get();
+ */
+ }
+ else
+ {
+ aHandle[ PROP_Position ] <<= maAdjustHandleList[ i ].pos;
+ if ( maAdjustHandleList[ i ].gdRef1.has() )
+ {
+ // TODO: PROP_RefX and PROP_RefY are not yet part of our file format,
+ // so the handles will not work after save/reload
+ sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef1.get() );
+ if ( nIndex >= 0 )
+ aHandle[ PROP_RefX ] <<= nIndex;
+ }
+ if ( maAdjustHandleList[ i ].gdRef2.has() )
+ {
+ sal_Int32 nIndex = GetCustomShapeGuideValue( maAdjustmentGuideList, maAdjustHandleList[ i ].gdRef2.get() );
+ if ( nIndex >= 0 )
+ aHandle[ PROP_RefY ] <<= nIndex;
+ }
+ if ( maAdjustHandleList[ i ].min1.has() )
+ aHandle[ PROP_RangeXMinimum ] <<= maAdjustHandleList[ i ].min1.get();
+ if ( maAdjustHandleList[ i ].max1.has() )
+ aHandle[ PROP_RangeXMaximum ] <<= maAdjustHandleList[ i ].max1.get();
+ if ( maAdjustHandleList[ i ].min2.has() )
+ aHandle[ PROP_RangeYMinimum ] <<= maAdjustHandleList[ i ].min2.get();
+ if ( maAdjustHandleList[ i ].max2.has() )
+ aHandle[ PROP_RangeYMaximum ] <<= maAdjustHandleList[ i ].max2.get();
+ }
+ aHandles[ i ] = aHandle.makePropertyValueSequence();
+ }
+ aPropertyMap[ PROP_Handles ] <<= aHandles;
+
// converting the vector to a sequence
Sequence< PropertyValue > aSeq = aPropertyMap.makePropertyValueSequence();
PropertySet aPropSet( xPropSet );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 1a32d6a206a0..50ded9b2753b 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -95,6 +95,7 @@ Shape::Shape( const sal_Char* pServiceName )
, mnRotation( 0 )
, mbFlipH( false )
, mbFlipV( false )
+, mbHidden( false )
{
if ( pServiceName )
msServiceName = OUString::createFromAscii( pServiceName );
@@ -183,6 +184,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape )
mnRotation = rReferencedShape.mnRotation;
mbFlipH = rReferencedShape.mbFlipH;
mbFlipV = rReferencedShape.mbFlipV;
+ mbHidden = rReferencedShape.mbHidden;
}
// for group shapes, the following method is also adding each child
@@ -299,35 +301,6 @@ Reference< XShape > Shape::createAndInsert(
aTransformation.translate( aPosition.X / 360.0, aPosition.Y / 360.0 );
}
- if ( mpCustomShapePropertiesPtr && mpCustomShapePropertiesPtr->getPolygon().count() )
- {
- ::basegfx::B2DPolyPolygon& rPolyPoly = mpCustomShapePropertiesPtr->getPolygon();
-
- if( rPolyPoly.count() > 0 ) {
- if( rPolyPoly.areControlPointsUsed() ) {
- // TODO Beziers
- } else {
- uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( rPolyPoly.count() );
-
- for (sal_uInt32 j = 0; j < rPolyPoly.count(); j++ ) {
- ::basegfx::B2DPolygon aPoly = rPolyPoly.getB2DPolygon( j );
-
- // now creating the corresponding PolyPolygon
- sal_Int32 i, nNumPoints = aPoly.count();
- uno::Sequence< awt::Point > aPointSequence( nNumPoints );
- awt::Point* pPoints = aPointSequence.getArray();
- for( i = 0; i < nNumPoints; ++i )
- {
- const ::basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) );
- pPoints[ i ] = awt::Point( static_cast< sal_Int32 >( aPoint.getX() ), static_cast< sal_Int32 >( aPoint.getY() ) );
- }
- aPolyPolySequence.getArray()[ j ] = aPointSequence;
- }
- maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence;
- }
- }
- }
-
// special for lineshape
if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) )
{
@@ -399,6 +372,12 @@ Reference< XShape > Shape::createAndInsert(
}
rxShapes->add( mxShape );
+ if ( mbHidden )
+ {
+ const OUString sHidden( CREATE_OUSTRING( "NumberingLevel" ) );
+ xSet->setPropertyValue( sHidden, Any( mbHidden ) );
+ }
+
Reference< document::XActionLockable > xLockable( mxShape, UNO_QUERY );
if( xLockable.is() )
xLockable->addActionLock();
@@ -491,7 +470,7 @@ Reference< XShape > Shape::createAndInsert(
aPropSet.setProperties( aShapeProperties );
if( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) )
- mpCustomShapePropertiesPtr->pushToPropSet( xSet, mxShape );
+ mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape );
// in some cases, we don't have any text body.
if( getTextBody() )
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index a5a1f16f5935..a5f3b1598447 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNamed.hpp>
+#include "oox/helper/attributelist.hxx"
#include "oox/drawingml/shapecontext.hxx"
#include "oox/drawingml/shapestylecontext.hxx"
#include "oox/core/namespaces.hxx"
@@ -85,9 +86,13 @@ Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32
// case XML_drElemPr:
// break;
case XML_cNvPr:
+ {
+ AttributeList aAttribs( xAttribs );
+ mpShapePtr->setHidden( aAttribs.getBool( XML_hidden, false ) );
mpShapePtr->setId( xAttribs->getOptionalValue( XML_id ) );
mpShapePtr->setName( xAttribs->getOptionalValue( XML_name ) );
break;
+ }
case XML_ph:
mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx
index 7724ba9b44b2..dd1814ac23cf 100644
--- a/oox/source/drawingml/shapepropertiescontext.cxx
+++ b/oox/source/drawingml/shapepropertiescontext.cxx
@@ -74,7 +74,7 @@ Reference< XFastContextHandler > ShapePropertiesContext::createFastChildContext(
// GeometryGroup
case NMSP_DRAWINGML|XML_custGeom: // custom geometry "CT_CustomGeometry2D"
- xRet.set( new CustomShapeGeometryContext( *this, xAttribs, mrShape ) );
+ xRet.set( new CustomShapeGeometryContext( *this, xAttribs, *(mrShape.getCustomShapeProperties()) ) );
break;
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index fddc13966798..2b32b0a14d91 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -5,6 +5,7 @@ ActiveTable
Adjust
AdjustContrast
AdjustLuminance
+AdjustmentValues
Align
AnchorPosition
ArrangeOrder
@@ -83,6 +84,7 @@ CompileEnglish
ConditionalFormat
ConnectBars
ContainsHeader
+Coordinates
CopyBack
CopyFormulas
CopyStyles
@@ -116,6 +118,7 @@ EchoChar
EnableVisible
Enabled
EndPosition
+Equations
ErrorAlertStyle
ErrorBarStyle
ErrorBarX
@@ -167,6 +170,7 @@ GraphicURL
GridColor
GroupInfo
HScroll
+Handles
HasAutoShowInfo
HasColumnRowHeaders
HasHorizontalScrollBar
@@ -285,6 +289,7 @@ ParaLineSpacing
ParaRightMargin
ParaTabStops
ParaTopMargin
+Path
PercentageNumberFormat
PersistName
Perspective
@@ -307,6 +312,16 @@ Printable
ProgressValueMax
ProgressValueMin
Protected
+RadiusRangeMaximum
+RadiusRangeMinimum
+RangeXMaximum
+RangeXMinimum
+RangeYMaximum
+RangeYMinimum
+RefAngle
+RefR
+RefX
+RefY
Reference
ReferenceDevice
RegularExpressions
@@ -335,6 +350,7 @@ ScaleToPagesY
ScrollValue
ScrollValueMax
ScrollValueMin
+Segments
SelectedPage
Show
ShowBorder
@@ -425,6 +441,7 @@ VertJustify
VerticalAlign
VerticalSplitMode
VerticalSplitPositionTwips
+ViewBox
Visible
VisibleSize
VisualArea
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 4bf407747d95..b05a21152722 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -13,6 +13,10 @@
3Symbols2
3TrafficLights1
3TrafficLights2
+3cd4
+3cd8
+5cd8
+7cd8
3dDkShadow
3dLight
4Arrows
@@ -1045,6 +1049,9 @@ categoryIdx
ccw
ccwIn
ccwOut
+cd2
+cd4
+cd8
cell
cell3D
cellColor
@@ -2495,6 +2502,12 @@ harsh
hasCustomPrompt
hash
hashData
+hc
+hd2
+hd4
+hd5
+hd6
+hd8
hdr
hdrShapeDefaults
hdrs
@@ -3077,6 +3090,7 @@ lpstr
lpwstr
lrTb
lrTbV
+ls
lsdException
lstStyle
lt
@@ -4730,6 +4744,11 @@ srcNode
srcOrd
srcRect
srgbClr
+ss
+ssd2
+ssd4
+ssd6
+ssd8
sst
st
stA
@@ -5434,6 +5453,7 @@ variant
varp
varyColors
vbProcedure
+vc
vector
vendorID
venn
@@ -5498,6 +5518,12 @@ wavyDbl
wavyDouble
wavyHeavy
wd
+wd10
+wd2
+wd4
+wd5
+wd6
+wd8
wdDnDiag
wdUpDiag
weave
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 2e81c80c4321..be11586bc4fb 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -3280,7 +3280,7 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp )
if ( ( ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE || m_pData->m_nStorageType == embed::StorageFormats::OFOPXML )
&& aPropertyName.equalsAscii( "MediaType" ) )
- || m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAscii( "Encrypted" )
+ || ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAscii( "Encrypted" ) )
|| aPropertyName.equalsAscii( "Compressed" ) )
{
m_pImpl->GetStreamProperties();
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index 68c393fed08b..12aa89e03db0 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -273,7 +273,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr
}
else if ( xStream.is() )
{
- if ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is()
+ if ( ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is() )
|| !xStream->getInputStream().is() )
throw uno::Exception(); // TODO: access denied
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 007f199332c5..9c90c4ce35dd 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -4808,11 +4808,11 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
m_pImpl->m_bIsModified = sal_True;
}
}
- else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" )
+ else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" )
|| aPropertyName.equalsAscii( "HasNonEncryptedEntries" )
|| aPropertyName.equalsAscii( "IsInconsistent" )
|| aPropertyName.equalsAscii( "URL" )
- || aPropertyName.equalsAscii( "RepairPackage" ) )
+ || aPropertyName.equalsAscii( "RepairPackage" ) ) )
|| aPropertyName.equalsAscii( "IsRoot" )
|| aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) )
throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
@@ -4856,8 +4856,8 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
else
throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 );
}
- else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" )
- || aPropertyName.equalsAscii( "RepairPackage" ) )
+ else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" )
+ || aPropertyName.equalsAscii( "RepairPackage" ) ) )
|| aPropertyName.equalsAscii( "IsRoot" ) )
throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
else
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index b4648426049e..f0c4a11d22f4 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -776,11 +776,18 @@ Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyName )
void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, sal_Bool bSetParent )
throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
- if ( pEntry->IsFolder() )
- maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageFolder *> ( pEntry ) );
- else
- maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageStream *> ( pEntry ) );
-
+ try
+ {
+ if ( pEntry->IsFolder() )
+ maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageFolder *> ( pEntry ) );
+ else
+ maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageStream *> ( pEntry ) );
+ }
+ catch(const uno::Exception& rEx)
+ {
+ (void)rEx;
+ throw;
+ }
if ( bSetParent )
pEntry->setParent ( *this );
}
diff --git a/postprocess/checkdeliver/checkdeliver.pl b/postprocess/checkdeliver/checkdeliver.pl
index 46a9ad9238f4..d2270a841848 100644
--- a/postprocess/checkdeliver/checkdeliver.pl
+++ b/postprocess/checkdeliver/checkdeliver.pl
@@ -38,7 +38,6 @@ use File::stat;
use IO::Handle;
use lib ("$ENV{SOLARENV}/bin/modules");
-use SourceConfig;
#### globals #####
@@ -49,7 +48,6 @@ my $platform = '';
my $logfile = '';
my $milestoneext = '';
my $local_env = 0;
-my $source_config = SourceConfig -> new($ENV{SOLARSRC});
my @exceptionmodlist = (
"postprocess",
"instset.*native",
@@ -143,6 +141,7 @@ sub check
my $error = 0;
my %delivered;
my $module;
+ my $repository;
STDOUT->autoflush(1);
# which module are we checking?
if ( $listname =~ /\/([\w-]+?)\/deliver\.log$/o) {
@@ -151,9 +150,39 @@ sub check
print_logged( "Error: cannot determine module name from \'$listname\'\n" );
return 1;
}
- # where do we have to look for modules?
- my $repository = $source_config->get_module_repository($module);
- my $path = $source_config->get_module_path($module);
+
+ # read deliver log file
+ if ( ! open( DELIVERLOG, "< $listname" ) ) {
+ print_logged( "Error: cannot open file \'$listname\'\n$!" );
+ exit 2;
+ }
+ foreach ( <DELIVERLOG> ) {
+ next if ( /^LINK / );
+ # What's this modules' repository?
+ if ( / (\w+?)\/$module\/prj\/build.lst/ ) {
+ $repository = $1;
+ }
+ # For now we concentrate on binaries, located in 'bin' or 'lib' and 'misc/build/<...>/[bin|lib]'.
+ next if ( (! /\/$module\/$platform\/[bl]i[nb]\//) && (! /\/$module\/$platform\/misc\/build\//));
+ next if (! /[bl]i[nb]/);
+ next if ( /\.html$/ );
+ chomp;
+ if ( /^\w+? (\S+) (\S+)\s*$/o ) {
+ my $origin = $1;
+ $delivered{$origin} = $2;
+ } else {
+ print_logged( "Warning: cannot parse \'$listname\' line\n\'$_\'\n" );
+ }
+ }
+ close( DELIVERLOG );
+
+ if ( ! $repository ) {
+ print_logged( "Error parsing \'$listname\': cannot determine repository\n");
+ $error ++;
+ return $error;
+ }
+
+ my $path = "$srcrootdir/$repository/$module";
# is module physically accessible?
# there are valid use cases where we build against a prebuild solver whithout having
# all modules at disk
@@ -176,30 +205,10 @@ sub check
return $error;
}
- # read deliver log file
- if ( ! open( DELIVERLOG, "< $listname" ) ) {
- print_logged( "Error: cannot open file \'$listname\'\n$!" );
- exit 2;
- }
- foreach ( <DELIVERLOG> ) {
- next if ( /^LINK / );
- # For now we concentrate on binaries, located in 'bin' or 'lib' and 'misc/build/<...>/[bin|lib]'.
- next if ( (! / $module\/$platform\/[bl]i[nb]\//) && (! / $module\/$platform\/misc\/build\//));
- next if (! /[bl]i[nb]/);
- next if ( /\.html$/ );
- chomp;
- if ( /^\w+? (\S+) (\S+)\s*$/o ) {
- $delivered{$1} = $2;
- } else {
- print_logged( "Warning: cannot parse \'$listname\' line\n\'$_\'\n" );
- }
- }
- close( DELIVERLOG );
-
# compare all delivered files with their origin
# no strict 'diff' allowed here, as deliver may alter files (hedabu, strip, ...)
foreach my $file ( sort keys %delivered ) {
- my $ofile = "$srcrootdir/$repository/$file";
+ my $ofile = "$srcrootdir/$file";
my $sfile = "$solverdir/$delivered{$file}";
if ( $milestoneext ) {
# deliver log files do not contain milestone extension on solver
diff --git a/qadevOOo/runner/lib/MultiPropertyTest.java b/qadevOOo/runner/lib/MultiPropertyTest.java
index 286ddf1600a9..a02f93c04347 100644
--- a/qadevOOo/runner/lib/MultiPropertyTest.java
+++ b/qadevOOo/runner/lib/MultiPropertyTest.java
@@ -41,6 +41,7 @@ import java.lang.reflect.Method;
import util.ValueChanger;
import util.ValueComparer;
+import util.utils;
import com.sun.star.uno.Any;
import com.sun.star.uno.AnyConverter;
@@ -179,6 +180,25 @@ public class MultiPropertyTest extends MultiMethodTest
{
Object oldValue = oObj.getPropertyValue(propName);
+ if( (oldValue==null) || utils.isVoid(oldValue) )
+ {
+ // #i111560# method getNewValue() does not work with an empty oldValue
+ Property prop = info.getPropertyByName(propName);
+ if( (prop.Attributes & PropertyAttribute.MAYBEVOID) != 0 )
+ {
+ // todo: implement a new test independent from method getNewValue()
+ log.println("changing initially empty MAYBEVOID properties is not supported by the test framework so far - skip test of property: " + propName);
+ tRes.tested(propName, true);
+ return;
+ }
+ else
+ {
+ log.println( "property '"+propName+"' is not set but is not MAYBEVOID");
+ tRes.tested(propName, false);
+ return;
+ }
+ }
+
Object newValue;
// trying to create new value
diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
index 54c1f3431bbf..dfc135843b44 100644
--- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
+++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
@@ -27,8 +27,7 @@
package ifc.beans;
-import java.util.Random;
-import java.util.StringTokenizer;
+import java.util.Vector;
import lib.MultiMethodTest;
import util.ValueChanger;
@@ -102,13 +101,13 @@ public class _XPropertySet extends MultiMethodTest {
private final XVetoableChangeListener VClistener = new MyVetoListener();
/**
- * Structure that collects three properties of each type to test :
+ * Structure that collects the properties of different types to test :
* Constrained, Bound and Normal.
*/
private final class PropsToTest {
- String constrained = null;
- String bound = null;
- String normal = null;
+ Vector< String > constrained = new Vector< String >();
+ Vector< String > bound = new Vector< String >();
+ Vector< String > normal = new Vector< String >();
}
private final PropsToTest PTT = new PropsToTest();
@@ -133,9 +132,12 @@ public class _XPropertySet extends MultiMethodTest {
log.println("getPropertySetInfo() method returned null");
tRes.tested("getPropertySetInfo()", true) ;
String[] ptt = (String[]) tEnv.getObjRelation("PTT");
- PTT.normal=ptt[0];
- PTT.bound=ptt[1];
- PTT.constrained=ptt[2];
+ PTT.normal.clear();
+ PTT.bound.clear();
+ PTT.constrained.clear();
+ PTT.normal.add( ptt[0] );
+ PTT.bound.add( ptt[1] );
+ PTT.constrained.add( ptt[2] );
} else {
tRes.tested("getPropertySetInfo()", true );
getPropsToTest(propertySetInfo);
@@ -161,41 +163,46 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("getPropertySetInfo()");
- propertyChanged = false;
-
-
- if ( PTT.bound.equals("none") ) {
+ int count = PTT.bound.size();
+ if ( count==0 || PTT.bound.get(0).equals("none") ) {
log.println("*** No bound properties found ***");
tRes.tested("addPropertyChangeListener()", true) ;
} else {
- try {
- oObj.addPropertyChangeListener(PTT.bound,PClistener);
- Object gValue = oObj.getPropertyValue(PTT.bound);
- oObj.setPropertyValue(PTT.bound,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } // end of try-catch
- tRes.tested("addPropertyChangeListener()", propertyChanged);
- if (!propertyChanged) {
- log.println("propertyChangeListener wasn't called for '"+
- PTT.bound+"'");
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.bound.get(i);
+ propertyChanged = false;
+ try {
+ oObj.addPropertyChangeListener(propertyName,PClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ log.println("Check bound property: " + propertyName );
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ error = error || !propertyChanged;
+ if (!propertyChanged) {
+ log.println("propertyChangeListener wasn't called for '"+
+ propertyName+"'");
+ }
}
- } //endif
+ tRes.tested("addPropertyChangeListener()", !error);
+ }
return;
@@ -217,40 +224,45 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("getPropertySetInfo()");
- vetoableChanged = false;
-
- if ( PTT.constrained.equals("none") ) {
+ int count = PTT.constrained.size();
+ if ( count==0 || PTT.constrained.get(0).equals("none") ) {
log.println("*** No constrained properties found ***");
tRes.tested("addVetoableChangeListener()", true) ;
} else {
- try {
- oObj.addVetoableChangeListener(PTT.constrained,VClistener);
- Object gValue = oObj.getPropertyValue(PTT.constrained);
- oObj.setPropertyValue(PTT.constrained,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } // end of try-catch
- tRes.tested("addVetoableChangeListener()",vetoableChanged);
- if (!vetoableChanged) {
- log.println("vetoableChangeListener wasn't called for '"+
- PTT.constrained+"'");
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.constrained.get(i);
+ vetoableChanged = false;
+ try {
+ oObj.addVetoableChangeListener(propertyName,VClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ error = error || !vetoableChanged;
+ if (!vetoableChanged) {
+ log.println("vetoableChangeListener wasn't called for '"+
+ propertyName+"'");
+ }
}
- } //endif
+ tRes.tested("addVetoableChangeListener()",!error);
+ }
return;
@@ -276,34 +288,44 @@ public class _XPropertySet extends MultiMethodTest {
Object gValue = null;
Object sValue = null;
- if ( PTT.normal.equals("none") ) {
+ int count = PTT.normal.size();
+ if ( count==0 || PTT.normal.get(0).equals("none") ) {
log.println("*** No changeable properties found ***");
tRes.tested("setPropertyValue()", true) ;
} else {
- try {
- log.println("try to cheange value of property '" + PTT.normal + "'" );
- gValue = oObj.getPropertyValue(PTT.normal);
- sValue = ValueChanger.changePValue(gValue);
- oObj.setPropertyValue(PTT.normal, sValue);
- sValue = oObj.getPropertyValue(PTT.normal);
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.normal+"'");
- e.printStackTrace(log);
- } // end of try-catch
- tRes.tested("setPropertyValue()",(! gValue.equals(sValue)));
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.normal.get(i);
+ try {
+ log.println("try to change value of property '" + propertyName + "'" );
+ gValue = oObj.getPropertyValue(propertyName);
+ sValue = ValueChanger.changePValue(gValue);
+ oObj.setPropertyValue(propertyName, sValue);
+ sValue = oObj.getPropertyValue(propertyName);
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ if( gValue.equals(sValue) )
+ {
+ log.println("setting property '"+ propertyName+"' failed");
+ error = true;
+ }
+ }
+ tRes.tested("setPropertyValue()",!error);
} //endif
return;
@@ -311,6 +333,28 @@ public class _XPropertySet extends MultiMethodTest {
} // end of setPropertyValue()
/**
+ * Tests <code>getPropertyValue</code> method for the given property.
+ * Returns true if no exceptions occured
+ */
+ private boolean getSinglePropertyValue( String propertyName )
+ {
+ boolean runOk = false;
+ try {
+ oObj.getPropertyValue(propertyName);
+ runOk = true;
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to get property '"+
+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to get property '"+
+ propertyName+"'");
+ e.printStackTrace(log);
+ }
+ return runOk;
+ }
+
+ /**
* Tests <code>getPropertyValue</code> method.
* Just call this method and checks for no exceptions <p>
* Method tests to be successfully completed before :
@@ -325,29 +369,33 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("getPropertySetInfo()");
- String toCheck = PTT.normal;
-
- if ( PTT.normal.equals("none") ) {
- toCheck = oObj.getPropertySetInfo().getProperties()[0].Name;
- log.println("All properties are Read Only");
- log.println("Using: "+toCheck);
+ int count = PTT.normal.size();
+ if ( count==0 || PTT.normal.get(0).equals("none") ) {
+ Property[] properties = oObj.getPropertySetInfo().getProperties();
+ if( properties.length > 0 ) {
+ String propertyName = properties[0].Name;
+ log.println("All properties are Read Only");
+ log.println("Using: "+propertyName);
+ tRes.tested("getPropertyValue()", getSinglePropertyValue( propertyName ) );
+ }
+ else {
+ log.println("*** No properties found ***");
+ tRes.tested("getPropertyValue()", true) ;
+ }
+ } else {
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.normal.get(i);
+ boolean runOk = getSinglePropertyValue( propertyName );
+ if( !runOk )
+ {
+ error = true;
+ log.println("getPropertyValue() failed for property '"+propertyName+"'");
+ }
+ }
+ tRes.tested("getPropertyValue()", !error) ;
}
- try {
- oObj.getPropertyValue(toCheck);
- tRes.tested("getPropertyValue()",true);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to get property '"+
- PTT.normal+"'");
- e.printStackTrace(log);
- tRes.tested("getPropertyValue()",false);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to get property '"+
- PTT.normal+"'");
- e.printStackTrace(log);
- tRes.tested("getPropertyValue()",false);
- } // end of try-catch
-
return;
}
@@ -367,42 +415,60 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("addPropertyChangeListener()");
- propertyChanged = false;
-
- if ( PTT.bound.equals("none") ) {
+ int count = PTT.bound.size();
+ if ( count==0 || PTT.bound.get(0).equals("none") ) {
log.println("*** No bound properties found ***");
tRes.tested("removePropertyChangeListener()", true) ;
} else {
- try {
- propertyChanged = false;
- oObj.removePropertyChangeListener(PTT.bound,PClistener);
- Object gValue = oObj.getPropertyValue(PTT.bound);
- oObj.setPropertyValue(PTT.bound,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.bound+"'");
- e.printStackTrace(log);
- } // end of try-catch
-
- tRes.tested("removePropertyChangeListener()",!propertyChanged);
- if (propertyChanged) {
- log.println("propertyChangeListener was called after removing"+
- " for '"+PTT.bound+"'");
+
+ //remove all listeners first
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.bound.get(i);
+ try {
+ oObj.removePropertyChangeListener(propertyName,PClistener);
+ } catch (Exception e) {
+ log.println("Exception occured while removing change listener from"+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ }
}
- } //endif
+
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.bound.get(i);
+ try {
+ propertyChanged = false;
+ oObj.addPropertyChangeListener(propertyName,PClistener);
+ oObj.removePropertyChangeListener(propertyName,PClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+
+ error = error || propertyChanged;
+ if (propertyChanged) {
+ log.println("propertyChangeListener was called after removing"+
+ " for '"+propertyName+"'");
+ }
+ }
+ tRes.tested("removePropertyChangeListener()",!error);
+ }
return;
@@ -425,47 +491,64 @@ public class _XPropertySet extends MultiMethodTest {
requiredMethod("addVetoableChangeListener()");
- vetoableChanged = false;
-
- if ( PTT.constrained.equals("none") ) {
+ int count = PTT.constrained.size();
+ if ( count==0 || PTT.constrained.get(0).equals("none") ) {
log.println("*** No constrained properties found ***");
tRes.tested("removeVetoableChangeListener()", true) ;
} else {
- try {
- oObj.removeVetoableChangeListener(PTT.constrained,VClistener);
- Object gValue = oObj.getPropertyValue(PTT.constrained);
- oObj.setPropertyValue(PTT.constrained,
- ValueChanger.changePValue(gValue));
- } catch (com.sun.star.beans.PropertyVetoException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.IllegalArgumentException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.beans.UnknownPropertyException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } catch (com.sun.star.lang.WrappedTargetException e) {
- log.println("Exception occured while trying to change "+
- "property '"+ PTT.constrained+"'");
- e.printStackTrace(log);
- } // end of try-catch
-
- tRes.tested("removeVetoableChangeListener()",!vetoableChanged);
- if (vetoableChanged) {
- log.println("vetoableChangeListener was called after "+
- "removing for '"+PTT.constrained+"'");
+
+ //remove all listeners first
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.constrained.get(i);
+ try {
+ oObj.removeVetoableChangeListener(propertyName,VClistener);
+ } catch (Exception e) {
+ log.println("Exception occured while removing veto listener from"+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ }
}
- } //endif
+
+ boolean error = false;
+ for (int i = 0; i < count; i++) {
+ String propertyName = PTT.constrained.get(i);
+ vetoableChanged = false;
+ try {
+ oObj.addVetoableChangeListener(propertyName,VClistener);
+ oObj.removeVetoableChangeListener(propertyName,VClistener);
+ Object gValue = oObj.getPropertyValue(propertyName);
+ oObj.setPropertyValue(propertyName,
+ ValueChanger.changePValue(gValue));
+ } catch (com.sun.star.beans.PropertyVetoException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } catch (com.sun.star.lang.WrappedTargetException e) {
+ log.println("Exception occured while trying to change "+
+ "property '"+ propertyName+"'");
+ e.printStackTrace(log);
+ } // end of try-catch
+ error = error || vetoableChanged;
+ if (vetoableChanged) {
+ log.println("vetoableChangeListener was called after "+
+ "removing for '"+propertyName+"'");
+ }
+ }
+ tRes.tested("removeVetoableChangeListener()",!error);
+ }
return;
} // end of removeVetoableChangeListener()
-
/**
* Gets the properties being tested. Searches and stores by one
* property of each kind (Bound, Vetoable, Normal).
@@ -473,9 +556,6 @@ public class _XPropertySet extends MultiMethodTest {
public void getPropsToTest(XPropertySetInfo xPSI) {
Property[] properties = xPSI.getProperties();
- String bound = "";
- String constrained = "";
- String normal = "";
// some properties should not be changed in a unspecific way
String[] skip = {"PrinterName", "CharRelief", "IsLayerMode"};
@@ -522,47 +602,19 @@ public class _XPropertySet extends MultiMethodTest {
if ( isWritable && isNotNull ) canChange = isChangeable(name);
if ( isWritable && isNotNull && isBound && canChange) {
- bound+=name+";";
+ PTT.bound.add(name);
}
if ( isWritable && isNotNull && isConstr && canChange) {
- constrained+=name+";";
+ PTT.constrained.add(name);
}
- if ( isWritable && isNotNull && canChange) normal+=name+";";
+ if ( isWritable && isNotNull && canChange) {
+ PTT.normal.add(name);
+ }
} // endfor
-
- //get a random bound property
- PTT.bound=getRandomString(bound);
- log.println("Bound: "+PTT.bound);
-
- //get a random constrained property
- PTT.constrained=getRandomString(constrained);
- log.println("Constrained: "+PTT.constrained);
-
- //get a random normal property
- PTT.normal=getRandomString(normal);
- }
-
- /**
- * Retrieves one random property name from list (property names separated
- * by ';') of property names.
- */
- public String getRandomString(String str) {
-
- String gRS = "none";
- Random rnd = new Random();
-
- if (str.equals("")) str = "none";
- StringTokenizer ST=new StringTokenizer(str,";");
- int nr = rnd.nextInt(ST.countTokens());
- if (nr < 1) nr+=1;
- for (int i=1; i<nr+1; i++) gRS = ST.nextToken();
-
- return gRS;
-
}
public boolean isChangeable(String name) {
diff --git a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
index f289d68983ce..531ec39478ed 100644
--- a/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
+++ b/qadevOOo/tests/java/ifc/chart/_Chart3DBarProperties.java
@@ -93,6 +93,40 @@ public class _Chart3DBarProperties extends MultiPropertyTest {
throw new StatusException("Couldn't change Diagram to 3D", e);
}
}
+
+ /**
+ * Sets the diagram back to 2D as 2D rendering is much faster for the following tests.
+ */
+ protected void after() {
+ log.println("Setting Diagram back to 2D");
+ XChartDocument doc = (XChartDocument) tEnv.getObjRelation("CHARTDOC");
+ if (doc == null) throw new StatusException(Status.failed
+ ("Relation 'CHARTDOC' not found"));
+
+ log.println("Change Diagram to 3D");
+ oObj = (XPropertySet)
+ UnoRuntime.queryInterface( XPropertySet.class, doc.getDiagram() );
+ try {
+ oObj.setPropertyValue("Dim3D", new Boolean(false));
+ } catch(com.sun.star.lang.WrappedTargetException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ } catch(com.sun.star.lang.IllegalArgumentException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ } catch(com.sun.star.beans.PropertyVetoException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ } catch(com.sun.star.beans.UnknownPropertyException e) {
+ log.println("Couldn't change Diagram back to 2D");
+ e.printStackTrace(log);
+ throw new StatusException("Couldn't change Diagram back to 2D", e);
+ }
+ }
+
} // finish class _Chart3DBarProperties
diff --git a/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
index 99a89cf3373d..2ae9ac7fa36b 100644
--- a/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
+++ b/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java
@@ -45,7 +45,7 @@ import com.sun.star.chart.XDiagram;
* </ul> <p>
* The following predefined files needed to complete the test:
* <ul>
-* <li> <code>poliball.gif</code> :
+* <li> <code>space-metal.jpg</code> :
* for test of property 'SymbolBitmapURL' </li>
* <ul> <p>
* This test needs the following object relations :
@@ -79,7 +79,7 @@ public class _ChartDataPointProperties extends MultiPropertyTest {
protected PropertyTester URLTester = new PropertyTester() {
protected Object getNewValue(String propName, Object oldValue)
throws java.lang.IllegalArgumentException {
- return utils.getFullTestURL("poliball.gif");
+ return utils.getFullTestURL("space-metal.jpg");
}
};
diff --git a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
index 37635266715d..a2555ea26f69 100644
--- a/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
+++ b/qadevOOo/tests/java/ifc/chart/_LineDiagram.java
@@ -48,7 +48,7 @@ import com.sun.star.uno.UnoRuntime;
* </ul> <p>
* The following predefined files needed to complete the test:
* <ul>
-* <li> <code>poliball.gif</code> :
+* <li> <code>space-metal.jpg</code> :
* for test of property 'SymbolBitmapURL' </li>
* <li> <code>crazy-blue.jpg</code> :
* for test of property 'SymbolBitmapURL' </li>
@@ -97,9 +97,9 @@ public class _LineDiagram extends MultiPropertyTest {
protected PropertyTester URLTester = new PropertyTester() {
protected Object getNewValue(String propName, Object oldValue)
throws java.lang.IllegalArgumentException {
- if (oldValue.equals(util.utils.getFullTestURL("poliball.gif")))
+ if (oldValue.equals(util.utils.getFullTestURL("space-metal.jpg")))
return util.utils.getFullTestURL("crazy-blue.jpg"); else
- return util.utils.getFullTestURL("poliball.gif");
+ return util.utils.getFullTestURL("space-metal.jpg");
}
} ;
diff --git a/qadevOOo/tests/java/ifc/drawing/_LineProperties.java b/qadevOOo/tests/java/ifc/drawing/_LineProperties.java
index a590bd5c5e1c..b6fb1f2186a1 100644
--- a/qadevOOo/tests/java/ifc/drawing/_LineProperties.java
+++ b/qadevOOo/tests/java/ifc/drawing/_LineProperties.java
@@ -80,21 +80,7 @@ public class _LineProperties extends MultiPropertyTest {
LineDash aLineDash2 = new LineDash();
aLineDash.DashLen = 5;
aLineDash2.DashLen = 1;
- PropertyValue[] firstValue = new PropertyValue[2];
- firstValue[0] = new PropertyValue();
- firstValue[0].Name = "Name";
- firstValue[0].Value = "Name1";
- firstValue[1] = new PropertyValue();
- firstValue[1].Name = "LineDash";
- firstValue[1].Value = aLineDash;
- PropertyValue[] secondValue = new PropertyValue[2];
- secondValue[0] = new PropertyValue();
- secondValue[0].Name = "Name";
- secondValue[0].Value = "Name2";
- secondValue[1] = new PropertyValue();
- secondValue[1].Name = "LineDash";
- secondValue[1].Value = aLineDash2;
- testProperty("LineDash",firstValue,secondValue);
+ testProperty("LineDash",aLineDash,aLineDash2);
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccArea.java b/qadevOOo/tests/java/mod/_sch/AccArea.java
index dae93e6d3326..b371f1950558 100644
--- a/qadevOOo/tests/java/mod/_sch/AccArea.java
+++ b/qadevOOo/tests/java/mod/_sch/AccArea.java
@@ -111,9 +111,11 @@ public class AccArea extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccAxis.java b/qadevOOo/tests/java/mod/_sch/AccAxis.java
index e0c6b8901345..2cdecae03aca 100644
--- a/qadevOOo/tests/java/mod/_sch/AccAxis.java
+++ b/qadevOOo/tests/java/mod/_sch/AccAxis.java
@@ -109,9 +109,11 @@ public class AccAxis extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
index 45bd6e3e4101..3e94364a0559 100644
--- a/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
+++ b/qadevOOo/tests/java/mod/_sch/AccDataPoint.java
@@ -110,9 +110,11 @@ public class AccDataPoint extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
index 4eff500ebba7..2d5ec4fde1d5 100644
--- a/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
+++ b/qadevOOo/tests/java/mod/_sch/AccDataSeries.java
@@ -110,9 +110,11 @@ public class AccDataSeries extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccDiagram.java b/qadevOOo/tests/java/mod/_sch/AccDiagram.java
index 50657c0218ac..9b7f90766fdd 100644
--- a/qadevOOo/tests/java/mod/_sch/AccDiagram.java
+++ b/qadevOOo/tests/java/mod/_sch/AccDiagram.java
@@ -110,9 +110,11 @@ public class AccDiagram extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccFloor.java b/qadevOOo/tests/java/mod/_sch/AccFloor.java
index 9ab1f9542111..37d56815983d 100644
--- a/qadevOOo/tests/java/mod/_sch/AccFloor.java
+++ b/qadevOOo/tests/java/mod/_sch/AccFloor.java
@@ -135,9 +135,11 @@ public class AccFloor extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccGrid.java b/qadevOOo/tests/java/mod/_sch/AccGrid.java
index f92aa0fe82a6..268f53ec8b3d 100644
--- a/qadevOOo/tests/java/mod/_sch/AccGrid.java
+++ b/qadevOOo/tests/java/mod/_sch/AccGrid.java
@@ -111,9 +111,11 @@ public class AccGrid extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccLegend.java b/qadevOOo/tests/java/mod/_sch/AccLegend.java
index a0f29e1e0701..aa46cdb8407d 100644
--- a/qadevOOo/tests/java/mod/_sch/AccLegend.java
+++ b/qadevOOo/tests/java/mod/_sch/AccLegend.java
@@ -109,9 +109,11 @@ public class AccLegend extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
index 78996d84fa2a..61c221df57e0 100644
--- a/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
+++ b/qadevOOo/tests/java/mod/_sch/AccLegendEntry.java
@@ -109,9 +109,11 @@ public class AccLegendEntry extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
index d72723ebea62..aafe91fdd3d4 100644
--- a/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
+++ b/qadevOOo/tests/java/mod/_sch/AccStatisticsObject.java
@@ -114,9 +114,11 @@ public class AccStatisticsObject extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccTitle.java b/qadevOOo/tests/java/mod/_sch/AccTitle.java
index 4fa56ee8f4f1..0639f19ca4cc 100644
--- a/qadevOOo/tests/java/mod/_sch/AccTitle.java
+++ b/qadevOOo/tests/java/mod/_sch/AccTitle.java
@@ -109,9 +109,11 @@ public class AccTitle extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccWall.java b/qadevOOo/tests/java/mod/_sch/AccWall.java
index 4dc94a173fff..66779421cc0b 100644
--- a/qadevOOo/tests/java/mod/_sch/AccWall.java
+++ b/qadevOOo/tests/java/mod/_sch/AccWall.java
@@ -134,9 +134,11 @@ public class AccWall extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
-
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
}
diff --git a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
index a064e7f05a09..9031680f93f1 100644
--- a/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
+++ b/qadevOOo/tests/java/mod/_sch/AccessibleDocumentView.java
@@ -102,8 +102,11 @@ public class AccessibleDocumentView extends TestCase {
* @param log writer to log information while testing
*/
protected void cleanup( TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
index da12c9e6b57a..f796d5530a9c 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartAxis.java
@@ -86,8 +86,11 @@ public class ChXChartAxis extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartData.java b/qadevOOo/tests/java/mod/_sch/ChXChartData.java
index fe14322933a5..3236e345b8e6 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartData.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartData.java
@@ -73,8 +73,11 @@ public class ChXChartData extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
index 35d15d634054..14caeefff8c1 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartDataArray.java
@@ -76,8 +76,11 @@ public class ChXChartDataArray extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
index a51457d5cde1..deafa9922043 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartDocument.java
@@ -77,10 +77,16 @@ public class ChXChartDocument extends TestCase {
* Disposes Chart documents.
*/
protected void cleanup(TestParameters Param, PrintWriter log) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
- log.println( " closing xChartDoc2 " );
- util.DesktopTools.closeDoc(doc2);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
+ if( doc2!=null ) {
+ log.println( " closing xChartDoc2" );
+ util.DesktopTools.closeDoc(doc2);
+ doc2 = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXChartView.java b/qadevOOo/tests/java/mod/_sch/ChXChartView.java
index 9d1ea2539bfc..f5476f2d0643 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXChartView.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXChartView.java
@@ -84,8 +84,11 @@ public class ChXChartView extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
index b6ddb94575b4..0c1647684c75 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXDataPoint.java
@@ -101,8 +101,11 @@ public class ChXDataPoint extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
index ffc13ad95bb7..69139ea5d902 100644
--- a/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
+++ b/qadevOOo/tests/java/mod/_sch/ChXDataRow.java
@@ -107,8 +107,11 @@ public class ChXDataRow extends TestCase {
* Disposes Chart document.
*/
protected synchronized void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
diff --git a/qadevOOo/tests/java/mod/_sch/ChartArea.java b/qadevOOo/tests/java/mod/_sch/ChartArea.java
index 17a04276aaca..614327f94a1e 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartArea.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartArea.java
@@ -92,8 +92,11 @@ public class ChartArea extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartGrid.java b/qadevOOo/tests/java/mod/_sch/ChartGrid.java
index 671cfcfe86e3..73a44b810436 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartGrid.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartGrid.java
@@ -81,8 +81,11 @@ public class ChartGrid extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartLegend.java b/qadevOOo/tests/java/mod/_sch/ChartLegend.java
index 78770c5f94b6..a0dd4fe3ec64 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartLegend.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartLegend.java
@@ -109,8 +109,11 @@ public class ChartLegend extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartLine.java b/qadevOOo/tests/java/mod/_sch/ChartLine.java
index e2345ba7edb5..950885060f5f 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartLine.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartLine.java
@@ -79,8 +79,11 @@ public class ChartLine extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_sch/ChartTitle.java b/qadevOOo/tests/java/mod/_sch/ChartTitle.java
index b1e47c0ea00b..f88c938693bc 100644
--- a/qadevOOo/tests/java/mod/_sch/ChartTitle.java
+++ b/qadevOOo/tests/java/mod/_sch/ChartTitle.java
@@ -91,8 +91,11 @@ public class ChartTitle extends TestCase {
* Disposes Chart document.
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " closing xChartDoc " );
- util.DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
index 8ec11a9360b9..6fe4765389da 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentExporter.java
@@ -91,11 +91,14 @@ public class XMLContentExporter extends TestCase {
}
/**
- * Document disposed here.
+ * Close document
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing xChartDoc " );
- xChartDoc.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
index 1c5970c7d5e0..5e48b073fc9f 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLContentImporter.java
@@ -91,11 +91,15 @@ public class XMLContentImporter extends TestCase {
}
/**
- * Disposes document.
- */
+ * Close document
+ */
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing document " );
- comp.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ comp = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
index 393ddb7492ce..c0edd4f82cda 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLExporter.java
@@ -92,11 +92,14 @@ public class XMLExporter extends TestCase {
}
/**
- * Document disposed here.
+ * Close document
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " close xChartDoc " );
- DesktopTools.closeDoc(xChartDoc);
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
index b8d441751540..83a422df9128 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLImporter.java
@@ -91,11 +91,15 @@ public class XMLImporter extends TestCase {
}
/**
- * Disposes document.
- */
+ * Close document
+ */
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing document " );
- comp.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ comp = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
index 9435907adb3c..4405b5c5ac60 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesExporter.java
@@ -90,11 +90,14 @@ public class XMLStylesExporter extends TestCase {
}
/**
- * Document disposed here.
+ * Close document
*/
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing xChartDoc " );
- xChartDoc.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ }
}
/**
diff --git a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
index 617b2f92cbc4..7bd02228203d 100644
--- a/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
+++ b/qadevOOo/tests/java/mod/_xmloff/Chart/XMLStylesImporter.java
@@ -88,12 +88,16 @@ public class XMLStylesImporter extends TestCase {
comp = xChartDoc;
}
- /**
- * Disposes document.
- */
+ /**
+ * Close document
+ */
protected void cleanup( TestParameters tParam, PrintWriter log ) {
- log.println( " disposing document " );
- comp.dispose();
+ if( xChartDoc!=null ) {
+ log.println( " closing xChartDoc" );
+ util.DesktopTools.closeDoc(xChartDoc);
+ xChartDoc = null;
+ comp = null;
+ }
}
/**
diff --git a/sal/osl/w32/diagnose.c b/sal/osl/w32/diagnose.c
index 239628abcecc..b46bff44b73c 100644
--- a/sal/osl/w32/diagnose.c
+++ b/sal/osl/w32/diagnose.c
@@ -87,7 +87,6 @@ void SAL_CALL osl_trace(const sal_Char* lpszFormat, ...)
if ( IsDebuggerPresent() )
{
sal_Char szMessage[512];
- szMessage[sizeof(szMessage)-1] = 0;
written = _vsnprintf( szMessage, sizeof(szMessage) - 2, lpszFormat, args );
if ( written == -1 )
written = sizeof(szMessage) - 2;
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index 2a66f8b45555..a22b6fd6a2eb 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -207,7 +207,6 @@ class ScDPGroupTableData : public ScDPTableData
void FillGroupValues( SCROW* pItemDataIndex, long nCount, const long* pDims );
virtual long GetSourceDim( long nDim );
// End Comments
- void CopyFields(const ::std::vector<long>& rFieldDims, ::std::vector<long>& rNewFieldDims);
bool IsNumGroupDimension( long nDimension ) const;
void GetNumGroupInfo( long nDimension, ScDPNumGroupInfo& rInfo,
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index d6aa91efcca6..cd763cfc0787 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -705,7 +705,7 @@ SfxItemPresentation lcl_HFPresentation
nTmp = rLRItem.GetRight();
nRightMargin = nTmp < 0 ? 0 : USHORT(nTmp);
- aText = SVX_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
+ aText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
{
aText += String::CreateFromInt32( nPropLeftMargin );
@@ -715,13 +715,13 @@ SfxItemPresentation lcl_HFPresentation
{
aText += GetMetricText( (long)nLeftMargin,
eCoreMetric, ePresentationMetric, pIntl );
- aText += SVX_RESSTR(GetMetricId(ePresentationMetric));
+ aText += EE_RESSTR(GetMetricId(ePresentationMetric));
}
aText += cpDelim;
// nPropFirstLineOfst haben wir nicht
- aText += SVX_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT);
+ aText += EE_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT);
if ( 100 != nPropRightMargin )
{
aText += String::CreateFromInt32( nPropRightMargin );
@@ -731,7 +731,7 @@ SfxItemPresentation lcl_HFPresentation
{
aText += GetMetricText( (long)nRightMargin,
eCoreMetric, ePresentationMetric, pIntl );
- aText += SVX_RESSTR(GetMetricId(ePresentationMetric));
+ aText += EE_RESSTR(GetMetricId(ePresentationMetric));
}
}
break;
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index e71ec5c8b82c..edb3b787b9b2 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -1324,13 +1324,9 @@ void ScDPGroupTableData::GetDrillDownData(const vector<ScDPCacheTable::Criterion
void ScDPGroupTableData::CalcResults(CalcInfo& rInfo, bool bAutoShow)
{
- // This CalcInfo instance is used only to retrive data from the original
- // data source.
- CalcInfo aInfoSrc = rInfo;
- CopyFields(rInfo.aColLevelDims, aInfoSrc.aColLevelDims);
- CopyFields(rInfo.aRowLevelDims, aInfoSrc.aRowLevelDims);
- CopyFields(rInfo.aPageDims, aInfoSrc.aPageDims);
- CopyFields(rInfo.aDataSrcCols, aInfoSrc.aDataSrcCols);
+ // #i111435# Inside FillRowDataFromCacheTable/GetItemData, virtual methods
+ // getIsDataLayoutDimension and GetSourceDim are used, so it has to be called
+ // with original rInfo, containing dimension indexes of the grouped data.
const ScDPCacheTable& rCacheTable = pSourceData->GetCacheTable();
sal_Int32 nRowSize = rCacheTable.getRowSize();
@@ -1340,7 +1336,7 @@ void ScDPGroupTableData::CalcResults(CalcInfo& rInfo, bool bAutoShow)
continue;
CalcRowData aData;
- FillRowDataFromCacheTable(nRow, rCacheTable, aInfoSrc, aData);
+ FillRowDataFromCacheTable(nRow, rCacheTable, rInfo, aData);
if ( !rInfo.aColLevelDims.empty() )
FillGroupValues(&aData.aColData[0], rInfo.aColLevelDims.size(), &rInfo.aColLevelDims[0]);
@@ -1358,35 +1354,6 @@ const ScDPCacheTable& ScDPGroupTableData::GetCacheTable() const
return pSourceData->GetCacheTable();
}
-void ScDPGroupTableData::CopyFields(const vector<long>& rFieldDims, vector<long>& rNewFieldDims)
-{
- size_t nCount = rFieldDims.size();
- if (!nCount)
- return;
-
- long nGroupedColumns = aGroups.size();
-
- rNewFieldDims.clear();
- rNewFieldDims.reserve(nCount);
- for (size_t i = 0; i < nCount; ++i)
- {
- if ( rFieldDims[i] >= nSourceCount )
- {
- if ( rFieldDims[i] == nSourceCount + nGroupedColumns )
- // data layout in source
- rNewFieldDims.push_back(nSourceCount);
- else
- {
- // original dimension
- long n = rFieldDims[i] - nSourceCount;
- rNewFieldDims.push_back(aGroups[n].GetSourceDim());
- }
- }
- else
- rNewFieldDims.push_back(rFieldDims[i]);
- }
-}
-
void ScDPGroupTableData::FillGroupValues( /*ScDPItemData* pItemData*/ SCROW* pItemDataIndex, long nCount, const long* pDims )
{
long nGroupedColumns = aGroups.size();
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 44c998fb4ede..5394605969d0 100755
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -623,6 +623,11 @@ void ScDPObject::BuildAllDimensionMembers()
if (!pSaveData)
return;
+ // #i111857# don't always create empty mpTableData for external service.
+ // Ideally, xSource should be used instead of mpTableData.
+ if (pServDesc)
+ return;
+
pSaveData->BuildAllDimensionMembers(GetTableData());
}
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index ec384874aa69..91688c6c0e2a 100755
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1087,6 +1087,72 @@ bool ScDPOutput::GetHeaderLayout() const
return mbHeaderLayout;
}
+void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, sal_Int32& rDataLayoutIndex,
+ std::vector<String>& rDataNames, std::vector<String>& rGivenNames,
+ sheet::DataPilotFieldOrientation& rDataOrient,
+ const uno::Reference<sheet::XDimensionsSupplier>& xSource )
+{
+ rDataLayoutIndex = -1; // invalid
+ rGrandTotalCols = 0;
+ rGrandTotalRows = 0;
+ rDataOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+
+ uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
+ BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
+ rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND) );
+ if ( bColGrand )
+ rGrandTotalCols = 1; // default if data layout not in columns
+
+ BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
+ rtl::OUString::createFromAscii(DP_PROP_ROWGRAND) );
+ if ( bRowGrand )
+ rGrandTotalRows = 1; // default if data layout not in rows
+
+ if ( xSource.is() )
+ {
+ // find index and orientation of "data layout" dimension, count data dimensions
+
+ sal_Int32 nDataCount = 0;
+
+ uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xSource->getDimensions() );
+ long nDimCount = xDims->getCount();
+ for (long nDim=0; nDim<nDimCount; nDim++)
+ {
+ uno::Reference<uno::XInterface> xDim =
+ ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) );
+ uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
+ if ( xDimProp.is() )
+ {
+ sheet::DataPilotFieldOrientation eDimOrient =
+ (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
+ xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
+ sheet::DataPilotFieldOrientation_HIDDEN );
+ if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp,
+ rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ) )
+ {
+ rDataLayoutIndex = nDim;
+ rDataOrient = eDimOrient;
+ }
+ if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
+ {
+ String aSourceName;
+ String aGivenName;
+ ScDPOutput::GetDataDimensionNames( aSourceName, aGivenName, xDim );
+ rDataNames.push_back( aSourceName );
+ rGivenNames.push_back( aGivenName );
+
+ ++nDataCount;
+ }
+ }
+ }
+
+ if ( ( rDataOrient == sheet::DataPilotFieldOrientation_COLUMN ) && bColGrand )
+ rGrandTotalCols = nDataCount;
+ else if ( ( rDataOrient == sheet::DataPilotFieldOrientation_ROW ) && bRowGrand )
+ rGrandTotalRows = nDataCount;
+ }
+}
+
void ScDPOutput::GetPositionData(const ScAddress& rPos, DataPilotTablePositionData& rPosData)
{
using namespace ::com::sun::star::sheet;
@@ -1207,15 +1273,14 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>&
// No data field is present in this datapilot table.
return false;
- bool bColGrand = bool();
- any = xPropSet->getPropertyValue(rtl::OUString::createFromAscii(SC_UNO_COLGRAND));
- if (!(any >>= bColGrand))
- return false;
-
- bool bRowGrand = bool();
- any = xPropSet->getPropertyValue(rtl::OUString::createFromAscii(SC_UNO_ROWGRAND));
- if (!(any >>= bRowGrand))
- return false;
+ // #i111421# use lcl_GetTableVars for correct size of totals and data layout position
+ sal_Int32 nGrandTotalCols;
+ sal_Int32 nGrandTotalRows;
+ sal_Int32 nDataLayoutIndex;
+ std::vector<String> aDataNames;
+ std::vector<String> aGivenNames;
+ sheet::DataPilotFieldOrientation eDataOrient;
+ lcl_GetTableVars( nGrandTotalCols, nGrandTotalRows, nDataLayoutIndex, aDataNames, aGivenNames, eDataOrient, xSource );
SCCOL nCol = rPos.Col();
SCROW nRow = rPos.Row();
@@ -1232,12 +1297,16 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>&
return false;
}
- bool bFilterByCol = !(bColGrand && (nCol == nTabEndCol));
- bool bFilterByRow = !(bRowGrand && (nRow == nTabEndRow));
+ bool bFilterByCol = (nCol <= static_cast<SCCOL>(nTabEndCol - nGrandTotalCols));
+ bool bFilterByRow = (nRow <= static_cast<SCROW>(nTabEndRow - nGrandTotalRows));
// column fields
for (SCCOL nColField = 0; nColField < nColFieldCount && bFilterByCol; ++nColField)
{
+ if (pColFields[nColField].nDim == nDataLayoutIndex)
+ // There is no sense including the data layout field for filtering.
+ continue;
+
sheet::DataPilotFieldFilter filter;
filter.FieldName = pColFields[nColField].maName;
@@ -1256,10 +1325,9 @@ bool ScDPOutput::GetDataResultPositionData(vector<sheet::DataPilotFieldFilter>&
}
// row fields
- bool bDataLayoutExists = (nDataFieldCount > 1);
for (SCROW nRowField = 0; nRowField < nRowFieldCount && bFilterByRow; ++nRowField)
{
- if (bDataLayoutExists && nRowField == nRowFieldCount - 1)
+ if (pRowFields[nRowField].nDim == nDataLayoutIndex)
// There is no sense including the data layout field for filtering.
continue;
@@ -1643,72 +1711,6 @@ void ScDPOutput::GetDataDimensionNames( String& rSourceName, String& rGivenName,
}
}
-void lcl_GetTableVars( sal_Int32& rGrandTotalCols, sal_Int32& rGrandTotalRows, sal_Int32& rDataLayoutIndex,
- std::vector<String>& rDataNames, std::vector<String>& rGivenNames,
- sheet::DataPilotFieldOrientation& rDataOrient,
- const uno::Reference<sheet::XDimensionsSupplier>& xSource )
-{
- rDataLayoutIndex = -1; // invalid
- rGrandTotalCols = 0;
- rGrandTotalRows = 0;
- rDataOrient = sheet::DataPilotFieldOrientation_HIDDEN;
-
- uno::Reference<beans::XPropertySet> xSrcProp( xSource, uno::UNO_QUERY );
- BOOL bColGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
- rtl::OUString::createFromAscii(DP_PROP_COLUMNGRAND) );
- if ( bColGrand )
- rGrandTotalCols = 1; // default if data layout not in columns
-
- BOOL bRowGrand = ScUnoHelpFunctions::GetBoolProperty( xSrcProp,
- rtl::OUString::createFromAscii(DP_PROP_ROWGRAND) );
- if ( bRowGrand )
- rGrandTotalRows = 1; // default if data layout not in rows
-
- if ( xSource.is() )
- {
- // find index and orientation of "data layout" dimension, count data dimensions
-
- sal_Int32 nDataCount = 0;
-
- uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xSource->getDimensions() );
- long nDimCount = xDims->getCount();
- for (long nDim=0; nDim<nDimCount; nDim++)
- {
- uno::Reference<uno::XInterface> xDim =
- ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) );
- uno::Reference<beans::XPropertySet> xDimProp( xDim, uno::UNO_QUERY );
- if ( xDimProp.is() )
- {
- sheet::DataPilotFieldOrientation eDimOrient =
- (sheet::DataPilotFieldOrientation) ScUnoHelpFunctions::GetEnumProperty(
- xDimProp, rtl::OUString::createFromAscii(DP_PROP_ORIENTATION),
- sheet::DataPilotFieldOrientation_HIDDEN );
- if ( ScUnoHelpFunctions::GetBoolProperty( xDimProp,
- rtl::OUString::createFromAscii(DP_PROP_ISDATALAYOUT) ) )
- {
- rDataLayoutIndex = nDim;
- rDataOrient = eDimOrient;
- }
- if ( eDimOrient == sheet::DataPilotFieldOrientation_DATA )
- {
- String aSourceName;
- String aGivenName;
- ScDPOutput::GetDataDimensionNames( aSourceName, aGivenName, xDim );
- rDataNames.push_back( aSourceName );
- rGivenNames.push_back( aGivenName );
-
- ++nDataCount;
- }
- }
- }
-
- if ( ( rDataOrient == sheet::DataPilotFieldOrientation_COLUMN ) && bColGrand )
- rGrandTotalCols = nDataCount;
- else if ( ( rDataOrient == sheet::DataPilotFieldOrientation_ROW ) && bRowGrand )
- rGrandTotalRows = nDataCount;
- }
-}
-
// Returns TRUE on success and stores the result in rTarget
// Returns FALSE if rFilters or rTarget describes something that is not visible
BOOL ScDPOutput::GetPivotData( ScDPGetPivotDataField& rTarget,
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index cff18ef925d9..cb68732a237f 100755
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -169,13 +169,19 @@ void ScDPTableData::FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPCacheTab
// page dimensions
GetItemData(rCacheTable, nRow, rInfo.aPageDims, rData.aPageData);
+ long nCacheColumnCount = rCacheTable.GetCache()->GetColumnCount();
sal_Int32 n = rInfo.aDataSrcCols.size();
for (sal_Int32 i = 0; i < n; ++i)
{
long nDim = rInfo.aDataSrcCols[i];
rData.aValues.push_back( ScDPValueData() );
- ScDPValueData& rVal = rData.aValues.back();
- rCacheTable.getValue( rVal, static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow), false);
+ // #i111435# GetItemData needs dimension indexes including groups,
+ // so the index must be checked here (groups aren't useful as data fields).
+ if ( nDim < nCacheColumnCount )
+ {
+ ScDPValueData& rVal = rData.aValues.back();
+ rCacheTable.getValue( rVal, static_cast<SCCOL>(nDim), static_cast<SCROW>(nRow), false);
+ }
}
}
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index af8b74d546a8..c79f7c1b17a6 100755
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -1153,11 +1153,16 @@ void ScDPResultMember::LateInitFrom( LateInitParams& rParams/*const vector<ScDPD
{
if ( rParams.GetDim( nPos ) ->getIsDataLayoutDimension() )
{
- if ( !pChildDimension )
- pChildDimension = new ScDPResultDimension( pResultData );
- rParams.SetInitChild( FALSE );
- pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState );
- return;
+ if ( !pChildDimension )
+ pChildDimension = new ScDPResultDimension( pResultData );
+
+ // #i111462# reset InitChild flag only for this child dimension's LateInitFrom call,
+ // not for following members of parent dimensions
+ BOOL bWasInitChild = rParams.GetInitChild();
+ rParams.SetInitChild( FALSE );
+ pChildDimension->LateInitFrom( rParams, pItemData, nPos, rInitState );
+ rParams.SetInitChild( bWasInitChild );
+ return;
}
else
{ //find next dim
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index 4a736e8c11b7..434144d06e00 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -586,13 +586,13 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
// Attributierung uebertragen
const ScPatternAttr* pSrcPattern = NULL;
+ const ScStyleSheet* pStyleSheet = NULL;
ULONG nAtSrc = nISrcStart;
ScPatternAttr* pNewPattern = NULL;
BOOL bGetPattern = TRUE;
rInner = nIStart;
while (true) // #i53728# with "for (;;)" old solaris/x86 compiler mis-optimizes
{
- const ScStyleSheet* pStyleSheet = NULL;
if ( bGetPattern )
{
if ( pNewPattern )
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 3a7117dfcd10..a3a0153a4b97 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -114,14 +114,25 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
} // sonst alles
}
- // bSkipBreaks holen:
+ // get bSkipColBreaks/bSkipRowBreaks flags:
- BOOL bSkipBreaks = FALSE;
+ bool bSkipColBreaks = false;
+ bool bSkipRowBreaks = false;
if ( pStyleSet->GetItemState( ATTR_PAGE_SCALETOPAGES, FALSE, &pItem ) == SFX_ITEM_SET )
{
DBG_ASSERT( pItem->ISA(SfxUInt16Item), "falsches Item" );
- bSkipBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 );
+ bSkipColBreaks = bSkipRowBreaks = ( ((const SfxUInt16Item*)pItem)->GetValue() > 0 );
+ }
+
+ if ( !bSkipColBreaks && pStyleSet->GetItemState(ATTR_PAGE_SCALETO, FALSE, &pItem) == SFX_ITEM_SET )
+ {
+ // #i54993# when fitting to width or height, ignore only manual breaks in that direction
+ const ScPageScaleToItem* pScaleToItem = static_cast<const ScPageScaleToItem*>(pItem);
+ if ( pScaleToItem->GetWidth() > 0 )
+ bSkipColBreaks = true;
+ if ( pScaleToItem->GetHeight() > 0 )
+ bSkipRowBreaks = true;
}
//--------------------------------------------------------------------------
@@ -149,7 +160,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
{
BOOL bStartOfPage = FALSE;
long nThisX = ( pColFlags[nX] & CR_HIDDEN ) ? 0 : pColWidth[nX];
- if ( (nSizeX+nThisX > nPageSizeX) || ((pColFlags[nX] & CR_MANUALBREAK) && !bSkipBreaks) )
+ if ( (nSizeX+nThisX > nPageSizeX) || ((pColFlags[nX] & CR_MANUALBREAK) && !bSkipColBreaks) )
{
pColFlags[nX] |= CR_PAGEBREAK;
nSizeX = 0;
@@ -187,7 +198,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
BOOL bStartOfPage = FALSE;
BYTE nFlags = *aFlagsIter;
long nThisY = (nFlags & CR_HIDDEN) ? 0 : *aHeightIter;
- if ( (nSizeY+nThisY > nPageSizeY) || ((nFlags & CR_MANUALBREAK) && !bSkipBreaks) )
+ if ( (nSizeY+nThisY > nPageSizeY) || ((nFlags & CR_MANUALBREAK) && !bSkipRowBreaks) )
{
pRowFlags->SetValue( nY, nFlags | CR_PAGEBREAK);
aFlagsIter.Resync( nY);
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index bba1543dd403..5534f8e775a9 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -437,7 +437,8 @@ void ExcTable::FillAsTable( size_t nCodeNameIdx )
DBG_ASSERT( nExcTab <= static_cast<sal_uInt16>(MAXTAB), "-ExcTable::Table(): nExcTab - no ordinary table!" );
// create a new OBJ list for this sheet (may be used by notes, autofilter, data validation)
- GetObjectManager().StartSheet();
+ if( eBiff == EXC_BIFF8 )
+ GetObjectManager().StartSheet();
// cell table: DEFROWHEIGHT, DEFCOLWIDTH, COLINFO, DIMENSIONS, ROW, cell records
mxCellTable.reset( new XclExpCellTable( GetRoot() ) );
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 428bbe2d4f82..35ad5b41e0cb 100755
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -2902,7 +2902,8 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount;
if( bLogScale )
{
- rIntervalCount <<= sal_Int32( 10 );
+ if( !bAutoMinor )
+ rIntervalCount <<= sal_Int32( 9 );
}
else
{
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index a37617e0b8b9..e43ff21a114d 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -880,8 +880,8 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference <sheet::XSpreads
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_NAME, rtl::OUString(pServSource->aParSource));
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OBJECT_NAME, rtl::OUString(pServSource->aParName));
rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_USER_NAME, rtl::OUString(pServSource->aParUser));
- // How to write the Passwort? We must know, whether the passwort shoulb be written encrypted and how or not
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_PASSWORT, rtl::OUString(pServSource->aParPass));
+ // #i111754# leave out password attribute as long as DataPilotSource doesn't specify the content
+ // rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_PASSWORD, rtl::OUString(pServSource->aParPass));
SvXMLElementExport aElemSD(rExport, XML_NAMESPACE_TABLE, XML_SOURCE_SERVICE, sal_True, sal_True);
rExport.CheckAttrList();
}
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 0b620e1d47d8..5963fd72bad2 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3554,8 +3554,8 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
{
if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && sal_False/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable
{
- if (((aCell1.nStyleIndex == aCell2.nStyleIndex) && ((aCell1.bIsAutoStyle == aCell2.bIsAutoStyle) ||
- (aCell1.nStyleIndex == aCell2.nStyleIndex)) && (aCell1.nStyleIndex == -1)) &&
+ if ((((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle)) ||
+ ((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1))) &&
(aCell1.nValidationIndex == aCell2.nValidationIndex) &&
IsCellTypeEqual(aCell1, aCell2))
{
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index d1ef48bfa9ed..69c7144191d6 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1368,7 +1368,7 @@ const SvXMLTokenMap& ScXMLImport::GetDataPilotTableSourceServiceAttrTokenMap()
{ XML_NAMESPACE_TABLE, XML_SOURCE_NAME, XML_TOK_SOURCE_SERVICE_ATTR_SOURCE_NAME },
{ XML_NAMESPACE_TABLE, XML_OBJECT_NAME, XML_TOK_SOURCE_SERVICE_ATTR_OBJECT_NAME },
{ XML_NAMESPACE_TABLE, XML_USER_NAME, XML_TOK_SOURCE_SERVICE_ATTR_USER_NAME },
- { XML_NAMESPACE_TABLE, XML_PASSWORT, XML_TOK_SOURCE_SERVICE_ATTR_PASSWORD },
+ { XML_NAMESPACE_TABLE, XML_PASSWORD, XML_TOK_SOURCE_SERVICE_ATTR_PASSWORD },
XML_TOKEN_MAP_END
};
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index f9f0d063a843..733a11c9a1da 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -1039,8 +1039,10 @@ sal_Bool XmlScPropHdl_CellProtection::exportXML(
rStrExpValue = GetXMLToken(XML_NONE);
bRetval = sal_True;
}
- else if (aCellProtection.IsHidden && aCellProtection.IsLocked)
+ else if (aCellProtection.IsHidden)
{
+ // #i105964# "Hide all" implies "Protected" in the UI, so it must be saved as "hidden-and-protected"
+ // even if "IsLocked" is not set in the CellProtection struct.
rStrExpValue = GetXMLToken(XML_HIDDEN_AND_PROTECTED);
bRetval = sal_True;
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 28f178565da0..55aa0986d2ec 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -950,7 +950,7 @@ void ScInputHandler::ShowTipBelow( const String& rText )
}
aPos = pTipVisibleSecParent->OutputToScreenPixel( aPos );
Rectangle aRect( aPos, aPos );
- USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP;
+ USHORT nAlign = QUICKHELP_LEFT | QUICKHELP_TOP | QUICKHELP_NOEVADEPOINTER;
nTipVisibleSec = Help::ShowTip(pTipVisibleSecParent, aRect, rText, nAlign);
pTipVisibleSecParent->AddEventListener( LINK( this, ScInputHandler, ShowHideTipVisibleSecParentListener ) );
}
diff --git a/sc/source/ui/app/makefile.mk b/sc/source/ui/app/makefile.mk
index a5e4fe8cc024..a7ff3fe86d7d 100644
--- a/sc/source/ui/app/makefile.mk
+++ b/sc/source/ui/app/makefile.mk
@@ -57,8 +57,10 @@ SLOFILES = \
EXCEPTIONSFILES= \
$(SLO)$/drwtrans.obj \
+ $(SLO)$/scdll.obj \
$(SLO)$/scmod2.obj \
$(SLO)$/scmod.obj \
+ $(SLO)$/typemap.obj \
$(SLO)$/client.obj \
$(SLO)$/inputwin.obj
diff --git a/sc/source/ui/cctrl/makefile.mk b/sc/source/ui/cctrl/makefile.mk
index 17fd9b40cb95..531013ea1c2e 100644
--- a/sc/source/ui/cctrl/makefile.mk
+++ b/sc/source/ui/cctrl/makefile.mk
@@ -41,6 +41,7 @@ LIBTARGET=NO
# --- Files --------------------------------------------------------
EXCEPTIONSFILES= \
+ $(SLO)$/tbinsert.obj \
$(SLO)$/tbzoomsliderctrl.obj \
$(SLO)$/dpcontrol.obj
diff --git a/sc/source/ui/drawfunc/makefile.mk b/sc/source/ui/drawfunc/makefile.mk
index 52f54b56edce..a50c450ab373 100644
--- a/sc/source/ui/drawfunc/makefile.mk
+++ b/sc/source/ui/drawfunc/makefile.mk
@@ -75,7 +75,9 @@ SLOFILES = \
$(SLO)$/mediash.obj
EXCEPTIONSFILES= \
- $(SLO)$/fuins2.obj
+ $(SLO)$/fuins2.obj \
+ $(SLO)$/graphsh.obj \
+ $(SLO)$/mediash.obj
NOOPTFILES=\
$(SLO)$/fusel.obj
diff --git a/sc/source/ui/inc/spelldialog.hxx b/sc/source/ui/inc/spelldialog.hxx
index af97519a2b43..eef0d170c2c8 100644
--- a/sc/source/ui/inc/spelldialog.hxx
+++ b/sc/source/ui/inc/spelldialog.hxx
@@ -65,12 +65,12 @@ protected:
next sentence with spelling errors. While doing so the view
mode may be changed and text shapes are set into edit mode.
*/
- virtual ::svx::SpellPortions GetNextWrongSentence();
+ virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck );
/** This method is responsible for merging corrections made in the
spelling dialog back into the document.
*/
- virtual void ApplyChangedSentence( const ::svx::SpellPortions& rChanged );
+ virtual void ApplyChangedSentence( const ::svx::SpellPortions& rChanged, bool bRecheck );
virtual void GetFocus();
virtual void LoseFocus();
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index a178b0a0ada6..ee13ee9fbf90 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -79,7 +79,7 @@ void ScSpellDialogChildWindow::InvalidateSpellDialog()
// protected ------------------------------------------------------------------
-::svx::SpellPortions ScSpellDialogChildWindow::GetNextWrongSentence()
+::svx::SpellPortions ScSpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck*/ )
{
::svx::SpellPortions aPortions;
if( mxEngine.get() && mpViewData )
@@ -103,11 +103,11 @@ void ScSpellDialogChildWindow::InvalidateSpellDialog()
return aPortions;
}
-void ScSpellDialogChildWindow::ApplyChangedSentence( const ::svx::SpellPortions& rChanged )
+void ScSpellDialogChildWindow::ApplyChangedSentence( const ::svx::SpellPortions& rChanged, bool bRecheck )
{
if( mxEngine.get() && mpViewData )
if( EditView* pEditView = mpViewData->GetSpellingView() )
- mxEngine->ApplyChangedSentence( *pEditView, rChanged, false );
+ mxEngine->ApplyChangedSentence( *pEditView, rChanged, bRecheck );
}
void ScSpellDialogChildWindow::GetFocus()
diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp
index aaba3cd6c2ab..7b392f173378 100644
--- a/scp2/source/calc/file_calc.scp
+++ b/scp2/source/calc/file_calc.scp
@@ -49,11 +49,11 @@ STD_UNO_LIB_FILE( gid_File_Lib_Calc, calc)
STD_UNO_LIB_FILE( gid_File_Lib_Date, date)
-STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sc, sc)
+STD_UNO_LIB_FILE( gid_File_Lib_Sc, sc)
-STD_LIB_FILE_PATCH( gid_File_Lib_Scui, scui)
+STD_LIB_FILE( gid_File_Lib_Scui, scui)
-STD_LIB_FILE_PATCH( gid_File_Lib_Scfilt, scfilt)
+STD_LIB_FILE( gid_File_Lib_Scfilt, scfilt)
STD_UNO_LIB_FILE( gid_File_Lib_Scd, scd)
diff --git a/scp2/source/javafilter/registryitem_javafilter.scp b/scp2/source/javafilter/registryitem_javafilter.scp
index 593c6177edad..1340d637e009 100644
--- a/scp2/source/javafilter/registryitem_javafilter.scp
+++ b/scp2/source/javafilter/registryitem_javafilter.scp
@@ -46,7 +46,7 @@ RegistryItem gid_Regitem_Clsid__43887c67_4d5d_4127_Baac_87a288494c7c__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{43887C67-4D5D-4127-BAAC-87A288494C7C}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Excel;
- Value = "[BASISINSTALLLOCATION]program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__43887c67_4d5d_4127_Baac_87a288494c7c__Inprocserver32_Threadingmodel
@@ -106,7 +106,7 @@ RegistryItem gid_Regitem_Clsid__Bdd611c3_7bab_460f_8711_5b9ac9ef6020__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{BDD611C3-7BAB-460F-8711-5B9AC9EF6020}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Word;
- Value = "[BASISINSTALLLOCATION]program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__Bdd611c3_7bab_460f_8711_5b9ac9ef6020__Inprocserver32_Threadingmodel
@@ -166,7 +166,7 @@ RegistryItem gid_Regitem_Clsid__C6ab3e74_9f4f_4370_8120_A8a6fabb7a7c__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{C6AB3E74-9F4F-4370-8120-A8A6FABB7A7C}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Excel;
- Value = "[BASISINSTALLLOCATION]program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__C6ab3e74_9f4f_4370_8120_A8a6fabb7a7c__Inprocserver32_Threadingmodel
@@ -226,7 +226,7 @@ RegistryItem gid_Regitem_Clsid__Cb43f086_838d_4fa4_B5f6_3406b9a57439__Inprocserv
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "CLSID\{CB43F086-838D-4FA4-B5F6-3406B9A57439}\InProcServer32";
ModuleID = gid_Module_Optional_Javafilter_Pocketpc_Pocket_Word;
- Value = "[BASISINSTALLLOCATION]program\xmergesync.dll";
+ Value = "[INSTALLLOCATION]Basis\program\xmergesync.dll";
End
RegistryItem gid_Regitem_Clsid__Cb43f086_838d_4fa4_B5f6_3406b9a57439__Inprocserver32_Threadingmodel
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index b2023aabecd7..6558dd1a55ff 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -1190,7 +1190,7 @@ ProfileItem gid_Brand_Profileitem_Setup_Ureinstall
Section = "Bootstrap";
Order = 4;
Key = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]URE\\";
Inifiletablekey = "UreInstallLocation";
Inifiletableaction = "1";
Styles = (INIFILETABLE);
@@ -1204,7 +1204,7 @@ ProfileItem gid_Brand_Profileitem_Setup_Basisinstall
Section = "Bootstrap";
Order = 4;
Key = "BASISINSTALLLOCATION";
- Value = "[BASISINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]Basis\\";
Inifiletablekey = "BasisInstallLocation";
Inifiletableaction = "1";
Styles = (INIFILETABLE);
@@ -1218,7 +1218,7 @@ ProfileItem gid_Brand_Profileitem_Setup_Officeinstall
Section = "Bootstrap";
Order = 4;
Key = "OFFICEINSTALLLOCATION";
- Value = "[OFFICEINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]";
Inifiletablekey = "OfficeInstallLocation";
Inifiletableaction = "1";
Styles = (INIFILETABLE);
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 5ce656d436eb..404a1588f344 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -100,10 +100,10 @@ File gid_File_Lib_Ldapbe2
End
#endif
-STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Chartcontroller, chartcontroller)
-STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Chartmodel, chartmodel)
-STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Charttools, charttools)
-STD_UNO_LIB_FILE_PATCH(gid_File_Lib_Chartview, chartview)
+STD_UNO_LIB_FILE(gid_File_Lib_Chartcontroller, chartcontroller)
+STD_UNO_LIB_FILE(gid_File_Lib_Chartmodel, chartmodel)
+STD_UNO_LIB_FILE(gid_File_Lib_Charttools, charttools)
+STD_UNO_LIB_FILE(gid_File_Lib_Chartview, chartview)
#if defined WNT && defined _MSC
@@ -228,7 +228,7 @@ End
File gid_File_Lib_QStart_Gtk
Name = LIBNAME(qstart_gtk);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
@@ -505,7 +505,7 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Fileacc,fileacc)
File gid_File_Lib_Filterconfig1
TXT_FILE_BODY;
- Styles = (PACKED,UNO_COMPONENT,PATCH);
+ Styles = (PACKED,UNO_COMPONENT);
Dir = SCP2_OOO_BIN_DIR;
RegistryID = gid_Starregistry_Services_Rdb;
Name = SPECIAL_NAME(filterconfig1);
@@ -653,7 +653,7 @@ STD_LIB_FILE( gid_File_Lib_Fwi , fwi)
File gid_File_Lib_Fwk
Name = LIBNAME(fwk);
TXT_FILE_BODY;
- Styles = (PACKED,UNO_COMPONENT,PATCH);
+ Styles = (PACKED,UNO_COMPONENT);
Dir = SCP2_OOO_BIN_DIR;
RegistryID = gid_Starregistry_Services_Rdb;
End
@@ -677,7 +677,7 @@ STD_LIB_FILE( gid_File_Lib_Helplinker, helplinker)
File gid_File_Lib_I18npool
TXT_FILE_BODY;
- Styles = (PACKED,PATCH,UNO_COMPONENT);
+ Styles = (PACKED,UNO_COMPONENT);
RegistryID = gid_Starregistry_Services_Rdb;
Dir = SCP2_OOO_BIN_DIR;
#ifdef UNX
@@ -1126,13 +1126,13 @@ SPECIAL_UNO_COMPONENT_LIB_FILE( gid_File_Lib_Productregistration, productregistr
File gid_File_Lib_Desktop_Detector
Name = LIBNAME(desktop_detector);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
File gid_File_Lib_Vclplug_Gen
Name = LIBNAME(vclplug_gen);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
@@ -1142,7 +1142,7 @@ End
File gid_File_Lib_Vclplug_Gtk
Name = LIBNAME(vclplug_gtk);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
@@ -1151,7 +1151,7 @@ End
File gid_File_Lib_Vclplug_Kde
Name = LIBNAME(vclplug_kde);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
@@ -1161,7 +1161,7 @@ End
File gid_File_Lib_Vclplug_Kde4
Name = LIBNAME(vclplug_kde4);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = gid_Dir_Program;
End
#endif
@@ -1172,7 +1172,7 @@ End
File gid_File_Lib_AppleRemote
Name = LIBNAME(AppleRemote);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
@@ -1181,13 +1181,13 @@ End
File gid_File_Lib_Basebmp
Name = LIBNAME(basebmp);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
End
#endif
#if defined UNX && ! defined QUARTZ
-STD_LIB_FILE_PATCH( gid_File_Lib_Vclplug_Svp, vclplug_svp )
+STD_LIB_FILE( gid_File_Lib_Vclplug_Svp, vclplug_svp )
STD_LIB_FILE( gid_File_Lib_BaseBmp, basebmp )
#endif
@@ -1195,7 +1195,7 @@ STD_LIB_FILE( gid_File_Lib_BaseBmp, basebmp )
File gid_File_Lib_Recentfile
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = SCP2_OOO_BIN_DIR;
Name = STRING(CONCAT2(librecentfile,UNXSUFFIX));
End
@@ -1238,7 +1238,7 @@ End
File gid_File_Lib_Res
Name = LIBNAME(res);
TXT_FILE_BODY;
- Styles = (PACKED,UNO_COMPONENT,PATCH);
+ Styles = (PACKED,UNO_COMPONENT);
Dir = SCP2_OOO_BIN_DIR;
RegistryID = gid_Starregistry_Services_Rdb;
End
@@ -1325,7 +1325,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Sf_Prothdlr, protocolhandler )
File gid_File_Lib_Sfx
Name = LIBNAME(sfx);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH,UNO_COMPONENT);
+ Styles = (PACKED,UNO_COMPONENT);
Dir = SCP2_OOO_BIN_DIR;
RegistryID = gid_Starregistry_Services_Rdb;
End
@@ -1381,7 +1381,7 @@ SPECIAL_UNO_LIB_FILE(gid_File_Lib_Srtrs1,srtrs1)
STD_LIB_FILE( gid_File_Lib_Sts , sts)
STD_UNO_LIB_FILE( gid_File_Lib_Svl, svl )
-STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Svtools, svt )
+STD_UNO_LIB_FILE( gid_File_Lib_Svtools, svt )
STD_UNO_LIB_FILE( gid_File_Lib_Svx_Core, svxcore)
STD_UNO_LIB_FILE( gid_File_Lib_Svx, svx)
@@ -1390,10 +1390,10 @@ STD_LIB_FILE( gid_File_Lib_Editeng, editeng)
STD_LIB_FILE( gid_File_Lib_Msfilter, msfilter)
-STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sw , sw)
-STD_LIB_FILE_PATCH( gid_File_Lib_Swui, swui)
+STD_UNO_LIB_FILE( gid_File_Lib_Sw , sw)
+STD_LIB_FILE( gid_File_Lib_Swui, swui)
-STD_LIB_FILE_PATCH( gid_File_Lib_Msword, msword )
+STD_LIB_FILE( gid_File_Lib_Msword, msword )
#if ! defined UNX
File gid_File_Lib_Sysdtrans
@@ -1514,7 +1514,7 @@ STD_LIB_FILE( gid_File_Lib_BaseGfx, basegfx )
File gid_File_Lib_Vcl
Name = LIBNAME(vcl);
TXT_FILE_BODY;
- Styles = (PACKED,UNO_COMPONENT,PATCH);
+ Styles = (PACKED,UNO_COMPONENT);
Dir = SCP2_OOO_BIN_DIR;
RegistryID = gid_Starregistry_Services_Rdb;
End
@@ -1539,7 +1539,7 @@ STD_UNO_LIB_FILE( gid_File_Lib_Xof , xof)
File gid_File_Lib_Xo
Name = LIBNAME(xo);
TXT_FILE_BODY;
- Styles = (PACKED,PATCH,UNO_COMPONENT);
+ Styles = (PACKED,UNO_COMPONENT);
Dir = SCP2_OOO_BIN_DIR;
RegistryID = gid_Starregistry_Services_Rdb;
End
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index 11173e1f37fc..81ee4eac2960 100755
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -1899,7 +1899,7 @@ End
File gid_File_Extension_Dictionary_Da
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-da.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1908,7 +1908,7 @@ End
File gid_File_Extension_Dictionary_De_AT
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-de-AT.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1917,7 +1917,7 @@ End
File gid_File_Extension_Dictionary_De_CH
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-de-CH.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1926,7 +1926,7 @@ End
File gid_File_Extension_Dictionary_De_DE
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-de-DE.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1935,7 +1935,7 @@ End
File gid_File_Extension_Dictionary_En
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-en.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1953,7 +1953,7 @@ End
File gid_File_Extension_Dictionary_Et
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-et.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1962,7 +1962,7 @@ End
File gid_File_Extension_Dictionary_Fr
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-fr.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1989,7 +1989,7 @@ End
File gid_File_Extension_Dictionary_Hu
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-hu.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -1998,7 +1998,7 @@ End
File gid_File_Extension_Dictionary_It
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-it.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2007,7 +2007,7 @@ End
File gid_File_Extension_Dictionary_Ku_Tr
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-ku-TR.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2043,7 +2043,7 @@ End
File gid_File_Extension_Dictionary_No
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-no.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2052,7 +2052,7 @@ End
File gid_File_Extension_Dictionary_Pl
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-pl.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2061,7 +2061,7 @@ End
File gid_File_Extension_Dictionary_Pt
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-pt.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2070,7 +2070,7 @@ End
File gid_File_Extension_Dictionary_Ro
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-ro.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2088,7 +2088,7 @@ End
File gid_File_Extension_Dictionary_Sk
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-sk.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2097,7 +2097,7 @@ End
File gid_File_Extension_Dictionary_Sl
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-sl.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
@@ -2115,7 +2115,7 @@ End
File gid_File_Extension_Dictionary_Sv
Dir = gid_Brand_Dir_Share_Extension_Install;
Name = "dict-sv.oxt";
- Styles = (PACKED, PATCH, FORCELANGUAGEPACK);
+ Styles = (PACKED, FORCELANGUAGEPACK);
UnixRights = 444;
End
#endif
diff --git a/scp2/source/ooo/module_systemint.scp b/scp2/source/ooo/module_systemint.scp
index f02b5be04368..12ccef46c805 100644
--- a/scp2/source/ooo/module_systemint.scp
+++ b/scp2/source/ooo/module_systemint.scp
@@ -45,6 +45,6 @@ Module gid_Module_Optional_Systemintegration
#else
PackageName = "";
#endif
- InstallOrder = "desktop-integration:1050, suse-menus:1060, freedesktop-menus:1250";
+ InstallOrder = "desktop-integration:1050, suse-menus:1060, freedesktop-menus:1250, redhat-menus:1260";
End
diff --git a/scp2/source/ooo/ooo_brand.scp b/scp2/source/ooo/ooo_brand.scp
index 7021f02efc4a..3cd20ef97142 100644
--- a/scp2/source/ooo/ooo_brand.scp
+++ b/scp2/source/ooo/ooo_brand.scp
@@ -35,7 +35,7 @@ Directory gid_Dir_Brand_Root
#else
HostName = "${UNIXPRODUCTNAME}${BRANDPACKAGEVERSION}";
#endif
- Styles = (OFFICEDIRECTORY);
+ Styles = (OFFICEDIRECTORY,ISINSTALLLOCATION);
End
#endif
diff --git a/scp2/source/ooo/registryitem_ooo.scp b/scp2/source/ooo/registryitem_ooo.scp
index 47a053f225cd..59ef1673d727 100644
--- a/scp2/source/ooo/registryitem_ooo.scp
+++ b/scp2/source/ooo/registryitem_ooo.scp
@@ -289,7 +289,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
ModuleID = gid_Module_Root;
Name = "OFFICEINSTALLLOCATION";
- Value = "[OFFICEINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]";
Styles = (LANGUAGEPACK,ALWAYS_REQUIRED,UPGRADEKEY);
End
@@ -307,7 +307,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE";
ModuleID = gid_Module_Root;
Name = "OFFICEINSTALLLOCATION";
- Value = "[OFFICEINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]";
Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
End
@@ -325,7 +325,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Officeinstall
Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION";
ModuleID = gid_Module_Root;
Name = "OFFICEINSTALLLOCATION";
- Value = "[OFFICEINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]";
Styles = (ALWAYS_REQUIRED);
End
@@ -334,7 +334,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
ModuleID = gid_Module_Root;
Name = "BASISINSTALLLOCATION";
- Value = "[BASISINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]Basis\\";
Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
End
@@ -343,7 +343,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE";
ModuleID = gid_Module_Root;
Name = "BASISINSTALLLOCATION";
- Value = "[BASISINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]Basis\\";
Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
End
@@ -352,7 +352,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Basisinstall
Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\Basis\%OOOBASEVERSION";
ModuleID = gid_Module_Root;
Name = "BASISINSTALLLOCATION";
- Value = "[BASISINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]Basis\\";
Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_OOOBASEVERSION);
End
@@ -361,7 +361,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Basisinstal
Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION";
ModuleID = gid_Module_Root;
Name = "BASISINSTALLLOCATION";
- Value = "[BASISINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]Basis\\";
Styles = (ALWAYS_REQUIRED);
End
@@ -370,7 +370,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Produc
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
ModuleID = gid_Module_Root;
Name = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]URE\\";
Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
End
@@ -379,7 +379,7 @@ RegistryItem gid_Regitem_Software_Manufacturer_Productname_Productversion_Upgrad
Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE";
ModuleID = gid_Module_Root;
Name = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]URE\\";
Styles = (LANGUAGEPACK,ALWAYS_REQUIRED);
End
@@ -388,7 +388,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Ureinstall
Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\URE\%URELAYERVERSION";
ModuleID = gid_Module_Root;
Name = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]URE\\";
Styles = (ALWAYS_REQUIRED,LAYER_REGISTRY,USE_URELAYERVERSION);
End
@@ -397,7 +397,7 @@ RegistryItem gid_Regitem_Software_OpenOfficeorg_Ooobaseversion_Layer_Ureinstall
Subkey = "Software\OpenOffice.org\${REGISTRYLAYERNAME}\%PRODUCTNAME\%BRANDPACKAGEVERSION";
ModuleID = gid_Module_Root;
Name = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]URE\\";
Styles = (ALWAYS_REQUIRED);
End
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index 2bf8db09254c..22aba304c09e 100755
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -1273,5 +1273,5 @@ RegistryItem gid_Regitem_Path
ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
Subkey = "Software\OpenOffice.org\%PRODUCTNAME";
Name = "Path";
- Value = "[UREINSTALLLOCATION]";
+ Value = "[INSTALLLOCATION]";
End
diff --git a/scp2/source/ooo/ure_standalone.scp b/scp2/source/ooo/ure_standalone.scp
index caa78335e509..5fad8fadcbba 100755
--- a/scp2/source/ooo/ure_standalone.scp
+++ b/scp2/source/ooo/ure_standalone.scp
@@ -46,6 +46,7 @@ Directory gid_Dir_Ooo_Openofficeorg
#else
HostName = "openoffice.org";
#endif
+ Styles = (ISINSTALLLOCATION);
End
Directory gid_Dir_Common_Ure
@@ -105,21 +106,4 @@ RegistryItem gid_Regitem_Ure_Software_Manufacturer_Productname_Productversion_Up
Styles = (ALWAYS_REQUIRED);
End
-RegistryItem gid_Regitem_Ure_Software_Manufacturer_Productname_Productversion_Productcode_Ureinstall
- ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
- Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%PRODUCTCODE";
- ModuleID = gid_Module_Root;
- Name = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
- Styles = (ALWAYS_REQUIRED);
-End
-
-RegistryItem gid_Regitem_Ure_Software_Manufacturer_Productname_Productversion_Upgradecode_Ureinstall
- ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
- Subkey = "Software\%MANUFACTURER\%PRODUCTNAME%PRODUCTADDON\%PRODUCTVERSION\%UPGRADECODE";
- ModuleID = gid_Module_Root;
- Name = "UREINSTALLLOCATION";
- Value = "[UREINSTALLLOCATION]";
- Styles = (ALWAYS_REQUIRED);
-End
diff --git a/scp2/source/ooo/vc_redist.scp b/scp2/source/ooo/vc_redist.scp
index 70c490d954f8..0b71511c7f0e 100644
--- a/scp2/source/ooo/vc_redist.scp
+++ b/scp2/source/ooo/vc_redist.scp
@@ -29,32 +29,9 @@
#if defined(WITH_VC_REDIST)
-// WindowsCustomAction gid_Customaction_InstallRuntime
-// Name = "InstallRuntime";
-// Typ = "98";
-// Source = "SystemFolder";
-// Target = "[SourceDir]redist\vcredist_x86.exe /qb";
-// Inbinarytable = 0;
-// Styles = (NO_FILE);
-// Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH", "ExecuteAction");
-// // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH", "FileCost");
-// End
-
-// WindowsCustomAction gid_Customaction_InstallRuntime_X64
-// Name = "InstallRuntimeX64";
-// Typ = "98";
-// Source = "SystemFolder";
-// Target = "[SourceDir]redist\vcredist_x64.exe /qb";
-// Inbinarytable = 0;
-// Styles = (NO_FILE);
-// Assignment1 = ("InstallUISequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "ExecuteAction");
-// // Assignment1 = ("InstallExecuteSequence", "Not REMOVE=\"ALL\" And Not PATCH And VersionNT64", "FileCost");
-// End
-
-
ScpAction scp_Copy_vcredist_x86
#if defined(BUILD_SPECIAL)
- Copy = "vcredist_x86_9.0.21022.218.exe";
+ Copy = "vcredist_x86_9.0.30729.4148.exe";
#else
Copy = "vcredist_x86.exe";
#endif
@@ -63,7 +40,11 @@ ScpAction scp_Copy_vcredist_x86
End
ScpAction scp_Copy_vcredist_x64
+ #if defined(BUILD_SPECIAL)
+ Copy = "vcredist_x64_9.0.30729.4148.exe";
+ #else
Copy = "vcredist_x64.exe";
+ #endif
Name = "vcredist_x64.exe";
Subdir = "redist";
End
diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp
index 9794fa06719e..d47e14d0a63a 100644
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -46,6 +46,14 @@ End
#ifndef MACOSX
+#ifdef WNT
+Directory gid_Dir_Sdkoo_Root
+ ParentID = PREDEFINED_PROGDIR;
+ HostName = "${PRODUCTNAME}_${PRODUCTVERSION}_${POSTVERSIONEXTENSION}";
+ Styles = (OFFICEDIRECTORY, ISINSTALLLOCATION);
+End
+#endif
+
#ifndef WNT
Directory gid_Dir_Ooo_Openofficeorg_Sdk
ParentID = PREDEFINED_PROGDIR;
@@ -77,7 +85,7 @@ Directory gid_Dir_Basis_Sdk
DosName = "OpenOffice.org${OOOBASEVERSION}_SDK";
#else
#if defined WNT
- ParentID = PREDEFINED_PROGDIR;
+ ParentID = gid_Dir_Sdkoo_Root;
#else
ParentID = gid_Dir_Ooo_Basis_Sdk;
#endif
diff --git a/scp2/source/winexplorerext/registryitem_winexplorerext.scp b/scp2/source/winexplorerext/registryitem_winexplorerext.scp
index 7c932bac1f28..62911d24fd0e 100755..100644
--- a/scp2/source/winexplorerext/registryitem_winexplorerext.scp
+++ b/scp2/source/winexplorerext/registryitem_winexplorerext.scp
@@ -35,8 +35,8 @@ RegistryItem gid_Regitem_Clsid_087B3AE3_E237_4467_B8DB_5A38AB959AC9_InProcServer
ModuleID = gid_Module_Optional_Winexplorerext;
Styles = (X64);
Subkey = "CLSID\{087B3AE3-E237-4467-B8DB-5A38AB959AC9}\InprocServer32";
- Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll";
- Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll";
+ Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll";
+ Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll";
End
RegistryItem gid_Regitem_Clsid_087B3AE3_E237_4467_B8DB_5A38AB959AC9_InProcServer32_ThreadingModel
@@ -58,8 +58,8 @@ RegistryItem gid_Regitem_Clsid_3B092F0C_7696_40E3_A80F_68D74DA84210_InProcServer
ModuleID = gid_Module_Optional_Winexplorerext;
Styles = (X64);
Subkey = "CLSID\{3B092F0C-7696-40E3-A80F-68D74DA84210}\InprocServer32";
- Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll";
- Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll";
+ Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll";
+ Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll";
End
RegistryItem gid_Regitem_Clsid_3B092F0C_7696_40E3_A80F_68D74DA84210_InProcServer32_ThreadingModel
@@ -90,8 +90,8 @@ RegistryItem gid_Regitem_Clsid_C52AF81D_F7A0_4AAB_8E87_F80A60CCD396_InProcServer
ModuleID = gid_Module_Optional_Winexplorerext;
Styles = (X64);
Subkey = "CLSID\{C52AF81D-F7A0-4AAB-8E87-F80A60CCD396}\InprocServer32";
- Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll";
- Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll";
+ Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll";
+ Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll";
End
RegistryItem gid_Regitem_Clsid_C52AF81D_F7A0_4AAB_8E87_F80A60CCD396_InProcServer32_ThreadingModel
@@ -124,8 +124,8 @@ RegistryItem gid_Regitem_Clsid_7BC0E710_5703_45BE_A29D_5D46D8B39262_InProcServer
ModuleID = gid_Module_Root;
Subkey = "CLSID\{7BC0E710-5703-45BE-A29D-5D46D8B39262}\InprocServer32";
Styles = (X64); // Values: X64 / X64_ONLY
- Value = "[BASISINSTALLLOCATION]program\shlxthdl\ooofilt.dll";
- Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\ooofilt_x64.dll";
+ Value = "[INSTALLLOCATION]Basis\program\shlxthdl\ooofilt.dll";
+ Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\ooofilt_x64.dll";
End
RegistryItem gid_Regitem_Clsid_7BC0E710_5703_45BE_A29D_5D46D8B39262_InProcServer32_ThreadingModel
@@ -167,8 +167,8 @@ RegistryItem gid_Regitem_Clsid_63542C48_9552_494A_84F7_73AA6A7C99C1_InProcServer
ModuleID = gid_Module_Optional_Winexplorerext;
Styles = (X64);
Subkey = "CLSID\{63542C48-9552-494A-84F7-73AA6A7C99C1}\InprocServer32";
- Value = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl.dll";
- Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\shlxthdl_x64.dll";
+ Value = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl.dll";
+ Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\shlxthdl_x64.dll";
End
RegistryItem gid_Regitem_Clsid_63542C48_9552_494A_84F7_73AA6A7C99C1_InProcServer32_ThreadingModel
@@ -201,8 +201,8 @@ RegistryItem gid_Regitem_Clsid_AE424E85_F6DF_4910_A6A9_438797986431_InProcServer
ComponentCondition = "VersionNT >= 600";
Styles = (X64);
Subkey = "CLSID\{AE424E85-F6DF-4910-A6A9-438797986431}\InprocServer32";
- Value = "[BASISINSTALLLOCATION]program\shlxthdl\propertyhdl.dll";
- Val64 = "[BASISINSTALLLOCATION]program\shlxthdl\propertyhdl_x64.dll";
+ Value = "[INSTALLLOCATION]Basis\program\shlxthdl\propertyhdl.dll";
+ Val64 = "[INSTALLLOCATION]Basis\program\shlxthdl\propertyhdl_x64.dll";
End
RegistryItem gid_Regitem_Clsid_AE424E85_F6DF_4910_A6A9_438797986431_InProcServer32_ThreadingModel
diff --git a/scp2/source/xsltfilter/file_xsltfilter.scp b/scp2/source/xsltfilter/file_xsltfilter.scp
index e044a3dee90d..848b1c707ff7 100644
--- a/scp2/source/xsltfilter/file_xsltfilter.scp
+++ b/scp2/source/xsltfilter/file_xsltfilter.scp
@@ -57,7 +57,7 @@ End
File gid_File_Xsl_Export_Xhtml_Body
TXT_FILE_BODY;
- Styles = (PACKED,PATCH);
+ Styles = (PACKED);
Dir = gid_Dir_Share_Xslt_Export_Xhtml;
Name = "/xslt/export/xhtml/body.xsl";
End
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index c372e1f660af..aa6c6cfb966a 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -28,26 +28,22 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_scripting.hxx"
-#ifndef SCRIPTING_DLGPROV_HXX
#include "dlgprov.hxx"
-#endif
#include "dlgevtatt.hxx"
#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/awt/XWindowPeer.hpp>
-#ifndef _COM_SUN_STAR_IO_XINPUTSTREAMPROVIDER_HXX_
#include <com/sun/star/io/XInputStreamProvider.hpp>
-#endif
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
-#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_
#include <cppuhelper/implementationentry.hxx>
-#endif
+#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/beans/XIntrospection.hpp>
#include <com/sun/star/resource/XStringResourceSupplier.hpp>
#include <com/sun/star/resource/XStringResourceManager.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
-#include "com/sun/star/resource/XStringResourceWithLocation.hpp"
+#include <com/sun/star/resource/XStringResourceWithLocation.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
#include <sfx2/app.hxx>
#include <sfx2/objsh.hxx>
@@ -691,13 +687,22 @@ static ::rtl::OUString aResourceResolverPropName = ::rtl::OUString::createFromAs
//Reference< XDialog > xDialog;
Reference< XControl > xCtrl;
Reference< XControlModel > xCtrlMod;
- // add support for basic RTL_FUNCTION
- if ( m_BasicInfo.get() )
- xCtrlMod = createDialogModelForBasic();
- else
+ try
+ {
+ // add support for basic RTL_FUNCTION
+ if ( m_BasicInfo.get() )
+ xCtrlMod = createDialogModelForBasic();
+ else
+ {
+ OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" );
+ xCtrlMod = createDialogModel( URL );
+ }
+ }
+ catch ( const RuntimeException& ) { throw; }
+ catch ( const Exception& )
{
- OSL_ENSURE( URL.getLength(), "DialogProviderImpl::getDialog: no URL!" );
- xCtrlMod = createDialogModel( URL );
+ const Any aError( ::cppu::getCaughtException() );
+ throw WrappedTargetRuntimeException( ::rtl::OUString(), *this, aError );
}
if ( xCtrlMod.is() )
{
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 0c14dec72583..dfc7e3e3bf88 100644..100755
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -179,13 +179,6 @@ public:
enum ChangeHint { CH_VIEW_SHELL_INVALID, CH_VIEW_SHELL_VALID };
- /** Handle a change outside the outliner which may affect the outliner.
- At the moment this is restricted to changes of the main view shell
- but later may include any changes that are detected now by
- DetectChange().
- */
- void HandleOutsideChange (ChangeHint eHint);
-
int GetIgnoreCurrentPageChangesLevel() const { return mnIgnoreCurrentPageChangesLevel; };
void IncreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel++; };
void DecreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel--; };
@@ -421,15 +414,6 @@ private:
*/
void EndOfSearch (void);
- /** Prepare to commence searching/spell checking on the specified page.
- This also creates a proper page iterator.
- @param nPageIndex
- Index of the page to prepare for searching. The default value
- of -1 is a flag for using the first/last page of the current
- edit mode/view mode depending on the search direction.
- */
- void InitPage (USHORT nPageIndex = (USHORT)-1);
-
/** Show a dialog that tells the user that the search has ended either
because there are no more matches after finding at least one or that
no match has been found at all.
@@ -521,11 +505,6 @@ private:
*/
bool HandleFailedSearch (void);
- /** Return a parent window for a dialog. The returned window depends on
- the search mode.
- */
- ::Window* GetParentForDialog (void);
-
/** Take a position as returned by an object iterator and switch to the
view and page on which the object specified by this position is
located.
diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx
index ce291a6f5a00..92301f06289c 100644..100755
--- a/sd/inc/OutlinerIterator.hxx
+++ b/sd/inc/OutlinerIterator.hxx
@@ -109,13 +109,6 @@ public:
*/
explicit Iterator (IteratorImplBase* pObject);
- /** Create a new iterator with the implementation object being the copy
- of the provided one.
- @param rObject
- A copy of this object will become the implementation object.
- */
- explicit Iterator (const IteratorImplBase& rObject);
-
~Iterator (void);
/** Assign the iterator from the given one. The implementation object
@@ -240,9 +233,8 @@ private:
This specifies whether the returned iterator points to the
first, (one past the) last, or current object.
@return
- Returns an iterator as constructed by one of the
+ Returns an iterator as constructed by
<member>CreateSelectionIterator()</member>,
- <member>CreateViewIterator()</member>, or <member>CreateDocumentIterator()</member>.
*/
Iterator CreateIterator (IteratorLocation aLocation);
@@ -270,24 +262,6 @@ private:
IteratorLocation aLocation=BEGIN);
/** Create an iterator that iterates over all <type>SdrObjects</type>
- objects of the <member>mpOutliner</member> outliner that belong to
- the current view.
- @param pDocument
- The document to which the objects belong.
- @param pViewShell
- The view shell which displays the objects.
- @param bDirectionIsForward
- The direction of iteration. It defaults to forward.
- @param aLocation
- This specifies at which object the iterator points initially.
- */
- Iterator CreateViewIterator (
- SdDrawDocument* pDocument,
- const boost::shared_ptr<ViewShell>& rpViewShell,
- bool bDirectionIsForward=true,
- IteratorLocation aLocation=BEGIN);
-
- /** Create an iterator that iterates over all <type>SdrObjects</type>
objects of the <member>mpOutliner</member> outliner.
@param pDocument
The document to which the objects belong.
@@ -356,9 +330,6 @@ public:
assigned to the data members of this object.
*/
IteratorPosition (const IteratorPosition& aPosition);
- /** Create a new object and set its data members to the given values.
- */
- IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode);
/// The destructor is a no-op at the moment.
~IteratorPosition (void);
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 1d801baa5d3c..6811da762934 100644..100755
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -441,7 +441,6 @@ public:
CharClass* GetCharClass() const { return mpCharClass; }
void RestoreLayerNames();
- void MakeUniqueLayerNames();
void UpdateAllLinks();
@@ -465,18 +464,6 @@ public:
static SdDrawDocument* pDocLockedInsertingLinks; // static to prevent recursions while resolving links
- /** This method acts as a simplified front end for the more complex
- <member>CreatePage()</member> method.
- @param nPageNum
- The page number as passed to the <member>GetSdPage()</member>
- method from which to use certain properties for the new pages.
- These include the auto layout.
- @return
- Returns an index of the inserted pages that can be used with the
- <member>GetSdPage()</member> method.
- */
- USHORT CreatePage (USHORT nPageNum);
-
/** Create and insert a set of two new pages: a standard (draw) page and
the associated notes page. The new pages are inserted direclty
after the specified page set.
@@ -687,7 +674,6 @@ namespace sd
class ModifyGuard
{
public:
- ModifyGuard( DrawDocShell* pDocShell );
ModifyGuard( SdDrawDocument* pDoc );
~ModifyGuard();
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 0dad3ca237cb..f0d5cc64a3c4 100644..100755
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -141,8 +141,6 @@ public:
SD_DLLPUBLIC SvNumberFormatter* GetNumberFormatter();
- ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
-
//virtuelle Methoden fuer den Optionendialog
virtual SfxItemSet* CreateItemSet( USHORT nId );
virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index d1ce1b0af8c0..1b87a6a9e10f 100755
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -62,10 +62,6 @@ namespace sd
returns the first shape if pObj is 0 */
SdrObject* getNextShape(SdrObject* pObj) const;
- /** returns the shape prior to the given shape in the list or 0
- returns the last shape if pObj is 0 */
- SdrObject* getPreviousShape( SdrObject* pObj ) const;
-
/**
*/
SdrObject* getNextShape();
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 7dfeac99121b..fd9dbeae5977 100644..100755
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -68,7 +68,6 @@ public:
SfxStyleSheetBase* GetActualStyleSheet() { return mpActualStyleSheet; }
SfxStyleSheetBase* GetTitleSheet(const String& rLayoutName);
- String GetLayoutName() const;
// Caller muss Liste loeschen
List* CreateOutlineSheetList(const String& rLayoutName);
@@ -82,7 +81,6 @@ public:
when styles are missing.
*/
SD_DLLPUBLIC void CreateLayoutStyleSheets(const String& rLayoutName, sal_Bool bCheck = sal_False );
- void EraseLayoutStyleSheets(const String& rLayoutName);
List* CreateLayoutSheetNames(const String& rLayoutName) const;
void CreateLayoutSheetList(const String& rLayoutName, SdStyleSheetVector& rLayoutSheets);
void CopyLayoutSheets(const String& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets );
diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx
index ced8a48c5bb6..6fa186596fba 100644..100755
--- a/sd/inc/textapi.hxx
+++ b/sd/inc/textapi.hxx
@@ -53,7 +53,6 @@ public:
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
OutlinerParaObject* CreateText();
- void SetString( const String& rText );
void SetText( OutlinerParaObject& rText );
String GetText();
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 7852f7cc8fcf..33b9c233909b 100644..100755
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1809,15 +1809,6 @@ void EffectSequenceHelper::append( const CustomAnimationEffectPtr& pEffect )
// --------------------------------------------------------------------
-void EffectSequenceHelper::insert( EffectSequence::iterator& rPos, const CustomAnimationEffectPtr& pEffect )
-{
- pEffect->setEffectSequence( this );
- maEffects.insert( rPos, pEffect );
- rebuild();
-}
-
-// --------------------------------------------------------------------
-
CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPresetPtr& pPreset, const Any& rTarget, double fDuration /* = -1.0 */ )
{
CustomAnimationEffectPtr pEffect;
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index e12ee30552e7..74a1bde5f5f8 100755
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -1346,37 +1346,6 @@ void SdDrawDocument::CheckMasterPages()
}
}
-
-
-
-USHORT SdDrawDocument::CreatePage (USHORT nPageNum)
-{
- PageKind ePageKind = PK_STANDARD;
-
- // Get current page.
- SdPage* pActualPage = GetSdPage(nPageNum, ePageKind);
-
- // Get background flags.
- SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
- SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
-
- // Get layout from current page.
- AutoLayout eAutoLayout = pActualPage->GetAutoLayout();
-
- return CreatePage (
- pActualPage, ePageKind,
- // No names for the new slides.
- String(), String(),
- eAutoLayout, eAutoLayout,
- aVisibleLayers.IsSet(aBckgrnd),
- aVisibleLayers.IsSet(aBckgrndObj));
-}
-
-
-
-
USHORT SdDrawDocument::CreatePage (
SdPage* pActualPage,
PageKind ePageKind,
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index b615c7e76c05..89f74de30494 100644..100755
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -242,26 +242,6 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE));
- // only change paragraph text direction,
- // if this is a new document and
- // text direction is set explicitly to RTL
-/*
- if( mpDocSh &&
- mpDocSh->IsNewDocument() &&
- SD_MOD()->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB )
- {
- SvxAdjustItem aAdjust( SVX_ADJUST_RIGHT );
- SvxFrameDirectionItem aFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR );
-
- rISet.Put( aAdjust );
- rISet.Put( aFrameDirectionItem );
-
- pItemPool->SetPoolDefaultItem( aAdjust );
- pItemPool->SetPoolDefaultItem( aFrameDirectionItem );
- }
- else
- rISet.Put( SvxAdjustItem() );
-*/
rISet.Put( SdrTextLeftDistItem( 250 ) ); // sj: (i33745) using text frame distances seems to be a better default
rISet.Put( SdrTextRightDistItem( 250 ) );
rISet.Put( SdrTextUpperDistItem( 125 ) );
@@ -1121,57 +1101,6 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
/*************************************************************************
|*
-|* Sprachabhaengige Namen der StandardLayer durch eindeutigen Namen ersetzen
-|*
-\************************************************************************/
-
-void SdDrawDocument::MakeUniqueLayerNames()
-{
- String aLayerLayout(SdResId(STR_LAYER_LAYOUT));
- String aLayerBckgrnd(SdResId(STR_LAYER_BCKGRND));
- String aLayerBckgrndObj(SdResId(STR_LAYER_BCKGRNDOBJ));
- String aLayerControls(SdResId(STR_LAYER_CONTROLS));
- String aLayerMeasurelines(SdResId(STR_LAYER_MEASURELINES));
- SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- USHORT nStandardLayer = 5;
- USHORT nLayerCount = Min(rLayerAdmin.GetLayerCount(), nStandardLayer);
-
- for (USHORT nLayer = 0; nLayer < nLayerCount; nLayer++)
- {
- // Die sprachabhaengigen Namen der Default-Layer werden nicht mehr
- // gespeichert. Es werden stattdessen eindeutige Namen verwendet.
- SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer);
-
- if (pLayer)
- {
- String aLayerName(pLayer->GetName());
-
- if (aLayerName == aLayerLayout)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_LAYOUT" )));
- }
- else if (aLayerName == aLayerBckgrnd)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BCKGRND" )));
- }
- else if (aLayerName == aLayerBckgrndObj)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BACKGRNDOBJ" )));
- }
- else if (aLayerName == aLayerControls)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_CONTROLS" )));
- }
- else if (aLayerName == aLayerMeasurelines)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_MEASURELINES" )));
- }
- }
- }
-}
-
-/*************************************************************************
-|*
|* Eindeutige Namen der StandardLayer durch sprachabhaengige Namen ersetzen
|*
\************************************************************************/
@@ -1545,12 +1474,6 @@ SdStyleSheetPool* SdDrawDocument::GetSdStyleSheetPool() const
return dynamic_cast< SdStyleSheetPool* >( GetStyleSheetPool() );
}
-ModifyGuard::ModifyGuard( DrawDocShell* pDocShell )
-: mpDocShell( pDocShell ), mpDoc( 0 )
-{
- init();
-}
-
ModifyGuard::ModifyGuard( SdDrawDocument* pDoc )
: mpDocShell( 0 ), mpDoc( pDoc )
{
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index f9f923f77270..bf5b98471b53 100755
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -170,25 +170,6 @@ SdrObject* ShapeList::getNextShape(SdrObject* pObj) const
return 0;
}
-SdrObject* ShapeList::getPreviousShape( SdrObject* pObj ) const
-{
- if( pObj )
- {
- ListImpl::const_iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), pObj ) );
- if( (aIter != maShapeList.end()) && (aIter != maShapeList.begin()) )
- {
- aIter--;
- return (*aIter);
- }
- }
- else if( !maShapeList.empty() )
- {
- return (*--maShapeList.end());
- }
-
- return 0;
-}
-
void ShapeList::ObjectInDestruction(const SdrObject& rObject)
{
ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rObject ) );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index c91fee735954..138863cc313a 100644..100755
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -144,30 +144,6 @@ SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const String& rLayoutName)
return pResult;
}
-// ----------------------------------------------------------
-// find layout name of first layout
-// ----------------------------------------------------------
-
-String SdStyleSheetPool::GetLayoutName() const
-{
- String aName( SdResId(STR_LAYOUT_DEFAULT_NAME ) );
- sal_uInt32 nCount = aStyles.size();
-
- for( sal_uInt32 n = 0; n < nCount; n++ )
- {
- aName = aStyles[n]->GetName();
- sal_uInt16 nPos = aName.SearchAscii( SD_LT_SEPARATOR );
- if( nPos != STRING_NOTFOUND )
- break;
- }
-
- sal_uInt16 nPos = aName.Search( sal_Unicode( ' ' ));
- if( nPos != STRING_NOTFOUND )
- aName.Erase( nPos ); // removing blanks and number (e.g. "Gliederung 1")
-
- return aName;
-}
-
/*************************************************************************
|*
|* eine Liste der Gliederungstextvorlagen fuer ein Praesentationlayout
@@ -573,32 +549,6 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
/*************************************************************************
|*
-|* StyleSheets des genannten Praesentationslayouts loeschen
-|*
-\************************************************************************/
-
-void SdStyleSheetPool::EraseLayoutStyleSheets(const String& rLayoutName)
-{
- SfxStyleSheetBase* pSheet = NULL;
-
- List* pNameList = CreateLayoutSheetNames(rLayoutName);
-
- String* pName = (String*)pNameList->First();
- while (pName)
- {
- pSheet = Find(*pName, SD_STYLE_FAMILY_MASTERPAGE);
- DBG_ASSERT(pSheet, "EraseLayoutStyleSheets: Vorlage nicht gefunden");
- if (pSheet)
- Remove(pSheet);
- delete pName;
- pName = (String*)pNameList->Next();
- }
- delete pNameList;
-}
-
-
-/*************************************************************************
-|*
|* Graphik-StyleSheets aus dem Quellpool in diesen Pool kopieren
|*
|* (rSourcePool kann nicht const sein, weil SfxStyleSheetPoolBase::Find
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index 0856e867f4e1..ab6c69ee8fdc 100644..100755
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -118,7 +118,6 @@ public:
void Dispose();
void SetText( OutlinerParaObject& rText );
- void SetString( const String& rText );
OutlinerParaObject* CreateText();
String GetText();
SdDrawDocument* GetDoc() { return pImpl->mpDoc; }
@@ -177,16 +176,6 @@ OutlinerParaObject* TextApiObject::CreateText()
return mpSource->CreateText();
}
-void TextApiObject::SetString( const String& rText )
-{
- SdrModel* pModel = mpSource->GetDoc();
- if( pModel && pModel->IsUndoEnabled() )
- pModel->AddUndo( new UndoTextAPIChanged( *pModel, this ) );
-
- mpSource->SetString( rText );
- maSelection.nStartPara = 0xffff;
-}
-
void TextApiObject::SetText( OutlinerParaObject& rText )
{
SdrModel* pModel = mpSource->GetDoc();
@@ -288,22 +277,6 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText )
}
}
-void TextAPIEditSource::SetString( const String& rText )
-{
- if ( pImpl->mpDoc )
- {
- if( !pImpl->mpOutliner )
- {
- //init draw model first
- pImpl->mpOutliner = new Outliner( pImpl->mpDoc, OUTLINERMODE_TEXTOBJECT );
- pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
- }
- else
- pImpl->mpOutliner->Clear();
- pImpl->mpOutliner->Insert( rText );
- }
-}
-
OutlinerParaObject* TextAPIEditSource::CreateText()
{
if ( pImpl->mpDoc && pImpl->mpOutliner )
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index f3ec27d8093c..3d8797beb328 100644..100755
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -476,7 +476,6 @@ class GroupTable
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > &
GetCurrentGroupAccess() const { return mpGroupEntry[ mnCurrentGroupEntry - 1 ]->mXIndexAccess; };
sal_uInt32 GetGroupsClosed();
- void SkipCurrentGroup();
void ResetGroupTable( sal_uInt32 nCount );
void ClearGroupTable();
sal_Bool EnterGroup( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex );
@@ -534,7 +533,7 @@ class PortionObj : public PropStateValue
protected :
void ImplClear();
- void ImplConstruct( PortionObj& rPortionObj );
+ void ImplConstruct( const PortionObj& rPortionObj );
sal_uInt32 ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, String& rURL );
sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
@@ -567,13 +566,13 @@ class PortionObj : public PropStateValue
sal_Bool bLast, FontCollection& rFontCollection );
PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
FontCollection& rFontCollection );
- PortionObj( PortionObj& rPortionObj );
+ PortionObj( const PortionObj& rPortionObj );
~PortionObj();
void Write( SvStream* pStrm, sal_Bool bLast );
sal_uInt32 Count() const { return mnTextSize; };
- PortionObj& operator=( PortionObj& rPortionObj );
+ PortionObj& operator=( const PortionObj& rPortionObj );
};
struct ParaFlags
@@ -594,10 +593,9 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
protected :
- void ImplConstruct( ParagraphObj& rParagraphObj );
+ void ImplConstruct( const ParagraphObj& rParagraphObj );
void ImplClear();
sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
- ::com::sun::star::awt::Size ImplMapSize( const ::com::sun::star::awt::Size& rSize );
void ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue = FALSE );
void ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue = FALSE );
@@ -631,7 +629,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContentRef,
ParaFlags, FontCollection& rFontCollection,
PPTExBulletProvider& rBuProv );
- ParagraphObj( ParagraphObj& rParargraphObj );
+ ParagraphObj( const ParagraphObj& rParargraphObj );
ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
PPTExBulletProvider& rBuProv );
@@ -641,7 +639,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
void Write( SvStream* pStrm );
sal_uInt32 Count() const { return mnTextSize; };
- ParagraphObj& operator=( ParagraphObj& rParagraphObj );
+ ParagraphObj& operator=( const ParagraphObj& rParagraphObj );
};
struct ImplTextObj
@@ -659,13 +657,13 @@ struct ImplTextObj
class TextObj
{
- ImplTextObj* mpImplTextObj;
+ mutable ImplTextObj* mpImplTextObj;
void ImplCalculateTextPositions();
public :
TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > &
rXText, int nInstance, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv );
- TextObj( TextObj& rTextObj );
+ TextObj( const TextObj& rTextObj );
~TextObj();
void Write( SvStream* pStrm );
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index c9d083db86d9..f4462da6b8b8 100644..100755
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -312,14 +312,6 @@ sal_Bool GroupTable::GetNextGroupEntry()
// ---------------------------------------------------------------------------------------------
-void GroupTable::SkipCurrentGroup()
-{
- if ( mnCurrentGroupEntry )
- delete ( mpGroupEntry[ --mnCurrentGroupEntry ] );
-}
-
-// ---------------------------------------------------------------------------------------------
-
FontCollectionEntry::~FontCollectionEntry()
{
}
@@ -1869,7 +1861,7 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text
}
}
-PortionObj::PortionObj( PortionObj& rPortionObj )
+PortionObj::PortionObj( const PortionObj& rPortionObj )
: PropStateValue( rPortionObj )
{
ImplConstruct( rPortionObj );
@@ -2097,7 +2089,7 @@ void PortionObj::ImplClear()
delete[] mpText;
}
-void PortionObj::ImplConstruct( PortionObj& rPortionObj )
+void PortionObj::ImplConstruct( const PortionObj& rPortionObj )
{
mbLastPortion = rPortionObj.mbLastPortion;
mnTextSize = rPortionObj.mnTextSize;
@@ -2291,7 +2283,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
return nRetValue;
}
-PortionObj& PortionObj::operator=( PortionObj& rPortionObj )
+PortionObj& PortionObj::operator=( const PortionObj& rPortionObj )
{
if ( this != &rPortionObj )
{
@@ -2369,7 +2361,7 @@ ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::
}
}
-ParagraphObj::ParagraphObj( ParagraphObj& rObj )
+ParagraphObj::ParagraphObj( const ParagraphObj& rObj )
: List()
, PropStateValue()
, SOParagraph()
@@ -2878,7 +2870,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo
meBiDi = ePropState;
}
-void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
+void ParagraphObj::ImplConstruct( const ParagraphObj& rParagraphObj )
{
mnTextSize = rParagraphObj.mnTextSize;
mnTextAdjust = rParagraphObj.mnTextAdjust;
@@ -2891,8 +2883,9 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
mbForbiddenRules = rParagraphObj.mbForbiddenRules;
mnBiDi = rParagraphObj.mnBiDi;
- for ( void* pPtr = rParagraphObj.First(); pPtr; pPtr = rParagraphObj.Next() )
- Insert( new PortionObj( *(PortionObj*)pPtr ), LIST_APPEND );
+ ParagraphObj& rOther = const_cast<ParagraphObj&>(rParagraphObj);
+ for ( const void* pPtr = rOther.First(); pPtr; pPtr = rOther.Next() )
+ Insert( new PortionObj( *(const PortionObj*)pPtr ), LIST_APPEND );
maTabStop = rParagraphObj.maTabStop;
bExtendedParameters = rParagraphObj.bExtendedParameters;
@@ -2917,16 +2910,6 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
nBulletId = rParagraphObj.nBulletId;
}
-::com::sun::star::awt::Size ParagraphObj::ImplMapSize( const ::com::sun::star::awt::Size& rSize )
-{
- Size aSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) );
- if ( !aSize.Width() )
- aSize.Width()++;
- if ( !aSize.Height() )
- aSize.Height()++;
- return ::com::sun::star::awt::Size( aSize.Width(), aSize.Height() );
-}
-
sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition )
{
mnTextSize = 0;
@@ -2935,7 +2918,7 @@ sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosi
return mnTextSize;
}
-ParagraphObj& ParagraphObj::operator=( ParagraphObj& rParagraphObj )
+ParagraphObj& ParagraphObj::operator=( const ParagraphObj& rParagraphObj )
{
if ( this != &rParagraphObj )
{
@@ -2998,7 +2981,7 @@ TextObj::TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSim
ImplCalculateTextPositions();
}
-TextObj::TextObj( TextObj& rTextObj )
+TextObj::TextObj( const TextObj& rTextObj )
{
mpImplTextObj = rTextObj.mpImplTextObj;
mpImplTextObj->mnRefCount++;
@@ -4155,6 +4138,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag
ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, NULL, aExtBu, &aPropOpt );
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
*mpStrm << (sal_Int16)maRect.Top() << (sal_Int16)maRect.Left() << (sal_Int16)maRect.Right() << (sal_Int16)maRect.Bottom(); // oben, links, rechts, unten ????
@@ -5406,6 +5390,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
maRect.Justify();
if ( mnAngle )
ImplFlipBoundingBox( aPropOpt );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddClientAnchor( maRect );
@@ -5475,6 +5460,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
SvMemoryStream aExtBu( 0x200, 0x200 );
ImplWriteTextStyleAtom( *pClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOpt );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddClientAnchor( maRect );
@@ -5652,6 +5638,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x1000100 );
aPropOpt2.AddOpt( ESCHER_Prop_tableProperties, 1 );
aPropOpt2.AddOpt( ESCHER_Prop_tableRowProperties, sal_True, aMemStrm.Tell(), static_cast< sal_uInt8* >( const_cast< void* >( aMemStrm.GetData() ) ), aMemStrm.Tell() );
+ aPropOpt.CreateShapeProperties( rXShape );
aPropOpt.Commit( *mpStrm );
aPropOpt2.Commit( *mpStrm, 3, ESCHER_UDefProp );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx
index 5adcbd5fc56a..4bcb73535ba1 100644..100755
--- a/sd/source/filter/html/htmlattr.cxx
+++ b/sd/source/filter/html/htmlattr.cxx
@@ -100,15 +100,3 @@ void SdHtmlAttrPreview::SetColors( Color& aBack, Color& aText, Color& aLink,
m_aVLinkColor = aVLink;
m_aALinkColor = aALink;
}
-
-// =====================================================================
-// =====================================================================
-void SdHtmlAttrPreview::GetColors( Color& aBack, Color& aText, Color& aLink,
- Color& aVLink, Color& aALink ) const
-{
- aBack = m_aBackColor;
- aText = m_aTextColor;
- aLink = m_aLinkColor;
- aVLink = m_aVLinkColor;
- aALink = m_aALinkColor;
-}
diff --git a/sd/source/filter/html/htmlattr.hxx b/sd/source/filter/html/htmlattr.hxx
index b076b2a29307..1caa16822ab1 100644..100755
--- a/sd/source/filter/html/htmlattr.hxx
+++ b/sd/source/filter/html/htmlattr.hxx
@@ -46,8 +46,6 @@ public:
void SetColors( Color& aBack, Color& aText, Color& aLink,
Color& aVLink, Color& aALink );
- void GetColors( Color& aBack, Color& aText, Color& aLink,
- Color& aVLink, Color& aALink ) const;
};
#endif // _SD_HTMLATTR_HXX
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 82fabc73aed2..9de46771e14c 100644..100755
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3371,15 +3371,6 @@ BOOL HtmlErrorContext::GetString( ULONG, String& rCtxStr )
// =====================================================================
-void HtmlErrorContext::SetContext( USHORT nResId )
-{
- mnResId = nResId;
- maURL1.Erase();
- maURL2.Erase();
-}
-
-// =====================================================================
-
void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL )
{
mnResId = nResId;
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 34ca8182d22f..43bc12419f84 100644..100755
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -88,7 +88,6 @@ public:
virtual BOOL GetString( ULONG nErrId, String& rCtxStr );
- void SetContext( USHORT nResId );
void SetContext( USHORT nResId, const String& rURL );
void SetContext( USHORT nResId, const String& rURL1, const String& rURL2 );
};
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index a4a3564d35b0..25ac858ca319 100644..100755
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -84,11 +84,6 @@ Ppt97Animation::Ppt97Animation( SvStream& rInputStream )
m_aAtom.ReadStream( rInputStream );
}
-Ppt97Animation::Ppt97Animation()
- : MEMBER_CONSTRUCTOR_LIST()
-{
-}
-
Ppt97Animation::Ppt97Animation( const Ppt97Animation& rAnimation )
: MEMBER_CONSTRUCTOR_LIST()
{
@@ -163,11 +158,12 @@ bool Ppt97Animation::HasAfterEffect_DimAtNextEffect() const
{
return m_aAtom.nAfterEffect == 2;
}
+#ifdef FUTURE
bool Ppt97Animation::HasAfterEffect_DimAfterEffect() const
{
return m_aAtom.nAfterEffect == 3;
}
-
+#endif
UINT32 Ppt97Animation::GetSoundRef() const
{
return m_aAtom.nSoundRef;
diff --git a/sd/source/filter/ppt/ppt97animations.hxx b/sd/source/filter/ppt/ppt97animations.hxx
index 4aa24ab12de8..c68ba9a19382 100644..100755
--- a/sd/source/filter/ppt/ppt97animations.hxx
+++ b/sd/source/filter/ppt/ppt97animations.hxx
@@ -95,7 +95,6 @@ class Ppt97Animation
public: //public methods
Ppt97Animation( SvStream& rIn );
- Ppt97Animation();
Ppt97Animation( const Ppt97Animation& rAnimation );
Ppt97Animation& operator= ( const Ppt97Animation& rAnimation );
bool operator < ( const Ppt97Animation& rAnimation ) const;//later is greater
@@ -129,7 +128,9 @@ private: //private methods
bool HasAfterEffect() const;
bool HasAfterEffect_ChangeColor() const;
bool HasAfterEffect_DimAtNextEffect() const;
+#ifdef FUTURE
bool HasAfterEffect_DimAfterEffect() const;
+#endif
bool HasStopPreviousSound() const;
bool HasReverseOrder() const; //true if the text paragraphs should be animated in reverse order
sal_Int32 GetParagraphLevel() const; //paragraph level that is animated ( that paragraph and higher levels )
diff --git a/sd/source/filter/ppt/pptatom.cpp b/sd/source/filter/ppt/pptatom.cpp
index 21a0c3c3f9f8..0bd31c2119d5 100644..100755
--- a/sd/source/filter/ppt/pptatom.cpp
+++ b/sd/source/filter/ppt/pptatom.cpp
@@ -49,7 +49,15 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream )
Atom* pLastAtom = NULL;
- while( (mrStream.GetError() == 0 ) && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
+ // retrieve file size (to allow sanity checks)
+ const sal_Size nStreamPos = mrStream.Tell();
+ mrStream.Seek( STREAM_SEEK_TO_END );
+ const sal_Size nStreamSize = mrStream.Tell();
+ mrStream.Seek( nStreamPos );
+
+ while( (mrStream.GetError() == 0 )
+ && ( mrStream.Tell() < nStreamSize )
+ && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
{
mrStream >> aChildHeader;
@@ -109,15 +117,3 @@ const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) co
return pChild;
}
-
-/** returns the next child atom after pLast with nRecType and nRecInstance or NULL */
-const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const
-{
- const Atom* pChild = pLast != NULL ? pLast->mpNextAtom : mpFirstChild;
- while( pChild && (pChild->maRecordHeader.nRecType != nRecType) && (pChild->maRecordHeader.nRecInstance != nRecInstance) )
- {
- pChild = findNextChildAtom( pChild );
- }
-
- return pChild;
-}
diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx
index 0b13dc314584..d430b7bffb7a 100644..100755
--- a/sd/source/filter/ppt/pptatom.hxx
+++ b/sd/source/filter/ppt/pptatom.hxx
@@ -49,21 +49,12 @@ public:
/** returns true if at least one atim with the given nRecType is found */
inline bool hasChildAtom( sal_uInt16 nRecType ) const;
- /** returns true if at least one atim with the given nRecType and nRecInstnace is found */
- inline bool hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const;
-
/** returns the first child atom with nRecType or NULL */
inline const Atom* findFirstChildAtom( sal_uInt16 nRecType ) const;
/** returns the next child atom after pLast with nRecType or NULL */
const Atom* findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) const;
- /** returns the first child atom with nRecType and nRecInstance or NULL */
- inline const Atom* findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const;
-
- /** returns the next child atom after pLast with nRecType and nRecInstance or NULL */
- const Atom* findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const;
-
/** returns the first child atom or NULL */
inline const Atom* findFirstChildAtom() const;
@@ -99,11 +90,6 @@ inline bool Atom::hasChildAtom( sal_uInt16 nRecType ) const
return findFirstChildAtom( nRecType ) != NULL;
}
-inline bool Atom::hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const
-{
- return findFirstChildAtom( nRecType, nRecInstance ) != NULL;
-}
-
inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType ) const
{
return findNextChildAtom( nRecType, NULL );
@@ -114,11 +100,6 @@ inline const DffRecordHeader& Atom::getHeader() const
return maRecordHeader;
}
-inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const
-{
- return findNextChildAtom( nRecType, nRecInstance, NULL );
-}
-
inline const Atom* Atom::findFirstChildAtom() const
{
return mpFirstChild;
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 16fc1a99dd8a..10b0b152b8f4 100644..100755
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -1522,52 +1522,6 @@ void AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference<
// --------------------------------------------------------------------
-/* todo: for now we dump sub containers into its parent container, what else to do with it? */
-void AnimationImporter::importAnimationSubContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
-{
- DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importTimeContainer()!");
- if( pAtom && xNode.is() )
- {
- // import sub containers
- const Atom* pChildAtom = pAtom->findFirstChildAtom();
-
- while( pChildAtom )
- {
- switch( pChildAtom->getType() )
- {
- case DFF_msofbtAnimNode:
- case DFF_msofbtAnimEvent:
- case DFF_msofbtAnimValue:
- case DFF_msofbtAnimAction:
- case DFF_msofbtAnimPropertySet:
- break;
- case DFF_msofbtAnimCommand:
- {
- const OUString aServiceName( OUString::createFromAscii("com.sun.star.animations.Command") );
- Reference< XAnimationNode > xChildNode( ::comphelper::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY );
- importAnimationNodeContainer( pChildAtom, xChildNode );
- Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY );
- if( xParentContainer.is() && xChildNode.is() )
- xParentContainer->appendChild( xChildNode );
- }
- break;
-
- default:
- {
- dump_atom_header( pChildAtom, true, false );
- dump_atom( pChildAtom );
- dump_atom_header( pChildAtom, false, false );
- }
- break;
- }
-
- pChildAtom = pAtom->findNextChildAtom( pChildAtom );
- }
- }
-}
-
-// --------------------------------------------------------------------
-
void AnimationImporter::importAnimationNodeContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
{
DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importAnimationNodeContainer()!");
@@ -3894,14 +3848,6 @@ void AnimationImporter::dump_atom( const Atom* , bool )
{
}
-void AnimationImporter::dump( sal_uInt32 , bool )
-{
-}
-
-void AnimationImporter::dump_anim_group( const Atom* , const AnimationNode& , const PropertySet& , bool )
-{
-}
-
void AnimationImporter::dump_target( ::com::sun::star::uno::Any& )
{
}
@@ -3922,10 +3868,6 @@ void AnimationImporter::dump( const char * )
{
}
-void AnimationImporter::dump( const rtl::OUString& )
-{
-}
-
void AnimationImporter::dump( const char * , sal_Int32 )
{
}
diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx
index d29449361861..24f423029e82 100644..100755
--- a/sd/source/filter/ppt/pptinanimations.hxx
+++ b/sd/source/filter/ppt/pptinanimations.hxx
@@ -62,7 +62,6 @@ private:
void importAnimationContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParent );
void importTimeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimationNodeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
- void importAnimationSubContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimateSetContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimateFilterContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
@@ -109,18 +108,18 @@ private:
#ifdef DBG_ANIM_LOG
FILE * mpFile;
+ void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
+ void dump( const rtl::OUString& rString );
+ void dump( sal_uInt32 nLen, bool bNewLine = true );
#endif
void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend );
void dump_atom( const Atom* pAtom, bool bNewLine = true );
- void dump( sal_uInt32 nLen, bool bNewLine = true );
- void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
void dump_target( ::com::sun::star::uno::Any& rAny );
void dump( ::com::sun::star::uno::Any& rAny );
void dump( const PropertySet& rSet );
void dump( const AnimationNode& rNode );
void dump( const char * pText );
- void dump( const rtl::OUString& rString );
void dump( const char * pText, sal_Int32 nInt );
void dump( const char * pText, double fDouble );
void dump( const char * pText, const char * pText2 );
diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
index 70734ac23198..de5342afd23f 100644..100755
--- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
+++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
@@ -44,18 +44,6 @@ namespace accessibility {
May change in the future.
*/
-AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId)
- : mpView (pView),
- mnWindowId (nWindowId),
- mrDevice (pView->GetPaintWindow((sal_uInt32)nWindowId)->GetOutputDevice())
-{
- OSL_ASSERT (mpView != NULL);
- // empty
-}
-
-
-
-
AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice)
: mpView (pView),
mnWindowId (0),
@@ -86,15 +74,6 @@ AccessibleViewForwarder::~AccessibleViewForwarder (void)
-void AccessibleViewForwarder::SetView (SdrPaintView* pView)
-{
- mpView = pView;
- OSL_ASSERT (mpView != NULL);
-}
-
-
-
-
sal_Bool AccessibleViewForwarder::IsValid (void) const
{
return sal_True;
diff --git a/sd/source/ui/animations/AnimationSchemesPane.cxx b/sd/source/ui/animations/AnimationSchemesPane.cxx
deleted file mode 100644
index 337dc64331fd..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.cxx
+++ /dev/null
@@ -1,443 +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_sd.hxx"
-#include "AnimationSchemesPane.hxx"
-#include "AnimationSchemesPane.hrc"
-#include "CustomAnimation.hrc"
-
-#include "TransitionPreset.hxx"
-#include "sdresid.hxx"
-#include "ViewShellBase.hxx"
-#include "DrawDocShell.hxx"
-#include "SlideSorterViewShell.hxx"
-#include "drawdoc.hxx"
-#include "filedlg.hxx"
-#include "strings.hrc"
-#include "EventMultiplexer.hxx"
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-#ifndef _SVT_CONTROLDIMS_HRC_
-#include <svtools/controldims.hrc>
-#endif
-#include <svx/gallery.hxx>
-#include <unotools/pathoptions.hxx>
-#include <vcl/msgbox.hxx>
-#include <tools/urlobj.hxx>
-
-#include <algorithm>
-
-
-using namespace ::com::sun::star;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::rtl::OUString;
-using ::com::sun::star::uno::RuntimeException;
-
-// ______________________
-//
-// Local Helper Functions
-// ______________________
-
-namespace
-{
-
-typedef ::boost::shared_ptr<sd::slidesorter::SlideSorterViewShell::PageSelection>
- SharedPageSelection;
-SharedPageSelection lcl_getSelectedPages (::sd::ViewShellBase& rBase)
-{
- ::sd::slidesorter::SlideSorterViewShell*pSlideSorterViewShell
- = ::sd::slidesorter::SlideSorterViewShell::GetSlideSorter(rBase);
- DBG_ASSERT( pSlideSorterViewShell, "No Slide-Sorter available" );
-
- if (pSlideSorterViewShell != NULL)
- {
- return pSlideSorterViewShell->GetPageSelection();
- }
- else
- {
- return SharedPageSelection(new sd::slidesorter::SlideSorterViewShell::PageSelection());
- }
-}
-
-// void lcl_ApplyToPages( ::std::vector< SdPage * > aPages, const ::sd::impl::TransitionEffect & rEffect )
-// {
-// ::std::vector< SdPage * >::const_iterator aIt( aPages.begin());
-// const ::std::vector< SdPage * >::const_iterator aEndIt( aPages.end());
-// for( ; aIt != aEndIt; ++aIt )
-// {
-// rEffect.applyTo( *(*aIt) );
-// }
-// }
-
-} // anonymous namespace
-
-namespace sd
-{
-
-// ____________________
-//
-// AnimationSchemesPane
-// ____________________
-
-AnimationSchemesPane::AnimationSchemesPane(
- ::Window * pParent,
- ViewShellBase & rBase,
- SdDrawDocument* pDoc ) :
- Control( pParent, SdResId( DLG_ANIMATION_SCHEMES_PANE ) ),
-
- mrBase( rBase ),
- mpDrawDoc( pDoc ),
- maFL_APPLY_SCHEME( this, SdResId( FL_APPLY_SCHEME ) ),
- maLB_ANIMATION_SCHEMES( this, SdResId( LB_ANIMATION_SCHEMES ) ),
- maFL_EMPTY1( this, SdResId( FL_EMPTY1 ) ),
- maPB_APPLY_TO_ALL( this, SdResId( PB_APPLY_TO_ALL ) ),
- maPB_PLAY( this, SdResId( PB_PLAY ) ),
- maPB_SLIDE_SHOW( this, SdResId( PB_SLIDE_SHOW ) ),
- maFL_EMPTY2( this, SdResId( FL_EMPTY2 ) ),
- maCB_AUTO_PREVIEW( this, SdResId( CB_AUTO_PREVIEW ) ),
-
- maSTR_NO_SCHEME( SdResId( STR_NO_SCHEME ) ),
- mbHasSelection( false ),
- mbUpdatingControls( false ),
- mbIsMainViewChangePending( false )
-{
- // use no resource ids from here on
- FreeResource();
-
- if( pDoc )
- mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY );
- // TODO: get correct view
- if( mxModel.is())
- mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY );
-
- // fill list box of slide transitions
- maLB_ANIMATION_SCHEMES.InsertEntry( maSTR_NO_SCHEME );
-
- // set defaults
- maCB_AUTO_PREVIEW.Check(); // automatic preview on
-
- // update control states before adding handlers
- updateLayout();
- updateControls();
-
- // set handlers
- maPB_APPLY_TO_ALL.SetClickHdl( LINK( this, AnimationSchemesPane, ApplyToAllButtonClicked ));
- maPB_PLAY.SetClickHdl( LINK( this, AnimationSchemesPane, PlayButtonClicked ));
- maPB_SLIDE_SHOW.SetClickHdl( LINK( this, AnimationSchemesPane, SlideShowButtonClicked ));
-
- maLB_ANIMATION_SCHEMES.SetSelectHdl( LINK( this, AnimationSchemesPane, SchemeSelected ));
-
- addListener();
-}
-
-AnimationSchemesPane::~AnimationSchemesPane()
-{
- removeListener();
-}
-
-void AnimationSchemesPane::Resize()
-{
- updateLayout();
-}
-
-void AnimationSchemesPane::onSelectionChanged()
-{
- updateControls();
-}
-
-void AnimationSchemesPane::onChangeCurrentPage()
-{
- updateControls();
-}
-
-void AnimationSchemesPane::updateLayout()
-{
- ::Size aPaneSize( GetSizePixel() );
-
- // start layouting elements from bottom to top. The remaining space is used
- // for the topmost list box
- ::Point aOffset( LogicToPixel( Point( 3, 3 ), MAP_APPFONT ) );
- long nOffsetX = aOffset.getX();
- long nOffsetY = aOffset.getY();
- long nOffsetBtnX = LogicToPixel( Point( 6, 1 ), MAP_APPFONT ).getX();
-
- ::Point aUpperLeft( nOffsetX, aPaneSize.getHeight() - nOffsetY );
- long nMaxWidth = aPaneSize.getWidth() - 2 * nOffsetX;
-
- // auto preview check-box
- ::Size aCtrlSize = maCB_AUTO_PREVIEW.GetSizePixel();
- aCtrlSize.setWidth( maCB_AUTO_PREVIEW.CalcMinimumSize( nMaxWidth ).getWidth());
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maCB_AUTO_PREVIEW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above check-box
- aCtrlSize = maFL_EMPTY2.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY2.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // buttons "Play" and "Slide Show"
- long nPlayButtonWidth = maPB_PLAY.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
- long nSlideShowButtonWidth = maPB_SLIDE_SHOW.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
-
- if( (nPlayButtonWidth + nSlideShowButtonWidth + nOffsetX) <= nMaxWidth )
- {
- // place buttons side by side
- aCtrlSize = maPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nPlayButtonWidth );
- maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aUpperLeft.setX( aUpperLeft.getX() + nPlayButtonWidth + nOffsetX );
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
- aUpperLeft.setX( nOffsetX );
- }
- else
- {
- // place buttons on top of each other
- aCtrlSize = maPB_SLIDE_SHOW.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = maPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- aCtrlSize.setWidth( nPlayButtonWidth );
- maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
- }
-
- // "Apply to All Slides" button
- aCtrlSize = maPB_APPLY_TO_ALL.GetSizePixel();
- aCtrlSize.setWidth( maPB_APPLY_TO_ALL.CalcMinimumSize( nMaxWidth ).getWidth() + 2 * nOffsetBtnX );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- maPB_APPLY_TO_ALL.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above "Apply to All Slides" button
- aCtrlSize = maFL_EMPTY1.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY1.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line "Apply to selected slides"
- aCtrlSize = maFL_APPLY_SCHEME.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- ::Point aUpperLeftCorner( nOffsetX, nOffsetY );
- maFL_APPLY_SCHEME.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
- aUpperLeftCorner.setY( aUpperLeftCorner.getY() + aCtrlSize.getHeight() + nOffsetY );
- aUpperLeft.setY( aUpperLeft.getY() - nOffsetY );
-
- // list box animation scheme
- aCtrlSize.setWidth( nMaxWidth );
- aCtrlSize.setHeight( aUpperLeft.getY() - aUpperLeftCorner.getY() );
- maLB_ANIMATION_SCHEMES.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
-}
-
-void AnimationSchemesPane::updateControls()
-{
- SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase ));
- if( aSelectedPages->empty())
- {
- mbHasSelection = false;
- return;
- }
- mbHasSelection = true;
-
- DBG_ASSERT( ! mbUpdatingControls, "Multiple Control Updates" );
- mbUpdatingControls = true;
-
- // get model data for first page
-#ifdef DBG_UTIL
- SdPage * pFirstPage = aSelectedPages->front();
- DBG_ASSERT( pFirstPage, "Invalid Page" );
-#endif
-
-// // merge with other pages
-// ::std::vector< SdPage * >::const_iterator aIt( aSelectedPages.begin());
-// const ::std::vector< SdPage * >::const_iterator aEndIt( aSelectedPages.end());
-
-// // start with second page (note aIt != aEndIt, because ! aSelectedPages.empty())
-// for( ++aIt ;aIt != aEndIt; ++aIt )
-// {
-// if( *aIt )
-// // merge
-// }
-
- mbUpdatingControls = false;
-
- updateControlState();
-}
-
-void AnimationSchemesPane::updateControlState()
-{
- maLB_ANIMATION_SCHEMES.Enable( mbHasSelection );
-
- maPB_APPLY_TO_ALL.Enable( mbHasSelection );
- maPB_PLAY.Enable( mbHasSelection );
-// maPB_SLIDE_SHOW.Enable( TRUE );
- maCB_AUTO_PREVIEW.Enable( mbHasSelection );
-}
-
-void AnimationSchemesPane::getAnimationSchemeFromControls() const
-{
- // TODO: Implement
-}
-
-void AnimationSchemesPane::applyToSelectedPages()
-{
- if( ! mbUpdatingControls )
- {
- SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase ));
- if( ! aSelectedPages->empty())
- {
-// lcl_ApplyToPages( aSelectedPages, getAnimationSchemeFromControls() );
- }
- if( maCB_AUTO_PREVIEW.IsEnabled() &&
- maCB_AUTO_PREVIEW.IsChecked())
- {
- playCurrentScheme();
- }
- }
-}
-
-void AnimationSchemesPane::playCurrentScheme()
-{
- // TODO: Implement a preview in the center view
-}
-
-void AnimationSchemesPane::addListener()
-{
- Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) );
- mrBase.GetEventMultiplexer()->AddEventListener(
- aLink,
- tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
- | tools::EventMultiplexerEvent::EID_CURRENT_PAGE
- | tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
- | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
- | tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED);
-}
-
-void AnimationSchemesPane::removeListener()
-{
- Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) );
- mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
-}
-
-IMPL_LINK(AnimationSchemesPane,EventMultiplexerListener,
- tools::EventMultiplexerEvent*,pEvent)
-{
- switch (pEvent->meEventId)
- {
- case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
- onSelectionChanged();
- break;
-
- case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
- onChangeCurrentPage();
- break;
-
- case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = Reference<drawing::XDrawView>();
- onSelectionChanged();
- onChangeCurrentPage();
- break;
-
- case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
- mbIsMainViewChangePending = true;
- break;
-
- case tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED:
- if (mbIsMainViewChangePending)
- {
- mbIsMainViewChangePending = false;
- mxView = Reference<drawing::XDrawView>::query( mxModel->getCurrentController() );
- onSelectionChanged();
- onChangeCurrentPage();
- }
- break;
- }
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, ApplyToAllButtonClicked, void *, EMPTYARG )
-{
- DBG_ASSERT( mpDrawDoc, "Invalid Draw Document!" );
- if( !mpDrawDoc )
- return 0;
-
- ::std::vector< SdPage * > aPages;
-
- sal_uInt16 nPageCount = mpDrawDoc->GetSdPageCount( PK_STANDARD );
- aPages.reserve( nPageCount );
- for( sal_uInt16 i=0; i<nPageCount; ++i )
- {
- SdPage * pPage = mpDrawDoc->GetSdPage( i, PK_STANDARD );
- if( pPage )
- aPages.push_back( pPage );
- }
-
-// if( ! aPages.empty())
-// lcl_ApplyToPages( aPages, getAnimationSchemeFromControls() );
-
- return 0;
-}
-
-
-IMPL_LINK( AnimationSchemesPane, PlayButtonClicked, void *, EMPTYARG )
-{
- playCurrentScheme();
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, SlideShowButtonClicked, void *, EMPTYARG )
-{
- mrBase.StartPresentation();
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, SchemeSelected, void *, EMPTYARG )
-{
- applyToSelectedPages();
- return 0;
-}
-
-::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase )
-{
- ::Window* pWindow = 0;
-
- DrawDocShell* pDocSh = rBase.GetDocShell();
- if( pDocSh )
- pWindow = new AnimationSchemesPane( pParent, rBase, pDocSh->GetDoc() );
-
- return pWindow;
-}
-
-
-} // namespace sd
diff --git a/sd/source/ui/animations/AnimationSchemesPane.hrc b/sd/source/ui/animations/AnimationSchemesPane.hrc
deleted file mode 100644
index 2b9ec9be3611..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.hrc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SD_ANIMATIONSCHEMESPANE_HRC
-#define _SD_ANIMATIONSCHEMESPANE_HRC
-
-#define FL_APPLY_SCHEME 1
-// spec: 1
-#define LB_ANIMATION_SCHEMES 2
-
-#define FL_EMPTY1 3
-// spec: 2
-#define PB_APPLY_TO_ALL 4
-// spec: 3
-#define PB_PLAY 5
-// spec: 4
-#define PB_SLIDE_SHOW 6
-
-#define FL_EMPTY2 7
-// spec: 5
-#define CB_AUTO_PREVIEW 8
-
-#define STR_NO_SCHEME 9
-
-
-#endif // _SD_ANIMATIONSCHEMESPANE_HRC
diff --git a/sd/source/ui/animations/AnimationSchemesPane.hxx b/sd/source/ui/animations/AnimationSchemesPane.hxx
deleted file mode 100644
index 8528e5e6ef64..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.hxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef SD_ANIMATIONSCHEMESPANE_HXX
-#define SD_ANIMATIONSCHEMESPANE_HXX
-
-#include <vcl/ctrl.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/fixed.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#include <vcl/field.hxx>
-#include <com/sun/star/drawing/XDrawView.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-
-#include <vector>
-
-class SdDrawDocument;
-class SdPage;
-
-namespace sd { namespace tools {
-class EventMultiplexerEvent;
-} }
-
-namespace sd
-{
-
-class ViewShellBase;
-
-class AnimationSchemesPane : public Control
-{
-public:
- explicit AnimationSchemesPane(
- ::Window * pParent,
- ViewShellBase & rBase,
- SdDrawDocument* pDoc );
- virtual ~AnimationSchemesPane();
-
- virtual void Resize();
-
- void onSelectionChanged();
- void onChangeCurrentPage();
-
-private:
- void updateLayout();
- void updateControls();
- void updateControlState();
-
- void applyToSelectedPages();
- void playCurrentScheme();
-
- void addListener();
- void removeListener();
-
- void getAnimationSchemeFromControls() const;
-
- DECL_LINK( ApplyToAllButtonClicked, void * );
- DECL_LINK( PlayButtonClicked, void * );
- DECL_LINK( SlideShowButtonClicked, void * );
-
- DECL_LINK( SchemeSelected, void * );
- DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
-
-private:
- ViewShellBase & mrBase;
- SdDrawDocument * mpDrawDoc;
-
- FixedLine maFL_APPLY_SCHEME;
- ListBox maLB_ANIMATION_SCHEMES;
- FixedLine maFL_EMPTY1;
- PushButton maPB_APPLY_TO_ALL;
- PushButton maPB_PLAY;
- PushButton maPB_SLIDE_SHOW;
- FixedLine maFL_EMPTY2;
- CheckBox maCB_AUTO_PREVIEW;
-
- String maSTR_NO_SCHEME;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
-
- bool mbHasSelection;
- bool mbUpdatingControls;
- bool mbIsMainViewChangePending;
-};
-
-} // namespace sd
-
-// SD_ANIMATIONSCHEMESPANE_HXX
-#endif
diff --git a/sd/source/ui/animations/AnimationSchemesPane.src b/sd/source/ui/animations/AnimationSchemesPane.src
deleted file mode 100644
index 12447c917930..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.src
+++ /dev/null
@@ -1,113 +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 "CustomAnimation.hrc"
-#include "AnimationSchemesPane.hrc"
-#include "helpids.h"
-
-#ifndef _SVT_CONTROLDIMS_HRC_
-#include <svtools/controldims.hrc>
-#endif
-
-// Note: Sizes of 1 usually mean they are auto-calculated
-
-Control DLG_ANIMATION_SCHEMES_PANE
-{
- OutputSize = TRUE;
- Size = MAP_APPFONT( 1, 1 );
-
- Text [ en-US ] = "Animation Schemes";
-
- FixedLine FL_APPLY_SCHEME
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Apply to selected slides ";
- };
-
- ListBox LB_ANIMATION_SCHEMES
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES;
- Border = TRUE ;
- TabStop = TRUE ;
-
- Size = MAP_APPFONT( 1, 1 );
- };
-
- FixedLine FL_EMPTY1
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- PushButton PB_APPLY_TO_ALL
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Apply to All Slides";
- };
-
-
- PushButton PB_PLAY
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Play";
- };
-
- PushButton PB_SLIDE_SHOW
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Slide Show";
- };
-
- FixedLine FL_EMPTY2
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- Checkbox CB_AUTO_PREVIEW
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW;
- Size = MAP_APPFONT( 1, RSC_CD_CHECKBOX_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Automatic preview";
- };
-
- // --------------------
-
- String STR_NO_SCHEME
- {
- Text [ en-US ] = "No Animation";
- };
-};
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 3ac3d1f24a07..f76b84d29826 100644..100755
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -92,7 +92,6 @@ extern void fillDurationComboBox( ComboBox* pBox );
class CategoryListBox : public ListBox
{
public:
- CategoryListBox( Window* pParent, WinBits nStyle = WB_BORDER );
CategoryListBox( Window* pParent, const ResId& rResId );
~CategoryListBox();
@@ -110,12 +109,6 @@ private:
Link maDoubleClickHdl;
};
-CategoryListBox::CategoryListBox( Window* pParent, WinBits nStyle /* = WB_BORDER */ )
-: ListBox( pParent, nStyle )
-{
- EnableUserDraw( TRUE );
-}
-
CategoryListBox::CategoryListBox( Window* pParent, const ResId& rResId )
: ListBox( pParent, rResId )
{
diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc b/sd/source/ui/animations/CustomAnimationSchemesPane.hrc
deleted file mode 100644
index 70168d2662cf..000000000000
--- a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
-#define _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
-
-
-#endif // _SD_CUSTOMANIMATIONSCHEMESPANE_HRC \ No newline at end of file
diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.src b/sd/source/ui/animations/CustomAnimationSchemesPane.src
deleted file mode 100644
index 1499b79bbb4b..000000000000
--- a/sd/source/ui/animations/CustomAnimationSchemesPane.src
+++ /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.
- *
- ************************************************************************/
-
-#include "CustomAnimation.hrc"
-
-ModalDialog DLG_CUSTOMANIMATION_SCHEMES_PANE
-{
- DialogControl = TRUE;
-
- Text [ en-US ] = "Animation Schemes";
-
- Fixedline 1
- {
- Text [ en-US ] = "Apply to selected slides";
- };
-
- PushButton 1
- {
- Text [ en-US ] = "Apply to All Slides";
- };
-
- PushButton 2
- {
- Text [ en-US ] = "Play";
- };
-
- PushButton 3
- {
- Text [ en-US ] = "Slide Show";
- };
-
- Checkbox 4
- {
- Text [ en-US ] = "Automatic preview";
- };
-
- String 2
- {
- Text [ en-US ] = "No Animation";
- };
-
- String 3
- {
- Text [ en-US ] = "Recently used Schemes";
- };
-};
-
diff --git a/sd/source/ui/animations/makefile.mk b/sd/source/ui/animations/makefile.mk
index 2194dad6eafc..db010bf4ef23 100644..100755
--- a/sd/source/ui/animations/makefile.mk
+++ b/sd/source/ui/animations/makefile.mk
@@ -42,16 +42,13 @@ ENABLE_EXCEPTIONS=TRUE
SRS1NAME=$(TARGET)
SRC1FILES =\
- AnimationSchemesPane.src\
CustomAnimationPane.src\
CustomAnimationDialog.src\
CustomAnimationCreateDialog.src\
SlideTransitionPane.src\
- CustomAnimationSchemesPane.src\
CustomAnimation.src
SLOFILES = \
- $(SLO)$/AnimationSchemesPane.obj \
$(SLO)$/CustomAnimationCreateDialog.obj\
$(SLO)$/CustomAnimationDialog.obj\
$(SLO)$/CustomAnimationPane.obj \
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index aa42fec50f9c..1e64617edab8 100644..100755
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -971,7 +971,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
}
return 0;
}
-
+#if 0
OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation )
{
OUString sRet;
@@ -994,7 +994,7 @@ OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< :
return sRet;
}
-
+#endif
void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation > xAnnotation, ::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ )
{
diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx
index 43b53d8467f9..70b95c2a509b 100755
--- a/sd/source/ui/annotations/annotationmanagerimpl.hxx
+++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx
@@ -99,9 +99,9 @@ public:
void onTagDeselected( AnnotationTag& rTag );
void onSelectionChanged();
-
+#if 0
rtl::OUString GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation );
-
+#endif
void addListener();
void removeListener();
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index ad6709c776ce..a4642bb68096 100644..100755
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -136,14 +136,25 @@ AnnotationTextWindow::~AnnotationTextWindow()
void AnnotationTextWindow::Paint( const Rectangle& rRect)
{
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ if ( !bHighContrast )
{
DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
Gradient(GRADIENT_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
}
if( mpOutlinerView )
+ {
+ Color aBackgroundColor( mpAnnotationWindow->maColor );
+ if( bHighContrast )
+ {
+ aBackgroundColor = GetSettings().GetStyleSettings().GetWindowColor();
+ }
+
+ mpOutlinerView->SetBackgroundColor( aBackgroundColor );
+
mpOutlinerView->Paint( rRect );
+ }
}
void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt )
@@ -493,12 +504,6 @@ void AnnotationWindow::ResizeIfNeccessary(long aOldHeight, long aNewHeight)
}
}
-void AnnotationWindow::SetReadonly(bool bSet)
-{
- mbReadonly = bSet;
- getView()->SetReadOnly(bSet);
-}
-
void AnnotationWindow::SetLanguage(const SvxLanguageItem aNewItem)
{
Engine()->SetModifyHdl( Link() );
@@ -615,16 +620,34 @@ void AnnotationWindow::SetColor()
{
sal_uInt16 nAuthorIdx = mpDoc->GetAnnotationAuthorIndex( mxAnnotation->getAuthor() );
- maColor = mrManager.GetColor( nAuthorIdx );
- maColorDark = mrManager.GetColorDark( nAuthorIdx );
- maColorLight = mrManager.GetColorLight( nAuthorIdx );
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ if( bHighContrast )
+ {
+ StyleSettings aStyleSettings = GetSettings().GetStyleSettings();
+
+ maColor = aStyleSettings.GetWindowColor();
+ maColorDark = maColor;
+ maColorLight = aStyleSettings.GetWindowTextColor();
+ }
+ else
+ {
+ maColor = mrManager.GetColor( nAuthorIdx );
+ maColorDark = mrManager.GetColorDark( nAuthorIdx );
+ maColorLight = mrManager.GetColorLight( nAuthorIdx );
+ }
mpOutlinerView->SetBackgroundColor(maColor);
+ Engine()->SetBackgroundColor(maColor);
+
+ {
+ SvtAccessibilityOptions aOptions;
+ Engine()->ForceAutoColor( bHighContrast || aOptions.GetIsAutomaticFontColor() );
+ }
mpMeta->SetControlBackground(maColor);
AllSettings aSettings = mpMeta->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- aStyleSettings.SetFieldTextColor(maColorDark);
+ aStyleSettings.SetFieldTextColor( bHighContrast ? maColorLight : maColorDark);
aSettings.SetStyleSettings(aStyleSettings);
mpMeta->SetSettings(aSettings);
@@ -641,59 +664,35 @@ void AnnotationWindow::SetColor()
void AnnotationWindow::Deactivate()
{
Reference< XAnnotation > xAnnotation( mxAnnotation );
-/*
- // check if text is empty
- Paragraph* p1stPara=Engine()->GetParagraph( 0 );
- ULONG nParaAnz=Engine()->GetParagraphCount();
- if(p1stPara==NULL)
- nParaAnz=0;
- if(nParaAnz==1)
+ // write changed text back to annotation
+ if ( Engine()->IsModified() )
{
- // if it is only one paragraph, check if that paragraph is empty
- XubString aStr(Engine()->GetText(p1stPara));
-
- if(!aStr.Len())
- nParaAnz = 0;
- }
+ TextApiObject* pTextApi = getTextApiObject( xAnnotation );
- if( nParaAnz == 0 )
- {
- // text is empty, delete postit
- DeleteAnnotation( xAnnotation );
- }
- else
-*/
- {
- // write changed text back to annotation
- if ( Engine()->IsModified() )
+ if( pTextApi )
{
- TextApiObject* pTextApi = getTextApiObject( xAnnotation );
-
- if( pTextApi )
+ OutlinerParaObject* pOPO = Engine()->CreateParaObject();
+ if( pOPO )
{
- OutlinerParaObject* pOPO = Engine()->CreateParaObject();
- if( pOPO )
- {
- if( mpDoc->IsUndoEnabled() )
- mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) );
+ if( mpDoc->IsUndoEnabled() )
+ mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) );
- pTextApi->SetText( *pOPO );
- delete pOPO;
+ pTextApi->SetText( *pOPO );
+ delete pOPO;
- // set current time to changed annotation
- xAnnotation->setDateTime( getCurrentDateTime() );
+ // set current time to changed annotation
+ xAnnotation->setDateTime( getCurrentDateTime() );
- if( mpDoc->IsUndoEnabled() )
- mpDoc->EndUndo();
-
- DocView()->GetDocSh()->SetModified(sal_True);
- }
+ if( mpDoc->IsUndoEnabled() )
+ mpDoc->EndUndo();
+ DocView()->GetDocSh()->SetModified(sal_True);
}
+
}
- Engine()->ClearModifyFlag();
}
+ Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
}
@@ -704,15 +703,16 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
if(mpMeta->IsVisible() && !mbReadonly)
{
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
//draw left over space
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if ( bHighContrast )
SetFillColor(COL_BLACK);
else
SetFillColor(maColor);
SetLineColor();
DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height()))));
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ if ( bHighContrast )
{
//draw rect around button
SetFillColor(COL_BLACK);
@@ -734,7 +734,7 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
DrawRect(maRectMetaButton);
//draw arrow
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if( bHighContrast )
SetFillColor(COL_WHITE);
else
SetFillColor(COL_BLACK);
diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx
index ba82d4e862d3..264cb2fa1afe 100644..100755
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -144,7 +144,6 @@ class AnnotationWindow : public FloatingWindow
void Rescale();
- void SetReadonly(bool bSet);
bool IsReadOnly() { return mbReadonly;}
bool IsProtected() { return mbProtected; }
diff --git a/sd/source/ui/app/makefile.mk b/sd/source/ui/app/makefile.mk
index d64d9b672f7e..b0ac26018877 100755
--- a/sd/source/ui/app/makefile.mk
+++ b/sd/source/ui/app/makefile.mk
@@ -73,8 +73,11 @@ SLOFILES = \
$(SLO)$/tmplctrl.obj
EXCEPTIONSFILES= \
+ $(SLO)$/sddll1.obj \
+ $(SLO)$/sddll2.obj \
$(SLO)$/sdxfer.obj \
$(SLO)$/sdmod1.obj \
+ $(SLO)$/tbxww.obj \
$(SLO)$/tmplctrl.obj
.IF "$(GUI)" == "WNT"
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index e3181f792d04..4355da3011c9 100755
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -222,22 +222,6 @@ SdOptionsLayout::SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsLayout::SetDefaults()
-{
- SetRulerVisible( TRUE );
- SetHelplines( TRUE );
- SetHandlesBezier( FALSE );
- SetMoveOutline( TRUE );
- SetDragStripes( FALSE );
- if ( isMetricSystem() )
- SetMetric( FUNIT_CM ); // default for countries with metric system
- else
- SetMetric( FUNIT_INCH ); // default for others
- SetDefTab( 1250 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
{
return( IsRulerVisible() == rOpt.IsRulerVisible() &&
@@ -406,12 +390,6 @@ SdOptionsContents::SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsContents::SetDefaults()
-{
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsContents::operator==(const SdOptionsContents&) const
{
return true;
@@ -459,14 +437,6 @@ BOOL SdOptionsContents::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsContentsItem::SdOptionsContentsItem( USHORT _nWhich )
-: SfxPoolItem ( _nWhich )
-, maOptionsContents ( 0, FALSE )
-{
-}
-
-// ----------------------------------------------------------------------
-
SdOptionsContentsItem::SdOptionsContentsItem(USHORT _nWhich, SdOptions*, ::sd::FrameView*)
: SfxPoolItem ( _nWhich )
, maOptionsContents ( 0, FALSE )
@@ -542,40 +512,6 @@ SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsMisc::SetDefaults()
-{
- SetStartWithTemplate( TRUE );
- SetMarkedHitMovesAlways( TRUE );
- SetMoveOnlyDragging( FALSE );
- SetCrookNoContortion( FALSE );
- SetQuickEdit( GetConfigId() != SDCFG_DRAW );
- SetMasterPagePaintCaching( TRUE );
- SetDragWithCopy( FALSE );
- SetPickThrough( TRUE );
- SetBigHandles( FALSE );
- SetDoubleClickTextEdit( TRUE );
- SetClickChangeRotation( FALSE );
- SetStartWithActualPage( FALSE );
- SetSummationOfParagraphs( FALSE );
- SetSolidDragging( TRUE );
- SetSolidMarkHdl( TRUE );
- // #90356#
- SetShowUndoDeleteWarning( TRUE );
- // The default for 6.1-and-above documents is to use printer-independent
- // formatting.
- SetPrinterIndependentLayout (1);
- // #97016#
- SetDefaultObjectSizeWidth(8000);
- SetDefaultObjectSizeHeight(5000);
- SetPreviewNewEffects(true);
- SetPreviewChangedEffects(false);
- SetPreviewTransitions(true);
- SetDisplay(0);
- SetShowComments(true);
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
{
return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
@@ -909,22 +845,6 @@ SdOptionsSnap::SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsSnap::SetDefaults()
-{
- SetSnapHelplines( TRUE );
- SetSnapBorder( TRUE );
- SetSnapFrame( FALSE );
- SetSnapPoints( FALSE );
- SetOrtho( FALSE );
- SetBigOrtho( TRUE );
- SetRotate( FALSE );
- SetSnapArea( 5 );
- SetAngle( 1500 );
- SetEliminatePolyPointLimitAngle( 1500 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
{
return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
@@ -1098,13 +1018,6 @@ SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsZoom::SetDefaults()
-{
- SetScale( 1, 1 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
{
INT32 nX1, nX2, nY1, nY2;
@@ -1160,63 +1073,6 @@ BOOL SdOptionsZoom::WriteData( Any* pValues ) const
/*************************************************************************
|*
-|* SdOptionsZoomItem
-|*
-\************************************************************************/
-
-SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich )
-: SfxPoolItem ( _nWhich )
-, maOptionsZoom ( 0, FALSE )
-{
-}
-
-// ----------------------------------------------------------------------
-
-SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* )
-: SfxPoolItem ( _nWhich )
-, maOptionsZoom ( 0, FALSE )
-{
- if( pOpts )
- {
- INT32 nX, nY;
-
- pOpts->GetScale( nX, nY );
- maOptionsZoom.SetScale( nX, nY );
- }
-}
-
-// ----------------------------------------------------------------------
-
-SfxPoolItem* SdOptionsZoomItem::Clone( SfxItemPool* ) const
-{
- return new SdOptionsZoomItem( *this );
-}
-
-
-// ----------------------------------------------------------------------
-
-int SdOptionsZoomItem::operator==( const SfxPoolItem& rAttr ) const
-{
- const bool bSameType = SfxPoolItem::operator==(rAttr);
- DBG_ASSERT( bSameType, "SdOptionsZoomItem::operator==(), differen pool item type!" );
- return bSameType && ( maOptionsZoom == static_cast< const SdOptionsZoomItem& >(rAttr).maOptionsZoom );
-}
-
-// -----------------------------------------------------------------------
-
-void SdOptionsZoomItem::SetOptions( SdOptions* pOpts ) const
-{
- if( pOpts )
- {
- INT32 nX, nY;
-
- maOptionsZoom.GetScale( nX, nY );
- pOpts->SetScale( nX, nY );
- }
-}
-
-/*************************************************************************
-|*
|* SdOptionsGrid
|*
\************************************************************************/
@@ -1366,13 +1222,6 @@ BOOL SdOptionsGrid::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich ) :
- SvxGridItem( _nWhich )
-{
-}
-
-// -----------------------------------------------------------------------------
-
SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) :
SvxGridItem( _nWhich )
{
@@ -1458,33 +1307,6 @@ SdOptionsPrint::SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsPrint::SetDefaults()
-{
- SetDraw( TRUE );
- SetNotes( FALSE );
- SetHandout( FALSE );
- SetOutline( FALSE );
- SetDate( FALSE );
- SetTime( FALSE );
- SetPagename( FALSE );
- SetHiddenPages( TRUE );
- SetPagesize( FALSE );
- SetPagetile( FALSE );
- SetWarningPrinter( TRUE );
- SetWarningSize( FALSE );
- SetWarningOrientation( FALSE );
- SetBooklet( FALSE );
- SetFrontPage( TRUE );
- SetBackPage( TRUE );
- SetCutPage( FALSE );
- SetPaperbin( FALSE );
- SetOutputQuality( 0 );
- SetHandoutHorizontal( TRUE );
- SetHandoutPages( 6 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
{
return( IsDraw() == rOpt.IsDraw() &&
@@ -1630,31 +1452,6 @@ BOOL SdOptionsPrint::WriteData( Any* pValues ) const
return TRUE;
}
-void SdOptionsPrint::SetPrinterOptions( const SdOptionsPrint* pOptions )
-{
- bDraw = pOptions->bDraw;
- bNotes = pOptions->bNotes;
- bHandout = pOptions->bHandout;
- bOutline = pOptions->bOutline;
- bDate = pOptions->bDate;
- bTime = pOptions->bTime;
- bPagename = pOptions->bPagename;
- bHiddenPages = pOptions->bHiddenPages;
- bPagesize = pOptions->bPagesize;
- bPagetile = pOptions->bPagetile;
- bWarningPrinter = pOptions->bWarningPrinter;
- bWarningSize = pOptions->bWarningSize;
- bWarningOrientation = pOptions->bWarningOrientation;
- bBooklet = pOptions->bBooklet;
- bFront = pOptions->bFront;
- bBack = pOptions->bBack;
- bCutPage = pOptions->bCutPage;
- bPaperbin = pOptions->bPaperbin;
- nQuality = pOptions->nQuality;
- mnHandoutPages = pOptions->mnHandoutPages;
- mbHandoutHorizontal = pOptions->mbHandoutHorizontal;
-}
-
/*************************************************************************
|*
|* SdOptionsPrintItem
@@ -1766,32 +1563,6 @@ SdOptions::~SdOptions()
// ----------------------------------------------------------------------
-void SdOptions::SetRangeDefaults( ULONG nOptionsRange )
-{
- if( nOptionsRange & SD_OPTIONS_LAYOUT )
- SdOptionsLayout::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_CONTENTS )
- SdOptionsContents::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_MISC )
- SdOptionsMisc::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_SNAP )
- SdOptionsSnap::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_ZOOM )
- SdOptionsZoom::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_GRID )
- SdOptionsGrid::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_PRINT )
- SdOptionsPrint::SetDefaults();
-}
-
-// ----------------------------------------------------------------------
-
void SdOptions::StoreConfig( ULONG nOptionsRange )
{
if( nOptionsRange & SD_OPTIONS_LAYOUT )
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index fb180509cff9..ccbc7c8f5665 100644..100755
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -336,20 +336,3 @@ OutputDevice* SdModule::GetRefDevice (::sd::DrawDocShell& )
{
return GetVirtualRefDevice();
}
-
-
-/*************************************************************************
-|*
-\************************************************************************/
-
-::com::sun::star::text::WritingMode SdModule::GetDefaultWritingMode() const
-{
-/*
- const SvtLanguageOptions aLanguageOptions;
-
- return( aLanguageOptions.IsCTLFontEnabled() ?
- ::com::sun::star::text::WritingMode_RL_TB :
- ::com::sun::star::text::WritingMode_LR_TB );
-*/
- return ::com::sun::star::text::WritingMode_LR_TB;
-}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 9aa36ddd3f82..58aba6823d3a 100644..100755
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -171,9 +171,10 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
::sd::DrawDocShell* pDocShell = NULL;
SdDrawDocument* pDoc = 0;
- if( pInfo->GetOutliner() )
+ SdrOutliner* pSdrOutliner = dynamic_cast< SdrOutliner* >( pInfo->GetOutliner() );
+ if( pSdrOutliner )
{
- const SdrTextObj* pTextObj = static_cast< SdrOutliner* >( pInfo->GetOutliner() )->GetTextObj();
+ const SdrTextObj* pTextObj = pSdrOutliner->GetTextObj();
if( pTextObj )
pDoc = dynamic_cast< SdDrawDocument* >( pTextObj->GetModel() );
diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx
index 7420319ab491..975d277c7dff 100644..100755
--- a/sd/source/ui/dlg/LayerDialogContent.cxx
+++ b/sd/source/ui/dlg/LayerDialogContent.cxx
@@ -86,14 +86,6 @@ LayerDialogContent::~LayerDialogContent (void)
-LayerTabBar& LayerDialogContent::GetLayerTabBar (void)
-{
- return maLayerTabBar;
-}
-
-
-
-
BOOL LayerDialogContent::Close (void)
{
return SfxDockingWindow::Close();
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 95d4277f8f42..7aee12f23bbd 100644..100755
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -96,14 +96,14 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
-::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence (void)
+::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck*/ )
{
::svx::SpellPortions aResult;
if (mpSdOutliner != NULL)
{
ProvideOutliner();
- aResult = mpSdOutliner->GetNextSpellSentence ();
+ aResult = mpSdOutliner->GetNextSpellSentence();
}
// Close the spell check dialog when there are no more sentences to
@@ -125,7 +125,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
void SpellDialogChildWindow::ApplyChangedSentence (
- const ::svx::SpellPortions& rChanged)
+ const ::svx::SpellPortions& rChanged, bool bRecheck )
{
if (mpSdOutliner != NULL)
{
@@ -133,7 +133,7 @@ void SpellDialogChildWindow::ApplyChangedSentence (
if (pOutlinerView != NULL)
mpSdOutliner->ApplyChangedSentence (
pOutlinerView->GetEditView(),
- rChanged, false);
+ rChanged, bRecheck);
}
}
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2ac4801aba0c..e179a0ba9f86 100644..100755
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -691,19 +691,6 @@ void AnimationWindow::ResetAttrs()
// -----------------------------------------------------------------------
-void AnimationWindow::WaitInEffect( ULONG nMilliSeconds ) const
-{
- ULONG nEnd = Time::GetSystemTicks() + nMilliSeconds;
- ULONG nCurrent = Time::GetSystemTicks();
- while (nCurrent < nEnd)
- {
- nCurrent = Time::GetSystemTicks();
- Application::Reschedule();
- }
-}
-
-// -----------------------------------------------------------------------
-
void AnimationWindow::WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
SfxProgress* pProgress ) const
{
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index d398724a3074..1eb3a3d0cedc 100644..100755
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1928,21 +1928,6 @@ SfxObjectShellLock AssistentDlg::GetDocument()
return mpImpl->GetDocument();
}
-String AssistentDlg::GetTopic() const
-{
- return mpImpl->mpPage4AskTopicEDT->GetText();
-}
-
-String AssistentDlg::GetUserName() const
-{
- return mpImpl->mpPage4AskNameEDT->GetText();
-}
-
-String AssistentDlg::GetInformation() const
-{
- return mpImpl->mpPage4AskInfoEDT->GetText();
-}
-
OutputType AssistentDlg::GetOutputMedium() const
{
if(mpImpl->mpPage2Medium1RB->IsChecked())
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index 40bfae16c2a4..f9dcf5046189 100644..100755
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -207,287 +207,3 @@ void SdPageListControl::DataChanged( const DataChangedEvent& rDCEvt )
SvTreeListBox::DataChanged( rDCEvt );
}
-// ====================================================================
-// TemplateCache
-// ====================================================================
-
-// Kennung fuer die Config Datei mit den Cache Daten
-static const UINT16 nMagic = (UINT16)0x4127;
-
-TemplateCacheInfo::TemplateCacheInfo()
-{
- m_bImpress = FALSE;
- m_bValid = FALSE;
- m_bModified = TRUE;
-}
-
-TemplateCacheInfo::TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress )
-{
- m_aFile = rFile;
- m_aDateTime = rDateTime;
- m_bImpress = bImpress;
- m_bValid = FALSE;
- m_bModified = TRUE;
-}
-
-SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo)
-{
- rIn.ReadByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 );
- USHORT nDay, nMonth, nYear;
- rIn >> nDay;
- rIn >> nMonth;
- rIn >> nYear;
- rInfo.m_aDateTime.SetDay( nDay );
- rInfo.m_aDateTime.SetMonth( nMonth );
- rInfo.m_aDateTime.SetYear( nYear);
-
- USHORT nHour, nMin, nSec, n100Sec;
-
- rIn >> nHour;
- rIn >> nMin;
- rIn >> nSec;
- rIn >> n100Sec;
-
- rInfo.m_aDateTime.SetHour( nHour );
- rInfo.m_aDateTime.SetMin( nMin );
- rInfo.m_aDateTime.SetSec( nSec );
- rInfo.m_aDateTime.Set100Sec( n100Sec );
-
- rIn >> rInfo.m_bImpress;
-
- rInfo.m_bModified = FALSE;
-
- return rIn;
-}
-
-SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo)
-{
- USHORT nTemp;
-
- rOut.WriteByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 );
-
- nTemp = rInfo.m_aDateTime.GetDay();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetMonth();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetYear();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetHour();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetMin();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetSec();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.Get100Sec();
- rOut << nTemp;
-
- rOut << rInfo.m_bImpress;
-
- return rOut;
-}
-
-TemplateCache::TemplateCache()
-{
-}
-
-TemplateCache::~TemplateCache()
-{
- Clear();
-}
-
-void TemplateCache::Clear()
-{
- for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- delete pEntry;
- delete pDir;
- }
-}
-
-void TemplateCache::Load()
-{
- INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE ); // Download
- SvStream* pStream = aMedium.GetInStream();
-
- if( !pStream )
- return;
-
- UINT16 aCheck;
- *pStream >> aCheck;
-
- if(aCheck != nMagic)
- return;
-
- UINT16 nDirs;
- *pStream >> nDirs;
-
- for( UINT16 nDir = 0; pStream->GetError() == SVSTREAM_OK && nDir < nDirs; nDir++ )
- {
- TemplateCacheDirEntry* pDir = new TemplateCacheDirEntry();
- m_aDirs.Insert(pDir);
-
- pStream->ReadByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 );
-
- UINT16 nFiles;
- *pStream >> nFiles;
-
- for( UINT16 nFile = 0; pStream->GetError() == SVSTREAM_OK && nFile < nFiles; nFile++ )
- {
- TemplateCacheInfo* pEntry = new TemplateCacheInfo();
- *pStream >> *pEntry;
- pDir->m_aFiles.Insert(pEntry);
- }
- }
-
- if( pStream->GetError() != SVSTREAM_OK )
- {
- // Ein I/O Problem ist doch kein Beinbruch, dann wird der Cache halt neu erzeugt
- Clear();
- }
-}
-
-void TemplateCache::Save()
-{
- INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, FALSE ); // Download
- SvStream* pStream = aMedium.GetInStream();
-
- if( !pStream )
- return;
-
- UINT16 nCheck = nMagic;
- *pStream << nCheck;
-
- const UINT16 nDirs = (UINT16) m_aDirs.Count();
- *pStream << nDirs;
-
- for( TemplateCacheDirEntry* pDir = m_aDirs.First();
- pStream->GetError() == SVSTREAM_OK && pDir;
- pDir = m_aDirs.Next() )
- {
- pStream->WriteByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 );
-
- const UINT16 nFiles = (UINT16) pDir->m_aFiles.Count();
- *pStream << nFiles;
-
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First();
- pStream->GetError() == SVSTREAM_OK && pEntry;
- pEntry = pDir->m_aFiles.Next() )
- {
- *pStream << *pEntry;
- }
- }
-}
-
-TemplateCacheDirEntry* TemplateCache::GetDirEntry( const String& rPath )
-{
- TemplateCacheDirEntry* pDir = m_aDirs.GetCurObject();
- if( pDir && pDir->m_aPath == rPath )
- return pDir;
-
- for( pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- if( pDir->m_aPath == rPath )
- return pDir;
- }
-
- return NULL;
-}
-
-TemplateCacheInfo* TemplateCache::GetFileInfo( const String& rPath )
-{
- INetURLObject aUrl( rPath );
- String aPath( aUrl.GetPath() );
- String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
-
- DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
-
- if( NULL != pDir )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if( pEntry->GetFile() == aName )
- return pEntry;
- }
- }
-
- return NULL;
-}
-
-TemplateCacheInfo* TemplateCache::AddFileInfo( const String& rPath )
-{
- INetURLObject aUrl( rPath );
- String aPath( aUrl.GetPath() );
- String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
-
- DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
- TemplateCacheInfo* pEntry = NULL;
-
- if( pDir == NULL )
- {
- pDir = new TemplateCacheDirEntry();
- pDir->m_aPath = aPath;
- m_aDirs.Insert(pDir);
- }
-
- if( NULL != pDir )
- {
- for( pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if( pEntry->GetFile() == aName)
- return pEntry;
- }
-
- pEntry = new TemplateCacheInfo();
- pEntry->SetFile( aName );
- pDir->m_aFiles.Insert(pEntry);
- }
-
- return pEntry;
-}
-
-BOOL TemplateCache::ClearInvalidEntrys()
-{
- BOOL bModified = FALSE;
-
- for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if(!pEntry->IsValid())
- {
- pDir->m_aFiles.Remove(pEntry);
- delete pEntry;
- bModified = TRUE;
- }
- else if( pEntry->IsModified() )
- {
- bModified = TRUE;
- }
- }
-
- if( pDir->m_aFiles.Count() == 0 )
- {
- m_aDirs.Remove(pDir);
- delete pDir;
- }
- }
-
- return bModified;
-}
-
-
diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx
index dc3e7f636e8d..35bbd41de448 100644..100755
--- a/sd/source/ui/dlg/dlgassim.hxx
+++ b/sd/source/ui/dlg/dlgassim.hxx
@@ -56,37 +56,7 @@ public:
};
-class TemplateCacheInfo
-{
-private:
- DateTime m_aDateTime;
- String m_aFile;
- BOOL m_bImpress;
- BOOL m_bValid;
- BOOL m_bModified;
-
-public:
- TemplateCacheInfo();
- TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress );
-
- BOOL IsValid() const { return m_bValid; }
- void SetValid( BOOL bValid = TRUE ) { m_bValid = bValid; }
-
- BOOL IsImpress() const { return m_bImpress; }
- void SetImpress( BOOL bImpress = TRUE ) { m_bImpress = bImpress; }
-
- const String& GetFile() const { return m_aFile; }
- void SetFile( const String& rFile ) { m_aFile = rFile; }
-
- const DateTime& GetDateTime() const { return m_aDateTime; }
- void SetDateTime( const DateTime& rDateTime ) { m_aDateTime = rDateTime; }
-
- BOOL IsModified() const { return m_bModified; }
- void SetModified( BOOL bModified = TRUE ) { m_bModified = bModified; }
-
- friend SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo);
- friend SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo);
-};
+class TemplateCacheInfo;
DECLARE_LIST( TemplateCacheInfoList, TemplateCacheInfo * )
@@ -98,22 +68,3 @@ public:
};
DECLARE_LIST( TemplateCacheDirEntryList, TemplateCacheDirEntry * )
-
-class TemplateCache
-{
-private:
- TemplateCacheDirEntryList m_aDirs;
- TemplateCacheDirEntry* GetDirEntry( const String& rPath );
- void Clear();
-public:
- TemplateCache();
- ~TemplateCache();
-
- void Load();
- void Save();
-
- TemplateCacheInfo* GetFileInfo( const String& rPath );
- TemplateCacheInfo* AddFileInfo( const String& rPath );
-
- BOOL ClearInvalidEntrys();
-};
diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx
index 14c1209875ef..1a5a612d37ad 100644..100755
--- a/sd/source/ui/dlg/dlgctrls.cxx
+++ b/sd/source/ui/dlg/dlgctrls.cxx
@@ -51,12 +51,6 @@ FadeEffectLB::FadeEffectLB( Window* pParent, SdResId Id )
{
}
-FadeEffectLB::FadeEffectLB( Window* pParent, WinBits aWB )
-: ListBox( pParent, aWB ),
- mpImpl( new FadeEffectLBImpl )
-{
-}
-
FadeEffectLB::~FadeEffectLB()
{
delete mpImpl;
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 2b78a649eaef..6cd220d5a5bc 100644..100755
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -96,27 +96,35 @@ SdSnapLineDlg::SdSnapLineDlg(
DBG_ASSERT( pPool, "Wo ist der Pool?" );
SfxMapUnit ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
- // Hier werden die Max- und MinWerte in Ahaengigkeit von der
+ // #i48497# Consider page origin
+ SdrPageView* pPV = pView->GetSdrPageView();
+ Point aLeftTop(aWorkArea.Left()+1, aWorkArea.Top()+1);
+ pPV->LogicToPagePos(aLeftTop);
+ Point aRightBottom(aWorkArea.Right()-2, aWorkArea.Bottom()-2);
+ pPV->LogicToPagePos(aRightBottom);
+
+ // Hier werden die Max- und MinWerte in Abhaengigkeit von der
// WorkArea, PoolUnit und der FieldUnit:
- SetMetricValue( aMtrFldX, aWorkArea.Left(), ePoolUnit );
+ SetMetricValue( aMtrFldX, aLeftTop.X(), ePoolUnit );
+
long nValue = static_cast<long>(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMin( nValue );
aMtrFldX.SetFirst( nValue );
- SetMetricValue( aMtrFldX, aWorkArea.Right()+1, ePoolUnit );
+ SetMetricValue( aMtrFldX, aRightBottom.X(), ePoolUnit );
nValue = static_cast<long>(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMax( nValue );
aMtrFldX.SetLast( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Top(), ePoolUnit );
+ SetMetricValue( aMtrFldY, aLeftTop.Y(), ePoolUnit );
nValue = static_cast<long>(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMin( nValue );
aMtrFldY.SetFirst( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Bottom()+1, ePoolUnit );
+ SetMetricValue( aMtrFldY, aRightBottom.Y(), ePoolUnit );
nValue = static_cast<long>(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMax( nValue );
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 71a7145425b7..a42ce43a2c6d 100644..100755
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -45,7 +45,6 @@
#include "DrawDocShell.hxx"
#include "ViewShell.hxx"
#include "ViewShellBase.hxx"
-#include "showview.hxx"
#include "drawview.hxx"
#include "sdpage.hxx"
#include "sfx2/viewfrm.hxx"
@@ -81,17 +80,6 @@ SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId )
SetBackground( aEmpty );
}
-SdDocPreviewWin::SdDocPreviewWin( Window* pParent )
-: Control(pParent, 0 ), pMetaFile( 0 ), bInEffect(FALSE), mpObj(NULL), mnShowPage(0)
-{
- SetBorderStyle( WINDOW_BORDER_MONO );
- svtools::ColorConfig aColorConfig;
- Wallpaper aEmpty;
- SetBackground( aEmpty );
- Resize();
- Show();
-}
-
SdDocPreviewWin::~SdDocPreviewWin()
{
delete pMetaFile;
@@ -104,13 +92,6 @@ void SdDocPreviewWin::Resize()
mxSlideShow->resize( GetSizePixel() );
}
-void SdDocPreviewWin::SetGDIFile( GDIMetaFile* pFile )
-{
- delete pMetaFile;
- pMetaFile = pFile;
- Invalidate();
-}
-
void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint )
{
Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 182c70954111..71fad02f24a7 100644..100755
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -69,7 +69,6 @@ private:
using sfx2::FileDialogHelper::Execute;
#endif
- friend class SdExportFileDialog;
friend class SdOpenSoundFileDialog;
css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess;
@@ -95,8 +94,6 @@ public:
// overwritten from FileDialogHelper, to receive user feedback
virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
-
- sal_Bool SelectionBoxState() const;
};
// ------------------------------------------------------------------------
@@ -313,91 +310,6 @@ ErrCode SdFileDialog_Imp::Execute()
return FileDialogHelper::Execute();
}
-// ------------------------------------------------------------------------
-sal_Bool SdFileDialog_Imp::SelectionBoxState() const
-{
- if ( !mbUsableSelection || !mxControlAccess.is() )
- return sal_False;
-
- sal_Bool bState(0);
- try
- {
- mxControlAccess->getValue( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 ) >>= bState;
- }
- catch( css::lang::IllegalArgumentException )
- {
-#ifdef DBG_UTIL
- DBG_ERROR( "Cannot access \"selection\" checkbox" );
-#endif
- }
-
- return bState;
-}
-
-
-// --------------------------------------------------------------------
-// ----------- SdExportFileDialog ---------------------------
-// --------------------------------------------------------------------
-
-// these are simple forwarders
-SdExportFileDialog::SdExportFileDialog(BOOL bHaveCheckbox) :
- mpImpl( new SdFileDialog_Imp( css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION,
- bHaveCheckbox ) )
-{
- // setup filter
- const String aHTMLFilter( SdResId( STR_EXPORT_HTML_NAME ) );
- GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
- const USHORT nFilterCount = pFilter->GetExportFormatCount();
-
- // add HTML filter
- mpImpl->AddFilter( aHTMLFilter, String( SdResId( STR_EXPORT_HTML_FILTER ) ) );
-
- // add other graphic filters
- for ( USHORT i = 0; i < nFilterCount; i++ )
- {
- mpImpl->AddFilter( pFilter->GetExportFormatName( i ),
- pFilter->GetExportWildcard( i ) );
- }
-
- // set dialog title
- mpImpl->SetTitle( String( SdResId( STR_EXPORT_DIALOG_TITLE ) ) );
-}
-
-// ------------------------------------------------------------------------
-SdExportFileDialog::~SdExportFileDialog()
-{
-}
-
-// ------------------------------------------------------------------------
-ErrCode SdExportFileDialog::Execute()
-{
- return mpImpl->Execute();
-}
-
-String SdExportFileDialog::GetPath() const
-{
- return mpImpl->GetPath();
-}
-
-// ------------------------------------------------------------------------
-void SdExportFileDialog::SetPath( const String& rPath )
-{
- mpImpl->SetDisplayDirectory( rPath );
-}
-
-// ------------------------------------------------------------------------
-String SdExportFileDialog::ReqCurrentFilter() const
-{
- return mpImpl->GetCurrentFilter();
-}
-
-// ------------------------------------------------------------------------
-BOOL SdExportFileDialog::IsExportSelection() const
-{
- return mpImpl->SelectionBoxState();
-}
-
-
// --------------------------------------------------------------------
// ----------- SdOpenSoundFileDialog -----------------------
// --------------------------------------------------------------------
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 294e61f3fe40..b48a1682bba6 100644..100755
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -291,12 +291,6 @@ HeaderFooterDialog::~HeaderFooterDialog()
// -----------------------------------------------------------------------
-void HeaderFooterDialog::initTabPages()
-{
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
const USHORT nId = pTabCtrl->GetCurPageId();
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index f16e90dd7791..5d260367f383 100644..100755
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -142,7 +142,6 @@ List* SdInsertPagesObjsDlg::GetList( USHORT nType )
// wird das gesamte Dokument (und nicht mehr!) eingefuegt.
if( aLbTree.GetSelectionCount() == 0 ||
( aLbTree.IsSelected( aLbTree.First() ) ) )
- //return( aLbTree.GetBookmarkList( nType ) );
return( NULL ); // #37350#
}
return( aLbTree.GetSelectEntryList( nType ) );
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index ea7a702e539e..3c9aad38c332 100644..100755
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -41,15 +41,6 @@
#include "app.hrc"
#include <svl/intitem.hxx>
#include <sfx2/request.hxx>
-// STATIC DATA -----------------------------------------------------------
-
-static USHORT pPrintOptRanges[] =
-{
- ATTR_OPTIONS_PRINT,
- ATTR_OPTIONS_PRINT,
- 0
-};
-
/*************************************************************************
|*
@@ -236,13 +227,6 @@ SfxTabPage* SdPrintOptions::Create( Window* pWindow,
//-----------------------------------------------------------------------
-USHORT* SdPrintOptions::GetRanges()
-{
- return pPrintOptRanges;
-}
-
-//-----------------------------------------------------------------------
-
IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx )
{
// there must be at least one of them checked
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index e6fa5df0de04..275d39af4ea5 100755
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -731,61 +731,6 @@ List* SdPageObjsTLB::GetSelectEntryList( USHORT nDepth )
/*************************************************************************
|*
-|* Alle Pages (und Objekte) des Docs zurueckgeben
-|* nType == 0 -> Seiten
-|* nType == 1 -> Objekte
-|*
-\************************************************************************/
-
-List* SdPageObjsTLB::GetBookmarkList( USHORT nType )
-{
- List* pList = NULL;
-
- if( GetBookmarkDoc() )
- {
- SdPage* pPage = NULL;
- String* pName = NULL;
- USHORT nPage = 0;
- const USHORT nMaxPages = mpBookmarkDoc->GetSdPageCount( PK_STANDARD );
-
- while( nPage < nMaxPages )
- {
- pPage = mpBookmarkDoc->GetSdPage( nPage, PK_STANDARD );
-
- if( nType == 0 ) // Seitennamen einfuegen
- {
- if( !pList )
- pList = new List();
-
- pName = new String( pPage->GetRealName() );
- pList->Insert( pName, LIST_APPEND );
- }
- else // Objektnamen einfuegen
- {
- // Ueber Objekte der Seite iterieren
- SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
- while( aIter.IsMore() )
- {
- SdrObject* pObj = aIter.Next();
- String aStr( GetObjectName( pObj ) );
- if( aStr.Len() )
- {
- if( !pList )
- pList = new List();
-
- pName = new String( aStr );
- pList->Insert( pName, LIST_APPEND );
- }
- }
- }
- nPage++;
- }
- }
- return( pList );
-}
-
-/*************************************************************************
-|*
|* Eintraege werden erst auf Anforderung (Doppelklick) eingefuegt
|*
\************************************************************************/
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index ebe0243f7d99..af2668fc9dad 100644..100755
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -86,15 +86,6 @@ using namespace ::com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-static USHORT pActionRanges[] =
-{
- ATTR_ANIMATION_TRANSPCOLOR,
- ATTR_ANIMATION_TRANSPCOLOR,
- ATTR_ACTION_START,
- ATTR_ACTION_END,
- 0
-};
-
#define DOCUMENT_TOKEN (sal_Unicode('#'))
/*************************************************************************
@@ -423,13 +414,6 @@ SfxTabPage* SdTPAction::Create( Window* pWindow,
//------------------------------------------------------------------------
-USHORT* SdTPAction::GetRanges()
-{
- return( pActionRanges );
-}
-
-//------------------------------------------------------------------------
-
void SdTPAction::UpdateTree()
{
if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
@@ -849,35 +833,6 @@ void SdTPAction::SetEditText( String const & rStr )
}
}
-String SdTPAction::GetMacroName( const String& rMacroPath )
-{
- String result = rMacroPath;
-
- // try to get name by parsing the macro path
- // using the new URI parsing services
-
- Reference< XMultiServiceFactory > xSMgr =
- ::comphelper::getProcessServiceFactory();
-
- Reference< com::sun::star::uri::XUriReferenceFactory >
- xFactory( xSMgr->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY );
-
- if ( xFactory.is() )
- {
- Reference< com::sun::star::uri::XVndSunStarScriptUrl >
- xUrl( xFactory->parse( rMacroPath ), UNO_QUERY );
-
- if ( xUrl.is() )
- {
- result = xUrl->getName();
- }
- }
-
- return result;
-}
-
//------------------------------------------------------------------------
String SdTPAction::GetEditText( BOOL bFullDocDestination )
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 29218a7b985a..a033661e7c85 100644..100755
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -312,18 +312,6 @@ BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::
|*
\************************************************************************/
-sal_Bool DrawDocShell::IsNewDocument() const
-{
- return( mbNewDocument &&
- ( !GetMedium() || GetMedium()->GetURLObject().GetProtocol() == INET_PROT_NOT_VALID ) );
-}
-
-/*************************************************************************
-|*
-|* Load: Pools und Dokument laden
-|*
-\************************************************************************/
-
BOOL DrawDocShell::Load( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index f284651b91e5..78b1b9434ad0 100644..100755
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -548,21 +548,6 @@ void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ )
}
}
-::Window* DrawDocShell::GetWindow() const
-{
- SfxViewFrame* pFrame = GetFrame();
- if( pFrame == NULL )
- pFrame = SfxViewFrame::GetFirst( this );
-
- if( pFrame )
- return &(pFrame->GetWindow());
- else
- {
- DBG_ASSERT( 0, "No active window for DrawDocShell found! (next gpf is caused by this assertion)" );
- return NULL;
- }
-}
-
/*************************************************************************
|*
|* Callback fuer ExecuteSpellPopup()
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
index c8256bc2c0a6..55e22361ad3a 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
@@ -87,15 +87,12 @@ const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC2m
-
const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC1andC2 (void) const
{
return maC1andC2;
}
-
-
void ConfigurationClassifier::PartitionResources (
const ::com::sun::star::uno::Sequence<Reference<XResourceId> >& rS1,
const ::com::sun::star::uno::Sequence<Reference<XResourceId> >& rS2)
@@ -222,8 +219,6 @@ void ConfigurationClassifier::CopyResources (
}
-
-
void ConfigurationClassifier::TraceResourceIdVector (
const sal_Char* pMessage,
const ResourceIdVector& rResources) const
@@ -240,6 +235,4 @@ void ConfigurationClassifier::TraceResourceIdVector (
}
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index a33bfdcda268..2f846e50be25 100755
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -101,8 +101,6 @@ public:
const Reference<frame::XController>& rxController);
~Implementation (void);
- void Initialize (const Reference<frame::XController>& rxController);
-
Reference<XControllerManager> mxControllerManager;
/** The Broadcaster class implements storing and calling of listeners.
@@ -119,8 +117,6 @@ public:
ViewShellBase* mpBase;
- bool mbIsInitialized;
-
::boost::shared_ptr<ResourceFactoryManager> mpResourceFactoryContainer;
::boost::shared_ptr<ConfigurationControllerResourceManager> mpResourceManager;
@@ -705,7 +701,6 @@ ConfigurationController::Implementation::Implementation (
mpBroadcaster(new ConfigurationControllerBroadcaster(&rController)),
mxRequestedConfiguration(new Configuration(&rController, true)),
mpBase(NULL),
- mbIsInitialized(false),
mpResourceFactoryContainer(new ResourceFactoryManager(mxControllerManager)),
mpResourceManager(
new ConfigurationControllerResourceManager(mpResourceFactoryContainer,mpBroadcaster)),
@@ -721,27 +716,6 @@ ConfigurationController::Implementation::Implementation (
-void ConfigurationController::Implementation::Initialize (
- const Reference<frame::XController>& rxController)
-{
- mxControllerManager = Reference<XControllerManager>(rxController, UNO_QUERY_THROW);
-
- mpConfigurationUpdater->SetControllerManager(mxControllerManager);
-
- // Tunnel through the controller to obtain a ViewShellBase.
- Reference<lang::XUnoTunnel> xTunnel (rxController, UNO_QUERY_THROW);
- if (xTunnel.is())
- {
- ::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
- xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
- mpBase = pController->GetViewShellBase();
- }
-}
-
-
-
-
ConfigurationController::Implementation::~Implementation (void)
{
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
index 498f0670542e..b9552940060e 100755
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
@@ -60,12 +60,12 @@ void ConfigurationTracer::TraceConfiguration (
+#ifdef DEBUG
void ConfigurationTracer::TraceBoundResources (
const Reference<XConfiguration>& rxConfiguration,
const Reference<XResourceId>& rxResourceId,
const int nIndentation)
{
-#ifdef DEBUG
Sequence<Reference<XResourceId> > aResourceList (
rxConfiguration->getResources(rxResourceId, ::rtl::OUString(), AnchorBindingMode_DIRECT));
const ::rtl::OUString sIndentation (::rtl::OUString::createFromAscii(" "));
@@ -77,11 +77,7 @@ void ConfigurationTracer::TraceBoundResources (
OSL_TRACE("%s", OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr());
TraceBoundResources(rxConfiguration, aResourceList[nIndex], nIndentation+1);
}
-#else
- (void)rxConfiguration;
- (void)rxResourceId;
- (void)nIndentation;
-#endif
}
+#endif
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
index 8a789a051584..b04206fd65e1 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
@@ -32,7 +32,6 @@
namespace sd { namespace framework {
-
/** Print debug information about configurations to the standard error
output channel.
*/
@@ -43,13 +42,14 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration,
const char* pMessage);
-
+#ifdef DEBUG
static void TraceBoundResources (
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration,
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XResourceId>& rxResourceId,
const int nIndentation);
+#endif
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index aa8aca5a5ffd..4ab361a9490d 100755
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -163,14 +163,6 @@ Reference<XConfiguration> ConfigurationUpdater::GetCurrentConfiguration (void) c
-Reference<XConfiguration> ConfigurationUpdater::GetRequestedConfiguration (void) const
-{
- return mxRequestedConfiguration;
-}
-
-
-
-
bool ConfigurationUpdater::IsUpdatePossible (void)
{
return ! mbUpdateBeingProcessed
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
index 87c92be5e5c4..a9f3e09f2a64 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
@@ -84,9 +84,6 @@ public:
css::uno::Reference<
css::drawing::framework::XConfiguration> GetCurrentConfiguration (void) const;
- css::uno::Reference<
- css::drawing::framework::XConfiguration> GetRequestedConfiguration (void) const;
-
friend class ConfigurationUpdaterLock;
/** Return a lock of the called ConfigurationUpdater. While the
returned object exists no update of the current configuration is
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx
index 32894411547a..15d7c3a6f4ec 100644..100755
--- a/sd/source/ui/framework/configuration/ResourceId.cxx
+++ b/sd/source/ui/framework/configuration/ResourceId.cxx
@@ -592,17 +592,6 @@ bool ResourceId::IsBoundToAnchor (
-bool ResourceId::IsValid (void) const
-{
- return maResourceURLs.size() == 0
- || maResourceURLs[0].getLength()>0
- || maResourceURLs.size() == 1;
-
-}
-
-
-
-
void ResourceId::ParseResourceURL (void)
{
::osl::Guard< ::osl::Mutex > aGuard (::osl::Mutex::getGlobalMutex());
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index d6f60506c62f..f406501bd114 100755
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -552,32 +552,6 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
return xPane;
}
-
-
-
-bool BasicPaneFactory::IsBoundToChildWindow (const Reference<XResourceId>& rxResourceId) const
-{
- if ( ! rxResourceId.is())
- return false;
-
- Reference<XResourceId> xAnchorId (rxResourceId->getAnchor());
- if ( ! xAnchorId.is())
- return false;
-
- const OUString sAnchorURL (xAnchorId->getResourceURL());
- if (sAnchorURL == FrameworkHelper::msLeftImpressPaneURL)
- return true;
- else if (sAnchorURL == FrameworkHelper::msLeftDrawPaneURL)
- return true;
- else if (sAnchorURL == FrameworkHelper::msRightPaneURL)
- return true;
- else
- return false;
-}
-
-
-
-
void BasicPaneFactory::ThrowIfDisposed (void) const
throw (lang::DisposedException)
{
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
index bceeae60003a..9b41866180fc 100755
--- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
@@ -159,12 +159,6 @@ private:
css::drawing::framework::XResourceId>& rxPaneId,
const PaneDescriptor& rDescriptor);
- /** Return <TRUE/> when the specified resource is bound to one of the
- child windows.
- */
- bool IsBoundToChildWindow (
- const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId) const;
-
void ThrowIfDisposed (void) const
throw (css::lang::DisposedException);
};
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
index 1cd156817afc..d7c45ceb803b 100755
--- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
@@ -284,23 +284,6 @@ void SAL_CALL TaskPanelFactory::releaseResource (
-//=============================================================================
-
-void TaskPanelFactory::ThrowIfDisposed (void) const
- throw (lang::DisposedException)
-{
- if (rBHelper.bDisposed || rBHelper.bInDispose)
- {
- throw lang::DisposedException (
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "TaskPanelFactory object has already been disposed")),
- const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
- }
-}
-
-
-
-
//===== ToolPanelResource =====================================================
namespace {
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.hxx b/sd/source/ui/framework/factories/TaskPanelFactory.hxx
index 1ab2fa783a4a..086788a6763e 100755
--- a/sd/source/ui/framework/factories/TaskPanelFactory.hxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.hxx
@@ -89,8 +89,6 @@ public:
private:
ViewShellBase* mpViewShellBase;
-
- void ThrowIfDisposed (void) const throw (css::lang::DisposedException);
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
index cf9b095072b1..090247e7f68c 100644..100755
--- a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
+++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
@@ -145,17 +145,6 @@ void ReadOnlyModeObserver::AddStatusListener (
-void ReadOnlyModeObserver::RemoveStatusListener (
- const Reference<frame::XStatusListener>& rxListener)
-{
- mpBroadcaster->removeListener(
- getCppuType((Reference<frame::XStatusListener>*)NULL),
- rxListener);
-}
-
-
-
-
bool ReadOnlyModeObserver::ConnectToDispatch (void)
{
if ( ! mxDispatch.is())
diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
index f01649bdf8bd..d783d6d83abf 100644..100755
--- a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
+++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
@@ -91,12 +91,6 @@ public:
const ::com::sun::star::uno::Reference<
com::sun::star::frame::XStatusListener>& rxListener);
- /** Remove the given listener.
- */
- void RemoveStatusListener (
- const ::com::sun::star::uno::Reference<
- com::sun::star::frame::XStatusListener>& rxListener);
-
// XEventListener
virtual void SAL_CALL disposing (
diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx
index 8f79ed41f24b..fcd90ca6454b 100644..100755
--- a/sd/source/ui/framework/module/ResourceManager.cxx
+++ b/sd/source/ui/framework/module/ResourceManager.cxx
@@ -291,25 +291,4 @@ void SAL_CALL ResourceManager::disposing (
}
}
-
-
-
-void ResourceManager::Trace (void) const
-{
- OSL_TRACE("main views with resource %s:",
- ::rtl::OUStringToOString(
- FrameworkHelper::ResourceIdToString(mxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-
- MainViewContainer::const_iterator iDescriptor;
- for (iDescriptor=mpActiveMainViewContainer->begin();
- iDescriptor!=mpActiveMainViewContainer->end();
- ++iDescriptor)
- {
- OSL_TRACE(" %s",
- ::rtl::OUStringToOString(*iDescriptor, RTL_TEXTENCODING_UTF8).getStr());
- }
-}
-
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx
index 23cb1ed7dd48..d00ee78c2de3 100644..100755
--- a/sd/source/ui/framework/module/ResourceManager.hxx
+++ b/sd/source/ui/framework/module/ResourceManager.hxx
@@ -126,8 +126,6 @@ private:
const ::com::sun::star::uno::Reference<
com::sun::star::drawing::framework::XConfiguration>& rxConfiguration);
void UpdateForMainViewShell (void);
-
- void Trace (void) const;
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 8c63a6871483..078f86a88d86 100755
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -1002,28 +1002,6 @@ void SAL_CALL FrameworkHelper::DisposeListener::disposing (const lang::EventObje
-//----- DispatchCaller --------------------------------------------------------
-
-DispatchCaller::DispatchCaller (
- SfxDispatcher& rDispatcher,
- USHORT nSId)
- : mrDispatcher(rDispatcher),
- mnSId(nSId)
-{
-}
-
-
-
-
-void DispatchCaller::operator() (bool bEventSeen)
-{
- (void)bEventSeen;
- mrDispatcher.Execute(mnSId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
-}
-
-
-
-
//===== FrameworkHelperResourceIdFilter =======================================
FrameworkHelperResourceIdFilter::FrameworkHelperResourceIdFilter (
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 26119b6a03b9..c0d8235e97fb 100644..100755
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -72,13 +72,6 @@ FuConstruct::FuConstruct (
{
}
-FunctionReference FuConstruct::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuConstruct( pViewSh, pWin, pView, pDoc, rReq ) );
- xFunc->DoExecute(rReq);
- return xFunc;
-}
-
void FuConstruct::DoExecute( SfxRequest& rReq )
{
FuDraw::DoExecute( rReq );
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index bbe13c114931..5cc3cc49ca88 100644..100755
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -99,14 +99,6 @@ FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
{
}
-FunctionReference FuDraw::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent )
-{
- FuDraw* pFunc;
- FunctionReference xFunc( pFunc = new FuDraw( pViewSh, pWin, pView, pDoc, rReq ) );
- pFunc->SetPermanent(bPermanent);
- return xFunc;
-}
-
/*************************************************************************
|*
|* Destruktor
diff --git a/sd/source/ui/func/fuoutl.cxx b/sd/source/ui/func/fuoutl.cxx
index 2bb056f55e42..c0ef53f144b3 100644..100755
--- a/sd/source/ui/func/fuoutl.cxx
+++ b/sd/source/ui/func/fuoutl.cxx
@@ -60,12 +60,6 @@ FuOutline::FuOutline (
{
}
-FunctionReference FuOutline::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuOutline( pViewSh, pWin, pView, pDoc, rReq ) );
- return xFunc;
-}
-
/*************************************************************************
|*
|* Command, weiterleiten an OutlinerView
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index c1df44e52677..0342c5f2bbc5 100644..100755
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -247,16 +247,6 @@ IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
/*************************************************************************
|*
-|* String in Applikations-Statuszeile ausgeben
-|*
-\************************************************************************/
-
-void FuPoor::WriteStatus(const String& )
-{
-}
-
-/*************************************************************************
-|*
|* Tastaturereignisse bearbeiten
|*
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
@@ -1121,18 +1111,6 @@ void FuPoor::StartDelayToScrollTimer ()
/*************************************************************************
|*
-|* Handler fuer Maustaste
-|*
-\************************************************************************/
-
-long FuPoor::diffPoint (long pos1, long pos2)
-{
- return (pos1 > pos2) ? pos1 - pos2
- : pos2 - pos1;
-}
-
-/*************************************************************************
-|*
|* Help-event
|*
\************************************************************************/
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index 82007fe61893..04fcf124cc14 100644..100755
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -38,7 +38,6 @@
#include <svx/srchdlg.hxx>
#include <sfx2/bindings.hxx>
#include "fupoor.hxx"
-#include "fuspell.hxx" // wegen SidArraySpell[]
#ifndef SD_WINDOW_SHELL_HXX
#include "Window.hxx"
#endif
@@ -55,6 +54,14 @@ class SfxRequest;
namespace sd {
+static USHORT SidArraySpell[] = {
+ SID_DRAWINGMODE,
+ SID_OUTLINEMODE,
+ SID_DIAMODE,
+ SID_NOTESMODE,
+ SID_HANDOUTMODE,
+ 0 };
+
TYPEINIT1( FuSearch, FuPoor );
/*************************************************************************
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index ab686481b402..fad1cb324fd2 100644..100755
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -123,6 +123,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
{
OSL_ASSERT(pPV!=NULL);
aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
+ pPV->LogicToPagePos(aLinePos);
bLineExist = true;
}
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
diff --git a/sd/source/ui/func/fuspell.cxx b/sd/source/ui/func/fuspell.cxx
deleted file mode 100644
index 526efb0087e4..000000000000
--- a/sd/source/ui/func/fuspell.cxx
+++ /dev/null
@@ -1,166 +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_sd.hxx"
-
-
-#include "fuspell.hxx"
-
-#include <editeng/outliner.hxx>
-#include <sfx2/bindings.hxx>
-
-#include <sfx2/viewfrm.hxx>
-#include "fupoor.hxx"
-#include "Outliner.hxx"
-#include "drawdoc.hxx"
-#include "DrawViewShell.hxx"
-#include "OutlineViewShell.hxx"
-#include "ViewShellBase.hxx"
-
-#include "app.hrc"
-
-class SfxRequest;
-
-namespace sd {
-
-USHORT SidArraySpell[] = {
- SID_DRAWINGMODE,
- SID_OUTLINEMODE,
- SID_DIAMODE,
- SID_NOTESMODE,
- SID_HANDOUTMODE,
- 0 };
-
-TYPEINIT1( FuSpell, FuPoor );
-
-/*************************************************************************
-|*
-|* Konstruktor
-|*
-\************************************************************************/
-
-FuSpell::FuSpell (
- ViewShell* pViewSh,
- ::sd::Window* pWin,
- ::sd::View* pView,
- SdDrawDocument* pDoc,
- SfxRequest& rReq )
- : FuPoor(pViewSh, pWin, pView, pDoc, rReq),
- pSdOutliner(NULL),
- bOwnOutliner(FALSE)
-{
-}
-
-FunctionReference FuSpell::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuSpell( pViewSh, pWin, pView, pDoc, rReq ) );
- xFunc->DoExecute(rReq);
- return xFunc;
-}
-
-void FuSpell::DoExecute( SfxRequest& )
-{
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
-
- if ( mpViewShell->ISA(DrawViewShell) )
- {
- bOwnOutliner = TRUE;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
- }
- else if ( mpViewShell->ISA(OutlineViewShell) )
- {
- bOwnOutliner = FALSE;
- pSdOutliner = mpDoc->GetOutliner();
- }
-
- if (pSdOutliner)
- pSdOutliner->PrepareSpelling();
-}
-
-
-
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
-
-FuSpell::~FuSpell()
-{
- mpDocSh->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
-
- if (pSdOutliner)
- pSdOutliner->EndSpelling();
-
- if (bOwnOutliner)
- delete pSdOutliner;
-}
-
-/*************************************************************************
-|*
-|* Pruefung starten
-|*
-\************************************************************************/
-
-void FuSpell::StartSpelling()
-{
- // Get current main view shell.
- ViewShellBase* pBase (ViewShellBase::GetViewShellBase (
- mpDocSh->GetViewShell()->GetViewFrame()));
- if (pBase != NULL)
- mpViewShell = pBase->GetMainViewShell().get();
- else
- mpViewShell = NULL;
- if (mpViewShell != NULL)
- {
- if ( pSdOutliner && mpViewShell->ISA(DrawViewShell) && !bOwnOutliner )
- {
- pSdOutliner->EndSpelling();
-
- bOwnOutliner = TRUE;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
- pSdOutliner->PrepareSpelling();
- }
- else if ( pSdOutliner && mpViewShell->ISA(OutlineViewShell) && bOwnOutliner )
- {
- pSdOutliner->EndSpelling();
- delete pSdOutliner;
-
- bOwnOutliner = FALSE;
- pSdOutliner = mpDoc->GetOutliner();
- pSdOutliner->PrepareSpelling();
- }
-
- if (pSdOutliner)
- pSdOutliner->StartSpelling();
- }
-}
-
-
-
-} // end of namespace sd
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index f62b1b087aee..31797f3c8a03 100644..100755
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -136,29 +136,4 @@ void FuTransform::DoExecute( SfxRequest& rReq )
}
}
-/*************************************************************************
-|*
-|* Function ResizeObject
-|*
-\************************************************************************/
-
-Point FuTransform::GetPoint( Rectangle aRect, RECT_POINT eRP )
-{
-
- switch( eRP )
- {
- case RP_LT: return( Point( aRect.Left(), aRect.Top() ) );
- case RP_MT: return( Point( aRect.Center().X(), aRect.Top() ) );
- case RP_RT: return( Point( aRect.Right(), aRect.Top() ) );
- case RP_LM: return( Point( aRect.Left(), aRect.Center().Y() ) );
- case RP_MM: return( Point( aRect.Center().X(), aRect.Center().Y() ) );
- case RP_RM: return( Point( aRect.Right(), aRect.Center().Y() ) );
- case RP_LB: return( Point( aRect.Left(), aRect.Bottom() ) );
- case RP_MB: return( Point( aRect.Center().X(), aRect.Bottom() ) );
- case RP_RB: return( Point( aRect.Right(), aRect.Bottom() ) );
- }
- return( Point ( 0, 0 ) ); // Sollte nicht vorkommen !
-}
-
-
} // end of namespace sd
diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk
index 9ec946325239..e4df8fe9d65a 100644..100755
--- a/sd/source/ui/func/makefile.mk
+++ b/sd/source/ui/func/makefile.mk
@@ -84,7 +84,6 @@ SLOFILES = \
$(SLO)$/fuolbull.obj \
$(SLO)$/fucopy.obj \
$(SLO)$/fulink.obj \
- $(SLO)$/fuspell.obj \
$(SLO)$/futhes.obj \
$(SLO)$/fusearch.obj \
$(SLO)$/fuinsfil.obj \
@@ -98,7 +97,6 @@ SLOFILES = \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
- $(SLO)$/outlinfo.obj \
$(SLO)$/fucushow.obj \
$(SLO)$/fuvect.obj \
$(SLO)$/bulmaper.obj \
@@ -159,7 +157,6 @@ LIB3OBJFILES= \
$(SLO)$/fuolbull.obj \
$(SLO)$/fucopy.obj \
$(SLO)$/fulink.obj \
- $(SLO)$/fuspell.obj \
$(SLO)$/futhes.obj \
$(SLO)$/fusearch.obj \
$(SLO)$/fuinsfil.obj \
@@ -173,7 +170,6 @@ LIB3OBJFILES= \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
- $(SLO)$/outlinfo.obj \
$(SLO)$/fucushow.obj \
$(SLO)$/fuvect.obj \
$(SLO)$/bulmaper.obj \
diff --git a/sd/source/ui/func/outlinfo.cxx b/sd/source/ui/func/outlinfo.cxx
deleted file mode 100644
index 0a52da329b20..000000000000
--- a/sd/source/ui/func/outlinfo.cxx
+++ /dev/null
@@ -1,301 +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_sd.hxx"
-
-#include <vcl/metric.hxx>
-#include <editeng/outliner.hxx>
-#include <svx/svdorect.hxx>
-#include <svx/svdoutl.hxx>
-#include <editeng/svxfont.hxx>
-#include "drawdoc.hxx"
-#include "outlinfo.hxx"
-#include <algorithm>
-
-// #101500#
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
-#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <comphelper/processfactory.hxx>
-
-#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_
-#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
-#endif
-#include <editeng/unolingu.hxx>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::i18n;
-
-// ----------------
-// - OutlinerInfo -
-// ----------------
-
-OutlinerInfo::OutlinerInfo() :
- pParagraphs ( NULL ),
- nParaCount ( 0UL ),
- nExtraData ( 0L )
-{
-}
-
-// -----------------------------------------------------------------------------
-
-OutlinerInfo::~OutlinerInfo()
-{
- Clear();
-}
-
-// -----------------------------------------------------------------------------
-
-void OutlinerInfo::SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* pOut )
-{
- Clear();
-
- SdrOutliner& rOutliner = pDoc->GetDrawOutliner();
-
- mpOut = pOut;
- rOutliner.SetText( *pObj->GetOutlinerParaObject() );
-
- aObjBound = pObj->GetCurrentBoundRect();
- nParaCount = rOutliner.GetParagraphCount();
- nExtraData = 0L;
-
- if( nParaCount )
- {
- mbVertical = rOutliner.IsVertical();
- pObj->TakeTextRect( rOutliner, aParaBound, TRUE );
-
- if( IsVertical() )
- aTextOffset = aParaBound.TopRight();
- else
- aTextOffset = aParaBound.TopLeft();
-
- nCurPara = 0;
- bInit = TRUE;
-
- rOutliner.SetDrawPortionHdl( LINK( this, OutlinerInfo, DrawPortionHdl ) );
- pParagraphs = new OutlinerParagraph[ nParaCount ];
- rOutliner.StripPortions();
- rOutliner.SetDrawPortionHdl( Link() );
-
- if( 1 == nParaCount )
- pParagraphs[ 0 ].aRect = aParaBound;
- else if( IsVertical() )
- {
- pParagraphs[ 0 ].aRect.Right() = aParaBound.Right();
-
- for( USHORT i = 0; i < nParaCount; i++ )
- {
- if( i > 0 )
- pParagraphs[i].aRect.Right() = pParagraphs[ i - 1 ].aRect.Left();
-
- pParagraphs[i].aRect.Left() = pParagraphs[i].aRect.Right() - rOutliner.GetTextHeight( i );
- }
- }
- else
- {
- pParagraphs[ 0 ].aRect.Top() = aParaBound.Top();
-
- for( USHORT i = 0; i < nParaCount; i++ )
- {
- if( i > 0 )
- pParagraphs[ i ].aRect.Top() = pParagraphs[ i - 1 ].aRect.Bottom();
-
- pParagraphs[ i ].aRect.Bottom() = pParagraphs[ i ].aRect.Top() + rOutliner.GetTextHeight( i );
- }
- }
- }
- else
- {
- pParagraphs = NULL;
- aParaBound = Rectangle();
- aTextOffset = Point();
- }
-
- nCurPara = 0;
- bInit = FALSE;
-}
-
-// -----------------------------------------------------------------------------
-
-void OutlinerInfo::Clear()
-{
- for( void* pChar = aCharacterList.First(); pChar; pChar = aCharacterList.Next() )
- delete (OutlinerCharacter*) pChar;
- aCharacterList.Clear();
-
- delete[] pParagraphs;
- pParagraphs = NULL;
-
- nCurPara = nParaCount = 0UL;
- aObjBound = aParaBound = Rectangle();
- aTextOffset = Point();
-}
-
-// -----------------------------------------------------------------------------
-
-const Rectangle& OutlinerInfo::GetParaRect( const ULONG nPara ) const
-{
- DBG_ASSERT( nPara < nParaCount, "Para out of range!" );
- return pParagraphs[ nPara ].aRect;
-}
-
-// -----------------------------------------------------------------------------
-
-BOOL OutlinerInfo::GetParaCharCount( const ULONG nPara ) const
-{
- DBG_ASSERT( nPara < nParaCount, "Para out of range!" );
- return (0 != pParagraphs[ nPara ].nCharCount);
-}
-
-// -----------------------------------------------------------------------------
-
-IMPL_LINK(OutlinerInfo, DrawPortionHdl, DrawPortionInfo*, pInfo)
-{
- // #101500#
- Point aStart;
- sal_Bool bIsVertical(IsVertical());
- mpOut->SetFont((const Font&)pInfo->mrFont);
- FontMetric aFontMetric(mpOut->GetFontMetric());
- sal_Bool bUseBreakIterator(sal_False);
-
- // initialize BreakIterator
- Reference < com::sun::star::i18n::XBreakIterator > xBreak;
- Reference < XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"));
- ::com::sun::star::lang::Locale aFontLocale = SvxCreateLocale(pInfo->mrFont.GetLanguage());
-
- if(xInterface.is())
- {
- Any x = xInterface->queryInterface(::getCppuType((const Reference< XBreakIterator >*)0));
- x >>= xBreak;
- }
-
- if(xBreak.is())
- {
- bUseBreakIterator = sal_True;
- }
-
- if(bIsVertical)
- {
- aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X() - aFontMetric.GetDescent();
- aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y();
-
- const Point aTopLeft(aStart.X(), aParaBound.Top());
- const Point aBottomRight(aStart.X() + aFontMetric.GetLineHeight(), aParaBound.Bottom());
- const Rectangle aCurRect(aTopLeft, aBottomRight);
-
- if(pInfo->mnPara != nCurPara)
- {
- nCurPara = pInfo->mnPara;
- pParagraphs[nCurPara].aRect = aCurRect;
- }
- else
- {
- pParagraphs[nCurPara].aRect.Union(aCurRect);
- }
- }
- else
- {
- aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X();
- aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y() - aFontMetric.GetAscent();
-
- const Point aTopLeft(aParaBound.Left(), aStart.Y());
- const Point aBottomRight(aParaBound.Right(), aStart.Y() + aFontMetric.GetLineHeight());
- const Rectangle aCurRect(aTopLeft, aBottomRight);
-
- if(pInfo->mnPara != nCurPara)
- {
- nCurPara = pInfo->mnPara;
- pParagraphs[nCurPara].aRect = aCurRect;
- }
- else
- {
- pParagraphs[nCurPara].aRect.Union(aCurRect);
- }
- }
-
- if(pInfo->mnTextLen && (0xFFFF != pInfo->mnIndex))
- {
- pParagraphs[nCurPara].nCharCount += pInfo->mnTextLen;
- sal_uInt16 nInsertIndex(0xffff);
-
- if(pInfo->IsRTL())
- nInsertIndex = (sal_uInt16)aCharacterList.Count();
-
- for(sal_uInt16 nCharIndex(0); nCharIndex < pInfo->mnTextLen; )
- {
- xub_StrLen nNextGlyphLen(1);
- sal_Bool bIsSingleSpace(sal_False);
-
- if(bUseBreakIterator)
- {
- sal_Int32 nDone(0L);
- nNextGlyphLen = (xub_StrLen)xBreak->nextCharacters( pInfo->mrText, pInfo->mnTextStart, aFontLocale,
- CharacterIteratorMode::SKIPCELL, 1, nDone) - (pInfo->mnTextStart);
- }
-
- if(!bIsSingleSpace)
- {
- Size aGlyphSize(pInfo->mrFont.GetPhysTxtSize(mpOut,
- pInfo->mrText, nCharIndex + pInfo->mnTextStart, nNextGlyphLen));
-
- if(bIsVertical)
- {
- ::std::swap(aGlyphSize.Width(), aGlyphSize.Height());
- }
-
- const Rectangle aRect(aStart, aGlyphSize);
-
- aCharacterList.Insert(new OutlinerCharacter(
- aRect,
- pInfo->mnPara,
- pInfo->mrFont.GetColor()),
- nInsertIndex);
-
- long dx = 0;
- if( pInfo->mpDXArray )
- dx = (pInfo->mpDXArray)[nCharIndex];
-
- if(bIsVertical)
- aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y() + dx;
- else
- aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X() + dx;
- }
-
- nCharIndex = nCharIndex + nNextGlyphLen;
- }
- }
-
- return 0L;
-}
-
-// eof
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index daea6eef49a2..7b7a361bba80 100644..100755
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -116,14 +116,3 @@ void SdUndoGroup::AddAction(SdUndoAction* pAction)
{
aCtn.Insert(pAction, CONTAINER_APPEND);
}
-
-/*************************************************************************
-|*
-|* Zeiger auf eine Aktion liefern
-|*
-\************************************************************************/
-
-SdUndoAction* SdUndoGroup::GetAction(ULONG nAction) const
-{
- return (SdUndoAction*)aCtn.GetObject(nAction);
-}
diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx
index 684487d0c592..933e961ed927 100644..100755
--- a/sd/source/ui/func/unoaprms.cxx
+++ b/sd/source/ui/func/unoaprms.cxx
@@ -39,52 +39,6 @@ TYPEINIT1(SdAnimationPrmsUndoAction, SdUndoAction);
/*************************************************************************
|*
-|* 2. Ctor, der den ersten (inline) nach der Version 4.0 einmal ersetzen
-|* soll (mit 3. Parameter dann)
-|* Hier werden die Member mit den Animations-Informationen vorbelegt,
-|* um nicht immer alle inline-Methoden aufrufen zu muessen, auch im
-|* Hinblick auf zukuenftige Erweiterungen (neue Member etc.)
-|*
-\************************************************************************/
-
-SdAnimationPrmsUndoAction::SdAnimationPrmsUndoAction(
- SdDrawDocument* pTheDoc,
- SdrObject* pObj ) :
- SdUndoAction ( pTheDoc ),
- pObject ( pObj ),
- bInfoCreated ( FALSE ) // Fuer Animationsreihenfolge existiert Info
-{
- SdAnimationInfo* pInfo = pTheDoc->GetAnimationInfo( pObject );
- if( pInfo )
- {
- bNewActive = bOldActive = pInfo->mbActive;
- eNewEffect = eOldEffect = pInfo->meEffect;
- eNewTextEffect = eOldTextEffect = pInfo->meTextEffect;
- eNewSpeed = eOldSpeed = pInfo->meSpeed;
- bNewDimPrevious = bOldDimPrevious= pInfo->mbDimPrevious;
- aNewDimColor = aOldDimColor = pInfo->maDimColor;
- bNewDimHide = bOldDimHide = pInfo->mbDimHide;
- bNewSoundOn = bOldSoundOn = pInfo->mbSoundOn;
- aNewSoundFile = aOldSoundFile = pInfo->maSoundFile;
- bNewPlayFull = bOldPlayFull = pInfo->mbPlayFull;
-
- pNewPathObj = pOldPathObj = pInfo->mpPathObj;
-
- eNewClickAction = eOldClickAction = pInfo->meClickAction;
- aNewBookmark = aOldBookmark = pInfo->GetBookmark();
-// bNewInvisibleInPres = bOldInvisibleInPres= pInfo->mbInvisibleInPresentation;
- nNewVerb = nOldVerb = pInfo->mnVerb;
- nNewPresOrder = nOldPresOrder = pInfo->mnPresOrder;
-
- eNewSecondEffect = eOldSecondEffect = pInfo->meSecondEffect;
- eNewSecondSpeed = eOldSecondSpeed = pInfo->meSecondSpeed;
- bNewSecondSoundOn = bOldSecondSoundOn = pInfo->mbSecondSoundOn;
- bNewSecondPlayFull = bOldSecondPlayFull = pInfo->mbSecondPlayFull;
- }
-}
-
-/*************************************************************************
-|*
|* Undo()
|*
\************************************************************************/
diff --git a/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx
index 33e0bbf725ab..5c8fba1e6b2d 100644..100755
--- a/sd/source/ui/inc/AccessibleViewForwarder.hxx
+++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx
@@ -53,13 +53,10 @@ class AccessibleViewForwarder
public:
//===== internal ========================================================
- AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId);
AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice);
virtual ~AccessibleViewForwarder (void);
- void SetView (SdrPaintView* pView);
-
//===== IAccessibleViewforwarder ========================================
/** This method informs you about the state of the forwarder. Do not
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index d2f56501f492..da0b6ade7327 100755
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -127,8 +127,6 @@ public:
void SetSubController (
const css::uno::Reference<css::drawing::XDrawSubController>& rxSubController);
- ::com::sun::star::awt::Rectangle GetVisArea (void) const;
-
/** Call this method when the VisArea has changed.
*/
void FireVisAreaChanged (const Rectangle& rVisArea) throw();
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index f2b77d01f96c..4ad4b0d09392 100644..100755
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -115,7 +115,6 @@ public:
sd::ViewShell* GetViewShell() { return mpViewShell; }
::sd::FrameView* GetFrameView();
- ::Window* GetWindow() const;
::sd::FunctionReference GetDocShellFunction() const { return mxDocShellFunction; }
void SetDocShellFunction( const ::sd::FunctionReference& xFunction );
@@ -164,8 +163,6 @@ public:
UINT16 GetStyleFamily() const { return mnStyleFamily; }
void SetStyleFamily( UINT16 nSF ) { mnStyleFamily = nSF; }
- sal_Bool IsNewDocument() const;
-
/** executes the SID_OPENDOC slot to let the framework open a document
with the given URL and this document as a referer */
void OpenBookmark( const String& rBookmarkURL );
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 51b8479dae1e..4abb1a22946d 100755
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -94,11 +94,6 @@ public:
PageKind ePageKind = PK_STANDARD,
FrameView* pFrameView = NULL);
- DrawViewShell(
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const DrawViewShell& rShell);
-
virtual ~DrawViewShell (void);
virtual void Init (bool bIsMainViewShell);
@@ -199,9 +194,6 @@ public:
void ExecFormText(SfxRequest& rReq);
void GetFormTextState(SfxItemSet& rSet);
- void ExecObjPalette(SfxRequest& rReq);
- void GetObjPaletteState(SfxItemSet& rSet);
-
void ExecAnimationWin(SfxRequest& rReq);
void GetAnimationWinState(SfxItemSet& rSet);
diff --git a/sd/source/ui/inc/GraphicViewShell.hxx b/sd/source/ui/inc/GraphicViewShell.hxx
index 39e12e47d1e1..6b5d96be95c6 100644..100755
--- a/sd/source/ui/inc/GraphicViewShell.hxx
+++ b/sd/source/ui/inc/GraphicViewShell.hxx
@@ -52,11 +52,6 @@ public:
SFX_DECL_VIEWFACTORY(GraphicViewShell);
SFX_DECL_INTERFACE(SD_IF_SDGRAPHICVIEWSHELL)
- GraphicViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const DrawViewShell& rShell);
-
/** Create a new view shell for the Draw application.
@param rViewShellBase
The new object will be stacked on this view shell base.
diff --git a/sd/source/ui/inc/LayerDialogContent.hxx b/sd/source/ui/inc/LayerDialogContent.hxx
index f06b785737b0..3c0b00025307 100644..100755
--- a/sd/source/ui/inc/LayerDialogContent.hxx
+++ b/sd/source/ui/inc/LayerDialogContent.hxx
@@ -50,8 +50,6 @@ public:
ViewShellBase& rBase);
virtual ~LayerDialogContent (void);
- LayerTabBar& GetLayerTabBar (void);
-
protected:
virtual BOOL Close (void);
virtual void Resize (void);
diff --git a/sd/source/ui/inc/MasterPageObserver.hxx b/sd/source/ui/inc/MasterPageObserver.hxx
index 4e74d922d256..caaa8c175f68 100644..100755
--- a/sd/source/ui/inc/MasterPageObserver.hxx
+++ b/sd/source/ui/inc/MasterPageObserver.hxx
@@ -80,12 +80,6 @@ public:
*/
void RemoveEventListener (const Link& rEventListener);
- /** Return a set of the names of master pages for the given document.
- This convenience method exists because this set is part of the
- internal data structure and thus takes no time to create.
- */
- MasterPageNameSet GetMasterPageNames (SdDrawDocument& rDocument);
-
private:
static ::osl::Mutex maMutex;
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 710ee3a96cf7..78481294bf94 100644..100755
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -162,7 +162,9 @@ public:
*/
void IgnoreCurrentPageChanges (bool bIgnore);
+#if 0
sal_Int32 GetPageNumberWidthPixel();
+#endif
void InvalidateSlideNumberArea();
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 0bc083b12b2e..6c3848f39926 100644..100755
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -67,11 +67,6 @@ public:
::Window* pParentWindow,
FrameView* pFrameView = NULL);
- OutlineViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const OutlineViewShell& rShell);
-
virtual ~OutlineViewShell (void);
virtual void Shutdown (void);
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 6f8ebb285886..4e6033d67ad1 100644..100755
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -53,12 +53,6 @@ public:
TYPEINFO();
SFX_DECL_INTERFACE(SD_IF_SDSLIDESORTERVIEWSHELL)
- static SfxShell* CreateInstance (
- sal_Int32 nId,
- SfxShell* pParent,
- void* pUserData,
- ViewShellBase& rBase);
-
static ::boost::shared_ptr<SlideSorterViewShell> Create(
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
diff --git a/sd/source/ui/inc/SlideView.hxx b/sd/source/ui/inc/SlideView.hxx
index 3764347f2a4b..17f7f17e3a9a 100644..100755
--- a/sd/source/ui/inc/SlideView.hxx
+++ b/sd/source/ui/inc/SlideView.hxx
@@ -36,7 +36,6 @@ class SdPage;
namespace sd {
-class ShowView;
class SlideViewShell;
class Window;
@@ -129,7 +128,6 @@ private:
List aDelayedPaints;
SlideViewShell* pSlideViewShell;
BitmapCache* pCache;
- ShowView* pShowView;
VirtualDevice* mpVDev;
USHORT nAllowInvalidateSmph;
USHORT nPagesPerRow;
diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx
index 898df6865280..4e08dd99b063 100644..100755
--- a/sd/source/ui/inc/SpellDialogChildWindow.hxx
+++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx
@@ -62,12 +62,12 @@ protected:
next sentence with spelling errors. While doing so the view
mode may be changed and text shapes are set into edit mode.
*/
- virtual ::svx::SpellPortions GetNextWrongSentence (void);
+ virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck );
/** This method is responsible for merging corrections made in the
spelling dialog back into the document.
*/
- virtual void ApplyChangedSentence (const ::svx::SpellPortions& rChanged);
+ virtual void ApplyChangedSentence(const ::svx::SpellPortions& rChanged, bool bRecheck);
virtual void GetFocus (void);
virtual void LoseFocus (void);
diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx
index 2caead9a3c5d..d8b84d1d7b61 100644..100755
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -144,14 +144,6 @@ public:
TBG__LAST = TBG_MASTER_MODE
};
- /** Only after calls with bValid=<TRUE/> may the tool bar manager use
- the frame::XLayoutManager to change the visible tool bars. Call
- this method when the controller is attached to or detachted from the
- frame. When called with <FALSE/> then ResetAllToolBars() is
- executed.
- */
- void SetValid (bool bValid);
-
/** Reset the set of visible object bars in the specified group. Tool
bars in other groups are not affected.
@param rParentShell
@@ -209,10 +201,6 @@ public:
ToolBarGroup eGroup,
const ::rtl::OUString& rsToolBarName);
- void RemoveToolBarShell (
- ToolBarGroup eGroup,
- ShellId nToolBarId);
-
/** This is basically a shortcut for ResetToolBars(),AddToolBar(). The
main difference is, that all sub shells of the specified parent
shell are deactivated as well.
@@ -275,10 +263,6 @@ public:
};
friend class UpdateLock;
- /** Return whether updates of tool bars are locked.
- */
- bool IsUpdateLocked (void) const;
-
void ToolBarsDestroyed(void);
private:
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 2b6c1a8abb77..f78051bdd719 100755
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -160,10 +160,7 @@ public:
void SetMarkedOriginalSize();
- VirtualDevice* CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel);
-
void LockRedraw(BOOL bLock);
- bool IsRedrawLocked (void) const;
BOOL IsMorphingAllowed() const;
BOOL IsVectorizeAllowed() const;
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 64bc5cbc02b7..ffefb9de7359 100755
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -141,10 +141,6 @@ public:
::Window* pParentWindow,
ViewShellBase& rViewShellBase,
bool bAllowCenter = true);
- ViewShell (
- SfxViewFrame *pFrame,
- ::Window* pParentWindow,
- const ViewShell& rShell);
virtual ~ViewShell (void);
/** The Init method has to be called from the outside directly
@@ -235,7 +231,6 @@ public:
void InitWindows(const Point& rViewOrigin, const Size& rViewSize,
const Point& rWinPos, BOOL bUpdate = FALSE);
void InvalidateWindows();
- void UpdateWindows();
/** This method is still used by the OutlineViewShell to update the
model according to the content of the outline view. This in turn
updates the previews in the slide sorter.
@@ -243,8 +238,6 @@ public:
virtual void UpdatePreview (SdPage* pPage, BOOL bInit = FALSE);
void DrawMarkRect(const Rectangle& rRect) const;
- void DrawFilledRect( const Rectangle& rRect, const Color& rLColor,
- const Color& rFColor ) const;
void ExecReq( SfxRequest &rReq );
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index bda748559399..38f7223f1d83 100755
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -57,7 +57,6 @@ class ToolBarManager;
class UpdateLockManager;
class ViewShell;
class ViewShellManager;
-class CustomHandleManager;
/** SfxViewShell descendant that the stacked Draw/Impress shells are
based on.
@@ -112,10 +111,6 @@ public:
DrawDocShell* GetDocShell (void) const;
SdDrawDocument* GetDocument (void) const;
- /** Callback function for retrieving item values related to menu entries.
- */
- void GetMenuState (SfxItemSet& rSet);
-
/** Callback function for general slot calls. At the moment these are
slots for switching the pane docking windows on and off.
*/
@@ -165,12 +160,6 @@ public:
PrintDialog *pPrintDialog,
BOOL bSilent, BOOL bIsAPI );
- /// Forwarded to the print manager.
- USHORT SetPrinterOptDlg (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL,
- BOOL _bShowDialog = TRUE);
-
virtual void PreparePrint (PrintDialog* pPrintDialog);
/// Forward methods to main sub shell.
@@ -261,8 +250,6 @@ public:
*/
::Window* GetViewWindow (void);
- CustomHandleManager& getCustomHandleManager() const;
-
/** returns the ui descriptive name for the given uno slot. The result is taken from the configuration
and not cached, so do not use it excessive (f.e. in status updates) */
::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const;
@@ -295,22 +282,6 @@ public:
virtual void addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList ) = 0;
};
-class CustomHandleManager : public ICustomhandleSupplier
-{
-public:
- CustomHandleManager( ViewShellBase& rViewShellBase );
- virtual ~CustomHandleManager();
-
- void registerSupplier( ICustomhandleSupplier* pSupplier );
- void unRegisterSupplier( ICustomhandleSupplier* pSupplier );
-
- virtual void addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList );
-
-private:
- ViewShellBase& mrViewShellBase;
- std::set< ICustomhandleSupplier* > maSupplier;
-};
-
} // end of namespace sd
#endif
diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx
index 27f88b72bf11..d674e7d07eff 100644..100755
--- a/sd/source/ui/inc/ViewShellManager.hxx
+++ b/sd/source/ui/inc/ViewShellManager.hxx
@@ -90,23 +90,6 @@ public:
ViewShell* pViewShell,
const SharedShellFactory& rpFactory);
- /** Create a new (or possibly recycle an existing) instance of a view
- shell that is specified by the given id. When called multiple times
- with the same id then multiple instances of the associated view
- shell are created. Use the returned pointer to distinguish between
- these.
- @param nId
- The id of the shell to activate.
- @return
- A pointer to the activated shell is returned. Use this pointer
- to identify the shell in other method calls. When an activation
- is not possible then NULL is returned.
- */
- ViewShell* ActivateViewShell (
- ShellId nId,
- ::Window* pParentWindow,
- FrameView* pFrameView);
-
/** Activate the given view shell.
*/
void ActivateViewShell (ViewShell* pViewShell);
@@ -156,10 +139,6 @@ public:
*/
void DeactivateSubShell (const ViewShell& rParentShell, ShellId nId);
- /** Deactivate all sub shells of the given view shell.
- */
- void DeactivateAllSubShells (const ViewShell& rParentShell);
-
/** Move the specified sub shells to the top position among the sub
shells of the parent view shell. The rest of the SFX shell stack
does not change (but the all shells above the sub shells have to be
@@ -173,14 +152,6 @@ public:
void InvalidateAllSubShells (
ViewShell* pViewShell);
- /** Call this method to when a 'secondary' shell is moved to or from the
- stack, e.g. an object bar. As a result a pending
- TakeShellsFromStack() is executed and at the next UnlockUpdate() to
- lock level 0 the shells are asked about their secondary shells to
- push on the shell stack.
- */
- void InvalidateShellStack (const SfxShell* pShell);
-
/** Move the specified view shell to the top most position on the stack
of view shells in relation to the other view shells. After this the
only shells that are higher on the stack are its object bars.
@@ -211,20 +182,6 @@ public:
*/
SfxShell* GetTopShell (void) const;
- /** Return the id of the given shell.
- */
- ShellId GetShellId (const SfxShell* pShell) const;
-
- /** Replace the references to one SfxUndoManager to that of another at all
- shells on the SFX shell stack. Call this method when an undo
- manager is about to be destroyed.
- @param pManager
- The undo manager to be replaced.
- @param pReplacement
- The undo manager that replaces pManager.
- */
- void ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement);
-
/** Use this class to safely lock updates of the view shell stack.
*/
class UpdateLock
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx
index dbf2a1ed40a6..8dd522d8212d 100644..100755
--- a/sd/source/ui/inc/Window.hxx
+++ b/sd/source/ui/inc/Window.hxx
@@ -66,8 +66,6 @@ public:
void SetViewShell (ViewShell* pViewSh);
- void ShareViewArea(::sd::Window* pOtherWin);
-
/** Set the zoom factor to the specified value and center the display
area arround the zoom center.
@param nZoom
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 846863c3a68a..7a7a34362c48 100644..100755
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -172,7 +172,6 @@ private:
void UpdateControl( ULONG nPos, BOOL bDisableCtrls = FALSE );
void ResetAttrs();
- void WaitInEffect( ULONG nMilliSeconds ) const;
void WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
SfxProgress* pStbMgr ) const;
Fraction GetScale();
diff --git a/sd/source/ui/inc/bmcache.hxx b/sd/source/ui/inc/bmcache.hxx
index 26658333dca3..c04f7d2ed2c4 100644..100755
--- a/sd/source/ui/inc/bmcache.hxx
+++ b/sd/source/ui/inc/bmcache.hxx
@@ -45,8 +45,6 @@ public:
: nMaxSize(nMaxSizeKB), nCurSize(0) {}
virtual ~BitmapCache();
- void Add(const SdPage* pPage, const Bitmap& rBmp, long nZoomPercent);
- const GraphicObject* Get(const SdPage* pPage, long& rZoomPercent, long nZoomTolerancePercent);
void Remove(const SdPage* pPage);
};
diff --git a/sd/source/ui/inc/dlgass.hxx b/sd/source/ui/inc/dlgass.hxx
index 418d72618b4c..523b86cf66a8 100644..100755
--- a/sd/source/ui/inc/dlgass.hxx
+++ b/sd/source/ui/inc/dlgass.hxx
@@ -64,9 +64,6 @@ public:
DECL_LINK( FinishHdl, OKButton * );
SfxObjectShellLock GetDocument();
- String GetTopic() const;
- String GetUserName() const;
- String GetInformation() const;
OutputType GetOutputMedium() const;
BOOL IsSummary() const;
StartType GetStartType() const;
diff --git a/sd/source/ui/inc/dlgctrls.hxx b/sd/source/ui/inc/dlgctrls.hxx
index df48868d473d..72b5921d8e86 100644..100755
--- a/sd/source/ui/inc/dlgctrls.hxx
+++ b/sd/source/ui/inc/dlgctrls.hxx
@@ -50,7 +50,6 @@ class SD_DLLPUBLIC FadeEffectLB : public ListBox
{
public:
FadeEffectLB( Window* pParent, SdResId Id );
- FadeEffectLB( Window* pParent, WinBits aWB );
~FadeEffectLB();
virtual void Fill();
diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx
index 0827371da3be..76b8fe06f318 100644..100755
--- a/sd/source/ui/inc/docprev.hxx
+++ b/sd/source/ui/inc/docprev.hxx
@@ -70,10 +70,8 @@ protected:
public:
SdDocPreviewWin( Window* pParent, const ResId& rResId );
- SdDocPreviewWin( Window* pParent );
~SdDocPreviewWin();
void SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage = 0 );
- void SetGDIFile( GDIMetaFile* pFile );
virtual void Resize();
void startPreview();
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 74b4c5d1d6a6..2aaa7be9f123 100644..100755
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -40,40 +40,9 @@
class SdFileDialog_Imp;
-/******************************************************************************/
-
-/**
- The class SdExportFileDialog wraps the FileDialogHelper, displaying the
- FILESAVE_AUTOEXTENSION_SELECTION dialog template. The interface is a downstripped
- version of the aforementioned class, with similar semantics.
- */
-class SdExportFileDialog
-{
- const std::auto_ptr< SdFileDialog_Imp > mpImpl;
-
- // forbidden and not implemented
- SdExportFileDialog ();
- SdExportFileDialog (const SdExportFileDialog &);
- SdExportFileDialog & operator= (const SdExportFileDialog &);
-
-public:
- explicit SdExportFileDialog( BOOL haveCheckbox );
- ~SdExportFileDialog();
-
- ErrCode Execute();
- String GetPath() const;
- void SetPath( const String& rPath );
-
- String ReqDisplayDirectory() const;
-
- String ReqCurrentFilter() const;
- BOOL IsExportSelection() const; // whether the "selection" checkbox is checked.
-};
-
/******************************************************************************/
-
/**
The class SdOpenSoundFileDialog wraps the FileDialogHelper, displaying the
FILEOPEN_PLAY dialog template and performing the 'preview' functionality
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index a25839b3e637..58c663449bbc 100755
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -383,23 +383,6 @@ private:
};
-
-/** This functor wraps a slot call. It is used to call a slot after an
- asynchronous configuration update, eg after switching views.
-*/
-class DispatchCaller
-{
- SfxDispatcher& mrDispatcher;
- USHORT mnSId;
-public:
- /** Create a new DispatchCaller object that, when executed, will call
- the given slot at the given dispatcher.
- */
- DispatchCaller(SfxDispatcher& rDispatcher, USHORT nSId);
- void operator() (bool bEventSeen);
-};
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/inc/framework/ResourceId.hxx b/sd/source/ui/inc/framework/ResourceId.hxx
index a4d5390d15d0..e8124e895ee6 100644..100755
--- a/sd/source/ui/inc/framework/ResourceId.hxx
+++ b/sd/source/ui/inc/framework/ResourceId.hxx
@@ -236,8 +236,6 @@ private:
const ::std::vector<rtl::OUString>& rResourceURLs,
css::drawing::framework::AnchorBindingMode eMode) const;
- bool IsValid (void) const;
-
void ParseResourceURL (void);
};
diff --git a/sd/source/ui/inc/fuconstr.hxx b/sd/source/ui/inc/fuconstr.hxx
index c4199986a5b6..390060a16e3c 100644..100755
--- a/sd/source/ui/inc/fuconstr.hxx
+++ b/sd/source/ui/inc/fuconstr.hxx
@@ -50,7 +50,6 @@ public:
TYPEINFO();
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
diff --git a/sd/source/ui/inc/fudraw.hxx b/sd/source/ui/inc/fudraw.hxx
index 77427a7f346e..23f68eda327b 100644..100755
--- a/sd/source/ui/inc/fudraw.hxx
+++ b/sd/source/ui/inc/fudraw.hxx
@@ -50,8 +50,6 @@ class FuDraw
public:
TYPEINFO();
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent );
-
virtual BOOL KeyInput(const KeyEvent& rKEvt);
virtual BOOL MouseMove(const MouseEvent& rMEvt);
virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
diff --git a/sd/source/ui/inc/fuoutl.hxx b/sd/source/ui/inc/fuoutl.hxx
index a8743fea8a50..92299387849a 100644..100755
--- a/sd/source/ui/inc/fuoutl.hxx
+++ b/sd/source/ui/inc/fuoutl.hxx
@@ -54,8 +54,6 @@ class FuOutline
public:
TYPEINFO();
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
-
virtual BOOL Command(const CommandEvent& rCEvt);
virtual void ScrollStart();
diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx
index c3c95a384a38..2650e99767b5 100644..100755
--- a/sd/source/ui/inc/fupoor.hxx
+++ b/sd/source/ui/inc/fupoor.hxx
@@ -98,7 +98,6 @@ public:
virtual void ScrollEnd() {} // ForceScroll aufgerufen
void SetWindow(::sd::Window* pWin) { mpWindow = pWin; }
- void WriteStatus(const String& aStr); // Statuszeile schreiben
// #97016# II
virtual void SelectionHasChanged();
@@ -145,7 +144,6 @@ protected:
virtual ~FuPoor (void);
DECL_LINK( DelayHdl, Timer * );
- long diffPoint (long pos1, long pos2);
void ImpForceQuadratic(Rectangle& rRect);
diff --git a/sd/source/ui/inc/futransf.hxx b/sd/source/ui/inc/futransf.hxx
index be554e941400..85041334c7f0 100644..100755
--- a/sd/source/ui/inc/futransf.hxx
+++ b/sd/source/ui/inc/futransf.hxx
@@ -51,8 +51,6 @@ private:
::sd::View* pView,
SdDrawDocument* pDoc,
SfxRequest& rReq);
-
- Point GetPoint( Rectangle aRect, RECT_POINT eRP );
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx
index 382727475f84..fa0c4d9282c0 100644..100755
--- a/sd/source/ui/inc/headerfooterdlg.hxx
+++ b/sd/source/ui/inc/headerfooterdlg.hxx
@@ -65,7 +65,6 @@ private:
SdPage* mpCurrentPage;
ViewShell* mpViewShell;
- void initTabPages();
void apply( bool bToAll, bool bForceSlides );
void change( SdUndoGroup* pUndoGroup, SdPage* pPage, const HeaderFooterSettings& rNewSettings );
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index dcf53fc6ffc3..13088dfc64cb 100644..100755
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -163,7 +163,6 @@ public:
SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsLayout() {}
- void SetDefaults();
BOOL operator==( const SdOptionsLayout& rOpt ) const;
BOOL IsRulerVisible() const { Init(); return (BOOL) bRuler; }
@@ -220,7 +219,6 @@ public:
SdOptionsContents( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsContents() {}
- void SetDefaults();
BOOL operator==( const SdOptionsContents& rOpt ) const;
};
@@ -230,7 +228,6 @@ class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem
{
public:
- SdOptionsContentsItem( USHORT nWhich);
SdOptionsContentsItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -301,7 +298,6 @@ public:
SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsMisc() {}
- void SetDefaults();
BOOL operator==( const SdOptionsMisc& rOpt ) const;
BOOL IsStartWithTemplate() const { Init(); return (BOOL) bStartWithTemplate; }
@@ -427,7 +423,6 @@ public:
SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsSnap() {}
- void SetDefaults();
BOOL operator==( const SdOptionsSnap& rOpt ) const;
BOOL IsSnapHelplines() const { Init(); return (BOOL) bSnapHelplines; }
@@ -494,7 +489,6 @@ public:
SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsZoom() {}
- void SetDefaults();
BOOL operator==( const SdOptionsZoom& rOpt ) const;
void GetScale( INT32& rX, INT32& rY ) const { Init(); rX = nX; rY = nY; }
@@ -503,23 +497,6 @@ public:
// -----------------------------------------------------------------------------
-class SdOptionsZoomItem : public SfxPoolItem
-{
-public:
-
- SdOptionsZoomItem( USHORT nWhich);
- SdOptionsZoomItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
-
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual int operator==( const SfxPoolItem& ) const;
-
- void SetOptions( SdOptions* pOpts ) const;
-
- SdOptionsZoom& GetOptionsZoom() { return maOptionsZoom; }
-private:
- SdOptionsZoom maOptionsZoom;
-};
-
// -----------------
// - SdOptionsGrid -
// -----------------
@@ -569,7 +546,6 @@ class SdOptionsGridItem : public SvxGridItem
{
public:
- SdOptionsGridItem( USHORT nWhich );
SdOptionsGridItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
void SetOptions( SdOptions* pOpts ) const;
@@ -616,9 +592,6 @@ public:
SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsPrint() {}
- void SetPrinterOptions( const SdOptionsPrint* pOptions );
-
- void SetDefaults();
BOOL operator==( const SdOptionsPrint& rOpt ) const;
BOOL IsDraw() const { Init(); return (BOOL) bDraw; }
@@ -700,7 +673,6 @@ public:
SdOptions( USHORT nConfigId );
virtual ~SdOptions();
- void SetRangeDefaults( ULONG nOptionRange );
void StoreConfig( ULONG nOptionRange = SD_OPTIONS_ALL );
};
diff --git a/sd/source/ui/inc/outlinfo.hxx b/sd/source/ui/inc/outlinfo.hxx
deleted file mode 100644
index 4f277c0fa320..000000000000
--- a/sd/source/ui/inc/outlinfo.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _OUTLINFO_HXX
-#define _OUTLINFO_HXX
-
-#include <tools/gen.hxx>
-#include <vcl/outdev.hxx>
-
-// ---------------
-// - SdLaserInfo -
-// ---------------
-
-struct OutlinerCharacter
-{
- Rectangle aRect;
- ULONG nPara;
- Color aColor;
-
- // #101500# Removed CharCode, it's only used in one place to compare
- // for single space character. This can be done at creation, too.
- //USHORT nCharCode;
-
- OutlinerCharacter( const Rectangle& _rRect, ULONG _nPara, const Color& _rCol /* #101500#, USHORT _nCharCode*/ )
- : aRect( _rRect ),
- nPara( _nPara ),
- aColor( _rCol )
- {
- }
-};
-
-// -----------------------------------------------------------------------------
-
-struct OutlinerParagraph
-{
- Rectangle aRect;
- ULONG nCharCount;
-
- OutlinerParagraph() : nCharCount( 0 ) {}
- ~OutlinerParagraph() {};
-};
-
-// ----------------
-// - OutlinerInfo -
-// ----------------
-
-class DrawPortionInfo;
-class SdDrawDocument;
-class SdrRectObj;
-
-class OutlinerInfo
-{
-private:
-
- List aCharacterList;
- Rectangle aObjBound;
- Rectangle aParaBound;
- Point aTextOffset;
- OutlinerParagraph* pParagraphs;
- OutputDevice* mpOut;
- ULONG nParaCount;
- ULONG nCurPara;
- long nExtraData;
- BOOL bInit;
- BOOL mbVertical;
-
- OutlinerInfo( const OutlinerInfo& ) {}
- OutlinerInfo& operator=( const OutlinerInfo& ) { return *this; }
-
- DECL_LINK( DrawPortionHdl, DrawPortionInfo* );
-
-public:
-
- OutlinerInfo();
- ~OutlinerInfo();
-
- void Clear();
-
- void SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* _pOut );
-
- const Rectangle& GetObjRect() const { return aObjBound; }
- const Rectangle& GetTextRect() const { return aParaBound; }
- const Point& GetTextOffset() const { return aTextOffset; }
-
- ULONG GetParaCount() const { return nParaCount; }
-
- const Rectangle& GetParaRect( const ULONG nPara ) const;
- BOOL GetParaCharCount( const ULONG nPara ) const;
-
- ULONG GetCharacterCount() const { return aCharacterList.Count(); }
- OutlinerCharacter* GetCharacter( ULONG nPos ) const { return (OutlinerCharacter*) aCharacterList.GetObject( nPos ); };
- OutlinerCharacter* GetFirstCharacter() { return (OutlinerCharacter*) aCharacterList.First(); }
- OutlinerCharacter* GetNextCharacter() { return (OutlinerCharacter*) aCharacterList.Next(); }
-
- void SetExtraData( const long _nExtraData = 0L ) { nExtraData = _nExtraData; }
- long GetExtraData() const { return nExtraData; }
-
- BOOL IsVertical() const { return mbVertical; }
-};
-
-#endif
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 288bcfb3e359..da9bc20c02d6 100644..100755
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -94,7 +94,6 @@ public:
~SdPrintOptions();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- static USHORT* GetRanges();
virtual BOOL FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 948a55d3754c..dc98929a9ed1 100644..100755
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -210,7 +210,6 @@ public:
BOOL SelectEntry( const String& rName );
String GetSelectEntry();
List* GetSelectEntryList( USHORT nDepth );
- List* GetBookmarkList( USHORT nType );
SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = NULL);
::sd::DrawDocShell* GetDropDocSh() { return(mpDropDocSh); }
diff --git a/sd/source/ui/inc/sdundogr.hxx b/sd/source/ui/inc/sdundogr.hxx
index b4665dbe5a46..f02977234475 100644..100755
--- a/sd/source/ui/inc/sdundogr.hxx
+++ b/sd/source/ui/inc/sdundogr.hxx
@@ -48,7 +48,6 @@ public:
virtual void Redo();
void AddAction(SdUndoAction* pAction);
- SdUndoAction* GetAction(ULONG nAction) const;
ULONG Count() const { return aCtn.Count(); }
};
diff --git a/sd/source/ui/inc/showview.hxx b/sd/source/ui/inc/showview.hxx
deleted file mode 100644
index 748effbe1985..000000000000
--- a/sd/source/ui/inc/showview.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_SHOW_VIEW_HXX
-#define SD_SHOW_VIEW_HXX
-
-#include <svx/fmview.hxx>
-
-class SdDrawDocument;
-
-namespace sd {
-
-class ViewShell;
-
-/*************************************************************************
-|*
-|* Beschreibung ShowView ist die View fuer die Diashow
-|*
-\************************************************************************/
-
-class ShowView
- : public FmFormView
-{
-public:
- // wenn waehrend des Zeichnens Plugins 'connected'
- // werden sollen, muss pWWin ein Zeiger auf das Fenster
- // sein, das das Plugin benutzen soll
- ShowView (
- SdDrawDocument* pDoc,
- OutputDevice* pOut,
- ViewShell* pViewShell,
- ::Window* pWin = NULL);
- virtual ~ShowView (void);
-
- SdDrawDocument& GetDoc() const { return *pDrDoc; }
-
- void SetAllowInvalidate(BOOL bFlag);
- BOOL IsInvalidateAllowed() const;
-
- void SetAllowMasterPageCaching(BOOL bAllow)
- { bAllowMasterPageCaching = bAllow; }
- BOOL IsMasterPageCachingAllowed() const
- { return(bAllowMasterPageCaching); }
-
- virtual void CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L);
- virtual void InvalidateOneWin(::Window& rWin);
- virtual void InvalidateOneWin(::Window& rWin, const Rectangle& rRect);
-
- virtual void DoConnect(SdrOle2Obj* pOleObj);
-
-private:
- SdDrawDocument* pDrDoc;
- ViewShell* mpViewSh;
- Window* pWindowForPlugIns;
- USHORT nAllowInvalidateSmph;
- BOOL bAllowMasterPageCaching;
-
-};
-
-} // end of namespace sd
-
-#endif
-
-
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index bc4df5aa44f5..eda80feeb825 100644..100755
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -173,7 +173,6 @@ public:
ShowWindow* getShowWindow(); // a.k.a. FuSlideShow::GetShowWindow()
int getAnimationMode(); // a.k.a. FuSlideShow::GetAnimationMode()
sal_Int32 getCurrentPageNumber(); // a.k.a. FuSlideShow::GetCurrentPage()
- sal_Int32 getCurrentPageIndex();
sal_Int32 getFirstPageNumber();
sal_Int32 getLastPageNumber();
bool isEndless();
diff --git a/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
index b3620255f913..f820edc69f09 100755
--- a/sd/source/ui/inc/taskpane/ScrollPanel.hxx
+++ b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
@@ -131,11 +131,6 @@ public:
Rectangle& aRectangle,
::Window* pWindow);
-protected:
- /** Initiate a rearrangement of the controls.
- */
- void ListHasChanged (void);
-
private:
::Control maScrollWindow;
ScrollBar maVerticalScrollBar;
diff --git a/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
index 94a73bc70996..669c51cfcfad 100755
--- a/sd/source/ui/inc/taskpane/SubToolPanel.hxx
+++ b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
@@ -68,19 +68,6 @@ public:
SubToolPanel (Window& i_rParentWindow);
virtual ~SubToolPanel (void);
- /** Add a control to the sub panel.
- @param rTitle
- The title that will be shown in the two title bars that
- belong to the control.
- @param nHelpId
- The help id is set at the title bar not the actual control.
- */
- void AddControl (
- ::std::auto_ptr<TreeNode> pControl,
- const String& rTitle,
- ULONG nHelpId);
- void AddControl (::std::auto_ptr<TreeNode> pControl);
-
virtual void Paint (const Rectangle& rRect);
/** Initiate a rearrangement of the controls and title bars.
@@ -106,11 +93,6 @@ public:
::com::sun::star::accessibility::XAccessible>& rxParent);
using Window::GetWindow;
-protected:
- /** Initiate a rearrangement of the controls.
- */
- void ListHasChanged (void);
-
private:
::Window maWindowFiller;
bool mbIsRearrangePending;
diff --git a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
index 0dbec3b292c3..a1a430c49328 100755
--- a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
+++ b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
@@ -69,15 +69,6 @@ public:
TreeNode (TreeNode* pParent);
virtual ~TreeNode (void);
- /** Returns <TRUE/> if the node has no children, i.e. is a leaf of a
- tree. In this case mpControlContainer is NULL.
- */
- bool IsLeaf (void);
-
- /** Returns true if the node has no parent, i.e. is the root of a tree.
- */
- bool IsRoot (void);
-
void SetParentNode (TreeNode* pNewParent);
TreeNode* GetParentNode (void);
@@ -179,14 +170,6 @@ public:
*/
void AddStateChangeListener (const Link& rListener);
- /** Remove the listener form the list of state change listeners.
- @param rListener
- It is OK to specify a listener that is not currently
- registered. Only when the listener is registered it is
- removed. Otherwise the call is ignored.
- */
- void RemoveStateChangeListener (const Link& rListener);
-
/** Call the state change listeners and pass a state change event with
the specified event id. The source field is set to this.
@param pChild
diff --git a/sd/source/ui/inc/taskpane/TitledControl.hxx b/sd/source/ui/inc/taskpane/TitledControl.hxx
index 0aa63344fcd5..cb7cd3b2159c 100755
--- a/sd/source/ui/inc/taskpane/TitledControl.hxx
+++ b/sd/source/ui/inc/taskpane/TitledControl.hxx
@@ -125,13 +125,6 @@ public:
virtual void SetEnabledState(bool bFlag);
- /** Ownership of the given data remains with the caller. The data
- is thus not destroyed when the destructor of this class is
- called.
- */
- void SetUserData (void* pUserData);
- void* GetUserData (void) const;
-
virtual bool IsShowing (void) const;
virtual void Show (bool bVisible);
diff --git a/sd/source/ui/inc/tools/PropertySet.hxx b/sd/source/ui/inc/tools/PropertySet.hxx
index c74253092adf..998b4f0e2142 100644..100755
--- a/sd/source/ui/inc/tools/PropertySet.hxx
+++ b/sd/source/ui/inc/tools/PropertySet.hxx
@@ -62,13 +62,6 @@ public:
virtual void SAL_CALL disposing (void);
-
- /** Create an UnknownPropertyException, but do not yet throw it. This
- method fills in the fields of the exception.
- */
- css::beans::UnknownPropertyException CreateUnknownPropertyException (
- const rtl::OUString& rsPropertyName);
-
// XPropertySet
virtual css::uno::Reference<css::beans::XPropertySetInfo>
diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
index d86ac3cf6433..d0661a61636b 100644..100755
--- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
+++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
@@ -92,17 +92,6 @@ public:
*/
void AddResource (const ::css::uno::Reference<css::uno::XInterface>& rxResource);
- /** Tell the container that it is not any longer responsible for the
- specified resource.
- @return
- When the specified resource has previously added to the
- container the resource is returned (which is, of course, the
- same pointer as the given one.) Otherwise a NULL pointer is
- returned.
- */
- ::std::auto_ptr<SdGlobalResource> ReleaseResource (
- SdGlobalResource* pResource);
-
protected:
friend class ::SdModule;
friend class ::std::auto_ptr<SdGlobalResourceContainer>;
diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx
index 418e4dbf1766..1f45aef331ab 100644..100755
--- a/sd/source/ui/inc/tools/SlotStateListener.hxx
+++ b/sd/source/ui/inc/tools/SlotStateListener.hxx
@@ -57,13 +57,6 @@ class SlotStateListener
public SlotStateListenerInterfaceBase
{
public:
- /** Create a new object that has yet to be told about the the frame and
- slots to listen to and the callback that state changes are relayed
- to. When you want to listen to one single slot then you can use the
- three argument variant of this constructor.
- */
- SlotStateListener (void);
-
/** This convenience version of the constructor takes all parameters
that are necessary to observe a single slot. See descriptions of
the SetCallback(), ConnectToFrame(), and ObserveSlot() methods for
@@ -105,14 +98,6 @@ public:
*/
void ObserveSlot (const ::rtl::OUString& rSlotName);
- /** Return whether the called SlotStateListener is connected to a slot.
- One reason for returning <FALSE/> is that the SlotStateListener has
- been created before the controller and frame have been properly
- initialized.
- */
- bool IsValid (void) const;
-
-
//===== frame::XStatusListener ==========================================
/** Called by slot state change broadcasters. In turn the callback is
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index d07f24a2dcc2..2ee8bbe6771a 100644..100755
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -114,7 +114,6 @@ private:
void SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
void SetEditText( String const & rStr );
String GetEditText( BOOL bURL = FALSE );
- String GetMacroName( const String& rPath );
USHORT GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
USHORT GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
@@ -123,7 +122,6 @@ public:
~SdTPAction();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- static USHORT* GetRanges();
virtual BOOL FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx
index 9cc3555dce3b..a2a80963ad63 100644..100755
--- a/sd/source/ui/inc/unoaprms.hxx
+++ b/sd/source/ui/inc/unoaprms.hxx
@@ -97,8 +97,6 @@ public:
bInfoCreated (bCreated)
{}
- SdAnimationPrmsUndoAction( SdDrawDocument* pTheDoc, SdrObject* pObj );
-
void SetActive(BOOL bTheOldActive, BOOL bTheNewActive)
{ bOldActive = bTheOldActive; bNewActive = bTheNewActive; }
void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
diff --git a/sd/source/ui/inc/unosrch.hxx b/sd/source/ui/inc/unosrch.hxx
index e30605181c4c..b19f3751e836 100644..100755
--- a/sd/source/ui/inc/unosrch.hxx
+++ b/sd/source/ui/inc/unosrch.hxx
@@ -58,9 +58,10 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetCurrentShape() const throw();
public:
- SdUnoSearchReplaceShape( ::com::sun::star::drawing::XDrawPage* xPage ) throw(); // danger, these c'tors are only usable if
- SdUnoSearchReplaceShape( ::com::sun::star::drawing::XShape* xShape ) throw(); // the given shape or page is derived from
- virtual ~SdUnoSearchReplaceShape() throw(); // this class!!!
+ // danger, this c'tor is only usable if the given shape or page is derived
+ // from this class!!!
+ SdUnoSearchReplaceShape( ::com::sun::star::drawing::XDrawPage* xPage ) throw();
+ virtual ~SdUnoSearchReplaceShape() throw();
// XReplaceable
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx
index 1e31eaa598ac..6957bfed25ce 100644..100755
--- a/sd/source/ui/inc/zoomlist.hxx
+++ b/sd/source/ui/inc/zoomlist.hxx
@@ -44,7 +44,6 @@ public:
virtual ~ZoomList();
void InsertZoomRect(const Rectangle& rRect);
- Rectangle GetCurrentZoomRect() const;
Rectangle GetNextZoomRect();
Rectangle GetPreviousZoomRect();
BOOL IsNextPossible() const;
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx
index 8a87a10e43d0..a1f583a4e40c 100644..100755
--- a/sd/source/ui/presenter/PresenterCanvas.cxx
+++ b/sd/source/ui/presenter/PresenterCanvas.cxx
@@ -908,22 +908,6 @@ css::rendering::ViewState PresenterCanvas::MergeViewState (
-Reference<rendering::XCanvas> PresenterCanvas::GetSharedCanvas (void) const
-{
- return mxSharedCanvas;
-}
-
-
-
-
-void PresenterCanvas::SetClip (const awt::Rectangle& rClipRectangle)
-{
- maClipRectangle = rClipRectangle;
-}
-
-
-
-
awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWindow)
{
mbOffsetUpdatePending = false;
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 3734f488d370..ba90a92939ca 100644..100755
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -113,7 +113,6 @@ public:
void SetFontDescriptor (const awt::FontDescriptor& rFontDescriptor);
sal_Int32 GetTop (void) const;
void SetTop (const sal_Int32 nTop);
- void ClearText (void);
void SetText (const OUString& Text);
sal_Int32 ParseDistance (const OUString& rsDistance) const;
Reference<rendering::XBitmap> GetBitmap (void);
@@ -533,17 +532,6 @@ void PresenterTextView::Implementation::SetTop (const sal_Int32 nTop)
-void PresenterTextView::Implementation::ClearText (void)
-{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
- msText = OUString();
- mnTotalHeight = 0;
- mxBitmap = NULL;
-}
-
-
-
-
void PresenterTextView::Implementation::SetText (const OUString& rText)
{
DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index c951f68d9b74..187d0d5ea715 100644..100755
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -947,13 +947,6 @@ sal_Int32 SlideShow::getCurrentPageNumber()
// ---------------------------------------------------------
-sal_Int32 SlideShow::getCurrentPageIndex()
-{
- return mxController.is() ? mxController->getCurrentSlideIndex() : 0;
-}
-
-// ---------------------------------------------------------
-
void SlideShow::jumpToBookmark( const OUString& sBookmark )
{
if( mxController.is() )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 0afcb7df053b..5afcb65ab90c 100644..100755
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3697,14 +3697,7 @@ Reference< XSlideShow > SAL_CALL SlideshowImpl::getSlideShow() throw (RuntimeExc
// --------------------------------------------------------------------
-PresentationSettingsEx::PresentationSettingsEx()
-: mbRehearseTimings(sal_False)
-, mbPreview(sal_False)
-, mpParentWindow( 0 )
-{
-}
-
-PresentationSettingsEx::PresentationSettingsEx( PresentationSettingsEx& r )
+PresentationSettingsEx::PresentationSettingsEx( const PresentationSettingsEx& r )
: PresentationSettings( r )
, mbRehearseTimings(r.mbRehearseTimings)
, mbPreview(r.mbPreview)
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index 48dca432671c..cb33c4a740c7 100644..100755
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -112,8 +112,7 @@ struct PresentationSettingsEx : public PresentationSettings
css::uno::Reference< css::drawing::XDrawPage > mxStartPage;
css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode;
- PresentationSettingsEx();
- PresentationSettingsEx( PresentationSettingsEx& );
+ PresentationSettingsEx( const PresentationSettingsEx& );
PresentationSettingsEx( PresentationSettings& );
void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 47818b73d193..1bbecbef3d66 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -178,14 +178,6 @@ void BitmapCache::Clear (void)
-bool BitmapCache::IsEmpty (void) const
-{
- return mpBitmapContainer->empty();
-}
-
-
-
-
bool BitmapCache::IsFull (void) const
{
return mbIsFull;
@@ -261,21 +253,6 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
-void BitmapCache::ReleaseBitmap (const CacheKey& rKey)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey));
- if (aIterator != mpBitmapContainer->end())
- {
- UpdateCacheSize(aIterator->second, REMOVE);
- mpBitmapContainer->erase(aIterator);
- }
-}
-
-
-
-
void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -348,20 +325,6 @@ void BitmapCache::SetBitmap (
-bool BitmapCache::IsPrecious (const CacheKey& rKey)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey));
- if (aIterator != mpBitmapContainer->end())
- return aIterator->second.IsPrecious();
- else
- return false;
-}
-
-
-
-
void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index d0f8766cabf5..2c33e042342f 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -81,10 +81,6 @@ public:
*/
void Clear (void);
- /** Returns <TRUE/> when there is no preview bitmap in the cache.
- */
- bool IsEmpty (void) const;
-
/** Return <TRUE/> when the cache is full, i.e. the cache compactor had
to be run.
*/
@@ -108,11 +104,6 @@ public:
*/
::boost::shared_ptr<BitmapEx> GetBitmap (const CacheKey& rKey);
- /** Release the reference to the preview bitmap that is associated with
- the given key.
- */
- void ReleaseBitmap (const CacheKey& rKey);
-
/** Mark the specified preview bitmap as not being up-to-date anymore.
*/
void InvalidateBitmap (const CacheKey& rKey);
@@ -128,11 +119,6 @@ public:
const ::boost::shared_ptr<BitmapEx>& rpPreview,
bool bIsPrecious);
- /** Return whether the specified preview bitmap has been marked as
- precious.
- */
- bool IsPrecious (const CacheKey& rKey);
-
/** Mark the specified preview bitmap as precious, i.e. that it must not
be compressed or otherwise removed from the cache.
*/
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index 7658d1f3b663..780a429df29e 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -199,15 +199,6 @@ void GenericPageCache::RequestPreviewBitmap (
-void GenericPageCache::InvalidatePreviewBitmap (CacheKey aKey)
-{
- if (mpBitmapCache.get() != NULL)
- mpBitmapCache->InvalidateBitmap(mpCacheContext->GetPage(aKey));
-}
-
-
-
-
void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey)
{
if (mpBitmapCache.get() != NULL)
@@ -294,17 +285,6 @@ void GenericPageCache::SetPreciousFlag (CacheKey aKey, bool bIsPrecious)
-bool GenericPageCache::IsEmpty (void) const
-{
- if (mpBitmapCache.get() != NULL)
- return mpBitmapCache->IsEmpty();
- else
- return true;
-}
-
-
-
-
void GenericPageCache::Pause (void)
{
ProvideCacheAndProcessor();
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
index e38745e2844f..89fc657004e8 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
@@ -99,12 +99,6 @@ public:
const Size& rSize,
bool bMayBeUpToDate = true);
- /** Tell the cache to replace the bitmap associated with the given
- request data with a new one that reflects recent changes in the
- content of the page object.
- */
- void InvalidatePreviewBitmap (CacheKey aKey);
-
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested a new bitmap.
@@ -124,10 +118,6 @@ public:
*/
void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
- /** Return <TRUE/> when there is no preview bitmap in the cache.
- */
- bool IsEmpty (void) const;
-
void Pause (void);
void Resume (void);
diff --git a/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx b/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx
deleted file mode 100644
index 6df77bf52800..000000000000
--- a/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx
+++ /dev/null
@@ -1,66 +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_sd.hxx"
-
-#include "precompiled_sd.hxx"
-
-#include "SlsIdleDetector.hxx"
-
-#include "view/SlideSorterView.hxx"
-#include "tools/IdleDetection.hxx"
-#include "Window.hxx"
-
-namespace sd { namespace slidesorter { namespace cache {
-
-IdleDetector::IdleDetector (
- const ::Window* pWindow,
- const bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation)
- : mpWindow(pWindow),
- mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(
- bIsSuspendPreviewUpdatesDuringFullScreenPresentation)
-{
-}
-
-
-
-
-bool IdleDetector::operator() (void)
-{
- // Determine whether the system is idle.
- sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mpWindow));
- if (nIdleState == tools::IdleDetection::IDET_IDLE)
- return true;
- else
- return false;
-}
-
-
-} } } // end of namespace ::sd::slidesorter::cache
-
-
-
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
index 29b7cdb687d1..714e1f008329 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
@@ -29,7 +29,6 @@
#include "SlsGenericPageCache.hxx"
#include "SlsRequestFactory.hxx"
-#include "SlsIdleDetector.hxx"
#include "cache/SlsPageCache.hxx"
#include "model/SlideSorterModel.hxx"
#include <boost/bind.hpp>
@@ -81,25 +80,6 @@ BitmapEx PageCache::GetPreviewBitmap (
-void PageCache::RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize)
-{
- return mpImplementation->RequestPreviewBitmap(aKey, rSize);
-}
-
-
-
-
-void PageCache::InvalidatePreviewBitmap (
- CacheKey aKey)
-{
- mpImplementation->InvalidatePreviewBitmap(aKey);
-}
-
-
-
-
void PageCache::ReleasePreviewBitmap (
CacheKey aKey)
{
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index 86354c823b7e..bec9c7fa369d 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -30,7 +30,6 @@
#include "SlsQueueProcessor.hxx"
#include "SlsCacheConfiguration.hxx"
#include "SlsRequestQueue.hxx"
-#include "SlsIdleDetector.hxx"
namespace sd { namespace slidesorter { namespace cache {
diff --git a/sd/source/ui/slidesorter/cache/makefile.mk b/sd/source/ui/slidesorter/cache/makefile.mk
index d9766e892992..58862a28645a 100644..100755
--- a/sd/source/ui/slidesorter/cache/makefile.mk
+++ b/sd/source/ui/slidesorter/cache/makefile.mk
@@ -49,7 +49,6 @@ SLOFILES = \
$(SLO)$/SlsCacheCompactor.obj \
$(SLO)$/SlsCacheConfiguration.obj \
$(SLO)$/SlsGenericPageCache.obj \
- $(SLO)$/SlsIdleDetector.obj \
$(SLO)$/SlsPageCache.obj \
$(SLO)$/SlsPageCacheManager.obj \
$(SLO)$/SlsQueueProcessor.obj \
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index d90f6f0f824f..69c2a02ddc24 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -210,14 +210,6 @@ SlideSorterController::~SlideSorterController (void)
-SlideSorter& SlideSorterController::GetSlideSorter (void) const
-{
- return mrSlideSorter;
-}
-
-
-
-
model::SharedPageDescriptor SlideSorterController::GetPageAt (
const Point& aPixelPosition)
{
@@ -229,23 +221,6 @@ model::SharedPageDescriptor SlideSorterController::GetPageAt (
return pDescriptorAtPoint;
}
-
-
-
-model::SharedPageDescriptor SlideSorterController::GetFadePageAt (
- const Point& aPixelPosition)
-{
- sal_Int32 nHitPageIndex (mrView.GetFadePageIndexAtPoint(aPixelPosition));
- model::SharedPageDescriptor pDescriptorAtPoint;
- if (nHitPageIndex >= 0)
- pDescriptorAtPoint = mrModel.GetPageDescriptor(nHitPageIndex);
-
- return pDescriptorAtPoint;
-}
-
-
-
-
PageSelector& SlideSorterController::GetPageSelector (void)
{
OSL_ASSERT(mpPageSelector.get()!=NULL);
@@ -800,50 +775,6 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
-void SlideSorterController::SetZoom (long int nZoom)
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- long int nCurrentZoom ((long int)(
- pWindow->GetMapMode().GetScaleX().operator double() * 100));
-
- if (nZoom > nCurrentZoom)
- {
- Size aPageSize (mrView.GetPageBoundingBox(
- 0,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_SHAPE).GetSize());
- Size aWindowSize (pWindow->PixelToLogic(
- pWindow->GetOutputSizePixel()));
-
- // The zoom factor must not grow by more then the ratio of the
- // widths of the output window and the page objects.
- long nMaxFactor
- = nCurrentZoom * aWindowSize.Width() / aPageSize.Width();
- // Apply rounding, so that a current zoom factor of 1 is still
- // increased.
- nMaxFactor = (nCurrentZoom * 18 + 5) / 10;
- nZoom = Min(nMaxFactor, nZoom);
- }
- if (nZoom < 1)
- nZoom = 1;
-
- mrView.LockRedraw (TRUE);
- mrView.GetLayouter().SetZoom(nZoom/100.0, pWindow);
- mrView.Layout();
- GetScrollBarManager().UpdateScrollBars (false);
- mrView.GetPreviewCache()->InvalidateCache();
- mrView.RequestRepaint();
- mrView.LockRedraw (FALSE);
-
- /*
- ViewShell::SetZoom (nZoom);
- GetViewFrame()->GetBindings().Invalidate (SID_ATTR_ZOOM);
- */
-}
-
-
-
-
FunctionReference SlideSorterController::CreateSelectionFunction (SfxRequest& rRequest)
{
FunctionReference xFunc( SelectionFunction::Create(mrSlideSorter, rRequest) );
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 5fdee6400959..f5864c3307a1 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -253,19 +253,4 @@ void CurrentSlideManager::HandleModelChange (void)
}
}
-
-
-
-SdPage* GetCurrentSdPage (SlideSorter& rSlideSorter)
-{
- SharedPageDescriptor pDescriptor (
- rSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() == NULL)
- return NULL;
- else
- return pDescriptor->GetPage();
-}
-
-
-
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index b50be47a0188..0e8f5e100d1c 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -177,17 +177,6 @@ void PageSelector::DeselectPage (int nPageIndex)
-void PageSelector::DeselectPage (const SdPage* pPage)
-{
- int nPageIndex = (pPage->GetPageNum()-1) / 2;
- SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
- DeselectPage(pDescriptor);
-}
-
-
-
-
void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor)
{
if (rpDescriptor.get()!=NULL && rpDescriptor->Deselect())
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index b928eeb9f4ce..5ee7f6f58b82 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -219,26 +219,6 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea)
-void ScrollBarManager::AdaptWindowSize (const Rectangle& rArea)
-{
- Size aPixelContentSize (mpContentWindow->LogicToPixel(
- mrSlideSorter.GetView().GetLayouter().GetPageBox (
- mrSlideSorter.GetModel().GetPageCount()).GetSize()));
- int nHeightDifference = aPixelContentSize.Height() - rArea.GetHeight();
- ::Window* pParentWindow = mpContentWindow->GetParent();
- Size aNewWindowSize (pParentWindow->GetSizePixel());
- if (nHeightDifference != 0)
- {
- aNewWindowSize.Height() += nHeightDifference;
- pParentWindow->SetPosSizePixel(
- pParentWindow->GetPosPixel(),
- aNewWindowSize);
- }
-}
-
-
-
-
void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScrolling)
{
Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
index d24f8a347646..687019954feb 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
@@ -54,18 +54,6 @@ SelectionCommand::SelectionCommand (
-void SelectionCommand::AddSlides (
- const ::boost::shared_ptr<PageSelector::PageSelection>& rpSelection)
-{
- PageSelector::PageSelection::iterator iPage = rpSelection->begin();
- PageSelector::PageSelection::iterator iEnd = rpSelection->end();
- for (; iPage!=iEnd; ++iPage)
- AddSlide(((*iPage)->GetPageNum()-1)/2);
-}
-
-
-
-
void SelectionCommand::AddSlide (USHORT nPageIndex)
{
maPagesToSelect.push_back(nPageIndex);
@@ -74,14 +62,6 @@ void SelectionCommand::AddSlide (USHORT nPageIndex)
-void SelectionCommand::SetCurrentSlide (USHORT nPageIndex)
-{
- mnCurrentPageIndex = nPageIndex;
-}
-
-
-
-
void SelectionCommand::operator() (void)
{
OSL_ASSERT(mpCurrentSlideManager.get()!=NULL);
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
index 88ce0ea29b75..7a9d0f27369e 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
@@ -64,24 +64,11 @@ public:
const ::boost::shared_ptr<controller::CurrentSlideManager>& rpCurrentSlideManager,
const model::SlideSorterModel& rModel);
- /** Add the pages in the given list of selected pages to those that will
- be selected when this command is executed, i.e. its operator()
- method is called.
- The first page will be set as current page when the new current page
- has not been specified previously.
- */
- void AddSlides (const ::boost::shared_ptr<PageSelector::PageSelection>& rpSelection);
-
/** Remember the specified page to be selected when this command is
executed.
*/
void AddSlide (USHORT nPageIndex);
- /** Call this method to explicitly set the page that will be made the
- current page when this command is executed.
- */
- void SetCurrentSlide (USHORT nPageIndex);
-
/** Execute the command and select the pages added by previous calls to
AddPages() and AddPage().
*/
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 710e7c2eb02d..c1d742ce7158 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -47,7 +47,6 @@
#include "view/SlsLayouter.hxx"
#include "view/SlsPageObjectViewObjectContact.hxx"
#include "framework/FrameworkHelper.hxx"
-#include "showview.hxx"
#include "ViewShellBase.hxx"
#include "DrawController.hxx"
#include <vcl/sound.hxx>
@@ -136,26 +135,6 @@ private:
};
-class SelectionFunction::InsertionIndicatorHandler
-{
-public:
- InsertionIndicatorHandler (SlideSorter& rSlideSorter);
- ~InsertionIndicatorHandler (void);
-
- /** Show the insertion marker at the given coordinates.
- */
- void Start (const Point& rMouseModelPosition);
-
- void UpdatePosition (const Point& rMouseModelPosition);
-
- /** Hide the insertion marker.
- */
- void End (void);
-
-private:
- SlideSorter& mrSlideSorter;
-};
-
class SelectionFunction::EventDescriptor
{
public:
@@ -188,8 +167,7 @@ SelectionFunction::SelectionFunction (
mbDragSelection(false),
maInsertionMarkerBox(),
mbProcessingMouseButtonDown(false),
- mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter)),
- mpInsertionIndicatorHandler(new InsertionIndicatorHandler(mrSlideSorter))
+ mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter))
{
//af aDelayToScrollTimer.SetTimeout(50);
aDragTimer.SetTimeoutHdl( LINK( this, SelectionFunction, DragSlideHdl ) );
@@ -710,20 +688,6 @@ void SelectionFunction::GotoNextPage (int nOffset)
-void SelectionFunction::ClearOverlays (void)
-{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
-
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().Clear();
-
- mpInsertionIndicatorHandler->End();
- rOverlay.GetMouseOverIndicatorOverlay().SetSlideUnderMouse(model::SharedPageDescriptor());
-}
-
-
-
-
void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent)
{
// #95491# remember button state for creation of own MouseEvents
@@ -1350,55 +1314,4 @@ bool SelectionFunction::SubstitutionHandler::IsSubstitutionInsertionNonTrivial (
return bIsNonTrivial;
}
-
-
-
-//===== InsertionIndicatorHandler =============================================
-
-SelectionFunction::InsertionIndicatorHandler::InsertionIndicatorHandler (
- SlideSorter& rSlideSorter)
- : mrSlideSorter(rSlideSorter)
-{
-}
-
-
-
-
-SelectionFunction::InsertionIndicatorHandler::~InsertionIndicatorHandler (void)
-{
-}
-
-
-
-
-void SelectionFunction::InsertionIndicatorHandler::Start (const Point& rMouseModelPosition)
-{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
-
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
-}
-
-
-
-
-void SelectionFunction::InsertionIndicatorHandler::UpdatePosition (const Point& rMouseModelPosition)
-{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
-
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
-}
-
-
-
-
-void SelectionFunction::InsertionIndicatorHandler::End (void)
-{
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
-}
-
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
index 1b70cb1e154e..7fe090ad5541 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
@@ -53,12 +53,6 @@ SlideFunction::SlideFunction (
{
}
-FunctionReference SlideFunction::Create( SlideSorter& rSlideSorter, SfxRequest& rRequest )
-{
- FunctionReference xFunc( new SlideFunction( rSlideSorter, rRequest ) );
- return xFunc;
-}
-
void SlideFunction::ScrollStart (void)
{
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 85d07f0e74df..6c1123abc031 100755
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -477,68 +477,6 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
}
}
-
-
-
-void SlotManager::GetCtrlState (SfxItemSet& rSet)
-{
- if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN)
- {
- // "Letzte Version" vom SFx en/disablen lassen
- ViewShell* pShell = mrSlideSorter.GetViewShell();
- if (pShell != NULL)
- {
- SfxViewFrame* pSlideViewFrame = pShell->GetViewFrame();
- DBG_ASSERT(pSlideViewFrame!=NULL,
- "SlideSorterController::GetCtrlState: ViewFrame not found");
- pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet);
- }
- }
-
- // Output quality.
- if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SFX_ITEM_AVAILABLE
- ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SFX_ITEM_AVAILABLE
- ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_AVAILABLE
- ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_AVAILABLE)
- {
- ULONG nMode = mrSlideSorter.GetView().GetWindow()->GetDrawMode();
- UINT16 nQuality = 0;
-
- switch (nMode)
- {
- case ::sd::ViewShell::OUTPUT_DRAWMODE_COLOR:
- nQuality = 0;
- break;
- case ::sd::ViewShell::OUTPUT_DRAWMODE_GRAYSCALE:
- nQuality = 1;
- break;
- case ::sd::ViewShell::OUTPUT_DRAWMODE_BLACKWHITE:
- nQuality = 2;
- break;
- case ::sd::ViewShell::OUTPUT_DRAWMODE_CONTRAST:
- nQuality = 3;
- break;
- }
-
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_COLOR,
- (BOOL)(nQuality==0)));
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_GRAYSCALE,
- (BOOL)(nQuality==1)));
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_BLACKWHITE,
- (BOOL)(nQuality==2)));
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_CONTRAST,
- (BOOL)(nQuality==3)));
- }
-
- if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_AVAILABLE)
- {
- rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, TRUE));
- }
-}
-
-
-
-
void SlotManager::GetMenuState ( SfxItemSet& rSet)
{
EditMode eEditMode = mrSlideSorter.GetModel().GetEditMode();
@@ -1154,38 +1092,6 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
mrSlideSorter.GetView().LockRedraw(FALSE);
}
-
-
-
-void SlotManager::AssignTransitionEffect (void)
-{
- model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
-
- // We have to manually select the pages in the document that are
- // selected in the slide sorter.
- rModel.SynchronizeDocumentSelection();
-
- // #i34011#: Needs review, AF's bugfix is removed here
- //rShell.AssignFromSlideChangeWindow(rModel.GetEditMode());
-
- // We have to remove the selection of master pages to not confuse the
- // model.
- if (rModel.GetEditMode() == EM_MASTERPAGE)
- {
- SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
- USHORT nMasterPageCount = pDocument->GetMasterSdPageCount(PK_STANDARD);
- for (USHORT nIndex=0; nIndex<nMasterPageCount; nIndex++)
- {
- SdPage* pPage = pDocument->GetMasterSdPage(nIndex, PK_STANDARD);
- if (pPage != NULL)
- pPage->SetSelected (FALSE);
- }
- }
-}
-
-
-
-
void SlotManager::ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand)
{
// Ownership of command is (implicitely) transferred to the queue.
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index 9a3256a07d86..4a5c2b51ac28 100644..100755
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -68,18 +68,11 @@ class RequestData;
bitmaps and throw.</li>
</p>
- <p>There are three somewhat similar methods for requesting new previews:
- a) GetPreviewBitmap() schedules a re-rendering (when necessary) and
+ <p>There is another somewhat similar methods for requesting new previews:
+ GetPreviewBitmap() schedules a re-rendering (when necessary) and
returns the preview what is currently available, either as a preview of
the preview or, when nothing has changed since the last call, as the
final thing.
- b) RequestPreviewBitmap() schedules, like GetPreviewBitmap(), a
- re-rendering when the currently available preview is not up-to-date. It
- does not, however, return anything. Use this if you can wait for the
- preview.
- c) InvalidatePreviewBitmap() does not schedule a re-rendering, but
- remembers that one is necessary when one of the other two methods is
- called.
</p>
*/
class PageCache
@@ -120,24 +113,6 @@ public:
CacheKey aKey,
const Size& rSize);
- /** When the requested preview bitmap does not yet exist or is not
- up-to-date then the rendering of one is scheduled. Otherwise this
- method does nothing.
- */
- void RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
-
- /** Tell the cache that the bitmap associated with the given request
- data is not up-to-date anymore. Unlike the RequestPreviewBitmap()
- method this does not trigger the rendering itself. It just
- remembers to render it when the preview is requested the next time.
- @param rRequestData
- It is safe to pass a (barly) living object. It will called only
- once to obtain its page object.
- */
- void InvalidatePreviewBitmap (CacheKey aKey);
-
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested new bitmap.
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index af90b60932b9..667aa768ee8f 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -105,8 +105,6 @@ public:
*/
Rectangle Rearrange (bool bForce = false);
- SlideSorter& GetSlideSorter (void) const;
-
/** Return the descriptor of the page that is rendered under the
given position.
@return
@@ -116,14 +114,6 @@ public:
*/
model::SharedPageDescriptor GetPageAt (const Point& rPixelPosition);
- /** Return the descriptor of the page that is associated to the page
- visible fade symbol at the given position.
- @return
- When the given position is not over a visible page fade symbol
- then NULL is returned.
- */
- model::SharedPageDescriptor GetFadePageAt (const Point& rPixelPosition);
-
PageSelector& GetPageSelector (void);
FocusManager& GetFocusManager (void);
controller::Clipboard& GetClipboard (void);
@@ -189,14 +179,6 @@ public:
*/
void UpdateAllPages (void);
- /** Set the zoom factor. The given value is clipped against an upper
- bound.
- @param nZoom
- An integer percent value, i.e. nZoom/100 is the actual zoom
- factor.
- */
- void SetZoom (long int nZoom);
-
/** This factory method creates a selection function.
*/
virtual FunctionReference CreateSelectionFunction (SfxRequest& rRequest);
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
index 24420160b8cd..57aaf9293301 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
@@ -91,7 +91,6 @@ public:
/** Deselect the descriptor that is associated with the given page.
*/
void DeselectPage (int nPageIndex);
- void DeselectPage (const SdPage* pPage);
void DeselectPage (const model::SharedPageDescriptor& rpDescriptor);
/** This convenience method returns the same number of pages that
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
index 9d4c5a9329e2..c93ed7708650 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
@@ -242,13 +242,6 @@ private:
void PlaceHorizontalScrollBar (const Rectangle& aArea);
void PlaceVerticalScrollBar (const Rectangle& aArea);
void PlaceFiller (const Rectangle& aArea);
-
- /** Make the height of the content window larger or smaller, so that the
-
- content size fits exactly in. This is achieved by changing the size
- of the parent window and rely on the resulting resize.
- */
- void AdaptWindowSize (const Rectangle& rArea);
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index ef2bcd7b5617..79b8a1ff5d44 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -99,7 +99,6 @@ protected:
private:
class SubstitutionHandler;
class EventDescriptor;
- class InsertionIndicatorHandler;
/// Set in MouseButtonDown this flag indicates that a page has been hit.
bool mbPageHit;
@@ -121,8 +120,6 @@ private:
::std::auto_ptr<SubstitutionHandler> mpSubstitutionHandler;
- ::std::auto_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler;
-
DECL_LINK( DragSlideHdl, Timer* );
void StartDrag (void);
@@ -182,11 +179,6 @@ private:
*/
void ProcessRectangleSelection (bool bToggleSelection);
- /** Hide and clear the insertion indiciator, substitution display and
- selection rectangle.
- */
- void ClearOverlays (void);
-
/** Compute a numerical code that describes a mouse event and that can
be used for fast look up of the appropriate reaction.
*/
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
index 843e6e82b45c..5b8c7d9a08b6 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
@@ -50,8 +50,6 @@ class SlideFunction
public:
TYPEINFO();
- static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest );
-
virtual BOOL MouseMove (const MouseEvent& rMEvt);
virtual BOOL MouseButtonUp (const MouseEvent& rMEvt);
virtual BOOL MouseButtonDown (const MouseEvent& rMEvt);
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index d7b7a0e06831..0e58d5d3b411 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -63,7 +63,6 @@ public:
void FuTemporary (SfxRequest& rRequest);
void FuPermanent (SfxRequest& rRequest);
void FuSupport (SfxRequest& rRequest);
- void GetCtrlState (SfxItemSet &rSet);
void GetMenuState (SfxItemSet &rSet);
void GetClipboardState (SfxItemSet &rSet);
void GetStatusBarState (SfxItemSet& rSet);
@@ -94,8 +93,6 @@ private:
*/
void InsertSlide (SfxRequest& rRequest);
- void AssignTransitionEffect (void);
-
DECL_LINK(UserEventCallback, void*);
};
diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
index 42bc6c2140f7..4ade19087304 100644..100755
--- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
@@ -83,9 +83,6 @@ public:
*/
bool SetEditMode (EditMode eEditMode);
- /** Set the edit mode to that currently used by the controller.
- */
- bool SetEditModeFromController (void);
EditMode GetEditMode (void) const;
PageKind GetPageType (void) const;
@@ -147,10 +144,6 @@ public:
*/
void SynchronizeDocumentSelection (void);
- /** Set the selection of the called model to exactly that of the document.
- */
- void SynchronizeModelSelection (void);
-
/** Replace the factory for the creation of the page objects and
contacts with the given object. The old factory is destroyed.
*/
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
index 0854ad5e678a..81877ce7465c 100644..100755
--- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
@@ -100,13 +100,6 @@ public:
*/
css::uno::Reference<css::drawing::XDrawPage> GetXDrawPage (void) const;
- /** Returns the index of the page as it is displayed in the view as page
- number. The value may differ from the index returned by the
- XDrawPage when there are hidden slides and the XIndexAccess used to
- access the model filters them out.
- */
- sal_Int32 GetPageIndex (void) const;
-
/** Return the page shape that is used for visualizing the page.
*/
view::PageObject* GetPageObject (void);
@@ -176,10 +169,6 @@ public:
void SetPageNumberAreaModelSize (const Size& rSize);
Size GetPageNumberAreaModelSize (void) const;
- /** Returns <TRUE/> when the slide is the current slide.
- */
- bool IsCurrentPage (void) const;
-
/** Set or revoke the state of this slide being the current slide.
*/
void SetIsCurrentPage (const bool bIsCurrent);
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index d5c8dd4bf241..6c16a154ecfd 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -134,7 +134,6 @@ public:
given position.
*/
sal_Int32 GetPageIndexAtPoint (const Point& rPosition) const;
- sal_Int32 GetFadePageIndexAtPoint (const Point& rPosition) const;
view::Layouter& GetLayouter (void);
@@ -206,8 +205,6 @@ public:
*/
void SetSelectionRectangleVisibility (bool bVisible);
- ::sdr::contact::ObjectContact& GetObjectContact (void) const;
-
typedef ::std::pair<sal_Int32,sal_Int32> PageRange;
/** Return the range of currently visible page objects including the
first and last one in that range.
@@ -217,16 +214,6 @@ public:
*/
PageRange GetVisiblePageRange (void);
- /** Return the size of the area where the page numbers are displayed.
- @return
- The returned size is given in model coordinates.
- */
- Size GetPageNumberAreaModelSize (void) const;
-
- /** Return the size of the border around the original SdrPageObj.
- */
- SvBorder GetModelBorder (void) const;
-
/** Add a shape to the page. Typically used from inside
PostModelChange().
*/
diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
index 246dcbc05ee7..9b1fd996e9c0 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
@@ -69,14 +69,6 @@ public:
Layouter (void);
~Layouter (void);
- /** Set the minimal, the maximal, and the desired width of the page
- objects. The three parameters have to fullfill the constraint
- nMinimalWidth <= nPreferredWidth <= nMaximalWidth or the call is
- ignored.
- */
- void SetObjectWidth (sal_Int32 nMinimalWidth, sal_Int32 nMaximalWidth,
- sal_Int32 nPreferredWidth);
-
/** Set the horizontal and vertical borders in pixel coordinates between
the enclosing window and page objects. The borders may be painted
larger then the given values when the space for the insertion marker
@@ -114,13 +106,6 @@ public:
void SetPageBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder,
sal_Int32 nTopBorder, sal_Int32 nBottomBorder);
- /** Set the horizontal and vertical gaps between adjacent page objects.
- These gaps are only relevant when there is more than one column or
- more than one row. Negative values indicate that the respective gap
- is not set.
- */
- void SetGaps (sal_Int32 nHorizontalGap, sal_Int32 nVerticalGap);
-
/** Set the interval of valid column counts. When nMinimalColumnCount
<= nMaximalColumnCount is not fullfilled then the call is ignored.
@param nMinimalColumnCount
@@ -160,19 +145,12 @@ public:
/** Change the zoom factor. This does not change the general layout
(number of columns).
*/
- void SetZoom (double nZoomFactor, OutputDevice* pDevice);
void SetZoom (Fraction nZoomFactor, OutputDevice* pDevice);
/** Return the number of columns.
*/
sal_Int32 GetColumnCount (void) const;
- /** Returns whether the column count is fixed (<TRUE/>) or variable
- (<FALSE/>). It is fixed if SetColumnCount() was called with the
- same value for minimal and maximal column count.
- */
- bool IsColumnCountFixed (void) const;
-
/** Return the scale factor that can be set at the map mode of the
output window.
*/
@@ -289,7 +267,6 @@ public:
const DoublePoint&rLayouterPoint) const;
typedef ::std::vector<Rectangle> BackgroundRectangleList;
- const BackgroundRectangleList& GetBackgroundRectangleList (void) const;
private:
class ScreenAndModelValue {public:
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx
index c0083ff92d73..31899d3b3e44 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx
@@ -69,8 +69,6 @@ public:
SdrPageObj& GetPageObject (void) const;
- Rectangle GetPageObjectBoundingBox (void) const;
-
virtual void ActionChanged (void);
protected:
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index b149320cf0f2..0bf9052f5382 100755
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -121,30 +121,6 @@ bool SlideSorterModel::SetEditMode (EditMode eEditMode)
-bool SlideSorterModel::SetEditModeFromController (void)
-{
- bool bIsMasterPageMode = false;
- // Get the edit mode from the controller.
- try
- {
- Reference<beans::XPropertySet> xSet (mrSlideSorter.GetXController(), UNO_QUERY_THROW);
- Any aValue (xSet->getPropertyValue(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsMasterPageMode"))));
- aValue >>= bIsMasterPageMode;
- }
- catch (RuntimeException&)
- {
- // When the property is not supported then the master
- // page mode is not supported, too.
- bIsMasterPageMode = false;
- }
-
- return SetEditMode(bIsMasterPageMode ? EM_MASTERPAGE : EM_PAGE);
-}
-
-
-
-
EditMode SlideSorterModel::GetEditMode (void) const
{
return meEditMode;
@@ -311,27 +287,6 @@ void SlideSorterModel::SynchronizeDocumentSelection (void)
}
}
-
-
-
-void SlideSorterModel::SynchronizeModelSelection (void)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
- while (aAllPages.HasMoreElements())
- {
- SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- if (pDescriptor->GetPage()->IsSelected())
- pDescriptor->Select ();
- else
- pDescriptor->Deselect ();
- }
-}
-
-
-
-
void SlideSorterModel::SetPageObjectFactory(
::std::auto_ptr<controller::PageObjectFactory> pPageObjectFactory)
{
diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
index 2010d313c9dd..ffd93cbf0a13 100644..100755
--- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
@@ -92,14 +92,6 @@ Reference<drawing::XDrawPage> PageDescriptor::GetXDrawPage (void) const
-sal_Int32 PageDescriptor::GetPageIndex (void) const
-{
- return mnIndex;
-}
-
-
-
-
view::PageObject* PageDescriptor::GetPageObject (void)
{
if (mpPageObject==NULL && mpPageObjectFactory!=NULL && mpPage != NULL)
@@ -279,14 +271,6 @@ Size PageDescriptor::GetPageNumberAreaModelSize (void) const
-bool PageDescriptor::IsCurrentPage (void) const
-{
- return mbIsCurrent;
-}
-
-
-
-
void PageDescriptor::SetIsCurrentPage (const bool bIsCurrent)
{
mbIsCurrent = bIsCurrent;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index db5d948b52fc..787086b4596e 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -631,18 +631,6 @@ void SlideSorterService::Resize (void)
-void SlideSorterService::Rearrange (void)
-{
- if (mxParentWindow.is())
- {
- awt::Rectangle aWindowBox = mxParentWindow->getPosSize();
- mpSlideSorter->GetController().Rearrange();
- }
-}
-
-
-
-
void SlideSorterService::ThrowIfDisposed (void)
throw (::com::sun::star::lang::DisposedException)
{
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
index a502442ab9f2..9af239c64fd1 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
@@ -204,7 +204,6 @@ private:
::boost::scoped_ptr<cppu::IPropertyArrayHelper> mpPropertyArrayHelper;
void Resize (void);
- void Rearrange (void);
/** This method throws a DisposedException when the object has already been
disposed.
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 83475948fab2..86ec4002cd02 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -327,22 +327,6 @@ SfxUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const
-SfxShell* SlideSorterViewShell::CreateInstance (
- sal_Int32,
- SfxShell*,
- void* pUserData,
- ViewShellBase& rBase)
-{
- return new SlideSorterViewShell (
- rBase.GetViewFrame(),
- rBase,
- static_cast< ::Window*>(pUserData),
- NULL);
-}
-
-
-
-
void SlideSorterViewShell::GetFocus (void)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 82aac5b2cd9e..47ce907be637 100644..100755
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -171,52 +171,6 @@ sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rPosition) const
-sal_Int32 SlideSorterView::GetFadePageIndexAtPoint (
- const Point& rPosition) const
-{
- sal_Int32 nIndex (-1);
-
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
- {
- Point aModelPosition (pWindow->PixelToLogic (rPosition));
- nIndex = mpLayouter->GetIndexAtPoint(
- aModelPosition,
- true // Include page borders into hit test
- );
-
- // Clip the page index against the page count.
- if (nIndex >= mrModel.GetPageCount())
- nIndex = -1;
-
- if (nIndex >= 0)
- {
- // Now test whether the given position is inside the area of the
- // fade effect indicator.
- view::PageObjectViewObjectContact* pContact
- = mrModel.GetPageDescriptor(nIndex)->GetViewObjectContact();
- if (pContact != NULL)
- {
- if ( ! pContact->GetBoundingBox(
- *pWindow,
- PageObjectViewObjectContact::FadeEffectIndicatorBoundingBox,
- PageObjectViewObjectContact::ModelCoordinateSystem).IsInside (
- aModelPosition))
- {
- nIndex = -1;
- }
- }
- else
- nIndex = -1;
- }
- }
-
- return nIndex;
-}
-
-
-
-
Layouter& SlideSorterView::GetLayouter (void)
{
return *mpLayouter.get();
@@ -725,14 +679,6 @@ ViewOverlay& SlideSorterView::GetOverlay (void)
-::sdr::contact::ObjectContact& SlideSorterView::GetObjectContact (void) const
-{
- return GetSdrPageView()->GetPageWindow(0)->GetObjectContact();
-}
-
-
-
-
SlideSorterView::PageRange SlideSorterView::GetVisiblePageRange (void)
{
const int nMaxPageIndex (mrModel.GetPageCount() - 1);
@@ -821,22 +767,6 @@ void SlideSorterView::UpdatePageBorders (void)
-Size SlideSorterView::GetPageNumberAreaModelSize (void) const
-{
- return maPageNumberAreaModelSize;
-}
-
-
-
-
-SvBorder SlideSorterView::GetModelBorder (void) const
-{
- return maModelBorder;
-}
-
-
-
-
void SlideSorterView::AddSdrObject (SdrObject& rObject)
{
mpPage->InsertObject(&rObject);
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index 1ba44caa24b0..3767a655c48b 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -71,22 +71,6 @@ Layouter::~Layouter (void)
}
-void Layouter::SetObjectWidth (
- sal_Int32 nMinimalWidth,
- sal_Int32 nMaximalWidth,
- sal_Int32 nPreferredWidth)
-{
- if (nMinimalWidth <= nPreferredWidth && nPreferredWidth <= nMaximalWidth)
- {
- mnMinimalWidth = nMinimalWidth;
- mnPreferredWidth = nMaximalWidth;
- mnMaximalWidth = nPreferredWidth;
- }
-}
-
-
-
-
void Layouter::SetBorders (
sal_Int32 nLeftBorder,
sal_Int32 nRightBorder,
@@ -125,20 +109,6 @@ void Layouter::SetPageBorders (
-void Layouter::SetGaps (
- sal_Int32 nHorizontalGap,
- sal_Int32 nVerticalGap)
-{
- if (nHorizontalGap >= 0)
- mnHorizontalGap.mnScreen = nHorizontalGap;
- if (nVerticalGap >= 0)
- mnVerticalGap.mnScreen = nVerticalGap;
-}
-
-
-
-
-
void Layouter::SetColumnCount (
sal_Int32 nMinimalColumnCount,
sal_Int32 nMaximalColumnCount)
@@ -337,14 +307,6 @@ bool Layouter::RearrangeVertical (
-void Layouter::SetZoom (double nZoomFactor, OutputDevice* pDevice)
-{
- SetZoom(Fraction(nZoomFactor), pDevice);
-}
-
-
-
-
void Layouter::SetZoom (Fraction nZoomFactor, OutputDevice* pDevice)
{
MapMode aMapMode (pDevice->GetMapMode());
@@ -406,14 +368,6 @@ sal_Int32 Layouter::GetColumnCount (void) const
-bool Layouter::IsColumnCountFixed (void) const
-{
- return mnMinimalColumnCount == mnMaximalColumnCount;
-}
-
-
-
-
Size Layouter::GetPageObjectSize (void) const
{
return maPageObjectModelSize;
@@ -801,13 +755,4 @@ sal_Int32 Layouter::ResolvePositionInGap (
-const Layouter::BackgroundRectangleList&
- Layouter::GetBackgroundRectangleList (void) const
-{
- return maBackgroundRectangleList;
-}
-
-
-
-
} } } // end of namespace ::sd::slidesorter::namespace
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
index 5ef90ad2830b..303e78eeff61 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
@@ -93,21 +93,6 @@ void PageObjectViewContact::ActionChanged (void)
ViewContactOfPageObj::ActionChanged();
}
-Rectangle PageObjectViewContact::GetPageObjectBoundingBox (void) const
-{
- // use model data directly here
- OSL_ASSERT(mpDescriptor.get()!=NULL);
- Rectangle aRetval(GetPageObject().GetLastBoundRect());
- const SvBorder aPageDescriptorBorder(mpDescriptor->GetModelBorder());
-
- aRetval.Left() -= aPageDescriptorBorder.Left();
- aRetval.Top() -= aPageDescriptorBorder.Top();
- aRetval.Right() += aPageDescriptorBorder.Right();
- aRetval.Bottom() += aPageDescriptorBorder.Bottom();
-
- return aRetval;
-}
-
SdrPageObj& PageObjectViewContact::GetPageObject (void) const
{
return ViewContactOfPageObj::GetPageObj();
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
index 32098abb523f..b1e4e80fdf1f 100755
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
@@ -627,7 +627,6 @@ private:
// private helpers
const BitmapEx& getFadeEffectIconBitmap() const;
- const BitmapEx& getCommentsIconBitmap() const;
protected:
// method which is to be used to implement the local decomposition of a 2D primitive.
@@ -685,21 +684,6 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c
const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnCommentsIndicatorOffset(9);
BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpCommentsIconBitmap = 0;
-const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getCommentsIconBitmap() const
-{
- if(mpCommentsIconBitmap == NULL)
- {
- // prepare CommentsIconBitmap on demand
- const sal_uInt16 nIconId(Application::GetSettings().GetStyleSettings().GetHighContrastMode()
- ? BMP_COMMENTS_INDICATOR_H
- : BMP_COMMENTS_INDICATOR);
- const BitmapEx aCommentsIconBitmap(IconCache::Instance().GetIcon(nIconId).GetBitmapEx());
- const_cast< SdPageObjectFadeNameNumberPrimitive* >(this)->mpCommentsIconBitmap = new BitmapEx(aCommentsIconBitmap);
- }
-
- return *mpCommentsIconBitmap;
-}
-
Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
{
const xub_StrLen nTextLength(getPageName().Len());
diff --git a/sd/source/ui/toolpanel/EmptyWindow.cxx b/sd/source/ui/toolpanel/EmptyWindow.cxx
deleted file mode 100644
index 2e964fa4e30b..000000000000
--- a/sd/source/ui/toolpanel/EmptyWindow.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_sd.hxx"
-
-#include "EmptyWindow.hxx"
-
-namespace sd { namespace toolpanel {
-
-
-EmptyWindow::EmptyWindow (
- Window* pParentWindow,
- Color aBackgroundColor,
- const String& rText)
- : Window (pParentWindow, WinBits()),
- msText (rText)
-{
- SetBackground (aBackgroundColor);
-}
-
-
-
-
-EmptyWindow::~EmptyWindow (void)
-{
-}
-
-
-
-
-void EmptyWindow::Paint (const Rectangle& )
-{
- Size aWindowSize (GetOutputSizePixel());
- Point aPosition(aWindowSize.Width()/2,aWindowSize.Height()/2);
-
- Rectangle aBBox;
- aPosition = Point(10,aWindowSize.Height()/2);
- if (GetTextBoundRect (aBBox, msText))
- aPosition = Point (
- (aWindowSize.Width()-aBBox.GetWidth())/2,
- (aWindowSize.Height()-aBBox.GetHeight())/2);
- DrawText (aPosition, msText);
-
- String sSizeString = String::CreateFromInt32(aWindowSize.Width());
- sSizeString.Append (String::CreateFromAscii(" x "));
- sSizeString.Append (String::CreateFromInt32(aWindowSize.Height()));
- if (GetTextBoundRect (aBBox, sSizeString))
- aPosition = Point (
- (aWindowSize.Width()-aBBox.GetWidth())/2,
- aPosition.Y() + GetTextHeight() + aBBox.GetHeight());
- DrawText (aPosition, sSizeString);
-}
-
-
-
-
-void EmptyWindow::Resize (void)
-{
- Window::Resize();
-}
-
-
-
-
-void EmptyWindow::GetFocus (void)
-{
- GetParent()->GrabFocus();
-}
-
-
-} } // end of namespace ::sd::tpv
diff --git a/sd/source/ui/toolpanel/EmptyWindow.hxx b/sd/source/ui/toolpanel/EmptyWindow.hxx
deleted file mode 100644
index 4137020874f5..000000000000
--- a/sd/source/ui/toolpanel/EmptyWindow.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_EMPTY_WINDOW_HXX
-#define SD_EMPTY_WINDOW_HXX
-
-#include <vcl/window.hxx>
-
-namespace sd { namespace toolpanel {
-
-/** Simply paint a solid background and a centered text.
-*/
-class EmptyWindow
- : public ::Window
-{
-public:
- EmptyWindow (
- ::Window* pParentWindow,
- Color rBackgroundColor,
- const String& rText);
- virtual ~EmptyWindow (void);
-
- virtual void Paint (const Rectangle& rBoundingBox);
- virtual void Resize (void);
- virtual void GetFocus (void);
-
-private:
- String msText;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index 7e0fd41ffb89..ec4eb1e43d4d 100755
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -263,14 +263,6 @@ LayoutMenu::~LayoutMenu (void)
-String LayoutMenu::GetSelectedLayoutName (void)
-{
- return GetItemText (GetSelectItemId());
-}
-
-
-
-
AutoLayout LayoutMenu::GetSelectedAutoLayout (void)
{
AutoLayout aResult = AUTOLAYOUT_NONE;
diff --git a/sd/source/ui/toolpanel/LayoutMenu.hxx b/sd/source/ui/toolpanel/LayoutMenu.hxx
index 86e01e9f803b..627a363fb576 100755
--- a/sd/source/ui/toolpanel/LayoutMenu.hxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.hxx
@@ -90,10 +90,6 @@ public:
static std::auto_ptr<ControlFactory> CreateControlFactory (
ToolPanelViewShell& i_rPanelViewShell );
- /** Return the name of the currently selected layout.
- */
- String GetSelectedLayoutName (void);
-
/** Return a numerical value representing the currently selected
layout.
*/
diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx
index cae08c76ca39..6b10ed889424 100755
--- a/sd/source/ui/toolpanel/ScrollPanel.cxx
+++ b/sd/source/ui/toolpanel/ScrollPanel.cxx
@@ -134,15 +134,6 @@ ScrollPanel::~ScrollPanel (void)
-void ScrollPanel::ListHasChanged (void)
-{
- mpControlContainer->ListHasChanged ();
- RequestResize ();
-}
-
-
-
-
TitledControl* ScrollPanel::AddControl (
::std::auto_ptr<TreeNode> pControl,
const String& rTitle,
diff --git a/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx b/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx
deleted file mode 100644
index 0aa2d3f91760..000000000000
--- a/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx
+++ /dev/null
@@ -1,98 +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_sd.hxx"
-
-#include "SimpleLayoutWrapper.hxx"
-
-#include <vcl/window.hxx>
-
-namespace sd { namespace toolpanel {
-
-SimpleLayoutWrapper::SimpleLayoutWrapper (
- ::std::auto_ptr< ::Window> pWindow,
- int nPreferredWidth,
- int nPreferredHeight,
- bool bIsResizable)
- : mpWindow (pWindow),
- mnPreferredWidth(nPreferredWidth),
- mnPreferredHeight(nPreferredHeight),
- mbIsResizable (bIsResizable)
-{
-}
-
-
-
-
-SimpleLayoutWrapper::~SimpleLayoutWrapper (void)
-{
-}
-
-
-
-
-Size SimpleLayoutWrapper::GetPreferredSize (void)
-{
- return Size (mnPreferredWidth, mnPreferredHeight);
-}
-
-
-
-
-sal_Int32 SimpleLayoutWrapper::GetPreferredWidth (sal_Int32)
-{
- return mnPreferredWidth;
-}
-
-
-
-
-sal_Int32 SimpleLayoutWrapper::GetPreferredHeight (sal_Int32)
-{
- return mnPreferredHeight;
-}
-
-
-
-
-bool SimpleLayoutWrapper::IsResizable (void)
-{
- return mbIsResizable;
-}
-
-
-
-
-::Window* SimpleLayoutWrapper::GetWindow (void)
-{
- return mpWindow.get();
-}
-
-
-} } // end of namespace ::sd::toolpanel
-
diff --git a/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx b/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx
deleted file mode 100644
index a05d9d6ff295..000000000000
--- a/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_TASKPANE_SIMPLE_LAYOUT_WRAPPER_HXX
-#define SD_TASKPANE_SIMPLE_LAYOUT_WRAPPER_HXX
-
-#include "taskpane/ILayoutableWindow.hxx"
-
-#include <memory>
-
-namespace sd { namespace toolpanel {
-
-
-/** Simple wrapper arround a regular VCL window that implements the
- methods that return the preferred size of the window. They are
- given once to the constructor and are not modified by the wrapper.
-*/
-class SimpleLayoutWrapper
- : public virtual ILayoutableWindow
-{
-public:
- SimpleLayoutWrapper (
- ::std::auto_ptr< ::Window> pWindow,
- int nPreferredWidth,
- int nPreferredHeight,
- bool bIsResizable);
- virtual ~SimpleLayoutWrapper (void);
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
-
- using sd::toolpanel::ILayoutableWindow::GetPreferredWidth;
- using sd::toolpanel::ILayoutableWindow::GetPreferredHeight;
-private:
- ::std::auto_ptr< ::Window> mpWindow;
- int mnPreferredWidth;
- int mnPreferredHeight;
- bool mbIsResizable;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx
index f554d44e8f18..73783b0f0a41 100755
--- a/sd/source/ui/toolpanel/SubToolPanel.cxx
+++ b/sd/source/ui/toolpanel/SubToolPanel.cxx
@@ -115,64 +115,6 @@ SubToolPanel::~SubToolPanel (void)
-void SubToolPanel::ListHasChanged (void)
-{
- mpControlContainer->ListHasChanged ();
- RequestResize ();
-}
-
-
-
-
-void SubToolPanel::AddControl (
- ::std::auto_ptr<TreeNode> pControl,
- const String& rTitle,
- ULONG nHelpId)
-{
- pControl->GetWindow()->AddEventListener (
- LINK(this,SubToolPanel,WindowEventListener));
-
- // We are interested only in the title. The control itself is
- // managed by the content object.
- TitledControl* pTitledControl = new TitledControl(
- this,
- pControl,
- rTitle,
- TitledControlStandardClickHandler(GetControlContainer(), ControlContainer::ES_TOGGLE),
- TitleBar::TBT_SUB_CONTROL_HEADLINE);
- pTitledControl->GetWindow()->SetParent(this);
- pTitledControl->GetWindow()->SetHelpId(nHelpId);
- ::std::auto_ptr<TreeNode> pChild (pTitledControl);
-
- // Add a down link only for the first control so that when
- // entering the sub tool panel the focus is set to the first control.
- if (mpControlContainer->GetControlCount() == 0)
- FocusManager::Instance().RegisterDownLink(GetParent(), pTitledControl->GetWindow());
- FocusManager::Instance().RegisterUpLink(pTitledControl->GetWindow(), GetParent());
-
- mpControlContainer->AddControl (pChild);
-}
-
-
-
-
-void SubToolPanel::AddControl (::std::auto_ptr<TreeNode> pControl)
-{
- pControl->GetWindow()->AddEventListener (
- LINK(this,SubToolPanel,WindowEventListener));
-
- // Add a down link only for the first control so that when
- // entering the sub tool panel the focus is set to the first control.
- if (mpControlContainer->GetControlCount() == 0)
- FocusManager::Instance().RegisterDownLink(GetParent(), pControl->GetWindow());
- FocusManager::Instance().RegisterUpLink(pControl->GetWindow(), GetParent());
-
- mpControlContainer->AddControl (pControl);
-}
-
-
-
-
void SubToolPanel::Paint (const Rectangle& rRect)
{
if (mbIsRearrangePending)
diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx
index 52054c43fe8b..0a9667dd2431 100755
--- a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx
@@ -76,19 +76,6 @@ void TaskPaneShellManager::ReleaseShell (SfxShell* )
// Nothing to do.
}
-// hack for annotation panel, better fix?
-void TaskPaneShellManager_AddSubShell ( TaskPaneShellManager* pManager, sal_Int32 nId, SfxShell* pShell, ::Window* pWindow )
-{
- if( pManager != NULL )
- pManager->AddSubShell( (ShellId)nId, pShell, pWindow );
-}
-
-void TaskPaneShellManager_RemoveSubShell ( TaskPaneShellManager* pManager, const SfxShell* pShell)
-{
- if( pManager != NULL )
- pManager->RemoveSubShell( pShell );
-}
-
void TaskPaneShellManager::AddSubShell (
ShellId nId,
SfxShell* pShell,
diff --git a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
index f70e643636d5..8c69e12c504d 100755
--- a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
@@ -55,22 +55,6 @@ TreeNode::~TreeNode (void)
-bool TreeNode::IsLeaf (void)
-{
- return (mpControlContainer.get()==NULL);
-}
-
-
-
-
-bool TreeNode::IsRoot (void)
-{
- return (mpParent==NULL);
-}
-
-
-
-
void TreeNode::SetParentNode (TreeNode* pNewParent)
{
mpParent = pNewParent;
@@ -277,18 +261,6 @@ void TreeNode::AddStateChangeListener (const Link& rListener)
-void TreeNode::RemoveStateChangeListener (const Link& rListener)
-{
- maStateChangeListeners.erase (
- ::std::find (
- maStateChangeListeners.begin(),
- maStateChangeListeners.end(),
- rListener));
-}
-
-
-
-
void TreeNode::FireStateChangeEvent (
TreeNodeStateChangeEventId eEventId,
TreeNode* pChild) const
diff --git a/sd/source/ui/toolpanel/TestMenu.cxx b/sd/source/ui/toolpanel/TestMenu.cxx
index 54c865f12728..a8f0b6df7893 100755
--- a/sd/source/ui/toolpanel/TestMenu.cxx
+++ b/sd/source/ui/toolpanel/TestMenu.cxx
@@ -37,6 +37,7 @@
namespace sd { namespace toolpanel {
+#ifdef SHOW_COLOR_MENU
/** This factory class is used to create instances of ColorMenu. It can be
extended so that its constructor stores arguments that later are passed
to new ColorMenu objects.
@@ -82,16 +83,12 @@ ColorMenu::~ColorMenu (void)
}
-
-
::std::auto_ptr<ControlFactory> ColorMenu::CreateControlFactory (void)
{
return ::std::auto_ptr<ControlFactory>(new ColorMenuFactory());
}
-
-
/** The preferred size depends on the preferred number of columns, the
number of items, and the size of the items.
*/
@@ -316,5 +313,6 @@ void ColorMenu::Fill (void)
maSet.InsertItem (++i, rSettings.GetFontColor());
maSet.SetItemText (i, String::CreateFromAscii("FontColor"));
}
+#endif
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestMenu.hxx b/sd/source/ui/toolpanel/TestMenu.hxx
index 2b5dfe2e2e57..0c4b3bfe6530 100755
--- a/sd/source/ui/toolpanel/TestMenu.hxx
+++ b/sd/source/ui/toolpanel/TestMenu.hxx
@@ -39,6 +39,8 @@ namespace sd { namespace toolpanel {
class ControlFactory;
+#ifdef SHOW_COLOR_MENU
+
/** This demo menu shows the colors that are available from the
StyleSettings.
*/
@@ -75,6 +77,7 @@ private:
int CalculateRowCount (const Size& rItemSize, int nColumnCount);
void Fill (void);
};
+#endif
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx
index f0b6951cefc4..044b40dcdb4f 100755
--- a/sd/source/ui/toolpanel/TestPanel.cxx
+++ b/sd/source/ui/toolpanel/TestPanel.cxx
@@ -37,6 +37,7 @@
namespace sd { namespace toolpanel {
+#ifdef SHOW_TEST_PANEL
/** This factory class is used to create instances of TestPanel. It can be
extended so that its constructor stores arguments that later are passed
to new TestPanel objects.
@@ -163,13 +164,11 @@ TestPanel::~TestPanel (void)
{
}
-
-
-
std::auto_ptr<ControlFactory> TestPanel::CreateControlFactory (void)
{
return std::auto_ptr<ControlFactory>(new TestPanelFactory());
}
+#endif
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestPanel.hxx b/sd/source/ui/toolpanel/TestPanel.hxx
index af1b97d0f885..494e5086b179 100755
--- a/sd/source/ui/toolpanel/TestPanel.hxx
+++ b/sd/source/ui/toolpanel/TestPanel.hxx
@@ -36,6 +36,8 @@ namespace sd { namespace toolpanel {
class ControlFactory;
class TreeNode;
+#ifdef SHOW_TEST_PANEL
+
/** This panel demonstrates how to create a panel for the task pane.
*/
class TestPanel
@@ -48,6 +50,8 @@ public:
static std::auto_ptr<ControlFactory> CreateControlFactory (void);
};
+#endif
+
} } // end of namespace ::sd::toolpanel
#endif
diff --git a/sd/source/ui/toolpanel/TitleToolBox.cxx b/sd/source/ui/toolpanel/TitleToolBox.cxx
deleted file mode 100755
index 403e826ee27a..000000000000
--- a/sd/source/ui/toolpanel/TitleToolBox.cxx
+++ /dev/null
@@ -1,67 +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_sd.hxx"
-
-#include "TitleToolBox.hxx"
-
-#include "res_bmp.hrc"
-#include <vcl/bitmap.hxx>
-#include <vcl/bitmapex.hxx>
-#include "sdresid.hxx"
-#include <rtl/ustring.hxx>
-
-namespace sd { namespace toolpanel {
-
-
-TitleToolBox::TitleToolBox (::Window* pParent, WinBits nStyle )
- : ToolBox( pParent, nStyle )
-{
- SetOutStyle (TOOLBOX_STYLE_FLAT);
- SetBackground (Wallpaper (
- GetSettings().GetStyleSettings().GetDialogColor()));
-}
-
-
-
-
-void TitleToolBox::DataChanged (const DataChangedEvent& rDCEvt)
-{
- Window::DataChanged (rDCEvt);
-
- if (rDCEvt.GetFlags() & SETTINGS_STYLE)
- {
- SetBackground (
- Wallpaper (GetSettings().GetStyleSettings().GetDialogColor()));
- }
-}
-
-
-
-
-} } // end of namespace ::sd::toolbox
diff --git a/sd/source/ui/toolpanel/TitleToolBox.hxx b/sd/source/ui/toolpanel/TitleToolBox.hxx
deleted file mode 100755
index db2c971c3539..000000000000
--- a/sd/source/ui/toolpanel/TitleToolBox.hxx
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_TOOLBOX_TITLETOOLBOX_HXX
-#define SD_TOOLBOX_TITLETOOLBOX_HXX
-
-#include <vcl/toolbox.hxx>
-
-class PushButton;
-
-namespace sd { namespace toolpanel {
-
-/** Copied from vcl/menu.cxx
-// To get the transparent mouse-over look, the TitleToolBox is actually a toolbox
-// overload DataChange to handle style changes correctly
-*/
-class TitleToolBox
- : public ToolBox
-{
-public:
- TitleToolBox (::Window* pParent, WinBits nStyle = 0);
-
- void DataChanged (const DataChangedEvent& rDCEvt);
-};
-
-} } // end of namespace ::sd::toolbox
-
-#endif
diff --git a/sd/source/ui/toolpanel/TitledControl.cxx b/sd/source/ui/toolpanel/TitledControl.cxx
index 4843102feb48..e83e6c47c10a 100755
--- a/sd/source/ui/toolpanel/TitledControl.cxx
+++ b/sd/source/ui/toolpanel/TitledControl.cxx
@@ -311,22 +311,6 @@ void TitledControl::SetEnabledState(bool bFlag)
-void TitledControl::SetUserData (void* pUserData)
-{
- mpUserData = pUserData;
-}
-
-
-
-
-void* TitledControl::GetUserData (void) const
-{
- return mpUserData;
-}
-
-
-
-
bool TitledControl::IsShowing (void) const
{
return mbVisible;
diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
index c4fc41e97744..730fc74795f2 100644..100755
--- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
@@ -24,7 +24,93 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AnimationSchemesPanel.cxx,v $
+ * $Revision: 1.6 $
+ *
+ * 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_sd.hxx"
+#include "AnimationSchemesPanel.hxx"
+
+#include "strings.hrc"
+#include "sdresid.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+
+namespace sd
+{
+
+ class ViewShellBase;
+ extern ::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase );
+
+namespace toolpanel { namespace controls {
+
+AnimationSchemesPanel::AnimationSchemesPanel(TreeNode* pParent, ViewShellBase& rBase)
+ : SubToolPanel (pParent),
+ maPreferredSize( 100, 200 )
+{
+ mpWrappedControl = createAnimationSchemesPanel( pParent->GetWindow(), rBase );
+ mpWrappedControl->Show();
+}
+
+AnimationSchemesPanel::~AnimationSchemesPanel()
+{
+ delete mpWrappedControl;
+}
+
+Size AnimationSchemesPanel::GetPreferredSize()
+{
+ return maPreferredSize;
+}
+sal_Int32 AnimationSchemesPanel::GetPreferredWidth(sal_Int32 )
+{
+ return maPreferredSize.Width();
+}
+sal_Int32 AnimationSchemesPanel::GetPreferredHeight(sal_Int32 )
+{
+ return maPreferredSize.Height();
+}
+::Window* AnimationSchemesPanel::GetWindow()
+{
+ return mpWrappedControl;
+}
+bool AnimationSchemesPanel::IsResizable()
+{
+ return true;
+}
+bool AnimationSchemesPanel::IsExpandable() const
+{
+ return true;
+}
+
+
+} } } // end of namespace ::sd::toolpanel::controls
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include "AnimationSchemesPanel.hxx"
diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
index 4cee546dae0d..dd3388fb0342 100644..100755
--- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
@@ -24,6 +24,35 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AnimationSchemesPanel.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
@@ -66,3 +95,44 @@ private:
} } } // end of namespace ::sd::toolpanel::controls
#endif
+#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
+#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
+
+#include "taskpane/SubToolPanel.hxx"
+
+namespace sd {
+class ViewShellBase;
+}
+
+namespace sd { namespace toolpanel {
+class TreeNode;
+} }
+
+namespace sd { namespace toolpanel { namespace controls {
+
+class AnimationSchemesPanel
+ : public SubToolPanel
+{
+public:
+ AnimationSchemesPanel (
+ TreeNode* pParent,
+ ViewShellBase& rBase);
+ virtual ~AnimationSchemesPanel (void);
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual ::Window* GetWindow (void);
+ virtual bool IsResizable (void);
+ virtual bool IsExpandable (void) const;
+
+ using Window::GetWindow;
+
+private:
+ Size maPreferredSize;
+ ::Window* mpWrappedControl;
+};
+
+} } } // end of namespace ::sd::toolpanel::controls
+
+#endif
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
index 444ecd6dacb4..80a094ec1a66 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
@@ -73,24 +73,6 @@ namespace {
typedef ::std::vector<SharedMasterPageDescriptor> MasterPageContainerType;
-
-class PreviewCreationRequest
-{
-public:
- PreviewCreationRequest (MasterPageContainer::Token aToken, int nPriority);
- MasterPageContainer::Token maToken;
- int mnPriority;
- class Compare {public:
- bool operator() (const PreviewCreationRequest& r1,const PreviewCreationRequest& r2);
- };
- class CompareToken {public:
- MasterPageContainer::Token maToken;
- CompareToken(MasterPageContainer::Token aToken);
- bool operator() (const PreviewCreationRequest& rRequest);
- };
-};
-
-
} // end of anonymous namespace
@@ -423,28 +405,6 @@ MasterPageContainer::Token MasterPageContainer::GetTokenForURL (
-MasterPageContainer::Token MasterPageContainer::GetTokenForPageName (
- const String& sPageName)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- Token aResult (NIL_TOKEN);
- if (sPageName.Len() > 0)
- {
- MasterPageContainerType::iterator iEntry (
- ::std::find_if (
- mpImpl->maContainer.begin(),
- mpImpl->maContainer.end(),
- MasterPageDescriptor::PageNameComparator(sPageName)));
- if (iEntry != mpImpl->maContainer.end())
- aResult = (*iEntry)->maToken;
- }
- return aResult;
-}
-
-
-
-
MasterPageContainer::Token MasterPageContainer::GetTokenForStyleName (const String& sStyleName)
{
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
@@ -589,46 +549,6 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken)
-void MasterPageContainer::SetPreviewProviderForToken (
- Token aToken,
- const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get()!=NULL)
- {
- pDescriptor->mpPreviewProvider = rpPreviewProvider;
- mpImpl->InvalidatePreview(aToken);
- }
-}
-
-
-
-
-SdPage* MasterPageContainer::GetSlideForToken (
- MasterPageContainer::Token aToken,
- bool bLoad)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- SdPage* pSlide = NULL;
- SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != NULL)
- {
- pSlide = pDescriptor->mpSlide;
- if (pSlide==NULL && bLoad)
- {
- GetPageObjectForToken(aToken, bLoad);
- pSlide = pDescriptor->mpSlide;
- }
- }
- return pSlide;
-}
-
-
-
-
SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken (
MasterPageContainer::Token aToken)
{
@@ -639,19 +559,6 @@ SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken (
-
-bool MasterPageContainer::UpdateDescriptor (
- const SharedMasterPageDescriptor& rpDescriptor,
- bool bForcePageObject,
- bool bForcePreview,
- bool bSendEvents)
-{
- return mpImpl->UpdateDescriptor(rpDescriptor, bForcePageObject, bForcePreview, bSendEvents);
-}
-
-
-
-
void MasterPageContainer::InvalidatePreview (MasterPageContainer::Token aToken)
{
mpImpl->InvalidatePreview(aToken);
@@ -1311,58 +1218,3 @@ void MasterPageContainer::Implementation::FillingDone (void)
} } } // end of namespace ::sd::toolpanel::controls
-
-
-
-
-namespace {
-
-//===== PreviewCreationRequest ================================================
-
-PreviewCreationRequest::PreviewCreationRequest (
- MasterPageContainer::Token aToken,
- int nPriority)
- : maToken(aToken),
- mnPriority(nPriority)
-{
-}
-
-
-
-
-bool PreviewCreationRequest::Compare::operator() (
- const PreviewCreationRequest& aRequest1,
- const PreviewCreationRequest& aRequest2)
-{
- if (aRequest1.mnPriority != aRequest2.mnPriority)
- {
- // Prefer requests with higher priority.
- return aRequest1.mnPriority > aRequest2.mnPriority;
- }
- else
- {
- // Prefer tokens that have been earlier created (those with lower
- // value).
- return aRequest1.maToken < aRequest2.maToken;
- }
-}
-
-
-
-
-PreviewCreationRequest::CompareToken::CompareToken (MasterPageContainer::Token aToken)
- : maToken(aToken)
-{
-}
-
-
-
-
-bool PreviewCreationRequest::CompareToken::operator() (const PreviewCreationRequest& aRequest)
-{
- return maToken==aRequest.maToken;
-}
-
-
-
-} // end of anonymous namespace
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
index d922c089ffb4..60f760f63e34 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
@@ -143,26 +143,16 @@ public:
Token GetTokenForIndex (int nIndex);
Token GetTokenForURL (const String& sURL);
- Token GetTokenForPageName (const String& sPageName);
Token GetTokenForStyleName (const String& sStyleName);
Token GetTokenForPageObject (const SdPage* pPage);
String GetURLForToken (Token aToken);
String GetPageNameForToken (Token aToken);
String GetStyleNameForToken (Token aToken);
- SdPage* GetSlideForToken (Token aToken, bool bLoad=true);
SdPage* GetPageObjectForToken (Token aToken, bool bLoad=true);
Origin GetOriginForToken (Token aToken);
sal_Int32 GetTemplateIndexForToken (Token aToken);
::boost::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken);
- bool UpdateDescriptor (
- const ::boost::shared_ptr<MasterPageDescriptor>& rpDescriptor,
- bool bForcePageObject,
- bool bForcePreview,
- bool bSendEvents);
-
- void SetPreviewProviderForToken (Token aToken,
- const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider);
void InvalidatePreview (Token aToken);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
index 9a5eefb6d925..61483f278a4f 100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
@@ -387,46 +387,6 @@ bool DefaultPageObjectProvider::operator== (const PageObjectProvider& rProvider)
-//===== DefaultPagePreviewProvider ============================================
-
-DefaultPagePreviewProvider::DefaultPagePreviewProvider (void)
-{
-}
-
-
-
-Image DefaultPagePreviewProvider::operator() (
- int nWidth,
- SdPage* pPage,
- ::sd::PreviewRenderer& rRenderer)
-{
- // Unused parameters.
- (void)nWidth;
- (void)pPage;
- (void)rRenderer;
-
- return Image();
-}
-
-
-
-
-int DefaultPagePreviewProvider::GetCostIndex (void)
-{
- return 0;
-}
-
-
-
-
-bool DefaultPagePreviewProvider::NeedsPageObject (void)
-{
- return false;
-}
-
-
-
-
//===== ExistingPageProvider ==================================================
ExistingPageProvider::ExistingPageProvider (SdPage* pPage)
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
index 7cde148b3e3d..071b23cdbb16 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
@@ -170,21 +170,6 @@ public:
-
-/** Used temporarily to avoid the (expensive) creation of the default page
- too early.
-*/
-class DefaultPagePreviewProvider : public PreviewProvider
-{
-public:
- DefaultPagePreviewProvider (void);
- virtual Image operator() (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer);
- virtual int GetCostIndex (void);
- virtual bool NeedsPageObject (void);
-};
-
-
-
/** This implementation of the PageObjectProvider simply returns an already
existing master page object.
*/
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
index 49ae6dff264d..6871883d65f5 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
@@ -337,28 +337,6 @@ bool MasterPageDescriptor::URLComparator::operator() (
-//===== PageNameComparator ====================================================
-
-MasterPageDescriptor::PageNameComparator::PageNameComparator (const ::rtl::OUString& sPageName)
- : msPageName(sPageName)
-{
-}
-
-
-
-
-bool MasterPageDescriptor::PageNameComparator::operator() (
- const SharedMasterPageDescriptor& rDescriptor)
-{
- if (rDescriptor.get() == NULL)
- return false;
- else
- return rDescriptor->msPageName.equals(msPageName);
-}
-
-
-
-
// ===== StyleNameComparator ==================================================
MasterPageDescriptor::StyleNameComparator::StyleNameComparator (const ::rtl::OUString& sStyleName)
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
index 1eea46bd1802..0303989e3379 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
@@ -214,11 +214,6 @@ public:
URLComparator (const ::rtl::OUString& sURL);
bool operator() (const SharedMasterPageDescriptor& rDescriptor);
};
- class PageNameComparator { public:
- ::rtl::OUString msPageName;
- PageNameComparator (const ::rtl::OUString& sPageName);
- bool operator() (const SharedMasterPageDescriptor& rDescriptor);
- };
class StyleNameComparator { public:
::rtl::OUString msStyleName;
StyleNameComparator (const ::rtl::OUString& sStyleName);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
index 0f485174009d..2ba0cc678403 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
@@ -187,15 +187,6 @@ MasterPageObserver::~MasterPageObserver (void)
-MasterPageObserver::MasterPageNameSet MasterPageObserver::GetMasterPageNames (
- SdDrawDocument& rDocument)
-{
- return mpImpl->GetMasterPageNames (rDocument);
-}
-
-
-
-
//===== MasterPageObserver::Implementation ====================================
void MasterPageObserver::Implementation::RegisterDocument (
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
index 4571d4278140..b321dbf8dd14 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
@@ -41,7 +41,6 @@
#include "app.hrc"
#include "res_bmp.hrc"
#include "strings.hrc"
-#include "showview.hxx"
#include "DrawViewShell.hxx"
#include "DrawController.hxx"
#include "SlideSorterViewShell.hxx"
@@ -699,21 +698,6 @@ void MasterPagesSelector::RemoveTokenToIndexEntry (
-void MasterPagesSelector::InvalidatePreview (MasterPageContainer::Token aToken)
-{
- const ::osl::MutexGuard aGuard (maMutex);
-
- int nIndex (GetIndexForToken(aToken));
- if (nIndex > 0)
- {
- mpContainer->InvalidatePreview(aToken);
- mpContainer->RequestPreview(aToken);
- }
-}
-
-
-
-
void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
{
const ::osl::MutexGuard aGuard (maMutex);
@@ -734,20 +718,6 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
}
}
-
-
-
-void MasterPagesSelector::InvalidateAllPreviews (void)
-{
- const ::osl::MutexGuard aGuard (maMutex);
-
- for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
- InvalidatePreview(nIndex);
-}
-
-
-
-
void MasterPagesSelector::UpdateAllPreviews (void)
{
const ::osl::MutexGuard aGuard (maMutex);
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
index a480729aa9c8..a2df51f2bd4b 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
@@ -131,14 +131,8 @@ public:
Index into the value set control that is used for displaying the
previews.
*/
- void InvalidatePreview (MasterPageContainer::Token aToken);
void InvalidatePreview (const SdPage* pPage);
- /** Mark all previews as no being up-to-date anymore. This method is
- typically called when the size of the previews has changed.
- */
- void InvalidateAllPreviews (void);
-
void UpdateAllPreviews (void);
protected:
diff --git a/sd/source/ui/toolpanel/controls/makefile.mk b/sd/source/ui/toolpanel/controls/makefile.mk
index 33871a415a7e..b2218e55008c 100644..100755
--- a/sd/source/ui/toolpanel/controls/makefile.mk
+++ b/sd/source/ui/toolpanel/controls/makefile.mk
@@ -59,8 +59,7 @@ SLOFILES = \
$(SLO)$/RecentMasterPagesSelector.obj \
$(SLO)$/CustomAnimationPanel.obj \
$(SLO)$/SlideTransitionPanel.obj \
- $(SLO)$/TableDesignPanel.obj \
- $(SLO)$/AnimationSchemesPanel.obj
+ $(SLO)$/TableDesignPanel.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/toolpanel/makefile.mk b/sd/source/ui/toolpanel/makefile.mk
index 4d83b8a85a70..262b32535ef3 100755
--- a/sd/source/ui/toolpanel/makefile.mk
+++ b/sd/source/ui/toolpanel/makefile.mk
@@ -45,10 +45,8 @@ PRJINC=..$/slidesorter
SLOFILES = \
$(SLO)$/ControlContainer.obj \
$(SLO)$/ScrollPanel.obj \
- $(SLO)$/SimpleLayoutWrapper.obj \
$(SLO)$/SubToolPanel.obj \
$(SLO)$/TitleBar.obj \
- $(SLO)$/TitleToolBox.obj \
$(SLO)$/TitledControl.obj \
$(SLO)$/TaskPaneControlFactory.obj \
$(SLO)$/TaskPaneFocusManager.obj \
@@ -59,7 +57,6 @@ SLOFILES = \
$(SLO)$/ToolPanelFactory.obj \
$(SLO)$/ToolPanelUIElement.obj \
\
- $(SLO)$/EmptyWindow.obj \
$(SLO)$/LayoutMenu.obj \
$(SLO)$/TestMenu.obj \
$(SLO)$/TestPanel.obj \
diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx
index 010571b10927..9cf24dccd508 100644..100755
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -58,22 +58,6 @@ void SAL_CALL PropertySet::disposing (void)
{
}
-
-
-
-beans::UnknownPropertyException PropertySet::CreateUnknownPropertyException (
- const rtl::OUString& rsPropertyName)
-{
- return beans::UnknownPropertyException(
- OUString::createFromAscii("property ")
- + rsPropertyName
- + OUString::createFromAscii(" is not known"),
- static_cast<XWeak*>(this));
-}
-
-
-
-
//----- XPropertySet ----------------------------------------------------------
Reference<beans::XPropertySetInfo> SAL_CALL PropertySet::getPropertySetInfo (void)
diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
index 878ef16a52f4..4ed95bbf5b99 100644..100755
--- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx
+++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
@@ -152,31 +152,6 @@ void SdGlobalResourceContainer::AddResource (const Reference<XInterface>& rxReso
-
-::std::auto_ptr<SdGlobalResource> SdGlobalResourceContainer::ReleaseResource (
- SdGlobalResource* pResource)
-{
- ::std::auto_ptr<SdGlobalResource> pResult (NULL);
-
- ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- Implementation::ResourceList::iterator iResource;
- iResource = ::std::find (
- mpImpl->maResources.begin(),
- mpImpl->maResources.end(),
- pResource);
- if (iResource != mpImpl->maResources.end())
- {
- pResult.reset (*iResource);
- mpImpl->maResources.erase(iResource);
- }
-
- return pResult;
-}
-
-
-
-
SdGlobalResourceContainer::SdGlobalResourceContainer (void)
: mpImpl (new SdGlobalResourceContainer::Implementation())
{
diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx
index e8e2ffb24f2b..b3175b7fdb4a 100644..100755
--- a/sd/source/ui/tools/SlotStateListener.cxx
+++ b/sd/source/ui/tools/SlotStateListener.cxx
@@ -45,16 +45,6 @@ using namespace ::rtl;
namespace sd { namespace tools {
-SlotStateListener::SlotStateListener (void)
- : SlotStateListenerInterfaceBase(maMutex),
- maCallback(),
- mxDispatchProviderWeak(NULL)
-{
-}
-
-
-
-
SlotStateListener::SlotStateListener (
Link& rCallback,
const uno::Reference<frame::XDispatchProvider>& rxDispatchProvider,
@@ -125,14 +115,6 @@ void SlotStateListener::ObserveSlot (const ::rtl::OUString& rSlotName)
-bool SlotStateListener::IsValid (void) const
-{
- return maRegisteredURLList.size() > 0;
-}
-
-
-
-
void SlotStateListener::disposing (void)
{
ReleaseListeners();
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index b0eac4990c50..2bc98cd66de3 100755
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -380,18 +380,6 @@ void SAL_CALL
-::awt::Rectangle DrawController::GetVisArea (void) const
-{
- return awt::Rectangle(
- maLastVisArea.Left(),
- maLastVisArea.Top(),
- maLastVisArea.GetWidth(),
- maLastVisArea.GetHeight());
-}
-
-
-
-
// XDrawView
void SAL_CALL DrawController::setCurrentPage( const Reference< drawing::XDrawPage >& xPage )
diff --git a/sd/source/ui/unoidl/makefile.mk b/sd/source/ui/unoidl/makefile.mk
index 66d80e1a529a..cf4910b29186 100755
--- a/sd/source/ui/unoidl/makefile.mk
+++ b/sd/source/ui/unoidl/makefile.mk
@@ -65,7 +65,6 @@ SLO1FILES = \
$(SLO)$/unowcntr.obj \
$(SLO)$/unokywds.obj \
$(SLO)$/unopback.obj \
- $(SLO)$/unovwcrs.obj \
$(SLO)$/unodoc.obj \
$(SLO)$/unomodule.obj \
$(SLO)$/randomnode.obj
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index b8f48a6928aa..1935c424ec03 100644..100755
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -493,24 +493,3 @@ SdCustomShow * SdXCustomPresentationAccess::getSdCustomShow( const OUString& Nam
}
return NULL;
}
-
-sal_Int32 SdXCustomPresentationAccess::getSdCustomShowIdx( const OUString& Name ) const throw()
-{
- sal_Int32 nIdx = 0;
-
- List* pList = GetCustomShowList();
- const sal_Int32 nCount = pList?pList->Count():0;
-
- const String aName( Name );
-
- while( nIdx < nCount )
- {
- SdCustomShow* pShow = (SdCustomShow*)pList->GetObject(nIdx);
- if( pShow->GetName() == aName )
- return nIdx;
- nIdx++;
- }
- return -1;
-}
-
-
diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx
index 1267b3a58b0a..615d5ba7007c 100644..100755
--- a/sd/source/ui/unoidl/unocpres.hxx
+++ b/sd/source/ui/unoidl/unocpres.hxx
@@ -124,7 +124,6 @@ private:
// intern
inline List* GetCustomShowList() const throw();
- sal_Int32 getSdCustomShowIdx( const ::rtl::OUString& Name ) const throw();
SdCustomShow * getSdCustomShow( const ::rtl::OUString& Name ) const throw();
public:
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index d4ea1dce196f..f31c960d432d 100644..100755
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -311,14 +311,6 @@ typedef SORT* PSORT;
extern "C" int __LOADONCALLAPI SortFunc( const void* p1, const void* p2 );
-SdXShape::SdXShape() throw()
-: mpPropSet(lcl_GetEmpty_SdXShapePropertySet_Impl()),
- mpMap(lcl_GetEmpty_SdXShapePropertyMap_Impl()),
- mpModel(NULL),
- mpImplementationId(NULL)
-{
-}
-
SdXShape::SdXShape( SvxShape* pShape, SdXImpressDocument* pModel) throw()
: mpShape( pShape ),
mpPropSet( pModel?
diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx
index 3e7c3fab7d3c..0e472f41ff16 100644..100755
--- a/sd/source/ui/unoidl/unoobj.hxx
+++ b/sd/source/ui/unoidl/unoobj.hxx
@@ -75,7 +75,6 @@ private:
com::sun::star::uno::Sequence< sal_Int8 >* mpImplementationId;
public:
- SdXShape() throw();
SdXShape(SvxShape* pShape, SdXImpressDocument* pModel) throw();
virtual ~SdXShape() throw();
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 0a7469d22373..379344667a0c 100755
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -345,7 +345,34 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind )
return pRet;
}
-UNO3_GETIMPLEMENTATION2_IMPL( SdGenericDrawPage, SvxFmDrawPage );
+const ::com::sun::star::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTunnelId() throw()
+{
+ static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
+ }
+ else
+ {
+ return SvxFmDrawPage::getSomething( rId );
+ }
+}
/***********************************************************************
* *
diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx
index 52e5cc061f7d..5d525b0f0f04 100644..100755
--- a/sd/source/ui/unoidl/unopage.hxx
+++ b/sd/source/ui/unoidl/unopage.hxx
@@ -113,7 +113,8 @@ public:
SdPage* GetPage() const { return (SdPage*)SvxDrawPage::mpPage; }
SdXImpressDocument* GetModel() const;
- UNO3_GETIMPLEMENTATION_DECL( SdGenericDrawPage )
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
// this is called whenever a SdrObject must be created for a empty api shape wrapper
virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw();
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index a1cd11861d3a..56133e03a375 100644..100755
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -105,11 +105,6 @@ SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XDrawPage* pPage ) th
mpPage = pPage;
}
-SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XShape* pShape ) throw()
-{
- mpShape = pShape;
-}
-
SdUnoSearchReplaceShape::~SdUnoSearchReplaceShape() throw()
{
}
diff --git a/sd/source/ui/unoidl/unovwcrs.cxx b/sd/source/ui/unoidl/unovwcrs.cxx
deleted file mode 100644
index 8b72cbe1fd96..000000000000
--- a/sd/source/ui/unoidl/unovwcrs.cxx
+++ /dev/null
@@ -1,209 +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_sd.hxx"
-#include <com/sun/star/text/XTextViewCursor.hpp>
-#include <com/sun/star/view/XScreenCursor.hpp>
-#include <sfx2/request.hxx>
-#include <vos/mutex.hxx>
-#include "View.hxx"
-#ifndef SVX_LIGHT
-#ifndef SD_DRAW_DOC_SHELL_HXX
-#include "DrawDocShell.hxx"
-#endif
-#endif
-#include "ViewShell.hxx"
-#include "slideshow.hxx"
-
-#include <cppuhelper/implbase2.hxx>
-#include <vcl/svapp.hxx>
-
-using namespace ::vos;
-using namespace ::rtl;
-using namespace ::com::sun::star;
-
-class SdXTextViewCursor
- : public ::cppu::WeakImplHelper2<
- text::XTextViewCursor,
- view::XScreenCursor >
-{
-public:
- SdXTextViewCursor(::sd::View* pVw) throw();
- virtual ~SdXTextViewCursor() throw();
-
- //XTextViewCursor
- virtual sal_Bool SAL_CALL isVisible(void) throw( uno::RuntimeException );
- virtual void SAL_CALL setVisible(sal_Bool bVisible) throw( uno::RuntimeException );
- virtual awt::Point SAL_CALL getPosition(void) throw( uno::RuntimeException );
-
- //XTextCursor
- virtual void SAL_CALL collapseToStart(void) throw( uno::RuntimeException );
- virtual void SAL_CALL collapseToEnd(void) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL isCollapsed(void) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException );
- virtual void SAL_CALL gotoStart(sal_Bool Expand) throw( uno::RuntimeException );
- virtual void SAL_CALL gotoEnd(sal_Bool Expand) throw( uno::RuntimeException );
- virtual void SAL_CALL gotoRange(const uno::Reference< text::XTextRange > & rRange, sal_Bool bExpand ) throw (::com::sun::star::uno::RuntimeException);
-
- //XTextRange
- virtual uno::Reference< text::XText > SAL_CALL getText(void) throw( uno::RuntimeException );
- virtual uno::Reference< text::XTextRange > SAL_CALL getStart(void) throw( uno::RuntimeException );
- virtual uno::Reference< text::XTextRange > SAL_CALL getEnd(void) throw( uno::RuntimeException );
- virtual OUString SAL_CALL getString(void) throw( uno::RuntimeException );
- virtual void SAL_CALL setString(const OUString& aString) throw( uno::RuntimeException );
-
- //XScreenCursor
- virtual sal_Bool SAL_CALL screenDown(void) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL screenUp(void) throw( uno::RuntimeException );
-
- void Invalidate() { mpView = 0; }
-
-private:
- ::sd::View* mpView;
-};
-
-
-text::XTextViewCursor* CreateSdXTextViewCursor(::sd::View* mpView )
-{
- return new SdXTextViewCursor( mpView );
-}
-
-SdXTextViewCursor::SdXTextViewCursor(::sd::View* pSdView ) throw()
- : mpView(pSdView)
-{
-
-}
-
-SdXTextViewCursor::~SdXTextViewCursor() throw()
-{
-}
-
-sal_Bool SdXTextViewCursor::isVisible(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_True;
-}
-
-void SdXTextViewCursor::setVisible(sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-awt::Point SdXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return awt::Point();
-}
-
-void SdXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-void SdXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-sal_Bool SdXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_True;
-
-}
-
-sal_Bool SdXTextViewCursor::goLeft(sal_Int16 , sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_False;
-}
-
-sal_Bool SdXTextViewCursor::goRight(sal_Int16, sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_False;
-}
-
-void SdXTextViewCursor::gotoRange(const uno::Reference< text::XTextRange > &, sal_Bool ) throw (::com::sun::star::uno::RuntimeException)
-{
- DBG_WARNING("not implemented");
-}
-
-void SdXTextViewCursor::gotoStart(sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-void SdXTextViewCursor::gotoEnd(sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-sal_Bool SdXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
-{
- OGuard aGuard(Application::GetSolarMutex());
- return sal_False;
-}
-
-sal_Bool SdXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
-{
- OGuard aGuard(Application::GetSolarMutex());
- return sal_False;
-}
-
-uno::Reference< text::XText > SdXTextViewCursor::getText(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return uno::Reference< text::XText > ();
-}
-
-uno::Reference< text::XTextRange > SdXTextViewCursor::getStart(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return uno::Reference< text::XTextRange > ();
-}
-
-uno::Reference< text::XTextRange > SdXTextViewCursor::getEnd(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return uno::Reference< text::XTextRange > ();
-}
-
-OUString SdXTextViewCursor::getString(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return OUString();
-}
-
-void SdXTextViewCursor::setString(const OUString& ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-
diff --git a/sd/source/ui/unoidl/unowcntr.cxx b/sd/source/ui/unoidl/unowcntr.cxx
index fbb9991981f9..e29ee1e1516e 100644..100755
--- a/sd/source/ui/unoidl/unowcntr.cxx
+++ b/sd/source/ui/unoidl/unowcntr.cxx
@@ -77,31 +77,6 @@ void SvUnoWeakContainer::insert( uno::WeakReference< uno::XInterface > xRef ) th
mpList->Insert( new uno::WeakReference< uno::XInterface >( xRef ) );
}
-/** removes the given ref from this container */
-void SvUnoWeakContainer::remove( uno::WeakReference< uno::XInterface > xRef ) throw()
-{
- uno::WeakReference< uno::XInterface >* pRef = mpList->First();
- while( pRef )
- {
- uno::Reference< uno::XInterface > xTestRef( *pRef );
- if(!xTestRef.is())
- {
- delete mpList->Remove();
- pRef = mpList->GetCurObject();
- }
- else
- {
- if( *pRef == xRef )
- {
- delete mpList->Remove();
- break;
- }
-
- pRef = mpList->Next();
- }
- }
-}
-
/** searches the container for a ref that returns true on the given
search function
*/
diff --git a/sd/source/ui/unoidl/unowcntr.hxx b/sd/source/ui/unoidl/unowcntr.hxx
index 86d68f3c4d22..a35c27cfd583 100644..100755
--- a/sd/source/ui/unoidl/unowcntr.hxx
+++ b/sd/source/ui/unoidl/unowcntr.hxx
@@ -46,9 +46,6 @@ public:
/** inserts the given ref into this container */
void insert( ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > xRef ) throw();
- /** removes the given ref from this container */
- void remove( ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > xRef ) throw();
-
/** searches the container for a ref that returns true on the given
search function
*/
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index fd07d966ad47..356c03b82387 100755
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -427,23 +427,6 @@ BOOL Outliner::SpellNextDocument (void)
}
-void Outliner::HandleOutsideChange (ChangeHint eHint)
-{
- switch (eHint)
- {
- case CH_VIEW_SHELL_INVALID:
- EndSpelling();
- mbPrepareSpellingPending = true;
- mbViewShellValid = false;
- break;
-
- case CH_VIEW_SHELL_VALID:
- mbViewShellValid = true;
- break;
- }
-}
-
-
/*************************************************************************
|*
@@ -1088,23 +1071,6 @@ void Outliner::EndOfSearch (void)
}
}
-
-
-
-void Outliner::InitPage (USHORT nPageIndex)
-{
- (void)nPageIndex;
-
- ::sd::outliner::IteratorPosition aPosition (*maObjectIterator);
- if (aPosition.meEditMode == EM_PAGE)
- mnPageCount = mpDrawDocument->GetSdPageCount(aPosition.mePageKind);
- else
- mnPageCount = mpDrawDocument->GetMasterSdPageCount(aPosition.mePageKind);
-}
-
-
-
-
void Outliner::ShowEndOfSearchDialog (void)
{
String aString;
@@ -1487,36 +1453,6 @@ bool Outliner::HandleFailedSearch (void)
}
-#if ENABLE_LAYOUT
-#define SvxSearchDialog Window
-#endif
-
-/** See task #95227# for discussion about correct parent for dialogs/info boxes.
-*/
-::Window* Outliner::GetParentForDialog (void)
-{
- ::Window* pParent = NULL;
-
- if (meMode == SEARCH)
- pParent = static_cast<SvxSearchDialog*>(
- SfxViewFrame::Current()->GetChildWindow(
- SvxSearchDialogWrapper::GetChildWindowId())->GetWindow());
-
- if (pParent == NULL)
- pParent = mpViewShell->GetActiveWindow();
-
- if (pParent == NULL)
- pParent = Application::GetDefDialogParent();
- //1.30->1.31 of sdoutl.cxx pParent = Application::GetDefModalDialogParent();
-
- return pParent;
-}
-
-#if ENABLE_LAYOUT
-#undef SvxSearchDialog
-#endif
-
-
SdrObject* Outliner::SetObject (
const ::sd::outliner::IteratorPosition& rPosition)
{
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 81f9a50d256d..226d767c6c91 100644..100755
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -67,15 +67,6 @@ IteratorPosition::IteratorPosition (const IteratorPosition& aPosition)
{
}
-IteratorPosition::IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode)
-: mxObject(pObject)
-, mnText(nText)
-, mnPageIndex(nPageIndex)
-, mePageKind(ePageKind)
-, meEditMode(eEditMode)
-{
-}
-
IteratorPosition::~IteratorPosition (void)
{
}
@@ -119,11 +110,6 @@ Iterator::Iterator (IteratorImplBase* pObject)
mpIterator = pObject;
}
-Iterator::Iterator (const IteratorImplBase& rObject)
-{
- mpIterator = rObject.Clone();
-}
-
Iterator::~Iterator (void)
{
delete mpIterator;
@@ -266,28 +252,6 @@ Iterator OutlinerContainer::CreateSelectionIterator (
rObjectList, nObjectIndex, pDocument, rpViewShell, bDirectionIsForward));
}
-Iterator OutlinerContainer::CreateViewIterator (
- SdDrawDocument* pDocument,
- const ::boost::shared_ptr<ViewShell>& rpViewShell,
- bool bDirectionIsForward,
- IteratorLocation aLocation)
-{
- OSL_ASSERT(rpViewShell.get());
-
- const ::boost::shared_ptr<DrawViewShell> pDrawViewShell(
- ::boost::dynamic_pointer_cast<DrawViewShell>(rpViewShell));
- sal_Int32 nPageIndex = GetPageIndex (
- pDocument,
- rpViewShell,
- pDrawViewShell.get() ? pDrawViewShell->GetPageKind() : PK_STANDARD,
- pDrawViewShell.get() ? pDrawViewShell->GetEditMode() : EM_PAGE,
- bDirectionIsForward,
- aLocation);
-
- return Iterator (new ViewIteratorImpl (
- nPageIndex, pDocument, rpViewShell, bDirectionIsForward));
-}
-
Iterator OutlinerContainer::CreateDocumentIterator (
SdDrawDocument* pDocument,
const ::boost::shared_ptr<ViewShell>& rpViewShell,
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 4919a9fe2bbb..ce3064392d40 100755
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -119,10 +119,9 @@ private:
/** Manage tool bars that are implemented as sub shells of a view shell.
The typical procedure of updating the sub shells of a view shell is to
rebuild a list of sub shells that the caller would like to have active.
- The methods ClearGroup(), AddShellId(), and RemoveShellId() allow the
- caller to do that. A final call to UpdateShells() activates the
- requested shells that are not active and deactivates the active shells
- that are not requested.
+ The methods ClearGroup() and AddShellId() allow the caller to do that. A
+ final call to UpdateShells() activates the requested shells that are not
+ active and deactivates the active shells that are not requested .
This is done by maintaining two lists. One (the current list)
reflects the current state. The other (the requested list) contains the
@@ -157,18 +156,6 @@ public:
*/
void AddShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId);
- /** Remove a shell. This is done only when the specified shell is a
- member of the specified group. If it has been requested for another
- group or if it has not been requested then this call is ignored.
- @param eGroup
- The group from which to remove the shell.
- @param nId
- The id of the shell to remove.
- @return
- Returns whether the shell is removed.
- */
- bool RemoveShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId);
-
/** Releasing all shells means that the given ToolBarRules object is
informed that every shell mananged by the called ToolBarShellList is
about to be removed and that the associated framework tool bars can
@@ -296,7 +283,6 @@ public:
void AddToolBar (ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName);
void AddToolBarShell (ToolBarGroup eGroup, ShellId nToolBarId);
void RemoveToolBar (ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName);
- void RemoveToolBarShell (ToolBarGroup eGroup, ShellId nToolBarId);
/** Release all tool bar shells and the associated framework tool bars.
Typically called when the main view shell is being replaced by
@@ -332,7 +318,6 @@ public:
};
void LockViewShellManager (void);
- bool IsUpdateLocked (void) const;
void LockUpdate (void);
void UnlockUpdate (void);
@@ -430,15 +415,6 @@ void ToolBarManager::Shutdown (void)
-void ToolBarManager::SetValid (bool bValid)
-{
- if (mpImpl.get() != NULL)
- mpImpl->SetValid(bValid);
-}
-
-
-
-
void ToolBarManager::ResetToolBars (ToolBarGroup eGroup)
{
if (mpImpl.get() != NULL)
@@ -505,20 +481,6 @@ void ToolBarManager::RemoveToolBar (
-void ToolBarManager::RemoveToolBarShell (
- ToolBarGroup eGroup,
- ShellId nToolBarId)
-{
- if (mpImpl.get() != NULL)
- {
- UpdateLock aLock (shared_from_this());
- mpImpl->RemoveToolBarShell(eGroup,nToolBarId);
- }
-}
-
-
-
-
void ToolBarManager::SetToolBar (
ToolBarGroup eGroup,
const ::rtl::OUString& rsToolBarName)
@@ -576,17 +538,6 @@ void ToolBarManager::LockViewShellManager (void)
-bool ToolBarManager::IsUpdateLocked (void) const
-{
- if (mpImpl.get() != NULL)
- return mpImpl->IsUpdateLocked();
- else
- return false;
-}
-
-
-
-
void ToolBarManager::LockUpdate (void)
{
if (mpImpl.get()!=NULL)
@@ -819,21 +770,6 @@ void ToolBarManager::Implementation::AddToolBarShell (
-void ToolBarManager::Implementation::RemoveToolBarShell (
- ToolBarGroup eGroup,
- ShellId nToolBarId)
-{
- ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
- if (pMainViewShell != NULL)
- {
- GetToolBarRules().SubShellRemoved(eGroup, nToolBarId);
- maToolBarShellList.RemoveShellId(eGroup,nToolBarId);
- }
-}
-
-
-
-
void ToolBarManager::Implementation::ReleaseAllToolBarShells (void)
{
maToolBarShellList.ReleaseAllShells(GetToolBarRules());
@@ -946,14 +882,6 @@ void ToolBarManager::Implementation::LockViewShellManager (void)
-bool ToolBarManager::Implementation::IsUpdateLocked (void) const
-{
- return mnLockCount;
-}
-
-
-
-
void ToolBarManager::Implementation::LockUpdate (void)
{
#ifdef VERBOSE
@@ -1705,26 +1633,6 @@ void ToolBarShellList::AddShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::
-bool ToolBarShellList::RemoveShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId)
-{
- bool bRemoved (false);
-
- GroupedShellList::iterator iDescriptor (maNewList.find(ShellDescriptor(nId,eGroup)));
- if (iDescriptor != maNewList.end())
- {
- if (iDescriptor->meGroup == eGroup)
- {
- maNewList.erase(iDescriptor);
- bRemoved = true;
- }
- }
-
- return bRemoved;
-}
-
-
-
-
void ToolBarShellList::ReleaseAllShells (ToolBarRules& rRules)
{
// Release the currently active tool bars.
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 14da3ea1a526..1e18ad5c5ee9 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -164,8 +164,6 @@ public:
::boost::shared_ptr<FormShellManager> mpFormShellManager;
- ::boost::shared_ptr<CustomHandleManager> mpCustomHandleManager;
-
Implementation (ViewShellBase& rBase);
~Implementation (void);
@@ -461,13 +459,6 @@ ViewShellBase* ViewShellBase::GetViewShellBase (SfxViewFrame* pViewFrame)
-void ViewShellBase::GetMenuState (SfxItemSet& )
-{
-}
-
-
-
-
DrawDocShell* ViewShellBase::GetDocShell (void) const
{
return mpDocShell;
@@ -713,21 +704,6 @@ ErrCode ViewShellBase::DoPrint (
-USHORT ViewShellBase::SetPrinterOptDlg (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags,
- BOOL bShowDialog)
-{
- (void)pNewPrinter;
- (void)nDiffFlags;
- (void)bShowDialog;
- return 0;
- // return mpImpl->mpPrintManager->SetPrinterOptDlg ( pNewPrinter, nDiffFlags, bShowDialog);
-}
-
-
-
-
void ViewShellBase::PreparePrint (PrintDialog* pPrintDialog)
{
SfxViewShell::PreparePrint (pPrintDialog);
@@ -1246,18 +1222,6 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference<ViewTabBar>& rViewTabB
}
-
-
-CustomHandleManager& ViewShellBase::getCustomHandleManager() const
-{
- OSL_ASSERT(mpImpl.get()!=NULL);
-
- if( !mpImpl->mpCustomHandleManager.get() )
- mpImpl->mpCustomHandleManager.reset( new ::sd::CustomHandleManager(*const_cast< ViewShellBase* >(this)) );
-
- return *mpImpl->mpCustomHandleManager.get();
-}
-
::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const ::rtl::OUString& aCmdURL )
{
::rtl::OUString aLabel;
@@ -1820,34 +1784,4 @@ void FocusForwardingWindow::Command (const CommandEvent& rEvent)
} // end of anonymouse namespace
-// ====================================================================
-
-CustomHandleManager::CustomHandleManager( ViewShellBase& rViewShellBase )
-: mrViewShellBase( rViewShellBase )
-{
-}
-
-CustomHandleManager::~CustomHandleManager()
-{
- DBG_ASSERT( maSupplier.empty(), "sd::CustomHandleManager::~CustomHandleManager(), still suppliers attached!" );
-}
-
-void CustomHandleManager::registerSupplier( ICustomhandleSupplier* pSupplier )
-{
- maSupplier.insert( pSupplier );
-}
-
-void CustomHandleManager::unRegisterSupplier( ICustomhandleSupplier* pSupplier )
-{
- maSupplier.erase( pSupplier );
-}
-
-void CustomHandleManager::addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList )
-{
- for( std::set< ICustomhandleSupplier* >::iterator aIter( maSupplier.begin() ); aIter != maSupplier.end(); aIter++ )
- {
- (*aIter)->addCustomHandler( rSourceView, eShellType, rHandlerList );
- }
-}
-
} // end of namespace sd
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 926d579e93e9..fdd7c530137f 100755
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -69,48 +69,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
-namespace {
-
-class ImpUndoDeleteWarning : public ModalDialog
-{
-private:
- FixedImage maImage;
- FixedText maWarningFT;
- CheckBox maDisableCB;
- OKButton maYesBtn;
- CancelButton maNoBtn;
-
-public:
- ImpUndoDeleteWarning(Window* pParent);
- BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); }
-};
-
-ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent)
-: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)),
- maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)),
- maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)),
- maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)),
- maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)),
- maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO))
-{
- FreeResource();
-
- SetHelpId( HID_SD_UNDODELETEWARNING_DLG );
- maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX );
-
- maYesBtn.SetText(Button::GetStandardText(BUTTON_YES));
- maNoBtn.SetText(Button::GetStandardText(BUTTON_NO));
- maImage.SetImage(WarningBox::GetStandardImage());
-
- // #93721# Set focus to YES-Button
- maYesBtn.GrabFocus();
-}
-
-} // end of anonymous namespace
-
-
-
-
namespace sd {
ViewShell::Implementation::Implementation (ViewShell& rViewShell)
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 059e0fde06fb..c25c0f11270a 100755
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -124,10 +124,6 @@ public:
void RemoveShellFactory (
const SfxShell* pViewShell,
const SharedShellFactory& rpFactory);
- ViewShell* ActivateViewShell (
- ShellId nId,
- ::Window* pParentWindow,
- FrameView* pFrameView);
void ActivateViewShell (
ViewShell* pViewShell);
void DeactivateViewShell (const ViewShell& rShell);
@@ -137,13 +133,10 @@ public:
void SetFormShell (const ViewShell* pViewShell, FmFormShell* pFormShell, bool bAbove);
void ActivateSubShell (const SfxShell& rParentShell, ShellId nId);
void DeactivateSubShell (const SfxShell& rParentShell, ShellId nId);
- void DeactivateAllSubShells (const SfxShell& rViewShell);
void MoveSubShellToTop (const SfxShell& rParentShell, ShellId nId);
void MoveToTop (const SfxShell& rParentShell);
SfxShell* GetShell (ShellId nId) const;
SfxShell* GetTopShell (void) const;
- ShellId GetShellId (const SfxShell* pShell) const;
- void ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement);
void Shutdown (void);
void InvalidateAllSubShells (const SfxShell* pParentShell);
@@ -235,7 +228,6 @@ private:
DECL_LINK(WindowEventHandler, VclWindowEvent*);
- void DumpActiveShell (const ActiveShellList& rList);
void DumpShellStack (const ShellStack& rStack);
void DumpSfxShellStack (void);
@@ -246,10 +238,6 @@ private:
*/
void Deactivate (SfxShell* pShell);
- ShellDescriptor CreateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView);
ShellDescriptor CreateSubShell (
SfxShell* pShell,
ShellId nShellId,
@@ -304,20 +292,6 @@ void ViewShellManager::RemoveSubShellFactory (
-ViewShell* ViewShellManager::ActivateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView)
-{
- if (mbValid)
- return mpImpl->ActivateViewShell(nShellId,pParentWindow,pFrameView);
- else
- return NULL;
-}
-
-
-
-
void ViewShellManager::ActivateViewShell (ViewShell* pViewShell)
{
if (mbValid)
@@ -377,15 +351,6 @@ void ViewShellManager::DeactivateSubShell (const ViewShell& rViewShell, ShellId
-void ViewShellManager::DeactivateAllSubShells (const ViewShell& rViewShell)
-{
- if (mbValid)
- mpImpl->DeactivateAllSubShells(rViewShell);
-}
-
-
-
-
void ViewShellManager::InvalidateAllSubShells (ViewShell* pViewShell)
{
if (mbValid)
@@ -413,15 +378,6 @@ void ViewShellManager::DeactivateShell (const SfxShell* pShell)
-void ViewShellManager::InvalidateShellStack (const SfxShell* pShell)
-{
- if (mbValid)
- mpImpl->TakeShellsFromStack(pShell);
-}
-
-
-
-
void ViewShellManager::MoveToTop (const ViewShell& rParentShell)
{
if (mbValid)
@@ -453,26 +409,6 @@ SfxShell* ViewShellManager::GetTopShell (void) const
-ShellId ViewShellManager::GetShellId (const SfxShell* pShell) const
-{
- if (mbValid)
- return mpImpl->GetShellId(pShell);
- else
- return snInvalidShellId;
-}
-
-
-
-
-void ViewShellManager::ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement)
-{
- if (mbValid)
- mpImpl->ReplaceUndoManager(pManager,pReplacement);
-}
-
-
-
-
void ViewShellManager::Shutdown (void)
{
if (mbValid)
@@ -572,24 +508,6 @@ void ViewShellManager::Implementation::RemoveShellFactory (
-ViewShell* ViewShellManager::Implementation::ActivateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- // Create a new shell or recycle on in the cache.
- ShellDescriptor aDescriptor (CreateViewShell(nShellId, pParentWindow, pFrameView));
-
- ActivateShell(aDescriptor);
-
- return dynamic_cast<ViewShell*>(aDescriptor.mpShell);
-}
-
-
-
-
void ViewShellManager::Implementation::ActivateViewShell (ViewShell* pViewShell)
{
::osl::MutexGuard aGuard (maMutex);
@@ -953,66 +871,6 @@ SfxShell* ViewShellManager::Implementation::GetTopShell (void) const
-ShellId ViewShellManager::Implementation::GetShellId (const SfxShell* pShell) const
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- ShellId nId = snInvalidShellId;
-
- // First search the active view shells.
- const ViewShell* pViewShell = dynamic_cast<const ViewShell*>(pShell);
- if (pShell != NULL)
- {
- ActiveShellList::const_iterator iShell (
- ::std::find_if (
- maActiveViewShells.begin(),
- maActiveViewShells.end(),
- IsShell(pViewShell)));
- if (iShell != maActiveViewShells.end())
- nId = iShell->mnId;
- }
- if (nId == snInvalidShellId)
- {
- // Now search the active sub shells of every active view shell.
- SubShellList::const_iterator iList;
- for (iList=maActiveSubShells.begin(); iList!=maActiveSubShells.end(); ++iList)
- {
- const SubShellSubList& rList (iList->second);
- SubShellSubList::const_iterator iSubShell(
- ::std::find_if(rList.begin(),rList.end(), IsShell(pShell)));
- if (iSubShell != rList.end())
- {
- nId = iSubShell->mnId;
- break;
- }
- }
- }
-
- return nId;
-}
-
-
-
-
-void ViewShellManager::Implementation::ReplaceUndoManager (
- SfxUndoManager* pManager,
- SfxUndoManager* pReplacement)
-{
- for (USHORT i=0; ;++i)
- {
- SfxShell* pShell = mrBase.GetSubShell(i);
- if (pShell == NULL)
- break;
- if (pShell->GetUndoManager() == pManager)
- pShell->SetUndoManager(pReplacement);
- }
-}
-
-
-
-
-
-
void ViewShellManager::Implementation::LockUpdate (void)
{
mnUpdateLockCount++;
@@ -1333,44 +1191,6 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent*,
-ShellDescriptor ViewShellManager::Implementation::CreateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView)
-{
- ShellDescriptor aResult;
-
- if (pParentWindow != NULL)
- {
- ShellDescriptor aDescriptor (
- CreateSubShell(NULL,nShellId,pParentWindow,pFrameView));
- aResult.mpShell = dynamic_cast<ViewShell*>(aDescriptor.mpShell);
- aResult.mpFactory = aDescriptor.mpFactory;
- aResult.mnId = aDescriptor.mnId;
-
- // Register as window listener so that the shells of the current
- // window can be moved to the top of the shell stack.
- if (aResult.mpShell != NULL)
- {
- ::Window* pWindow = aResult.GetWindow();
- if (pWindow != NULL)
- pWindow->AddEventListener(
- LINK(this, ViewShellManager::Implementation, WindowEventHandler));
- else
- {
- DBG_ASSERT (false,
- "ViewShellManager::ActivateViewShell: "
- "new view shell has no active window");
- }
- }
- }
-
- return aResult;
-}
-
-
-
-
ShellDescriptor ViewShellManager::Implementation::CreateSubShell (
SfxShell* pParentShell,
ShellId nShellId,
@@ -1499,15 +1319,6 @@ void ViewShellManager::Implementation::Shutdown (void)
-void ViewShellManager::Implementation::DumpActiveShell (const ActiveShellList& rList)
-{
- for (ActiveShellList::const_iterator aI=rList.begin(); aI!=rList.end(); ++aI)
- OSL_TRACE (" %d %p\r", aI->mnId, aI->mpShell);
-}
-
-
-
-
void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack)
{
ShellStack::const_reverse_iterator iEntry;
@@ -1580,24 +1391,6 @@ void ViewShellManager::Implementation::SetFormShell (
-void ViewShellManager::Implementation::DeactivateAllSubShells (
- const SfxShell& rViewShell)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- SubShellList::iterator iList (maActiveSubShells.find(&rViewShell));
- if (iList != maActiveSubShells.end())
- {
- SubShellSubList& rList (iList->second);
- UpdateLock aLock (*this);
- while ( ! rList.empty())
- DeactivateSubShell(rViewShell, rList.front().mnId);
- }
-}
-
-
-
-
namespace {
ShellDescriptor::ShellDescriptor (void)
diff --git a/sd/source/ui/view/bmcache.cxx b/sd/source/ui/view/bmcache.cxx
index d8781733c520..c7f313037ff8 100644..100755
--- a/sd/source/ui/view/bmcache.cxx
+++ b/sd/source/ui/view/bmcache.cxx
@@ -58,115 +58,6 @@ BitmapCache::~BitmapCache()
}
}
-/*************************************************************************
-|*
-|* Cache-Eintrag einfuegen
-|*
-\************************************************************************/
-
-void BitmapCache::Add(const SdPage* pPage, const Bitmap& rBmp, long nZoom)
-{
- BitmapCacheEntry* pEntry = NULL;
- ULONG nSizeOfBitmap = rBmp.GetSizeBytes();
-
- if( nSizeOfBitmap < nMaxSize )
- {
- while (nCurSize + nSizeOfBitmap > nMaxSize)
- {
- if( aEntries.Count() )
- {
- pEntry = (BitmapCacheEntry*) aEntries.Remove(aEntries.Count() - 1);
-
- if( pEntry && pEntry->pGraphicObject )
- {
- nCurSize -= pEntry->nSizeBytes;
- delete pEntry->pGraphicObject;
- }
-
- delete pEntry;
- }
- else
- break;
- }
-
- pEntry = new BitmapCacheEntry;
- pEntry->pPage = pPage;
- pEntry->pGraphicObject = new GraphicObject( rBmp );
- pEntry->nSizeBytes = nSizeOfBitmap;
- pEntry->nZoom = nZoom;
-
- aEntries.Insert( pEntry, (ULONG) 0 );
- nCurSize += nSizeOfBitmap;
- }
-}
-
-/*************************************************************************
-|*
-|* Cache-Eintrag suchen, Bitmap-Zeiger zurueckgeben (NULL, wenn Bitmap nicht
-|* im Cache)
-|* - auf rZoomPercent wird der Zoomfaktor der Bitmap geschrieben
-|* - abs(nZoomTolerance) gibt die maximal erlaubte Abweichung des
-|* Zoomfaktors an; ist die Toleranz negativ, so sucht der Cache den
-|* "best fit", sonst den "first fit",
-|* - es werden nur Bitmaps mit Zoomfaktoren kleiner oder gleich rZoomPercent
-|* beruecksichtigt, um ein Verkleinern der Bitmap beim Zeichnen zu vermeiden
-|*
-\************************************************************************/
-
-const GraphicObject* BitmapCache::Get( const SdPage* pPage, long& rZoomPercent, long nZoomTolerancePercent)
-{
- BitmapCacheEntry* pEntry = NULL;
- GraphicObject* pGraphicObject = NULL;
-
- if( nZoomTolerancePercent < 0 )
- {
- // "best fit"-Suche
- long nTolerance = -nZoomTolerancePercent;
- BitmapCacheEntry* pBest = NULL;
- long nBest = LONG_MAX;
- long nTest = 0L;
-
- for( ULONG nPos = 0; nPos < aEntries.Count(); nPos++ )
- {
- pEntry = (BitmapCacheEntry*) aEntries.GetObject( nPos );
-
- if( pEntry->pPage == pPage )
- {
- nTest = rZoomPercent - pEntry->nZoom;
-
- if( nTest >= 0 && nTest < nBest && nTest <= nTolerance )
- pBest = pEntry;
- }
- }
-
- pEntry = pBest;
- }
- else
- {
- // "first fit"-suche
- for( ULONG nPos = 0; nPos < aEntries.Count(); nPos++ )
- {
- pEntry = (BitmapCacheEntry*)aEntries.GetObject( nPos );
-
- if (pEntry->pPage == pPage && Abs( pEntry->nZoom - rZoomPercent ) <= nZoomTolerancePercent )
- break;
- else
- pEntry = NULL;
- }
- }
-
- // was passendes gefunden?
- if( pEntry )
- {
- pGraphicObject = pEntry->pGraphicObject;
- aEntries.Remove( pEntry );
- aEntries.Insert( pEntry, (ULONG) 0 );
- rZoomPercent = pEntry->nZoom;
- }
-
- return pGraphicObject;
-}
-
void BitmapCache::Remove( const SdPage* pPage )
{
for( ULONG nPos = 0; nPos < aEntries.Count(); )
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 55479228f918..98d0b7551705 100755
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -94,7 +94,6 @@
#include "slideshow.hxx"
#include "optsitem.hxx"
#include "fusearch.hxx"
-#include "fuspell.hxx"
#include "Outliner.hxx"
#include "AnimationChildWindow.hxx"
#include "SdUnoDrawView.hxx"
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 2e33ab909f00..3102dc726a61 100755
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -105,48 +105,6 @@ namespace sd {
/*************************************************************************
|*
-|* modal dialog for #90356#
-|*
-\************************************************************************/
-
-class ImpUndoDeleteWarning : public ModalDialog
-{
-private:
- FixedImage maImage;
- FixedText maWarningFT;
- CheckBox maDisableCB;
- OKButton maYesBtn;
- CancelButton maNoBtn;
-
-public:
- ImpUndoDeleteWarning(Window* pParent);
- BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); }
-};
-
-ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent)
-: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)),
- maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)),
- maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)),
- maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)),
- maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)),
- maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO))
-{
- FreeResource();
-
- SetHelpId( HID_SD_UNDODELETEWARNING_DLG );
- maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX );
-
- maYesBtn.SetText(Button::GetStandardText(BUTTON_YES));
- maNoBtn.SetText(Button::GetStandardText(BUTTON_NO));
- maImage.SetImage(WarningBox::GetStandardImage());
-
- // #93721# Set focus to YES-Button
- maYesBtn.GrabFocus();
-}
-
-
-/*************************************************************************
-|*
|* SfxRequests fuer temporaere Funktionen
|*
\************************************************************************/
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index c4c6b20f8ca8..681192ff351b 100755
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -192,32 +192,6 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
/*************************************************************************
|*
-|* SfxRequests fuer Objektpalette bearbeiten
-|*
-\************************************************************************/
-
-void DrawViewShell::ExecObjPalette( SfxRequest& )
-{
- // Diese Methode muss erhalten bleiben, bis
- // der/die Slots entfernt wurden;
- // ==> Voll-Update
-}
-
-/*************************************************************************
-|*
-|* Statuswerte fuer Objektpalette zurueckgeben
-|*
-\************************************************************************/
-
-void DrawViewShell::GetObjPaletteState(SfxItemSet& )
-{
- // Diese Methode muss erhalten bleiben, bis
- // der/die Slots entfernt wurden;
- // ==> Voll-Update
-}
-
-/*************************************************************************
-|*
|* SfxRequests fuer Animator bearbeiten
|*
\************************************************************************/
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index ad42a9251878..3628a11ac5a1 100755
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -151,21 +151,6 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
/*************************************************************************
|*
-|* Copy-Konstruktor
-|*
-\************************************************************************/
-
-DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ::Window* pParentWindow, const DrawViewShell& rShell )
-: ViewShell(pFrame, pParentWindow, rShell)
-, maTabControl(this, pParentWindow)
-, mbIsInSwitchPage(false)
-{
- mpFrameView = new FrameView(GetDoc());
- Construct (GetDocSh(), PK_STANDARD);
-}
-
-/*************************************************************************
-|*
|* Destruktor
|*
\************************************************************************/
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 1c22348f8b87..646a437c42bf 100644..100755
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -61,24 +61,6 @@ GraphicViewShell::GraphicViewShell (
ConstructGraphicViewShell();
}
-/*************************************************************************
-|*
-|* Copy-Konstruktor
-|*
-\************************************************************************/
-
-GraphicViewShell::GraphicViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const DrawViewShell& rShell)
- : DrawViewShell (pFrame, pParentWindow, rShell)
-{
- ConstructGraphicViewShell();
-}
-
-
-
-
GraphicViewShell::~GraphicViewShell (void)
{
}
diff --git a/sd/source/ui/view/makefile.mk b/sd/source/ui/view/makefile.mk
index 2cc2a96d46a2..0ee8280d3fad 100644
--- a/sd/source/ui/view/makefile.mk
+++ b/sd/source/ui/view/makefile.mk
@@ -85,7 +85,6 @@ SLOFILES = \
$(SLO)$/presvish.obj \
$(SLO)$/outlview.obj \
$(SLO)$/tabcontr.obj \
- $(SLO)$/showview.obj \
$(SLO)$/bmcache.obj \
$(SLO)$/drbezob.obj \
$(SLO)$/drtxtob.obj \
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index bbdcf35a4e34..955a9d167b49 100755
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -236,31 +236,6 @@ OutlineViewShell::OutlineViewShell (
Construct(GetDocSh());
}
-
-/*************************************************************************
-|*
-|* Copy-Konstruktor
-|*
-\************************************************************************/
-
-OutlineViewShell::OutlineViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const OutlineViewShell& rShell)
- : ViewShell (pFrame, pParentWindow, rShell),
- pOlView(NULL),
- pLastPage( NULL ),
- pClipEvtLstnr(NULL),
- bPastePossible(FALSE),
- mbInitialized(false)
-
-{
- mpFrameView = new FrameView(GetDoc());
- mpFrameView->Connect();
-
- Construct(GetDocSh());
-}
-
/*************************************************************************
|*
|* Destruktor
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 30daec8b636e..dfad4b34c6f2 100644..100755
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -2040,6 +2040,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
return 0;
}
+#if 0
sal_Int32 OutlineView::GetPageNumberWidthPixel()
{
Window* pActWin = mpOutlineViewShell->GetActiveWindow();
@@ -2062,6 +2063,7 @@ sal_Int32 OutlineView::GetPageNumberWidthPixel()
}
return mnPageNumberWidthPixel;
}
+#endif
// --------------------------------------------------------------------
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 813c6caba95a..3aed9c6c0d9c 100644..100755
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -969,89 +969,6 @@ void View::SetMarkedOriginalSize()
delete pUndoGroup;
}
-/** create a virtual device and paints the slide contents into it.
- The caller must delete the returned device */
-VirtualDevice* View::CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel)
-{
- ViewShell* pViewShell = mpDocSh->GetViewShell();
- OutputDevice* pRefDevice = 0;
- if( pViewShell )
- pRefDevice = pViewShell->GetActiveWindow();
-
- if( !pRefDevice )
- pRefDevice = Application::GetDefaultDevice();
-
- DBG_ASSERT( pRefDevice, "sd::View::CreatePageVDev(), I need a reference device to work properly!" );
-
- VirtualDevice* pVDev;
- if( pRefDevice )
- pVDev = new VirtualDevice( *pRefDevice );
- else
- pVDev = new VirtualDevice();
-
- MapMode aMM( MAP_100TH_MM );
-
- SdPage* pPage = mpDoc->GetSdPage(nSdPage, ePageKind);
- DBG_ASSERT(pPage, "sd::View::CreatePageVDev(), slide not found!");
-
- if( pPage )
- {
- Size aPageSize(pPage->GetSize());
- aPageSize.Width() -= pPage->GetLftBorder();
- aPageSize.Width() -= pPage->GetRgtBorder();
- aPageSize.Height() -= pPage->GetUppBorder();
- aPageSize.Height() -= pPage->GetLwrBorder();
-
- // use scaling?
- if( nWidthPixel )
- {
- const Fraction aFrac( (long) nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() );
-
- aMM.SetScaleX( aFrac );
- aMM.SetScaleY( aFrac );
- }
-
- pVDev->SetMapMode( aMM );
- if( pVDev->SetOutputSize(aPageSize) )
- {
- std::auto_ptr< SdrView > pView( new SdrView(mpDoc, pVDev) );
- pView->SetPageVisible( FALSE );
- pView->SetBordVisible( FALSE );
- pView->SetGridVisible( FALSE );
- pView->SetHlplVisible( FALSE );
- pView->SetGlueVisible( FALSE );
- pView->ShowSdrPage(pPage); // WAITING FOR SJ , Point(-pPage->GetLftBorder(), -pPage->GetUppBorder()));
- SdrPageView* pPageView = pView->GetSdrPageView();
- if( pViewShell )
- {
- FrameView* pFrameView = pViewShell->GetFrameView();
- if( pFrameView )
- {
- pPageView->SetVisibleLayers( pFrameView->GetVisibleLayers() );
- pPageView->SetLockedLayers( pFrameView->GetLockedLayers() );
- pPageView->SetPrintableLayers( pFrameView->GetPrintableLayers() );
- }
- }
-
- // SJ: i40609, the vdev mapmode seems to be dangled after CompleteRedraw,
- // so we are pushing here, because the mapmode is used afterwards
- pVDev->Push();
-
- Point aPoint( 0, 0 );
- Region aRegion (Rectangle( aPoint, aPageSize ) );
- pView->CompleteRedraw(pVDev, aRegion);
- pVDev->Pop();
- }
- else
- {
- DBG_ERROR("sd::View::CreatePageVDev(), virt. device creation failed!");
- }
- }
- return pVDev;
-}
-
-
-
/*************************************************************************
|*
|* OLE-Obj am Client connecten
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index a980496cecf3..9fbe223c276a 100755
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -623,11 +623,6 @@ void View::LockRedraw(BOOL bLock)
-bool View::IsRedrawLocked (void) const
-{
- return mnLockRedrawSmph>0;
-}
-
/*************************************************************************
|*
|* StyleSheet aus der Sleketion besorgen
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 5ae673b8769f..28873b3946a3 100755
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -146,35 +146,6 @@ void Window::SetViewShell (ViewShell* pViewSh)
}
}
-
-
-
-/*************************************************************************
-|*
-|* Die Haelfte des Sichtbaren Bereich eines anderen Fensters darstellen
-|*
-\************************************************************************/
-
-void Window::ShareViewArea(Window* pOtherWin)
-{
- mpShareWin = pOtherWin;
- maViewOrigin = pOtherWin->maViewOrigin;
- maViewSize = pOtherWin->maViewSize;
- mnMinZoom = pOtherWin->mnMinZoom;
- mnMaxZoom = pOtherWin->mnMaxZoom;
- mbCenterAllowed = pOtherWin->mbCenterAllowed;
-
- long nZoom = pOtherWin->GetZoom();
- MapMode aMap(GetMapMode());
- aMap.SetScaleX(Fraction(nZoom, 100));
- aMap.SetScaleY(Fraction(nZoom, 100));
- aMap.SetOrigin(pOtherWin->GetMapMode().GetOrigin());
- SetMapMode(aMap);
-}
-
-
-
-
void Window::CalcMinZoom()
{
// Are we entitled to change the minimal zoom factor?
diff --git a/sd/source/ui/view/showview.cxx b/sd/source/ui/view/showview.cxx
deleted file mode 100644
index a60195eac1b8..000000000000
--- a/sd/source/ui/view/showview.cxx
+++ /dev/null
@@ -1,170 +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_sd.hxx"
-
-#include "showview.hxx"
-#include <svx/svdmodel.hxx>
-#include <svx/fmview.hxx>
-
-
-#include "drawdoc.hxx"
-#include "sdpage.hxx"
-#include "ViewShell.hxx"
-#include "FrameView.hxx"
-
-namespace sd {
-
-#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
-#define SO2_DECL_SVINPLACEOBJECT_DEFINED
-SO2_DECL_REF(SvInPlaceObject)
-#endif
-#ifndef SO2_DECL_SVINPLACECLIENT_DEFINED
-#define SO2_DECL_SVINPLACECLIENT_DEFINED
-SO2_DECL_REF(SvInPlaceClient)
-#endif
-
-/*************************************************************************
-|*
-|* der Konstruktor setzt den MapMode und arrangiert die einzelnen Seiten
-|*
-\************************************************************************/
-
-ShowView::ShowView (
- SdDrawDocument* pDoc,
- OutputDevice* pOut,
- ViewShell* pViewShell,
- ::Window* pWin)
- : FmFormView(pDoc, pOut),
- pDrDoc(pDoc),
- mpViewSh(pViewShell),
- pWindowForPlugIns(pWin),
- nAllowInvalidateSmph(0),
- bAllowMasterPageCaching(TRUE)
-{
- // #i73602# Use default from the configuration
- SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_DrawImpress());
-
- // #i74769#, #i75172# Use default from the configuration
- SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress());
-
- EnableExtendedKeyInputDispatcher(FALSE);
- EnableExtendedMouseEventDispatcher(FALSE);
- EnableExtendedCommandEventDispatcher(FALSE);
-}
-
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
-
-ShowView::~ShowView()
-{
-}
-
-/*************************************************************************
-|*
-|* Zaehler fuer Invalidierungserlaubnis hoch- oder runter zaehlen
-|*
-\************************************************************************/
-
-void ShowView::SetAllowInvalidate(BOOL bFlag)
-{
- if (!bFlag)
- {
- nAllowInvalidateSmph++;
- }
- else if (nAllowInvalidateSmph > 0)
- {
- nAllowInvalidateSmph--;
- }
-}
-
-/*************************************************************************
-|*
-|* ermittelt, ob invalidiert werden darf
-|*
-\************************************************************************/
-
-BOOL ShowView::IsInvalidateAllowed() const
-{
- return (nAllowInvalidateSmph == 0);
-}
-
-/*************************************************************************
-|*
-|* Invalidate abfangen
-|*
-\************************************************************************/
-
-void ShowView::InvalidateOneWin (::Window& rWin)
-{
- if (IsInvalidateAllowed())
- {
- FmFormView::InvalidateOneWin(rWin);
- }
-}
-
-/*************************************************************************
-|*
-|* Invalidate abfangen
-|*
-\************************************************************************/
-
-void ShowView::InvalidateOneWin (::Window& rWin, const Rectangle& rRect)
-{
- if (IsInvalidateAllowed())
- {
- FmFormView::InvalidateOneWin(rWin, rRect);
- }
-}
-
-/*************************************************************************
-|*
-|* Paint-Methode: das Ereignis wird an die View weitergeleitet
-|*
-\************************************************************************/
-
-void ShowView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
-{
- FmFormView::CompleteRedraw(pOutDev, rReg, pRedirector);
-}
-
-/*************************************************************************
-|*
-|* DoConnect
-|*
-\************************************************************************/
-
-void ShowView::DoConnect(SdrOle2Obj* )
-{
- // connected wird jetzt in FuSlideShow::ShowPlugIns()
-}
-
-} // end of namespace sd
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 5a3426a42533..616516782be3 100644..100755
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -526,34 +526,6 @@ void ViewShell::DrawMarkRect(const Rectangle& rRect) const
}
}
-
-/*************************************************************************
-|*
-|* Auf allen Split-Windows ein Rechteck zeichnen. Fuer den Rahmen wird der
-|* uebergebene Pen, zum Fuellen die uebergebene Brush benutzt.
-|*
-\************************************************************************/
-
-void ViewShell::DrawFilledRect( const Rectangle& rRect, const Color& rLColor,
- const Color& rFColor ) const
-{
- if (mpContentWindow.get() != NULL)
- {
- const Color& rOldLineColor = mpContentWindow->GetLineColor();
- const Color& rOldFillColor = mpContentWindow->GetFillColor();
-
- mpContentWindow->SetLineColor( rLColor );
- mpContentWindow->SetFillColor( rFColor );
-
- mpContentWindow->DrawRect(rRect);
-
- mpContentWindow->SetLineColor( rOldLineColor );
- mpContentWindow->SetFillColor( rOldFillColor );
- }
-}
-
-
-
/*************************************************************************
|*
|* Groesse und Raender aller Seiten setzen
@@ -851,18 +823,6 @@ void ViewShell::WriteFrameViewData()
/*************************************************************************
|*
-|* Auf allen Split-Windows ein Update erzwingen.
-|*
-\************************************************************************/
-
-void ViewShell::UpdateWindows()
-{
- if (mpContentWindow.get() != NULL)
- mpContentWindow->Update();
-}
-
-/*************************************************************************
-|*
|* OLE-Object aktivieren
|*
\************************************************************************/
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 578026018b9f..c1f4bc070bcf 100755
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -173,14 +173,6 @@ ViewShell::ViewShell( SfxViewFrame*, ::Window* pParentWindow, ViewShellBase& rVi
construct();
}
-ViewShell::ViewShell( SfxViewFrame*, ::Window* pParentWindow, const ViewShell& rShell)
-: SfxShell(rShell.GetViewShell())
-, mbCenterAllowed(rShell.mbCenterAllowed)
-, mpParentWindow(pParentWindow)
-{
- construct();
-}
-
ViewShell::~ViewShell()
{
// Keep the content window from accessing in its destructor the
diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx
index 6f4d56b6f0a3..9ae178e3d7a6 100644..100755
--- a/sd/source/ui/view/zoomlist.cxx
+++ b/sd/source/ui/view/zoomlist.cxx
@@ -112,19 +112,6 @@ void ZoomList::InsertZoomRect(const Rectangle& rRect)
rBindings.Invalidate( SID_ZOOM_PREV );
}
-
-/*************************************************************************
-|*
-|* Aktuelles ZoomRect herausgeben
-|*
-\************************************************************************/
-
-Rectangle ZoomList::GetCurrentZoomRect() const
-{
- Rectangle aRect(*(Rectangle*) GetObject(mnCurPos));
- return (aRect);
-}
-
/*************************************************************************
|*
|* Naechstes ZoomRect herausgeben
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index 91a69adeae6a..c03c6ce435cd 100755..100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -164,8 +164,6 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertObject"/>
<menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
<menu:menuitem menu:id=".uno:InsertMath"/>
</menu:menupopup>
</menu:menu>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 90d5ac490aa4..bf669992c86a 100755
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -181,8 +181,6 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertObject"/>
<menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
<menu:menuitem menu:id=".uno:InsertMath"/>
</menu:menupopup>
</menu:menu>
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 5cbf05be8d0a..251818079fe5 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">Sun Presentation Minimizer</value>
+ <value xml:lang="en-US">Oracle Presentation Minimizer</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 Sun 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 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.
-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>
+ 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 Sun Presentation Minimizer</value>
+ <value xml:lang="en-US">~Choose settings for Oracle Presentation Minimizer</value>
</prop>
<prop oor:name="STR_REMOVE">
<value xml:lang="en-US">~Delete</value>
@@ -182,17 +182,16 @@ The current presentation contains no OLE objects.</value>
<value xml:lang="en-US">~Yes</value>
</prop>
<prop oor:name="STR_ABOUT2">
- <value xml:lang="en-US">Sun Presentation Minimizer</value>
+ <value xml:lang="en-US">Oracle Presentation Minimizer</value>
</prop>
<prop oor:name="STR_ABOUT_VERSION2">
- <value xml:lang="en-US">About Sun Presentation Minimizer 1.0.0</value>
+ <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-2007 Sun Microsystems, Inc.
+ <value xml:lang="en-US">Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.
-This product has been created by Sun Microsystems, Inc. based on OpenOffice.org.
-OpenOffice.org acknowledges all community members, especially those
-mentioned on http://www.openoffice.org/welcome/credits.html</value>
+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>
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 9983e86c37ef..59c947750064 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>Sun Presentation Minimizer</value>
+ <value>Oracle Presentation Minimizer</value>
</prop>
<prop oor:name="STR_STEPS" oor:type="xs:string" oor:localized="true">
<value>Steps</value>
@@ -130,9 +130,9 @@
<value>Introduction</value>
</prop>
<prop oor:name="STR_INTRODUCTION_T" oor:type="xs:string" oor:localized="true">
- <value>The Sun 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 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.
-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>
+ 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" oor:type="xs:string" oor:localized="true">
<value>~Choose settings for the Presentation Minimization Wizard</value>
@@ -280,18 +280,17 @@ The current presentation contains no OLE objects.</value>
<value>~Yes</value>
</prop>
<prop oor:name="STR_ABOUT2" oor:type="xs:string" oor:localized="true">
- <value>Sun Presentation Minimizer</value>
+ <value>Oracle Presentation Minimizer</value>
</prop>
<prop oor:name="STR_ABOUT_VERSION2" oor:type="xs:string" oor:localized="true">
- <value>About Sun Presentation Minimizer 1.0.0</value>
+ <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-2007 Sun Microsystems, Inc.
+ <value>Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.
-This product has been created by Sun Microsystems, Inc. based on OpenOffice.org.
-OpenOffice.org acknowledges all community members, especially those
-mentioned on http://www.openoffice.org/welcome/credits.html</value>
- </prop>
+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>
diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml
index ec30133996c8..b22b81587fc7 100755
--- a/sdext/source/pdfimport/config/description.xml
+++ b/sdext/source/pdfimport/config/description.xml
@@ -16,7 +16,7 @@
</simple-license>
</registration>
- <version value="1.0.2" />
+ <version value="1.0.3" />
<platform value="UPDATED_SUPPORTED_PLATFORM" />
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 9dac0acf7e1e..e9d58cfdb3b2 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -736,10 +736,12 @@ uno::Reference< io::XStream > getAdditionalStream( const rtl::OUString&
break;
}
+ rtl::OUString aDocName( rInPDFFileURL.copy( rInPDFFileURL.lastIndexOf( sal_Unicode('/') )+1 ) );
+
bool bEntered = false;
do
{
- bEntered = getPassword( xIntHdl, io_rPwd, ! bEntered );
+ bEntered = getPassword( xIntHdl, io_rPwd, ! bEntered, aDocName );
rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd,
RTL_TEXTENCODING_ISO_8859_1 );
bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() );
diff --git a/sdext/source/pdfimport/filterdet.hxx b/sdext/source/pdfimport/filterdet.hxx
index 5a35320c91c5..4be260eb4254 100644
--- a/sdext/source/pdfimport/filterdet.hxx
+++ b/sdext/source/pdfimport/filterdet.hxx
@@ -104,7 +104,9 @@ bool checkDocChecksum( const rtl::OUString& rInPDFFileURL,
bool getPassword( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler,
rtl::OUString& o_rPwd,
- bool bFirstTry );
+ bool bFirstTry,
+ const rtl::OUString& i_rDocName
+ );
}
diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx b/sdext/source/pdfimport/inc/pdfihelper.hxx
index bcc69b0e9eda..9abc22214a6c 100755
--- a/sdext/source/pdfimport/inc/pdfihelper.hxx
+++ b/sdext/source/pdfimport/inc/pdfihelper.hxx
@@ -190,7 +190,9 @@ namespace pdfi
bool getPassword( const ::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionHandler >& xHandler,
rtl::OUString& rOutPwd,
- bool bFirstTry );
+ bool bFirstTry,
+ const rtl::OUString& rDocName
+ );
}
#define USTR(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
diff --git a/sdext/source/pdfimport/misc/pwdinteract.cxx b/sdext/source/pdfimport/misc/pwdinteract.cxx
index a68c63054137..43dfd1151964 100644
--- a/sdext/source/pdfimport/misc/pwdinteract.cxx
+++ b/sdext/source/pdfimport/misc/pwdinteract.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
#include <com/sun/star/task/XInteractionPassword.hpp>
-#include <com/sun/star/task/PasswordRequest.hpp>
+#include <com/sun/star/task/DocumentPasswordRequest.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <cppuhelper/compbase2.hxx>
@@ -53,12 +53,12 @@ class PDFPasswordRequest : private cppu::BaseMutex,
public PDFPasswordRequestBase
{
private:
- task::PasswordRequest m_aRequest;
- rtl::OUString m_aPassword;
- bool m_bSelected;
+ task::DocumentPasswordRequest m_aRequest;
+ rtl::OUString m_aPassword;
+ bool m_bSelected;
public:
- explicit PDFPasswordRequest(bool bFirstTry);
+ explicit PDFPasswordRequest(bool bFirstTry, const rtl::OUString& rName);
// XInteractionRequest
virtual uno::Any SAL_CALL getRequest( ) throw (uno::RuntimeException);
@@ -74,7 +74,7 @@ public:
bool isSelected() const { osl::MutexGuard const guard( m_aMutex ); return m_bSelected; }
};
-PDFPasswordRequest::PDFPasswordRequest( bool bFirstTry ) :
+PDFPasswordRequest::PDFPasswordRequest( bool bFirstTry, const rtl::OUString& rName ) :
PDFPasswordRequestBase( m_aMutex ),
m_aRequest(),
m_aPassword(),
@@ -84,6 +84,7 @@ PDFPasswordRequest::PDFPasswordRequest( bool bFirstTry ) :
task::PasswordRequestMode_PASSWORD_ENTER :
task::PasswordRequestMode_PASSWORD_REENTER;
m_aRequest.Classification = task::InteractionClassification_QUERY;
+ m_aRequest.Name = rName;
}
uno::Any SAL_CALL PDFPasswordRequest::getRequest() throw (uno::RuntimeException)
@@ -132,13 +133,15 @@ namespace pdfi
bool getPassword( const uno::Reference< task::XInteractionHandler >& xHandler,
rtl::OUString& rOutPwd,
- bool bFirstTry )
+ bool bFirstTry,
+ const rtl::OUString& rDocName
+ )
{
bool bSuccess = false;
PDFPasswordRequest* pRequest;
uno::Reference< task::XInteractionRequest > xReq(
- pRequest = new PDFPasswordRequest( bFirstTry ) );
+ pRequest = new PDFPasswordRequest( bFirstTry, rDocName ) );
try
{
xHandler->handle( xReq );
diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx
index 08faf9a87f69..16af49409fc5 100644
--- a/sdext/source/pdfimport/pdfiadaptor.cxx
+++ b/sdext/source/pdfimport/pdfiadaptor.cxx
@@ -242,7 +242,7 @@ bool PDFIRawAdaptor::parse( const uno::Reference<io::XInputStream>& xInput
{
// container for metaformat
boost::shared_ptr<PDFIProcessor> pSink(
- new PDFIProcessor(xStatus));
+ new PDFIProcessor(xStatus, m_xContext));
// TEMP! TEMP!
if( m_bEnableToplevelText )
diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
index b8d0aaca6b74..b3ffa64427dd 100644
--- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx
@@ -108,6 +108,40 @@ public:
iteratorT m_aGlobalBegin;
public:
+ struct pdf_string_parser
+ {
+ typedef nil_t result_t;
+ template <typename ScannerT>
+ std::ptrdiff_t
+ operator()(ScannerT const& scan, result_t& result) const
+ {
+ std::ptrdiff_t len = 0;
+
+ int nBraceLevel = 0;
+ while( ! scan.at_end() )
+ {
+ char c = *scan;
+ if( c == ')' )
+ {
+ nBraceLevel--;
+ if( nBraceLevel < 0 )
+ break;
+ }
+ else if( c == '(' )
+ nBraceLevel++;
+ else if( c == '\\' ) // ignore escaped braces
+ {
+ ++len;
+ ++scan;
+ if( scan.at_end() )
+ break;
+ }
+ ++len;
+ ++scan;
+ }
+ return scan.at_end() ? -1 : len;
+ }
+ };
template< typename ScannerT >
struct definition
@@ -135,7 +169,8 @@ public:
//stringtype = ( confix_p("(",*anychar_p, ")") |
// confix_p("<",*xdigit_p, ">") )
// [boost::bind(&PDFGrammar::pushString,pSelf, _1, _2)];
- stringtype = ( ( ch_p('(') >> *(str_p("\\)")|(anychar_p - ch_p(')'))) >> ch_p(')') ) |
+
+ stringtype = ( ( ch_p('(') >> functor_parser<pdf_string_parser>() >> ch_p(')') ) |
( ch_p('<') >> *xdigit_p >> ch_p('>') ) )
[boost::bind(&PDFGrammar::pushString,pSelf, _1, _2)];
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 664a19c7763d..2fd17d059e23 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -39,10 +39,46 @@
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/range/b2drange.hxx>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include "comphelper/processfactory.hxx"
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <string.h>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::i18n;
+using namespace ::com::sun::star::uno;
namespace pdfi
{
+const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& DrawXmlOptimizer::GetBreakIterator()
+{
+ if ( !mxBreakIter.is() )
+ {
+ Reference< XComponentContext > xContext( this->m_rProcessor.m_xContext, uno::UNO_SET_THROW );
+ Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW );
+ Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"), xContext);
+
+ mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY );
+ }
+ return mxBreakIter;
+}
+
+const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& DrawXmlEmitter::GetBreakIterator()
+{
+ if ( !mxBreakIter.is() )
+ {
+ Reference< XComponentContext > xContext( m_rEmitContext.m_xContext, uno::UNO_SET_THROW );
+ Reference< XMultiComponentFactory > xMSF( xContext->getServiceManager(), uno::UNO_SET_THROW );
+ Reference < XInterface > xInterface = xMSF->createInstanceWithContext(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"), xContext);
+ mxBreakIter = uno::Reference< i18n::XBreakIterator >( xInterface, uno::UNO_QUERY );
+ }
+ return mxBreakIter;
+}
+
void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >::const_iterator& )
{
if( elem.Children.empty() )
@@ -72,6 +108,7 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons
return;
rtl::OUString strSpace(32);
+ rtl::OUString strNbSpace(160);
rtl::OUString tabSpace(0x09);
PropertyMap aProps;
if( elem.StyleId != -1 )
@@ -80,27 +117,50 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons
m_rEmitContext.rStyles.getStyleName( elem.StyleId );
}
+ rtl::OUString str(elem.Text.getStr());
+
+ // Check for CTL
+ bool isComplex = false;
+ for(int i=0; i< elem.Text.getLength(); i++)
+ {
+ sal_Int16 nType = GetBreakIterator()->getScriptType( str, i + 1);
+ if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX)
+ isComplex = true;
+ }
+
+ #if 0
+ // FIXME: need to have a service to do this mirroring
+ if (isComplex) // If so, reverse string
+ {
+ rtl::OUString flippedStr(RTL_CONSTASCII_USTRINGPARAM( "" ));
+ for(int i = str.getLength() - 1; i >= 0; i--)
+ {
+ sal_Unicode cChar = str[ i ];
+ cChar = static_cast<sal_Unicode>(GetMirroredChar( cChar ));
+ rtl::OUString uC(cChar);
+ flippedStr += uC;
+ }
+ str = flippedStr;
+ }
+ #endif
+
m_rEmitContext.rEmitter.beginTag( "text:span", aProps );
- rtl::OUString str(elem.Text.getStr());
for(int i=0; i< elem.Text.getLength(); i++)
{
rtl::OUString strToken= str.copy(i,1) ;
- if( strSpace.equals(strToken) )
+ if( strSpace.equals(strToken) || strNbSpace.equals(strToken))
{
aProps[ USTR( "text:c" ) ] = USTR( "1" );
m_rEmitContext.rEmitter.beginTag( "text:s", aProps );
m_rEmitContext.rEmitter.endTag( "text:s");
-
}
else
{
if( tabSpace.equals(strToken) )
{
-
m_rEmitContext.rEmitter.beginTag( "text:tab", aProps );
m_rEmitContext.rEmitter.endTag( "text:tab");
-
}
else
{
@@ -608,6 +668,29 @@ void DrawXmlOptimizer::visit( PageElement& elem, const std::list< Element* >::co
elem.applyToChildren(*this);
}
+bool isSpaces(TextElement* pTextElem)
+{
+ rtl::OUString strSpace(32);
+ ::rtl::OUString ouTxt2(pTextElem->Text);
+ for(int i=0; i< pTextElem->Text.getLength(); i++)
+ {
+ rtl::OUString strToken = ouTxt2.copy(i,1) ;
+ if( !strSpace.equals(strToken) )
+ return false;
+ }
+ return true;
+}
+
+bool notTransformed(GraphicsContext GC)
+{
+ return (
+ GC.Transformation.get(0,0) == 100.00 &&
+ GC.Transformation.get(1,0) == 0.00 &&
+ GC.Transformation.get(0,1) == 0.00 &&
+ GC.Transformation.get(1,1) == -100.00
+ );
+}
+
void DrawXmlOptimizer::optimizeTextElements(Element& rParent)
{
if( rParent.Children.empty() ) // this should not happen
@@ -616,9 +699,6 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent)
return;
}
- bool bFirstTime= true;
- double fPrevY = 0;
-
// concatenate child elements with same font id
std::list< Element* >::iterator next = rParent.Children.begin();
std::list< Element* >::iterator it = next++;
@@ -634,15 +714,22 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent)
{
bool bConcat = false;
TextElement* pCur = dynamic_cast<TextElement*>(*it);
- if( bFirstTime )
- {
- bFirstTime=false;
- fPrevY = pCur->y;
- }
if( pCur )
{
TextElement* pNext = dynamic_cast<TextElement*>(*next);
+ bool isComplex = false;
+ rtl::OUString str(pCur->Text.getStr());
+ for(int i=0; i< str.getLength(); i++)
+ {
+ sal_Int16 nType = GetBreakIterator()->getScriptType( str, i );
+ if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX)
+ isComplex = true;
+ }
+ bool bPara = strspn("ParagraphElement", typeid(rParent).name());
+ ParagraphElement* pPara = dynamic_cast<ParagraphElement*>(&rParent);
+ if (bPara && isComplex)
+ pPara->bRtl = true;
if( pNext )
{
const GraphicsContext& rCurGC = m_rProcessor.getGraphicsContext( pCur->GCId );
@@ -650,20 +737,29 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent)
// line and space optimization; works only in strictly horizontal mode
-
// concatenate consecutive text elements unless there is a
// font or text color or matrix change, leave a new span in that case
- if( pCur->FontId == pNext->FontId &&
+ if( (pCur->FontId == pNext->FontId || isSpaces(pNext)) &&
rCurGC.FillColor.Red == rNextGC.FillColor.Red &&
rCurGC.FillColor.Green == rNextGC.FillColor.Green &&
rCurGC.FillColor.Blue == rNextGC.FillColor.Blue &&
rCurGC.FillColor.Alpha == rNextGC.FillColor.Alpha &&
- rCurGC.Transformation == rNextGC.Transformation
+ (rCurGC.Transformation == rNextGC.Transformation || notTransformed(rNextGC))
)
{
pCur->updateGeometryWith( pNext );
// append text to current element
- pCur->Text.append( pNext->Text.getStr(), pNext->Text.getLength() );
+ pCur->Text.append( pNext->Text.getStr(), pNext->Text.getLength() );
+
+ str = pCur->Text.getStr();
+ for(int i=0; i< str.getLength(); i++)
+ {
+ sal_Int16 nType = GetBreakIterator()->getScriptType( str, i );
+ if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX)
+ isComplex = true;
+ }
+ if (bPara && isComplex)
+ pPara->bRtl = true;
// append eventual children to current element
// and clear children (else the children just
// appended to pCur would be destroyed)
@@ -677,16 +773,11 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent)
}
else if( dynamic_cast<HyperlinkElement*>(*it) )
optimizeTextElements( **it );
- if( bConcat )
- {
+ if ( bConcat )
next = it;
- ++next;
- }
else
- {
++it;
- ++next;
- }
+ ++next;
}
}
@@ -763,19 +854,21 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co
// family name
aFontProps[ USTR( "fo:font-family" ) ] = rFont.familyName;
+ aFontProps[ USTR( "style:font-family-complex" ) ] = rFont.familyName;
+
// bold
if( rFont.isBold )
{
aFontProps[ USTR( "fo:font-weight" ) ] = USTR( "bold" );
aFontProps[ USTR( "fo:font-weight-asian" ) ] = USTR( "bold" );
- aFontProps[ USTR( "fo:font-weight-complex" ) ] = USTR( "bold" );
+ aFontProps[ USTR( "style:font-weight-complex" ) ] = USTR( "bold" );
}
// italic
if( rFont.isItalic )
{
aFontProps[ USTR( "fo:font-style" ) ] = USTR( "italic" );
aFontProps[ USTR( "fo:font-style-asian" ) ] = USTR( "italic" );
- aFontProps[ USTR( "fo:font-style-complex" ) ] = USTR( "italic" );
+ aFontProps[ USTR( "style:font-style-complex" ) ] = USTR( "italic" );
}
// underline
if( rFont.isUnderline )
@@ -809,6 +902,26 @@ void DrawXmlFinalizer::visit( TextElement& elem, const std::list< Element* >::co
void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element* >::const_iterator& )
{
+
+ PropertyMap aProps;
+ aProps[ USTR( "style:family" ) ] = USTR( "paragraph" );
+ // generate standard paragraph style if necessary
+ m_rStyleContainer.getStandardStyleId( "paragraph" );
+
+ PropertyMap aParProps;
+
+ aParProps[ USTR("fo:text-align")] = USTR("start");
+ if (elem.bRtl)
+ aParProps[ USTR("style:writing-mode")] = USTR("rl-tb");
+ else
+ aParProps[ USTR("style:writing-mode")] = USTR("lr-tb");
+
+ StyleContainer::Style aStyle( "style:style", aProps );
+ StyleContainer::Style aSubStyle( "style:paragraph-properties", aParProps );
+ aStyle.SubStyles.push_back( &aSubStyle );
+
+ elem.StyleId = m_rStyleContainer.getStyleId( aStyle );
+
// update page boundaries
if( elem.Parent )
{
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.hxx b/sdext/source/pdfimport/tree/drawtreevisiting.hxx
index b7b94371c6da..fd347fa4f302 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.hxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.hxx
@@ -29,7 +29,9 @@
#define INCLUDED_PDFI_DRAWTREEVISITING_HXX
#include "treevisiting.hxx"
-
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
namespace pdfi
{
@@ -42,6 +44,8 @@ namespace pdfi
void optimizeTextElements(Element& rParent);
public:
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIter;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
explicit DrawXmlOptimizer(PDFIProcessor& rProcessor) :
m_rProcessor(rProcessor)
{}
@@ -82,6 +86,10 @@ namespace pdfi
class DrawXmlEmitter : public ElementTreeVisitor
{
private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xFactory;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xCtx;
+ ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIter;
+
EmitContext& m_rEmitContext ;
/// writes Impress doc when false
const bool m_bWriteDrawDocument;
@@ -91,6 +99,7 @@ namespace pdfi
const EmitContext& rEmitContext );
public:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >& GetBreakIterator();
enum DocType{ DRAW_DOC, IMPRESS_DOC };
explicit DrawXmlEmitter(EmitContext& rEmitContext, DocType eDocType) :
m_rEmitContext(rEmitContext),
diff --git a/sdext/source/pdfimport/tree/genericelements.hxx b/sdext/source/pdfimport/tree/genericelements.hxx
index 88293673ee3a..d7cd690aba61 100644
--- a/sdext/source/pdfimport/tree/genericelements.hxx
+++ b/sdext/source/pdfimport/tree/genericelements.hxx
@@ -32,6 +32,7 @@
#include "treevisiting.hxx"
#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/range/b2drange.hxx>
#include <rtl/ustring.hxx>
@@ -56,12 +57,15 @@ namespace pdfi
ImageContainer& _rImages,
PDFIProcessor& _rProcessor,
const com::sun::star::uno::Reference<
- com::sun::star::task::XStatusIndicator>& _xStatusIndicator ) :
+ com::sun::star::task::XStatusIndicator>& _xStatusIndicator,
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext)
+ :
rEmitter(_rEmitter),
rStyles(_rStyles),
rImages(_rImages),
rProcessor(_rProcessor),
- xStatusIndicator(_xStatusIndicator)
+ xStatusIndicator(_xStatusIndicator),
+ m_xContext(xContext)
{}
XmlEmitter& rEmitter;
@@ -70,6 +74,8 @@ namespace pdfi
PDFIProcessor& rProcessor;
com::sun::star::uno::Reference<
com::sun::star::task::XStatusIndicator> xStatusIndicator;
+ com::sun::star::uno::Reference<
+ com::sun::star::uno::XComponentContext > m_xContext;
};
struct Element : public ElementTreeVisitable
@@ -178,7 +184,7 @@ namespace pdfi
{
friend class ElementFactory;
protected:
- ParagraphElement( Element* pParent ) : Element( pParent ), Type( Normal ) {}
+ ParagraphElement( Element* pParent ) : Element( pParent ), Type( Normal ), bRtl( false ) {}
public:
// ElementTreeVisitable
@@ -194,6 +200,7 @@ namespace pdfi
enum ParagraphType { Normal, Headline };
ParagraphType Type;
+ bool bRtl;
};
struct PolyPolyElement : public DrawElement
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index d132c8f74c31..d823cac524cf 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -61,7 +61,10 @@ using namespace com::sun::star;
namespace pdfi
{
- PDFIProcessor::PDFIProcessor( const uno::Reference< task::XStatusIndicator >& xStat ) :
+ PDFIProcessor::PDFIProcessor( const uno::Reference< task::XStatusIndicator >& xStat ,
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) :
+
+ m_xContext(xContext),
fYPrevTextPosition(-10000.0),
fPrevTextHeight(0.0),
fXPrevTextPosition(0.0),
@@ -842,7 +845,7 @@ void PDFIProcessor::emit( XmlEmitter& rEmitter,
m_pDocument->visitedBy( *finalizingVisitor, std::list<Element*>::iterator() );
- EmitContext aContext( rEmitter, aStyles, m_aImages, *this, m_xStatusIndicator );
+ EmitContext aContext( rEmitter, aStyles, m_aImages, *this, m_xStatusIndicator, m_xContext );
ElementTreeVisitorSharedPtr aEmittingVisitor(
rVisitorFactory.createEmittingVisitor(aContext));
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.hxx b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
index 6a9d4ab85a4d..e646d6999df7 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.hxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.hxx
@@ -72,13 +72,16 @@ namespace pdfi
class PDFIProcessor : public ContentSink
{
public:
+ com::sun::star::uno::Reference<
+ com::sun::star::uno::XComponentContext > m_xContext;
double fYPrevTextPosition;
double fPrevTextHeight;
double fXPrevTextPosition;
double fPrevTextWidth;
enum DocumentTextDirecion { LrTb, RlTb, TbLr };
- explicit PDFIProcessor( const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& );
+ explicit PDFIProcessor( const com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator >& xStat,
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xContext) ;
/// TEMP - enable writer-like text:p on doc level
void enableToplevelText();
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 0eafbbb83327..51817ce5eacf 100755
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -70,6 +70,10 @@
#include <hash_map>
#include <string.h>
+#ifdef WNT
+#include <stdlib.h>
+#include <ctype.h>
+#endif
#include "rtl/bootstrap.h"
@@ -180,6 +184,10 @@ class Parser
void readLink();
void readMaskedImage();
void readSoftMaskedImage();
+ int parseFontCheckForString( const sal_Unicode* pCopy, const char* str, sal_Int32& nLen,
+ FontAttributes& aResult, bool bItalic, bool bBold);
+ int parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen);
+
public:
Parser( const ContentSinkSharedPtr& rSink,
@@ -455,6 +463,35 @@ rendering::ARGBColor Parser::readColor()
return aRes;
}
+int Parser::parseFontCheckForString( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen,
+ FontAttributes& aResult, bool bItalic, bool bBold)
+{
+ int l = strlen(s);
+ if (nLen < l)
+ return 0;
+ for (int i = 0; i < l; i++)
+ if (tolower(pCopy[i]) != s[i]
+ && toupper(pCopy[i]) != s[i])
+ return 0;
+ aResult.isItalic = bItalic;
+ aResult.isBold = bBold;
+ nLen -= l;
+ pCopy += l;
+ return l;
+}
+
+int Parser::parseFontRemoveSuffix( const sal_Unicode* pCopy, const char* s, sal_Int32& nLen)
+{
+ int l = strlen(s);
+ if (nLen < l)
+ return 0;
+ for (int i = 0; i < l; i++)
+ if ( pCopy[nLen - l + i] != s[i] )
+ return 0;
+ nLen -= l;
+ return l;
+}
+
void Parser::parseFontFamilyName( FontAttributes& aResult )
{
rtl::OUStringBuffer aNewFamilyName( aResult.familyName.getLength() );
@@ -470,39 +507,17 @@ void Parser::parseFontFamilyName( FontAttributes& aResult )
while( nLen )
{
- if( nLen > 5 &&
- ( *pCopy == 'i' || *pCopy == 'I' ) &&
- pCopy[1] == 't' &&
- pCopy[2] == 'a' &&
- pCopy[3] == 'l' &&
- pCopy[4] == 'i' &&
- pCopy[5] == 'c' )
- {
- aResult.isItalic = true;
- nLen -=6;
- pCopy += 6;
- }
- else if( nLen > 3 &&
- ( *pCopy == 'B' || *pCopy == 'b' ) &&
- pCopy[1] == 'o' &&
- pCopy[2] == 'l' &&
- pCopy[3] == 'd' )
- {
- aResult.isBold = true;
- nLen -=4;
- pCopy += 4;
- }
- else if( nLen > 5 &&
- *pCopy == '-' &&
- ( pCopy[1] == 'R' || pCopy[1] == 'r' ) &&
- pCopy[2] == 'o' &&
- pCopy[3] == 'm' &&
- pCopy[4] == 'a' &&
- pCopy[5] == 'n' )
- {
- nLen -= 6;
- pCopy += 6;
- }
+ if (parseFontRemoveSuffix( pCopy, "PSMT", nLen)) {}
+ else if (parseFontRemoveSuffix( pCopy, "MT", nLen)) {}
+
+ if (parseFontCheckForString( pCopy, "Italic", nLen, aResult, true, false)) {}
+ else if (parseFontCheckForString( pCopy, "-Bold", nLen, aResult, false, true)) {}
+ else if (parseFontCheckForString( pCopy, "Bold", nLen, aResult, false, true)) {}
+ else if (parseFontCheckForString( pCopy, "-Roman", nLen, aResult, false, false)) {}
+ else if (parseFontCheckForString( pCopy, "-LightOblique", nLen, aResult, true, false)) {}
+ else if (parseFontCheckForString( pCopy, "-BoldOblique", nLen, aResult, true, true)) {}
+ else if (parseFontCheckForString( pCopy, "-Light", nLen, aResult, false, false)) {}
+ else if (parseFontCheckForString( pCopy, "-Reg", nLen, aResult, false, false)) {}
else
{
if( *pCopy != '-' )
@@ -557,7 +572,6 @@ void Parser::readFont()
// extract textual attributes (bold, italic in the name, etc.)
parseFontFamilyName(aResult);
-
// need to read font file?
if( nFileLen )
{
@@ -582,6 +596,7 @@ void Parser::readFont()
if( aRes >>= aFD )
{
aResult.familyName = aFD.Name;
+ parseFontFamilyName(aResult);
aResult.isBold = (aFD.Weight > 100.0);
aResult.isItalic = (aFD.Slant == awt::FontSlant_OBLIQUE ||
aFD.Slant == awt::FontSlant_ITALIC );
@@ -602,7 +617,6 @@ void Parser::readFont()
}
}
-
m_aFontMap[nFontID] = aResult;
aResult.size = nSize;
@@ -875,7 +889,8 @@ oslFileError readLine( oslFileHandle pFile, ::rtl::OStringBuffer& line )
static bool checkEncryption( const rtl::OUString& i_rPath,
const uno::Reference< task::XInteractionHandler >& i_xIHdl,
rtl::OUString& io_rPwd,
- bool& o_rIsEncrypted
+ bool& o_rIsEncrypted,
+ const rtl::OUString& i_rDocName
)
{
bool bSuccess = false;
@@ -908,7 +923,7 @@ static bool checkEncryption( const rtl::OUString&
bool bEntered = false;
do
{
- bEntered = getPassword( i_xIHdl, io_rPwd, ! bEntered );
+ bEntered = getPassword( i_xIHdl, io_rPwd, ! bEntered, i_rDocName );
rtl::OString aIsoPwd = rtl::OUStringToOString( io_rPwd,
RTL_TEXTENCODING_ISO_8859_1 );
bAuthenticated = pPDFFile->setupDecryptionData( aIsoPwd.getStr() );
@@ -937,11 +952,12 @@ bool xpdf_ImportFromFile( const ::rtl::OUString& rUR
::rtl::OUString aSysUPath;
if( osl_getSystemPathFromFileURL( rURL.pData, &aSysUPath.pData ) != osl_File_E_None )
return false;
+ rtl::OUString aDocName( rURL.copy( rURL.lastIndexOf( sal_Unicode('/') )+1 ) );
// check for encryption, if necessary get password
rtl::OUString aPwd( rPwd );
bool bIsEncrypted = false;
- if( checkEncryption( aSysUPath, xIHdl, aPwd, bIsEncrypted ) == false )
+ if( checkEncryption( aSysUPath, xIHdl, aPwd, bIsEncrypted, aDocName ) == false )
return false;
rtl::OUStringBuffer converterURL = rtl::OUString::createFromAscii("xpdfimport");
diff --git a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
index 86cba0908bbb..9a933eea0334 100755
--- a/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
+++ b/setup_native/source/win32/customactions/languagepacks/checkrunningofficelanguagepack.cxx
@@ -177,8 +177,8 @@ static BOOL MoveFileExImpl( LPCSTR lpExistingFileNameA, LPCSTR lpNewFileNameA, D
extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") );
- std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\");
+ std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
+ std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\");
std::_tstring sPattern = sResourceDir + TEXT("vcl*.res");
WIN32_FIND_DATA aFindFileData;
diff --git a/setup_native/source/win32/customactions/languagepacks/respintest.cxx b/setup_native/source/win32/customactions/languagepacks/respintest.cxx
index bdfb97dfb3e1..6a98af8a3f30 100644
--- a/setup_native/source/win32/customactions/languagepacks/respintest.cxx
+++ b/setup_native/source/win32/customactions/languagepacks/respintest.cxx
@@ -88,7 +88,7 @@ namespace
extern "C" UINT __stdcall GetUserInstallMode(MSIHANDLE handle)
{
- string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
+ string sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
// MessageBox(NULL, sOfficeInstallPath.c_str(), "DEBUG", MB_OK);
diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
index d6f0933077fc..6285d64ebe3f 100755
--- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
+++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
@@ -544,8 +544,7 @@ static std::queue< std::_tstring > getProfileKeys( const std::_tstring& aFileNam
extern "C" UINT __stdcall InstallPatchedFiles( MSIHANDLE handle )
{
std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
- std::_tstring sBasisInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") );
- std::_tstring sProgramDir = sBasisInstDir + TEXT("program\\");
+ std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\");
std::_tstring sPatchFile = sProgramDir + TEXT("patchlist.txt");
std::queue< std::_tstring > aSectionNames;
@@ -605,16 +604,11 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
HKEY hKey;
std::_tstring sInstDir;
- std::_tstring sBasisInstDir;
std::_tstring sProductKey = GetMsiProperty( handle, TEXT("FINDPRODUCT") );
if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sBasisInstDir = szValue;
- }
if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
@@ -623,10 +617,6 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
}
else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sBasisInstDir = szValue;
- }
if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
@@ -636,7 +626,7 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
else
return ERROR_SUCCESS;
- std::_tstring sProgramDir = sBasisInstDir + TEXT("program\\");
+ std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\");
std::_tstring sPatchFile = sProgramDir + TEXT("patchlist.txt");
std::queue< std::_tstring > aSectionNames;
@@ -689,8 +679,8 @@ extern "C" UINT __stdcall UninstallPatchedFiles( MSIHANDLE handle )
extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") );
- std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\");
+ std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
+ std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\");
std::_tstring sPattern = sResourceDir + TEXT("vcl*.res");
WIN32_FIND_DATA aFindFileData;
@@ -733,8 +723,8 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
// 1. Reading Product Code from setup.ini of installed Office
- std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
- // MessageBox(NULL, sInstallPath.c_str(), "BASISINSTALLLOCATION", MB_OK);
+ std::_tstring sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
+ // MessageBox(NULL, sInstallPath.c_str(), "INSTALLLOCATION", MB_OK);
std::_tstring sSetupiniPath = sInstallPath + TEXT("program\\setup.ini");
TCHAR szProductCode[32767];
@@ -869,8 +859,8 @@ extern "C" UINT __stdcall ShowOnlineUpdateDialog( MSIHANDLE handle )
// Online Update functionality is always available. Then the dialog
// that offers the Online Update is superfluous.
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") );
- std::_tstring sProgramDir = sInstDir + TEXT("program\\");
+ std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
+ std::_tstring sProgramDir = sInstDir + TEXT("Basis\\program\\");
std::_tstring sSearchFile = sProgramDir + TEXT("updchk.uno.dll");
WIN32_FIND_DATA data;
diff --git a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx
index f732a3a8ad57..25659a0b4109 100644
--- a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx
+++ b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx
@@ -15,13 +15,13 @@ std::string GetOfficeInstallationPath(MSIHANDLE handle)
DWORD sz = 0;
LPTSTR dummy = TEXT("");
- if (MsiGetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA)
+ if (MsiGetProperty(handle, TEXT("INSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA)
{
sz++; // space for the final '\0'
DWORD nbytes = sz * sizeof(TCHAR);
LPTSTR buff = reinterpret_cast<LPTSTR>(_alloca(nbytes));
ZeroMemory(buff, nbytes);
- MsiGetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), buff, &sz);
+ MsiGetProperty(handle, TEXT("INSTALLLOCATION"), buff, &sz);
progpath = buff;
}
return progpath;
diff --git a/setup_native/source/win32/customactions/rebase/rebase.cxx b/setup_native/source/win32/customactions/rebase/rebase.cxx
index 4d031bee908a..dfe1e82e1e9b 100644
--- a/setup_native/source/win32/customactions/rebase/rebase.cxx
+++ b/setup_native/source/win32/customactions/rebase/rebase.cxx
@@ -126,13 +126,11 @@ static BOOL rebaseImagesInFolder( MSIHANDLE handle, const std::string& sPath, LP
static BOOL rebaseImages( MSIHANDLE handle, LPVOID pAddress )
{
- std::string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
- std::string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION"));
- std::string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION"));
+ std::string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
- std::string sBasisDir = sBasisInstallPath + TEXT("program\\");
- std::string sOfficeDir = sOfficeInstallPath + TEXT("program\\");
- std::string sUreDir = sUreInstallPath + TEXT("bin\\");
+ std::string sBasisDir = sInstallPath + TEXT("Basis\\program\\");
+ std::string sOfficeDir = sInstallPath + TEXT("program\\");
+ std::string sUreDir = sInstallPath + TEXT("URE\\bin\\");
BOOL bResult = rebaseImagesInFolder( handle, sBasisDir, pAddress );
bResult &= rebaseImagesInFolder( handle, sOfficeDir, pAddress );
diff --git a/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx b/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx
index 8cfc1fb08597..2941ba5a8e27 100644
--- a/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx
+++ b/setup_native/source/win32/customactions/reg4msdoc/msihelper.cxx
@@ -52,7 +52,7 @@ bool IsAllUserInstallation(MSIHANDLE handle)
std::wstring GetOfficeInstallationPath(MSIHANDLE handle)
{
std::wstring progpath;
- GetMsiProp(handle, TEXT("OFFICEINSTALLLOCATION"), progpath);
+ GetMsiProp(handle, TEXT("INSTALLLOCATION"), progpath);
return progpath;
}
diff --git a/setup_native/source/win32/customactions/reg64/reg64.cxx b/setup_native/source/win32/customactions/reg64/reg64.cxx
index 2264a228030d..53eb16a99583 100644..100755
--- a/setup_native/source/win32/customactions/reg64/reg64.cxx
+++ b/setup_native/source/win32/customactions/reg64/reg64.cxx
@@ -56,13 +56,14 @@ WINADVAPI LONG WINAPI RegDeleteKeyExW(HKEY,LPCWSTR,REGSAM,DWORD);
// in mingw 3.13 KEY_WOW64_64KEY isn't available < Win2003 systems.
// Also defined in setup_native\source\win32\customactions\reg64\reg64.cxx,source\win32\customactions\shellextensions\shellextensions.cxx and
// extensions\source\activex\main\so_activex.cpp
+
#ifndef KEY_WOW64_64KEY
#define KEY_WOW64_64KEY (0x0100)
#endif
#define TABLE_NAME L"Reg64"
-#define BASISINSTALLLOCATION L"[BASISINSTALLLOCATION]"
+#define INSTALLLOCATION L"[INSTALLLOCATION]"
bool isInstall4AllUsers;
wchar_t * sBasisInstallLocation;
@@ -214,9 +215,10 @@ wchar_t* GetBasisInstallLocation( MSIHANDLE hMSI )
OutputDebugStringFormat(L"GetBasisInstallLocation - START\n" );
bool bResult = FALSE;
wchar_t* pVal = NULL;
- GetMsiProp( hMSI, L"BASISINSTALLLOCATION", &pVal);
+ GetMsiProp( hMSI, L"INSTALLLOCATION", &pVal);
OutputDebugStringFormat(L"GetBasisInstallLocation - ENDE\n" );
+
return pVal;
}
@@ -325,14 +327,14 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView)
- wchar_t* nPos = wcsstr(szValue , BASISINSTALLLOCATION);
+ wchar_t* nPos = wcsstr(szValue , INSTALLLOCATION);
if ( NULL != nPos)
{
DWORD nPrefixSize = nPos - szValue;
DWORD nPropSize = wcslen(sBasisInstallLocation);
- DWORD nPostfixSize = dwValue - wcslen( BASISINSTALLLOCATION );
+ DWORD nPostfixSize = dwValue - wcslen( INSTALLLOCATION );
DWORD nNewValueBytes = (nPropSize + nPostfixSize + 1) * sizeof( wchar_t );
wchar_t* newValue = reinterpret_cast<wchar_t*>( malloc( nNewValueBytes ) );
@@ -345,7 +347,7 @@ bool DoRegEntries( MSIHANDLE& rhMSI, OPERATION op, MSIHANDLE& rhView)
wcsncat(newValue, sBasisInstallLocation, nPropSize * sizeof( wchar_t ));
// postfix
- wcsncat(newValue, nPos + ( wcslen( BASISINSTALLLOCATION ) ), nPropSize * sizeof( wchar_t ));
+ wcsncat(newValue, nPos + ( wcslen( INSTALLLOCATION ) ), nPropSize * sizeof( wchar_t ));
wcsncpy(szValue, newValue, nNewValueBytes <=1024? nNewValueBytes: 1024);
diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
index 1e91ccbd8599..037824689a47 100644
--- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx
+++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx
@@ -170,7 +170,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue )
BOOL GetActiveXControlPath( MSIHANDLE hMSI, char** ppActiveXPath )
{
wchar_t* pProgPath = NULL;
- if ( GetMsiProp( hMSI, L"OFFICEINSTALLLOCATION", &pProgPath ) && pProgPath )
+ if ( GetMsiProp( hMSI, L"INSTALLLOCATION", &pProgPath ) && pProgPath )
{
char* pCharProgPath = UnicodeToAnsiString( pProgPath );
#ifdef OWN_DEBUG_PRINT
diff --git a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
index 09f60b7a66d5..9a028953fef1 100755
--- a/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkrunningoffice.cxx
@@ -184,12 +184,12 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
// renaming the vcl resource doesn't work reliable with OS >= Windows Vista
if (osverinfo.dwMajorVersion < 6 )
{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("BASISINSTALLLOCATION") );
+ std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
// Property empty -> no office installed
if ( sInstDir.length() == 0 )
return ERROR_SUCCESS;
- std::_tstring sResourceDir = sInstDir + TEXT("program\\resource\\");
+ std::_tstring sResourceDir = sInstDir + TEXT("Basis\\program\\resource\\");
std::_tstring sPattern = sResourceDir + TEXT("vcl*.res");
// std::_tstring mystr;
@@ -233,7 +233,7 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
}
else
{
- std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
+ std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
// Property empty -> no office installed
if ( sOfficeInstallPath.length() == 0 )
return ERROR_SUCCESS;
diff --git a/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx b/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx
index 28dfcc0e18b6..7dc5194a18cb 100644
--- a/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/copyeditiondata.cxx
@@ -100,7 +100,7 @@ extern "C" UINT __stdcall copyEditionData(MSIHANDLE install) {
wchar_t * end;
boost::scoped_array<wchar_t> to(
getProperty(
- install, L"OFFICEINSTALLLOCATION",
+ install, L"INSTALLLOCATION",
LCL_STRING0(L"program\\edition\0"), &end));
if (!to) {
return ERROR_INSTALL_FAILURE;
diff --git a/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx b/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx
index 522c52a9aac9..517915cb831f 100644
--- a/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/copyextensiondata.cxx
@@ -93,7 +93,7 @@ extern "C" UINT __stdcall copyExtensionData(MSIHANDLE handle) {
bool fSuccess = true;
bool bFailIfExist = true;
- std::_tstring sDestDir = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") );
+ std::_tstring sDestDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
std::_tstring sShareInstallDir = sDestDir + TEXT("share\\extension\\install\\");
// creating directories
diff --git a/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx b/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx
index 2b022cfb3b8e..f7cf0247c631 100644
--- a/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/dotnetcheck.cxx
@@ -161,18 +161,6 @@ extern "C" UINT __stdcall ShowProperties(MSIHANDLE handle)
string myText = TEXT("INSTALLLOCATION: ") + property;
MessageBox(NULL, myText.c_str(), "INSTALLLOCATION", MB_OK);
- property = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION"));
- myText = TEXT("UREINSTALLLOCATION: ") + property;
- MessageBox(NULL, myText.c_str(), "UREINSTALLLOCATION", MB_OK);
-
- property = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION"));
- myText = TEXT("BASISINSTALLLOCATION: ") + property;
- MessageBox(NULL, myText.c_str(), "BASISINSTALLLOCATION", MB_OK);
-
- property = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
- myText = TEXT("OFFICEINSTALLLOCATION: ") + property;
- MessageBox(NULL, myText.c_str(), "OFFICEINSTALLLOCATION", MB_OK);
-
property = GetMsiProperty(handle, TEXT("Installed"));
myText = TEXT("Installed: ") + property;
MessageBox(NULL, myText.c_str(), "Installed", MB_OK);
diff --git a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx
index 114e24955820..fb0897e728fe 100644
--- a/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/layerlinks.cxx
@@ -98,12 +98,14 @@ namespace
extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle)
{
- string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
- string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISINSTALLLOCATION"));
- string sUreInstallPath = GetMsiProperty(handle, TEXT("UREINSTALLLOCATION"));
+ string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
- string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link");
- string sUreLinkPath = sBasisInstallPath + TEXT("ure-link");
+ string sOfficeInstallPath = sInstallPath;
+ string sBasisInstallPath = sInstallPath + TEXT("Basis\\");
+ string sUreInstallPath = sInstallPath + TEXT("URE\\");
+
+ string sBasisLinkPath = sInstallPath + TEXT("basis-link");
+ string sUreLinkPath = sInstallPath + TEXT("Basis\\ure-link");
if ( IsSetMsiProperty(handle, TEXT("ADMININSTALL")) )
{
@@ -208,9 +210,11 @@ extern "C" UINT __stdcall CreateLayerLinks(MSIHANDLE handle)
extern "C" UINT __stdcall RemoveLayerLinks(MSIHANDLE handle)
{
- string sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEUNINSTALLLOCATION"));
- string sBasisInstallPath = GetMsiProperty(handle, TEXT("BASISUNINSTALLLOCATION"));
- string sUreInstallPath = GetMsiProperty(handle, TEXT("UREUNINSTALLLOCATION"));
+ string sInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
+
+ string sOfficeInstallPath = sInstallPath;
+ string sBasisInstallPath = sInstallPath + TEXT("Basis\\");
+ string sUreInstallPath = sInstallPath + TEXT("URE\\");
string sBasisLinkPath = sOfficeInstallPath + TEXT("basis-link");
string sUreLinkPath = sBasisInstallPath + TEXT("ure-link");
diff --git a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
index 1d3692e456b0..c8035799a539 100755
--- a/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
@@ -91,27 +91,6 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle )
if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- MsiSetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), sInstDir.c_str());
- // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK );
- }
-
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- MsiSetProperty(handle, TEXT("BASISINSTALLLOCATION"), sInstDir.c_str());
- // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK );
- }
-
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("UREINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- MsiSetProperty(handle, TEXT("UREINSTALLLOCATION"), sInstDir.c_str());
- // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_CURRENT_USER", MB_OK );
- }
-
if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
@@ -123,27 +102,6 @@ extern "C" UINT __stdcall MigrateInstallPath( MSIHANDLE handle )
}
else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- MsiSetProperty(handle, TEXT("OFFICEINSTALLLOCATION"), sInstDir.c_str());
- // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK );
- }
-
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("BASISINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- MsiSetProperty(handle, TEXT("BASISINSTALLLOCATION"), sInstDir.c_str());
- // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK );
- }
-
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("UREINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
- {
- sInstDir = szValue;
- MsiSetProperty(handle, TEXT("UREINSTALLLOCATION"), sInstDir.c_str());
- // MessageBox( NULL, sInstDir.c_str(), "Found in HKEY_LOCAL_MACHINE", MB_OK );
- }
-
if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
diff --git a/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx b/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx
index bb339953ff34..ea9bfae3864b 100755
--- a/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/postuninstall.cxx
@@ -115,7 +115,7 @@ extern "C" UINT __stdcall ExecutePostUninstallScript( MSIHANDLE handle )
if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
}
@@ -123,7 +123,7 @@ extern "C" UINT __stdcall ExecutePostUninstallScript( MSIHANDLE handle )
}
else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
}
diff --git a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
index 191bb5fad393..3906d2584fd1 100644
--- a/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/registerextensions.cxx
@@ -317,7 +317,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
extern "C" UINT __stdcall RegisterExtensions(MSIHANDLE handle)
{
- std::_tstring sInstDir = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") );
+ std::_tstring sInstDir = GetMsiProperty( handle, TEXT("INSTALLLOCATION") );
std::_tstring sUnoPkgFile = sInstDir + TEXT("program\\unopkg.exe");
std::_tstring sShareInstallDir = sInstDir + TEXT("share\\extension\\install\\");
std::_tstring sPattern = sShareInstallDir + TEXT("*.oxt");
@@ -415,7 +415,7 @@ extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle)
if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
}
@@ -423,7 +423,7 @@ extern "C" UINT __stdcall DeregisterExtensions(MSIHANDLE handle)
}
else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
}
@@ -533,7 +533,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle)
if ( ERROR_SUCCESS == RegOpenKey( HKEY_CURRENT_USER, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
}
@@ -541,7 +541,7 @@ extern "C" UINT __stdcall RemoveExtensions(MSIHANDLE handle)
}
else if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE, sProductKey.c_str(), &hKey ) )
{
- if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("OFFICEINSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+ if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("INSTALLLOCATION"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
{
sInstDir = szValue;
}
diff --git a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
index 49d5e50be426..5adab408139d 100644
--- a/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
@@ -78,7 +78,7 @@ extern "C" UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
// MessageBox(NULL, sDesktopFile.c_str(), TEXT("OfficeMenuFolder"), MB_OK | MB_ICONINFORMATION);
- std::_tstring sIconFile = GetMsiProperty( handle, TEXT("OFFICEINSTALLLOCATION") ) + TEXT("program\\soffice.exe");
+ std::_tstring sIconFile = GetMsiProperty( handle, TEXT("INSTALLLOCATION") ) + TEXT("program\\soffice.exe");
OSVERSIONINFO osverinfo;
osverinfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
index d9c271133ac0..70064b58807c 100644
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
@@ -183,12 +183,12 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
{
- std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
+ std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
std::_tstring sRenameSrc = sOfficeInstallPath + TEXT("program");
std::_tstring sRenameDst = sOfficeInstallPath + TEXT("program_old");
-// MessageBox(NULL, sRenameSrc.c_str(), "OFFICEINSTALLLOCATION", MB_OK);
+// MessageBox(NULL, sRenameSrc.c_str(), "INSTALLLOCATION", MB_OK);
bool bSuccess = MoveFile( sRenameSrc.c_str(), sRenameDst.c_str() );
if ( !bSuccess )
@@ -216,7 +216,7 @@ extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
extern "C" UINT __stdcall RemovePrgFolder( MSIHANDLE handle )
{
- std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("OFFICEINSTALLLOCATION"));
+ std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));
std::_tstring sRemoveDir = sOfficeInstallPath + TEXT("program_old");
// MessageBox(NULL, sRemoveDir.c_str(), "REMOVING OLD DIR", MB_OK);
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
index 3cc3eecc7ce7..7468394d2617 100644
--- a/sfx2/inc/sfx2/docfac.hxx
+++ b/sfx2/inc/sfx2/docfac.hxx
@@ -101,6 +101,7 @@ public:
const SfxFilter* GetTemplateFilter() const;
static String GetStandardTemplate( const String& rServiceName );
static void SetStandardTemplate( const String& rServiceName, const String& rTemplateName );
+ static void SetSystemTemplate( const String& rServiceName, const String& rTemplateName );
void SetDocumentServiceName( const rtl::OUString& rServiceName );
const rtl::OUString& GetDocumentServiceName() const;
diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx
index d618051e4063..30d82c854642 100644
--- a/sfx2/inc/sfx2/tbxctrl.hxx
+++ b/sfx2/inc/sfx2/tbxctrl.hxx
@@ -243,6 +243,7 @@ protected:
virtual void SAL_CALL release() throw();
// XEventListener
+ using ::cppu::OPropertySetHelper::disposing;
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw( ::com::sun::star::uno::RuntimeException );
// XComponent
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index 131156a78d4d..96320614eaaf 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,4 +1,4 @@
-sf sfx2 : l10n idl basic xmlscript framework shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL
+sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 NULL
sf sfx2 usr1 - all sf_mkout NULL
sf sfx2\inc nmake - all sf_inc NULL
sf sfx2\prj get - all sf_prj NULL
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 81c2da0ce78d..45ebfeac69f9 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -33,6 +33,7 @@
#include <vcl/svapp.hxx>
#include <sfx2/filedlghelper.hxx>
#include <unotools/localedatawrapper.hxx>
+#include <unotools/cmdoptions.hxx>
#include <comphelper/processfactory.hxx>
#include <svl/urihelper.hxx>
#include <unotools/useroptions.hxx>
@@ -119,6 +120,8 @@ const USHORT HI_TYPE = 2;
const USHORT HI_VALUE = 3;
const USHORT HI_ACTION = 4;
+static const char DOCUMENT_SIGNATURE_MENU_CMD[] = "Signature";
+
//------------------------------------------------------------------------
String CreateSizeText( ULONG nSize, BOOL bExtraBytes = TRUE, BOOL bSmartExtraBytes = FALSE );
String CreateSizeText( ULONG nSize, BOOL bExtraBytes, BOOL bSmartExtraBytes )
@@ -858,6 +861,13 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet )
aNewSize.Width() -= nDelta;
aUseUserDataCB.SetSizePixel( aNewSize );
}
+ // See i96288
+ // Check if the document signature command is enabled
+ // on the main list enable/disable the pushbutton accordingly
+ SvtCommandOptions aCmdOptions;
+ if ( aCmdOptions.Lookup( SvtCommandOptions::CMDOPTION_DISABLED,
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( DOCUMENT_SIGNATURE_MENU_CMD ) ) ) )
+ aSignatureBtn.Disable();
}
//------------------------------------------------------------------------
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 5270eb5d4207..7d177d0bbfd8 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -57,6 +57,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/stillreadwriteinteraction.hxx>
#include <tools/urlobj.hxx>
#include <vcl/help.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -542,33 +543,13 @@ void FileDialogHelper_Impl::updateExportButton()
// ------------------------------------------------------------------------
void FileDialogHelper_Impl::updateSelectionBox()
{
- if ( !mbExport )
+ if ( !mbHasSelectionBox )
return;
- // Does the selection box exist?
- bool bSelectionBoxFound = false;
- uno::Reference< XControlInformation > xCtrlInfo( mxFileDlg, UNO_QUERY );
- if ( xCtrlInfo.is() )
- {
- Sequence< ::rtl::OUString > aCtrlList = xCtrlInfo->getSupportedControls();
- sal_uInt32 nCount = aCtrlList.getLength();
- for ( sal_uInt32 nCtrl = 0; nCtrl < nCount; ++nCtrl )
- if ( aCtrlList[ nCtrl ].equalsAscii("SelectionBox") )
- {
- bSelectionBoxFound = true;
- break;
- }
- }
-
- if ( bSelectionBoxFound )
- {
- const SfxFilter* pFilter = getCurentSfxFilter();
- updateExtendedControl(
- ExtendedFilePickerElementIds::CHECKBOX_SELECTION,
- ( mbSelectionEnabled && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_SUPPORTSSELECTION ) != 0 ) );
- uno::Reference< XFilePickerControlAccess > xCtrlAccess( mxFileDlg, UNO_QUERY );
- xCtrlAccess->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, makeAny( (sal_Bool)mbSelection ) );
- }
+ const SfxFilter* pFilter = getCurentSfxFilter();
+ mbSelectionFltrEnabled = updateExtendedControl(
+ ExtendedFilePickerElementIds::CHECKBOX_SELECTION,
+ ( mbSelectionEnabled && pFilter && ( pFilter->GetFilterFlags() & SFX_FILTER_SUPPORTSSELECTION ) != 0 ) );
}
// ------------------------------------------------------------------------
@@ -956,6 +937,8 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
mbPwdCheckBoxState = sal_False;
mbSelection = sal_False;
mbSelectionEnabled = sal_True;
+ mbHasSelectionBox = sal_False;
+ mbSelectionFltrEnabled = sal_False;
// default settings
m_nDontFlags = SFX_FILTER_INTERNAL | SFX_FILTER_NOTINFILEDLG | SFX_FILTER_NOTINSTALLED;
@@ -1025,6 +1008,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
nTemplateDescription = TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION;
mbHasAutoExt = sal_True;
mbIsSaveDlg = sal_True;
+ mbHasSelectionBox = sal_True;
if ( mbExport && !mxFilterCFG.is() && xFactory.is() )
{
mxFilterCFG = uno::Reference< XNameAccess >(
@@ -2073,6 +2057,21 @@ void FileDialogHelper_Impl::saveConfig()
}
}
+ if( mbHasSelectionBox && mbSelectionFltrEnabled )
+ {
+ try
+ {
+ aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 );
+ sal_Bool bSelection = sal_True;
+ aValue >>= bSelection;
+ if ( aUserData.GetTokenCount(' ') < 3 )
+ aUserData.Append(' ');
+ aUserData.SetToken( 2, ' ', String::CreateFromInt32( (sal_Int32) bSelection ) );
+ bWriteConfig = sal_True;
+ }
+ catch( IllegalArgumentException ){}
+ }
+
if ( bWriteConfig )
aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aUserData ) ) );
}
@@ -2206,6 +2205,17 @@ void FileDialogHelper_Impl::loadConfig()
catch( IllegalArgumentException ){}
}
+ if( mbHasSelectionBox )
+ {
+ sal_Int32 nFlag = aUserData.GetToken( 2, ' ' ).ToInt32();
+ aValue <<= (sal_Bool) nFlag;
+ try
+ {
+ xDlg->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, aValue );
+ }
+ catch( IllegalArgumentException ){}
+ }
+
if ( !maPath.getLength() )
displayFolder( SvtPathOptions().GetWorkPath() );
}
@@ -2664,10 +2674,12 @@ static int impl_isFolder( const OUString& rPath )
{
}
+ ::rtl::Reference< ::comphelper::StillReadWriteInteraction > aHandler = new ::comphelper::StillReadWriteInteraction( xHandler );
+
try
{
::ucbhelper::Content aContent(
- rPath, new ::ucbhelper::CommandEnvironment( xHandler, uno::Reference< ucb::XProgressHandler >() ) );
+ rPath, new ::ucbhelper::CommandEnvironment( static_cast< task::XInteractionHandler* > ( aHandler.get() ), uno::Reference< ucb::XProgressHandler >() ) );
if ( aContent.isFolder() )
return 1;
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index b023b8fb53a9..6965e14ae84d 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -107,6 +107,8 @@ namespace sfx2
sal_Bool mbPwdCheckBoxState : 1;
sal_Bool mbSelection : 1;
sal_Bool mbSelectionEnabled : 1;
+ sal_Bool mbHasSelectionBox : 1;
+ sal_Bool mbSelectionFltrEnabled : 1;
private:
void addFilters( sal_Int64 nFlags,
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 48c01a1ac3fe..bfd67210ec44 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -30,13 +30,19 @@
#include <com/sun/star/registry/MergeConflictException.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/document/XTypeDetection.hpp>
+#include <com/sun/star/frame/XLoadable.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
#include <comphelper/processfactory.hxx>
#include <tools/config.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/moduleoptions.hxx>
#include <tools/urlobj.hxx>
#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/localfilehelper.hxx>
#include <comphelper/sequenceashashmap.hxx>
+#include <comphelper/configurationhelper.hxx>
#include <sfx2/sfx.hrc>
#include <sfx2/docfilt.hxx>
@@ -49,9 +55,15 @@
#include <sfx2/mnumgr.hxx>
#include "sfxresid.hxx"
#include <sfx2/sfxuno.hxx>
+#include "syspath.hxx"
+#include <osl/file.hxx>
+#include <osl/security.hxx>
#include "doc.hrc"
+#include <assert.h>
+
namespace css = ::com::sun::star;
+using namespace ::com::sun::star;
//========================================================================
@@ -182,13 +194,130 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod )
pImpl->pModule = pMod;
}
+void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const String& rTemplateName )
+{
+ static const int nMaxPathSize = 16000;
+ static ::rtl::OUString SERVICE_FILTER_FACTORY = ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" );
+ static ::rtl::OUString SERVICE_TYPE_DECTECTION = ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" );
+ static ::rtl::OUString SERVICE_SIMPLE_ACCESS = ::rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" );
+
+ static ::rtl::OUString CONF_ROOT = ::rtl::OUString::createFromAscii( "/org.openoffice.Setup");
+ static ::rtl::OUString CONF_PATH = ::rtl::OUString::createFromAscii( "Office/Factories/" ) + ::rtl::OUString( rServiceName );
+ static ::rtl::OUString PROP_DEF_TEMPL_CHANGED = ::rtl::OUString::createFromAscii( "ooSetupFactorySystemDefaultTemplateChanged" );
+ static ::rtl::OUString PROP_ACTUAL_FILTER = ::rtl::OUString::createFromAscii( "ooSetupFactoryActualFilter" );
+
+ static ::rtl::OUString DEF_TPL_STR = ::rtl::OUString::createFromAscii("/soffice.");
+
+ String sURL;
+ String sPath;
+ sal_Unicode aPathBuffer[nMaxPathSize];
+ if ( SystemPath::GetUserTemplateLocation( aPathBuffer, nMaxPathSize ))
+ sPath = String( aPathBuffer );
+ ::utl::LocalFileHelper::ConvertPhysicalNameToURL( sPath, sURL );
+
+ ::rtl::OUString aUserTemplateURL( sURL );
+ if ( aUserTemplateURL.getLength() != 0)
+ {
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ uno::Reference< uno::XInterface > xConfig = ::comphelper::ConfigurationHelper::openConfig(
+ xFactory, CONF_ROOT, ::comphelper::ConfigurationHelper::E_STANDARD );
+
+ ::rtl::OUString aActualFilter;
+ ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_ACTUAL_FILTER ) >>= aActualFilter;
+ sal_Bool bChanged(sal_False);
+ ::comphelper::ConfigurationHelper::readRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED ) >>= bChanged;
+
+ uno::Reference< container::XNameAccess > xFilterFactory(
+ xFactory->createInstance( SERVICE_FILTER_FACTORY ), uno::UNO_QUERY_THROW );
+ uno::Reference< container::XNameAccess > xTypeDetection(
+ xFactory->createInstance( SERVICE_TYPE_DECTECTION ), uno::UNO_QUERY_THROW );
+
+ ::rtl::OUString aActualFilterTypeName;
+ uno::Sequence< beans::PropertyValue > aActuralFilterData;
+ xFilterFactory->getByName( aActualFilter ) >>= aActuralFilterData;
+ for ( sal_Int32 nInd = 0; nInd < aActuralFilterData.getLength(); nInd++ )
+ if ( aActuralFilterData[nInd].Name.equalsAscii( "Type" ) )
+ aActuralFilterData[nInd].Value >>= aActualFilterTypeName;
+ ::comphelper::SequenceAsHashMap aProps1( xTypeDetection->getByName( aActualFilterTypeName ) );
+ uno::Sequence< ::rtl::OUString > aAllExt =
+ aProps1.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Extensions" ), uno::Sequence< ::rtl::OUString >() );
+ //To-do: check if aAllExt is empty first
+ ::rtl::OUString aExt = aAllExt[0];
+
+ aUserTemplateURL += DEF_TPL_STR;
+ aUserTemplateURL += aExt;
+
+ uno::Reference< ucb::XSimpleFileAccess > xSimpleFileAccess(
+ xFactory->createInstance( SERVICE_SIMPLE_ACCESS ), uno::UNO_QUERY_THROW );
+
+ ::rtl::OUString aBackupURL;
+ ::osl::Security().getConfigDir(aBackupURL);
+ aBackupURL += ::rtl::OUString::createFromAscii( "/temp" );
+
+ if ( !xSimpleFileAccess->exists( aBackupURL ) )
+ xSimpleFileAccess->createFolder( aBackupURL );
+
+ aBackupURL += DEF_TPL_STR;
+ aBackupURL += aExt;
+
+ if ( rTemplateName.Len() != 0 )
+ {
+ if ( xSimpleFileAccess->exists( aUserTemplateURL ) && !bChanged )
+ xSimpleFileAccess->copy( aUserTemplateURL, aBackupURL );
+
+ uno::Reference< document::XTypeDetection > xTypeDetector( xTypeDetection, uno::UNO_QUERY );
+ ::comphelper::SequenceAsHashMap aProps2( xTypeDetection->getByName( xTypeDetector->queryTypeByURL( rTemplateName ) ) );
+ ::rtl::OUString aFilterName =
+ aProps2.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii("PreferredFilter"), ::rtl::OUString() );
+
+ uno::Sequence< beans::PropertyValue > aArgs( 3 );
+ aArgs[0].Name = ::rtl::OUString::createFromAscii( "FilterName" );
+ aArgs[0].Value <<= aFilterName;
+ aArgs[1].Name = ::rtl::OUString::createFromAscii( "AsTemplate" );
+ aArgs[1].Value <<= sal_True;
+ aArgs[2].Name = ::rtl::OUString::createFromAscii( "URL" );
+ aArgs[2].Value <<= ::rtl::OUString( rTemplateName );
+
+ uno::Reference< frame::XLoadable > xLoadable( xFactory->createInstance( ::rtl::OUString( rServiceName ) ), uno::UNO_QUERY );
+ xLoadable->load( aArgs );
+
+ aArgs.realloc( 2 );
+ aArgs[1].Name = ::rtl::OUString::createFromAscii( "Overwrite" );
+ aArgs[1].Value <<= sal_True;
+
+ uno::Reference< frame::XStorable > xStorable( xLoadable, uno::UNO_QUERY );
+ xStorable->storeToURL( aUserTemplateURL, aArgs );
+ ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED, uno::makeAny( sal_True ));
+ ::comphelper::ConfigurationHelper::flush( xConfig );
+ }
+ else
+ {
+ DBG_ASSERT( bChanged, "invalid ooSetupFactorySystemDefaultTemplateChanged value!" );
+
+ xSimpleFileAccess->copy( aBackupURL, aUserTemplateURL );
+ xSimpleFileAccess->kill( aBackupURL );
+ ::comphelper::ConfigurationHelper::writeRelativeKey( xConfig, CONF_PATH, PROP_DEF_TEMPL_CHANGED, uno::makeAny( sal_False ));
+ ::comphelper::ConfigurationHelper::flush( xConfig );
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+}
+
void SfxObjectFactory::SetStandardTemplate( const String& rServiceName, const String& rTemplate )
{
SvtModuleOptions::EFactory eFac = SvtModuleOptions::ClassifyFactoryByServiceName(rServiceName);
if (eFac == SvtModuleOptions::E_UNKNOWN_FACTORY)
eFac = SvtModuleOptions::ClassifyFactoryByShortName(rServiceName);
if (eFac != SvtModuleOptions::E_UNKNOWN_FACTORY)
+ {
+ SetSystemTemplate( rServiceName, rTemplate );
SvtModuleOptions().SetFactoryStandardTemplate(eFac, rTemplate);
+ }
}
String SfxObjectFactory::GetStandardTemplate( const String& rServiceName )
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
index b766921e346b..b1bddf82e428 100644
--- a/sfx2/source/doc/makefile.mk
+++ b/sfx2/source/doc/makefile.mk
@@ -83,7 +83,9 @@ SLOFILES = \
$(SLO)$/sfxmodelfactory.obj \
$(SLO)$/sfxacldetect.obj \
$(SLO)$/docstoragemodifylistener.obj \
- $(SLO)$/querytemplate.obj
+ $(SLO)$/querytemplate.obj \
+ $(SLO)$/syspath.obj \
+ $(SLO)$/syspathw32.obj
# $(SLO)$/applet.obj \
@@ -91,7 +93,8 @@ SLOFILES = \
#HACK TO DISABLE PCH
NOOPTFILES= \
- $(SLO)$/sfxacldetect.obj
+ $(SLO)$/sfxacldetect.obj \
+ $(SLO)$/syspathw32.obj
.ENDIF
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
new file mode 100755
index 000000000000..a1025370ed24
--- /dev/null
+++ b/sfx2/source/doc/syspath.cxx
@@ -0,0 +1,48 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+// Comment out precompiled statement due to redefinition errors
+#include "precompiled_sfx2.hxx"
+
+#include "syspath.hxx"
+
+extern "C" bool GetUserTemplateLocation(sal_Unicode*, int nSize);
+
+bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize )
+{
+#ifdef WNT
+ return ::GetUserTemplateLocation( pFolder, nSize );
+#else
+ (void)pFolder;
+ (void)nSize;
+ return false;
+#endif
+}
diff --git a/sfx2/source/doc/syspath.hxx b/sfx2/source/doc/syspath.hxx
new file mode 100644
index 000000000000..015c16f18d26
--- /dev/null
+++ b/sfx2/source/doc/syspath.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifndef __SYSPATH_HXX__
+#define __SYSPATH_HXX__
+//#pragma warning(disable:4917)
+
+#include <sfx2/dllapi.h>
+
+class SFX2_DLLPUBLIC SystemPath
+{
+public:
+ static bool GetUserTemplateLocation(sal_Unicode*, int nSize);
+};
+
+#endif
+
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
new file mode 100644
index 000000000000..73bd84f5249a
--- /dev/null
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2008 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* $RCSfile: shutdowniconw32.cxx,v $
+* $Revision: 1.48 $
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+************************************************************************/
+
+#ifdef WNT
+#ifdef _MSC_VER
+#pragma warning(disable:4917)
+#endif
+#include <shlobj.h>
+
+static bool _SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize )
+{
+ LPITEMIDLIST pidl;
+ HRESULT hHdl = SHGetSpecialFolderLocation( NULL, nFolderID, &pidl );
+
+ if( hHdl == NOERROR )
+ {
+ WCHAR *lpFolder = static_cast< WCHAR* >( HeapAlloc( GetProcessHeap(), 0, 16000 ));
+
+ SHGetPathFromIDListW( pidl, lpFolder );
+ wcsncpy( pszFolder, lpFolder, nSize );
+
+ HeapFree( GetProcessHeap(), 0, lpFolder );
+ IMalloc *pMalloc;
+ if( NOERROR == SHGetMalloc(&pMalloc) )
+ {
+ pMalloc->Free( pidl );
+ pMalloc->Release();
+ }
+ }
+ return true;
+}
+
+#endif
+
+// Copied from sal/types.h to circumvent problems with precompiled headers
+// and redefinitions of BOOL, INT32 and other types. Unfortunately tools
+// also define these type incompatible with Win32 types which leads from
+// time to time to very nasty compilation errors. If someone finds a better
+// way to solve these probs please remove this copied part!
+typedef unsigned short sal_uInt16;
+#if ( defined(WIN32) && !defined(__MINGW32__) )
+ typedef wchar_t sal_Unicode;
+#else
+ typedef sal_uInt16 sal_Unicode;
+#endif
+
+extern "C" bool GetUserTemplateLocation(sal_Unicode* pFolder, int nSize)
+{
+#ifdef WNT
+ return _SHGetSpecialFolderW32( CSIDL_TEMPLATES, pFolder, nSize );
+#else
+ (void)pFolder;
+ (void)nSize;
+ return false;
+#endif
+}
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 4d9016d81f6b..f62ae4c1ddc7 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -129,28 +129,6 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete,
StartListening( *mpViewShell );
mpObjectShell = mpViewShell->GetObjectShell();
StartListening( *mpObjectShell );
- m_bOrigStatus = mpObjectShell->IsEnableSetModified();
-
- // check configuration: shall update of printing information in DocInfo set the document to "modified"?
- if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
- {
- mpObjectShell->EnableSetModified( sal_False );
- m_bNeedsChange = sal_True;
- }
-
- // refresh document info
- uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
- m_aLastPrintedBy = xDocProps->getPrintedBy();
- m_aLastPrinted = xDocProps->getPrintDate();
-
- xDocProps->setPrintedBy( mpObjectShell->IsUseUserData()
- ? ::rtl::OUString( SvtUserOptions().GetFullName() )
- : ::rtl::OUString() );
- ::DateTime now;
-
- xDocProps->setPrintDate( util::DateTime(
- now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
- now.GetDay(), now.GetMonth(), now.GetYear() ) );
}
// initialize extra ui options
@@ -283,6 +261,29 @@ void SfxPrinterController::jobStarted()
{
if ( mpObjectShell )
{
+ m_bOrigStatus = mpObjectShell->IsEnableSetModified();
+
+ // check configuration: shall update of printing information in DocInfo set the document to "modified"?
+ if ( m_bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() )
+ {
+ mpObjectShell->EnableSetModified( sal_False );
+ m_bNeedsChange = sal_True;
+ }
+
+ // refresh document info
+ uno::Reference<document::XDocumentProperties> xDocProps(mpObjectShell->getDocProperties());
+ m_aLastPrintedBy = xDocProps->getPrintedBy();
+ m_aLastPrinted = xDocProps->getPrintDate();
+
+ xDocProps->setPrintedBy( mpObjectShell->IsUseUserData()
+ ? ::rtl::OUString( SvtUserOptions().GetFullName() )
+ : ::rtl::OUString() );
+ ::DateTime now;
+
+ xDocProps->setPrintDate( util::DateTime(
+ now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(),
+ now.GetDay(), now.GetMonth(), now.GetYear() ) );
+
// FIXME: how to get all print options incl. AdditionalOptions easily?
uno::Sequence < beans::PropertyValue > aOpts;
mpObjectShell->Broadcast( SfxPrintingHint( view::PrintableState_JOB_STARTED, aOpts ) );
diff --git a/sfx2/workben/custompanel/CalcWindowState.xcu b/sfx2/workben/custompanel/CalcWindowState.xcu
index 2f224f32aa77..17629c0bf698 100644
--- a/sfx2/workben/custompanel/CalcWindowState.xcu
+++ b/sfx2/workben/custompanel/CalcWindowState.xcu
@@ -4,7 +4,7 @@
<node oor:name="States">
<node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/0000FF" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Soylent Blue</value>
+ <value>Soylent Blue</value>
</prop>
<prop oor:name="Visible" oor:type="xs:boolean">
<value>false</value>
diff --git a/sfx2/workben/custompanel/DrawWindowState.xcu b/sfx2/workben/custompanel/DrawWindowState.xcu
index 3c0992bc4871..6037a3f5a083 100644
--- a/sfx2/workben/custompanel/DrawWindowState.xcu
+++ b/sfx2/workben/custompanel/DrawWindowState.xcu
@@ -4,7 +4,7 @@
<node oor:name="States">
<node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FFFF00" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Soylent Yellow</value>
+ <value>Soylent Yellow</value>
</prop>
<prop oor:name="Visible" oor:type="xs:boolean">
<value>false</value>
diff --git a/sfx2/workben/custompanel/ImpressWindowState.xcu b/sfx2/workben/custompanel/ImpressWindowState.xcu
index 0fc1bb9d40c8..a8fea859bbab 100644
--- a/sfx2/workben/custompanel/ImpressWindowState.xcu
+++ b/sfx2/workben/custompanel/ImpressWindowState.xcu
@@ -4,7 +4,7 @@
<node oor:name="States">
<node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FFCC99" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Soylent Orange</value>
+ <value>Soylent Orange</value>
</prop>
<prop oor:name="Visible" oor:type="xs:boolean">
<value>false</value>
diff --git a/sfx2/workben/custompanel/WriterWindowState.xcu b/sfx2/workben/custompanel/WriterWindowState.xcu
index f1edd4a12881..248a2e14a3f4 100644
--- a/sfx2/workben/custompanel/WriterWindowState.xcu
+++ b/sfx2/workben/custompanel/WriterWindowState.xcu
@@ -4,7 +4,7 @@
<node oor:name="States">
<node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/00FF00" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Soylent Green</value>
+ <value>Soylent Green</value>
</prop>
<prop oor:name="Visible" oor:type="xs:boolean">
<value>false</value>
@@ -18,7 +18,7 @@
</node>
<node oor:name="private:resource/toolpanel/org.openoffice.example.colorpanel/FF0000" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Soylent Red</value>
+ <value>Soylent Red</value>
</prop>
<prop oor:name="Visible" oor:type="xs:boolean">
<value>false</value>
diff --git a/sfx2/workben/custompanel/description.xml b/sfx2/workben/custompanel/description.xml
index 7b85d64eaf69..a90aa73a77f6 100644
--- a/sfx2/workben/custompanel/description.xml
+++ b/sfx2/workben/custompanel/description.xml
@@ -8,7 +8,7 @@
<version value="0.1" />
<platform value="UPDATED_SUPPORTED_PLATFORM" />
<display-name>
- <name lang="en-US">Custom Tool Panel Example</name>
+ <name>Custom Tool Panel Example</name>
</display-name>
<dependencies>
<OpenOffice.org-minimal-version value="3.3" d:name="OpenOffice.org 3.3"/>
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index d2af8c0daaed..d736c3f52d64 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1545,7 +1545,9 @@ void SlideShowImpl::registerUserPaintPolygons( const uno::Reference< lang::XMult
for( sal_uInt32 n = 0; n < nPoints; n++ )
{
//Create a point from the polygon
- *pInnerSequence++ = awt::Point( aPoly.getB2DPoint(n).getX(), aPoly.getB2DPoint(n).getY());
+ *pInnerSequence++ = awt::Point(
+ basegfx::fround(aPoly.getB2DPoint(n).getX()),
+ basegfx::fround(aPoly.getB2DPoint(n).getY()));
}
//Fill the properties
diff --git a/solenv/bin/deliver.pl b/solenv/bin/deliver.pl
index b0cb51e3b076..ab91ae34c01f 100755
--- a/solenv/bin/deliver.pl
+++ b/solenv/bin/deliver.pl
@@ -73,6 +73,7 @@ $is_debug = 0;
$error = 0;
$module = 0; # module name
+$repository = 0; # parent directory of this module
$base_dir = 0; # path to module base directory
$dlst_file = 0; # path to d.lst
$ilst_ext = 'ilst'; # extension of image lists
@@ -446,7 +447,7 @@ sub parse_options
sub init_globals
{
my $ext;
- ($module, $base_dir, $dlst_file) = get_base();
+ ($module, $repository, $base_dir, $dlst_file) = get_base();
# for CWS:
$module =~ s/\.lnk$//;
@@ -543,7 +544,7 @@ sub get_base
{
# a module base dir contains a subdir 'prj'
# which in turn contains a file 'd.lst'
- my (@field, $base, $dlst);
+ my (@field, $repo, $base, $dlst);
my $path = getcwd();
@field = split(/\//, $path);
@@ -560,7 +561,12 @@ sub get_base
exit(2);
}
else {
- return ($field[-1], $base, $dlst);
+ if ( defined $field[-2] ) {
+ $repo = $field[-2];
+ } else {
+ print_error("Internal error: cannot determine module's parent directory");
+ }
+ return ($field[-1], $repo, $base, $dlst);
}
}
@@ -1152,8 +1158,8 @@ sub push_on_loglist
if (( $entry[0] eq "COPY" ) || ( $entry[0] eq "ADDINCPATH" )) {
return 0 if ( ! -e $entry[1].$maybedot );
# make 'from' relative to source root
- $entry[1] = $module . "/prj/" . $entry[1];
- $entry[1] =~ s/^$module\/prj\/\.\./$module/;
+ $entry[1] = $repository ."/" . $module . "/prj/" . $entry[1];
+ $entry[1] =~ s/$module\/prj\/\.\./$module/;
}
# platform or common tree?
my $common;
diff --git a/solenv/bin/gsicheck b/solenv/bin/gsicheck
new file mode 100755
index 000000000000..9b898c9d5950
--- /dev/null
+++ b/solenv/bin/gsicheck
@@ -0,0 +1,18 @@
+#!/bin/sh
+if [ x${SOLARENV}x = xx ]; then
+ echo No environment found, please use 'setsolar'
+exit 1
+fi
+
+if [ "${OS?}" = MACOSX ]; then
+ export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
+else
+ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${SOLARVERSION?}/${INPATH?}/lib${UPDMINOREXT}
+fi
+
+if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
+ exec $SOLARVERSION/$INPATH/bin/gsicheck "$@"
+else
+ exec $SOLARVERSION/$INPATH/bin$UPDMINOREXT/gsicheck "$@"
+fi
+
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index 197f985bbf83..127f28cd7631 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -257,6 +257,10 @@ if ( $installer::globals::globallogging ) { installer::files::save_hash($logging
installer::ziplist::add_variables_to_allvariableshashref($allvariableshashref);
if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3b.log", $allvariableshashref); }
+installer::ziplist::overwrite_ooovendor( $allvariableshashref );
+if ( $installer::globals::globallogging ) { installer::files::save_hash($loggingdir . "allvariables3c.log", $allvariableshashref); }
+
+
########################################################
# Check if this is simple packaging mechanism
########################################################
@@ -1982,7 +1986,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles17c.log", $filesinproductlanguageresolvedarrayref); }
if ( $installer::globals::updatedatabase ) { installer::windows::file::check_file_sequences($allupdatefileorder, $allupdatecomponentorder); }
- installer::windows::directory::create_directory_table($directoriesforepmarrayref, $newidtdir, $allvariableshashref, $shortdirname);
+ installer::windows::directory::create_directory_table($directoriesforepmarrayref, $newidtdir, $allvariableshashref, $shortdirname, $loggingdir);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles18.log", $filesinproductlanguageresolvedarrayref); }
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt1.log", $directoriesforepmarrayref); }
@@ -2143,10 +2147,6 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
push(@installer::globals::logfileinfo, $infoline);
}
- # include office directory in CustomAction table
-
- installer::windows::idtglobal::add_officedir_to_database($languageidtdir, $allvariableshashref);
-
# include a component into environment table if required
installer::windows::component::set_component_in_environment_table($languageidtdir, $filesinproductlanguageresolvedarrayref);
diff --git a/solenv/bin/mhids.pl b/solenv/bin/mhids.pl
index a1229c398551..f0abf2e5cdca 100644
--- a/solenv/bin/mhids.pl
+++ b/solenv/bin/mhids.pl
@@ -203,8 +203,8 @@ if ( $ret ) {
}
push @cleanuplist, ".c1";
-print "$compiler $solarincludes $defs $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2\n" if $verbose;
-$ret = system "$compiler $solarincludes $defs $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2";
+print "$compiler $defs $solarincludes $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2\n" if $verbose;
+$ret = system "$compiler $defs $solarincludes $preprocess_flag ${shell_workfile}.c1 > ${shell_workfile}.c2";
if ( $ret ) {
push @cleanuplist, ".c2";
cleandie("ERROR - calling compiler for preprocessing failed");
@@ -246,8 +246,8 @@ if ( $outobj_flag ne "" )
{
$outobj_param = "$outobj_flag${shell_workfile}$objext";
}
-print "$compiler $solarincludes $defs ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext \n" if $verbose;
-$ret = system "$compiler $solarincludes $defs ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext";
+print "$compiler $defs $solarincludes ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext \n" if $verbose;
+$ret = system "$compiler $defs $solarincludes ${shell_workfile}.c $outobj_param $outbin_flag${shell_workfile}$appext";
if ( $ret ) {
push @cleanuplist, "$appext";
cleandie("ERROR - compiling $workfile.c failed");
diff --git a/solenv/bin/modules/CreatePDBRelocators.pm b/solenv/bin/modules/CreatePDBRelocators.pm
index c6e4f81a660f..c31e3a053b0c 100644
--- a/solenv/bin/modules/CreatePDBRelocators.pm
+++ b/solenv/bin/modules/CreatePDBRelocators.pm
@@ -186,7 +186,7 @@ sub collect_files
# collect all binary executables on o:
my @bin = $self->find_binary_execs("$template/bin");
my @bin_so = $self->find_binary_execs("$template/bin/so");
- @$filesref = (@lib, @lib_so, @mac_lib, @mac_lib_so, @bin, @bin_so);
+ push(@$filesref, (@lib, @lib_so, @mac_lib, @mac_lib_so, @bin, @bin_so));
}
return 1;
}
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 231857195f37..71429e278f4e 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -378,6 +378,10 @@ BEGIN
%spellcheckerfilehash = ();
$registryrootcomponent = "";
+ $installlocationdirectory = "";
+ $installlocationdirectoryset = 0;
+ $vendordirectory = "";
+ $vendordirectoryset = 0;
$officeinstalldirectory = "";
$officeinstalldirectoryset = 0;
$basisinstalldirectory = "";
@@ -396,9 +400,9 @@ BEGIN
$sundirgid = "";
%sign_extensions = ("dll" => "1", "exe" => "1", "cab" => "1");
- %treestyles = ("UREDIRECTORY" => "INSTALLURE", "BASISDIRECTORY" => "INSTALLBASIS", "OFFICEDIRECTORY" => "INSTALLOFFICE");
- %installlocations = ("INSTALLLOCATION" => "1", "BASISINSTALLLOCATION" => "1", "OFFICEINSTALLLOCATION" => "1", "UREINSTALLLOCATION" => "1");
- %treelayername = ("UREDIRECTORY" => "URE", "BASISDIRECTORY" => "BASIS", "OFFICEDIRECTORY" => "BRAND");
+ %treestyles = ();
+ %installlocations = ("INSTALLLOCATION" => "1");
+ %treelayername = ();
%hostnametreestyles = ();
%treeconditions = ();
%usedtreeconditions = ();
diff --git a/solenv/bin/modules/installer/scriptitems.pm b/solenv/bin/modules/installer/scriptitems.pm
index cee8b1e0cfe8..a073e60a6697 100644
--- a/solenv/bin/modules/installer/scriptitems.pm
+++ b/solenv/bin/modules/installer/scriptitems.pm
@@ -241,7 +241,7 @@ sub remove_office_start_language_files
else
{
my $infoline = "INFO: Flag SET_OFFICE_LANGUAGE \-\> Removing $oneitem->{'gid'} from file list.\n";
- push( @installer::globals::globallogfileinfo, $infoline);
+ push( @installer::globals::logfileinfo, $infoline);
}
}
@@ -541,18 +541,6 @@ sub set_global_directory_hostnames
$installer::globals::officedirgid = $onedir->{'gid'};
$allvariables->{'OFFICEDIRECTORYHOSTNAME'} = $installer::globals::officedirhostname;
}
- if ( $styles =~ /\bBASISDIRECTORY\b/ )
- {
- $installer::globals::basisdirhostname = $onedir->{'HostName'};
- $installer::globals::basisdirgid = $onedir->{'gid'};
- $allvariables->{'BASISDIRECTORYHOSTNAME'} = $installer::globals::basisdirhostname;
- }
- if ( $styles =~ /\bUREDIRECTORY\b/ )
- {
- $installer::globals::uredirhostname = $onedir->{'HostName'};
- $installer::globals::uredirgid = $onedir->{'gid'};
- $allvariables->{'UREDIRECTORYHOSTNAME'} = $installer::globals::uredirhostname;
- }
if ( $styles =~ /\bSUNDIRECTORY\b/ )
{
$installer::globals::sundirhostname = $onedir->{'HostName'};
diff --git a/solenv/bin/modules/installer/windows/admin.pm b/solenv/bin/modules/installer/windows/admin.pm
index d22a1299e9c9..3564770e76ba 100644
--- a/solenv/bin/modules/installer/windows/admin.pm
+++ b/solenv/bin/modules/installer/windows/admin.pm
@@ -419,6 +419,12 @@ sub create_directory_structure
foreach $dir (@startparents) { create_directory_tree($dir, \%fullpathhash, $targetdir, $dirhash); }
+ # Also adding the pathes of the startparents
+ foreach $dir (@startparents)
+ {
+ if ( ! exists($fullpathhash{$dir}) ) { $fullpathhash{$dir} = $targetdir; }
+ }
+
return \%fullpathhash;
}
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 125c8607f249..38989858a4b6 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -162,6 +162,11 @@ sub get_file_component_directory
}
$uniquedir = $onedir->{'uniquename'};
+
+ if ( $uniquedir eq $installer::globals::officeinstalldirectory )
+ {
+ $uniquedir = "INSTALLLOCATION";
+ }
}
$onefile->{'uniquedirname'} = $uniquedir; # saving it in the file collection
@@ -176,16 +181,7 @@ sub get_file_component_directory
sub get_registry_component_directory
{
- my $componentdir = "";
-
- if ( $installer::globals::officeinstalldirectoryset )
- {
- $componentdir = $installer::globals::officeinstalldirectory;
- }
- else
- {
- $componentdir = "INSTALLLOCATION";
- }
+ my $componentdir = "INSTALLLOCATION";
return $componentdir;
}
diff --git a/solenv/bin/modules/installer/windows/directory.pm b/solenv/bin/modules/installer/windows/directory.pm
index 2a9463f508a1..ba6f9a3b75bd 100644
--- a/solenv/bin/modules/installer/windows/directory.pm
+++ b/solenv/bin/modules/installer/windows/directory.pm
@@ -110,7 +110,7 @@ sub create_unique_directorynames
}
else
{
- $uniqueparentname = "INSTALLLOCATION";
+ $uniqueparentname = $installer::globals::programfilesfolder;
}
if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::programfilesfolder; }
@@ -130,29 +130,73 @@ sub create_unique_directorynames
$onedir->{'uniquename'} = $uniquename;
$onedir->{'uniqueparentname'} = $uniqueparentname;
- # setting the office installation directory
- if ( $styles =~ /\bOFFICEDIRECTORY\b/ )
+ # setting the installlocation directory
+ if ( $styles =~ /\bISINSTALLLOCATION\b/ )
{
- if ( $installer::globals::officeinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag OFFICEDIRECTORY alread set: \"$installer::globals::officeinstalldirectory\".", "create_unique_directorynames"); }
- $installer::globals::officeinstalldirectory = $uniquename;
- $installer::globals::officeinstalldirectoryset = 1;
- if ( $installer::globals::officeinstalldirectory =~ /sun_/i ) { $installer::globals::sundirexists = 1; }
+ if ( $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION alread set: \"$installer::globals::installlocationdirectory\".", "create_unique_directorynames"); }
+ $installer::globals::installlocationdirectory = $uniquename;
+ $installer::globals::installlocationdirectoryset = 1;
+ if ( $installer::globals::installlocationdirectory =~ /oracle_/i ) { $installer::globals::sundirexists = 1; }
}
- # setting the bais installation directory
- if ( $styles =~ /\bBASISDIRECTORY\b/ )
+ # setting the sundirectory
+ if ( $styles =~ /\bSUNDIRECTORY\b/ )
{
- if ( $installer::globals::basisinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag BASISDIRECTORY alread set: \"$installer::globals::basisinstalldirectory\".", "create_unique_directorynames"); }
- $installer::globals::basisinstalldirectory = $uniquename;
- $installer::globals::basisinstalldirectoryset = 1;
+ if ( $installer::globals::vendordirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag SUNDIRECTORY alread set: \"$installer::globals::vendordirectory\".", "create_unique_directorynames"); }
+ $installer::globals::vendordirectory = $uniquename;
+ $installer::globals::vendordirectoryset = 1;
+ }
+ }
+}
+
+#####################################################
+# Adding ":." to selected default directory names
+#####################################################
+
+sub check_sourcedir_addon
+{
+ my ( $onedir, $allvariableshashref ) = @_;
+
+ if (($installer::globals::addchildprojects) ||
+ ($installer::globals::patch) ||
+ ($installer::globals::languagepack) ||
+ ($allvariableshashref->{'CHANGETARGETDIR'}))
+ {
+ my $sourcediraddon = "\:\.";
+ $onedir->{'defaultdir'} = $onedir->{'defaultdir'} . $sourcediraddon;
+ }
+
+}
+
+#####################################################
+# The directory with the style ISINSTALLLOCATION
+# will be replaced by INSTALLLOCATION
+#####################################################
+
+sub set_installlocation_directory
+{
+ my ( $directoryref, $allvariableshashref ) = @_;
+
+ if ( ! $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION not set!", "set_installlocation_directory"); }
+
+ for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
+ {
+ my $onedir = ${$directoryref}[$i];
+
+ if ( $onedir->{'uniquename'} eq $installer::globals::installlocationdirectory )
+ {
+ $onedir->{'uniquename'} = "INSTALLLOCATION";
+ check_sourcedir_addon($onedir, $allvariableshashref);
}
- # setting the ure installation directory
- if ( $styles =~ /\bUREDIRECTORY\b/ )
+ if ( $onedir->{'uniquename'} eq $installer::globals::vendordirectory )
{
- if ( $installer::globals::ureinstalldirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag UREDIRECTORY alread set: \"$installer::globals::ureinstalldirectory\".", "create_unique_directorynames"); }
- $installer::globals::ureinstalldirectory = $uniquename;
- $installer::globals::ureinstalldirectoryset = 1;
+ check_sourcedir_addon($onedir, $allvariableshashref);
+ }
+
+ if ( $onedir->{'uniqueparentname'} eq $installer::globals::installlocationdirectory )
+ {
+ $onedir->{'uniqueparentname'} = "INSTALLLOCATION";
}
}
}
@@ -266,27 +310,19 @@ sub add_root_directories
{
my ($directorytableref, $allvariableshashref) = @_;
- my $oneline = "TARGETDIR\t\tSourceDir\n";
- push(@{$directorytableref}, $oneline);
+# my $sourcediraddon = "";
+# if (($installer::globals::addchildprojects) ||
+# ($installer::globals::patch) ||
+# ($installer::globals::languagepack) ||
+# ($allvariableshashref->{'CHANGETARGETDIR'}))
+# {
+# $sourcediraddon = "\:\.";
+# }
- my $sourcediraddon = "";
- if (($installer::globals::addchildprojects) ||
- ($installer::globals::patch) ||
- ($installer::globals::languagepack) ||
- ($allvariableshashref->{'CHANGETARGETDIR'}))
- {
- $sourcediraddon = "\:\.";
- }
+ my $oneline = "";
- if (!($installer::globals::product =~ /ada/i )) # the following directories not for ada products
+ if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
{
- $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
-
- # my $manufacturer = $installer::globals::manufacturer;
- # my $shortmanufacturer = installer::windows::idtglobal::make_eight_three_conform($manufacturer, "dir"); # third parameter not used
- # $shortmanufacturer =~ s/\s/\_/g; # changing empty space to underline
-
my $productname = $allvariableshashref->{'PRODUCTNAME'};
my $productversion = $allvariableshashref->{'PRODUCTVERSION'};
my $baseproductversion = $productversion;
@@ -318,84 +354,64 @@ sub add_root_directories
my $shortproductkey = installer::windows::idtglobal::make_eight_three_conform($productkey, "dir"); # third parameter not used
$shortproductkey =~ s/\s/\_/g; # changing empty space to underline
- if ( $allvariableshashref->{'SUNDIR'} )
- {
- if ( $allvariableshashref->{'SUNDIRNAME'} ) { $installer::globals::sundirname = $allvariableshashref->{'SUNDIRNAME'}; }
- $oneline = "sundirectory\t$installer::globals::programfilesfolder\t$installer::globals::sundirname$sourcediraddon\n";
- push(@{$directorytableref}, $oneline);
-
- $oneline = "INSTALLLOCATION\tsundirectory\t$shortproductkey|$productkey$sourcediraddon\n";
- push(@{$directorytableref}, $oneline);
- }
- else
- {
- if ( $allvariableshashref->{'PROGRAMFILESROOT'} )
- {
- $oneline = "INSTALLLOCATION\t$installer::globals::programfilesfolder\t.\n";
- }
- else
- {
- $oneline = "INSTALLLOCATION\t$installer::globals::programfilesfolder\t$shortproductkey|$productkey$sourcediraddon\n";
- }
-
- push(@{$directorytableref}, $oneline);
- }
-
- $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n";
+ $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n";
push(@{$directorytableref}, $oneline);
+ }
- if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
- {
- $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n";
- push(@{$directorytableref}, $oneline);
- }
+ $oneline = "TARGETDIR\t\tSourceDir\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- if ( $installer::globals::usesharepointpath )
- {
- $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
- }
+ $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n";
- push(@{$directorytableref}, $oneline);
+ $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- my $localtemplatefoldername = $installer::globals::templatefoldername;
- my $directorytableentry = $localtemplatefoldername;
- my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir");
- if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; }
- $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n";
+ if ( $installer::globals::usesharepointpath )
+ {
+ $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n";
push(@{$directorytableref}, $oneline);
+ }
- if ( $installer::globals::fontsdirname )
- {
- $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n";
- }
- else
- {
- $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n";
- }
+ $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n";
+ push(@{$directorytableref}, $oneline);
- push(@{$directorytableref}, $oneline);
+ my $localtemplatefoldername = $installer::globals::templatefoldername;
+ my $directorytableentry = $localtemplatefoldername;
+ my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir");
+ if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; }
+ $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n";
+ push(@{$directorytableref}, $oneline);
+
+ if ( $installer::globals::fontsdirname )
+ {
+ $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n";
+ }
+ else
+ {
+ $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n";
}
+ push(@{$directorytableref}, $oneline);
+
}
###############################################
@@ -404,7 +420,7 @@ sub add_root_directories
sub create_directory_table
{
- my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref) = @_;
+ my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_;
# Structure of the directory table:
# Directory Directory_Parent DefaultDir
@@ -419,7 +435,11 @@ sub create_directory_table
overwrite_programfilesfolder($allvariableshashref);
create_unique_directorynames($directoryref);
+ if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); }
create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir!
+ if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); }
+ set_installlocation_directory($directoryref, $allvariableshashref);
+ if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_3.log", $directoryref); }
installer::windows::idtglobal::write_idt_header(\@directorytable, "directory");
add_root_directories(\@directorytable, $allvariableshashref);
create_directorytable_from_collection(\@directorytable, $directoryref);
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index b82f5175250b..64dc2f34a12a 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -1023,44 +1023,6 @@ sub add_officedir_to_database
}
}
- if ( $installer::globals::basisinstalldirectoryset )
- {
- $found = 0;
-
- for ( my $i = 0; $i <= $#{$customacfile}; $i++ )
- {
- if ( ${$customacfile}[$i] =~ /\bBASISDIRECTORYGID\b/ )
- {
- ${$customacfile}[$i] =~ s/\bBASISDIRECTORYGID\b/$installer::globals::basisinstalldirectory/;
- $found = 1;
- }
- }
-
- if (( ! $found ) && ( ! $allvariables->{'IGNOREDIRECTORYLAYER'} ))
- {
- installer::exiter::exit_program("ERROR: \"BASISDIRECTORYGID\" not found in \"$customactionfilename\" !", "add_officedir_to_database");
- }
- }
-
- if ( $installer::globals::ureinstalldirectoryset )
- {
- $found = 0;
-
- for ( my $i = 0; $i <= $#{$customacfile}; $i++ )
- {
- if ( ${$customacfile}[$i] =~ /\bUREDIRECTORYGID\b/ )
- {
- ${$customacfile}[$i] =~ s/\bUREDIRECTORYGID\b/$installer::globals::ureinstalldirectory/;
- $found = 1;
- }
- }
-
- if (( ! $found ) && ( ! $allvariables->{'IGNOREDIRECTORYLAYER'} ))
- {
- installer::exiter::exit_program("ERROR: \"UREDIRECTORYGID\" not found in \"$customactionfilename\" !", "add_officedir_to_database");
- }
- }
-
# Saving the file
installer::files::save_file($customactionfilename ,$customacfile);
@@ -1634,7 +1596,8 @@ sub include_subdirname_into_directory_table
{
my $newuniquename = "sub" . $subdir;
$newdir = $newuniquename;
- my $newparent = $parent;
+ # my $newparent = $parent;
+ my $newparent = "INSTALLLOCATION";
my $newname = $name . "\:" . $subdir;
my $newline =
$line = "$newuniquename\t$newparent\t$newname\n";
diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index 2ef083178122..e9f122a54d86 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -318,18 +318,6 @@ sub set_important_properties
push(@{$propertyfile}, $onepropertyline);
}
- if ( $installer::globals::basisdirhostname )
- {
- my $onepropertyline = "BASISDIRHOSTNAME" . "\t" . $installer::globals::basisdirhostname . "\n";
- push(@{$propertyfile}, $onepropertyline);
- }
-
- if ( $installer::globals::uredirhostname )
- {
- my $onepropertyline = "UREDIRHOSTNAME" . "\t" . $installer::globals::uredirhostname . "\n";
- push(@{$propertyfile}, $onepropertyline);
- }
-
if ( $installer::globals::sundirhostname )
{
my $onepropertyline = "SUNDIRHOSTNAME" . "\t" . $installer::globals::sundirhostname . "\n";
diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm
index f2edd8d0e830..cf87ba174dd0 100644
--- a/solenv/bin/modules/installer/windows/registry.pm
+++ b/solenv/bin/modules/installer/windows/registry.pm
@@ -203,8 +203,9 @@ sub get_registry_value
if ( $registry->{'Value'} ) { $value = $registry->{'Value'}; }
$value =~ s/\\\"/\"/g; # no more masquerading of '"'
- $value =~ s/\<progpath\>/\[OFFICEINSTALLLOCATION\]/;
- $value =~ s/\[OFFICEINSTALLLOCATION\]\\/\[OFFICEINSTALLLOCATION\]/; # removing "\" after "[OFFICEINSTALLLOCATION]"
+ $value =~ s/\\\\\s*$/\\/g; # making "\\" at end of value to "\"
+ $value =~ s/\<progpath\>/\[INSTALLLOCATION\]/;
+ $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]"
if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); }
@@ -224,8 +225,9 @@ sub get_registry_val64
if ( $registry->{'Val64'} ) { $value = $registry->{'Val64'}; }
$value =~ s/\\\"/\"/g; # no more masquerading of '"'
- $value =~ s/\<progpath\>/\[OFFICEINSTALLLOCATION\]/;
- $value =~ s/\[OFFICEINSTALLLOCATION\]\\/\[OFFICEINSTALLLOCATION\]/; # removing "\" after "[OFFICEINSTALLLOCATION]"
+ $value =~ s/\\\\\s*$/\\/g; # making "\\" at end of value to "\"
+ $value =~ s/\<progpath\>/\[INSTALLLOCATION\]/;
+ $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]"
if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); }
diff --git a/solenv/bin/modules/installer/windows/shortcut.pm b/solenv/bin/modules/installer/windows/shortcut.pm
index b15c7418352f..76039baf10c9 100644
--- a/solenv/bin/modules/installer/windows/shortcut.pm
+++ b/solenv/bin/modules/installer/windows/shortcut.pm
@@ -111,7 +111,7 @@ sub get_shortcut_directory
$directory = $onedir->{'uniquename'};
- if ($directory eq "") { $directory = "OFFICEINSTALLLOCATION"; } # Shortcuts in the root directory
+ if ($directory eq "") { $directory = "INSTALLLOCATION"; } # Shortcuts in the root directory
return $directory;
}
@@ -343,7 +343,7 @@ sub get_folderitem_wkdir
$directory = $onedir->{'uniquename'};
- if ($directory eq "") { $directory = "OFFICEINSTALLLOCATION"; }
+ if ($directory eq "") { $directory = "INSTALLLOCATION"; }
}
return $directory;
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index e8a8f922bc41..564a8cb71da7 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -1054,8 +1054,7 @@ sub write_content_into_inf_file
if ( $registryitem->{'Value'} ) { $value = $registryitem->{'Value'}; }
if ( $value =~ /\<progpath\>/ ) { $value =~ s/\\\"/\"\"/g; } # Quoting for INF is done by double ""
$value =~ s/\\\"/\"/g; # no more masquerading of '"'
- $value =~ s/\<progpath\>/\%OFFICEINSTALLLOCATION\%/g;
- # $value =~ s/\%OFFICEINSTALLLOCATION\%\\/\%OFFICEINSTALLLOCATION\%/g; # removing "\" after "%OFFICEINSTALLLOCATION%"
+ $value =~ s/\<progpath\>/\%INSTALLLOCATION\%/g;
if ( $value ne "" ) { $value = "\"" . $value . "\""; }
my $oneline = $regroot . "," . $subkey . "," . $valueentryname . "," . $flag . "," . $value . "\n";
diff --git a/solenv/bin/modules/installer/ziplist.pm b/solenv/bin/modules/installer/ziplist.pm
index 09b7718e2992..ddc98c43bdb7 100644
--- a/solenv/bin/modules/installer/ziplist.pm
+++ b/solenv/bin/modules/installer/ziplist.pm
@@ -762,6 +762,16 @@ sub replace_variables_in_ziplist_variables
}
###########################################################
+# Overwrite the vendor string in openoffice.lst that is defined in configure
+###########################################################
+
+sub overwrite_ooovendor
+{
+ my ($variableshashref) = @_;
+ $variableshashref->{'OOOVENDOR'} = $ENV{'OOO_VENDOR'} , if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" );
+}
+
+###########################################################
# Adding the lowercase variables into the variableshashref
###########################################################
diff --git a/solenv/config/sdev300.ini b/solenv/config/sdev300.ini
index 56fe6c6e4a4d..d04a87c595e2 100644
--- a/solenv/config/sdev300.ini
+++ b/solenv/config/sdev300.ini
@@ -2966,6 +2966,7 @@ wntmsci12
XCLASSPATH .
ZIPDEP %PERL% %SOLARENV%$/bin$/zipdep.pl
BUILD_X64 TRUE
+ CHECK_LUCENCE_INDEXER_OUTPUT TRUE
}
common0
{
diff --git a/solenv/config/ssolar.cmn b/solenv/config/ssolar.cmn
index 54eda38b47f9..937c345e2de8 100644
--- a/solenv/config/ssolar.cmn
+++ b/solenv/config/ssolar.cmn
@@ -47,6 +47,7 @@ common
BUILD_X64
CLASSPATH
CALL_CDECL
+ CHECK_LUCENCE_INDEXER_OUTPUT
COMEX
common_build
COMMON_OUTDIR
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index 4c69817791e8..519831ffb932 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=300
-RSCREVISION=300m82(Build:9510)
-BUILD=9510
-LAST_MINOR=m82
+RSCREVISION=300m83(Build:9511)
+BUILD=9511
+LAST_MINOR=m83
SOURCEVERSION=DEV300
diff --git a/solenv/inc/rules.mk b/solenv/inc/rules.mk
index 457041378f85..63c4d0cef28c 100644
--- a/solenv/inc/rules.mk
+++ b/solenv/inc/rules.mk
@@ -156,7 +156,7 @@ $(SLO)/precompiled_ex.% .PHONY:
$(SLO)/%.obj : %.cxx
@echo $(COMPILE_ECHO_SWITCH) Compiling: $(PRJNAME)/$(PATH_IN_MODULE)/$(COMPILE_ECHO_FILE)
-.IF "$(ENABLE_PCH)"!="" && ( "$(BUILD_SPECIAL)"!="TRUE" )
+.IF "$(ENABLE_PCH)"!=""
# just a helper var
@noop $(assign used_exc_switches=$(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)))
# cleanup first
diff --git a/soltools/prj/build.lst b/soltools/prj/build.lst
index 3c4e50eb0cda..73611addf782 100644
--- a/soltools/prj/build.lst
+++ b/soltools/prj/build.lst
@@ -1,4 +1,4 @@
-so soltools : SUN:so_prereq NULL
+so soltools : solenv SUN:so_prereq NULL
so soltools usr1 - all so_usr1 NULL
so soltools\inc get - all so_inc NULL
so soltools\ldump nmake - all so_ldump so_mkdep NULL
diff --git a/soltools/util/makefile.pmk b/soltools/util/makefile.pmk
index 33c04cf547eb..bf51cf851b4c 100644..100755
--- a/soltools/util/makefile.pmk
+++ b/soltools/util/makefile.pmk
@@ -34,6 +34,10 @@ ADJUSTVISIBILITY=$(AUGMENT_LIBRARY_PATH) $(BIN)$/adjustvisibility
# avoid STLPort
NO_DEFAULT_STL=TRUE
SOLARINC!:=$(subst,/stl$(SPACECHAR),dont_use_stl$(SPACECHAR) $(SOLARINC))
+.IF "$(STLPORT4)" != ""
+SOLARINC!:=$(subst,$(STLPORT4)/include/stlport,dont_use_stl$(SPACECHAR) $(SOLARINC))
+SOLARINC!:=$(subst,$(STLPORT4)/stlport,dont_use_stl$(SPACECHAR) $(SOLARINC))
+.ENDIF
.IF "$(OS)"=="SOLARIS"
# hack due to #i53089#
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index f9fed9c9602a..6ef89ea5ec1b 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -484,15 +484,24 @@ public:
class SmLineNode : public SmStructureNode
{
+ BOOL bUseExtraSpaces;
+
protected:
SmLineNode(SmNodeType eNodeType, const SmToken &rNodeToken)
: SmStructureNode(eNodeType, rNodeToken)
- {}
+ {
+ bUseExtraSpaces = TRUE;
+ }
public:
SmLineNode(const SmToken &rNodeToken)
: SmStructureNode(NLINE, rNodeToken)
- {}
+ {
+ bUseExtraSpaces = TRUE;
+ }
+
+ void SetUseExtraSpaces(BOOL bVal) { bUseExtraSpaces = bVal; }
+ BOOL IsUseExtraSpaces() const { return bUseExtraSpaces; };
virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell);
virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat);
diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx
index b3ad5ef5bdc3..facf17d561e2 100644
--- a/starmath/inc/parse.hxx
+++ b/starmath/inc/parse.hxx
@@ -106,7 +106,7 @@ enum SmTokenType
TLEFTARROW, TRIGHTARROW, TUPARROW, TDOWNARROW, TDIVIDES,
TNDIBVIDES, TSETN, TSETZ, TSETQ, TSETR,
TSETC, TWIDEVEC, TWIDETILDE, TWIDEHAT, TWIDESLASH,
- TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET,
+ TWIDEBACKSLASH, TLDBRACKET, TRDBRACKET, TNOSPACE,
TUNKNOWN, TDEBUG
};
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index 2fbc7b4066d1..d73ea27a0d45 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -379,6 +379,7 @@
#define RID_LSUPX (RID_APP_START + 1916)
#define RID_CSUBX (RID_APP_START + 1917)
#define RID_CSUPX (RID_APP_START + 1918)
+#define RID_NOSPACE (RID_APP_START + 1919)
#define RID_ALEPH (RID_APP_START + 2001)
#define RID_EMPTYSET (RID_APP_START + 2002)
@@ -694,6 +695,7 @@
#define HID_SMA_DOTSDOWN (HID_SMA_START + 240)
#define HID_SMA_DOTSLOW (HID_SMA_START + 241)
#define HID_SMA_DOTSVERT (HID_SMA_START + 242)
+#define HID_SMA_NOSPACE (HID_SMA_START + 243)
#define HID_SMA_SETN (HID_SMA2_START + 1)
#define HID_SMA_SETZ (HID_SMA2_START + 2)
diff --git a/starmath/source/commands.src b/starmath/source/commands.src
index 75c00cb819a6..9d618bbd0cf3 100644
--- a/starmath/source/commands.src
+++ b/starmath/source/commands.src
@@ -223,6 +223,7 @@ String RID_LEFTARROW { Text = "leftarrow " ; };
String RID_RIGHTARROW { Text = "rightarrow " ; };
String RID_UPARROW { Text = "uparrow " ; };
String RID_DOWNARROW { Text = "downarrow " ; };
+String RID_NOSPACE { Text = "nospace {<?>} " ; };
//////////////////////////////////////////
@@ -1327,6 +1328,12 @@ Menu RID_COMMANDMENU
};
MenuItem
{
+ Identifier = RID_NOSPACE;
+ HelpId = HID_SMA_NOSPACE;
+ Text [ en-US ] = "nospace {...}";
+ };
+ MenuItem
+ {
Identifier = RID_BINOMXY;
HelpId = HID_SMA_BINOMXY;
Text = "binom x y";
diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk
index 6b100ee606f2..596060397e18 100644
--- a/starmath/source/makefile.mk
+++ b/starmath/source/makefile.mk
@@ -95,6 +95,7 @@ EXCEPTIONSFILES = \
$(SLO)$/mathmlimport.obj \
$(SLO)$/mathmlexport.obj \
$(SLO)$/mathtype.obj \
+ $(SLO)$/smdll.obj \
$(SLO)$/view.obj \
$(SLO)$/unomodel.obj \
$(SLO)$/smdetect.obj \
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 9999205ad83f..4601b2f84fec 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -831,8 +831,9 @@ void SmLineNode::Arrange(const OutputDevice &rDev, const SmFormat &rFormat)
return;
// make distance depend on font size
- long nDist = +(rFormat.GetDistance(DIS_HORIZONTAL)
- * GetFont().GetSize().Height()) / 100L;
+ long nDist = (rFormat.GetDistance(DIS_HORIZONTAL) * GetFont().GetSize().Height()) / 100L;
+ if (!IsUseExtraSpaces())
+ nDist = 0;
Point aPos;
for (i = 0; i < nSize; i++)
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 9b18f6a427a1..15971d0c38af 100644..100755
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -242,12 +242,13 @@ static const SmTokenTableEntry aTokenTable[] =
{ "ni", TNI, MS_NI, TGRELATION, 0},
{ "nitalic", TNITALIC, '\0', TGFONTATTR, 5},
{ "none", TNONE, '\0', TGLBRACES | TGRBRACES, 0},
+ { "nospace", TNOSPACE, '\0', TGSTANDALONE, 5},
{ "notin", TNOTIN, MS_NOTIN, TGRELATION, 0},
+ { "nroot", TNROOT, MS_SQRT, TGUNOPER, 5},
{ "nsubset", TNSUBSET, MS_NSUBSET, TGRELATION, 0 },
{ "nsupset", TNSUPSET, MS_NSUPSET, TGRELATION, 0 },
{ "nsubseteq", TNSUBSETEQ, MS_NSUBSETEQ, TGRELATION, 0 },
{ "nsupseteq", TNSUPSETEQ, MS_NSUPSETEQ, TGRELATION, 0 },
- { "nroot", TNROOT, MS_SQRT, TGUNOPER, 5},
{ "odivide", TODIVIDE, MS_ODIVIDE, TGPRODUCT, 0},
{ "odot", TODOT, MS_ODOT, TGPRODUCT, 0},
{ "ominus", TOMINUS, MS_OMINUS, TGSUM, 0},
@@ -731,7 +732,7 @@ void SmParser::NextToken()
xub_StrLen nTmpStart = sal::static_int_cast< xub_StrLen >(rnEndPos +
aTmpRes.LeadingWhiteSpace);
- // default setting fo the case that no identifier
+ // default setting for the case that no identifier
// i.e. a valid symbol-name is following the '%'
// character
CurToken.eType = TTEXT;
@@ -1132,6 +1133,16 @@ void SmParser::Line()
void SmParser::Expression()
{
+ BOOL bUseExtraSpaces = TRUE;
+ SmNode *pNode = NodeStack.Pop();
+ if (pNode)
+ {
+ if (pNode->GetToken().eType == TNOSPACE)
+ bUseExtraSpaces = FALSE;
+ else
+ NodeStack.Push(pNode); // push the node from above again (now to be used as argument to this current 'nospace' node)
+ }
+
USHORT n = 0;
SmNodeArray RelationArray;
@@ -1147,8 +1158,9 @@ void SmParser::Expression()
RelationArray[n - 1] = NodeStack.Pop();
}
- SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ SmExpressionNode *pSNode = new SmExpressionNode(CurToken);
pSNode->SetSubNodes(RelationArray);
+ pSNode->SetUseExtraSpaces(bUseExtraSpaces);
NodeStack.Push(pSNode);
}
@@ -1270,7 +1282,7 @@ void SmParser::SubSup(ULONG nActiveGroup)
return;
SmSubSupNode *pNode = new SmSubSupNode(CurToken);
- //! Of course 'CurToken' ist just the first sub-/supscript token.
+ //! Of course 'CurToken' is just the first sub-/supscript token.
//! It should be of no further interest. The positions of the
//! sub-/supscripts will be identified by the corresponding subnodes
//! index in the 'aSubNodes' array (enum value from 'SmSubSup').
@@ -1374,30 +1386,51 @@ void SmParser::Blank()
void SmParser::Term()
{
switch (CurToken.eType)
- { case TESCAPE :
+ {
+ case TESCAPE :
Escape();
break;
+ case TNOSPACE :
case TLGROUP :
- NextToken();
-
- // allow for empty group
- if (CurToken.eType == TRGROUP)
- { SmStructureNode *pSNode = new SmExpressionNode(CurToken);
- pSNode->SetSubNodes(NULL, NULL);
- NodeStack.Push(pSNode);
-
+ {
+ bool bNoSpace = CurToken.eType == TNOSPACE;
+ if (bNoSpace) // push 'no space' node and continue to parse expression
+ {
+ NodeStack.Push(new SmExpressionNode(CurToken));
NextToken();
}
- else // go as usual
- { Align();
- if (CurToken.eType != TRGROUP)
- Error(PE_RGROUP_EXPECTED);
- else
- { NextToken();
+ if (CurToken.eType != TLGROUP)
+ {
+ NodeStack.Pop(); // get rid of the 'no space' node pushed above
+ Term();
+ }
+ else
+ {
+ NextToken();
+
+ // allow for empty group
+ if (CurToken.eType == TRGROUP)
+ {
+ if (bNoSpace) // get rid of the 'no space' node pushed above
+ NodeStack.Pop();
+ SmStructureNode *pSNode = new SmExpressionNode(CurToken);
+ pSNode->SetSubNodes(NULL, NULL);
+ NodeStack.Push(pSNode);
+
+ NextToken();
+ }
+ else // go as usual
+ {
+ Align();
+ if (CurToken.eType != TRGROUP)
+ Error(PE_RGROUP_EXPECTED);
+ else
+ NextToken();
}
}
- break;
+ }
+ break;
case TLEFT :
Brace();
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index ec6d8114759b..7d3525bd2a29 100644..100755
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -1556,7 +1556,7 @@ FloatingWindow RID_TOOLBOXWINDOW
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 0 , 0 ) ;
- Text [ en-US ] = "Formula Elements" ;
+ Text [ en-US ] = "Elements" ;
ToolBox 1
{
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index ae633276300f..813c1fec8ebd 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -480,6 +480,7 @@ SfxNumRanges& SfxNumRanges::operator -=
NUMTYPE nThisSize = Count_Impl(_pRanges);
NUMTYPE nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) );
NUMTYPE *pTarget = new NUMTYPE[ nTargetSize ];
+ memset( pTarget, 0, sizeof(NUMTYPE)*nTargetSize );
memcpy( pTarget, _pRanges, sizeof(NUMTYPE)*nThisSize );
NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0;
@@ -689,6 +690,7 @@ SfxNumRanges& SfxNumRanges::operator /=
NUMTYPE nThisSize = Count_Impl(_pRanges);
NUMTYPE nTargetSize = 1 + ( nThisSize + Count_Impl(rRanges._pRanges) );
NUMTYPE *pTarget = new NUMTYPE[ nTargetSize ];
+ memset( pTarget, 0, sizeof(NUMTYPE)*nTargetSize );
memcpy( pTarget, _pRanges, sizeof(NUMTYPE)*nThisSize );
NUMTYPE nPos1 = 0, nPos2 = 0, nTargetPos = 0;
diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx
index 770e81b00551..49ec77adfea5 100644
--- a/svtools/inc/svtools/filter.hxx
+++ b/svtools/inc/svtools/filter.hxx
@@ -62,6 +62,8 @@ class Graphic;
#define GRFILTER_ABORT 6
#define GRFILTER_TOOBIG 7
+#define GRFILTER_OUTHINT_GREY 1
+
#define GRFILTER_FORMAT_NOTFOUND ((USHORT)0xFFFF)
#define GRFILTER_FORMAT_DONTKNOW ((USHORT)0xFFFF)
@@ -323,7 +325,7 @@ protected:
sal_Bool bDummy2;
sal_Bool bDummy3;
sal_Bool bDummy4;
- long nDummy1;
+ long nExpGraphHint;
long nDummy2;
void* pDummy1;
void* pDummy2;
@@ -374,6 +376,7 @@ public:
USHORT ExportGraphic( const Graphic& rGraphic, const String& rPath,
SvStream& rOStm, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
+ long GetExportGraphicHint() const { return nExpGraphHint; }
USHORT CanImportGraphic( const INetURLObject& rPath,
USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
diff --git a/svtools/inc/svtools/roadmapwizard.hxx b/svtools/inc/svtools/roadmapwizard.hxx
index 49a0f441c49c..5d8e0d9b01bb 100644
--- a/svtools/inc/svtools/roadmapwizard.hxx
+++ b/svtools/inc/svtools/roadmapwizard.hxx
@@ -80,6 +80,11 @@ namespace svt
const ResId& _rRes,
sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP
);
+ RoadmapWizard(
+ Window* _pParent,
+ const WinBits i_nStyle,
+ sal_uInt32 _nButtonFlags = WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP
+ );
~RoadmapWizard( );
void SetRoadmapBitmap( const BitmapEx& _rBitmap );
@@ -137,7 +142,7 @@ protected:
You can only activate paths which share the first <code>k</code> states with the path
which is previously active (if any), where <code>k</code> is the index of the
- current state within the current page.
+ current state within the current path.
<example>
Say you have paths, <code>(0,1,2,5)</code> and <code>(0,1,4,5)</code>. This means that after
@@ -197,6 +202,10 @@ protected:
*/
void enableState( WizardState _nState, bool _bEnable = true );
+ /** returns true if and only if the given state is known in at least one declared path
+ */
+ bool knowsState( WizardState _nState ) const;
+
// OWizardMachine overriables
virtual void enterState( WizardState _nState );
@@ -230,13 +239,15 @@ protected:
private:
SVT_DLLPRIVATE void ResizeFixedLine();
- private:
DECL_DLLPRIVATE_LINK( OnRoadmapItemSelected, void* );
/** updates the roadmap control to show the given path, as far as possible
(modulo conflicts with other paths)
*/
SVT_DLLPRIVATE void implUpdateRoadmap( );
+
+ private:
+ SVT_DLLPRIVATE void impl_construct();
};
//........................................................................
diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx
index f08a1723c143..6eb7f063f9fa 100644
--- a/svtools/inc/svtools/table/tablecontrol.hxx
+++ b/svtools/inc/svtools/table/tablecontrol.hxx
@@ -177,7 +177,7 @@ namespace svt { namespace table
virtual void GetFocus();
virtual void LoseFocus();
virtual void KeyInput( const KeyEvent& rKEvt );
- //virtual long Notify(NotifyEvent& rNEvt);
+ virtual void StateChanged( StateChangedType i_nStateChange );
/** Creates and returns the accessible object of the whole GridControl. */
SVT_DLLPRIVATE virtual XACC CreateAccessible();
@@ -221,6 +221,7 @@ namespace svt { namespace table
::com::sun::star::uno::Sequence< sal_Int32 >& getColumnsForTooltip();
::com::sun::star::uno::Sequence< ::rtl::OUString >& getTextForTooltip();
void setTooltip(const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aText, const ::com::sun::star::uno::Sequence< sal_Int32 >& nCols);
+ void clearSelection();
void selectionChanged(bool _bChanged);
protected:
diff --git a/svtools/inc/svtools/toolboxcontroller.hxx b/svtools/inc/svtools/toolboxcontroller.hxx
index 96e48a399831..7a49b294759c 100644
--- a/svtools/inc/svtools/toolboxcontroller.hxx
+++ b/svtools/inc/svtools/toolboxcontroller.hxx
@@ -42,7 +42,13 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <com/sun/star/util/XURLTransformer.hpp>
-
+//shizhoubo for ToolbarController Visiable
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/property.hxx>
+#include <comphelper/propertycontainer.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+//end
#ifndef INCLUDED_HASH_MAP
#include <hash_map>
#define INCLUDED_HASH_MAP
@@ -59,9 +65,13 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
public ::com::sun::star::lang::XInitialization,
public ::com::sun::star::util::XUpdatable,
public ::com::sun::star::lang::XComponent,
- public ::comphelper::OBaseMutex,
+ public ::comphelper::OMutexAndBroadcastHelper,//shizhoubo
+ public ::comphelper::OPropertyContainer,//shizhoubo
+ public ::comphelper::OPropertyArrayUsageHelper< ToolboxController >,//shizhoubo
public ::cppu::OWeakObject
{
+ private:
+ sal_Bool m_bSupportVisiable; //shizhoubo
public:
ToolboxController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame,
@@ -93,6 +103,7 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
// XEventListener
+ using cppu::OPropertySetHelper::disposing;
virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw ( ::com::sun::star::uno::RuntimeException );
// XStatusListener
@@ -104,6 +115,15 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
virtual void SAL_CALL doubleClick() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createItemWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& Parent ) throw (::com::sun::star::uno::RuntimeException);
+ // OPropertySetHelper //shizhoubo
+ virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const com::sun::star::uno::Any& rValue ) throw(com::sun::star::uno::Exception);
+ virtual sal_Bool SAL_CALL convertFastPropertyValue( com::sun::star::uno::Any& rConvertedValue, com::sun::star::uno::Any& rOldValue, sal_Int32 nHandle, const com::sun::star::uno::Any& rValue) throw(com::sun::star::lang::IllegalArgumentException);
+ // XPropertySet //shizhoubo
+ virtual ::com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ // OPropertyArrayUsageHelper //shizhoubo
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+
const rtl::OUString& getCommandURL() const { return m_aCommandURL; }
const rtl::OUString& getModuleName() const;
@@ -114,7 +134,7 @@ class SVT_DLLPUBLIC ToolboxController : public ::com::sun::star::frame::XStatusL
protected:
bool getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox );
-
+ void setSupportVisiableProperty(sal_Bool bValue); //shizhoubo
struct Listener
{
Listener( const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >& rDispatch ) :
diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx
index f45087f78705..02562ac4bb63 100644
--- a/svtools/inc/svtools/wizardmachine.hxx
+++ b/svtools/inc/svtools/wizardmachine.hxx
@@ -42,6 +42,7 @@ namespace svt
//.........................................................................
// wizard buttons
+#define WZB_NONE 0x0000
#define WZB_NEXT 0x0001
#define WZB_PREVIOUS 0x0002
#define WZB_FINISH 0x0004
@@ -62,12 +63,11 @@ namespace svt
eTravelForward, // traveling forward (maybe with skipping pages)
eTravelBackward, // traveling backward (maybe with skipping pages)
eFinish, // the wizard is about to be finished
- eValidate, // the data should be validated only, no traveling wll happen
- eValidateNoUI // the data should be validated only, without displaying error messages and other UI
+ eValidate // the data should be validated only, no traveling wll happen
};
};
- class SAL_NO_VTABLE IWizardPage : public WizardTypes
+ class SAL_NO_VTABLE IWizardPageController
{
public:
//-----------------------------------------------------------------
@@ -78,7 +78,16 @@ namespace svt
// to be committed for this.
// So initializePage and commitPage are designated to initialitzing/committing data on the page.
virtual void initializePage() = 0;
- virtual sal_Bool commitPage( CommitPageReason _eReason ) = 0;
+ virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason ) = 0;
+
+ /** determines whether or not it is allowed to advance to a next page
+
+ You should make this dependent on the current state of the page only, not on
+ states on other pages of the whole dialog.
+
+ The default implementation always returns <TRUE/>.
+ */
+ virtual bool canAdvance() const = 0;
};
//=====================================================================
@@ -87,7 +96,7 @@ namespace svt
class OWizardMachine;
struct WizardPageImplData;
- class SVT_DLLPUBLIC OWizardPage : public TabPage, public IWizardPage
+ class SVT_DLLPUBLIC OWizardPage : public TabPage, public IWizardPageController
{
private:
WizardPageImplData* m_pImpl;
@@ -101,23 +110,10 @@ namespace svt
OWizardPage( Window* _pParent, const ResId& _rResId );
~OWizardPage();
- // This methods behave somewhat different than ActivatePage/DeactivatePage
- // The latter are handled by the base class itself whenever changing the pages is in the offing,
- // i.e., when it's already decided which page is the next.
- // We may have situations where the next page depends on the state of the current, which needs
- // to be committed for this.
- // So initializePage and commitPage are designated to initialitzing/committing data on the page.
+ // IWizardPageController overridables
virtual void initializePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
-
- /** determines whether or not it is allowed to advance to a next page
-
- You should make this dependent on the current state of the page only, not on
- states on other pages of the whole dialog.
-
- The default implementation always returns <TRUE/>.
- */
- virtual bool canAdvance() const;
+ virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason );
+ virtual bool canAdvance() const;
protected:
// TabPage overridables
@@ -189,6 +185,7 @@ namespace svt
For the button flags, use any combination of the WZB_* flags.
*/
OWizardMachine(Window* _pParent, const ResId& _rRes, sal_uInt32 _nButtonFlags );
+ OWizardMachine(Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags );
~OWizardMachine();
/// enable (or disable) buttons
@@ -263,7 +260,7 @@ namespace svt
/** called when the finish button is pressed
<p>By default, only the base class' Finnish method (which is not virtual) is called</p>
*/
- virtual sal_Bool onFinish(sal_Int32 _nResult);
+ virtual sal_Bool onFinish();
/// travel to the next state
sal_Bool travelNext();
@@ -342,7 +339,8 @@ namespace svt
*/
WizardState getCurrentState() const { return WizardDialog::GetCurLevel(); }
- virtual IWizardPage* getWizardPage(TabPage* _pCurrentPage) const;
+ virtual IWizardPageController*
+ getPageController( TabPage* _pCurrentPage ) const;
/** retrieves a copy of the state history, i.e. all states we already visited
*/
@@ -355,6 +353,9 @@ namespace svt
void resumeTraveling( AccessGuard );
bool isTravelingSuspended() const;
+ protected:
+ TabPage* GetOrCreatePage( const WizardState i_nState );
+
private:
// long OnNextPage( PushButton* );
DECL_DLLPRIVATE_LINK(OnNextPage, PushButton*);
@@ -363,6 +364,7 @@ namespace svt
SVT_DLLPRIVATE void implResetDefault(Window* _pWindow);
SVT_DLLPRIVATE void implUpdateTitle();
+ SVT_DLLPRIVATE void implConstruct( const sal_uInt32 _nButtonFlags );
};
/// helper class to temporarily suspend any traveling in the wizard
diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst
index 2645b9e6bf6a..a7d8569de301 100644
--- a/svtools/prj/build.lst
+++ b/svtools/prj/build.lst
@@ -23,8 +23,9 @@ st svtools\source\svrtf nmake - all st_rtf st_inc NULL
st svtools\source\table nmake - all st_table st_inc NULL
st svtools\source\toolpanel nmake - all st_toolpanel st_inc NULL
st svtools\source\uno nmake - all st_uno st_inc NULL
+st svtools\source\uno\wizard nmake - all st_uno_wiz st_inc NULL
st svtools\source\urlobj nmake - all st__url st_inc NULL
-st svtools\util nmake - all st_util st_svtgraphic st__brw st__ctr st_conf st_ctl st_dial st_edit st__misc st__url st_html st_papp st_rtf st_table st_toolpanel st_uno st_vfilt st_vigif st_vixbm st_vixpm st_vjpeg st_vwmf st_svtjava NULL
+st svtools\util nmake - all st_util st_svtgraphic st__brw st__ctr st_conf st_ctl st_dial st_edit st__misc st__url st_html st_papp st_rtf st_table st_toolpanel st_uno st_uno_wiz st_vfilt st_vigif st_vixbm st_vixpm st_vjpeg st_vwmf st_svtjava NULL
st svtools\source\hatchwindow nmake - all st_hatchwin st_inc NULL
st svtools\source\productregistration nmake - all st_prodreg st_util st_inc NULL
st svtools\workben\unodialog nmake - all st_workben_udlg st_util NULL
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 671b5a9f54e5..7111a29a6a8a 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -3115,7 +3115,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup)
}
}
-void SvImpLBox::Command( const CommandEvent& rCEvt )
+bool SvImpLBox::Command( const CommandEvent& rCEvt )
{
USHORT nCommand = rCEvt.GetCommand();
@@ -3123,9 +3123,22 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
aEditTimer.Stop();
// Rollmaus-Event?
- if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) )
- && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) )
- return;
+ if ( ( ( nCommand == COMMAND_WHEEL )
+ || ( nCommand == COMMAND_STARTAUTOSCROLL )
+ || ( nCommand == COMMAND_AUTOSCROLL )
+ )
+ && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar )
+ )
+ {
+ return true;
+ }
+
+ if ( ( nCommand == COMMAND_CONTEXTMENU )
+ && !bContextMenuHandling
+ )
+ {
+ return false;
+ }
if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU )
{
@@ -3174,8 +3187,6 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
{ // deselect all
pView->SelectAll( FALSE );
}
-
-
}
else
{ // key event (or at least no mouse event)
@@ -3235,15 +3246,18 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
aSelRestore.pop();
}
}
+ return true;
}
-#ifndef NOCOMMAND
- else
- {
- const Point& rPos = rCEvt.GetMousePosPixel();
- if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() )
- aSelEng.Command( rCEvt );
- }
-#endif
+
+ const Point& rPos = rCEvt.GetMousePosPixel();
+ if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() )
+ aSelEng.Command( rCEvt );
+
+ // strictly, this is not correct. However, it leads to a behavior compatible to the one at the time
+ // when this method did have a void return value ...
+ // A proper solution would be to give the EditEngine::Command also a boolean return value, and forward
+ // this (or false) to our caller
+ return true;
}
void SvImpLBox::BeginScroll()
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 2752e813052e..fb71f64772ad 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -1515,9 +1515,10 @@ void SvLBox::MakeVisible( SvLBoxEntry* )
DBG_CHKTHIS(SvLBox,0);
}
-void SvLBox::Command( const CommandEvent& )
+void SvLBox::Command( const CommandEvent& i_rCommandEvent )
{
DBG_CHKTHIS(SvLBox,0);
+ Control::Command( i_rCommandEvent );
}
void SvLBox::KeyInput( const KeyEvent& rKEvt )
@@ -1774,10 +1775,14 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
{
DBG_CHKTHIS(SvLBox,0);
+ nOldDragMode = GetDragDropMode();
+ if ( !nOldDragMode )
+ return;
+
ReleaseMouse();
+
SvLBoxEntry* pEntry = GetEntry( rPosPixel ); // GetDropTarget( rPos );
- nOldDragMode = GetDragDropMode();
- if( !pEntry || !nOldDragMode )
+ if( !pEntry )
{
DragFinished( DND_ACTION_NONE );
return;
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 736f27a1eafb..bf6e41f93f36 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -40,6 +40,7 @@ class TabBar;
#include <svtools/svlbox.hxx>
#include <svtools/svlbitm.hxx>
#include <svtools/svtreebx.hxx>
+#include <tools/diagnose_ex.h>
#include <svimpbox.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
@@ -427,17 +428,6 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa
else
SvLBox::Insert( pEntry, pParent, nPos );
- short nExpWidth = (short)rDefExpBmp.GetSizePixel().Width();
- short nColWidth = (short)rDefColBmp.GetSizePixel().Width();
- short nMax = Max(nExpWidth, nColWidth);
- // #97680# ----------------
- nMax = pImp->UpdateContextBmpWidthVector( pEntry, nMax );
- if( nMax > nContextBmpWidthMax )
- {
- nContextBmpWidthMax = nMax;
- SetTabs();
- }
-
aPrevInsertedExpBmp = rDefExpBmp;
aPrevInsertedColBmp = rDefColBmp;
@@ -468,17 +458,6 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,
else
SvLBox::Insert( pEntry, pParent, nPos );
- short nExpWidth = (short)aExpEntryBmp.GetSizePixel().Width();
- short nColWidth = (short)aCollEntryBmp.GetSizePixel().Width();
- short nMax = Max(nExpWidth, nColWidth);
- // #97680# ----------------
- nMax = pImp->UpdateContextBmpWidthVector( pEntry, nMax );
- if( nMax > nContextBmpWidthMax )
- {
- nContextBmpWidthMax = nMax;
- SetTabs();
- }
-
aPrevInsertedExpBmp = aExpEntryBmp;
aPrevInsertedColBmp = aCollEntryBmp;
@@ -2250,7 +2229,8 @@ Region SvTreeListBox::GetDragRegion() const
void SvTreeListBox::Command( const CommandEvent& rCEvt )
{
DBG_CHKTHIS(SvTreeListBox,0);
- pImp->Command( rCEvt );
+ if ( !pImp->Command( rCEvt ) )
+ SvLBox::Command( rCEvt );
}
@@ -2346,6 +2326,25 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
SvLBox::ModelNotification( nActionId, pEntry1, pEntry2, nPos );
switch( nActionId )
{
+ case LISTACTION_INSERTED:
+ {
+ SvLBoxEntry* pEntry( dynamic_cast< SvLBoxEntry* >( pEntry1 ) );
+ ENSURE_OR_BREAK( pEntry, "SvTreeListBox::ModelNotification: invalid entry!" );
+ SvLBoxContextBmp* pBmpItem = static_cast< SvLBoxContextBmp* >( pEntry->GetFirstItem( SV_ITEM_ID_LBOXCONTEXTBMP ) );
+ if ( !pBmpItem )
+ break;
+ const Image& rBitmap1( pBmpItem->GetBitmap1() );
+ const Image& rBitmap2( pBmpItem->GetBitmap2() );
+ short nMaxWidth = short( Max( rBitmap1.GetSizePixel().Width(), rBitmap2.GetSizePixel().Width() ) );
+ nMaxWidth = pImp->UpdateContextBmpWidthVector( pEntry, nMaxWidth );
+ if( nMaxWidth > nContextBmpWidthMax )
+ {
+ nContextBmpWidthMax = nMaxWidth;
+ SetTabs();
+ }
+ }
+ break;
+
case LISTACTION_RESORTING:
SetUpdateMode( FALSE );
break;
diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx
index 9a03a9b16c2d..c28cfe1d4b18 100644
--- a/svtools/source/dialogs/roadmapwizard.cxx
+++ b/svtools/source/dialogs/roadmapwizard.cxx
@@ -182,7 +182,21 @@ namespace svt
,m_pImpl( new RoadmapWizardImpl )
{
DBG_CTOR( RoadmapWizard, CheckInvariants );
+ impl_construct();
+ }
+
+ //--------------------------------------------------------------------
+ RoadmapWizard::RoadmapWizard( Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags )
+ :OWizardMachine( _pParent, i_nStyle, _nButtonFlags )
+ ,m_pImpl( new RoadmapWizardImpl )
+ {
+ DBG_CTOR( RoadmapWizard, CheckInvariants );
+ impl_construct();
+ }
+ //--------------------------------------------------------------------
+ void RoadmapWizard::impl_construct()
+ {
SetLeftAlignedButtonCount( 1 );
SetEmptyViewMargin();
@@ -328,15 +342,16 @@ namespace svt
if ( (sal_Int32)aNewPathPos->second.size() <= nCurrentStatePathIndex )
return;
-#if OSL_DEBUG_LEVEL > 0
// assert that the current and the new path are equal, up to nCurrentStatePathIndex
Paths::const_iterator aActivePathPos = m_pImpl->aPaths.find( m_pImpl->nActivePath );
if ( aActivePathPos != m_pImpl->aPaths.end() )
{
- DBG_ASSERT( m_pImpl->getFirstDifferentIndex( aActivePathPos->second, aNewPathPos->second ) > nCurrentStatePathIndex,
- "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" );
+ if ( m_pImpl->getFirstDifferentIndex( aActivePathPos->second, aNewPathPos->second ) <= nCurrentStatePathIndex )
+ {
+ OSL_ENSURE( false, "RoadmapWizard::activate: you cannot activate a path which conflicts with the current one *before* the current state!" );
+ return;
+ }
}
-#endif
m_pImpl->nActivePath = _nPathId;
m_pImpl->bActivePathIsDefinite = _bDecideForIt;
@@ -383,8 +398,14 @@ namespace svt
}
// can we advance from the current page?
- const OWizardPage* pCurrentPage = dynamic_cast< const OWizardPage* >( GetPage( getCurrentState() ) );
- const bool bCurrentPageCanAdvance = !pCurrentPage || pCurrentPage->canAdvance();
+ bool bCurrentPageCanAdvance = true;
+ TabPage* pCurrentPage = GetPage( getCurrentState() );
+ if ( pCurrentPage )
+ {
+ const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
+ OSL_ENSURE( pController != NULL, "RoadmapWizard::implUpdateRoadmap: no controller for the current page!" );
+ bCurrentPageCanAdvance = !pController || pController->canAdvance();
+ }
// now, we have to remove all items after nCurrentStatePathIndex, and insert the items from the active
// path, up to (excluding) nUpperStepBoundary
@@ -641,11 +662,33 @@ namespace svt
// if the state is currently in the roadmap, reflect it's new status
m_pImpl->pRoadmap->EnableRoadmapItem( (RoadmapTypes::ItemId)_nState, _bEnable );
}
+
+ //--------------------------------------------------------------------
+ bool RoadmapWizard::knowsState( WizardState i_nState ) const
+ {
+ for ( Paths::const_iterator path = m_pImpl->aPaths.begin();
+ path != m_pImpl->aPaths.end();
+ ++path
+ )
+ {
+ for ( WizardPath::const_iterator state = path->second.begin();
+ state != path->second.end();
+ ++state
+ )
+ {
+ if ( *state == i_nState )
+ return true;
+ }
+ }
+ return false;
+ }
+
//--------------------------------------------------------------------
bool RoadmapWizard::isStateEnabled( WizardState _nState ) const
{
return m_pImpl->aDisabledStates.find( _nState ) == m_pImpl->aDisabledStates.end();
}
+
//--------------------------------------------------------------------
void RoadmapWizard::Resize()
{
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 3aaf279889d8..2053da80019d 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -30,6 +30,7 @@
#include <svtools/wizardmachine.hxx>
#include <svtools/helpid.hrc>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <vcl/msgbox.hxx>
#include <svtools/svtdata.hxx>
#ifndef _SVTOOLS_HRC
@@ -101,7 +102,7 @@ namespace svt
}
//---------------------------------------------------------------------
- sal_Bool OWizardPage::commitPage( CommitPageReason )
+ sal_Bool OWizardPage::commitPage( WizardTypes::CommitPageReason )
{
return sal_True;
}
@@ -161,6 +162,25 @@ namespace svt
,m_pHelp(NULL)
,m_pImpl( new WizardMachineImplData )
{
+ implConstruct( _nButtonFlags );
+ }
+
+ //---------------------------------------------------------------------
+ OWizardMachine::OWizardMachine(Window* _pParent, const WinBits i_nStyle, sal_uInt32 _nButtonFlags )
+ :WizardDialog( _pParent, i_nStyle )
+ ,m_pFinish(NULL)
+ ,m_pCancel(NULL)
+ ,m_pNextPage(NULL)
+ ,m_pPrevPage(NULL)
+ ,m_pHelp(NULL)
+ ,m_pImpl( new WizardMachineImplData )
+ {
+ implConstruct( _nButtonFlags );
+ }
+
+ //---------------------------------------------------------------------
+ void OWizardMachine::implConstruct( const sal_uInt32 _nButtonFlags )
+ {
m_pImpl->sTitleBase = GetText();
// create the buttons according to the wizard button flags
@@ -225,8 +245,6 @@ namespace svt
AddButton( m_pCancel, WIZARDDIALOG_BUTTON_STDOFFSET_X );
}
-
-
}
//---------------------------------------------------------------------
@@ -274,35 +292,42 @@ namespace svt
}
//---------------------------------------------------------------------
- void OWizardMachine::ActivatePage()
+ TabPage* OWizardMachine::GetOrCreatePage( const WizardState i_nState )
{
- WizardDialog::ActivatePage();
-
- WizardState nCurrentLevel = GetCurLevel();
- if (NULL == GetPage(nCurrentLevel))
+ if ( NULL == GetPage( i_nState ) )
{
- TabPage* pNewPage = createPage(nCurrentLevel);
- DBG_ASSERT(pNewPage, "OWizardMachine::ActivatePage: invalid new page (NULL)!");
+ TabPage* pNewPage = createPage( i_nState );
+ DBG_ASSERT( pNewPage, "OWizardMachine::GetOrCreatePage: invalid new page (NULL)!" );
// fill up the page sequence of our base class (with dummies)
- while (m_pImpl->nFirstUnknownPage < nCurrentLevel)
+ while ( m_pImpl->nFirstUnknownPage < i_nState )
{
- AddPage(NULL);
+ AddPage( NULL );
++m_pImpl->nFirstUnknownPage;
}
- if (m_pImpl->nFirstUnknownPage == nCurrentLevel)
+ if ( m_pImpl->nFirstUnknownPage == i_nState )
{
// encountered this page number the first time
- AddPage(pNewPage);
+ AddPage( pNewPage );
++m_pImpl->nFirstUnknownPage;
}
else
// already had this page - just change it
- SetPage(nCurrentLevel, pNewPage);
+ SetPage( i_nState, pNewPage );
}
+ return GetPage( i_nState );
+ }
- enterState(nCurrentLevel);
+ //---------------------------------------------------------------------
+ void OWizardMachine::ActivatePage()
+ {
+ WizardDialog::ActivatePage();
+
+ WizardState nCurrentLevel = GetCurLevel();
+ GetOrCreatePage( nCurrentLevel );
+
+ enterState( nCurrentLevel );
}
//---------------------------------------------------------------------
@@ -330,8 +355,10 @@ namespace svt
if (m_pCancel && (_nWizardButtonFlags & WZB_CANCEL))
pNewDefButton = m_pCancel;
- if (pNewDefButton)
- defaultButton(pNewDefButton);
+ if ( pNewDefButton )
+ defaultButton( pNewDefButton );
+ else
+ implResetDefault( this );
}
//---------------------------------------------------------------------
@@ -395,9 +422,10 @@ namespace svt
void OWizardMachine::enterState(WizardState _nState)
{
// tell the page
- IWizardPage* pCurrentPage = getWizardPage(GetPage(_nState));
- if ( pCurrentPage )
- pCurrentPage->initializePage();
+ IWizardPageController* pController = getPageController( GetPage( _nState ) );
+ OSL_ENSURE( pController, "OWizardMachine::enterState: no controller for the given page!" );
+ if ( pController )
+ pController->initializePage();
if ( isAutomaticNextButtonStateEnabled() )
enableButtons( WZB_NEXT, canAdvance() );
@@ -419,9 +447,9 @@ namespace svt
}
//---------------------------------------------------------------------
- sal_Bool OWizardMachine::onFinish(sal_Int32 _nResult)
+ sal_Bool OWizardMachine::onFinish()
{
- return Finnish(_nResult);
+ return Finnish( RET_OK );
}
//---------------------------------------------------------------------
@@ -434,8 +462,7 @@ namespace svt
{
return 0L;
}
- long nRet = onFinish( RET_OK );
- return nRet;
+ return onFinish() ? 1L : 0L;
}
//---------------------------------------------------------------------
@@ -447,10 +474,9 @@ namespace svt
//---------------------------------------------------------------------
sal_Bool OWizardMachine::prepareLeaveCurrentState( CommitPageReason _eReason )
{
- IWizardPage* pCurrentPage = getWizardPage(GetPage(getCurrentState()));
- if ( pCurrentPage )
- return pCurrentPage->commitPage( _eReason );
- return sal_True;
+ IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
+ ENSURE_OR_RETURN( pController != NULL, "OWizardMachine::prepareLeaveCurrentState: no controller for the current page!", sal_True );
+ return pController->commitPage( _eReason );
}
//---------------------------------------------------------------------
@@ -664,10 +690,10 @@ namespace svt
}
//---------------------------------------------------------------------
- IWizardPage* OWizardMachine::getWizardPage(TabPage* _pCurrentPage) const
+ IWizardPageController* OWizardMachine::getPageController( TabPage* _pCurrentPage ) const
{
- OWizardPage* pPage = dynamic_cast< OWizardPage* >( _pCurrentPage );
- return pPage;
+ IWizardPageController* pController = dynamic_cast< IWizardPageController* >( _pCurrentPage );
+ return pController;
}
//---------------------------------------------------------------------
@@ -690,11 +716,12 @@ namespace svt
//---------------------------------------------------------------------
void OWizardMachine::updateTravelUI()
{
- OWizardPage* pPage = dynamic_cast< OWizardPage* >( GetPage( getCurrentState() ) );
+ const IWizardPageController* pController = getPageController( GetPage( getCurrentState() ) );
+ OSL_ENSURE( pController != NULL, "RoadmapWizard::updateTravelUI: no controller for the current page!" );
bool bCanAdvance =
- ( !pPage || pPage->canAdvance() ) // the current page allows to advance
- && canAdvance(); // the dialog as a whole allows to advance
+ ( !pController || pController->canAdvance() ) // the current page allows to advance
+ && canAdvance(); // the dialog as a whole allows to advance
enableButtons( WZB_NEXT, bCanAdvance );
}
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx
index e8121f1d7e94..c8a79d3a35cd 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter.vcl/filter/filter.cxx
@@ -992,7 +992,8 @@ namespace { struct Cache : public rtl::Static<ImpFilterLibCache, Cache> {}; }
// -----------------
GraphicFilter::GraphicFilter( sal_Bool bConfig ) :
- bUseConfig ( bConfig )
+ bUseConfig ( bConfig ),
+ nExpGraphHint ( 0 )
{
ImplInit();
}
@@ -1678,6 +1679,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
USHORT nFormatCount = GetExportFormatCount();
ResetLastError();
+ nExpGraphHint = 0;
if( nFormat == GRFILTER_FORMAT_DONTKNOW )
{
@@ -1850,8 +1852,10 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
}
else if( aFilterName.EqualsIgnoreCaseAscii( EXP_JPEG ) )
{
- if( !ExportJPEG( rOStm, aGraphic, pFilterData ) )
+ bool bExportedGrayJPEG = false;
+ if( !ExportJPEG( rOStm, aGraphic, pFilterData, &bExportedGrayJPEG ) )
nStatus = GRFILTER_FORMATERROR;
+ nExpGraphHint = bExportedGrayJPEG ? GRFILTER_OUTHINT_GREY : 0;
if( rOStm.GetError() )
nStatus = GRFILTER_IOERROR;
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx
index 7fd2e09a82dd..a2de92171af3 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.cxx
+++ b/svtools/source/filter.vcl/jpeg/jpeg.cxx
@@ -590,10 +590,11 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
// - JPEGWriter -
// --------------
-JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData ) :
+JPEGWriter::JPEGWriter( SvStream& rStm, const uno::Sequence< beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) :
rOStm ( rStm ),
pAcc ( NULL ),
- pBuffer ( NULL )
+ pBuffer ( NULL ),
+ pExpWasGrey ( pExportWasGrey )
{
FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData );
bGreys = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "ColorMode" ) ), 0 ) != 0;
@@ -704,6 +705,9 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
bGreys = sal_True;
}
+ if( pExpWasGrey )
+ *pExpWasGrey = bGreys;
+
if( pAcc )
{
bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB );
@@ -765,8 +769,11 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32
// - ExportJPEG -
// --------------
-BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData )
+BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
+ bool* pExportWasGrey
+ )
{
- JPEGWriter aJPEGWriter( rOStm, pFilterData );
+ JPEGWriter aJPEGWriter( rOStm, pFilterData, pExportWasGrey );
return aJPEGWriter.Write( rGraphic );
}
diff --git a/svtools/source/inc/jpeg.hxx b/svtools/source/inc/jpeg.hxx
index 906bcd9ea2de..9923190c5e21 100644
--- a/svtools/source/inc/jpeg.hxx
+++ b/svtools/source/inc/jpeg.hxx
@@ -99,13 +99,16 @@ class JPEGWriter
sal_Bool bGreys;
sal_Int32 nQuality;
+ bool* pExpWasGrey;
+
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
public:
void* GetScanline( long nY );
- JPEGWriter( SvStream& rOStm, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData );
+ JPEGWriter( SvStream& rOStm, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
+ bool* pExportWasGrey = NULL );
~JPEGWriter() {};
BOOL Write( const Graphic& rGraphic );
@@ -119,6 +122,10 @@ public:
BOOL ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags );
-BOOL ExportJPEG( SvStream& rStream, const Graphic& rGraphic, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData );
+BOOL ExportJPEG( SvStream& rStream,
+ const Graphic& rGraphic,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
+ bool* pExportWasGrey = NULL
+ );
#endif // _JPEG_HXX
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index cde986b3cb7d..92b9f960b65c 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -340,7 +340,7 @@ public:
const Size& GetOutputSize() const { return aOutputSize;}
void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE );
void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE );
- void Command( const CommandEvent& rCEvt );
+ bool Command( const CommandEvent& rCEvt );
void Invalidate();
void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); }
diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx
index a4f19d9e004a..436c3f721833 100644
--- a/svtools/source/misc/imageresourceaccess.cxx
+++ b/svtools/source/misc/imageresourceaccess.cxx
@@ -48,8 +48,6 @@ namespace svt
{
//........................................................................
-#define GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
-
using namespace ::utl;
using namespace ::comphelper;
using namespace ::com::sun::star::io;
@@ -141,8 +139,14 @@ namespace svt
//--------------------------------------------------------------------
bool GraphicAccess::isSupportedURL( const ::rtl::OUString& _rURL )
{
- ::rtl::OUString sIndicator( RTL_CONSTASCII_USTRINGPARAM( "private:resource/" ) );
- return ( ( _rURL.indexOf( sIndicator ) == 0 ) || ( _rURL.compareToAscii( GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH( GRAPHOBJ_URLPREFIX ) ) == 0 ) );
+ if ( ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:resource/" ) ) == 0 )
+ || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:graphicrepository/" ) ) == 0 )
+ || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:standardimage/" ) ) == 0 )
+ || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.GraphicObject:" ) ) == 0 )
+ || ( _rURL.indexOfAsciiL( RTL_CONSTASCII_STRINGPARAM( "vnd.sun.star.extension://" ) ) == 0 )
+ )
+ return true;
+ return false;
}
//--------------------------------------------------------------------
diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index 0b83cb535ec4..1cb20d27fc12 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -138,7 +138,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
< "Lithuanian" ; LANGUAGE_LITHUANIAN ; > ;
< "Macedonian" ; LANGUAGE_MACEDONIAN ; > ;
< "Malay (Malaysia)" ; LANGUAGE_MALAY_MALAYSIA ; > ;
- < "Malay (Brunei Darusalam)" ; LANGUAGE_MALAY_BRUNEI_DARUSSALAM ; > ;
+ < "Malay (Brunei Darussalam)" ; LANGUAGE_MALAY_BRUNEI_DARUSSALAM ; > ;
< "Malayalam" ; LANGUAGE_MALAYALAM ; > ;
< "Manipuri" ; LANGUAGE_MANIPURI ; > ;
< "Marathi" ; LANGUAGE_MARATHI ; > ;
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 8c95fab6120b..1770bfd7dd02 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -76,6 +76,11 @@ namespace svt { namespace table
aTableData->SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) );
aTableData->SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) );
m_pAccessTable.reset(new ::svt::table::AccessibleTableControl_Impl());
+
+ // by default, use the background as determined by the style settings
+ const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
+ SetBackground( Wallpaper( aWindowColor ) );
+ SetFillColor( aWindowColor );
}
//--------------------------------------------------------------------
@@ -120,6 +125,39 @@ namespace svt { namespace table
}
}
}
+
+
+ //--------------------------------------------------------------------
+ void TableControl::StateChanged( StateChangedType i_nStateChange )
+ {
+ Control::StateChanged( i_nStateChange );
+
+ // forward certain settings to the data window
+ switch ( i_nStateChange )
+ {
+ case STATE_CHANGE_CONTROLBACKGROUND:
+ if ( IsControlBackground() )
+ getDataWindow()->SetControlBackground( GetControlBackground() );
+ else
+ getDataWindow()->SetControlBackground();
+ break;
+
+ case STATE_CHANGE_CONTROLFOREGROUND:
+ if ( IsControlForeground() )
+ getDataWindow()->SetControlForeground( GetControlForeground() );
+ else
+ getDataWindow()->SetControlForeground();
+ break;
+
+ case STATE_CHANGE_CONTROLFONT:
+ if ( IsControlFont() )
+ getDataWindow()->SetControlFont( GetControlFont() );
+ else
+ getDataWindow()->SetControlFont();
+ break;
+ }
+ }
+
//--------------------------------------------------------------------
void TableControl::Resize()
{
@@ -175,6 +213,11 @@ namespace svt { namespace table
return m_pImpl->goTo( _nColPos, _nRowPos );
}
//--------------------------------------------------------------------
+ void TableControl::clearSelection()
+ {
+ m_pImpl->clearSelection();
+ }
+ //--------------------------------------------------------------------
void TableControl::InvalidateDataWindow(RowPos _nRowStart, RowPos _nRowEnd, bool _bRemoved)
{
Rectangle _rRect;
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 1526dbdb778d..3288ab6a4284 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -1647,6 +1647,12 @@ namespace svt { namespace table
{
return m_nRowSelected;
}
+ //--------------------------------------------------------------------
+ void TableControl_Impl::clearSelection()
+ {
+ m_nRowSelected.clear();
+ }
+ //--------------------------------------------------------------------
//-------------------------------------------------------------------------------
void TableControl_Impl::removeSelectedRow(RowPos _nRowPos)
{
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 0a487c77c76c..12b518aa3578 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -204,6 +204,7 @@ namespace svt { namespace table
/** updates the vector, which contains the selected rows after removing the row nRowPos*/
void removeSelectedRow(RowPos _nRowPos);
void invalidateRows();
+ void clearSelection();
// IAbstractTableControl
virtual void hideCursor();
virtual void showCursor();
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index e307071e2699..3245b7e84aac 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -47,6 +47,10 @@ namespace svt { namespace table
,m_rTableControl ( _rTableControl )
,m_nRowAlreadySelected( -1 )
{
+ // by default, use the background as determined by the style settings
+ const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
+ SetBackground( Wallpaper( aWindowColor ) );
+ SetFillColor( aWindowColor );
}
//--------------------------------------------------------------------
@@ -54,6 +58,7 @@ namespace svt { namespace table
{
m_rTableControl.doPaintContent( rUpdateRect );
}
+
//--------------------------------------------------------------------
void TableDataWindow::MouseMove( const MouseEvent& rMEvt )
{
diff --git a/svtools/source/toolpanel/toolpanel.cxx b/svtools/source/toolpanel/toolpanel.cxx
index 35446d1ffe2b..f7b999494563 100644
--- a/svtools/source/toolpanel/toolpanel.cxx
+++ b/svtools/source/toolpanel/toolpanel.cxx
@@ -24,6 +24,8 @@
*
************************************************************************/
+#include "precompiled_svtools.hxx"
+
#include "svtools/toolpanel/toolpanel.hxx"
//........................................................................
diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx
index 433c1e1acbcb..e16a1ecb56dc 100644
--- a/svtools/source/uno/miscservices.cxx
+++ b/svtools/source/uno/miscservices.cxx
@@ -38,10 +38,13 @@
#include <uno/mapping.hxx>
#include "provider.hxx"
#include "renderer.hxx"
+#include "unowizard.hxx"
#include <com/sun/star/registry/XRegistryKey.hpp>
#include "comphelper/servicedecl.hxx"
+#include "cppuhelper/implementationentry.hxx"
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::lang;
@@ -67,6 +70,20 @@ extern sdecl::ServiceDecl const serviceDecl;
Reference< XInterface > SAL_CALL ImplName##_CreateInstance( const Reference< XMultiServiceFactory >& ); \
}
+namespace
+{
+ static struct ::cppu::ImplementationEntry s_aServiceEntries[] =
+ {
+ {
+ ::svt::uno::Wizard::Create,
+ ::svt::uno::Wizard::getImplementationName_static,
+ ::svt::uno::Wizard::getSupportedServiceNames_static,
+ ::cppu::createSingleComponentFactory, NULL, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+ };
+}
+
// -------------------------------------------------------------------------------------
DECLARE_CREATEINSTANCE_NAMESPACE( svt, OAddressBookSourceDialogUno )
@@ -126,9 +143,9 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo (
xNewKey->createKey( aServices.getConstArray()[ i ] );
if ( !component_writeInfoHelper( reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), reinterpret_cast< registry::XRegistryKey* >( _pRegistryKey ), serviceDecl ) )
- return false;
+ return false;
- return sal_True;
+ return ::cppu::component_writeInfoHelper( pServiceManager, _pRegistryKey, s_aServiceEntries );
}
return sal_False;
}
@@ -185,6 +202,8 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory (
else
{
pResult = component_getFactoryHelper( pImplementationName, reinterpret_cast< lang::XMultiServiceFactory * >( _pServiceManager ),reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ), serviceDecl );
+ if ( !pResult )
+ pResult = ::cppu::component_getFactoryHelper( pImplementationName, _pServiceManager, pRegistryKey, s_aServiceEntries );
}
if ( xFactory.is() )
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx
index b411181c2aab..99b36c390f23 100755
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/svtools/source/uno/svtxgridcontrol.cxx
@@ -79,7 +79,6 @@ SVTXGridControl::SVTXGridControl()
//--------------------------------------------------------------------
SVTXGridControl::~SVTXGridControl()
{
- DELETEZ(m_pTableModel);
}
::com::sun::star::uno::Any SVTXGridControl::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException)
@@ -129,6 +128,18 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An
TableControl* pTable = (TableControl*)GetWindow();
switch( GetPropertyId( PropertyName ) )
{
+ case BASEPROPERTY_BACKGROUNDCOLOR:
+ {
+ // let the base class handle this for the TableControl
+ VCLXWindow::setProperty( PropertyName, aValue );
+ // and forward to the grid control's data window
+ if ( pTable->IsBackground() )
+ pTable->getDataWindow()->SetBackground( pTable->GetBackground() );
+ else
+ pTable->getDataWindow()->SetBackground();
+ }
+ break;
+
case BASEPROPERTY_GRID_SELECTIONMODE:
{
SelectionType eSelectionType;
@@ -410,6 +421,7 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
}
void SAL_CALL SVTXGridControl::setVisible( sal_Bool bVisible ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aGuard( GetMutex() );
TableControl* pTable = (TableControl*)GetWindow();
if ( pTable )
{
@@ -425,6 +437,8 @@ void SAL_CALL SVTXGridControl::setFocus() throw(::com::sun::star::uno::RuntimeEx
}
void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aGuard( GetMutex() );
+
std::vector< Any > newRow;
Sequence< Any > rawRowData = Event.rowData;
int colCount = m_xColumnModel->getColumnCount();
@@ -471,6 +485,8 @@ void SAL_CALL SVTXGridControl::rowAdded(const ::com::sun::star::awt::grid::GridD
void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aGuard( GetMutex() );
+
TableControl* pTable = (TableControl*)GetWindow();
if(Event.index == -1)
{
@@ -478,6 +494,7 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri
deselectAllRows();
if(m_pTableModel->hasRowHeaders())
m_pTableModel->getRowHeaderName().clear();
+ pTable->clearSelection();
m_pTableModel->getCellContent().clear();
if(pTable->isAccessibleAlive())
{
@@ -511,6 +528,8 @@ void SAL_CALL SVTXGridControl::rowRemoved(const ::com::sun::star::awt::grid::Gri
void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid::GridColumnEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aGuard( GetMutex() );
+
TableControl* pTable = (TableControl*)GetWindow();
if(Event.valueName == rtl::OUString::createFromAscii("ColumnResize"))
{
@@ -558,6 +577,8 @@ void SAL_CALL SVTXGridControl::columnChanged(const ::com::sun::star::awt::grid:
}
void SAL_CALL SVTXGridControl::dataChanged(const ::com::sun::star::awt::grid::GridDataEvent& Event ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aGuard( GetMutex() );
+
TableControl* pTable = (TableControl*)GetWindow();
if(Event.valueName == rtl::OUString::createFromAscii("RowHeight"))
{
diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx
index bcb8badf72e5..b15507e4614f 100755
--- a/svtools/source/uno/svtxgridcontrol.hxx
+++ b/svtools/source/uno/svtxgridcontrol.hxx
@@ -51,7 +51,7 @@ class SVTXGridControl : public ::cppu::ImplInheritanceHelper3< VCLXWindow, ::com
::com::sun::star::awt::grid::XGridDataListener, ::com::sun::star::awt::grid::XGridColumnListener>
{
private:
- UnoControlTableModel* m_pTableModel;
+ ::boost::shared_ptr< UnoControlTableModel > m_pTableModel;
::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel >m_xDataModel;
::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel >m_xColumnModel;
bool m_bHasColumnHeaders;
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index d9b84aa2e356..92ae93f5080d 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -42,6 +42,12 @@
#include <toolkit/unohlp.hxx>
#endif
#include <vcl/toolbox.hxx>
+//shizhobo
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE = 1;
+const int TOOLBARCONTROLLER_PROPCOUNT = 1;
+const rtl::OUString TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIABLE( RTL_CONSTASCII_USTRINGPARAM( "SupportsVisiable" ));
+//end
using ::rtl::OUString;
@@ -82,10 +88,12 @@ struct ToolboxController_Impl
};
ToolboxController::ToolboxController(
+
const Reference< XMultiServiceFactory >& rServiceManager,
const Reference< XFrame >& xFrame,
const ::rtl::OUString& aCommandURL ) :
- OWeakObject()
+ OPropertyContainer(GetBroadcastHelper())
+ , OWeakObject()
, m_bInitialized( sal_False )
, m_bDisposed( sal_False )
, m_xFrame(xFrame)
@@ -93,6 +101,10 @@ ToolboxController::ToolboxController(
, m_aCommandURL( aCommandURL )
, m_aListenerContainer( m_aMutex )
{
+ //registger Propertyh by shizhoubo
+ registerProperty(TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIABLE, TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE, com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY,
+ &m_bSupportVisiable, getCppuType(&m_bSupportVisiable));
+
m_pImpl = new ToolboxController_Impl;
try
@@ -107,11 +119,16 @@ ToolboxController::ToolboxController(
}
ToolboxController::ToolboxController() :
- OWeakObject()
+ OPropertyContainer(GetBroadcastHelper())
+ , OWeakObject()
, m_bInitialized( sal_False )
, m_bDisposed( sal_False )
, m_aListenerContainer( m_aMutex )
{
+ //registger Propertyh by shizhoubo
+ registerProperty(TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIABLE, TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE, com::sun::star::beans::PropertyAttribute::TRANSIENT | com::sun::star::beans::PropertyAttribute::READONLY,
+ &m_bSupportVisiable, getCppuType(&m_bSupportVisiable));
+
m_pImpl = new ToolboxController_Impl;
}
@@ -167,11 +184,16 @@ throw ( RuntimeException )
static_cast< XInitialization* >( this ),
static_cast< XComponent* >( this ),
static_cast< XUpdatable* >( this ));
-
- if ( a.hasValue() )
- return a;
-
- return OWeakObject::queryInterface( rType );
+ if ( !a.hasValue())
+ {
+ a = ::cppu::queryInterface(rType
+ ,static_cast<XPropertySet*>(this)
+ ,static_cast<XMultiPropertySet*>(this)
+ ,static_cast<XFastPropertySet*>(this));
+ if (!a.hasValue())
+ return OWeakObject::queryInterface( rType );
+ }
+ return a;
}
void SAL_CALL ToolboxController::acquire() throw ()
@@ -202,7 +224,8 @@ throw ( Exception, RuntimeException )
{
vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() );
m_bInitialized = sal_True;
-
+ //shizhoubo add
+ m_bSupportVisiable = sal_False;
PropertyValue aPropValue;
for ( int i = 0; i < aArguments.getLength(); i++ )
{
@@ -747,6 +770,70 @@ void ToolboxController::dispatchCommand( const OUString& sCommandURL, const Sequ
}
}
+//
+//-------------------------------------------------------------------------
+// XPropertySet by shizhoubo
+com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_CALL ToolboxController::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException)
+{
+ Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
+ return xInfo;
+}
+//-------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper& ToolboxController::getInfoHelper()
+{
+ return *const_cast<ToolboxController*>(this)->getArrayHelper();
+}
+//OPropertyArrayUsageHelper by shizhoubo
+//------------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper* ToolboxController::createArrayHelper( ) const
+{
+ com::sun::star::uno::Sequence< Property > aProps;
+ describeProperties(aProps);
+ return new ::cppu::OPropertyArrayHelper(aProps);
+}
+//shizhoubo for supportsvisiable
+void ToolboxController::setSupportVisiableProperty(sal_Bool bValue)
+{
+ m_bSupportVisiable = bValue;
+}
+//OPropertySetHelper by shizhoubo
+sal_Bool SAL_CALL ToolboxController::convertFastPropertyValue( com::sun::star::uno::Any& aConvertedValue ,
+ com::sun::star::uno::Any& aOldValue ,
+ sal_Int32 nHandle ,
+ const com::sun::star::uno::Any& aValue ) throw( com::sun::star::lang::IllegalArgumentException )
+{
+ switch (nHandle)
+ {
+ case TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE:
+ {
+ sal_Bool aNewValue;
+ aValue >>= aNewValue;
+ if (aNewValue != m_bSupportVisiable)
+ {
+ aConvertedValue <<= aNewValue;
+ aOldValue <<= m_bSupportVisiable;
+ return sal_True;
+ }
+ return sal_False;
+ }
+ }
+ return OPropertyContainer::convertFastPropertyValue(aConvertedValue, aOldValue, nHandle, aValue);
+}
+
+void SAL_CALL ToolboxController::setFastPropertyValue_NoBroadcast(
+ sal_Int32 nHandle,
+ const com::sun::star::uno::Any& aValue )
+throw( com::sun::star::uno::Exception)
+{
+ OPropertyContainer::setFastPropertyValue_NoBroadcast(nHandle, aValue);
+ if (TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIABLE == nHandle)
+ {
+ sal_Bool rValue(sal_False);
+ if (( aValue >>= rValue ) && m_bInitialized)
+ this->setSupportVisiableProperty( rValue );
+ }
+}
+
//--------------------------------------------------------------------
IMPL_STATIC_LINK_NOINSTANCE( ToolboxController_Impl, ExecuteHdl_Impl, DispatchInfo*, pDispatchInfo )
@@ -794,5 +881,6 @@ bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox )
return (rItemId != SAL_MAX_UINT16) && (( ppToolBox == 0) || (*ppToolBox != 0) );
}
+//end
} // svt
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index e5a273bbbf6d..7fb1a007960f 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/view/SelectionType.hpp>
#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <com/sun/star/awt/tree/XMutableTreeNode.hpp>
#include <treecontrolpeer.hxx>
@@ -196,9 +197,7 @@ void TreeControlPeer::addEntry( UnoTreeListEntry* pEntry )
mpTreeNodeMap = new TreeNodeMap();
}
- const Reference< XTreeNode > xNormalizedNode( pEntry->mxNode, UNO_QUERY );
- (*mpTreeNodeMap)[ xNormalizedNode ] = pEntry;
- OSL_TRACE( "tree: adding %p => %p", xNormalizedNode.get(), pEntry );
+ (*mpTreeNodeMap)[ pEntry->mxNode ] = pEntry;
}
}
@@ -208,11 +207,9 @@ void TreeControlPeer::removeEntry( UnoTreeListEntry* pEntry )
{
if( mpTreeNodeMap && pEntry && pEntry->mxNode.is() )
{
- const Reference< XTreeNode > xNormalizedNode( pEntry->mxNode, UNO_QUERY );
- TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNormalizedNode ) );
+ TreeNodeMap::iterator aIter( mpTreeNodeMap->find( pEntry->mxNode ) );
if( aIter != mpTreeNodeMap->end() )
{
- OSL_TRACE( "tree: removing %p => %p", xNormalizedNode.get(), pEntry );
mpTreeNodeMap->erase( aIter );
}
}
@@ -224,8 +221,7 @@ UnoTreeListEntry* TreeControlPeer::getEntry( const Reference< XTreeNode >& xNode
{
if( mpTreeNodeMap )
{
- const Reference< XTreeNode > xNormalizedNode( xNode, UNO_QUERY );
- TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNormalizedNode ) );
+ TreeNodeMap::iterator aIter( mpTreeNodeMap->find( xNode ) );
if( aIter != mpTreeNodeMap->end() )
return (*aIter).second;
}
@@ -287,14 +283,14 @@ UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xN
pEntry->AddItem( pUnoItem );
+ mpTreeImpl->insert( pEntry, pParent, nPos );
+
if( msDefaultExpandedGraphicURL.getLength() )
mpTreeImpl->SetExpandedEntryBmp( pEntry, maDefaultExpandedImage );
if( msDefaultCollapsedGraphicURL.getLength() )
mpTreeImpl->SetCollapsedEntryBmp( pEntry, maDefaultCollapsedImage );
- mpTreeImpl->insert( pEntry, pParent, nPos );
-
updateEntry( pEntry );
}
return pEntry;
@@ -922,6 +918,19 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_
// -------------------------------------------------------------------
+awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode >& i_Node ) throw (IllegalArgumentException, RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
+ UnoTreeListEntry* pEntry = getEntry( i_Node, true );
+
+ ::Rectangle aEntryRect( rTree.GetFocusRect( pEntry, rTree.GetEntryPosition( pEntry ).Y() ) );
+ return VCLUnoHelper::ConvertToAWTRect( aEntryRect );
+}
+
+// -------------------------------------------------------------------
+
sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index 015e131321f8..336830804a6f 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -91,6 +91,7 @@ public:
virtual void SAL_CALL removeTreeExpansionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeExpansionListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getClosestNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getNodeRect( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isEditing( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL stopEditing( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL cancelEditing( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/svtools/source/uno/unowizard.hxx b/svtools/source/uno/unowizard.hxx
new file mode 100644
index 000000000000..ceb8fac14eb6
--- /dev/null
+++ b/svtools/source/uno/unowizard.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ * 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 SVT_UNO_WIZARD_HXX
+#define SVT_UNO_WIZARD_HXX
+
+#include "svtools/genericunodialog.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/dialogs/XWizard.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/ui/dialogs/XWizardController.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/implbase1.hxx>
+#include <comphelper/componentcontext.hxx>
+
+//......................................................................................................................
+namespace svt { namespace uno
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= Wizard - declaration
+ //==================================================================================================================
+ typedef ::cppu::ImplInheritanceHelper1 < ::svt::OGenericUnoDialog
+ , ::com::sun::star::ui::dialogs::XWizard
+ > Wizard_Base;
+ class Wizard;
+ typedef ::comphelper::OPropertyArrayUsageHelper< Wizard > Wizard_PBase;
+ class Wizard : public Wizard_Base
+ , public Wizard_PBase
+ {
+ public:
+ Wizard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext );
+
+ // ::com::sun::star::lang::XServiceInfo - static version
+ static ::rtl::OUString SAL_CALL getImplementationName_static() throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw(::com::sun::star::uno::RuntimeException);
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext );
+
+ protected:
+ // ::com::sun::star::lang::XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::beans::XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+
+ // ::com::sun::star::ui::dialogs::XWizard
+ virtual ::rtl::OUString SAL_CALL getHelpURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpURL( const ::rtl::OUString& _helpurl ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getDialogWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL travelNext( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL travelPrevious( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL enablePage( ::sal_Int16 PageID, ::sal_Bool Enable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL updateTravelUI( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL activatePath( ::sal_Int16 PathIndex, ::sal_Bool Final ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::ui::dialogs::XExecutableDialog
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::lang::XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ protected:
+ ~Wizard();
+
+ protected:
+ virtual Dialog* createDialog( Window* _pParent );
+ virtual void destroyDialog();
+
+ private:
+ ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController;
+ ::rtl::OUString m_sHelpURL;
+ };
+
+//......................................................................................................................
+} } // namespace svt::uno
+//......................................................................................................................
+
+#endif // SVT_UNO_WIZARD_HXX
diff --git a/svtools/source/uno/wizard/makefile.mk b/svtools/source/uno/wizard/makefile.mk
new file mode 100644
index 000000000000..521496fc5d48
--- /dev/null
+++ b/svtools/source/uno/wizard/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=../../..
+
+PRJNAME=svtools
+TARGET=unowiz
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/svt.pmk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES= \
+ $(SLO)$/unowizard.obj \
+ $(SLO)$/wizardshell.obj \
+ $(SLO)$/wizardpagecontroller.obj
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
new file mode 100644
index 000000000000..9440c0e69f26
--- /dev/null
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -0,0 +1,452 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svtools.hxx"
+
+#include "../unowizard.hxx"
+#include "wizardshell.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
+#include <com/sun/star/ui/dialogs/XWizardController.hpp>
+#include <com/sun/star/ui/dialogs/WizardButton.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+#include <rtl/strbuf.hxx>
+#include <vos/mutex.hxx>
+#include <vcl/svapp.hxx>
+
+//......................................................................................................................
+namespace svt { namespace uno
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::XServiceInfo;
+ using ::com::sun::star::ui::dialogs::XWizard;
+ using ::com::sun::star::lang::XInitialization;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ using ::com::sun::star::uno::XComponentContext;
+ using ::com::sun::star::beans::Property;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::ucb::AlreadyInitializedException;
+ using ::com::sun::star::ui::dialogs::XWizardController;
+ using ::com::sun::star::ui::dialogs::XWizardPage;
+ using ::com::sun::star::container::NoSuchElementException;
+ using ::com::sun::star::util::InvalidStateException;
+ using ::com::sun::star::awt::XWindow;
+ /** === end UNO using === **/
+ namespace WizardButton = ::com::sun::star::ui::dialogs::WizardButton;
+
+ //------------------------------------------------------------------------------------------------------------------
+ namespace
+ {
+ sal_uInt32 lcl_convertWizardButtonToWZB( const sal_Int16 i_nWizardButton )
+ {
+ switch ( i_nWizardButton )
+ {
+ case WizardButton::NONE: return WZB_NONE;
+ case WizardButton::NEXT: return WZB_NEXT;
+ case WizardButton::PREVIOUS: return WZB_PREVIOUS;
+ case WizardButton::FINISH: return WZB_FINISH;
+ case WizardButton::CANCEL: return WZB_CANCEL;
+ case WizardButton::HELP: return WZB_HELP;
+ }
+ OSL_ENSURE( false, "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" );
+ return WZB_NONE;
+ }
+ }
+
+ //==================================================================================================================
+ //= Wizard - implementation
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ Wizard::Wizard( const Reference< XComponentContext >& _rxContext )
+ :Wizard_Base( _rxContext )
+ ,m_aContext( _rxContext )
+ {
+ }
+
+ //--------------------------------------------------------------------
+ Wizard::~Wizard()
+ {
+ // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor,
+ // so this virtual-method-call the base class does does not work, we're already dead then ...
+ if ( m_pDialog )
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_pDialog )
+ destroyDialog();
+ }
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL Wizard::Create( const Reference< XComponentContext >& _rxContext )
+ {
+ return *(new Wizard( _rxContext ) );
+ }
+
+ //--------------------------------------------------------------------
+ namespace
+ {
+ static void lcl_checkPaths( const Sequence< Sequence< sal_Int16 > >& i_rPaths, const Reference< XInterface >& i_rContext )
+ {
+ // need at least one path
+ if ( i_rPaths.getLength() == 0 )
+ throw IllegalArgumentException( ::rtl::OUString(), i_rContext, 2 );
+
+ // each path must be of length 1, at least
+ for ( sal_Int32 i = 0; i < i_rPaths.getLength(); ++i )
+ {
+ if ( i_rPaths[i].getLength() == 0 )
+ throw IllegalArgumentException( ::rtl::OUString(), i_rContext, 2 );
+
+ // page IDs must be in ascending order
+ sal_Int16 nPreviousPageID = i_rPaths[i][0];
+ for ( sal_Int32 j=1; j<i_rPaths[i].getLength(); ++j )
+ {
+ if ( i_rPaths[i][j] <= nPreviousPageID )
+ {
+ ::rtl::OStringBuffer message;
+ message.append( "Path " );
+ message.append( i );
+ message.append( ": invalid page ID sequence - each page ID must be greater than the previous one." );
+ throw IllegalArgumentException(
+ ::rtl::OStringToOUString( message.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ),
+ i_rContext, 2 );
+ }
+ nPreviousPageID = i_rPaths[i][j];
+ }
+ }
+
+ // if we have one path, that's okay
+ if ( i_rPaths.getLength() == 1 )
+ return;
+
+ // if we have multiple paths, they must start with the same page id
+ const sal_Int16 nFirstPageId = i_rPaths[0][0];
+ for ( sal_Int32 i = 0; i < i_rPaths.getLength(); ++i )
+ {
+ if ( i_rPaths[i][0] != nFirstPageId )
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "All paths must start with the same page id." ) ),
+ i_rContext, 2 );
+ }
+ }
+ }
+
+ //--------------------------------------------------------------------
+ void SAL_CALL Wizard::initialize( const Sequence< Any >& i_Arguments ) throw (Exception, RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( m_bInitialized )
+ throw AlreadyInitializedException( ::rtl::OUString(), *this );
+
+ if ( i_Arguments.getLength() != 2 )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, -1 );
+
+ // the second argument must be a XWizardController, for each constructor
+ m_xController.set( i_Arguments[1], UNO_QUERY );
+ if ( !m_xController.is() )
+ throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
+
+ // the first arg is either a single path (short[]), or multiple paths (short[][])
+ Sequence< sal_Int16 > aSinglePath;
+ i_Arguments[0] >>= aSinglePath;
+ Sequence< Sequence< sal_Int16 > > aMultiplePaths;
+ i_Arguments[0] >>= aMultiplePaths;
+
+ if ( !aMultiplePaths.getLength() )
+ {
+ aMultiplePaths.realloc(1);
+ aMultiplePaths[0] = aSinglePath;
+ }
+ lcl_checkPaths( aMultiplePaths, *this );
+ // if we survived this, the paths are valid, and we're done here ...
+ m_aWizardSteps = aMultiplePaths;
+
+ m_bInitialized = true;
+ }
+
+ //--------------------------------------------------------------------
+ Dialog* Wizard::createDialog( Window* i_pParent )
+ {
+ WizardShell* pDialog( new WizardShell( i_pParent, this, m_xController, m_aWizardSteps ) );
+ pDialog->SetSmartHelpId( SmartId( m_sHelpURL ) );
+ pDialog->setTitleBase( m_sTitle );
+ return pDialog;
+ }
+
+ //--------------------------------------------------------------------
+ void Wizard::destroyDialog()
+ {
+ if ( m_pDialog )
+ m_sHelpURL = m_pDialog->GetSmartHelpId().GetStr();
+
+ Wizard_Base::destroyDialog();
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL Wizard::getImplementationName_static() throw(RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.uno.Wizard" ) );
+ }
+
+ //--------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL Wizard::getSupportedServiceNames_static() throw(RuntimeException)
+ {
+ Sequence< ::rtl::OUString > aServices(1);
+ aServices[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.Wizard" ) );
+ return aServices;
+ }
+
+ //--------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL Wizard::getImplementationName() throw(RuntimeException)
+ {
+ return getImplementationName_static();
+ }
+
+ //--------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL Wizard::getSupportedServiceNames() throw(RuntimeException)
+ {
+ return getSupportedServiceNames_static();
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XPropertySetInfo > SAL_CALL Wizard::getPropertySetInfo() throw(RuntimeException)
+ {
+ return createPropertySetInfo( getInfoHelper() );
+ }
+
+ //--------------------------------------------------------------------
+ ::cppu::IPropertyArrayHelper& SAL_CALL Wizard::getInfoHelper()
+ {
+ return *const_cast< Wizard* >( this )->getArrayHelper();
+ }
+
+ //--------------------------------------------------------------------
+ ::cppu::IPropertyArrayHelper* Wizard::createArrayHelper( ) const
+ {
+ Sequence< Property > aProps;
+ describeProperties( aProps );
+ return new ::cppu::OPropertyArrayHelper( aProps );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL Wizard::getHelpURL() throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if ( !m_pDialog )
+ return m_sHelpURL;
+
+ const SmartId aSmartId( m_pDialog->GetSmartHelpId() );
+ return aSmartId.GetStr();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::setHelpURL( const ::rtl::OUString& i_HelpURL ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if ( !m_pDialog )
+ m_sHelpURL = i_HelpURL;
+ else
+ m_pDialog->SetSmartHelpId( SmartId( i_HelpURL ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XWindow > SAL_CALL Wizard::getDialogWindow() throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ENSURE_OR_RETURN( m_pDialog, "Wizard::getDialogWindow: illegal call (execution did not start, yet)!", NULL );
+ return Reference< XWindow >( m_pDialog->GetComponentInterface(), UNO_QUERY );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::enableButton( ::sal_Int16 i_WizardButton, ::sal_Bool i_Enable ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enableButtons: invalid dialog implementation!" );
+
+ pWizardImpl->enableButtons( lcl_convertWizardButtonToWZB( i_WizardButton ), i_Enable );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::setDefaultButton( ::sal_Int16 i_WizardButton ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::setDefaultButton: invalid dialog implementation!" );
+
+ pWizardImpl->defaultButton( lcl_convertWizardButtonToWZB( i_WizardButton ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL Wizard::travelNext( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelNext: invalid dialog implementation!" );
+
+ return pWizardImpl->travelNext();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL Wizard::travelPrevious( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelPrevious: invalid dialog implementation!" );
+
+ return pWizardImpl->travelPrevious();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::enablePage( ::sal_Int16 i_PageID, ::sal_Bool i_Enable ) throw (NoSuchElementException, InvalidStateException, RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enablePage: invalid dialog implementation!" );
+
+ if ( !pWizardImpl->knowsPage( i_PageID ) )
+ throw NoSuchElementException( ::rtl::OUString(), *this );
+
+ if ( i_PageID == pWizardImpl->getCurrentPage() )
+ throw InvalidStateException( ::rtl::OUString(), *this );
+
+ pWizardImpl->enablePage( i_PageID, i_Enable );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::updateTravelUI( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::updateTravelUI: invalid dialog implementation!" );
+
+ pWizardImpl->updateTravelUI();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL Wizard::advanceTo( ::sal_Int16 i_PageId ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::advanceTo: invalid dialog implementation!" );
+
+ return pWizardImpl->advanceTo( i_PageId );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL Wizard::goBackTo( ::sal_Int16 i_PageId ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::goBackTo: invalid dialog implementation!" );
+
+ return pWizardImpl->goBackTo( i_PageId );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XWizardPage > SAL_CALL Wizard::getCurrentPage( ) throw (RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!" );
+
+ return pWizardImpl->getCurrentWizardPage();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::activatePath( ::sal_Int16 i_PathIndex, ::sal_Bool i_Final ) throw (NoSuchElementException, InvalidStateException, RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ if ( ( i_PathIndex < 0 ) || ( i_PathIndex >= m_aWizardSteps.getLength() ) )
+ throw NoSuchElementException( ::rtl::OUString(), *this );
+
+ WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog );
+ ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::activatePath: invalid dialog implementation!" );
+
+ pWizardImpl->activatePath( i_PathIndex, i_Final );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL Wizard::setTitle( const ::rtl::OUString& i_Title ) throw (RuntimeException)
+ {
+ // simply disambiguate
+ Wizard_Base::OGenericUnoDialog::setTitle( i_Title );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int16 SAL_CALL Wizard::execute( ) throw (RuntimeException)
+ {
+ return Wizard_Base::OGenericUnoDialog::execute();
+ }
+
+//......................................................................................................................
+} } // namespace svt::uno
+//......................................................................................................................
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx
new file mode 100644
index 000000000000..d6f7029b477c
--- /dev/null
+++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx
@@ -0,0 +1,190 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svtools.hxx"
+
+#include "wizardpagecontroller.hxx"
+#include "wizardshell.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/awt/XControl.hpp>
+/** === end UNO includes === **/
+
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/diagnose_ex.h>
+
+//......................................................................................................................
+namespace svt { namespace uno
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::ui::dialogs::XWizardController;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::awt::XControl;
+ /** === end UNO using === **/
+ using namespace ::com::sun::star;
+
+ //==================================================================================================================
+ //= WizardPageController
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ WizardPageController::WizardPageController( WizardShell& i_rParent, const Reference< XWizardController >& i_rController,
+ const sal_Int16 i_nPageId )
+ :m_xController( i_rController )
+ ,m_xWizardPage()
+ ,m_nPageId( i_nPageId )
+ {
+ ENSURE_OR_THROW( m_xController.is(), "no controller" );
+ try
+ {
+ m_xWizardPage.set( m_xController->createPage(
+ Reference< XWindow >( i_rParent.GetComponentInterface( TRUE ), UNO_QUERY_THROW ),
+ m_nPageId
+ ), UNO_SET_THROW );
+
+ Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW );
+ xPageWindow->setVisible( sal_True );
+
+ TabPage* pTabPage( getTabPage() );
+ if ( pTabPage )
+ pTabPage->SetStyle( pTabPage->GetStyle() | WB_CHILDDLGCTRL | WB_DIALOGCONTROL );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ WizardPageController::~WizardPageController()
+ {
+ try
+ {
+ if ( m_xWizardPage.is() )
+ m_xWizardPage->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TabPage* WizardPageController::getTabPage() const
+ {
+ ENSURE_OR_RETURN( m_xWizardPage.is(), "WizardPageController::getTabPage: no external wizard page!", NULL );
+ try
+ {
+ Reference< XWindow > xPageWindow( m_xWizardPage->getWindow(), UNO_SET_THROW );
+ Window* pPageWindow = VCLUnoHelper::GetWindow( xPageWindow );
+ if ( pPageWindow == NULL )
+ {
+ // windows created via the XContainerWindowProvider might be controls, not real windows, so resolve
+ // that one indirection
+ const Reference< XControl > xPageControl( m_xWizardPage->getWindow(), UNO_QUERY_THROW );
+ xPageWindow.set( xPageControl->getPeer(), UNO_QUERY_THROW );
+ pPageWindow = VCLUnoHelper::GetWindow( xPageWindow );
+ }
+
+ OSL_ENSURE( pPageWindow != NULL, "WizardPageController::getTabPage: unable to find the Window implementation for the page's window!" );
+ return dynamic_cast< TabPage* >( pPageWindow );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void WizardPageController::initializePage()
+ {
+ if ( !m_xWizardPage.is() )
+ return;
+
+ try
+ {
+ m_xWizardPage->activatePage();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool WizardPageController::commitPage( WizardTypes::CommitPageReason i_eReason )
+ {
+ if ( !m_xWizardPage.is() )
+ return sal_True;
+
+ try
+ {
+ return m_xWizardPage->commitPage( WizardShell::convertCommitReasonToTravelType( i_eReason ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return sal_True;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool WizardPageController::canAdvance() const
+ {
+ if ( !m_xWizardPage.is() )
+ return true;
+
+ try
+ {
+ return m_xWizardPage->canAdvance();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return true;
+ }
+
+//......................................................................................................................
+} } // namespace svt::uno
+//......................................................................................................................
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.hxx b/svtools/source/uno/wizard/wizardpagecontroller.hxx
new file mode 100644
index 000000000000..9de04d2f0dd4
--- /dev/null
+++ b/svtools/source/uno/wizard/wizardpagecontroller.hxx
@@ -0,0 +1,75 @@
+/*************************************************************************
+ * 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 SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX
+#define SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX
+
+#include "svtools/wizardmachine.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/dialogs/XWizardController.hpp>
+/** === end UNO includes === **/
+
+//......................................................................................................................
+namespace svt { namespace uno
+{
+//......................................................................................................................
+
+ class WizardShell;
+
+ //==================================================================================================================
+ //= WizardPageController
+ //==================================================================================================================
+ class WizardPageController : public IWizardPageController
+ {
+ public:
+ WizardPageController(
+ WizardShell& i_rParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController,
+ const sal_Int16 i_nPageId
+ );
+ ~WizardPageController();
+
+ // IWizardPageController overridables
+ virtual void initializePage();
+ virtual sal_Bool commitPage( WizardTypes::CommitPageReason _eReason );
+ virtual bool canAdvance() const;
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage >&
+ getWizardPage() const { return m_xWizardPage; }
+ TabPage* getTabPage() const;
+
+ private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > m_xWizardPage;
+ const sal_Int16 m_nPageId;
+ };
+
+//......................................................................................................................
+} } // namespace svt::uno
+//......................................................................................................................
+
+#endif // SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX
diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx
new file mode 100644
index 000000000000..7737b214ac1f
--- /dev/null
+++ b/svtools/source/uno/wizard/wizardshell.cxx
@@ -0,0 +1,279 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_svtools.hxx"
+
+#include "wizardshell.hxx"
+#include "wizardpagecontroller.hxx"
+
+#include <tools/diagnose_ex.h>
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/dialogs/WizardTravelType.hpp>
+/** === end UNO includes === **/
+
+#include <vcl/msgbox.hxx>
+
+//......................................................................................................................
+namespace svt { namespace uno
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::ui::dialogs::XWizardController;
+ using ::com::sun::star::ui::dialogs::XWizard;
+ using ::com::sun::star::ui::dialogs::XWizardPage;
+ /** === end UNO using === **/
+ namespace WizardTravelType = ::com::sun::star::ui::dialogs::WizardTravelType;
+
+ //==================================================================================================================
+ namespace
+ {
+ //--------------------------------------------------------------------------------------------------------------
+ sal_Int16 lcl_determineFirstPageID( const Sequence< Sequence< sal_Int16 > >& i_rPaths )
+ {
+ ENSURE_OR_THROW( ( i_rPaths.getLength() > 0 ) && ( i_rPaths[0].getLength() > 0 ), "illegal paths" );
+ return i_rPaths[0][0];
+ }
+ }
+
+ //==================================================================================================================
+ //= WizardShell
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ WizardShell::WizardShell( Window* i_pParent, const Reference< XWizard >& i_rWizard, const Reference< XWizardController >& i_rController,
+ const Sequence< Sequence< sal_Int16 > >& i_rPaths )
+ :WizardShell_Base( i_pParent, WB_MOVEABLE | WB_CLOSEABLE )
+ ,m_xWizard( i_rWizard )
+ ,m_xController( i_rController )
+ ,m_nFirstPageID( lcl_determineFirstPageID( i_rPaths ) )
+ {
+ ENSURE_OR_THROW( m_xWizard.is() && m_xController.is(), "invalid wizard/controller" );
+
+ // declare the paths
+ for ( sal_Int32 i=0; i<i_rPaths.getLength(); ++i )
+ {
+ const Sequence< sal_Int16 >& rPath( i_rPaths[i] );
+ WizardPath aPath( rPath.getLength() );
+ for ( sal_Int32 j=0; j<rPath.getLength(); ++j )
+ aPath[j] = impl_pageIdToState( rPath[j] );
+ declarePath( i, aPath );
+ }
+
+ // create the first page, to know the page size
+ TabPage* pStartPage = GetOrCreatePage( impl_pageIdToState( i_rPaths[0][0] ) );
+ SetPageSizePixel( pStartPage->GetSizePixel() );
+
+ // some defaults
+ ShowButtonFixedLine( true );
+ SetRoadmapInteractive( true );
+ enableAutomaticNextButtonState();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ WizardShell::~WizardShell()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ short WizardShell::Execute()
+ {
+ ActivatePage();
+ return WizardShell_Base::Execute();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Int16 WizardShell::convertCommitReasonToTravelType( const CommitPageReason i_eReason )
+ {
+ switch ( i_eReason )
+ {
+ case WizardTypes::eTravelForward:
+ return WizardTravelType::FORWARD;
+
+ case WizardTypes::eTravelBackward:
+ return WizardTravelType::BACKWARD;
+
+ case WizardTypes::eFinish:
+ return WizardTravelType::FINISH;
+
+ default:
+ break;
+ }
+ OSL_ENSURE( false, "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" );
+ return WizardTravelType::FINISH;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void WizardShell::enterState( WizardState i_nState )
+ {
+ WizardShell_Base::enterState( i_nState );
+
+ if ( !m_xController.is() )
+ return;
+
+ try
+ {
+ m_xController->onActivatePage( impl_stateToPageId( i_nState ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool WizardShell::leaveState( WizardState i_nState )
+ {
+ if ( !WizardShell_Base::leaveState( i_nState ) )
+ return sal_False;
+
+ if ( !m_xController.is() )
+ return sal_True;
+
+ try
+ {
+ m_xController->onDeactivatePage( impl_stateToPageId( i_nState ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return sal_True;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ PWizardPageController WizardShell::impl_getController( TabPage* i_pPage ) const
+ {
+ Page2ControllerMap::const_iterator pos = m_aPageControllers.find( i_pPage );
+ ENSURE_OR_RETURN( pos != m_aPageControllers.end(), "WizardShell::impl_getController: no controller for this page!", PWizardPageController() );
+ return pos->second;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XWizardPage > WizardShell::getCurrentWizardPage() const
+ {
+ const WizardState eState = getCurrentState();
+
+ PWizardPageController pController( impl_getController( GetPage( eState ) ) );
+ ENSURE_OR_RETURN( pController, "WizardShell::getCurrentWizardPage: invalid page/controller!", NULL );
+
+ return pController->getWizardPage();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void WizardShell::enablePage( const sal_Int16 i_nPageID, const sal_Bool i_bEnable )
+ {
+ enableState( impl_pageIdToState( i_nPageID ), i_bEnable );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ TabPage* WizardShell::createPage( WizardState i_nState )
+ {
+ ENSURE_OR_RETURN( m_xController.is(), "WizardShell::createPage: no WizardController!", NULL );
+
+ ::boost::shared_ptr< WizardPageController > pController( new WizardPageController( *this, m_xController, impl_stateToPageId( i_nState ) ) );
+ TabPage* pPage = pController->getTabPage();
+ OSL_ENSURE( pPage != NULL, "WizardShell::createPage: illegal tab page!" );
+ if ( pPage == NULL )
+ {
+ // fallback for ill-behaved clients: empty page
+ pPage = new TabPage( this, 0 );
+ pPage->SetSizePixel( LogicToPixel( Size( 280, 185 ), MAP_APPFONT ) );
+ }
+
+ m_aPageControllers[ pPage ] = pController;
+ return pPage;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ IWizardPageController* WizardShell::getPageController( TabPage* i_pCurrentPage ) const
+ {
+ return impl_getController( i_pCurrentPage ).get();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ String WizardShell::getStateDisplayName( WizardState i_nState ) const
+ {
+ try
+ {
+ if ( m_xController.is() )
+ return m_xController->getPageTitle( impl_stateToPageId( i_nState ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ // fallback for ill-behaved clients: the numeric state
+ return String::CreateFromInt32( i_nState );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ bool WizardShell::canAdvance() const
+ {
+ try
+ {
+ if ( m_xController.is() && !m_xController->canAdvance() )
+ return false;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return WizardShell_Base::canAdvance();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ sal_Bool WizardShell::onFinish()
+ {
+ try
+ {
+ if ( m_xController.is() && !m_xController->confirmFinish() )
+ return sal_False;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+
+ return WizardShell_Base::onFinish();
+ }
+
+//......................................................................................................................
+} } // namespace svt::uno
+//......................................................................................................................
diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx
new file mode 100644
index 000000000000..338b4f38dc4a
--- /dev/null
+++ b/svtools/source/uno/wizard/wizardshell.hxx
@@ -0,0 +1,147 @@
+/*************************************************************************
+ * 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 SVT_UNO_WIZARD_SHELL
+#define SVT_UNO_WIZARD_SHELL
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/dialogs/XWizardController.hpp>
+#include <com/sun/star/ui/dialogs/XWizard.hpp>
+/** === end UNO includes === **/
+
+#include <svtools/roadmapwizard.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <map>
+
+//......................................................................................................................
+namespace svt { namespace uno
+{
+//......................................................................................................................
+
+ class WizardPageController;
+ typedef ::boost::shared_ptr< WizardPageController > PWizardPageController;
+
+ //==================================================================================================================
+ //= WizardShell
+ //==================================================================================================================
+ typedef ::svt::RoadmapWizard WizardShell_Base;
+ class WizardShell : public WizardShell_Base
+ {
+ public:
+ WizardShell(
+ Window* _pParent,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard >& i_rWizard,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController >& i_rController,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > >& i_rPaths
+ );
+ virtual ~WizardShell();
+
+ // Dialog overridables
+ virtual short Execute();
+
+ // OWizardMachine overridables
+ virtual TabPage* createPage( WizardState i_nState );
+ virtual void enterState( WizardState i_nState );
+ virtual sal_Bool leaveState( WizardState i_nState );
+ virtual String getStateDisplayName( WizardState i_nState ) const;
+ virtual bool canAdvance() const;
+ virtual sal_Bool onFinish();
+ virtual IWizardPageController*
+ getPageController( TabPage* _pCurrentPage ) const;
+
+ // attribute access
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard >&
+ getWizard() const { return m_xWizard; }
+
+ static sal_Int16 convertCommitReasonToTravelType( const CommitPageReason i_eReason );
+
+ // operations
+ sal_Bool advanceTo( const sal_Int16 i_nPageId )
+ {
+ return skipUntil( impl_pageIdToState( i_nPageId ) );
+ }
+ sal_Bool goBackTo( const sal_Int16 i_nPageId )
+ {
+ return skipBackwardUntil( impl_pageIdToState( i_nPageId ) );
+ }
+ sal_Bool travelNext() { return WizardShell_Base::travelNext(); }
+ sal_Bool travelPrevious() { return WizardShell_Base::travelPrevious(); }
+
+ void activatePath( const sal_Int16 i_nPathID, const sal_Bool i_bFinal )
+ {
+ WizardShell_Base::activatePath( PathId( i_nPathID ), i_bFinal );
+ }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage >
+ getCurrentWizardPage() const;
+
+ sal_Int16 getCurrentPage() const
+ {
+ return impl_stateToPageId( getCurrentState() );
+ }
+
+ void enablePage( const sal_Int16 i_PageID, const sal_Bool i_Enable );
+
+ bool knowsPage( const sal_Int16 i_nPageID ) const
+ {
+ return knowsState( impl_pageIdToState( i_nPageID ) );
+ }
+
+ private:
+ sal_Int16 impl_stateToPageId( const WizardTypes::WizardState i_nState ) const
+ {
+ return static_cast< sal_Int16 >( i_nState + m_nFirstPageID );
+ }
+
+ WizardState impl_pageIdToState( const sal_Int16 i_nPageId ) const
+ {
+ return static_cast< WizardState >( i_nPageId - m_nFirstPageID );
+ }
+
+ PWizardPageController impl_getController( TabPage* i_pPage ) const;
+
+ // prevent outside access to some base class members
+ using WizardShell_Base::skip;
+ using WizardShell_Base::skipUntil;
+ using WizardShell_Base::skipBackwardUntil;
+ using WizardShell_Base::getCurrentState;
+ using WizardShell_Base::activatePath;
+
+ private:
+ typedef ::std::map< TabPage*, PWizardPageController > Page2ControllerMap;
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizard > m_xWizard;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController;
+ const sal_Int16 m_nFirstPageID;
+ Page2ControllerMap m_aPageControllers;
+ };
+
+//......................................................................................................................
+} } // namespace svt::uno
+//......................................................................................................................
+
+#endif // SVT_UNO_WIZARD_SHELL
diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk
index 0040b1d1ee65..f9c14a540410 100644
--- a/svtools/util/makefile.mk
+++ b/svtools/util/makefile.mk
@@ -71,6 +71,7 @@ LIB1FILES= \
$(SLB)/svrtf.lib \
$(SLB)/table.lib \
$(SLB)/unoiface.lib \
+ $(SLB)/unowiz.lib \
$(SLB)/urlobj.lib \
$(SLB)/toolpanel.lib
diff --git a/svtools/workben/unodialog/roadmapskeleton.cxx b/svtools/workben/unodialog/roadmapskeleton.cxx
index f261f219c3fd..e3ed06707f14 100644
--- a/svtools/workben/unodialog/roadmapskeleton.cxx
+++ b/svtools/workben/unodialog/roadmapskeleton.cxx
@@ -103,9 +103,9 @@ namespace udlg
}
//--------------------------------------------------------------------
- sal_Bool RoadmapSkeletonDialog::onFinish( sal_Int32 _nResult )
+ sal_Bool RoadmapSkeletonDialog::onFinish()
{
- return RoadmapSkeletonDialog_Base::onFinish( _nResult );
+ return RoadmapSkeletonDialog_Base::onFinish();
}
//........................................................................
diff --git a/svtools/workben/unodialog/roadmapskeleton.hxx b/svtools/workben/unodialog/roadmapskeleton.hxx
index 216c940b842a..8859390c4b58 100644
--- a/svtools/workben/unodialog/roadmapskeleton.hxx
+++ b/svtools/workben/unodialog/roadmapskeleton.hxx
@@ -52,7 +52,7 @@ namespace udlg
virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
virtual sal_Bool leaveState( WizardState _nState );
virtual WizardState determineNextState( WizardState _nCurrentState ) const;
- virtual sal_Bool onFinish( sal_Int32 _nResult );
+ virtual sal_Bool onFinish();
private:
::comphelper::ComponentContext m_aContext;
diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc
index f1c19b4e0895..f1bc8cfdae19 100644
--- a/svx/inc/svdstr.hrc
+++ b/svx/inc/svdstr.hrc
@@ -674,7 +674,7 @@
#define SIP_SA_CIRCRESERVE1 (SIP_Begin + 177)
#define SIP_SA_CIRCRESERVE2 (SIP_Begin + 178)
#define SIP_SA_CIRCRESERVE3 (SIP_Begin + 179)
-//BFS01#define SIP_SDRATTRSET_CIRC (SIP_Begin + 180)
+#define SIP_SA_OBJVISIBLE (SIP_Begin + 180)
#define SIP_SA_OBJMOVEPROTECT (SIP_Begin + 181)
#define SIP_SA_OBJSIZEPROTECT (SIP_Begin + 182)
#define SIP_SA_OBJPRINTABLE (SIP_Begin + 183)
diff --git a/svx/inc/svx/SpellDialogChildWindow.hxx b/svx/inc/svx/SpellDialogChildWindow.hxx
index 034b6372f6f1..3702b643e17e 100644
--- a/svx/inc/svx/SpellDialogChildWindow.hxx
+++ b/svx/inc/svx/SpellDialogChildWindow.hxx
@@ -69,15 +69,19 @@ protected:
@return
returns an empty vector if no error could be found
*/
- virtual SpellPortions GetNextWrongSentence (void) = 0;
+ virtual SpellPortions GetNextWrongSentence (bool bRecheck) = 0;
/** This abstract method applies the changes made in the spelling dialog
to the document.
The dialog always updates its settings when it gets the focus. The document
can rely on the fact that the methods ApplyChangedSentence() is called for the
position that the last GetNextWrongSentence() returned.
+ If 'bRecheck' is set to true then the same sentence should be rechecked once from
+ the start. This should be used too find errors that the user has introduced by
+ manual changes in the edit field, and in order to not miss the still following errors
+ in that sentence.
*/
- virtual void ApplyChangedSentence(const SpellPortions& rChanged) = 0;
+ virtual void ApplyChangedSentence(const SpellPortions& rChanged, bool bRecheck ) = 0;
/** This methods determines whether the application supports AutoCorrection
*/
virtual bool HasAutoCorrection();
diff --git a/svx/inc/svx/sdrmasterpagedescriptor.hxx b/svx/inc/svx/sdrmasterpagedescriptor.hxx
index 8325d2a57fa1..612f2ab927ec 100644
--- a/svx/inc/svx/sdrmasterpagedescriptor.hxx
+++ b/svx/inc/svx/sdrmasterpagedescriptor.hxx
@@ -89,8 +89,6 @@ namespace sdr
// operators
sal_Bool operator==(const MasterPageDescriptor& rCandidate) const;
sal_Bool operator!=(const MasterPageDescriptor& rCandidate) const;
-
- const SfxItemSet& getCorrectFillAttributes() const;
};
} // end of namespace sdr
diff --git a/svx/inc/svx/svddef.hxx b/svx/inc/svx/svddef.hxx
index a758e9c1dba7..a9e5d175680c 100644
--- a/svx/inc/svx/svddef.hxx
+++ b/svx/inc/svx/svddef.hxx
@@ -203,7 +203,8 @@
#define SDRATTR_TRANSFORMREF2X (SDRATTR_NOTPERSIST_FIRST+32) /* 1212 long, def=0 */
#define SDRATTR_TRANSFORMREF2Y (SDRATTR_NOTPERSIST_FIRST+33) /* 1213 long, def=0 */
#define SDRATTR_TEXTDIRECTION (SDRATTR_NOTPERSIST_FIRST+34) /* 1214 V4+++ long, def=0 */
-#define SDRATTR_NOTPERSIST_LAST (SDRATTR_TEXTDIRECTION) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */
+#define SDRATTR_OBJVISIBLE (SDRATTR_NOTPERSIST_FIRST+35)
+#define SDRATTR_NOTPERSIST_LAST (SDRATTR_OBJVISIBLE) /* 1228 V4+++*/ /* 1213*/ /* 1085 */ /* 1040 */ /* 1123 */ /* Pool V1: 1065 */
// kein SetItem hierfuer
#define SDRATTR_GRAF_FIRST (SDRATTR_NOTPERSIST_LAST+1) /* 1229 V4+++*/
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index cf7ca2eda5ee..40cc992e96d9 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -283,6 +283,7 @@ public:
BOOL bSizProt;
BOOL bNoPrint;
BOOL bClosedObj;
+ bool mbVisible;
SdrLayerID mnLayerID;
public:
@@ -469,10 +470,10 @@ protected:
unsigned bGrouped : 1; // Member eines GroupObjektes?
// Die folgende Flags werden gestreamt
- unsigned bMovProt : 1; // Position geschuetzt
- unsigned bSizProt : 1; // Groesse geschuetzt
- unsigned bNoPrint : 1; // Nicht drucken
-
+ unsigned bMovProt : 1; // If true, the position is protected
+ unsigned bSizProt : 1; // If true, the size is protected
+ unsigned bNoPrint : 1; // If true, the object is not printed.
+ unsigned mbVisible : 1; // If false, the object is not visible on screen (but maybe on printer, depending on bNoprint
// Wenn bEmptyPresObj TRUE ist, handelt es sich um ein
// Praesentationsobjekt, dem noch kein Inhalt zugewiesen
// wurde. Default ist das Flag auf FALSE. Die Verwaltung
@@ -1020,6 +1021,8 @@ public:
sal_Bool IsResizeProtect() const { return bSizProt; }
void SetPrintable(sal_Bool bPrn);
sal_Bool IsPrintable() const { return !bNoPrint; }
+ void SetVisible(sal_Bool bVisible);
+ sal_Bool IsVisible() const { return mbVisible; }
void SetEmptyPresObj(sal_Bool bEpt) { bEmptyPresObj=bEpt; }
sal_Bool IsEmptyPresObj() const { return bEmptyPresObj; }
void SetNotVisibleAsMaster(sal_Bool bFlg) { bNotVisibleAsMaster=bFlg; }
diff --git a/svx/inc/svx/svdpage.hxx b/svx/inc/svx/svdpage.hxx
index 29cf17ec9180..c601fddef181 100644
--- a/svx/inc/svx/svdpage.hxx
+++ b/svx/inc/svx/svdpage.hxx
@@ -376,7 +376,6 @@ private:
public:
// construct/destruct
SdrPageProperties(SdrPage& rSdrPage);
- SdrPageProperties(const SdrPageProperties& rCandidate);
virtual ~SdrPageProperties();
// Notify(...) from baseclass SfxListener
diff --git a/svx/inc/svx/sxopitm.hxx b/svx/inc/svx/sxopitm.hxx
index 947660e71cc0..dd402c3a0915 100644
--- a/svx/inc/svx/sxopitm.hxx
+++ b/svx/inc/svx/sxopitm.hxx
@@ -39,4 +39,10 @@ public:
SdrObjPrintableItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJPRINTABLE,rIn) {}
};
+class SdrObjVisibleItem: public SdrYesNoItem {
+public:
+ SdrObjVisibleItem(bool bOn=true): SdrYesNoItem(SDRATTR_OBJVISIBLE,bOn) {}
+ SdrObjVisibleItem(SvStream& rIn): SdrYesNoItem(SDRATTR_OBJVISIBLE,rIn) {}
+};
+
#endif
diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx
index 27196079db07..fcf86488f7a3 100755..100644
--- a/svx/inc/svx/unoshprp.hxx
+++ b/svx/inc/svx/unoshprp.hxx
@@ -325,6 +325,7 @@
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_MOVEPROTECT), SDRATTR_OBJMOVEPROTECT , &::getBooleanCppuType(), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_NAME), SDRATTR_OBJECTNAME , &::getCppuType((const ::rtl::OUString*)0), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_PRINTABLE), SDRATTR_OBJPRINTABLE , &::getBooleanCppuType(), 0, 0}, \
+ { MAP_CHAR_LEN("Visible"), SDRATTR_OBJVISIBLE , &::getBooleanCppuType(), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_MISC_OBJ_SIZEPROTECT), SDRATTR_OBJSIZEPROTECT , &::getBooleanCppuType(), 0, 0},\
{ MAP_CHAR_LEN("UINameSingular"), OWN_ATTR_UINAME_SINGULAR , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \
{ MAP_CHAR_LEN("UINamePlural"), OWN_ATTR_UINAME_PLURAL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, \
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 28ad49c6b65f..36490775cea1 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -468,6 +468,10 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
const rtl::OUString sSwitched ( RTL_CONSTASCII_USTRINGPARAM( "Switched" ) );
const rtl::OUString sPolar ( RTL_CONSTASCII_USTRINGPARAM( "Polar" ) );
// const rtl::OUString sMap ( RTL_CONSTASCII_USTRINGPARAM( "Map" ) );
+ const rtl::OUString sRefX ( RTL_CONSTASCII_USTRINGPARAM( "RefX" ) );
+ const rtl::OUString sRefY ( RTL_CONSTASCII_USTRINGPARAM( "RefY" ) );
+ const rtl::OUString sRefAngle ( RTL_CONSTASCII_USTRINGPARAM( "RefAngle" ) );
+ const rtl::OUString sRefR ( RTL_CONSTASCII_USTRINGPARAM( "RefR" ) );
const rtl::OUString sRadiusRangeMinimum ( RTL_CONSTASCII_USTRINGPARAM( "RadiusRangeMinimum" ) );
const rtl::OUString sRadiusRangeMaximum ( RTL_CONSTASCII_USTRINGPARAM( "RadiusRangeMaximum" ) );
const rtl::OUString sRangeXMinimum ( RTL_CONSTASCII_USTRINGPARAM( "RangeXMinimum" ) );
@@ -526,6 +530,26 @@ sal_Bool EnhancedCustomShape2d::ConvertSequenceToEnhancedCustomShape2dHandle(
}
}
*/
+ else if ( rPropVal.Name.equals( sRefX ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefX )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFX;
+ }
+ else if ( rPropVal.Name.equals( sRefY ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefY )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFY;
+ }
+ else if ( rPropVal.Name.equals( sRefAngle ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefAngle )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFANGLE;
+ }
+ else if ( rPropVal.Name.equals( sRefR ) )
+ {
+ if ( rPropVal.Value >>= rDestinationHandle.nRefR )
+ rDestinationHandle.nFlags |= HANDLE_FLAGS_REFR;
+ }
else if ( rPropVal.Name.equals( sRadiusRangeMinimum ) )
{
if ( rPropVal.Value >>= rDestinationHandle.aRadiusRangeMinimum )
@@ -1182,131 +1206,141 @@ sal_Bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nI
Handle aHandle;
if ( ConvertSequenceToEnhancedCustomShape2dHandle( seqHandles[ nIndex ], aHandle ) )
{
- sal_Bool bAdjFirst = aHandle.aPosition.First.Type == EnhancedCustomShapeParameterType::ADJUSTMENT;
- sal_Bool bAdjSecond= aHandle.aPosition.Second.Type == EnhancedCustomShapeParameterType::ADJUSTMENT;
- if ( bAdjFirst || bAdjSecond )
+ Point aP( rPosition.X, rPosition.Y );
+ // apply the negative object rotation to the controller position
+
+ aP.Move( -aLogicRect.Left(), -aLogicRect.Top() );
+ if ( bFlipH )
+ aP.X() = aLogicRect.GetWidth() - aP.X();
+ if ( bFlipV )
+ aP.Y() = aLogicRect.GetHeight() - aP.Y();
+ if ( nRotateAngle )
{
- Point aP( rPosition.X, rPosition.Y );
- // apply the negative object rotation to the controller position
-
- aP.Move( -aLogicRect.Left(), -aLogicRect.Top() );
- if ( bFlipH )
- aP.X() = aLogicRect.GetWidth() - aP.X();
- if ( bFlipV )
- aP.Y() = aLogicRect.GetHeight() - aP.Y();
- if ( nRotateAngle )
- {
- double a = -nRotateAngle * F_PI18000;
- RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) );
- }
- const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() );
- if ( aGeoStat.nShearWink )
- {
- double nTan = -aGeoStat.nTan;
- if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
- nTan = -nTan;
- ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
- }
+ double a = -nRotateAngle * F_PI18000;
+ RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) );
+ }
+ const GeoStat aGeoStat( ((SdrObjCustomShape*)pCustomShapeObj)->GetGeoStat() );
+ if ( aGeoStat.nShearWink )
+ {
+ double nTan = -aGeoStat.nTan;
+ if ((bFlipV&&!bFlipH )||(bFlipH&&!bFlipV))
+ nTan = -nTan;
+ ShearPoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), nTan );
+ }
- double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X();
- double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y();
- fPos1 /= fXScale;
- fPos2 /= fYScale;
+ double fPos1 = aP.X(); //( bFlipH ) ? aLogicRect.GetWidth() - aP.X() : aP.X();
+ double fPos2 = aP.Y(); //( bFlipV ) ? aLogicRect.GetHeight() -aP.Y() : aP.Y();
+ fPos1 /= fXScale;
+ fPos2 /= fYScale;
- if ( aHandle.nFlags & HANDLE_FLAGS_SWITCHED )
+ if ( aHandle.nFlags & HANDLE_FLAGS_SWITCHED )
+ {
+ if ( aLogicRect.GetHeight() > aLogicRect.GetWidth() )
{
- if ( aLogicRect.GetHeight() > aLogicRect.GetWidth() )
- {
- double fX = fPos1;
- double fY = fPos2;
- fPos1 = fY;
- fPos2 = fX;
- }
+ double fX = fPos1;
+ double fY = fPos2;
+ fPos1 = fY;
+ fPos2 = fX;
}
+ }
- sal_Int32 nFirstAdjustmentValue = 0, nSecondAdjustmentValue = 0;
+ sal_Int32 nFirstAdjustmentValue = -1, nSecondAdjustmentValue = -1;
+
+ if ( aHandle.aPosition.First.Type == EnhancedCustomShapeParameterType::ADJUSTMENT )
aHandle.aPosition.First.Value >>= nFirstAdjustmentValue;
+ if ( aHandle.aPosition.Second.Type == EnhancedCustomShapeParameterType::ADJUSTMENT )
aHandle.aPosition.Second.Value>>= nSecondAdjustmentValue;
- if ( aHandle.nFlags & HANDLE_FLAGS_POLAR )
+ if ( aHandle.nFlags & HANDLE_FLAGS_POLAR )
+ {
+ double fXRef, fYRef, fAngle;
+ GetParameter( fXRef, aHandle.aPolar.First, sal_False, sal_False );
+ GetParameter( fYRef, aHandle.aPolar.Second, sal_False, sal_False );
+ const double fDX = fPos1 - fXRef;
+ fAngle = -( atan2( -fPos2 + fYRef, ( ( fDX == 0.0L ) ? 0.000000001 : fDX ) ) / F_PI180 );
+ double fX = ( fPos1 - fXRef );
+ double fY = ( fPos2 - fYRef );
+ double fRadius = sqrt( fX * fX + fY * fY );
+ if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MINIMUM )
+ {
+ double fMin;
+ GetParameter( fMin, aHandle.aRadiusRangeMinimum, sal_False, sal_False );
+ if ( fRadius < fMin )
+ fRadius = fMin;
+ }
+ if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM )
+ {
+ double fMax;
+ GetParameter( fMax, aHandle.aRadiusRangeMaximum, sal_False, sal_False );
+ if ( fRadius > fMax )
+ fRadius = fMax;
+ }
+ if ( nFirstAdjustmentValue >= 0 )
+ SetAdjustValueAsDouble( fRadius, nFirstAdjustmentValue );
+ if ( nSecondAdjustmentValue >= 0 )
+ SetAdjustValueAsDouble( fAngle, nSecondAdjustmentValue );
+ }
+ else
+ {
+ if ( aHandle.nFlags & HANDLE_FLAGS_REFX )
+ {
+ nFirstAdjustmentValue = aHandle.nRefX;
+ fPos1 *= 100000.0;
+ fPos1 /= nCoordWidth;
+ }
+ if ( aHandle.nFlags & HANDLE_FLAGS_REFY )
{
- double fXRef, fYRef, fAngle;
- GetParameter( fXRef, aHandle.aPolar.First, sal_False, sal_False );
- GetParameter( fYRef, aHandle.aPolar.Second, sal_False, sal_False );
- const double fDX = fPos1 - fXRef;
- fAngle = -( atan2( -fPos2 + fYRef, ( ( fDX == 0.0L ) ? 0.000000001 : fDX ) ) / F_PI180 );
- double fX = ( fPos1 - fXRef );
- double fY = ( fPos2 - fYRef );
- double fRadius = sqrt( fX * fX + fY * fY );
- if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MINIMUM )
+ nSecondAdjustmentValue = aHandle.nRefY;
+ fPos2 *= 100000.0;
+ fPos2 /= nCoordHeight;
+ }
+ if ( nFirstAdjustmentValue >= 0 )
+ {
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MINIMUM ) // check if horizontal handle needs to be within a range
{
- double fMin;
- GetParameter( fMin, aHandle.aRadiusRangeMinimum, sal_False, sal_False );
- if ( fRadius < fMin )
- fRadius = fMin;
+ double fXMin;
+ GetParameter( fXMin, aHandle.aXRangeMinimum, sal_False, sal_False );
+ if ( fPos1 < fXMin )
+ fPos1 = fXMin;
}
- if ( aHandle.nFlags & HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM )
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MAXIMUM ) // check if horizontal handle needs to be within a range
{
- double fMax;
- GetParameter( fMax, aHandle.aRadiusRangeMaximum, sal_False, sal_False );
- if ( fRadius > fMax )
- fRadius = fMax;
+ double fXMax;
+ GetParameter( fXMax, aHandle.aXRangeMaximum, sal_False, sal_False );
+ if ( fPos1 > fXMax )
+ fPos1 = fXMax;
}
- if ( bAdjFirst )
- SetAdjustValueAsDouble( fRadius, nFirstAdjustmentValue );
- if ( bAdjSecond )
- SetAdjustValueAsDouble( fAngle, nSecondAdjustmentValue );
+ SetAdjustValueAsDouble( fPos1, nFirstAdjustmentValue );
}
- else
+ if ( nSecondAdjustmentValue >= 0 )
{
- if ( bAdjFirst )
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MINIMUM ) // check if vertical handle needs to be within a range
{
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MINIMUM ) // check if horizontal handle needs to be within a range
- {
- double fXMin;
- GetParameter( fXMin, aHandle.aXRangeMinimum, sal_False, sal_False );
- if ( fPos1 < fXMin )
- fPos1 = fXMin;
- }
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_X_MAXIMUM ) // check if horizontal handle needs to be within a range
- {
- double fXMax;
- GetParameter( fXMax, aHandle.aXRangeMaximum, sal_False, sal_False );
- if ( fPos1 > fXMax )
- fPos1 = fXMax;
- }
- SetAdjustValueAsDouble( fPos1, nFirstAdjustmentValue );
+ double fYMin;
+ GetParameter( fYMin, aHandle.aYRangeMinimum, sal_False, sal_False );
+ if ( fPos2 < fYMin )
+ fPos2 = fYMin;
}
- if ( bAdjSecond )
+ if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MAXIMUM ) // check if vertical handle needs to be within a range
{
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MINIMUM ) // check if vertical handle needs to be within a range
- {
- double fYMin;
- GetParameter( fYMin, aHandle.aYRangeMinimum, sal_False, sal_False );
- if ( fPos2 < fYMin )
- fPos2 = fYMin;
- }
- if ( aHandle.nFlags & HANDLE_FLAGS_RANGE_Y_MAXIMUM ) // check if vertical handle needs to be within a range
- {
- double fYMax;
- GetParameter( fYMax, aHandle.aYRangeMaximum, sal_False, sal_False );
- if ( fPos2 > fYMax )
- fPos2 = fYMax;
- }
- SetAdjustValueAsDouble( fPos2, nSecondAdjustmentValue );
+ double fYMax;
+ GetParameter( fYMax, aHandle.aYRangeMaximum, sal_False, sal_False );
+ if ( fPos2 > fYMax )
+ fPos2 = fYMax;
}
+ SetAdjustValueAsDouble( fPos2, nSecondAdjustmentValue );
}
- // and writing them back into the GeometryItem
- SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&)
- (const SdrCustomShapeGeometryItem&)pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
- const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) );
- com::sun::star::beans::PropertyValue aPropVal;
- aPropVal.Name = sAdjustmentValues;
- aPropVal.Value <<= seqAdjustmentValues;
- aGeometryItem.SetPropertyValue( aPropVal );
- pCustomShapeObj->SetMergedItem( aGeometryItem );
- bRetValue = sal_True;
}
+ // and writing them back into the GeometryItem
+ SdrCustomShapeGeometryItem aGeometryItem((SdrCustomShapeGeometryItem&)
+ (const SdrCustomShapeGeometryItem&)pCustomShapeObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
+ const rtl::OUString sAdjustmentValues( RTL_CONSTASCII_USTRINGPARAM ( "AdjustmentValues" ) );
+ com::sun::star::beans::PropertyValue aPropVal;
+ aPropVal.Name = sAdjustmentValues;
+ aPropVal.Value <<= seqAdjustmentValues;
+ aGeometryItem.SetPropertyValue( aPropVal );
+ pCustomShapeObj->SetMergedItem( aGeometryItem );
+ bRetValue = sal_True;
}
}
return bRetValue;
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.hxx b/svx/source/customshapes/EnhancedCustomShape2d.hxx
index 00df4b04f389..b3b944513e60 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.hxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.hxx
@@ -67,6 +67,10 @@ class SvxMSDffAdjustmentHandle;
#define HANDLE_FLAGS_RANGE_Y_MAXIMUM 0x0100
#define HANDLE_FLAGS_RADIUS_RANGE_MINIMUM 0x0200
#define HANDLE_FLAGS_RADIUS_RANGE_MAXIMUM 0x0400
+#define HANDLE_FLAGS_REFX 0x0800
+#define HANDLE_FLAGS_REFY 0x1000
+#define HANDLE_FLAGS_REFANGLE 0x2000
+#define HANDLE_FLAGS_REFR 0x4000
// MSDFF_HANDLE_FLAGS_RANGE_Y seems to be not defined in
// escher, but we are using it internally in to differentiate
@@ -145,12 +149,20 @@ class EnhancedCustomShape2d : public SfxItemSet
com::sun::star::drawing::EnhancedCustomShapeParameterPair aPosition;
com::sun::star::drawing::EnhancedCustomShapeParameterPair aPolar;
+ sal_Int32 nRefX;
+ sal_Int32 nRefY;
+ sal_Int32 nRefAngle;
+ sal_Int32 nRefR;
+
com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
com::sun::star::drawing::EnhancedCustomShapeParameter aXRangeMinimum;
com::sun::star::drawing::EnhancedCustomShapeParameter aXRangeMaximum;
com::sun::star::drawing::EnhancedCustomShapeParameter aYRangeMinimum;
com::sun::star::drawing::EnhancedCustomShapeParameter aYRangeMaximum;
+
+ Handle() : bMirroredX ( sal_False ), bMirroredY ( sal_False ), bSwitched( sal_False ),
+ nRefX( -1 ), nRefY( -1 ), nRefAngle( -1 ), nRefR( -1 ) {};
};
sal_Bool IsFlipVert() { return bFlipV; };
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 00c1edaa7f04..7705a2dd08df 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -1214,9 +1214,7 @@ void SvxRuler::UpdateTabs()
long nRightFrameMargin = GetRightFrameMargin();
//#i24363# tab stops relative to indent
- const long nParaItemTxtLeft = pRuler_Imp->bIsTabsRelativeToIndent ?
- pParaItem->GetTxtLeft() :
- 0;
+ const long nParaItemTxtLeft = pParaItem->GetTxtLeft();
const long lParaIndent = nLeftFrameMargin + nParaItemTxtLeft;
@@ -1253,7 +1251,7 @@ void SvxRuler::UpdateTabs()
const SvxTabStop *pTab = &(*pTabStopItem)[j];
pTabs[nTabCount+TAB_GAP].nPos =
ConvertHPosPixel(
- lParaIndent + pTab->GetTabPos() + lAppNullOffset);
+ (pRuler_Imp->bIsTabsRelativeToIndent ? lParaIndent : 0 ) + pTab->GetTabPos() + lAppNullOffset);
if(bRTL)
{
pTabs[nTabCount+TAB_GAP].nPos = lParaIndentPix + lRightPixMargin - pTabs[nTabCount+TAB_GAP].nPos;
@@ -1286,13 +1284,37 @@ void SvxRuler::UpdateTabs()
{
for(j = 0; j < nDefTabBuf; ++j)
{
- pTabs[nTabCount + TAB_GAP].nPos =
+ if( j == 0 )
+ {
+ //set the first default tab stop
+ if(pRuler_Imp->bIsTabsRelativeToIndent)
+ {
+ pTabs[nTabCount + TAB_GAP].nPos =
+ (pTabs[nTabCount].nPos + nDefTabDist);
+ pTabs[nTabCount + TAB_GAP].nPos -=
+ ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix)
+ % nDefTabDist );
+ }
+ else
+ {
+ if( pTabs[nTabCount].nPos < 0 )
+ {
+ pTabs[nTabCount + TAB_GAP].nPos = ( pTabs[nTabCount].nPos / nDefTabDist ) * nDefTabDist;
+ }
+ else
+ {
+ pTabs[nTabCount + TAB_GAP].nPos = ( pTabs[nTabCount].nPos / nDefTabDist + 1 ) * nDefTabDist;
+ }
+ }
+
+ }
+ else
+ {
+ //simply add the default distance to the last position
+ pTabs[nTabCount + TAB_GAP].nPos =
pTabs[nTabCount].nPos + nDefTabDist;
+ }
- if(j == 0 )
- pTabs[nTabCount + TAB_GAP].nPos -=
- ((pTabs[nTabCount + TAB_GAP].nPos - lParaIndentPix)
- % nDefTabDist );
if(pTabs[nTabCount+TAB_GAP].nPos >= lRightIndent)
break;
pTabs[nTabCount + TAB_GAP].nStyle = RULER_TAB_DEFAULT;
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index d799aec38eb7..036f700e6e96 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -336,8 +336,18 @@ UINT16 E3dScene::GetObjIdentifier() const
void E3dScene::SetBoundRectDirty()
{
- // avoid resetting aOutRect which in case of this object is model data,
- // not re-creatable view data
+ E3dScene* pScene = GetScene();
+
+ if(pScene == this)
+ {
+ // avoid resetting aOutRect which in case of a 3D scene used as 2d object
+ // is model data,not re-creatable view data
+ }
+ else
+ {
+ // if not the outmost scene it is used as group in 3d, call parent
+ E3dObject::SetBoundRectDirty();
+ }
}
/*************************************************************************
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 97fee2250658..047faef2cb41 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -75,6 +75,7 @@
#include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
@@ -1066,77 +1067,39 @@ void E3dView::ConvertMarkedObjTo3D(BOOL bExtrude, basegfx::B2DPoint aPnt1, baseg
struct E3dDepthNeighbour
{
- E3dDepthNeighbour* pNext;
- E3dExtrudeObj* pObj;
-
- E3dDepthNeighbour() { pNext = NULL; pObj = NULL; }
+ E3dDepthNeighbour* mpNext;
+ E3dExtrudeObj* mpObj;
+ basegfx::B2DPolyPolygon maPreparedPolyPolygon;
+
+ E3dDepthNeighbour()
+ : mpNext(0),
+ mpObj(0),
+ maPreparedPolyPolygon()
+ {
+ }
};
struct E3dDepthLayer
{
- E3dDepthLayer* pDown;
- E3dDepthNeighbour* pNext;
-
- E3dDepthLayer() { pDown = NULL; pNext = NULL; }
- ~E3dDepthLayer() { while(pNext) { E3dDepthNeighbour* pSucc = pNext->pNext; delete pNext; pNext = pSucc; }}
-};
-
-bool ImpDoesOverlap(const basegfx::B2DPolygon& rPolygonA, const basegfx::B2DPolygon& rPolygonB)
-{
- bool bRetval(false);
- const basegfx::B2DRange aRangeA(basegfx::tools::getRange(rPolygonA));
- const basegfx::B2DRange aRangeB(basegfx::tools::getRange(rPolygonB));
+ E3dDepthLayer* mpDown;
+ E3dDepthNeighbour* mpNext;
- if(aRangeA.overlaps(aRangeB))
+ E3dDepthLayer()
+ : mpDown(0),
+ mpNext(0)
{
- // A in B ?
- if(basegfx::tools::isInside(rPolygonA, rPolygonB))
- return true;
-
- // B in A ?
- if(basegfx::tools::isInside(rPolygonB, rPolygonA))
- return true;
-
- // A and B the same ?
- if(basegfx::tools::isInside(rPolygonB, rPolygonA, true))
- return true;
}
- return bRetval;
-}
-
-bool ImpDoesOverlap(const basegfx::B2DPolyPolygon& rPolyPolygonA, const basegfx::B2DPolyPolygon& rPolyPolygonB)
-{
- bool bRetval(false);
- const basegfx::B2DRange aRangeA(basegfx::tools::getRange(rPolyPolygonA));
- const basegfx::B2DRange aRangeB(basegfx::tools::getRange(rPolyPolygonB));
-
- if(aRangeA.overlaps(aRangeB))
+ ~E3dDepthLayer()
{
- const sal_uInt32 nCntA(rPolyPolygonA.count());
- const sal_uInt32 nCntB(rPolyPolygonB.count());
-
- for(sal_uInt32 a(0L); !bRetval && a < nCntA; a++)
+ while(mpNext)
{
- const basegfx::B2DPolygon aPolygonA(rPolyPolygonA.getB2DPolygon(a));
-
- if(aPolygonA.isClosed())
- {
- for(sal_uInt32 b(0L); !bRetval && b < nCntB; b++)
- {
- const basegfx::B2DPolygon aPolygonB(rPolyPolygonB.getB2DPolygon(b));
-
- if(aPolygonB.isClosed())
- {
- bRetval = ImpDoesOverlap(aPolygonA, aPolygonB);
- }
- }
- }
+ E3dDepthNeighbour* pSucc = mpNext->mpNext;
+ delete mpNext;
+ mpNext = pSucc;
}
}
-
- return bRetval;
-}
+};
void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
{
@@ -1147,39 +1110,41 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
E3dDepthLayer* pBaseLayer = NULL;
E3dDepthLayer* pLayer = NULL;
INT32 nNumLayers = 0;
- //SfxItemPool& rPool = pMod->GetItemPool();
while(aIter.IsMore())
{
- E3dObject* pSubObj = (E3dObject*)aIter.Next();
+ E3dExtrudeObj* pExtrudeObj = dynamic_cast< E3dExtrudeObj* >(aIter.Next());
- if(pSubObj && pSubObj->ISA(E3dExtrudeObj))
+ if(pExtrudeObj)
{
- E3dExtrudeObj* pExtrudeObj = (E3dExtrudeObj*)pSubObj;
- const basegfx::B2DPolyPolygon aExtrudePoly(pExtrudeObj->GetExtrudePolygon());
-
+ const basegfx::B2DPolyPolygon aExtrudePoly(
+ basegfx::tools::prepareForPolygonOperation(pExtrudeObj->GetExtrudePolygon()));
const SfxItemSet& rLocalSet = pExtrudeObj->GetMergedItemSet();
- XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem);
- Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue();
+ const XFillStyle eLocalFillStyle = ITEMVALUE(rLocalSet, XATTR_FILLSTYLE, XFillStyleItem);
+ const Color aLocalColor = ((const XFillColorItem&)(rLocalSet.Get(XATTR_FILLCOLOR))).GetColorValue();
- // ExtrudeObj einordnen
+ // sort in ExtrudeObj
if(pLayer)
{
- // Gibt es eine Ueberschneidung mit einem Objekt dieses
- // Layers?
- BOOL bOverlap(FALSE);
- E3dDepthNeighbour* pAct = pLayer->pNext;
+ // do we have overlap with an object of this layer?
+ bool bOverlap(false);
+ E3dDepthNeighbour* pAct = pLayer->mpNext;
while(!bOverlap && pAct)
{
- // ueberlappen sich pAct->pObj und pExtrudeObj ?
- const basegfx::B2DPolyPolygon aActPoly(pAct->pObj->GetExtrudePolygon());
- bOverlap = ImpDoesOverlap(aExtrudePoly, aActPoly);
+ // do pAct->mpObj and pExtrudeObj overlap? Check by
+ // using logical AND clipping
+ const basegfx::B2DPolyPolygon aAndPolyPolygon(
+ basegfx::tools::solvePolygonOperationAnd(
+ aExtrudePoly,
+ pAct->maPreparedPolyPolygon));
+
+ bOverlap = (0 != aAndPolyPolygon.count());
if(bOverlap)
{
// second ciriteria: is another fillstyle or color used?
- const SfxItemSet& rCompareSet = pAct->pObj->GetMergedItemSet();
+ const SfxItemSet& rCompareSet = pAct->mpObj->GetMergedItemSet();
XFillStyle eCompareFillStyle = ITEMVALUE(rCompareSet, XATTR_FILLSTYLE, XFillStyleItem);
@@ -1201,71 +1166,74 @@ void E3dView::DoDepthArrange(E3dScene* pScene, double fDepth)
}
}
- pAct = pAct->pNext;
+ pAct = pAct->mpNext;
}
if(bOverlap)
{
- // ja, beginne einen neuen Layer
- pLayer->pDown = new E3dDepthLayer;
- pLayer = pLayer->pDown;
+ // yes, start a new layer
+ pLayer->mpDown = new E3dDepthLayer;
+ pLayer = pLayer->mpDown;
nNumLayers++;
- pLayer->pNext = new E3dDepthNeighbour;
- pLayer->pNext->pObj = pExtrudeObj;
+ pLayer->mpNext = new E3dDepthNeighbour;
+ pLayer->mpNext->mpObj = pExtrudeObj;
+ pLayer->mpNext->maPreparedPolyPolygon = aExtrudePoly;
}
else
{
- // nein, Objekt kann in aktuellen Layer
+ // no, add to current layer
E3dDepthNeighbour* pNewNext = new E3dDepthNeighbour;
- pNewNext->pObj = pExtrudeObj;
- pNewNext->pNext = pLayer->pNext;
- pLayer->pNext = pNewNext;
+ pNewNext->mpObj = pExtrudeObj;
+ pNewNext->maPreparedPolyPolygon = aExtrudePoly;
+ pNewNext->mpNext = pLayer->mpNext;
+ pLayer->mpNext = pNewNext;
}
}
else
{
- // erster Layer ueberhaupt
+ // first layer ever
pBaseLayer = new E3dDepthLayer;
pLayer = pBaseLayer;
nNumLayers++;
- pLayer->pNext = new E3dDepthNeighbour;
- pLayer->pNext->pObj = pExtrudeObj;
+ pLayer->mpNext = new E3dDepthNeighbour;
+ pLayer->mpNext->mpObj = pExtrudeObj;
+ pLayer->mpNext->maPreparedPolyPolygon = aExtrudePoly;
}
}
}
- // Anzahl Layer steht fest
+ // number of layers is done
if(nNumLayers > 1)
{
- // Arrangement ist notwendig
+ // need to be arranged
double fMinDepth = fDepth * 0.8;
double fStep = (fDepth - fMinDepth) / (double)nNumLayers;
pLayer = pBaseLayer;
while(pLayer)
{
- // an pLayer entlangspazieren
- E3dDepthNeighbour* pAct = pLayer->pNext;
+ // move along layer
+ E3dDepthNeighbour* pAct = pLayer->mpNext;
while(pAct)
{
- // Anpassen
- pAct->pObj->SetMergedItem(SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, sal_uInt32(fMinDepth + 0.5)));
+ // adapt extrude value
+ pAct->mpObj->SetMergedItem(SfxUInt32Item(SDRATTR_3DOBJ_DEPTH, sal_uInt32(fMinDepth + 0.5)));
- // Naechster Eintrag
- pAct = pAct->pNext;
+ // next
+ pAct = pAct->mpNext;
}
- // naechster Layer
- pLayer = pLayer->pDown;
+ // next layer
+ pLayer = pLayer->mpDown;
fMinDepth += fStep;
}
}
- // angelegte Strukturen aufraeumen
+ // cleanup
while(pBaseLayer)
{
- pLayer = pBaseLayer->pDown;
+ pLayer = pBaseLayer->mpDown;
delete pBaseLayer;
pBaseLayer = pLayer;
}
diff --git a/svx/source/intro/makefile.mk b/svx/source/intro/makefile.mk
index 3ed86b3bcda3..4d0686baac04 100644
--- a/svx/source/intro/makefile.mk
+++ b/svx/source/intro/makefile.mk
@@ -36,10 +36,6 @@ TARGET=intro
RSCLOCINC!:=$(RSCLOCINC);$(PRJ)$/RES
-# setting the compiled by $user$ string in the About box
-OOO_VENDOR*=$(USER)$(USERNAME)
-RSCDEFS+=-DOOO_VENDOR="$(OOO_VENDOR)"
-
# --- Allgemein -----------------------------------------------------------
LOCALIZE_ME=intro_tmpl.hrc
diff --git a/svx/source/intro/ooo.src b/svx/source/intro/ooo.src
index 7c3cc150586c..49f6f68fd7e4 100644
--- a/svx/source/intro/ooo.src
+++ b/svx/source/intro/ooo.src
@@ -93,7 +93,7 @@ ModalDialog RID_DEFAULTABOUT
};
String ABOUT_STR_COPYRIGHT
{
- Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by " OOO_VENDOR ", based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html.";
+ Text[ en-US ] = "Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.\nThis product was created by %OOOVENDOR, based on OpenOffice.org.\nOpenOffice.org acknowledges all community members, especially those mentioned at\n http://www.openoffice.org/welcome/credits.html.";
};
StringArray ABOUT_STR_DEVELOPER_ARY
{
diff --git a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
index ba260e79bba9..cbe9c4a9c615 100644
--- a/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
+++ b/svx/source/sdr/contact/viewcontactofmasterpagedescriptor.cxx
@@ -61,11 +61,30 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewContactOfMasterPageDescriptor::createViewIndependentPrimitive2DSequence() const
{
drawinglayer::primitive2d::Primitive2DSequence xRetval;
+ drawinglayer::attribute::SdrFillAttribute aFill;
+ const SdrPage* pCorrectPage = &GetMasterPageDescriptor().GetOwnerPage();
+ const SdrPageProperties* pCorrectProperties = &pCorrectPage->getSdrPageProperties();
- // build primitive from page fill attributes
- const SfxItemSet& rPageFillAttributes = GetMasterPageDescriptor().getCorrectFillAttributes();
- const drawinglayer::attribute::SdrFillAttribute aFill(
- drawinglayer::primitive2d::createNewSdrFillAttribute(rPageFillAttributes));
+ if(XFILL_NONE == ((const XFillStyleItem&)pCorrectProperties->GetItemSet().Get(XATTR_FILLSTYLE)).GetValue())
+ {
+ pCorrectPage = &GetMasterPageDescriptor().GetUsedPage();
+ pCorrectProperties = &pCorrectPage->getSdrPageProperties();
+ }
+
+ if(pCorrectPage->IsMasterPage() && !pCorrectProperties->GetStyleSheet())
+ {
+ // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets,
+ // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all
+ // MasterPages should have a StyleSheet excactly for this reason, but historically
+ // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others).
+ pCorrectProperties = 0;
+ }
+
+ if(pCorrectProperties)
+ {
+ // create page fill attributes when correct properties were identified
+ aFill = drawinglayer::primitive2d::createNewSdrFillAttribute(pCorrectProperties->GetItemSet());
+ }
if(!aFill.isDefault())
{
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index e486f978fafb..b80b6fcbba88 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -203,10 +203,18 @@ namespace sdr
}
else
{
- // build primitive from pObject's attributes
- const SfxItemSet& rFillAttributes = rPage.getSdrPageProperties().GetItemSet();
- const drawinglayer::attribute::SdrFillAttribute aFill(
- drawinglayer::primitive2d::createNewSdrFillAttribute(rFillAttributes));
+ drawinglayer::attribute::SdrFillAttribute aFill;
+
+ // #i110846# Suppress SdrPage FillStyle for MasterPages without StyleSheets,
+ // else the PoolDefault (XFILL_COLOR and Blue8) will be used. Normally, all
+ // MasterPages should have a StyleSheet excactly for this reason, but historically
+ // e.g. the Notes MasterPage has no StyleSheet set (and there maybe others).
+ if(rPage.getSdrPageProperties().GetStyleSheet())
+ {
+ // create page fill attributes with correct properties
+ aFill = drawinglayer::primitive2d::createNewSdrFillAttribute(
+ rPage.getSdrPageProperties().GetItemSet());
+ }
if(!aFill.isDefault())
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
index 47c2cccbd02d..392b8e923212 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgroup.cxx
@@ -57,51 +57,56 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfGroup::getPrimitive2DSequenceHierarchy(DisplayInfo& rDisplayInfo) const
{
- const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
+ drawinglayer::primitive2d::Primitive2DSequence xRetval;
- if(nSubHierarchyCount)
+ // check model-view visibility
+ if(isPrimitiveVisible(rDisplayInfo))
{
- const sal_Bool bDoGhostedDisplaying(
- GetObjectContact().DoVisualizeEnteredGroup()
- && !GetObjectContact().isOutputToPrinter()
- && GetObjectContact().getActiveViewContact() == &GetViewContact());
+ const sal_uInt32 nSubHierarchyCount(GetViewContact().GetObjectCount());
- if(bDoGhostedDisplaying)
+ if(nSubHierarchyCount)
{
- rDisplayInfo.ClearGhostedDrawMode();
- }
+ const sal_Bool bDoGhostedDisplaying(
+ GetObjectContact().DoVisualizeEnteredGroup()
+ && !GetObjectContact().isOutputToPrinter()
+ && GetObjectContact().getActiveViewContact() == &GetViewContact());
- // create object hierarchy
- drawinglayer::primitive2d::Primitive2DSequence xRetval(getPrimitive2DSequenceSubHierarchy(rDisplayInfo));
+ if(bDoGhostedDisplaying)
+ {
+ rDisplayInfo.ClearGhostedDrawMode();
+ }
- if(xRetval.hasElements())
- {
- // get ranges
- const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
- const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D));
- const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport());
+ // create object hierarchy
+ xRetval = getPrimitive2DSequenceSubHierarchy(rDisplayInfo);
- // check geometrical visibility
- if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange))
+ if(xRetval.hasElements())
{
- // not visible, release
- xRetval.realloc(0);
+ // get ranges
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation2D(GetObjectContact().getViewInformation2D());
+ const ::basegfx::B2DRange aObjectRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xRetval, rViewInformation2D));
+ const basegfx::B2DRange aViewRange(rViewInformation2D.getViewport());
+
+ // check geometrical visibility
+ if(!aViewRange.isEmpty() && !aViewRange.overlaps(aObjectRange))
+ {
+ // not visible, release
+ xRetval.realloc(0);
+ }
}
- }
- if(bDoGhostedDisplaying)
+ if(bDoGhostedDisplaying)
+ {
+ rDisplayInfo.SetGhostedDrawMode();
+ }
+ }
+ else
{
- rDisplayInfo.SetGhostedDrawMode();
+ // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence
+ // which creates the replacement primitives for an empty group
+ xRetval = ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo);
}
-
- return xRetval;
- }
- else
- {
- // draw replacement object for group. This will use ViewContactOfGroup::createViewIndependentPrimitive2DSequence
- // which creates the replacement primitives for an empty group
- return ViewObjectContactOfSdrObj::getPrimitive2DSequenceHierarchy(rDisplayInfo);
}
+ return xRetval;
}
} // end of namespace contact
} // end of namespace sdr
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
index 8447fe639a28..485afe35f9c1 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrobj.cxx
@@ -68,10 +68,17 @@ namespace sdr
return false;
}
- // Test if print output but not printable
- if(GetObjectContact().isOutputToPrinter() && !rObject.IsPrintable())
+ if(GetObjectContact().isOutputToPrinter() )
{
- return false;
+ // Test if print output but not printable
+ if( !rObject.IsPrintable())
+ return false;
+ }
+ else
+ {
+ // test is object is not visible on screen
+ if( !rObject.IsVisible() )
+ return false;
}
// Test for hidden object on MasterPage
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 40b9aa5153ec..1da80b6c245e 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1314,12 +1314,12 @@ namespace sdr { namespace contact {
{
// the layer of our object
SdrLayerID nObjectLayer = _rUnoObject.GetLayer();
- // is the layer we're residing in visible in this view?
- bool bIsObjectLayerVisible = _rPageView.isLayerVisible( nObjectLayer );
+ // is the object we're residing in visible in this view?
+ bool bIsObjectVisible = _rUnoObject.IsVisible() && _rPageView.isLayerVisible( nObjectLayer );
- if ( _bForce || ( bIsObjectLayerVisible != _bIsCurrentlyVisible ) )
+ if ( _bForce || ( bIsObjectVisible != _bIsCurrentlyVisible ) )
{
- _rControl.setVisible( bIsObjectLayerVisible );
+ _rControl.setVisible( bIsObjectVisible );
}
}
}
@@ -1870,7 +1870,8 @@ namespace sdr { namespace contact {
if(pSdrPageView)
{
- const bool bIsLayerVisible(pSdrPageView->GetVisibleLayers().IsSet(getSdrObject().GetLayer()));
+ const SdrObject& rObject = getSdrObject();
+ const bool bIsLayerVisible( rObject.IsVisible() && pSdrPageView->GetVisibleLayers().IsSet(rObject.GetLayer()));
if(rControl.isVisible() != bIsLayerVisible)
{
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index ac9b6307dd05..2ceea2c69b7d 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -51,13 +51,11 @@ namespace drawinglayer
if(!getSdrLFSTAttribute().getFill().isDefault()
&& getUnitPolyPolygon().isClosed())
{
- // take care for orientations
- const basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon(
- basegfx::tools::correctOrientations(getUnitPolyPolygon()));
-
+ // #i108255# no need to use correctOrientations here; target is
+ // straight visualisation
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval,
createPolyPolygonFillPrimitive(
- aOrientedUnitPolyPolygon,
+ getUnitPolyPolygon(),
getTransform(),
getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
diff --git a/svx/source/svdraw/sdrhittesthelper.cxx b/svx/source/svdraw/sdrhittesthelper.cxx
index 473c09b10f5d..58eef58a9fd6 100644
--- a/svx/source/svdraw/sdrhittesthelper.cxx
+++ b/svx/source/svdraw/sdrhittesthelper.cxx
@@ -60,7 +60,7 @@ SdrObject* SdrObjectPrimitiveHit(
}
else
{
- if(!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer()))
+ if( rObject.IsVisible() && (!pVisiLayer || pVisiLayer->IsSet(rObject.GetLayer())))
{
// single object, 3d object, empty scene or empty group. Check if
// it's a single 3D object
diff --git a/svx/source/svdraw/sdrmasterpagedescriptor.cxx b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
index 6bcdd8f55856..67b2de8b693c 100644
--- a/svx/source/svdraw/sdrmasterpagedescriptor.cxx
+++ b/svx/source/svdraw/sdrmasterpagedescriptor.cxx
@@ -113,18 +113,6 @@ namespace sdr
|| &maUsedPage != &rCandidate.maUsedPage
|| maVisibleLayers != rCandidate.maVisibleLayers);
}
-
- const SfxItemSet& MasterPageDescriptor::getCorrectFillAttributes() const
- {
- const SfxItemSet& rOwnerPageAtributes = GetOwnerPage().getSdrPageProperties().GetItemSet();
-
- if(XFILL_NONE != ((const XFillStyleItem&)rOwnerPageAtributes.Get(XATTR_FILLSTYLE)).GetValue())
- {
- return rOwnerPageAtributes;
- }
-
- return GetUsedPage().getSdrPageProperties().GetItemSet();
- }
} // end of namespace sdr
//////////////////////////////////////////////////////////////////////////////
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index d831906fa94c..3a3935f819f8 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -189,6 +189,7 @@ SdrItemPool::SdrItemPool(
mppLocalPoolDefaults[SDRATTR_OBJMOVEPROTECT -SDRATTR_START]=new SdrObjMoveProtectItem;
mppLocalPoolDefaults[SDRATTR_OBJSIZEPROTECT -SDRATTR_START]=new SdrObjSizeProtectItem;
mppLocalPoolDefaults[SDRATTR_OBJPRINTABLE -SDRATTR_START]=new SdrObjPrintableItem;
+ mppLocalPoolDefaults[SDRATTR_OBJVISIBLE -SDRATTR_START]=new SdrObjVisibleItem;
mppLocalPoolDefaults[SDRATTR_LAYERID -SDRATTR_START]=new SdrLayerIdItem;
mppLocalPoolDefaults[SDRATTR_LAYERNAME -SDRATTR_START]=new SdrLayerNameItem;
mppLocalPoolDefaults[SDRATTR_OBJECTNAME -SDRATTR_START]=new SdrObjectNameItem;
@@ -546,6 +547,7 @@ void SdrItemPool::TakeItemName(sal_uInt16 nWhich, String& rItemName)
case SDRATTR_OBJMOVEPROTECT : nResId = SIP_SA_OBJMOVEPROTECT;break;
case SDRATTR_OBJSIZEPROTECT : nResId = SIP_SA_OBJSIZEPROTECT;break;
case SDRATTR_OBJPRINTABLE : nResId = SIP_SA_OBJPRINTABLE;break;
+ case SDRATTR_OBJVISIBLE : nResId = SIP_SA_OBJVISIBLE;break;
case SDRATTR_LAYERID : nResId = SIP_SA_LAYERID;break;
case SDRATTR_LAYERNAME : nResId = SIP_SA_LAYERNAME;break;
case SDRATTR_OBJECTNAME : nResId = SIP_SA_OBJECTNAME;break;
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 3b878ce93138..5eae04dbbc87 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -805,6 +805,12 @@ void SdrEditView::DeleteMarkedList(const SdrMarkList& rMark)
void SdrEditView::DeleteMarkedObj()
{
+ // #i110981# return when nothing is to be done at all
+ if(!GetMarkedObjectCount())
+ {
+ return;
+ }
+
// moved breaking action and undo start outside loop
BrkAction();
BegUndo(ImpGetResStr(STR_EditDelete),GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_DELETE);
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 48870cda0e02..1ac6d0b89945 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -760,6 +760,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
BOOL bMovProtect=FALSE,bMovProtectDC=FALSE;
BOOL bSizProtect=FALSE,bSizProtectDC=FALSE;
BOOL bPrintable =TRUE ,bPrintableDC=FALSE;
+ BOOL bVisible = TRUE, bVisibleDC=FALSE;
SdrLayerID nLayerId=0; BOOL bLayerDC=FALSE;
XubString aObjName; BOOL bObjNameDC=FALSE,bObjNameSet=FALSE;
long nSnapPosX=0; BOOL bSnapPosXDC=FALSE;
@@ -781,6 +782,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
bMovProtect=pObj->IsMoveProtect();
bSizProtect=pObj->IsResizeProtect();
bPrintable =pObj->IsPrintable();
+ bVisible = pObj->IsVisible();
Rectangle aSnapRect2(pObj->GetSnapRect());
Rectangle aLogicRect2(pObj->GetLogicRect());
nSnapPosX=aSnapRect2.Left();
@@ -798,6 +800,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
if (!bMovProtectDC && bMovProtect!=pObj->IsMoveProtect()) bMovProtectDC=TRUE;
if (!bSizProtectDC && bSizProtect!=pObj->IsResizeProtect()) bSizProtectDC=TRUE;
if (!bPrintableDC && bPrintable !=pObj->IsPrintable()) bPrintableDC=TRUE;
+ if (!bVisibleDC && bVisible !=pObj->IsVisible()) bVisibleDC=TRUE;
if (!bRotAngleDC && nRotAngle !=pObj->GetRotateAngle()) bRotAngleDC=TRUE;
if (!bShrAngleDC && nShrAngle !=pObj->GetShearAngle()) bShrAngleDC=TRUE;
if (!bSnapWdtDC || !bSnapHgtDC || !bSnapPosXDC || !bSnapPosYDC || !bLogicWdtDiff || !bLogicHgtDiff) {
@@ -837,6 +840,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr, BOOL /*bOnlyH
rAttr.Put(SdrRotateOneItem());
rAttr.Put(SdrHorzShearOneItem());
rAttr.Put(SdrVertShearOneItem());
+
if (nMarkAnz>1) {
rAttr.Put(SdrResizeXAllItem());
rAttr.Put(SdrResizeYAllItem());
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index e31ea11be7d6..8cf83c0429cc 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1090,7 +1090,16 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
if(!bFirstObjectComplete)
{
- aMergePolyPolygonA = aTmpPoly;
+ // #i111987# Also need to collect ORed source shape when more than
+ // a single polygon is involved
+ if(aMergePolyPolygonA.count())
+ {
+ aMergePolyPolygonA = basegfx::tools::solvePolygonOperationOr(aMergePolyPolygonA, aTmpPoly);
+ }
+ else
+ {
+ aMergePolyPolygonA = aTmpPoly;
+ }
}
else
{
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 445fe60c0670..34a77fcd9e62 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -85,6 +85,11 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
bLastObjWasPolyWithoutLine(FALSE),bNoLine(FALSE),bNoFill(FALSE),bLastObjWasLine(FALSE)
{
aVD.EnableOutput(FALSE);
+
+ // #i111954# init to no fill and no line initially
+ aVD.SetLineColor();
+ aVD.SetFillColor();
+
aOldLineColor.SetRed( aVD.GetLineColor().GetRed() + 1 ); // invalidate old line color
pLineAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_LINE_FIRST,XATTR_LINE_LAST);
pFillAttr=new SfxItemSet(rModel.GetItemPool(),XATTR_FILL_FIRST,XATTR_FILL_LAST);
@@ -380,17 +385,61 @@ void ImpSdrGDIMetaFileImport::InsertObj( SdrObject* pObj, sal_Bool bScale )
pObj->NbcMove( Size( aOfs.X(), aOfs.Y() ) );
}
- aTmpList.InsertObject( pObj );
- if ( HAS_BASE( SdrPathObj, pObj ) )
+ // #i111954# check object for visibility
+ // used are SdrPathObj, SdrRectObj, SdrCircObj, SdrGrafObj
+ bool bVisible(false);
+
+ if(pObj->HasLineStyle())
+ {
+ bVisible = true;
+ }
+
+ if(!bVisible && pObj->HasFillStyle())
+ {
+ bVisible = true;
+ }
+
+ if(!bVisible)
+ {
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >(pObj);
+
+ if(pTextObj && pTextObj->HasText())
+ {
+ bVisible = true;
+ }
+ }
+
+ if(!bVisible)
{
- FASTBOOL bClosed=pObj->IsClosedObj();
- bLastObjWasPolyWithoutLine=bNoLine && bClosed;
- bLastObjWasLine=!bClosed;
+ SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >(pObj);
+
+ if(pGrafObj)
+ {
+ // this may be refined to check if the graphic really is visible. It
+ // is here to ensure that graphic objects without fill, line and text
+ // get created
+ bVisible = true;
+ }
+ }
+
+ if(!bVisible)
+ {
+ SdrObject::Free(pObj);
}
else
{
- bLastObjWasPolyWithoutLine = FALSE;
- bLastObjWasLine = FALSE;
+ aTmpList.InsertObject( pObj );
+ if ( HAS_BASE( SdrPathObj, pObj ) )
+ {
+ FASTBOOL bClosed=pObj->IsClosedObj();
+ bLastObjWasPolyWithoutLine=bNoLine && bClosed;
+ bLastObjWasLine=!bClosed;
+ }
+ else
+ {
+ bLastObjWasPolyWithoutLine = FALSE;
+ bLastObjWasLine = FALSE;
+ }
}
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index a15cf8c8b2ac..fffcac00e46c 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1226,6 +1226,10 @@ void SdrMarkView::CheckMarked()
}
bRaus=bRaus || pPV->GetLockedLayers().IsSet(nLay) || // Layer gesperrt?
!pPV->GetVisibleLayers().IsSet(nLay); // Layer nicht sichtbar?
+
+ if( !bRaus )
+ bRaus = !pObj->IsVisible(); // not visible objects can not be marked
+
if (!bRaus) {
// Joe am 9.3.1997: Gruppierte Objekten koennen nun auch
// markiert werden. Nach EnterGroup muessen aber die Objekte
@@ -1629,7 +1633,7 @@ void SdrMarkView::SetMarkHdlSizePixel(USHORT nSiz)
#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage wird gerade durchsucht */
SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, USHORT nTol, SdrObject* pObj, SdrPageView* pPV, ULONG nOptions, const SetOfByte* pMVisLay) const
{
- if((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster())
+ if(((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
{
return NULL;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index b594b0404706..b9d3e24592ee 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -235,6 +235,7 @@ SdrObjGeoData::SdrObjGeoData():
bSizProt(FALSE),
bNoPrint(FALSE),
bClosedObj(FALSE),
+ mbVisible(true),
mnLayerID(0)
{
DBG_CTOR(SdrObjGeoData,NULL);
@@ -414,6 +415,7 @@ SdrObject::SdrObject()
bEmptyPresObj =FALSE;
bNotVisibleAsMaster=FALSE;
bClosedObj =FALSE;
+ mbVisible = true;
// #i25616#
mbLineIsOutsideGeometry = sal_False;
@@ -1049,6 +1051,7 @@ void SdrObject::operator=(const SdrObject& rObj)
bSizProt=rObj.bSizProt;
bMovProt=rObj.bMovProt;
bNoPrint=rObj.bNoPrint;
+ mbVisible=rObj.mbVisible;
bMarkProt=rObj.bMarkProt;
//EmptyPresObj wird nicht kopiert: nun doch! (25-07-1995, Joe)
bEmptyPresObj =rObj.bEmptyPresObj;
@@ -1920,6 +1923,7 @@ void SdrObject::SaveGeoData(SdrObjGeoData& rGeo) const
rGeo.bMovProt =bMovProt ;
rGeo.bSizProt =bSizProt ;
rGeo.bNoPrint =bNoPrint ;
+ rGeo.mbVisible =mbVisible ;
rGeo.bClosedObj =bClosedObj ;
rGeo.mnLayerID = mnLayerID;
@@ -1946,6 +1950,7 @@ void SdrObject::RestGeoData(const SdrObjGeoData& rGeo)
bMovProt =rGeo.bMovProt ;
bSizProt =rGeo.bSizProt ;
bNoPrint =rGeo.bNoPrint ;
+ mbVisible =rGeo.mbVisible ;
bClosedObj =rGeo.bClosedObj ;
mnLayerID = rGeo.mnLayerID;
@@ -2153,6 +2158,11 @@ void SdrObject::NbcApplyNotPersistAttr(const SfxItemSet& rAttr)
SetPrintable(b);
}
+ if (rAttr.GetItemState(SDRATTR_OBJVISIBLE,TRUE,&pPoolItem)==SFX_ITEM_SET) {
+ bool b=((const SdrObjVisibleItem*)pPoolItem)->GetValue();
+ SetVisible(b);
+ }
+
SdrLayerID nLayer=SDRLAYER_NOTFOUND;
if (rAttr.GetItemState(SDRATTR_LAYERID,TRUE,&pPoolItem)==SFX_ITEM_SET) {
nLayer=((const SdrLayerIdItem*)pPoolItem)->GetValue();
@@ -2214,6 +2224,7 @@ void SdrObject::TakeNotPersistAttr(SfxItemSet& rAttr, FASTBOOL bMerge) const
lcl_SetItem(rAttr,bMerge,SdrObjMoveProtectItem(IsMoveProtect()));
lcl_SetItem(rAttr,bMerge,SdrObjSizeProtectItem(IsResizeProtect()));
lcl_SetItem(rAttr,bMerge,SdrObjPrintableItem(IsPrintable()));
+ lcl_SetItem(rAttr,bMerge,SdrObjVisibleItem(IsVisible()));
lcl_SetItem(rAttr,bMerge,SdrRotateAngleItem(GetRotateAngle()));
lcl_SetItem(rAttr,bMerge,SdrShearAngleItem(GetShearAngle()));
lcl_SetItem(rAttr,bMerge,SdrOneSizeWidthItem(rSnap.GetWidth()-1));
@@ -2692,11 +2703,29 @@ void SdrObject::SetResizeProtect(sal_Bool bProt)
void SdrObject::SetPrintable(sal_Bool bPrn)
{
- bNoPrint=!bPrn;
- SetChanged();
- if (IsInserted() && pModel!=NULL) {
- SdrHint aHint(*this);
- pModel->Broadcast(aHint);
+ if( bPrn == bNoPrint )
+ {
+ bNoPrint=!bPrn;
+ SetChanged();
+ if (IsInserted() && pModel!=NULL)
+ {
+ SdrHint aHint(*this);
+ pModel->Broadcast(aHint);
+ }
+ }
+}
+
+void SdrObject::SetVisible(sal_Bool bVisible)
+{
+ if( bVisible != mbVisible )
+ {
+ mbVisible = bVisible;
+ SetChanged();
+ if (IsInserted() && pModel!=NULL)
+ {
+ SdrHint aHint(*this);
+ pModel->Broadcast(aHint);
+ }
}
}
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 12cdeac9ef85..4c600cba821f 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -239,8 +239,9 @@ basegfx::B2DPolygon SdrCircObj::ImpCalcXPolyCirc(const SdrObjKind eCicrleKind, c
else
{
// mirror start, end for geometry creation since model coordinate system is mirrored in Y
- const double fStart(((36000 - nEnd) % 36000) * F_PI18000);
- const double fEnd(((36000 - nStart) % 36000) * F_PI18000);
+ // #i111715# increase numerical correctness by first dividing and not using F_PI1800
+ const double fStart((((36000 - nEnd) % 36000) / 18000.0) * F_PI);
+ const double fEnd((((36000 - nStart) % 36000) / 18000.0) * F_PI);
// create circle segment. This is not closed by default
aCircPolygon = basegfx::tools::createPolygonFromEllipseSegment(
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index dc76855f05cc..3d254aeb39c4 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1674,6 +1674,11 @@ void SdrEdgeObj::SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly )
*pEdgeTrack = XPolygon( rPoly.getB2DPolygon( 0 ) );
bEdgeTrackDirty = sal_False;
bEdgeTrackUserDefined = sal_True;
+
+ // #i110629# also set aRect and maSnapeRect dependent from pEdgeTrack
+ const Rectangle aPolygonBounds(pEdgeTrack->GetBoundRect());
+ aRect = aPolygonBounds;
+ maSnapRect = aPolygonBounds;
}
}
@@ -2100,7 +2105,7 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV,
// Problem: Gruppenobjekt mit verschiedenen Layern liefert LayerID 0 !!!!
no--;
SdrObject* pObj=pOL->GetObj(no);
- if (rVisLayer.IsSet(pObj->GetLayer()) && // nur sichtbare Objekte
+ if (rVisLayer.IsSet(pObj->GetLayer()) && pObj->IsVisible() && // only visible objects
(pThis==NULL || pObj!=(SdrObject*)pThis) && // nicht an mich selbst connecten
pObj->IsNode())
{
@@ -2206,17 +2211,31 @@ FASTBOOL SdrEdgeObj::ImpFindConnector(const Point& rPt, const SdrPageView& rPV,
void SdrEdgeObj::NbcSetSnapRect(const Rectangle& rRect)
{
- Rectangle aOld(GetSnapRect());
- long nMulX = rRect.Right() - rRect.Left();
- long nDivX = aOld.Right() - aOld.Left();
- long nMulY = rRect.Bottom() - rRect.Top();
- long nDivY = aOld.Bottom() - aOld.Top();
- if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
- if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
- Fraction aX(nMulX, nDivX);
- Fraction aY(nMulY, nDivY);
- NbcResize(aOld.TopLeft(), aX, aY);
- NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+ const Rectangle aOld(GetSnapRect());
+
+ if(aOld != rRect)
+ {
+ if(aRect.IsEmpty() && 0 == pEdgeTrack->GetPointCount())
+ {
+ // #i110629# When initializing, do not scale on empty Rectangle; this
+ // will mirror the underlying text object (!)
+ aRect = rRect;
+ maSnapRect = rRect;
+ }
+ else
+ {
+ long nMulX = rRect.Right() - rRect.Left();
+ long nDivX = aOld.Right() - aOld.Left();
+ long nMulY = rRect.Bottom() - rRect.Top();
+ long nDivY = aOld.Bottom() - aOld.Top();
+ if ( nDivX == 0 ) { nMulX = 1; nDivX = 1; }
+ if ( nDivY == 0 ) { nMulY = 1; nDivY = 1; }
+ Fraction aX(nMulX, nDivX);
+ Fraction aY(nMulY, nDivY);
+ NbcResize(aOld.TopLeft(), aX, aY);
+ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+ }
+ }
}
void SdrEdgeObj::NbcMove(const Size& rSiz)
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index f6780bd7c90d..031e8e9dd45b 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -107,15 +107,13 @@ namespace
maLocale(rInfo.mpLocale ? *rInfo.mpLocale : ::com::sun::star::lang::Locale()),
mbRTL(rInfo.mrFont.IsVertical() ? false : rInfo.IsRTL())
{
- if(mnTextLength)
+ if(mnTextLength && rInfo.mpDXArray)
{
maDblDXArray.reserve(mnTextLength);
- const sal_Int32 nFontWidth(0L == maFont.GetWidth() ? maFont.GetHeight() : maFont.GetWidth());
- const double fScaleFactor(0L != nFontWidth ? 1.0 / (double)nFontWidth : 1.0);
for(xub_StrLen a(0); a < mnTextLength; a++)
{
- maDblDXArray.push_back((double)rInfo.mpDXArray[a] * fScaleFactor);
+ maDblDXArray.push_back((double)rInfo.mpDXArray[a]);
}
}
}
@@ -291,7 +289,8 @@ namespace
const double fPolyLength(basegfx::tools::getLength(aPolygonCandidate));
double fPolyEnd(fPolyLength);
double fPolyStart(0.0);
- double fScaleFactor(1.0);
+ double fAutosizeScaleFactor(1.0);
+ bool bAutosizeScale(false);
if(maSdrFormTextAttribute.getFormTextMirror())
{
@@ -352,7 +351,8 @@ namespace
// if scale, prepare scale factor between curve length and text length
if(0.0 != fParagraphTextLength)
{
- fScaleFactor = (fPolyEnd - fPolyStart) / fParagraphTextLength;
+ fAutosizeScaleFactor = (fPolyEnd - fPolyStart) / fParagraphTextLength;
+ bAutosizeScale = true;
}
}
}
@@ -382,10 +382,10 @@ namespace
// prepare portion length. Takes RTL sections into account.
double fPortionLength(pCandidate->getDisplayLength(nUsedTextLength, nNextGlyphLen));
- if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust())
+ if(bAutosizeScale)
{
- // when scaling, expand portion length
- fPortionLength *= fScaleFactor;
+ // when autosize scaling, expand portion length
+ fPortionLength *= fAutosizeScaleFactor;
}
// create transformation
@@ -397,10 +397,10 @@ namespace
aNewTransformA.scale(aFontScaling.getX(), aFontScaling.getY());
// prepare scaling of text primitive
- if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust())
+ if(bAutosizeScale)
{
- // when scaling, expand text primitive scaling
- aNewTransformA.scale(fScaleFactor, fScaleFactor);
+ // when autosize scaling, expand text primitive scaling to it
+ aNewTransformA.scale(fAutosizeScaleFactor, fAutosizeScaleFactor);
}
// eventually create shadow primitives from aDecomposition and add to rDecomposition
@@ -497,17 +497,42 @@ namespace
aNewTransformB.translate(aPerpendicular.getX(), aPerpendicular.getY());
}
- // shadow primitive creation
- if(bShadow)
+ if(pCandidate->getText().Len() && nNextGlyphLen)
{
- if(pCandidate->getText().Len() && nNextGlyphLen)
+ const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
+ ::std::vector< double > aNewDXArray;
+
+ if(nNextGlyphLen > 1 && pCandidate->getDoubleDXArray().size())
{
+ // copy DXArray for portion
+ aNewDXArray.insert(
+ aNewDXArray.begin(),
+ pCandidate->getDoubleDXArray().begin() + nPortionIndex,
+ pCandidate->getDoubleDXArray().begin() + (nPortionIndex + nNextGlyphLen));
+
+ if(nPortionIndex > 0)
+ {
+ // adapt to portion start
+ double fDXOffset= *(pCandidate->getDoubleDXArray().begin() + (nPortionIndex - 1));
+ ::std::transform(
+ aNewDXArray.begin(), aNewDXArray.end(),
+ aNewDXArray.begin(), ::std::bind2nd(::std::minus<double>(), fDXOffset));
+ }
+
+ if(bAutosizeScale)
+ {
+ // when autosize scaling, adapt to DXArray, too
+ ::std::transform(
+ aNewDXArray.begin(), aNewDXArray.end(),
+ aNewDXArray.begin(), ::std::bind2nd(::std::multiplies<double>(), fAutosizeScaleFactor));
+ }
+ }
+
+ if(bShadow)
+ {
+ // shadow primitive creation
const Color aShadowColor(maSdrFormTextAttribute.getFormTextShdwColor());
const basegfx::BColor aRGBShadowColor(aShadowColor.getBColor());
- const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
- const ::std::vector< double > aNewDXArray(
- pCandidate->getDoubleDXArray().begin() + nPortionIndex,
- pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen);
drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
@@ -522,30 +547,25 @@ namespace
mrShadowDecomposition.push_back(pNew);
}
- }
- // primitive creation
- if(pCandidate->getText().Len() && nNextGlyphLen)
- {
- const Color aColor(pCandidate->getFont().GetColor());
- const basegfx::BColor aRGBColor(aColor.getBColor());
- const xub_StrLen nPortionIndex(pCandidate->getPortionIndex(nUsedTextLength, nNextGlyphLen));
- const ::std::vector< double > aNewDXArray(
- pCandidate->getDoubleDXArray().begin() + nPortionIndex,
- pCandidate->getDoubleDXArray().begin() + nPortionIndex + nNextGlyphLen);
-
- drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
- new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aNewTransformB * aNewTransformA,
- pCandidate->getText(),
- nPortionIndex,
- nNextGlyphLen,
- aNewDXArray,
- aCandidateFontAttribute,
- pCandidate->getLocale(),
- aRGBColor);
-
- mrDecomposition.push_back(pNew);
+ {
+ // primitive creation
+ const Color aColor(pCandidate->getFont().GetColor());
+ const basegfx::BColor aRGBColor(aColor.getBColor());
+
+ drawinglayer::primitive2d::TextSimplePortionPrimitive2D* pNew =
+ new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
+ aNewTransformB * aNewTransformA,
+ pCandidate->getText(),
+ nPortionIndex,
+ nNextGlyphLen,
+ aNewDXArray,
+ aCandidateFontAttribute,
+ pCandidate->getLocale(),
+ aRGBColor);
+
+ mrDecomposition.push_back(pNew);
+ }
}
// consume from portion // no += here, xub_StrLen is USHORT and the compiler will gererate a warning here
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index e4b27766a265..79e74a3382b8 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -125,5 +125,8 @@ XubString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, USHORT nPara,
const SdrTextObj* SdrOutliner::GetTextObj() const
{
- return static_cast< SdrTextObj* >( mpTextObj.get() );
+ if( mpTextObj.is() )
+ return static_cast< SdrTextObj* >( mpTextObj.get() );
+ else
+ return 0;
}
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 6dd816d429da..8da0b248f38b 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1221,18 +1221,6 @@ SdrPageProperties::SdrPageProperties(SdrPage& rSdrPage)
}
}
-SdrPageProperties::SdrPageProperties(const SdrPageProperties& rCandidate)
-: SfxListener(),
- mpSdrPage(rCandidate.mpSdrPage),
- mpStyleSheet(0),
- mpProperties(new SfxItemSet(*rCandidate.mpProperties))
-{
- if(rCandidate.GetStyleSheet())
- {
- ImpAddStyleSheet(*rCandidate.GetStyleSheet());
- }
-}
-
SdrPageProperties::~SdrPageProperties()
{
ImpRemoveStyleSheet();
@@ -1365,6 +1353,8 @@ SdrPage::SdrPage(const SdrPage& rSrcPage)
// Warning: this leads to slicing (see issue 93186) and has to be
// removed as soon as possible.
*this = rSrcPage;
+ OSL_ENSURE(mpSdrPageProperties,
+ "SdrPage::SdrPage: operator= did not create needed SdrPageProperties (!)");
// be careful and correct eListKind, a member of SdrObjList which
// will be changed by the SdrOIbjList::operator= before...
@@ -1382,8 +1372,6 @@ SdrPage::SdrPage(const SdrPage& rSrcPage)
mxUnoPage = NULL;
xComponent->dispose();
}
-
- mpSdrPageProperties = new SdrPageProperties(rSrcPage.getSdrPageProperties());
}
SdrPage::~SdrPage()
@@ -1478,8 +1466,28 @@ void SdrPage::operator=(const SdrPage& rSrcPage)
mbObjectsNotPersistent = rSrcPage.mbObjectsNotPersistent;
{
- delete mpSdrPageProperties;
- mpSdrPageProperties = new SdrPageProperties(rSrcPage.getSdrPageProperties());
+ // #i111122# delete SdrPageProperties when model is different
+ if(mpSdrPageProperties && GetModel() != rSrcPage.GetModel())
+ {
+ delete mpSdrPageProperties;
+ mpSdrPageProperties = 0;
+ }
+
+ if(!mpSdrPageProperties)
+ {
+ mpSdrPageProperties = new SdrPageProperties(*this);
+ }
+ else
+ {
+ mpSdrPageProperties->ClearItem(0);
+ }
+
+ if(!IsMasterPage())
+ {
+ mpSdrPageProperties->PutItemSet(rSrcPage.getSdrPageProperties().GetItemSet());
+ }
+
+ mpSdrPageProperties->SetStyleSheet(rSrcPage.getSdrPageProperties().GetStyleSheet());
}
// Now copy the contained obejcts (by cloning them)
@@ -1659,7 +1667,17 @@ void SdrPage::SetModel(SdrModel* pNewModel)
}
pLayerAdmin->SetModel(pNewModel);
- SdrPageProperties *pNew = new SdrPageProperties(getSdrPageProperties());
+ // create new SdrPageProperties with new model (due to SfxItemSet there)
+ // and copy ItemSet and StyleSheet
+ SdrPageProperties *pNew = new SdrPageProperties(*this);
+
+ if(!IsMasterPage())
+ {
+ pNew->PutItemSet(getSdrPageProperties().GetItemSet());
+ }
+
+ pNew->SetStyleSheet(getSdrPageProperties().GetStyleSheet());
+
delete mpSdrPageProperties;
mpSdrPageProperties = pNew;
}
diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx
index 6239708394bd..bad1401c2305 100644
--- a/svx/source/svdraw/svdpagv.cxx
+++ b/svx/source/svdraw/svdpagv.cxx
@@ -754,6 +754,12 @@ sal_Bool SdrPageView::IsObjMarkable(SdrObject* pObj) const
return sal_False;
}
+ // only visible are markable
+ if( !pObj->IsVisible() )
+ {
+ return sal_False;
+ }
+
// #112440#
if(pObj->ISA(SdrObjGroup))
{
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index ee6cbaea9632..1317a0e1328d 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -2395,6 +2395,11 @@ String SIP_SA_OBJPRINTABLE
Text [ en-US ] = "Object, printable";
};
+String SIP_SA_OBJVISIBLE
+{
+ Text [ en-US ] = "Object, visible";
+};
+
String SIP_SA_LAYERID
{
Text [ en-US ] = "Level ID";
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 13b8e758ce12..d860f4973fd2 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2771,6 +2771,16 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper
}
break;
}
+ case SDRATTR_OBJVISIBLE:
+ {
+ sal_Bool bVisible = sal_Bool();
+ if( rValue >>= bVisible )
+ {
+ mpObj->SetVisible(bVisible);
+ return true;
+ }
+ break;
+ }
case SDRATTR_OBJSIZEPROTECT:
{
sal_Bool bResizeProtect = sal_Bool();
@@ -3147,11 +3157,15 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper
}
case SDRATTR_OBJPRINTABLE:
- rValue = uno::makeAny( (sal_Bool) mpObj->IsPrintable() );
+ rValue <<= static_cast<sal_Bool>( mpObj->IsPrintable() );
+ break;
+
+ case SDRATTR_OBJVISIBLE:
+ rValue <<= static_cast<sal_Bool>( mpObj->IsVisible() );
break;
case SDRATTR_OBJSIZEPROTECT:
- rValue = uno::makeAny( (sal_Bool)mpObj->IsResizeProtect() );
+ rValue <<= static_cast<sal_Bool>( mpObj->IsResizeProtect() );
break;
case OWN_ATTR_PAGE_NUMBER:
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index e99c636ccedb..485a9a5733f7 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -234,7 +234,9 @@ class SwPostItMgr: public SfxListener
void Delete(String aAuthor);
void Delete();
+#if 0
void Hide( SwPostItField* pPostItField );
+#endif
void Hide( const String& rAuthor );
void Hide();
void Show();
@@ -274,7 +276,6 @@ class SwPostItMgr: public SfxListener
Color GetColorLight(sal_uInt16 aAuthorIndex);
Color GetColorAnchor(sal_uInt16 aAuthorIndex);
- bool ShowPreview(const SwField* pFld,SwFmtFld*& pFmtFld) const;
void RegisterAnswer(OutlinerParaObject* pAnswer) { mpAnswer = pAnswer;}
OutlinerParaObject* IsAnswer() {return mpAnswer;}
diff --git a/sw/inc/SidebarWin.hxx b/sw/inc/SidebarWin.hxx
index e8e918763b7b..b74931d8d9ef 100644
--- a/sw/inc/SidebarWin.hxx
+++ b/sw/inc/SidebarWin.hxx
@@ -146,6 +146,8 @@ class SwSidebarWin : public Window
void SetFollow( bool bIsFollow) { mbIsFollow = bIsFollow; };
virtual bool CalcFollow() = 0;
+#if 0
+#endif
sal_Int32 GetMetaHeight();
sal_Int32 GetMinimumSizeWithMeta();
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index a361cb61690b..58c5f38a5696 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -165,13 +165,6 @@ public:
}
/**
- Returns the first child of this node.
-
- @return the child
- */
- SwNumberTreeNode* GetFirstChild() const;
-
- /**
Returns number of this node.
@param bValidate validate the number?
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index fe77e94627d7..22cb3613502e 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -748,6 +748,7 @@ public:
BOOL GoStartSentence();
BOOL GoEndSentence();
BOOL SelectWord( const Point* pPt = 0 );
+ BOOL ExpandToSentenceBorders();
// Position vom akt. Cursor erfragen
BOOL IsStartWord( sal_Int16 nWordType = com::sun::star::i18n::WordType::ANYWORD_IGNOREWHITESPACES )const;
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index adead2ed45e4..10befb703b96 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -2131,7 +2131,7 @@ public:
::sfx2::IXmlIdRegistry& GetXmlIdRegistry();
::sw::MetaFieldManager & GetMetaFieldManager();
- SwDoc* CreateCopy() const;
+ SfxObjectShell* CreateCopy(bool bCallInitNew) const;
};
diff --git a/sw/inc/dochdl.hrc b/sw/inc/dochdl.hrc
index ae39f480e6a3..47b0b8014240 100644..100755
--- a/sw/inc/dochdl.hrc
+++ b/sw/inc/dochdl.hrc
@@ -43,10 +43,8 @@
#define STR_PRIVATEOLE (RC_DOCHDL_BEGIN + 10)
#define STR_DDEFORMAT (RC_DOCHDL_BEGIN + 11)
-#define BMP_SW_TEAM_MUGSHOT (RC_DOCHDL_BEGIN + 12)
-#define STR_SW_TEAM_NAMES (RC_DOCHDL_BEGIN + 13)
-#define DOCHDL_ACT_END STR_SW_TEAM_NAMES
+#define DOCHDL_ACT_END STR_DDEFORMAT
#if DOCHDL_ACT_END > RC_DOCHDL_END
#error Resource-Id Ueberlauf in #file, #line
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index f247422c089d..9dc09103606e 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -745,9 +745,14 @@ public:
bool SpellSentence(::svx::SpellPortions& rToFill, bool bIsGrammarCheck );
// make SpellIter start with the current sentence when called next time
void PutSpellingToSentenceStart();
+ // moves the continuation position to the end of the currently checked sentence
+ void MoveContinuationPosToEndOfCheckedSentence();
//applies a changed sentence
- void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck);
+ void ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck);
+
+ // check SwSpellIter data to see if the last sentence got grammar checked
+ bool HasLastSentenceGotGrammarChecked() const;
// Is text conversion active somewhere else?
BOOL HasConvIter() const;
// Is hyphenation active somewhere else?
diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 560cdd143a56..31df018985c6 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -78,7 +78,6 @@ namespace SwPostItHelper
};
SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwPosition& );
- SwLayoutStatus getLayoutInfos( std::vector< SwLayoutInfo >&, SwTxtFld* );
long getLayoutHeight( const SwRootFrm* pRoot );
void setSidebarChanged( SwRootFrm* pRoot, bool bBrowseMode );
unsigned long getPageInfo( SwRect& rPageFrm, const SwRootFrm* , const Point& );
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index d33c745524c1..49a95e9b7c41 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -164,6 +164,7 @@ public:
BOOL GoEndSentence(){return GoSentence(END_SENT);}
BOOL GoPrevSentence(){return GoSentence(PREV_SENT);}
BOOL GoStartSentence(){return GoSentence(START_SENT);}
+ BOOL ExpandToSentenceBorders();
virtual BOOL LeftRight( BOOL bLeft, USHORT nCnt, USHORT nMode,
BOOL bAllowVisual, BOOL bSkipHidden, BOOL bInsertCrsr );
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
index 33d38e42ba55..96479197cde6 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -31,7 +31,7 @@
class SwDoc;
-class SwTableFmt : public SwFrmFmt
+class SW_DLLPUBLIC SwTableFmt : public SwFrmFmt
{
friend class SwDoc;
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 1c78914efbe7..cf92a707e40f 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -392,7 +392,6 @@ public:
*/
virtual SwRewriter GetRewriter() const;
- BOOL CanGrouping( const SwPosition&, sal_Unicode cIns );
DECL_FIXEDMEMPOOL_NEWDEL(SwUndoInsert)
};
@@ -549,7 +548,6 @@ public:
ULONG GetEndNode() const { return nEndNode; }
ULONG GetDestSttNode() const { return nDestSttNode; }
xub_StrLen GetDestSttCntnt() const { return nDestSttCntnt; }
- void AddTblMrgFlyHstry( SwHistory& rHstr );
void SetMoveRedlines( bool b ) { bMoveRedlines = b; }
@@ -1107,14 +1105,6 @@ public:
};
-class SwUndoDelBookmark : public SwUndoBookmark
-{
-public:
- SwUndoDelBookmark( const ::sw::mark::IMark& );
- virtual void Undo( SwUndoIter& );
- virtual void Redo( SwUndoIter& );
-};
-
class SwUndoInsBookmark : public SwUndoBookmark
{
public:
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 78909e69e7ce..6c7011d78bb4 100755..100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -395,9 +395,6 @@ public:
// compatible behaviour of tabs
void SetTabCompat( bool bNew );
- //#i24363# tab stops relative to indent
- void SetTabsRelativeToIndent( bool bNew );
-
// font metric attribute "External Leading" should be considered
void SetAddExtLeading( bool bNew );
diff --git a/sw/inc/viscrs.hxx b/sw/inc/viscrs.hxx
index ee5ef83eb8a2..827671a7f94e 100644
--- a/sw/inc/viscrs.hxx
+++ b/sw/inc/viscrs.hxx
@@ -92,8 +92,6 @@ class SwSelPaintRects : public SwRects
// die Shell
const SwCrsrShell* pCShell;
- void Paint( const SwRect& rRect );
-
virtual void Paint( const Rectangle& rRect );
virtual void FillRects() = 0;
diff --git a/sw/inc/warnpassword.hxx b/sw/inc/warnpassword.hxx
deleted file mode 100644
index 05ee61d7587c..000000000000
--- a/sw/inc/warnpassword.hxx
+++ /dev/null
@@ -1,47 +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 SW_WARNPASSWORD_HXX
-#define SW_WARNPASSWORD_HXX
-
-
-
-class SfxMedium;
-/** Static API helper functions. */
-class SwWarnPassword
-{
-public:
- /** Opens a query warning dialog.
- @descr Pop up Query on export with a choice of yes/no if a
- an encrypted password is imported.
- @return true if yes and false if no. default to true.
- */
- static bool WarningOnPassword( SfxMedium& rMedium );
-};
-
-
-#endif
diff --git a/sw/qa/unoapi/knownissues.xcl b/sw/qa/unoapi/knownissues.xcl
index 4f8e3953dfcf..08e441211cf7 100644
--- a/sw/qa/unoapi/knownissues.xcl
+++ b/sw/qa/unoapi/knownissues.xcl
@@ -21,6 +21,9 @@ sw.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler
### i23422 ###
sw.SwXTextViewCursor::com::sun::star::beans::XMultiPropertyStates
+### i112111 ###
+sw.SwXViewSettings::com::sun::star::beans::XPropertySet
+
### i23623 ###
sw.SwXStyleFamily::com::sun::star::container::XNameReplace
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index 4d5f06ff0b8f..05c30aa97f5b 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -127,19 +127,6 @@ SwNumberTreeNode * SwNumberTreeNode::GetRoot() const
return pResult;
}
-SwNumberTreeNode * SwNumberTreeNode::GetFirstChild() const
-{
- SwNumberTreeNode * pResult = 0;
-
- tSwNumberTreeChildren::iterator aIt = mChildren.begin();
-
- if (aIt != mChildren.end() )
- pResult = *aIt;
-
- return pResult;
-}
-
-
void SwNumberTreeNode::ClearObsoletePhantoms()
{
tSwNumberTreeChildren::iterator aIt = mChildren.begin();
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 705e0026b767..c2a6d011be85 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -259,12 +259,6 @@ sal_Bool SwAccessiblePortionData::IsReadOnlyPortion( size_t nPortionNo ) const
return IsPortionAttrSet(nPortionNo, PORATTR_READONLY);
}
-sal_Bool SwAccessiblePortionData::IsGrayPortion( size_t nPortionNo ) const
-{
- return IsPortionAttrSet(nPortionNo, PORATTR_GRAY);
-}
-
-
sal_Bool SwAccessiblePortionData::IsGrayPortionType( USHORT nType ) const
{
// gray portions?
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 64bd308fbbd6..807070a6573d 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -90,7 +90,6 @@ class SwAccessiblePortionData : public SwPortionHandler
sal_Bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const;
sal_Bool IsSpecialPortion( size_t nPortionNo ) const;
sal_Bool IsReadOnlyPortion( size_t nPortionNo ) const;
- sal_Bool IsGrayPortion( size_t nPortionNo ) const;
sal_Bool IsGrayPortionType( USHORT nType ) const;
// helper method for GetEditableRange(...):
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 9af115269cd8..9cf698a3a709 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3303,19 +3303,6 @@ String SwCrsrShell::GetCrsrDescr() const
return aResult;
}
-SwRect SwCrsrShell::GetRectOfCurrentChar()
-{
- SwCntntFrm* pFrm = pCurCrsr->GetCntntNode()->GetFrm( 0, pCurCrsr->GetPoint(), FALSE );
- SwRect aRet;
- SwCrsrMoveState aTmpState( MV_NONE );
- aTmpState.bRealHeight = TRUE;
- pFrm->GetCharRect( aRet, *pCurCrsr->GetPoint(), &aTmpState );
- //const SwTwips nRealHeight = aTmpState.aRealHeight.Y();
- if (aTmpState.aRealHeight.X() != 0)
- aRet.Top(aRet.Top() + aTmpState.aRealHeight.X());
- return aRet;
-}
-
// SMARTTAGS
void lcl_FillRecognizerData( uno::Sequence< rtl::OUString >& rSmartTagTypes,
diff --git a/sw/source/core/crsr/crstrvl1.cxx b/sw/source/core/crsr/crstrvl1.cxx
index 85ff12b699e6..53790c2ac28f 100644
--- a/sw/source/core/crsr/crstrvl1.cxx
+++ b/sw/source/core/crsr/crstrvl1.cxx
@@ -98,4 +98,8 @@ BOOL SwCrsrShell::SelectWord( const Point* pPt )
return pCurCrsr->SelectWord( pPt );
}
+BOOL SwCrsrShell::ExpandToSentenceBorders()
+{
+ return pCurCrsr->ExpandToSentenceBorders();
+}
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 5b381cbaaad2..7637df0a67b4 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -1401,11 +1401,11 @@ BOOL SwCursor::SelectWordWT( sal_Int16 nWordType, const Point* pPt )
}
//-----------------------------------------------------------------------------
-BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
+
+static String lcl_MaskDeletedRedlines( const SwTxtNode* pTxtNd )
{
- BOOL bRet = FALSE;
- const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
- if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ String aRes;
+ if (pTxtNd)
{
//mask deleted redlines
String sNodeText(pTxtNd->GetTxt());
@@ -1430,11 +1430,30 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
}
}
}
+ aRes = sNodeText;
+ }
+ return aRes;
+}
+
+BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
+{
+ BOOL bRet = FALSE;
+ const SwTxtNode* pTxtNd = GetNode()->GetTxtNode();
+ if( pTxtNd && pBreakIt->GetBreakIter().is() )
+ {
+ String sNodeText( lcl_MaskDeletedRedlines( pTxtNd ) );
+
SwCrsrSaveState aSave( *this );
xub_StrLen nPtPos = GetPoint()->nContent.GetIndex();
switch ( eMoveType )
{
- case END_SENT:
+ case START_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
+ nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ sNodeText,
+ nPtPos, pBreakIt->GetLocale(
+ pTxtNd->GetLang( nPtPos ) ));
+ break;
+ case END_SENT: /* when modifying: see also ExpandToSentenceBorders below! */
nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
sNodeText,
nPtPos, pBreakIt->GetLocale(
@@ -1451,12 +1470,6 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
;
break;
}
- case START_SENT:
- nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
- sNodeText,
- nPtPos, pBreakIt->GetLocale(
- pTxtNd->GetLang( nPtPos ) ));
- break;
case PREV_SENT:
nPtPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
sNodeText,
@@ -1484,6 +1497,51 @@ BOOL SwCursor::GoSentence( SentenceMoveType eMoveType )
return bRet;
}
+
+BOOL SwCursor::ExpandToSentenceBorders()
+{
+ BOOL bRes = FALSE;
+ const SwTxtNode* pStartNd = Start()->nNode.GetNode().GetTxtNode();
+ const SwTxtNode* pEndNd = End()->nNode.GetNode().GetTxtNode();
+ if (pStartNd && pEndNd && pBreakIt->GetBreakIter().is())
+ {
+ if (!HasMark())
+ SetMark();
+
+ String sStartText( lcl_MaskDeletedRedlines( pStartNd ) );
+ String sEndText( pStartNd == pEndNd? sStartText : lcl_MaskDeletedRedlines( pEndNd ) );
+
+ SwCrsrSaveState aSave( *this );
+ xub_StrLen nStartPos = Start()->nContent.GetIndex();
+ xub_StrLen nEndPos = End()->nContent.GetIndex();
+
+ nStartPos = (xub_StrLen)pBreakIt->GetBreakIter()->beginOfSentence(
+ sStartText, nStartPos,
+ pBreakIt->GetLocale( pStartNd->GetLang( nStartPos ) ) );
+ nEndPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfSentence(
+ sEndText, nEndPos,
+ pBreakIt->GetLocale( pEndNd->GetLang( nEndPos ) ) );
+
+ // it is allowed to place the PaM just behind the last
+ // character in the text thus <= ...Len
+ bool bChanged = false;
+ if (nStartPos <= pStartNd->GetTxt().Len())
+ {
+ GetMark()->nContent = nStartPos;
+ bChanged = true;
+ }
+ if (nEndPos <= pEndNd->GetTxt().Len())
+ {
+ GetPoint()->nContent = nEndPos;
+ bChanged = true;
+ }
+ if (bChanged && !IsSelOvr())
+ bRes = TRUE;
+ }
+ return bRes;
+}
+
+
BOOL SwTableCursor::LeftRight( BOOL bLeft, USHORT nCnt, USHORT /*nMode*/,
BOOL /*bVisualAllowed*/, BOOL /*bSkipHidden*/, BOOL /*bInsertCrsr*/ )
{
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 16bf730b33a7..214700c5e680 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -666,16 +666,6 @@ void SwSelPaintRects::Paint( const Rectangle& /*rRect*/ )
// nothing to do with overlays
}
-/*
- * Rectangle ist in Dokument-Koordianten !!
- * pWin != 0 -> auch wirklich malen
- * == 0 -> nur testen, ob es gemalt werden kann
- */
-
-void SwSelPaintRects::Paint( const SwRect& /*rRect*/ )
-{
- // nothing to do with overlays
-}
// check current MapMode of the shell and set possibly the static members.
// Optional set the parameters pX, pY
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index fe4044dd58ac..1b3d5fe6eb55 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1084,14 +1084,10 @@ void SwDoc::InitTOXTypes()
/*-- 08.05.2009 10:07:57---------------------------------------------------
-----------------------------------------------------------------------*/
-SwDoc* SwDoc::CreateCopy() const
+SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const
{
SwDoc* pRet = new SwDoc;
//copy settings
-/*
- //aNodes( this ),
- //aUndoNodes( this ),
- mpAttrPool(new SwAttrPool(this)),*/
USHORT __FAR_DATA aRangeOfDefaults[] = {
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
RES_CHRATR_BEGIN, RES_CHRATR_END-1,
@@ -1120,143 +1116,8 @@ SwDoc* SwDoc::CreateCopy() const
if( aNewDefaults.Count() )
pRet->SetDefault( aNewDefaults );
- /*
- pDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ),
- pEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, pDfltFrmFmt ) ),
- pColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, pDfltFrmFmt ) ),
- pDfltCharFmt( new SwCharFmt( GetAttrPool(), sCharFmtStr, 0 ) ),
- pDfltTxtFmtColl( new SwTxtFmtColl( GetAttrPool(), sTxtCollStr ) ),
- pDfltGrfFmtColl( new SwGrfFmtColl( GetAttrPool(), sGrfCollStr ) ),
- pFrmFmtTbl( new SwFrmFmts() ),
- pCharFmtTbl( new SwCharFmts() ),
- pSpzFrmFmtTbl( new SwSpzFrmFmts() ),
- pSectionFmtTbl( new SwSectionFmts() ),
- pTblFrmFmtTbl( new SwFrmFmts() ),
- pTxtFmtCollTbl( new SwTxtFmtColls() ),
- pGrfFmtCollTbl( new SwGrfFmtColls() ),
- pBookmarkTbl( new SwBookmarks( 0, 16 ) ),
- pTOXTypes( new SwTOXTypes() ),
- pDefTOXBases( new SwDefTOXBase_Impl() ),
- pLayout( 0 ), // Rootframe des spezifischen Layouts.
- pDrawModel( 0 ),
- pUndos( new SwUndos( 0, 20 ) ),
- pUpdtFlds( new SwDocUpdtFld() ),
- pFldTypes( new SwFldTypes() ),
- pVirDev( 0 ),
- pPrt( 0 ),
- pPrtData( 0 ),
- pGlossaryDoc( 0 ),
- pOutlineRule( 0 ),
- pFtnInfo( new SwFtnInfo ),
- pEndNoteInfo( new SwEndNoteInfo ),
- pLineNumberInfo( new SwLineNumberInfo ),
- pFtnIdxs( new SwFtnIdxs ),
- pDocStat( new SwDocStat ),
- pDocShell( 0 ),
- pDocShRef( 0 ),
- pLinkMgr( new sfx2::LinkManager( 0 ) ),
- pACEWord( 0 ),
- pURLStateChgd( 0 ),
- pNumberFormatter( 0 ),
- pNumRuleTbl( new SwNumRuleTbl ),
- // --> OD 2008-03-26 #refactorlists#
- maLists(),
- maListStyleLists(),
- // <--
- pRedlineTbl( new SwRedlineTbl ),
- pAutoFmtRedlnComment( 0 ),
- pUnoCrsrTbl( new SwUnoCrsrTbl( 0, 16 ) ),
- pPgPViewPrtData( 0 ),
- pExtInputRing( 0 ),
- pLayouter( 0 ),
- // --> OD 2008-03-07 #refactorlists#
- pStyleAccess( 0 ),
- // <--
- pLayoutCache( 0 ),
- pUnoCallBack(new SwUnoCallBack(0)),
- mpGrammarContact( 0 ),
- aChartDataProviderImplRef(),
- pChartControllerHelper( 0 ),
- // --> OD 2007-10-31 #i83479#
- mpListItemsList( new tImplSortedNodeNumList() ),
- // <--
- nUndoPos( 0 ),
- nUndoSavePos( 0 ),
- nUndoCnt( 0 ),
- nUndoSttEnd( 0 ),
- nAutoFmtRedlnCommentNo( 0 ),
- nLinkUpdMode( GLOBALSETTING ),
- eFldUpdMode( AUTOUPD_GLOBALSETTING ),
- eRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)),
- eChrCmprType( CHARCOMPRESS_NONE ),
- mReferenceCount(0),
- mIdleBlockCount(0),
- nLockExpFld( 0 ),
- mbReadlineChecked(false),
- mbWinEncryption(sal_False),
- // --> OD 2005-02-11 #i38810#
- mbLinksUpdated( sal_False ),
- mbClipBoard( false ),
- mbColumnSelection( false ),
- // i#78591#
- mbProtectForm(false),*/
pRet->n32DummyCompatabilityOptions1 = n32DummyCompatabilityOptions1;
pRet->n32DummyCompatabilityOptions2 = n32DummyCompatabilityOptions2;
- /*
- mbStartIdleTimer(sal_False)
-{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::SwDoc" );
-
- mbGlossDoc =
- mbModified =
- mbDtor =
- mbUndo =
- mbPageNums =
- mbLoaded =
- mbUpdateExpFld =
- mbNewDoc =
- mbCopyIsMove =
- mbNoDrawUndoObj =
- mbBrowseMode =
- mbInReading =
- mbInXMLImport =
- mbUpdateTOX =
- mbInLoadAsynchron =
- mbHTMLMode =
- mbInCallModified =
- mbIsGlobalDoc =
- mbGlblDocSaveLinks =
- mbIsLabelDoc =
- mbIsAutoFmtRedline =
- mbOLEPrtNotifyPending =
- mbAllOLENotify =
- mbIsRedlineMove =
- mbInsOnlyTxtGlssry =
- mbContains_MSVBasic =
- mbKernAsianPunctuation =
-#ifndef PRODUCT
- mbXMLExport =
-#endif
- // --> OD 2006-03-21 #b6375613#
- mbApplyWorkaroundForB6375613 =
- // <--
- false;
-
- mbGroupUndo =
- mbNewFldLst =
- mbVisibleLinks =
- mbPurgeOLE =
- true;
-
- //
- // COMPATIBILITY FLAGS START
- //
-
- // Note: Any non-hidden compatibility flag should obtain its default
- // by asking SvtCompatibilityOptions, see below.
- //
- const SvtCompatibilityOptions aOptions;
- */
pRet->mbParaSpaceMax = mbParaSpaceMax ;
pRet->mbParaSpaceMaxAtPages = mbParaSpaceMaxAtPages ;
pRet->mbTabCompat = mbTabCompat ;
@@ -1286,92 +1147,16 @@ SwDoc* SwDoc::CreateCopy() const
//
// COMPATIBILITY FLAGS END
//
- /*
- pMacroTable = new SvxMacroTableDtor;
-
- mpGrammarContact = ::createGrammarContact();
-
- // Formate
- pFrmFmtTbl->Insert(pDfltFrmFmt, 0 );
- pCharFmtTbl->Insert(pDfltCharFmt, 0 );
-
- // FmtColls
- // TXT
- pTxtFmtCollTbl->Insert(pDfltTxtFmtColl, 0 );
- // GRF
- pGrfFmtCollTbl->Insert(pDfltGrfFmtColl, 0 );
-
- // PageDesc, EmptyPageFmt und ColumnFmt anlegen
- if ( !aPageDescs.Count() )
- GetPageDescFromPool( RES_POOLPAGE_STANDARD );
-
- //Leere Seite Einstellen.
- pEmptyPageFmt->SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE ) );
- //BodyFmt fuer Spalten Einstellen.
- pColumnContFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ) );
-
- _InitFieldTypes();
-
- // lege (fuer die Filter) eine Default-OutlineNumRule an
- // --> OD 2008-02-11 #newlistlevelattrs#
- pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ),
- // --> OD 2008-06-06 #i89178#
- numfunc::GetDefaultPositionAndSpaceMode(),
- // <--
- OUTLINE_RULE );
- // <--
- // #115901#
- AddNumRule(pOutlineRule);
- // --> OD 2005-10-21 - counting of phantoms depends on <IsOldNumbering()>
- pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) );
- // <--
-
- new SwTxtNode( SwNodeIndex( aUndoNodes.GetEndOfContent() ), pDfltTxtFmtColl );
- new SwTxtNode( SwNodeIndex( aNodes.GetEndOfContent() ),
- GetTxtCollFromPool( RES_POOLCOLL_STANDARD ));
-
- // den eigenen IdleTimer setzen
- aIdleTimer.SetTimeout( 600 );
- aIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) );
-
- aOLEModifiedTimer.SetTimeout( 1000 );
- aOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE ));
-
- // DBMgr anlegen
- pNewDBMgr = new SwNewDBMgr;
-
- // create TOXTypes
- ShellResource* pShellRes = ViewShell::GetShellRes();
-
- SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
- pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName );
- pTOXTypes->Insert( pNew, pTOXTypes->Count() );
-
- {
- SfxItemSet aIgnorableParagraphItems( GetAttrPool(),
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- 0 );
- pStyleAccess = createStyleManager( &aIgnorableParagraphItems );
- }
-
- ResetModified();
-
-*/
- pRet->ReplaceStyles( *(SwDoc*)this );
+ pRet->ReplaceStyles( * const_cast< SwDoc*>( this ));
+ SfxObjectShellRef aDocShellRef = const_cast< SwDocShell* >( GetDocShell() );
+ pRet->SetRefForDocShell( boost::addressof(aDocShellRef) );
+ SfxObjectShellRef xRetShell = new SwDocShell( pRet, SFX_CREATE_MODE_STANDARD );
+ if( bCallInitNew )
+ xRetShell->DoInitNew();
//copy content
pRet->Paste( *this );
- return pRet;
+ pRet->SetRefForDocShell( 0 );
+ return xRetShell;
}
/*-- 08.05.2009 10:52:40---------------------------------------------------
copy document content - code from SwFEShell::Paste( SwDoc* , BOOL )
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index d2c979535dbb..1d387df76063 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -2061,11 +2061,19 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
// falls aEnd-1 auf keinem ContentNode steht, dann suche den vorherigen
aRg.aEnd--;
- while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() &&
- !pAktNode->IsSectionNode() ) ||
- ( pAktNode->IsEndNode() &&
- ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) )
- aRg.aEnd--;
+ // #i107142#: if aEnd is start node of a special section, do nothing.
+ // Otherwise this could lead to crash: going through all previous
+ // special section nodes and then one before the first.
+ if (aRg.aEnd.GetNode().StartOfSectionIndex() != 0)
+ {
+ while( (( pAktNode = (*this)[ aRg.aEnd ])->GetStartNode() &&
+ !pAktNode->IsSectionNode() ) ||
+ ( pAktNode->IsEndNode() &&
+ ND_STARTNODE == pAktNode->pStartOfSection->GetNodeType()) )
+ {
+ aRg.aEnd--;
+ }
+ }
aRg.aEnd++;
// wird im selben Array's verschoben, dann ueberpruefe die Einfuegepos.
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 02dc1de62901..d99293071048 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -136,6 +136,7 @@ class SwSpellIter : public SwLinguIter
SpellContentPositions aLastPositions;
bool bBackToStartOfSentence;
+ bool bMoveToEndOfSentence;
void CreatePortion(uno::Reference< XSpellAlternatives > xAlt,
@@ -147,7 +148,7 @@ class SwSpellIter : public SwLinguIter
const SpellContentPositions& rDeletedRedlines);
public:
SwSpellIter() :
- bBackToStartOfSentence(false) {}
+ bBackToStartOfSentence(false), bMoveToEndOfSentence(false) {}
void Start( SwEditShell *pSh, SwDocPositions eStart, SwDocPositions eEnd );
@@ -157,6 +158,7 @@ public:
void ToSentenceStart();
const ::svx::SpellPortions GetLastPortions(){ return aLastPortions;}
SpellContentPositions GetLastPositions() {return aLastPositions;}
+ void ContinueAfterThisSentence() { bMoveToEndOfSentence = true; }
};
/*************************************************************************
@@ -693,6 +695,24 @@ void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos )
// --------------------- Methoden der SwEditShell ------------------------
+bool SwEditShell::HasLastSentenceGotGrammarChecked() const
+{
+ bool bTextWasGrammarChecked = false;
+ if (pSpellIter)
+ {
+ ::svx::SpellPortions aLastPortions( pSpellIter->GetLastPortions() );
+ for (size_t i = 0; i < aLastPortions.size() && !bTextWasGrammarChecked; ++i)
+ {
+ // bIsGrammarError is also true if the text was only checked but no
+ // grammar error was found. (That is if a ProofreadingResult was obtained in
+ // SwDoc::Spell and in turn bIsGrammarError was set in SwSpellIter::CreatePortion)
+ if (aLastPortions[i].bIsGrammarError)
+ bTextWasGrammarChecked = true;
+ }
+ }
+ return bTextWasGrammarChecked;
+}
+
/*************************************************************************
* SwEditShell::HasConvIter
*************************************************************************/
@@ -1283,7 +1303,20 @@ sal_uInt32 lcl_CountRedlines(
/*-- 18.09.2003 15:08:20---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bIsGrammarCheck)
+
+void SwEditShell::MoveContinuationPosToEndOfCheckedSentence()
+{
+ // give hint that continuation position for spell/grammar checking is
+ // at the end of this sentence
+ if (pSpellIter)
+ {
+ pSpellIter->SetCurr( new SwPosition( *pSpellIter->GetCurrX() ) );
+ pSpellIter->ContinueAfterThisSentence();
+ }
+}
+
+
+void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck)
{
ASSERT( pSpellIter, "SpellIter missing" );
if(pSpellIter)
@@ -1300,9 +1333,14 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
if(!rLastPortions.size())
return;
- SwPaM *pCrsr = GetCrsr();
pDoc->StartUndo( UNDO_OVERWRITE, NULL );
StartAction();
+
+ SwPaM *pCrsr = GetCrsr();
+ // save cursor position (which should be at the end of the current sentence)
+ // for later restoration
+ Push();
+
sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions);
if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size())
{
@@ -1391,16 +1429,24 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions,
//set the cursor to the end of the inserted string
*pCrsr->Start() = *pCrsr->End();
++aCurrentNewPortion;
-
}
}
- //set the cursor to the end of the new sentence
+
+ // restore cursor to the end of the sentence
+ // (will work also if the sentence length has changed,
+ // since cursors get updated automatically!)
+ Pop( FALSE );
+
+ // collapse cursor to the end of the modified sentence
*pCrsr->Start() = *pCrsr->End();
- if( bIsGrammarCheck)
+ if (bRecheck)
{
//in grammar check the current sentence has to be checked again
GoStartSentence();
}
+ // set continuation position for spell/grammar checking to the end of this sentence
+ pSpellIter->SetCurr( new SwPosition( *pCrsr->Start() ) );
+
pDoc->EndUndo( UNDO_OVERWRITE, NULL );
EndAction();
}
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 0c9f8f2980bf..1d76dce43117 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -173,22 +173,6 @@ unsigned long SwPostItHelper::getPageInfo( SwRect& rPageFrm, const SwRootFrm* pR
return nRet;
}
-SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( std::vector< SwLayoutInfo >& rInfo, SwTxtFld* pFld )
-{
- SwLayoutStatus aRet = SwPostItHelper::INVISIBLE;
- if( pFld )
- {
- SwTxtNode* pTNd = pFld->GetpTxtNode();
- if( pTNd )
- {
- SwPosition aPos( *pTNd );
- aPos.nContent.Assign( pTNd, *pFld->GetStart() );
- aRet = getLayoutInfos( rInfo, aPos );
- }
- }
- return aRet;
-}
-
SwPosition SwAnnotationItem::GetAnchorPosition() const
{
SwTxtFld* pFld = pFmtFld->GetTxtFld();
diff --git a/sw/source/core/inc/SwGrammarMarkUp.hxx b/sw/source/core/inc/SwGrammarMarkUp.hxx
index ed3884a767f4..393c917bfc45 100644
--- a/sw/source/core/inc/SwGrammarMarkUp.hxx
+++ b/sw/source/core/inc/SwGrammarMarkUp.hxx
@@ -69,8 +69,6 @@ public:
/* getSentenceEnd returns the first start position of a sentence
which is greater than the given parameter */
xub_StrLen getSentenceEnd( xub_StrLen nPos );
- /* removeSentence removes all start positions in the given range */
- void removeSentence(xub_StrLen nStart, xub_StrLen nLength );
};
#endif
diff --git a/sw/source/core/swg/SwXMLSectionList.cxx b/sw/source/core/swg/SwXMLSectionList.cxx
index 69c77ad77226..a12693b8f72a 100644
--- a/sw/source/core/swg/SwXMLSectionList.cxx
+++ b/sw/source/core/swg/SwXMLSectionList.cxx
@@ -68,18 +68,22 @@ SvXMLImportContext *SwXMLSectionList::CreateContext(
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY ) ||
- nPrefix == XML_NAMESPACE_TEXT &&
- (IsXMLToken ( rLocalName, XML_P ) ||
- IsXMLToken ( rLocalName, XML_H ) ||
- IsXMLToken ( rLocalName, XML_A ) ||
- IsXMLToken ( rLocalName, XML_SPAN ) ||
- IsXMLToken ( rLocalName, XML_SECTION ) ||
- IsXMLToken ( rLocalName, XML_INDEX_BODY ) ||
- IsXMLToken ( rLocalName, XML_INDEX_TITLE )||
- IsXMLToken ( rLocalName, XML_INSERTION ) ||
- IsXMLToken ( rLocalName, XML_DELETION ) ) )
+ if(( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken ( rLocalName, XML_BODY )) ||
+ ( nPrefix == XML_NAMESPACE_TEXT &&
+ (IsXMLToken ( rLocalName, XML_P ) ||
+ IsXMLToken ( rLocalName, XML_H ) ||
+ IsXMLToken ( rLocalName, XML_A ) ||
+ IsXMLToken ( rLocalName, XML_SPAN ) ||
+ IsXMLToken ( rLocalName, XML_SECTION ) ||
+ IsXMLToken ( rLocalName, XML_INDEX_BODY ) ||
+ IsXMLToken ( rLocalName, XML_INDEX_TITLE )||
+ IsXMLToken ( rLocalName, XML_INSERTION ) ||
+ IsXMLToken ( rLocalName, XML_DELETION ) )
+ )
+ )
+ {
pContext = new SvXMLSectionListContext (*this, nPrefix, rLocalName, xAttrList);
+ }
else
pContext = SvXMLImport::CreateContext( nPrefix, rLocalName, xAttrList );
return pContext;
diff --git a/sw/source/core/text/SwGrammarMarkUp.cxx b/sw/source/core/text/SwGrammarMarkUp.cxx
index 535e619e2708..cddf4519fd50 100644
--- a/sw/source/core/text/SwGrammarMarkUp.cxx
+++ b/sw/source/core/text/SwGrammarMarkUp.cxx
@@ -136,21 +136,6 @@ void SwGrammarMarkUp::setSentence( xub_StrLen nStart )
maSentence.insert( pIter, nStart );
}
-void SwGrammarMarkUp::removeSentence(xub_StrLen nStart, xub_StrLen nLength )
-{
- std::vector< xub_StrLen >::iterator pIter = maSentence.begin();
- while( pIter != maSentence.end() && *pIter < nStart )
- ++pIter;
- if( nLength == STRING_LEN )
- nStart = STRING_LEN;
- else
- nStart += nLength;
- std::vector< xub_StrLen >::iterator pLast = pIter;
- while( pLast != maSentence.end() && *pLast < nStart )
- ++pLast;
- maSentence.erase( pIter, pLast );
-}
-
xub_StrLen SwGrammarMarkUp::getSentenceStart( xub_StrLen nPos )
{
if( !maSentence.size() )
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ffcf4b53afbd..1fe2c363d70e 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1139,7 +1139,6 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, sal_Bool bScript ) const
}
}
-
void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const
{
SwRect aIntersect;
@@ -1169,7 +1168,6 @@ void SwTxtPaintInfo::DrawCheckBox( const SwFieldFormPortion &rPor, bool checked)
pOut->Pop();
}
}
-
/*************************************************************************
* SwTxtPaintInfo::DrawBackGround()
*************************************************************************/
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index c0643653a1d6..382c58a6f5c6 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -474,7 +474,7 @@ public:
inline void DrawBackBrush( const SwLinePortion &rPor ) const
{ /* if( pFnt->GetBackColor() ) */ _DrawBackBrush( rPor ); }
- void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const;
+ void DrawCheckBox( const SwFieldFormPortion &rPor, bool checked) const;
inline void NotifyURL( const SwLinePortion &rPor ) const
{ if( URLNotify() ) _NotifyURL( rPor ); }
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 0d34140d4058..dd2c1c3a1d38 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -125,11 +125,6 @@ sal_Bool isHahChar ( xub_Unicode cCh )
|| cCh == 0x6BF );
}
-sal_Bool isTahChar ( xub_Unicode cCh )
-{
- return ( cCh == 0x637 || cCh == 0x638 || cCh == 0x69F );
-}
-
sal_Bool isAinChar ( xub_Unicode cCh )
{
return ( cCh == 0x639 || cCh == 0x63A || cCh == 0x6A0 || cCh == 0x6FC );
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 5c1598c4db0b..0fd88876532b 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -172,6 +172,11 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
cDec = pTabStop->GetDecimal();
eAdj = pTabStop->GetAdjustment();
nNextPos = pTabStop->GetTabPos();
+ if(!bTabsRelativeToIndent && eAdj == SVX_TAB_ADJUST_DEFAULT && nSearchPos < 0)
+ {
+ //calculate default tab position of default tabs in negative indent
+ nNextPos = ( nSearchPos / nNextPos ) * nNextPos;
+ }
}
else
{
@@ -189,13 +194,8 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
SwTwips nCount = nSearchPos;
- // Bei negativen Werten rundet "/" auf, "%" liefert negative Reste,
- // bei positiven Werten rundet "/" ab, "%" liefert positvie Reste!
- if ( nCount < 0 )
- nCount = 0;
-
nCount /= nDefTabDist;
- nNextPos = ( nCount + 1 ) * nDefTabDist ;
+ nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ;
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips:
const SwTwips nMinimumTabWidth = pFrm->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) ? 0 : 50;
// <--
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 04f7ce596346..b86bdad692ac 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -88,23 +88,6 @@ SwRewriter SwUndoBookmark::GetRewriter() const
//----------------------------------------------------------------------
-SwUndoDelBookmark::SwUndoDelBookmark( const ::sw::mark::IMark& rBkmk )
- : SwUndoBookmark( UNDO_DELBOOKMARK, rBkmk )
-{
-}
-
-
-void SwUndoDelBookmark::Undo( SwUndoIter& rUndoIter )
-{
- SetInDoc( &rUndoIter.GetDoc() );
-}
-
-
-void SwUndoDelBookmark::Redo( SwUndoIter& rUndoIter )
-{
- ResetInDoc( &rUndoIter.GetDoc() );
-}
-
SwUndoInsBookmark::SwUndoInsBookmark( const ::sw::mark::IMark& rBkmk )
: SwUndoBookmark( UNDO_INSBOOKMARK, rBkmk )
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 646ffbd4c8f2..dd95d06a34b1 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -164,21 +164,6 @@ SwUndoInsert::SwUndoInsert( const SwNodeIndex& rNd )
// werden kann. Wenn ja, dann aender die Laenge und die InsPos.
// Dann wird von SwDoc::Insert kein neues Object in die Undoliste gestellt.
-BOOL SwUndoInsert::CanGrouping( const SwPosition& rInsPos, sal_Unicode cIns )
-{
- BOOL bRet = FALSE;
- if( !bIsAppend )
- {
- ++nCntnt;
- bRet = CanGrouping( rInsPos );
- --nCntnt;
- if( bRet )
- bRet = CanGrouping( cIns );
- }
- return bRet;
-}
-
-
BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
{
if( !bIsAppend && bIsWordDelim ==
diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx
index 06bee956f95a..4c5fbca4085c 100644
--- a/sw/source/core/undo/unmove.cxx
+++ b/sw/source/core/undo/unmove.cxx
@@ -354,13 +354,3 @@ void SwUndoMove::DelFtn( const SwPaM& rRange )
}
}
-void SwUndoMove::AddTblMrgFlyHstry( SwHistory& rHstr )
-{
- if( !pHistory )
- pHistory = new SwHistory;
-
- USHORT nInsPos = nFtnStt;
- nFtnStt = nFtnStt + rHstr.Count();
- pHistory->Move( nInsPos, &rHstr );
-}
-
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index bf1df93d5d16..b7098710802b 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -494,6 +494,40 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow )
return sCellName;
}
+/** Find the top left or bottom right corner box in given table.
+ Consider nested lines when finding the box.
+
+ @param i_pTable the table
+
+ @param i_bTopLeft if true, find top left box, otherwise find bottom
+ right box
+ */
+
+const SwTableBox* lcl_FindCornerTableBox(const SwTableLines& rTableLines, const bool i_bTopLeft)
+{
+ bool bFirst = true;
+ const SwTableBox* pBox = 0;
+ do
+ {
+ const SwTableLines& rLines(bFirst ? rTableLines : pBox->GetTabLines());
+ bFirst = false;
+ OSL_ASSERT(rLines.Count() != 0);
+ if (rLines.Count() != 0)
+ {
+ const SwTableLine* pLine(rLines[i_bTopLeft ? 0 : rLines.Count() - 1]);
+ OSL_ASSERT(pLine);
+ const SwTableBoxes& rBoxes(pLine->GetTabBoxes());
+ OSL_ASSERT(rBoxes.Count() != 0);
+ pBox = rBoxes[i_bTopLeft ? 0 : rBoxes.Count() - 1];
+ OSL_ASSERT(pBox);
+ }
+ else
+ {
+ pBox = 0;
+ }
+ } while (pBox && !pBox->GetSttNd());
+ return pBox;
+}
/* -----------------21.11.05 14:46-------------------
@@ -3318,7 +3352,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
// hier muessen die Actions aufgehoben werden
UnoActionRemoveContext aRemoveContext(pDoc);
- SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0];
+ const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true);
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// Cursor in die obere linke Zelle des Ranges setzen
@@ -3326,9 +3360,9 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName,
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->SetRemainInSection( sal_False );
- SwTableLine* pLastLine = rLines[rLines.Count() - 1];
- SwTableBoxes &rBoxes = pLastLine->GetTabBoxes();
- const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1];
+
+
+ const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false);
pUnoCrsr->SetMark();
pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd();
pUnoCrsr->Move( fnMoveForward, fnGoNode );
@@ -3514,7 +3548,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
// hier muessen die Actions aufgehoben werden
UnoActionRemoveContext aRemoveContext(pDoc);
- SwTableBox* pTLBox = rLines[0]->GetTabBoxes()[0];
+ const SwTableBox* pTLBox = lcl_FindCornerTableBox(rLines, true);
const SwStartNode* pSttNd = pTLBox->GetSttNd();
SwPosition aPos(*pSttNd);
// Cursor in die obere linke Zelle des Ranges setzen
@@ -3522,11 +3556,11 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) throw( be
pUnoCrsr->Move( fnMoveForward, fnGoNode );
pUnoCrsr->SetRemainInSection( sal_False );
- SwTableLine* pLastLine = rLines[rLines.Count() - 1];
- SwTableBoxes &rBoxes = pLastLine->GetTabBoxes();
- const SwTableBox* pBRBox = rBoxes[rBoxes.Count() -1];
+ const SwTableBox* pBRBox = lcl_FindCornerTableBox(rLines, false);
pUnoCrsr->SetMark();
- pUnoCrsr->GetPoint()->nNode = *pBRBox->GetSttNd();
+ const SwStartNode* pLastNd = pBRBox->GetSttNd();
+ pUnoCrsr->GetPoint()->nNode = *pLastNd;
+
pUnoCrsr->Move( fnMoveForward, fnGoNode );
SwUnoTableCrsr* pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
pCrsr->MakeBoxSels();
@@ -4448,41 +4482,6 @@ void SwXCellRange::GetDataSequence(
pDblSeq->realloc( nDtaCnt );
}
-/*-- 04.06.04 11:42:47---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-
-SwUnoCrsr * lcl_CreateCursor( SwFrmFmt &rTblFmt,
- SwTableBox *pStartBox, // should be top-left cell of cell range
- SwTableBox *pEndBox ) // should be bottom right-cell cell range
-{
- // create a *new* UNO cursor spanning the cell range defined by
- // the start and end box. Both boxes must be belong to the same table!
-
- SwUnoCrsr *pUnoCrsr = 0;
- if (pStartBox && pEndBox)
- {
- // hier muessen die Actions aufgehoben werden um
- // (zB dem Layout zu ermöglichen die Tabelle zu formatieren, da
- // sonst kein Tabellen Cursor aufgespannt werden kann.)
- UnoActionRemoveContext aRemoveContext(rTblFmt.GetDoc());
-
- // set point of cursor to top left box of range
- const SwStartNode* pSttNd = pStartBox->GetSttNd();
- SwPosition aPos(*pSttNd);
- pUnoCrsr = rTblFmt.GetDoc()->CreateUnoCrsr(aPos, sal_True);
- pUnoCrsr->Move( fnMoveForward, fnGoNode );
- pUnoCrsr->SetRemainInSection( sal_False );
- pUnoCrsr->SetMark();
- pUnoCrsr->GetPoint()->nNode = *pEndBox->GetSttNd();
- pUnoCrsr->Move( fnMoveForward, fnGoNode );
- SwUnoTableCrsr *pCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
- pCrsr->MakeBoxSels();
- }
- return pUnoCrsr;
-}
-
-
/*-- 29.04.02 11:42:47---------------------------------------------------
-----------------------------------------------------------------------*/
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index 156447fda9da..0bbfc70d5a22 100755..100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -860,21 +860,6 @@ void ViewShell::SetTabCompat( bool bNew )
}
}
-/*-- 29.11.2007 09:03:18---------------------------------------------------
- //#i24363# tab stops relative to indent
- -----------------------------------------------------------------------*/
-void ViewShell::SetTabsRelativeToIndent(bool bNew)
-{
- IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
- if( pIDSA->get(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT) != bNew )
- {
- SwWait aWait( *GetDoc()->GetDocShell(), TRUE );
- pIDSA->set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, bNew );
- const BYTE nInv = INV_PRTAREA | INV_SIZE | INV_TABLE | INV_SECTION;
- lcl_InvalidateAllCntnt( *this, nInv );
- }
-}
-
void ViewShell::SetAddExtLeading( bool bNew )
{
IDocumentSettingAccess* pIDSA = getIDocumentSettingAccess();
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 5a5e7a65e0a7..e83ab108bbc9 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -1599,79 +1599,6 @@ USHORT SwRTFParser::ReadRevTbl()
return nAuthorTableIndex;
}
-// #117910# simulate words behaviour of \keepn in table rows
-void fixKeepAndSplitAttributes(SwTableNode *pTableNode)
-{
- ASSERT(pTableNode!=NULL, "no table node!");
- if (!pTableNode) return;
- SwDoc *pDoc=pTableNode->GetDoc();
- if (pTableNode==NULL) return;
- SwTable& rTable=pTableNode->GetTable();
- SwTableLines& rLns = rTable.GetTabLines();
- USHORT nLines=rLns.Count();
- if (nLines==0) return;
- // get first paragaph in left down-most box
- SwTableLine* pLastLine = rLns[ nLines-1 ];
- SwTableBox* pBox = pLastLine->GetTabBoxes()[ 0 ];
- ULONG iFirstParagraph=pBox->GetSttIdx()+1;
- SwTxtNode *pTxtNode=(SwTxtNode *)pDoc->GetNodes()[iFirstParagraph];
- SwFrmFmt* pFmt=rTable.GetFrmFmt();
-
- SwFmtLayoutSplit *pTableSplit=(SwFmtLayoutSplit *)pFmt->GetAttrSet().GetItem(RES_LAYOUT_SPLIT);
- BOOL isTableKeep = pTableSplit!=NULL && !pTableSplit->GetValue();
- SvxFmtKeepItem *pTableKeep=(SvxFmtKeepItem *)pFmt->GetAttrSet().GetItem(RES_KEEP);
- BOOL isTableKeepNext = pTableKeep!=NULL && pTableKeep->GetValue();
- SvxFmtKeepItem *pKeepNext = (SvxFmtKeepItem *)pTxtNode->GetSwAttrSet().GetItem(RES_KEEP);
-
- if (isTableKeepNext)
- {
- if (nLines>2 && !isTableKeep)
- { // split
- SwTableLine* pSplitLine = rLns[ nLines-2 ];
- SwTableBox* pSplitBox = pSplitLine->GetTabBoxes()[ 0 ];
- SwNodeIndex aSplitIdx( *pSplitBox->GetSttNd() );
- pDoc->SplitTable( SwPosition(aSplitIdx), HEADLINE_NONE,
- !isTableKeep );
- SwTable& rSplitTable=aSplitIdx.GetNode().FindTableNode()->GetTable();
- aSplitIdx-=2;
- pDoc->GetNodes().Delete(aSplitIdx);
- pFmt=rSplitTable.GetFrmFmt();
- pFmt->ResetFmtAttr(RES_PAGEDESC);
- }
- // set keep=1(i.e. split=0) attribut
- SwFmtLayoutSplit aSplit(0);
- SwAttrSet aNewSet(pFmt->GetAttrSet());
- aNewSet.Put(aSplit);
- pFmt->SetFmtAttr(aNewSet);
- }
- else // !isTableKeepNext
- {
- if (isTableKeep)
- {
- SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
- pDoc->SplitTable( SwPosition(aTmpIdx), HEADLINE_NONE, FALSE );
- SwTable& rSplitTable=aTmpIdx.GetNode().FindTableNode()->GetTable();
- aTmpIdx-=2;
- pDoc->GetNodes().Delete(aTmpIdx);
- pFmt=rSplitTable.GetFrmFmt();
- pFmt->ResetFmtAttr(RES_PAGEDESC);
- }
- // set keep=0(i.e. split=1) attribut
- SwFmtLayoutSplit aSplit(1);
- SwAttrSet aNewSet(pFmt->GetAttrSet());
- aNewSet.Put(aSplit);
- pFmt->SetFmtAttr(aNewSet);
- }
- // move keepnext attribtue from last paragraph to table
- if (pKeepNext!=NULL)
- {
- SvxFmtKeepItem aNewKeepItem(pKeepNext->GetValue(), RES_KEEP);
- SwAttrSet aNewSet(pFmt->GetAttrSet());
- aNewSet.Put(aNewKeepItem);
- pFmt->SetFmtAttr(aNewSet);
- }
-}
-
void SwRTFParser::NextToken( int nToken )
{
USHORT eDateFmt;
diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx
index 34fe44eae053..8e17bee3874b 100644
--- a/sw/source/filter/rtf/wrtrtf.cxx
+++ b/sw/source/filter/rtf/wrtrtf.cxx
@@ -85,9 +85,6 @@ const sal_Char SwRTFWriter::sNewLine = '\012';
const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012";
#endif
-static ::rtl::OUString aEmpty;
-
-
SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 )
SV_IMPL_VARARR( RTFColorTbl, Color )
@@ -1302,6 +1299,7 @@ void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos)
OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' ';
{
+ ::rtl::OUString aEmpty;
::rtl::OUString & rBookmarkName = aEmpty;
if (pAsBookmark)
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 4bee56fa12ef..8ca7c8d71571 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -53,6 +53,7 @@ WW8TableNodeInfoInner::WW8TableNodeInfoInner(WW8TableNodeInfo * pParent)
, mnShadowsAfter(0)
, mbEndOfLine(false)
, mbEndOfCell(false)
+, mbFirstInTable(false)
, mbVertMerge(false)
, mpTableBox(NULL)
, mpTable(NULL)
@@ -98,7 +99,13 @@ void WW8TableNodeInfoInner::setEndOfCell(bool bEndOfCell)
mbEndOfCell = bEndOfCell;
}
+void WW8TableNodeInfoInner::setFirstInTable(bool bFirstInTable)
+{
+ mbFirstInTable = bFirstInTable;
+}
+
void WW8TableNodeInfoInner::setVertMerge(bool bVertMerge)
+
{
mbVertMerge = bVertMerge;
}
@@ -153,6 +160,11 @@ bool WW8TableNodeInfoInner::isEndOfLine() const
return mbEndOfLine;
}
+bool WW8TableNodeInfoInner::isFirstInTable() const
+{
+ return mbFirstInTable;
+}
+
const SwNode * WW8TableNodeInfoInner::getNode() const
{
const SwNode * pResult = NULL;
@@ -320,7 +332,6 @@ string WW8TableNodeInfoInner::toString() const
return string(buffer);
}
-
// WW8TableTextNodeInfo
WW8TableNodeInfo::WW8TableNodeInfo(WW8TableInfo * pParent,
@@ -356,16 +367,13 @@ WW8TableNodeInfo::~WW8TableNodeInfo()
aIt++;
}
-
#ifdef DEBUG
sResult += dbg_out(*mpNode);
#endif
-
sResult += "</tableNodeInfo>";
return sResult;
}
-
void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth)
{
mnDepth = nDepth;
@@ -400,11 +408,25 @@ void WW8TableNodeInfo::setEndOfCell(bool bEndOfCell)
#endif
}
+void WW8TableNodeInfo::setFirstInTable(bool bFirstInTable)
+{
+ WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth);
+
+ pInner->setFirstInTable(bFirstInTable);
+
+#ifdef DEBUG
+ ::std::clog << "<firstInTable depth=\"" << mnDepth << "\">"
+ << toString() << "</firstInTable>" << ::std::endl;
+#endif
+}
+
void WW8TableNodeInfo::setVertMerge(bool bVertMerge)
{
WW8TableNodeInfoInner::Pointer_t pInner = getInnerForDepth(mnDepth);
+
pInner->setVertMerge(bVertMerge);
+
#ifdef DEBUG
::std::clog << "<vertMerge depth=\"" << mnDepth << "\">"
<< toString() << "</vertMerge>" << ::std::endl;
@@ -868,6 +890,16 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
pNodeInfo->setCell(nCell);
pNodeInfo->setRow(nRow);
+ if (pNode->IsTxtNode())
+ {
+ FirstInTableMap_t::const_iterator aIt = mFirstInTableMap.find(pTable);
+ if (aIt == mFirstInTableMap.end())
+ {
+ mFirstInTableMap[pTable] = pNode;
+ pNodeInfo->setFirstInTable(true);
+ }
+ }
+
if (pRect)
{
WW8TableCellGrid::Pointer_t pCellGrid = getCellGridForTable(pTable);
diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx
index 47397310bd2d..b844615fecad 100644
--- a/sw/source/filter/ww8/WW8TableInfo.hxx
+++ b/sw/source/filter/ww8/WW8TableInfo.hxx
@@ -67,6 +67,7 @@ class WW8TableNodeInfoInner
sal_uInt32 mnShadowsAfter;
bool mbEndOfLine;
bool mbEndOfCell;
+ bool mbFirstInTable;
bool mbVertMerge;
const SwTableBox * mpTableBox;
const SwTable * mpTable;
@@ -85,6 +86,7 @@ public:
void setShadowsAfter(sal_uInt32 nShadowsAfter);
void setEndOfLine(bool bEndOfLine);
void setEndOfCell(bool bEndOfCell);
+ void setFirstInTable(bool bFirstInTable);
void setVertMerge(bool bVertMErge);
void setTableBox(const SwTableBox * pTableBox);
void setTable(const SwTable * pTable);
@@ -97,6 +99,7 @@ public:
sal_uInt32 getShadowsAfter() const;
bool isEndOfCell() const;
bool isEndOfLine() const;
+ bool isFirstInTable() const;
bool isVertMerge() const;
const SwTableBox * getTableBox() const;
const SwTable * getTable() const;
@@ -140,6 +143,7 @@ public:
void setDepth(sal_uInt32 nDepth);
void setEndOfLine(bool bEndOfLine);
void setEndOfCell(bool bEndOfCell);
+ void setFirstInTable(bool bFirstInTable);
void setVertMerge(bool bVertMerge);
void setTableBox(const SwTableBox *pTableBox);
void setTable(const SwTable * pTable);
@@ -155,6 +159,7 @@ public:
sal_uInt32 getDepth() const;
bool isEndOfLine() const;
bool isEndOfCell() const;
+ bool isFirstInTable() const;
const SwNode * getNode() const;
const SwTableBox * getTableBox() const;
const SwTable * getTable() const;
@@ -247,11 +252,14 @@ class WW8TableInfo
{
friend class WW8TableNodeInfoInner;
typedef hash_map<const SwNode *, WW8TableNodeInfo::Pointer_t, hashNode > Map_t;
- typedef hash_map<const SwTable *, WW8TableCellGrid::Pointer_t, hashTable > CellGridMap_t;
-
Map_t mMap;
+
+ typedef hash_map<const SwTable *, WW8TableCellGrid::Pointer_t, hashTable > CellGridMap_t;
CellGridMap_t mCellGridMap;
+ typedef hash_map<const SwTable *, const SwNode *, hashTable > FirstInTableMap_t;
+ FirstInTableMap_t mFirstInTableMap;
+
WW8TableNodeInfo *
processTableLine(const SwTable * pTable,
const SwTableLine * pTableLine,
@@ -295,6 +303,7 @@ public:
WW8TableNodeInfo * processSwTableByLayout(const SwTable * pTable);
WW8TableNodeInfo::Pointer_t getTableNodeInfo(const SwNode * pNode);
const SwNode * getNextNode(const SwNode * pNode);
+ const WW8TableNodeInfo * getFirstTableNodeInfo() const;
WW8TableNodeInfo * reorderByLayout(const SwTable * pTable);
};
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 5e1ca48b5ab3..6f69f8e591a5 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -232,6 +232,8 @@ public:
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0;
+ virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0;
+
virtual void TableRowEnd( sal_uInt32 nDepth ) = 0;
/// Start of the styles table.
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2e22e3518c90..0a6151b98388 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1440,6 +1440,13 @@ void DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_
OSL_TRACE( "TODO: DocxAttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
}
+void DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
+{
+#if OSL_DEBUG_LEVEL > 0
+ fprintf( stderr, "TODO: DocxAttributeOutput::TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )\n" );
+#endif
+}
+
void DocxAttributeOutput::TableRowEnd( sal_uInt32 /*nDepth*/ )
{
OSL_TRACE( "TODO: DocxAttributeOutput::TableRowEnd( sal_uInt32 nDepth = 1 )\n" );
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 62a3726e5543..850e9b118fae 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -567,6 +567,7 @@ namespace sw
return aRet;
}
+#if 0
Frames GetFramesBetweenNodes(const Frames &rFrames,
const SwNode &rStart, const SwNode &rEnd)
{
@@ -580,7 +581,7 @@ namespace sw
return aRet;
}
-
+#endif
Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode)
{
Frames aRet;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index a10330d5f3ec..ec149ee08326 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -663,6 +663,7 @@ namespace sw
*/
Frames GetFramesInNode(const Frames &rFrames, const SwNode &rNode);
+#if 0
/** Get the Frames anchored for all nodes between two points
Given a container of frames, find the ones anchored to the nodes
@@ -685,7 +686,7 @@ namespace sw
*/
Frames GetFramesBetweenNodes(const Frames &rFrames,
const SwNode &rStart, const SwNode &rEnd);
-
+#endif
/** Get the Numbering Format used on a paragraph
There are two differing types of numbering formats that may be on a
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 76ad1dc354ea..6e6dcf813767 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -77,6 +77,7 @@
#include <doc.hxx>
#include <docary.hxx>
#include <swtable.hxx>
+#include <swtblfmt.hxx>
#include <section.hxx>
#include <pagedesc.hxx>
#include <swrect.hxx>
@@ -1899,6 +1900,17 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
#endif
AttrOutput().TableInfoCell( pTextNodeInfoInner );
+ if (pTextNodeInfoInner->isFirstInTable())
+ {
+ const SwTable * pTable = pTextNodeInfoInner->getTable();
+ const SwTableFmt * pTabFmt =
+ dynamic_cast<const SwTableFmt *>(pTable->GetRegisteredIn());
+ if (pTabFmt != NULL)
+ {
+ if (pTabFmt->GetBreak().GetBreak() == SVX_BREAK_PAGE_BEFORE)
+ AttrOutput().PageBreakBefore(true);
+ }
+ }
}
if ( !bFlyInTable )
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index d5cdbf731375..2e992335598e 100644..100755
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -58,10 +58,12 @@
#include <filter/msfilter/msoleexp.hxx>
#include <filter/msfilter/msocximex.hxx>
#include <editeng/lrspitem.hxx>
+#include <editeng/ulspitem.hxx>
#include <editeng/boxitem.hxx>
#include <editeng/brshitem.hxx>
#include <swtypes.hxx>
#include <swrect.hxx>
+#include <swtblfmt.hxx>
#include <txatbase.hxx>
#include <fmtcntnt.hxx>
#include <fmtpdsc.hxx>
@@ -1911,6 +1913,7 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
TableBidi( pTableTextNodeInfoInner );
TableVerticalCell( pTableTextNodeInfoInner );
TableOrientation( pTableTextNodeInfoInner );
+ TableSpacing( pTableTextNodeInfoInner );
}
}
}
@@ -2093,6 +2096,41 @@ void WW8AttributeOutput::TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t
}
}
+void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner)
+{
+ const SwTable * pTable = pTableTextNodeInfoInner->getTable();
+ const SwTableFmt * pTableFmt = dynamic_cast<const SwTableFmt *>(pTable->GetRegisteredIn());
+
+ if (pTableFmt != NULL)
+ {
+ const SvxULSpaceItem & rUL = pTableFmt->GetULSpace();
+
+ if (rUL.GetUpper() > 0)
+ {
+ sal_uInt8 nPadding = 2;
+ sal_uInt8 nPcVert = 0;
+ sal_uInt8 nPcHorz = 0;
+
+ sal_uInt8 nTPc = (nPadding << 4) | (nPcVert << 2) | nPcHorz;
+
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TPc);
+ m_rWW8Export.pO->Insert( nTPc, m_rWW8Export.pO->Count() );
+
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaAbs);
+ m_rWW8Export.InsUInt16(rUL.GetUpper());
+
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromText);
+ m_rWW8Export.InsUInt16(rUL.GetUpper());
+ }
+
+ if (rUL.GetLower() > 0)
+ {
+ m_rWW8Export.InsUInt16(NS_sprm::LN_TDyaFromTextBottom);
+ m_rWW8Export.InsUInt16(rUL.GetLower());
+ }
+ }
+}
+
void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
{
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
@@ -2417,13 +2455,15 @@ typedef ::std::deque<SwNode *> SwNodeDeque;
void MSWordExportBase::WriteText()
{
-#ifdef DEBUG
- ::std::clog << "<WriteText>" << ::std::endl;
- ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
-
- SwNodeHashSet aNodeSet;
- SwNodeDeque aNodeDeque;
-#endif
+// whoever has need of the missing function should go and implement it!
+// This damned piece of code always breaks builds...
+//#ifdef DEBUG
+// ::std::clog << "<WriteText>" << ::std::endl;
+// ::std::clog << dbg_out(pCurPam->GetDoc()->GetNodes()) << ::std::endl;
+//
+// SwNodeHashSet aNodeSet;
+// SwNodeDeque aNodeDeque;
+//#endif
while( pCurPam->GetPoint()->nNode < pCurPam->GetMark()->nNode ||
( pCurPam->GetPoint()->nNode == pCurPam->GetMark()->nNode &&
@@ -2431,6 +2471,9 @@ void MSWordExportBase::WriteText()
{
SwNode * pNd = pCurPam->GetNode();
+// whoever has need of the missing function should go and implement it!
+// This damned piece of code always breaks builds...
+#if 0
#ifdef DEBUG
if (aNodeSet.find(pNd) == aNodeSet.end())
{
@@ -2442,6 +2485,7 @@ void MSWordExportBase::WriteText()
::std::clog << "<already-done>" << dbg_out(*pNd) << "</already-done>" << ::std::endl;
}
#endif
+#endif
if ( pNd->IsTxtNode() )
SectionBreaksAndFrames( *pNd->GetTxtNode() );
@@ -3776,7 +3820,8 @@ void MSWordExportBase::OutputStartNode( const SwStartNode & rNode)
void MSWordExportBase::OutputEndNode( const SwEndNode &rNode )
{
#ifdef DEBUG
-// someone who knows what he wants should make this linkable when building with 'debug=t' ...
+// whoever has need of the missing function should go and implement it!
+// This piece of code always breaks builds...
// ::std::clog << "<OutWW8_SwEndNode>" << dbg_out(&rNode) << ::std::endl;
#endif
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index b9d9038b484b..b9d9ba38c246 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -124,6 +124,8 @@ public:
virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
+ virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
+
virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
/// Start of the styles table.
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 5808e3981223..983bc9c73c77 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -573,60 +573,63 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
aSet.Put( SdrTextVertAdjustItem( eTVA ) );
aSet.Put( SdrTextHorzAdjustItem( eTHA ) );
- pObj->SetMergedItemSet(aSet);
- pObj->SetModel(pSdrModel);
+ if (pObj != NULL)
+ {
+ pObj->SetMergedItemSet(aSet);
+ pObj->SetModel(pSdrModel);
- if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) )
- dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True);
+ if (bVerticalText && dynamic_cast< SdrTextObj* >( pObj ) )
+ dynamic_cast< SdrTextObj* >( pObj )->SetVerticalWriting(sal_True);
- if ( bIsSimpleDrawingTextBox )
- {
- if ( nTextRotationAngle )
+ if ( bIsSimpleDrawingTextBox )
{
- long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ?
- rTextRect.GetWidth() : rTextRect.GetHeight();
- nMinWH /= 2;
- Point aPivot(rTextRect.TopLeft());
- aPivot.X() += nMinWH;
- aPivot.Y() += nMinWH;
- double a = nTextRotationAngle * nPi180;
- pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
+ if ( nTextRotationAngle )
+ {
+ long nMinWH = rTextRect.GetWidth() < rTextRect.GetHeight() ?
+ rTextRect.GetWidth() : rTextRect.GetHeight();
+ nMinWH /= 2;
+ Point aPivot(rTextRect.TopLeft());
+ aPivot.X() += nMinWH;
+ aPivot.Y() += nMinWH;
+ double a = nTextRotationAngle * nPi180;
+ pObj->NbcRotate(aPivot, nTextRotationAngle, sin(a), cos(a));
+ }
}
- }
- if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) )
- {
- SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj );
+ if ( ( ( rObjData.nSpFlags & SP_FFLIPV ) || mnFix16Angle || nTextRotationAngle ) && dynamic_cast< SdrObjCustomShape* >( pObj ) )
+ {
+ SdrObjCustomShape* pCustomShape = dynamic_cast< SdrObjCustomShape* >( pObj );
- double fExtraTextRotation = 0.0;
- if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) )
- { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false
- fExtraTextRotation = -mnFix16Angle;
- }
- if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text
- { // remains unchanged, so we have to take back the flipping here
- fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped.
+ double fExtraTextRotation = 0.0;
+ if ( mnFix16Angle && !( GetPropertyValue( DFF_Prop_FitTextToShape ) & 4 ) )
+ { // text is already rotated, we have to take back the object rotation if DFF_Prop_RotateText is false
+ fExtraTextRotation = -mnFix16Angle;
+ }
+ if ( rObjData.nSpFlags & SP_FFLIPV ) // sj: in ppt the text is flipped, whereas in word the text
+ { // remains unchanged, so we have to take back the flipping here
+ fExtraTextRotation += 18000.0; // because our core will flip text if the shape is flipped.
+ }
+ fExtraTextRotation += nTextRotationAngle;
+ if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) )
+ {
+ fExtraTextRotation /= 100.0;
+ SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
+ const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) );
+ com::sun::star::beans::PropertyValue aPropVal;
+ aPropVal.Name = sTextRotateAngle;
+ aPropVal.Value <<= fExtraTextRotation;
+ aGeometryItem.SetPropertyValue( aPropVal );
+ pCustomShape->SetMergedItem( aGeometryItem );
+ }
}
- fExtraTextRotation += nTextRotationAngle;
- if ( !::basegfx::fTools::equalZero( fExtraTextRotation ) )
+ else if ( mnFix16Angle )
{
- fExtraTextRotation /= 100.0;
- SdrCustomShapeGeometryItem aGeometryItem( (SdrCustomShapeGeometryItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) );
- const rtl::OUString sTextRotateAngle( RTL_CONSTASCII_USTRINGPARAM ( "TextRotateAngle" ) );
- com::sun::star::beans::PropertyValue aPropVal;
- aPropVal.Name = sTextRotateAngle;
- aPropVal.Value <<= fExtraTextRotation;
- aGeometryItem.SetPropertyValue( aPropVal );
- pCustomShape->SetMergedItem( aGeometryItem );
+ // rotate text with shape ?
+ double a = mnFix16Angle * nPi180;
+ pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle,
+ sin( a ), cos( a ) );
}
}
- else if ( mnFix16Angle )
- {
- // rotate text with shape ?
- double a = mnFix16Angle * nPi180;
- pObj->NbcRotate( rObjData.aBoundRect.Center(), mnFix16Angle,
- sin( a ), cos( a ) );
- }
}
else if( !pObj )
{
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index b32fbf7f0037..71aa7022ed31 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -285,7 +285,6 @@ public:
const WW8SwFlyPara* pFS, bool bGraf);
WW8FlySet(SwWW8ImplReader& rReader, const SwPaM* pPaM, const WW8_PIC& rPic,
long nWidth, long nHeight);
- WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM);
};
enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 5d57a83481b5..1588944e179b 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2265,12 +2265,6 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM,
+ aSizeArray[WW8_BOT]) );
}
-WW8FlySet::WW8FlySet(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
- : SfxItemSet(rReader.rDoc.GetAttrPool(),RES_FRMATR_BEGIN,RES_FRMATR_END-1)
-{
- Init(rReader, pPaM);
-}
-
void WW8FlySet::Init(const SwWW8ImplReader& rReader, const SwPaM* pPaM)
{
if (!rReader.mbNewDoc)
diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx
index 0a844453bb3b..653208aaf250 100644
--- a/sw/source/ui/app/apphdl.cxx
+++ b/sw/source/ui/app/apphdl.cxx
@@ -765,24 +765,28 @@ void SwModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
DELETEZ(pWebToolbarConfig) ;
DELETEZ(pAuthorNames) ;
DELETEZ(pDBConfig);
-
- if (pColorConfig != 0) {
+ if( pColorConfig )
+ {
pColorConfig->RemoveListener(this);
DELETEZ(pColorConfig);
}
- if (pAccessibilityOptions != 0) {
+ if( pAccessibilityOptions )
+ {
pAccessibilityOptions->RemoveListener(this);
DELETEZ(pAccessibilityOptions);
}
- if (pCTLOptions != 0) {
+ if( pCTLOptions )
+ {
pCTLOptions->RemoveListener(this);
DELETEZ(pCTLOptions);
}
- if (pUserOptions != 0) {
+ if( pUserOptions )
+ {
pUserOptions->RemoveListener(this);
DELETEZ(pUserOptions);
}
- if (pUndoOptions != 0) {
+ if( pUndoOptions )
+ {
pUndoOptions->RemoveListener(this);
DELETEZ(pUndoOptions);
}
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 34ccac06a256..c3f6585e325e 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -101,7 +101,6 @@
#include <cmdid.h>
#include <globals.hrc>
#include <app.hrc>
-#include "warnpassword.hxx"
#include <cfgid.h>
#include <unotools/moduleoptions.hxx>
diff --git a/sw/source/ui/cctrl/makefile.mk b/sw/source/ui/cctrl/makefile.mk
index c724f287fc3a..33ba83f34d7c 100644
--- a/sw/source/ui/cctrl/makefile.mk
+++ b/sw/source/ui/cctrl/makefile.mk
@@ -50,6 +50,9 @@ SLOFILES = \
$(SLO)$/popbox.obj \
$(SLO)$/swlbox.obj
+EXCEPTIONSFILES = \
+ $(SLO)$/popbox.obj
+
# --- Tagets -------------------------------------------------------
.INCLUDE : target.mk
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 97930582ce5a..921d2a652002 100644..100755
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -542,10 +542,15 @@ void SwAddPrinterTabPage::Reset( const SfxItemSet& )
aFaxLB.SelectEntry( pAddPrinterAttr->sFaxName );
}
if (aProspectCB.IsChecked())
+ {
aProspectCB_RTL.Enable(TRUE);
+ aNoRB.Enable( FALSE );
+ aOnlyRB.Enable( FALSE );
+ aEndRB.Enable( FALSE );
+ aEndPageRB.Enable( FALSE );
+ }
else
- aProspectCB_RTL.Disable();
-
+ aProspectCB_RTL.Enable( FALSE );
}
//-----------------------------------------------------------------------
@@ -560,13 +565,14 @@ void SwAddPrinterTabPage::Init()
IMPL_LINK_INLINE_START( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
{
bAttrModified = TRUE;
- if (aProspectCB.IsChecked())
- aProspectCB_RTL.Enable(TRUE);
- else
- {
+ bool bIsProspect = aProspectCB.IsChecked();
+ if (!bIsProspect)
aProspectCB_RTL.Check( FALSE );
- aProspectCB_RTL.Disable();
- }
+ aProspectCB_RTL.Enable( bIsProspect );
+ aNoRB.Enable( !bIsProspect );
+ aOnlyRB.Enable( !bIsProspect );
+ aEndRB.Enable( !bIsProspect );
+ aEndPageRB.Enable( !bIsProspect );
return 0;
}
IMPL_LINK_INLINE_END( SwAddPrinterTabPage, AutoClickHdl, CheckBox *, EMPTYARG )
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index b44ee246ac41..9e62f7a4de36 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1911,7 +1911,7 @@ void SwInsertDBColAutoPilot::Load()
SwInsDBColumn& rSet = *aDBColumns[ n ];
for( USHORT m = 0; m < pNewData->aDBColumns.Count() ; ++m )
{
- const SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
+ SwInsDBColumn& rGet = *pNewData->aDBColumns[ m ];
if(rGet.sColumn == rSet.sColumn)
{
if( rGet.bHasFmt && !rGet.bIsDBFmt )
@@ -1923,8 +1923,10 @@ void SwInsertDBColAutoPilot::Load()
{
xub_StrLen nCheckPos;
short nType;
- rNFmtr.PutEntry( (String&)rGet.sUsrNumFmt, nCheckPos, nType,
+ String sTmpFmt = rGet.sUsrNumFmt;
+ rNFmtr.PutEntry( sTmpFmt, nCheckPos, nType,
rSet.nUsrNumFmt, rGet.eUsrNumFmtLng );
+ rGet.sUsrNumFmt = sTmpFmt;
}
}
break;
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 8ad861713e0a..cf894f8728c4 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2907,9 +2907,7 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
}
else
{
- SwDoc* pNewDoc = rSourceView.GetDocShell()->GetDoc()->CreateCopy();
- xWorkDocSh = new SwDocShell( pNewDoc, SFX_CREATE_MODE_STANDARD );
- xWorkDocSh->DoInitNew();
+ xWorkDocSh = rSourceView.GetDocShell()->GetDoc()->CreateCopy(true);
}
//create a ViewFrame
SwView* pWorkView = static_cast< SwView* >( SfxViewFrame::LoadHiddenDocument( *xWorkDocSh, 0 )->GetViewShell() );
@@ -3032,8 +3030,9 @@ sal_Int32 SwNewDBMgr::MergeDocuments( SwMailMergeConfigItem& rMMConfig,
pTargetShell->SttDoc();
//
}
- catch( Exception& )
+ catch( Exception& rEx)
{
+ (void)rEx;
DBG_ERROR("exception caught in SwNewDBMgr::MergeDocuments");
}
DELETEZ(pImpl->pMergeData);
diff --git a/sw/source/ui/dbui/mailmergewizard.cxx b/sw/source/ui/dbui/mailmergewizard.cxx
index 54cf6edac512..365c56b4c0ea 100644
--- a/sw/source/ui/dbui/mailmergewizard.cxx
+++ b/sw/source/ui/dbui/mailmergewizard.cxx
@@ -260,7 +260,7 @@ void SwMailMergeWizard::UpdateRoadmap()
//#i97436# if a document has to be loaded then enable output type page only
m_bDocumentLoad = false;
bool bEnableOutputTypePage = (nCurPage != MM_DOCUMENTSELECTPAGE) ||
- static_cast<svt::OWizardPage*>(pCurPage)->commitPage( eValidate );
+ static_cast<svt::OWizardPage*>(pCurPage)->commitPage( ::svt::WizardTypes::eValidate );
for(sal_uInt16 nPage = MM_DOCUMENTSELECTPAGE; nPage <= MM_OUTPUTPAGE; ++nPage)
{
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index b2d8c790c25d..a35b0727c1ed 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -175,9 +175,9 @@ void SwMailMergeAddressBlockPage::ActivatePage()
/*-- 27.05.2004 13:59:15---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeAddressBlockPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeAddressBlockPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
- if ( eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
+ if ( ::svt::WizardTypes::eTravelForward == _eReason && !m_pWizard->GetConfigItem().GetResultSet().is() )
return sal_False;
return sal_True;
}
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index b47b71f1a561..eddaca225e9b 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -98,7 +98,7 @@ class SwMailMergeAddressBlockPage : public svt::OWizardPage
void EnableAddressBlock(sal_Bool bAll, sal_Bool bSelective);
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
virtual bool canAdvance() const;
public:
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 698e12f44882..e125b4f8ed2e 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -197,11 +197,11 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton)
/*-- 06.04.2004 12:52:24---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeDocSelectPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
sal_Bool bReturn = sal_False;
- bool bNext = _eReason == eTravelForward;
- if(bNext || _eReason == eValidate )
+ bool bNext = _eReason == ::svt::WizardTypes::eTravelForward;
+ if(bNext || _eReason == ::svt::WizardTypes::eValidate )
{
::rtl::OUString sReloadDocument;
bReturn = m_aCurrentDocRB.IsChecked() ||
@@ -209,7 +209,7 @@ sal_Bool SwMailMergeDocSelectPage::commitPage( CommitPageReason _eReason )
((sReloadDocument = m_sLoadFileName).getLength() && m_aLoadDocRB.IsChecked() )||
((sReloadDocument = m_sLoadTemplateName).getLength() && m_aLoadTemplateRB.IsChecked())||
(m_aRecentDocRB.IsChecked() && (sReloadDocument = m_aRecentDocLB.GetSelectEntry()).getLength());
- if( _eReason == eValidate )
+ if( _eReason == ::svt::WizardTypes::eValidate )
m_pWizard->SetDocumentLoad(!m_aCurrentDocRB.IsChecked());
if(bNext && !m_aCurrentDocRB.IsChecked())
diff --git a/sw/source/ui/dbui/mmdocselectpage.hxx b/sw/source/ui/dbui/mmdocselectpage.hxx
index 2785846b39e8..6483025f88ed 100644
--- a/sw/source/ui/dbui/mmdocselectpage.hxx
+++ b/sw/source/ui/dbui/mmdocselectpage.hxx
@@ -61,7 +61,7 @@ class SwMailMergeDocSelectPage : public svt::OWizardPage
DECL_LINK(DocSelectHdl, RadioButton*);
DECL_LINK(FileSelectHdl, PushButton*);
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergeDocSelectPage( SwMailMergeWizard* _pParent);
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index c7613055d6ab..7281880c593d 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -390,7 +390,7 @@ void SwMailMergeGreetingsPage::ActivatePage()
/*-- 11.05.2004 14:47:10---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeGreetingsPage::commitPage( CommitPageReason )
+sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPageReason )
{
SwMailMergeConfigItem& rConfig = m_pWizard->GetConfigItem();
diff --git a/sw/source/ui/dbui/mmgreetingspage.hxx b/sw/source/ui/dbui/mmgreetingspage.hxx
index 1756f78a29d8..3e237d797e2f 100644
--- a/sw/source/ui/dbui/mmgreetingspage.hxx
+++ b/sw/source/ui/dbui/mmgreetingspage.hxx
@@ -122,7 +122,7 @@ class SwMailMergeGreetingsPage : public svt::OWizardPage,
virtual void UpdatePreview();
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergeGreetingsPage( SwMailMergeWizard* _pParent);
~SwMailMergeGreetingsPage();
diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index 366eb23e9352..d9ae7b9c518f 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -254,11 +254,11 @@ void SwMailMergeLayoutPage::ActivatePage()
/*-- 11.05.2004 10:41:26---------------------------------------------------
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergeLayoutPage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergeLayoutPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
//now insert the frame and the greeting
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
- if(eTravelForward == _eReason)
+ if(::svt::WizardTypes::eTravelForward == _eReason)
{
long nLeft = static_cast< long >(m_aLeftMF.Denormalize(m_aLeftMF.GetValue(FUNIT_TWIP)));
long nTop = static_cast< long >(m_aTopMF.Denormalize(m_aTopMF.GetValue(FUNIT_TWIP)));
diff --git a/sw/source/ui/dbui/mmlayoutpage.hxx b/sw/source/ui/dbui/mmlayoutpage.hxx
index 0a4569c71437..b7dd9dfab2e6 100644
--- a/sw/source/ui/dbui/mmlayoutpage.hxx
+++ b/sw/source/ui/dbui/mmlayoutpage.hxx
@@ -98,7 +98,7 @@ class SwMailMergeLayoutPage : public svt::OWizardPage
static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample);
virtual void ActivatePage();
- virtual sal_Bool commitPage(CommitPageReason _eReason);
+ virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason);
public:
SwMailMergeLayoutPage( SwMailMergeWizard* _pParent);
~SwMailMergeLayoutPage();
diff --git a/sw/source/ui/dbui/mmpreparemergepage.cxx b/sw/source/ui/dbui/mmpreparemergepage.cxx
index a8650c4b37c9..8539f037ecdc 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.cxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.cxx
@@ -191,10 +191,10 @@ void SwMailMergePrepareMergePage::ActivatePage()
/*-- 13.05.2004 15:38:32---------------------------------------------------
merge the data into a new file
-----------------------------------------------------------------------*/
-sal_Bool SwMailMergePrepareMergePage::commitPage( CommitPageReason _eReason )
+sal_Bool SwMailMergePrepareMergePage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason )
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
- if(eTravelForward == _eReason && !rConfigItem.IsMergeDone())
+ if(::svt::WizardTypes::eTravelForward == _eReason && !rConfigItem.IsMergeDone())
{
m_pWizard->CreateTargetDocument();
m_pWizard->SetRestartPage(MM_MERGEPAGE);
diff --git a/sw/source/ui/dbui/mmpreparemergepage.hxx b/sw/source/ui/dbui/mmpreparemergepage.hxx
index 90298711dd88..8fb7ad938996 100644
--- a/sw/source/ui/dbui/mmpreparemergepage.hxx
+++ b/sw/source/ui/dbui/mmpreparemergepage.hxx
@@ -64,7 +64,7 @@ class SwMailMergePrepareMergePage : public svt::OWizardPage
DECL_LINK(MoveHdl_Impl, void*);
virtual void ActivatePage();
- virtual sal_Bool commitPage( CommitPageReason _eReason );
+ virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
public:
SwMailMergePrepareMergePage( SwMailMergeWizard* _pParent);
diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
index 8bf658d504b0..c9e99979e66b 100644
--- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx
@@ -32,13 +32,13 @@
#include <vcl/msgbox.hxx>
#include <editeng/svxacorr.hxx>
#include <editeng/acorrcfg.hxx>
-#ifndef _SVX_SVXIDS_HRC
#include <svx/svxids.hrc>
-#endif
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <editeng/unolingu.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/editview.hxx>
#include <wrtsh.hxx>
#include <sfx2/printer.hxx>
#include <svx/svdoutl.hxx>
@@ -56,9 +56,7 @@
#include <pam.hxx>
#include <drawbase.hxx>
#include <unotextrange.hxx>
-#ifndef _DIALOG_HXX
#include <dialog.hrc>
-#endif
#include <cmdid.h>
@@ -202,12 +200,19 @@ SfxChildWinInfo SwSpellDialogChildWindow::GetInfo (void) const
-----------------------------------------------------------------------*/
-svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
+svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
{
svx::SpellPortions aRet;
SwWrtShell* pWrtShell = GetWrtShell_Impl();
if(pWrtShell)
{
+ if (!bRecheck)
+ {
+ // first set continuation point for spell/grammar check to the
+ // end of the current sentence
+ pWrtShell->MoveContinuationPosToEndOfCheckedSentence();
+ }
+
ShellModes eSelMode = pWrtShell->GetView().GetShellMode();
bool bDrawText = SHELL_MODE_DRAWTEXT == eSelMode;
bool bNormalText =
@@ -239,7 +244,10 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
if(!pWrtShell->HasSelection())
pWrtShell->GoStartSentence();
else
+ {
+ pWrtShell->ExpandToSentenceBorders();
m_pSpellState->m_bStartedInSelection = true;
+ }
//determine if the selection is outside of the body text
bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
m_pSpellState->m_SpellStartPosition = bOtherText ? SPELL_START_OTHER : SPELL_START_BODY;
@@ -269,7 +277,24 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
m_pSpellState->m_SpellStartPosition = SPELL_START_DRAWTEXT;
m_pSpellState->m_pStartDrawing = pSdrView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- m_pSpellState->m_aStartDrawingSelection = pOLV->GetSelection();
+ // start checking at the top of the drawing object
+ pOLV->SetSelection( ESelection() );
+ m_pSpellState->m_aStartDrawingSelection = ESelection();
+/*
+Note: spelling in a selection only, or starting in a mid of a drawing object requires
+further changes elsewhere. (Especially if it should work in sc and sd as well.)
+The code below would only be part of the solution.
+(Keeping it a as a comment for the time being)
+ ESelection aCurSel( pOLV->GetSelection() );
+ ESelection aSentenceSel( pOLV->GetEditView().GetEditEngine()->SelectSentence( aCurSel ) );
+ if (!aCurSel.HasRange())
+ {
+ aSentenceSel.nEndPara = aSentenceSel.nStartPara;
+ aSentenceSel.nEndPos = aSentenceSel.nStartPos;
+ }
+ pOLV->SetSelection( aSentenceSel );
+ m_pSpellState->m_aStartDrawingSelection = aSentenceSel;
+*/
}
m_pSpellState->m_bInitialCall = false;
@@ -316,61 +341,66 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
//spell inside of the Writer text
if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
{
- //find out which text has been spelled body or other
- bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
- if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
+ // if there is a selection (within body or header/footer text)
+ // then spell/grammar checking should not move outside of it.
+ if (!m_pSpellState->m_bStartedInSelection)
{
- m_pSpellState->m_bStartedInOther = false;
- pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
- pWrtShell->SpellEnd();
- delete m_pSpellState->pOtherCursor;
- m_pSpellState->pOtherCursor = 0;
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
- pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
- }
- if(!aRet.size())
- {
- //end spelling
- pWrtShell->SpellEnd();
- if(bOtherText)
+ //find out which text has been spelled body or other
+ bOtherText = !(pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY);
+ if(bOtherText && m_pSpellState->m_bStartedInOther && m_pSpellState->pOtherCursor)
{
- m_pSpellState->m_bOtherSpelled = true;
- //has the body been spelled?
- if(!m_pSpellState->m_bBodySpelled)
+ m_pSpellState->m_bStartedInOther = false;
+ pWrtShell->SetSelection(*m_pSpellState->pOtherCursor);
+ pWrtShell->SpellEnd();
+ delete m_pSpellState->pOtherCursor;
+ m_pSpellState->pOtherCursor = 0;
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_CURR, DOCPOS_OTHERSTART, FALSE );
+ pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn);
+ }
+ if(!aRet.size())
+ {
+ //end spelling
+ pWrtShell->SpellEnd();
+ if(bOtherText)
{
- pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
- if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ m_pSpellState->m_bOtherSpelled = true;
+ //has the body been spelled?
+ if(!m_pSpellState->m_bBodySpelled)
{
- m_pSpellState->m_bBodySpelled = true;
- pWrtShell->SpellEnd();
+ pWrtShell->SpellStart(DOCPOS_START, DOCPOS_END, DOCPOS_START, FALSE );
+ if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ {
+ m_pSpellState->m_bBodySpelled = true;
+ pWrtShell->SpellEnd();
+ }
}
}
+ else
+ {
+ m_pSpellState->m_bBodySpelled = true;
+ if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
+ {
+ pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
+ if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
+ {
+ pWrtShell->SpellEnd();
+ m_pSpellState->m_bOtherSpelled = true;
+ }
+ }
+ else
+ m_pSpellState->m_bOtherSpelled = true;
+ }
}
- else
+
+ //search for a draw text object that contains error and spell it
+ if(!aRet.size() &&
+ (m_pSpellState->m_bDrawingsSpelled ||
+ !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
{
- m_pSpellState->m_bBodySpelled = true;
- if(!m_pSpellState->m_bOtherSpelled && pWrtShell->HasOtherCnt())
- {
- pWrtShell->SpellStart(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, DOCPOS_OTHERSTART, FALSE );
- if(!pWrtShell->SpellSentence(aRet, m_bIsGrammarCheckingOn))
- {
- pWrtShell->SpellEnd();
- m_pSpellState->m_bOtherSpelled = true;
- }
- }
- else
- m_pSpellState->m_bOtherSpelled = true;
+ lcl_LeaveDrawText(*pWrtShell);
+ m_pSpellState->m_bDrawingsSpelled = true;
}
}
-
- //search for a draw text object that contains error and spell it
- if(!aRet.size() &&
- (m_pSpellState->m_bDrawingsSpelled ||
- !FindNextDrawTextError_Impl(*pWrtShell) || !SpellDrawText_Impl(*pWrtShell, aRet)))
- {
- lcl_LeaveDrawText(*pWrtShell);
- m_pSpellState->m_bDrawingsSpelled = true;
- }
}
}
// now only the rest of the body text can be spelled -
@@ -430,7 +460,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence (void)
/*-- 09.09.2003 10:39:40---------------------------------------------------
-----------------------------------------------------------------------*/
-void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged)
+void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck)
{
SwWrtShell* pWrtShell = GetWrtShell_Impl();
DBG_ASSERT(!m_pSpellState->m_bInitialCall, "ApplyChangedSentence in initial call or after resume");
@@ -443,13 +473,19 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC
SHELL_MODE_LIST_TEXT == eSelMode ||
SHELL_MODE_TABLE_LIST_TEXT == eSelMode ||
SHELL_MODE_TEXT == eSelMode;
+
+ // evaluate if the same sentence should be rechecked or not.
+ // Sentences that got grammar checked should always be rechecked in order
+ // to detect possible errors that get introduced with the changes
+ bRecheck |= pWrtShell->HasLastSentenceGotGrammarChecked();
+
if(bNormalText)
- pWrtShell->ApplyChangedSentence(rChanged, m_bIsGrammarCheckingOn);
+ pWrtShell->ApplyChangedSentence(rChanged, bRecheck);
else if(bDrawText )
{
SdrView* pDrView = pWrtShell->GetDrawView();
SdrOutliner *pOutliner = pDrView->GetTextEditOutliner();
- pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, m_bIsGrammarCheckingOn);
+ pOutliner->ApplyChangedSentence(pDrView->GetTextEditOutlinerView()->GetEditView(), rChanged, bRecheck);
}
}
}
@@ -847,7 +883,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
Point aTmp( 0,0 );
rSh.SelectObj( aTmp, 0, pTextObj );
SdrPageView* pPV = pDrView->GetSdrPageView();
- rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE );
+ rView.BeginTextEdit( pTextObj, pPV, &rView.GetEditWin(), FALSE, TRUE );
rView.AttrChangedNotify(&rSh);
bNextDoc = true;
}
diff --git a/sw/source/ui/dochdl/dochdl.src b/sw/source/ui/dochdl/dochdl.src
index 8ecccb5395cb..f92ea43681d8 100644..100755
--- a/sw/source/ui/dochdl/dochdl.src
+++ b/sw/source/ui/dochdl/dochdl.src
@@ -73,13 +73,4 @@ String STR_DDEFORMAT
{
Text [ en-US ] = "DDE link" ;
};
-Bitmap BMP_SW_TEAM_MUGSHOT
-{
- File ="writerteam.bmp";
-};
-
-String STR_SW_TEAM_NAMES
-{
- Text = "Back row: Aidan Butler, Hans-Peter Burow, Caolan McNamara, Michael Brauer, Martin Maher, Gunnar Timm\nFront row: Thomas Lange, Oliver-Rainer Duesterhoeft, Henning Brinkmann, Andreas Martens, Oliver Specht, Frank Meies, Daniel Vogelheim";
-};
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 5cb1df8a9ebb..cc789d6e4498 100644..100755
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -607,48 +607,9 @@ BOOL SwGlossaryHdl::Expand( const String& rShortName,
aShortName.Erase(nMaxLen);
aShortName.AppendAscii(" ...");
}
- if ( aShortName.EqualsAscii ( "StarWriterTeam", 0, 14 ) )
- {
- String sGraphicName ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team photo" ) );
- String sTeamCredits ( RTL_CONSTASCII_USTRINGPARAM ( "StarWriter team credits" ) );
- pWrtShell->StartUndo ( UNDO_INSGLOSSARY );
- pWrtShell->StartAllAction();
- if(pWrtShell->HasSelection())
- pWrtShell->DelLeft();
- Bitmap aBitmap ( SW_RES ( BMP_SW_TEAM_MUGSHOT ) );
- pWrtShell->Insert ( aEmptyStr, aEmptyStr, aBitmap);
- pWrtShell->SetFlyName ( sGraphicName );
- SwTxtFmtColl* pColl = pWrtShell->GetTxtCollFromPool ( RES_POOLCOLL_LABEL_ABB );
- const IDocumentFieldsAccess* pIDFA = pWrtShell->getIDocumentFieldsAccess();
- SwFieldType* pType = pIDFA->GetFldType( RES_SETEXPFLD, pColl->GetName(), false );
- sal_uInt16 nId = pIDFA->GetFldTypes()->GetPos( pType );
- pWrtShell->InsertLabel( LTYPE_OBJECT, aEmptyStr, aEmptyStr, aEmptyStr, FALSE, nId, aEmptyStr );
- pWrtShell->SwFEShell::SetFlyName( sTeamCredits );
- pWrtShell->SwFEShell::SelectObj ( Point ( ULONG_MAX, ULONG_MAX ) );
- pWrtShell->EnterStdMode();
- pWrtShell->EndPara ( TRUE );
- String aTmp ( SW_RES ( STR_SW_TEAM_NAMES ) );
- pWrtShell->Insert ( aTmp );
- SvxAdjustItem aAdjustItem( SVX_ADJUST_CENTER, RES_PARATR_ADJUST );
- pWrtShell->SetAttr( aAdjustItem );
- pWrtShell->SttPara ();
- pWrtShell->SplitNode();
- pWrtShell->Left(CRSR_SKIP_CHARS, FALSE, 1, FALSE );
- SvxWeightItem aWeightItem ( WEIGHT_BOLD, RES_CHRATR_WEIGHT );
- pWrtShell->Insert ( String ( RTL_CONSTASCII_USTRINGPARAM ( "The StarWriter team!" ) ) );
- pWrtShell->SttPara ( TRUE );
- pWrtShell->SetAttr( aWeightItem);
- pWrtShell->GotoFly ( sTeamCredits);
- pWrtShell->EndAllAction();
- pWrtShell->EndUndo( UNDO_INSGLOSSARY );
- }
- else
- {
- String aTmp( SW_RES(STR_NOGLOS));
- aTmp.SearchAndReplaceAscii("%1", aShortName);
- InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
-
- }
+ String aTmp( SW_RES(STR_NOGLOS));
+ aTmp.SearchAndReplaceAscii("%1", aShortName);
+ InfoBox( pWrtShell->GetView().GetWindow(), aTmp ).Execute();
}
return FALSE;
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index c6b0ad4a136f..53770059cbcd 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -1304,7 +1304,7 @@ void SwPostItMgr::Delete()
CalcRects();
LayoutPostIts();
}
-
+#if 0
void SwPostItMgr::Hide(SwPostItField* pPostItField )
{
for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
@@ -1323,7 +1323,7 @@ void SwPostItMgr::Hide(SwPostItField* pPostItField )
LayoutPostIts();
}
-
+#endif
void SwPostItMgr::Hide( const String& rAuthor )
{
for(SwSidebarItem_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
@@ -1398,30 +1398,6 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie
return NULL;
}
-bool SwPostItMgr::ShowPreview(const SwField* pFld, SwFmtFld*& pFmtFld) const
-{
- for (unsigned long n=0;n<mPages.size();n++)
- {
- if (mPages[n]->mList->size()>0)
- {
- for(const_iterator i = mPages[n]->mList->begin(); i!= mPages[n]->mList->end(); i++)
- {
- if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld()==pFld) )
- {
- pFmtFld = (*i)->GetFmtFld();
- const long aSidebarheight = mPages[n]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0;
- bool bTopPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() >= (mPages[n]->mPageRect.Top()+aSidebarheight);
- bool bBottomPage = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()+(*i)->pPostIt->GetSizePixel().Height())).Y() <= (mPages[n]->mPageRect.Bottom()-aSidebarheight);
- const bool bTopVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y())).Y() > mpView->GetVisArea().Top();
- const bool bBottomVis = mpEditWin->PixelToLogic(Point(0,(*i)->pPostIt->GetPosPixel().Y()/*+(*i)->pPostIt->GetSizePixel().Height()*/)).Y() <= mpView->GetVisArea().Bottom();
- return !(bBottomPage && bTopPage && bBottomVis && bTopVis);
- }
- }
- }
- }
- return false;
-}
-
SwSidebarWin* SwPostItMgr::GetNextPostIt( USHORT aDirection,
SwSidebarWin* aPostIt )
{
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index cce6db3a891b..cce6db3a891b 100644..100755
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
diff --git a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
index 3ab86b3469d7..dd3e7e2dce9b 100644
--- a/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/ui/inc/SwSpellDialogChildWindow.hxx
@@ -48,8 +48,8 @@ class SwSpellDialogChildWindow
void LockFocusNotification(bool bLock);
protected:
- virtual svx::SpellPortions GetNextWrongSentence (void);
- virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged);
+ virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck);
+ virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck);
virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage);
virtual bool HasAutoCorrection();
virtual bool HasGrammarChecking();
diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
index c59bb1535bad..d63149eb7c4f 100644
--- a/sw/source/ui/inc/view.hxx
+++ b/sw/source/ui/inc/view.hxx
@@ -580,7 +580,7 @@ public:
BOOL HasDrwObj(SdrObject *pSdrObj) const;
BOOL HasOnlyObj(SdrObject *pSdrObj, UINT32 eObjInventor) const;
BOOL BeginTextEdit( SdrObject* pObj, SdrPageView* pPV=NULL,
- Window* pWin=NULL, BOOL bIsNewObj=FALSE);
+ Window* pWin=NULL, bool bIsNewObj=false, bool bSetSelectionToStart=false );
void StateTabWin(SfxItemSet&);
diff --git a/sw/source/ui/ribbar/makefile.mk b/sw/source/ui/ribbar/makefile.mk
index 72acc793070a..2405d4b16d9f 100644
--- a/sw/source/ui/ribbar/makefile.mk
+++ b/sw/source/ui/ribbar/makefile.mk
@@ -45,6 +45,11 @@ SRC1FILES = \
tblctrl.src \
workctrl.src
+EXCEPTIONSFILES = \
+ $(SLO)$/tblctrl.obj \
+ $(SLO)$/tbxanchr.obj \
+ $(SLO)$/workctrl.obj
+
SLOFILES = \
$(SLO)$/inputwin.obj \
$(SLO)$/tbxanchr.obj \
diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx
index 0cee102729a7..0500b4a88310 100644
--- a/sw/source/ui/shells/basesh.cxx
+++ b/sw/source/ui/shells/basesh.cxx
@@ -703,8 +703,9 @@ void SwBaseShell::Execute(SfxRequest &rReq)
rSh.EndSelect();
}
BOOL bRet = rSh.MoveFldType(pFldType, nSlot == FN_GOTO_NEXT_MARK);
- if (bRet)
- rSh.ClickToField(*rSh.GetCurFld());
+ SwField* pCurField = bRet ? rSh.GetCurFld() : 0;
+ if (pCurField)
+ rSh.ClickToField(*pCurField);
rReq.SetReturnValue(SfxBoolItem( nSlot, bRet));
}
}
diff --git a/sw/source/ui/shells/makefile.mk b/sw/source/ui/shells/makefile.mk
index e9a03a5a41cc..dce62a2c9336 100644
--- a/sw/source/ui/shells/makefile.mk
+++ b/sw/source/ui/shells/makefile.mk
@@ -83,6 +83,7 @@ EXCEPTIONSFILES = \
$(SLO)$/drwtxtsh.obj \
$(SLO)$/frmsh.obj \
$(SLO)$/drwtxtex.obj \
+ $(SLO)$/slotadd.obj \
$(SLO)$/textsh1.obj
# --- Tagets -------------------------------------------------------
diff --git a/sw/source/ui/uiview/makefile.mk b/sw/source/ui/uiview/makefile.mk
index d06bb58a7dab..337ee85da580 100644
--- a/sw/source/ui/uiview/makefile.mk
+++ b/sw/source/ui/uiview/makefile.mk
@@ -49,8 +49,13 @@ EXCEPTIONSFILES= \
$(SLO)$/swcli.obj \
$(SLO)$/uivwimp.obj \
$(SLO)$/view.obj \
+ $(SLO)$/view0.obj \
+ $(SLO)$/view1.obj \
$(SLO)$/view2.obj \
+ $(SLO)$/viewdraw.obj \
+ $(SLO)$/viewport.obj \
$(SLO)$/viewprt.obj \
+ $(SLO)$/viewsrch.obj \
$(SLO)$/viewling.obj \
$(SLO)$/viewmdi.obj \
diff --git a/sw/source/ui/uiview/viewdraw.cxx b/sw/source/ui/uiview/viewdraw.cxx
index 7e35ca0049df..abae753c1b56 100644
--- a/sw/source/ui/uiview/viewdraw.cxx
+++ b/sw/source/ui/uiview/viewdraw.cxx
@@ -520,7 +520,8 @@ sal_Bool SwView::EnterDrawTextMode(const Point& aDocPos)
/******************************************************************************
* Beschreibung: DrawTextEditMode einschalten
******************************************************************************/
-sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin, sal_Bool bIsNewObj)
+sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
+ bool bIsNewObj, bool bSetSelectionToStart)
{
SwWrtShell *pSh = &GetWrtShell();
SdrView *pSdrView = pSh->GetDrawView();
@@ -606,7 +607,11 @@ sal_Bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, Window* pWin,
Color aBackground(pSh->GetShapeBackgrd());
pView->SetBackgroundColor(aBackground);
}
+
+ // editing should start at the end of text, spell checking at the beginning ...
ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
+ if (bSetSelectionToStart)
+ aNewSelection = ESelection();
pView->SetSelection(aNewSelection);
}
diff --git a/sw/source/ui/uno/makefile.mk b/sw/source/ui/uno/makefile.mk
index 32210b2162d6..0023fd52f55c 100644
--- a/sw/source/ui/uno/makefile.mk
+++ b/sw/source/ui/uno/makefile.mk
@@ -59,8 +59,7 @@ SLO1FILES = \
$(SLO)$/SwXFilterOptions.obj\
$(SLO)$/RefreshListenerContainer.obj \
$(SLO)$/unomodule.obj \
- $(SLO)$/unodoc.obj \
- $(SLO)$/warnpassword.obj
+ $(SLO)$/unodoc.obj
SLO2FILES = \
$(SLO)$/swdetect.obj \
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index a4167da88748..0579d180a04c 100755..100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -114,6 +114,8 @@
#include <drawdoc.hxx>
#include <SwStyleNameMapper.hxx>
#include <osl/file.hxx>
+#include <comphelper/storagehelper.hxx>
+
// --> FME 2004-06-08 #i12836# enhanced pdf export
#include <EnhancedPDFExportHelper.hxx>
@@ -3152,16 +3154,13 @@ uno::Reference< util::XCloneable > SwXTextDocument::createClone( ) throw (uno::
if(!IsValid())
throw RuntimeException();
//create a new document - hidden - copy the storage and return it
- SwDoc* pCopyDoc = pDocShell->GetDoc()->CreateCopy();
- SfxObjectShell* pShell = new SwDocShell( pCopyDoc, SFX_CREATE_MODE_STANDARD );
- pShell->DoInitNew();
-
- uno::Reference< embed::XStorage > xSourceStorage = getDocumentStorage();
+ SfxObjectShell* pShell = pDocShell->GetDoc()->CreateCopy(false);
uno::Reference< frame::XModel > xNewModel = pShell->GetModel();
- //copy this storage
+ uno::Reference< embed::XStorage > xNewStorage = ::comphelper::OStorageHelper::GetTemporaryStorage( );
+ uno::Sequence< beans::PropertyValue > aTempMediaDescriptor;
+ storeToStorage( xNewStorage, aTempMediaDescriptor );
uno::Reference< document::XStorageBasedDocument > xStorageDoc( xNewModel, uno::UNO_QUERY );
- uno::Reference< embed::XStorage > xNewStorage = xStorageDoc->getDocumentStorage();
- xSourceStorage->copyToStorage( xNewStorage );
+ xStorageDoc->loadFromStorage( xNewStorage, aTempMediaDescriptor );
return uno::Reference< util::XCloneable >( xNewModel, UNO_QUERY );
}
/* -----------------------------20.06.00 09:54--------------------------------
diff --git a/sw/source/ui/uno/warnpassword.cxx b/sw/source/ui/uno/warnpassword.cxx
deleted file mode 100644
index cd121226a5f1..000000000000
--- a/sw/source/ui/uno/warnpassword.cxx
+++ /dev/null
@@ -1,86 +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_sw.hxx"
-// ============================================================================
-#include "warnpassword.hxx"
-#include <com/sun/star/task/XInteractionHandler.hpp>
-#include <svl/itemset.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/sfxsids.hrc>
-#include <ucbhelper/simpleinteractionrequest.hxx>
-#include <com/sun/star/ucb/InteractiveAppException.hpp>
-#include <svx/svxerr.hxx>
-
-using ::rtl::OUString;
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::ucb;
-using namespace ::com::sun::star::task;
-
-bool SwWarnPassword::WarningOnPassword( SfxMedium& rMedium )
-{
- bool bReturn = true;
- uno::Reference< task::XInteractionHandler > xHandler( rMedium.GetInteractionHandler());
- if( xHandler.is() )
- {
-
- OUString empty;
- uno::Any xException( makeAny(InteractiveAppException(empty,
- uno::Reference <XInterface> (),
- InteractionClassification_QUERY,
- ERRCODE_SVX_EXPORT_FILTER_CRYPT)));
-
- uno::Reference< ucbhelper::SimpleInteractionRequest > xRequest
- = new ucbhelper::SimpleInteractionRequest(
- xException,
- ucbhelper::CONTINUATION_APPROVE
- | ucbhelper::CONTINUATION_DISAPPROVE );
-
- xHandler->handle( xRequest.get() );
-
- const sal_Int32 nResp = xRequest->getResponse();
-
- switch ( nResp )
- {
- case ucbhelper::CONTINUATION_UNKNOWN:
- break;
-
- case ucbhelper::CONTINUATION_APPROVE:
- // Continue
- break;
-
- case ucbhelper::CONTINUATION_DISAPPROVE:
- bReturn = false;
- break;
- }
- }
- return bReturn;
-}
-
diff --git a/sw/source/ui/utlui/makefile.mk b/sw/source/ui/utlui/makefile.mk
index 7f2aa91c0e11..cded61eee357 100644
--- a/sw/source/ui/utlui/makefile.mk
+++ b/sw/source/ui/utlui/makefile.mk
@@ -51,15 +51,15 @@ SRC1FILES = \
EXCEPTIONSFILES= \
$(SLO)$/bookctrl.obj \
+ $(SLO)$/glbltree.obj \
$(SLO)$/navipi.obj \
$(SLO)$/unotools.obj \
+ $(SLO)$/content.obj \
$(SLO)$/swrenamexnameddlg.obj
SLOFILES = $(EXCEPTIONSFILES) \
$(SLO)$/condedit.obj \
- $(SLO)$/content.obj \
$(SLO)$/gloslst.obj \
- $(SLO)$/glbltree.obj \
$(SLO)$/initui.obj \
$(SLO)$/navicfg.obj \
$(SLO)$/numfmtlb.obj \
diff --git a/testautomation/extensions/optional/input/platform/extensions.info b/testautomation/extensions/optional/input/platform/extensions.info
index 09424d0db666..fdcda07205aa 100755
--- a/testautomation/extensions/optional/input/platform/extensions.info
+++ b/testautomation/extensions/optional/input/platform/extensions.info
@@ -125,7 +125,7 @@ Name=Single Platform: os2_x86
[24]
File=solaris_sparc.oxt
-Platform=Solaris Sparc
+Platform=Solaris SPARC
Name=Single Platform: solaris_sparc
[25]
diff --git a/testautomation/framework/optional/includes/basic_gridcontrol.inc b/testautomation/framework/optional/includes/basic_gridcontrol.inc
index f2d2f74cbdd4..b23e2318d657 100755
--- a/testautomation/framework/optional/includes/basic_gridcontrol.inc
+++ b/testautomation/framework/optional/includes/basic_gridcontrol.inc
@@ -55,6 +55,7 @@ testcase tGridcontrolLoad
printlog "Start the macro, that performs the test"
Kontext "GridControlDialogStarter"
+ ' FAILS IF DOCUMENT IS READONLY....
ShowGridcontrol.typeKeys "<space>"
Kontext "GridControlDialog"
if GridControlDialog.exists(5) then
@@ -63,6 +64,37 @@ testcase tGridcontrolLoad
printlog " " + i + ":"+a+": '" + gridcontrolcontrol.getitemtype (i,a) + "' '" + gridcontrolcontrol.getitemtext (i,a) + "'"
next a
next i
+ gridcontrolcontrol.select 5
+
+ kontext
+ if active.exists(5) then
+ printlog active.gettext
+ active.ok
+ else
+ warnlog "No selection Event by .select"
+ endif
+
+ Kontext "GridControlDialog"
+ gridcontrolcontrol.typeKeys("<down>")
+
+ kontext
+ if active.exists(5) then
+ printlog active.gettext
+ active.ok
+ else
+ warnlog "No selection event by .typeKeys <down>"
+ endif
+ Kontext "GridControlDialog"
+ gridcontrolcontrol.typeKeys("<up>")
+ kontext
+ if active.exists(5) then
+ printlog active.gettext
+ active.ok
+ else
+ warnlog "No selection event by .typeKeys <up>"
+ endif
+
+ Kontext "GridControlDialog"
GridControlDialog.close
else
warnlog "Gridcontrol Dialog did not come up after pressing button"
@@ -75,3 +107,4 @@ testcase tGridcontrolLoad
endif
endcase
+
diff --git a/testautomation/framework/optional/input/gridcontrol.odt b/testautomation/framework/optional/input/gridcontrol.odt
index d11d70cfbc09..46be0c44a065 100755
--- a/testautomation/framework/optional/input/gridcontrol.odt
+++ b/testautomation/framework/optional/input/gridcontrol.odt
Binary files differ
diff --git a/testautomation/framework/required/includes/script_organizers.inc b/testautomation/framework/required/includes/script_organizers.inc
index feb72680c9c3..6d14b7f77f6e 100755
--- a/testautomation/framework/required/includes/script_organizers.inc
+++ b/testautomation/framework/required/includes/script_organizers.inc
@@ -32,21 +32,39 @@
'\******************************************************************************
testcase tUpdtScriptCount
+ dim sDialog as string
printlog( "Resource test for macros and scripts / related dialogs" )
const SCRIPTING_DIALOGS = 5
dim aScriptCount( SCRIPTING_DIALOGS )
+ ' JavaScript
aScriptCount( 1 ) = 10
+ ' BeanShell
aScriptCount( 2 ) = 14
- aScriptCount( 3 ) = 10
- if ( gOOo ) then
- aScriptCount( 4 ) = 585
- aScriptCount( 5 ) = 601
- else
- aScriptCount( 4 ) = 586
- aScriptCount( 5 ) = 602
- endif
+ if ( lcase( gPlatform ) = "osx" ) then
+ ' Python
+ aScriptCount( 3 ) = 8
+ else
+ ' Python
+ aScriptCount( 3 ) = 10
+ endif
+ if ( lcase( gPlatform ) = "osx" ) then
+ ' Run Macro
+ aScriptCount( 5 ) = 600
+ else
+ ' Run Macro
+ aScriptCount( 5 ) = 602
+ endif
+ if ( gOOo ) then
+ ' Makro Organizer
+ aScriptCount( 4 ) = 585
+ ' Run Macro
+ aScriptCount( 5 ) = aScriptCount( 5 ) - 1
+ else
+ ' Makro Organizer
+ aScriptCount( 4 ) = 586
+ endif
dim iCurrentDialog as integer
dim iCurrentScriptCount as integer
@@ -57,37 +75,39 @@ testcase tUpdtScriptCount
printlog( "" )
select case iCurrentDialog
- case 1: printlog( "JavaScript" )
+ case 1: sDialog = "JavaScript"
ToolsMacrosOrganizeMacrosJavaScript
kontext "ScriptOrganizer"
iCurrentScriptCount = hExpandAllNodes( ScriptTreeList )
ScriptOrganizer.cancel()
- case 2: printlog( "BeanShell" )
+ case 2: sDialog = "BeanShell"
ToolsMacrosOrganizeMacrosBeanShell
kontext "ScriptOrganizer"
iCurrentScriptCount = hExpandAllNodes( ScriptTreeList )
ScriptOrganizer.cancel()
- case 3: printlog( "Python" )
+ case 3: sDialog = "Python"
ToolsMacrosOrganizeMacrosPython
kontext "ScriptOrganizer"
iCurrentScriptCount = hExpandAllNodes( ScriptTreeList )
ScriptOrganizer.cancel()
- case 4: printlog( "Makro Organizer" )
+ case 4: sDialog = "Makro Organizer"
ToolsMacro_uno
Kontext "Makro"
hExpandAllNodes( MakroAus )
iCurrentScriptCount = hGetScriptCount( MakroAus, MakroListe )
Makro.close()
- case 5: printlog( "Run Macro" )
+ case 5: sDialog = "Run Macro"
ToolsMacrosRunMacro
kontext "ScriptSelector"
hExpandAllNodes( LibraryTreeList )
iCurrentScriptCount = hGetScriptCount( LibraryTreeList, ScriptList )
ScriptSelector.cancel()
end select
+
+ printlog sDialog
if ( aScriptCount( iCurrentDialog ) <> iCurrentScriptCount ) then
- warnlog( "Incorrect number of scripts for this dialog: " & iCurrentScriptCount )
+ warnlog( "Incorrect number of scripts for this dialog: '" + sDialog + "' expected:" + aScriptCount( iCurrentDialog ) + ", but is:" & iCurrentScriptCount )
else
printlog( "Number of scripts is ok" )
endif
@@ -95,7 +115,6 @@ testcase tUpdtScriptCount
next iCurrentDialog
hCloseDocument()
-
endcase
diff --git a/testautomation/global/input/officeinfo.txt b/testautomation/global/input/officeinfo.txt
index 240e166be84b..430e4141e3dd 100644
--- a/testautomation/global/input/officeinfo.txt
+++ b/testautomation/global/input/officeinfo.txt
@@ -1,6 +1,5 @@
[Current program versions]
-Oracle Open Office=3.2
-OpenOffice.org=3.1
-BrOffice.org=3.1
-Oracle Open Office=3.2
+OpenOffice.org=3.3
+BrOffice.org=3.3
+Oracle Open Office=3.3
diff --git a/testautomation/graphics/optional/includes/global/export_graphic.inc b/testautomation/graphics/optional/includes/global/export_graphic.inc
index d60872022166..7c16129e41ae 100644
--- a/testautomation/graphics/optional/includes/global/export_graphic.inc
+++ b/testautomation/graphics/optional/includes/global/export_graphic.inc
@@ -119,7 +119,11 @@ testcase tEPS
sleep 5
hNewDocument()
sleep 5
+ if ( lcase( gPlatform ) <> "osx" ) then
Call hGrafikEinfuegen ( OutputGrafikTBO+sExt )
+ else
+ qaErrorLog "#i100253# crash on MacOS X 10.4"
+ endif
endif
call hCloseDocument
diff --git a/testautomation/math/required/includes/m_005_.inc b/testautomation/math/required/includes/m_005_.inc
index 2b567c628b18..bb580b9bd9c3 100644..100755
--- a/testautomation/math/required/includes/m_005_.inc
+++ b/testautomation/math/required/includes/m_005_.inc
@@ -168,6 +168,7 @@ testcase tToolsExtensionManager
dim sTemp2 as string
dim x as integer
+ if ( lcase( gPlatform ) <> "osx" ) then
sPath = convertPath(gTestToolPath+"math/required/input/")
'/// open application ///'
Call hNewDocument
@@ -306,4 +307,7 @@ testcase tToolsExtensionManager
warnlog "Couldn't call Tools -> Package manager - aborting test"
endif
Call hCloseDocument
+ else
+ qaErrorLog "Do not run on macosx - not reproduceable error"
+ endif
endcase
diff --git a/testautomation/writer/optional/includes/regexp/search.inc b/testautomation/writer/optional/includes/regexp/search.inc
index ccd959504900..c53ff6250461 100755
--- a/testautomation/writer/optional/includes/regexp/search.inc
+++ b/testautomation/writer/optional/includes/regexp/search.inc
@@ -79,13 +79,13 @@ testcase tCheckDialog
if SearchAll.IsEnabled then Warnlog "Without Search-for-entry Find-All is active!"
if SearchNow.IsEnabled then Warnlog "Without Search-for-entry Find is active!"
if ReplaceAll.IsEnabled then Warnlog "Without Search-for-entry Replace-All is active!"
- if Replace.IsEnabled then Warnlog "Without Search-for-entry Replace is active!"
+ if ReplaceBtn.IsEnabled then Warnlog "Without Search-for-entry Replace is active!"
if NoFormat.IsEnabled then Warnlog "Without selecting Formats , No-Format is active!"
SearchFor.SetText "Hallo"
if NOT SearchAll.IsEnabled then Warnlog "Containing Search-for-entry Find-All is inactive!"
if NOT SearchNow.IsEnabled then Warnlog "Containing Search-for-entry Find inactive!"
if NOT ReplaceAll.IsEnabled then Warnlog "Containing Search-for-entry Replace-All is inactive!"
- if NOT Replace.IsEnabled then Warnlog "Containing Search-for-entry Replace is inactive!"
+ if NOT ReplaceBtn.IsEnabled then Warnlog "Containing Search-for-entry Replace is inactive!"
Sleep 5
printlog "- Dependencies of Format-Properties"
diff --git a/testautomation/writer/tools/includes/w_tools.inc b/testautomation/writer/tools/includes/w_tools.inc
index 8fa05c23bbc9..122a44f7da53 100644..100755
--- a/testautomation/writer/tools/includes/w_tools.inc
+++ b/testautomation/writer/tools/includes/w_tools.inc
@@ -1052,7 +1052,10 @@ sub wOptionsUndo ( sOption$ )
Call hToolsOptions("WRITER","Autocaption")
for i = 1 to ObjectList.GetItemCount
ObjectList.Select i
- ObjectList.UnCheck
+ ' uncheck only if checked, else it might crash on macosx, see issue 111883 for further information
+ if ObjectList.getState (i) > 1 then
+ ObjectList.UnCheck
+ endif
next i
end if
diff --git a/toolkit/inc/toolkit/awt/vclxwindow.hxx b/toolkit/inc/toolkit/awt/vclxwindow.hxx
index 97f36850dff9..6ad3c3ab6076 100644
--- a/toolkit/inc/toolkit/awt/vclxwindow.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindow.hxx
@@ -51,6 +51,7 @@
#include <stdarg.h>
#include <list>
+#include <boost/function.hpp>
class Window;
class VclSimpleEvent;
@@ -114,6 +115,23 @@ protected:
::cppu::OInterfaceContainerHelper& GetTopWindowListeners();
public:
+ typedef ::boost::function0< void > Callback;
+
+protected:
+ /** executes the given callback asynchronously
+
+ At the moment the callback is called, the Solar Mutex is not locked. In particular, this implies that
+ you cannot rely on |this| not being disposed. However, you *can* rely on |this| being still alive (i.e.
+ having a ref count > 0).
+
+ As a consequence, this can be used for doing listener notifications, using event multiplexers. Those multiplexers
+ care for the disposed state themself, and are alive as long as |this| is alive.
+ */
+ void ImplExecuteAsyncWithoutSolarLock(
+ const Callback& i_callback
+ );
+
+public:
VCLXWindow( bool bWithDefaultProps = false );
~VCLXWindow();
diff --git a/toolkit/inc/toolkit/awt/vclxwindows.hxx b/toolkit/inc/toolkit/awt/vclxwindows.hxx
index c334e4d9af65..ca3267bffb5e 100644
--- a/toolkit/inc/toolkit/awt/vclxwindows.hxx
+++ b/toolkit/inc/toolkit/awt/vclxwindows.hxx
@@ -75,7 +75,7 @@
#include <com/sun/star/awt/XFixedHyperlink.hpp>
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/awt/XDialog.hpp>
+#include <com/sun/star/awt/XDialog2.hpp>
#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/awt/XCurrencyField.hpp>
#include <com/sun/star/awt/XPatternField.hpp>
@@ -83,7 +83,9 @@
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XImageConsumer.hpp>
+#include <com/sun/star/awt/XItemListListener.hpp>
#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/implbase2.hxx>
#include "toolkit/awt/vclxwindow.hxx"
@@ -388,7 +390,7 @@ public:
// ----------------------------------------------------
// class VCLXDialog
// ----------------------------------------------------
-class VCLXDialog : public ::com::sun::star::awt::XDialog,
+class VCLXDialog : public ::com::sun::star::awt::XDialog2,
public VCLXTopWindow
{
public:
@@ -404,6 +406,10 @@ public:
::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::awt::XDialog2
+ virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::awt::XDialog
void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
::rtl::OUString SAL_CALL getTitle( ) throw(::com::sun::star::uno::RuntimeException);
@@ -677,9 +683,12 @@ public:
// ----------------------------------------------------
// class VCLXListBox
// ----------------------------------------------------
-class VCLXListBox : public ::com::sun::star::awt::XListBox,
- public ::com::sun::star::awt::XTextLayoutConstrains,
- public VCLXWindow
+typedef ::cppu::ImplInheritanceHelper3 < VCLXWindow
+ , ::com::sun::star::awt::XListBox
+ , ::com::sun::star::awt::XTextLayoutConstrains
+ , ::com::sun::star::awt::XItemListListener
+ > VCLXListBox_Base;
+class VCLXListBox : public VCLXListBox_Base
{
private:
ActionListenerMultiplexer maActionListeners;
@@ -694,16 +703,6 @@ protected:
public:
VCLXListBox();
- // ::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);
@@ -744,6 +743,16 @@ 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/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index b6a0e66b2430..0c5731d3f923 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -36,7 +36,7 @@
#include <com/sun/star/util/XChangesListener.hpp>
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/beans/XPropertyChangeListener.hpp>
-#include <com/sun/star/awt/XDialog.hpp>
+#include <com/sun/star/awt/XDialog2.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
#include <cppuhelper/implbase6.hxx>
#include <cppuhelper/implbase5.hxx>
@@ -186,7 +186,7 @@ protected:
// ----------------------------------------------------
typedef ::cppu::ImplHelper6 < ::com::sun::star::container::XContainerListener
, ::com::sun::star::awt::XTopWindow
- , ::com::sun::star::awt::XDialog
+ , ::com::sun::star::awt::XDialog2
, ::com::sun::star::util::XChangesListener
, ::com::sun::star::util::XModifyListener
, ::com::sun::star::awt::XWindowListener
@@ -272,6 +272,10 @@ public:
void SAL_CALL elementRemoved( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL elementReplaced( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::awt::XDialog2
+ virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpId( ::sal_Int32 Id ) throw (::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::awt::XDialog
void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
index 7ac858a6a7b7..46f31947b276 100644
--- a/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/roadmapcontrol.hxx
@@ -132,15 +132,9 @@ namespace toolkit{
// ::com::sun::star::io::XPersistObject
::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::beans::XMultiPropertySet
-// ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
-
-
// ::com::sun::star::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoControlRoadmapModel, UnoControlModel, szServiceName2_UnoControlRoadmapModel )
-// void ImplPropertyChanged( sal_uInt16 nPropId );
-
sal_Int32 SAL_CALL getCount() throw (RuntimeException);
virtual Any SAL_CALL getByIndex( sal_Int32 Index ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException );
diff --git a/toolkit/inc/toolkit/controls/unocontrol.hxx b/toolkit/inc/toolkit/controls/unocontrol.hxx
index 578b5070e8e8..0515abe27128 100644
--- a/toolkit/inc/toolkit/controls/unocontrol.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrol.hxx
@@ -38,6 +38,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/awt/XUnitConversion.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <cppuhelper/weakagg.hxx>
#include <osl/mutex.hxx>
@@ -46,7 +47,7 @@
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/weakref.hxx>
-#include <cppuhelper/implbase7.hxx>
+#include <cppuhelper/implbase8.hxx>
#include <com/sun/star/util/XModeChangeBroadcaster.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
@@ -73,13 +74,14 @@ struct UnoControl_Data;
// ----------------------------------------------------
// class UnoControl
// ----------------------------------------------------
-typedef ::cppu::WeakAggImplHelper7 < ::com::sun::star::awt::XControl
+typedef ::cppu::WeakAggImplHelper8 < ::com::sun::star::awt::XControl
, ::com::sun::star::awt::XWindow2
, ::com::sun::star::awt::XView
, ::com::sun::star::beans::XPropertiesChangeListener
, ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::accessibility::XAccessible
, ::com::sun::star::util::XModeChangeBroadcaster
+ , ::com::sun::star::awt::XUnitConversion
> UnoControl_Base;
class TOOLKIT_DLLPUBLIC UnoControl : public UnoControl_Base
@@ -119,7 +121,7 @@ protected:
::osl::Mutex& GetMutex() { return maMutex; }
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > getParentPeer() const;
- void updateFromModel();
+ virtual void updateFromModel();
void peerCreated();
bool ImplCheckLocalize( ::rtl::OUString& _rPossiblyLocalizable );
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > ImplGetCompatiblePeer( sal_Bool bAcceptExistingPeer );
@@ -220,6 +222,12 @@ public:
virtual void SAL_CALL addModeChangeApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeApproveListener >& _rxListener ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeModeChangeApproveListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModeChangeApproveListener >& _rxListener ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ // XUnitConversion
+ virtual ::com::sun::star::awt::Point SAL_CALL convertPointToLogic( const ::com::sun::star::awt::Point& Point, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL convertPointToPixel( const ::com::sun::star::awt::Point& aPoint, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToLogic( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 TargetUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL convertSizeToPixel( const ::com::sun::star::awt::Size& aSize, ::sal_Int16 SourceUnit ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
private:
// ::com::sun::star::beans::XPropertiesChangeListener
void SAL_CALL propertiesChange( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyChangeEvent >& evt ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
index 2de5e36aa02c..a443cb4d2d6b 100644
--- a/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrolmodel.hxx
@@ -74,7 +74,6 @@ protected:
void ImplRegisterProperties( const std::list< sal_uInt16 > &rIds );
void ImplRegisterProperty( sal_uInt16 nPropId, const ::com::sun::star::uno::Any& rDefault );
::com::sun::star::uno::Sequence<sal_Int32> ImplGetPropertyIds() const;
- virtual void ImplPropertyChanged( sal_uInt16 nPropId );
virtual ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
sal_Bool ImplHasProperty( sal_uInt16 nPropId ) const;
diff --git a/toolkit/inc/toolkit/controls/unocontrols.hxx b/toolkit/inc/toolkit/controls/unocontrols.hxx
index a4015dfd3b44..88449418c70a 100644
--- a/toolkit/inc/toolkit/controls/unocontrols.hxx
+++ b/toolkit/inc/toolkit/controls/unocontrols.hxx
@@ -51,6 +51,7 @@
#include <com/sun/star/awt/XCurrencyField.hpp>
#include <com/sun/star/awt/XPatternField.hpp>
#include <com/sun/star/awt/XProgressBar.hpp>
+#include <com/sun/star/awt/XItemList.hpp>
#include <com/sun/star/graphic/XGraphicObject.hpp>
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/controls/unocontrolbase.hxx>
@@ -58,12 +59,17 @@
#include <toolkit/helper/servicenames.hxx>
#include <vcl/imgcons.hxx>
#include <vcl/bitmapex.hxx>
+#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/uno3.hxx>
#include <list>
+#include <vector>
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/optional.hpp>
#define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
#define UNO_NAME_GRAPHOBJ_URLPKGPREFIX "vnd.sun.star.Package:"
@@ -751,19 +757,18 @@ public:
// ----------------------------------------------------
// class UnoControlListBoxModel
// ----------------------------------------------------
-class UnoControlListBoxModel : public UnoControlModel
+struct UnoControlListBoxModel_Data;
+typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
+ , ::com::sun::star::awt::XItemList
+ > UnoControlListBoxModel_Base;
+class UnoControlListBoxModel :public UnoControlListBoxModel_Base
{
-protected:
- ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
- ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
-
public:
UnoControlListBoxModel();
- UnoControlListBoxModel( const UnoControlListBoxModel& rModel ) : UnoControlModel( rModel ) {;}
+ UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
UnoControlModel* Clone() const { return new UnoControlListBoxModel( *this ); }
- void ImplPropertyChanged( sal_uInt16 nPropId );
virtual void ImplNormalizePropertySequence(
const sal_Int32 _nCount, /// the number of entries in the arrays
sal_Int32* _pHandles, /// the handles of the properties to set
@@ -780,41 +785,87 @@ public:
// ::com::sun::star::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel )
+ // ::com::sun::star::awt::XItemList
+ virtual ::sal_Int32 SAL_CALL getItemCount() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertItem( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL insertItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItem( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeAllItems( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemText( ::sal_Int32 Position, const ::rtl::OUString& ItemText ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const ::rtl::OUString& ItemText, const ::rtl::OUString& ItemImageURL ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setItemData( ::sal_Int32 Position, const ::com::sun::star::uno::Any& DataValue ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getItemData( ::sal_Int32 Position ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL getAllItems( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeItemListListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListListener >& Listener ) 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);
+
+protected:
+ ::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+ ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+private:
+ void impl_notifyItemListEvent_nolck(
+ const sal_Int32 i_nItemPosition,
+ const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ void ( SAL_CALL ::com::sun::star::awt::XItemListListener::*NotificationMethod )( const ::com::sun::star::awt::ItemListEvent& )
+ );
+
+ void impl_handleInsert(
+ const sal_Int32 i_nItemPosition,
+ const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ ::osl::ClearableMutexGuard& i_rClearBeforeNotify
+ );
+
+ void impl_handleRemove(
+ const sal_Int32 i_nItemPosition,
+ ::osl::ClearableMutexGuard& i_rClearBeforeNotify
+ );
+
+ void impl_handleModify(
+ const sal_Int32 i_nItemPosition,
+ const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ ::osl::ClearableMutexGuard& i_rClearBeforeNotify
+ );
+
+ void impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const;
+ void impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems );
+
+private:
+ ::boost::scoped_ptr< UnoControlListBoxModel_Data > m_pData;
+ ::cppu::OInterfaceContainerHelper m_aItemListListeners;
};
// ----------------------------------------------------
// class UnoListBoxControl
// ----------------------------------------------------
-class UnoListBoxControl : public UnoControlBase,
- public ::com::sun::star::awt::XListBox,
- public ::com::sun::star::awt::XItemListener,
- public ::com::sun::star::awt::XLayoutConstrains,
- public ::com::sun::star::awt::XTextLayoutConstrains
+typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase
+ , ::com::sun::star::awt::XListBox
+ , ::com::sun::star::awt::XItemListener
+ , ::com::sun::star::awt::XLayoutConstrains
+ , ::com::sun::star::awt::XTextLayoutConstrains
+ , ::com::sun::star::awt::XItemListListener
+ > UnoListBoxControl_Base;
+class UnoListBoxControl : public UnoListBoxControl_Base
{
-private:
- ActionListenerMultiplexer maActionListeners;
- ItemListenerMultiplexer maItemListeners;
-
public:
-
UnoListBoxControl();
::rtl::OUString GetComponentServiceName();
- void ImplUpdateSelectedItemsProperty();
- void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
-
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlBase::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);
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
- // ::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::awt::XListBox
void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& l ) throw(::com::sun::star::uno::RuntimeException);
@@ -851,9 +902,27 @@ public:
::com::sun::star::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException);
+ // XUnoControl
+ 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);
+
// ::com::sun::star::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox )
+protected:
+ void ImplUpdateSelectedItemsProperty();
+ virtual void ImplSetPeerProperty( const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rVal );
+ virtual void updateFromModel();
+
+private:
+ ActionListenerMultiplexer maActionListeners;
+ ItemListenerMultiplexer maItemListeners;
};
// ----------------------------------------------------
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index d5f484145316..f8a1a703799c 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -199,7 +199,9 @@ namespace rtl {
#define BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND 148
#define BASEPROPERTY_GRID_HEADER_BACKGROUND 149
#define BASEPROPERTY_GRID_LINE_COLOR 150
-#define BASEPROPERTY_GRID_ROW_BACKGROUND 151
+#define BASEPROPERTY_GRID_ROW_BACKGROUND 151
+#define BASEPROPERTY_MULTISELECTION_SIMPLEMODE 152
+#define BASEPROPERTY_ITEM_SEPARATOR_POS 153
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx
index 70f18f91fb09..96d9d5810cc0 100644
--- a/toolkit/inc/toolkit/helper/servicenames.hxx
+++ b/toolkit/inc/toolkit/helper/servicenames.hxx
@@ -98,8 +98,10 @@ extern const sal_Char __FAR_DATA szServiceName_DefaultGridDataModel[];
extern const sal_Char __FAR_DATA szServiceName_DefaultGridColumnModel[];
extern const sal_Char __FAR_DATA szServiceName_GridColumn[];
-extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName_UnoSimpleAnimationControlModel[];
-extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName_UnoThrobberControlModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[];
+extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[];
+extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[];
+extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[];
extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[];
// ExtUnoWrapper:
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index 1992a8d721a6..5e44df58318e 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -37,11 +37,13 @@
#include <cppuhelper/typeprovider.hxx>
#include <rtl/memory.h>
#include <rtl/uuid.h>
+#include <vos/mutex.hxx>
#include <vcl/menu.hxx>
#include <vcl/keycod.hxx>
#include <vcl/image.hxx>
#include <vcl/mnemonic.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/awt/KeyModifier.hpp>
@@ -416,6 +418,7 @@ void VCLXMenu::removeMenuListener( const ::com::sun::star::uno::Reference< ::com
void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_Int16 nItemStyle, sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -424,6 +427,7 @@ void VCLXMenu::insertItem( sal_Int16 nItemId, const ::rtl::OUString& aText, sal_
void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
sal_Int32 nItemCount = (sal_Int32)mpMenu->GetItemCount();
@@ -438,6 +442,7 @@ void VCLXMenu::removeItem( sal_Int16 nPos, sal_Int16 nCount ) throw(::com::sun::
sal_Int16 VCLXMenu::getItemCount( ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return mpMenu ? mpMenu->GetItemCount() : 0;
@@ -445,6 +450,7 @@ sal_Int16 VCLXMenu::getItemCount( ) throw(::com::sun::star::uno::RuntimeExcepti
sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return mpMenu ? mpMenu->GetItemId( nPos ) : 0;
@@ -452,6 +458,7 @@ sal_Int16 VCLXMenu::getItemId( sal_Int16 nPos ) throw(::com::sun::star::uno::Run
sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return mpMenu ? mpMenu->GetItemPos( nId ) : 0;
@@ -459,6 +466,7 @@ sal_Int16 VCLXMenu::getItemPos( sal_Int16 nId ) throw(::com::sun::star::uno::Run
void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -467,6 +475,7 @@ void VCLXMenu::enableItem( sal_Int16 nItemId, sal_Bool bEnable ) throw(::com::su
sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return mpMenu ? mpMenu->IsItemEnabled( nItemId ) : sal_False;
@@ -474,6 +483,7 @@ sal_Bool VCLXMenu::isItemEnabled( sal_Int16 nItemId ) throw(::com::sun::star::un
void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -482,6 +492,7 @@ void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) th
::rtl::OUString VCLXMenu::getItemText( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::rtl::OUString aItemText;
@@ -492,6 +503,7 @@ void VCLXMenu::setItemText( sal_Int16 nItemId, const ::rtl::OUString& aText ) th
void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu >& rxPopupMenu ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
VCLXMenu* pVCLMenu = VCLXMenu::GetImplementation( rxPopupMenu );
@@ -510,6 +522,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref
::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > VCLXMenu::getPopupMenu( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::com::sun::star::uno::Reference< ::com::sun::star::awt::XPopupMenu > aRef;
@@ -533,6 +546,7 @@ void VCLXMenu::setPopupMenu( sal_Int16 nItemId, const ::com::sun::star::uno::Ref
// ::com::sun::star::awt::XPopupMenu
void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -541,6 +555,7 @@ void VCLXMenu::insertSeparator( sal_Int16 nPos ) throw(::com::sun::star::uno::Ru
void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -549,6 +564,7 @@ void VCLXMenu::setDefaultItem( sal_Int16 nItemId ) throw(::com::sun::star::uno::
sal_Int16 VCLXMenu::getDefaultItem( ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return mpMenu ? mpMenu->GetDefaultItem() : 0;
@@ -556,6 +572,7 @@ sal_Int16 VCLXMenu::getDefaultItem( ) throw(::com::sun::star::uno::RuntimeExcep
void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -564,6 +581,7 @@ void VCLXMenu::checkItem( sal_Int16 nItemId, sal_Bool bCheck ) throw(::com::sun:
sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return mpMenu ? mpMenu->IsItemChecked( nItemId ) : sal_False;
@@ -571,6 +589,7 @@ sal_Bool VCLXMenu::isItemChecked( sal_Int16 nItemId ) throw(::com::sun::star::un
sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& rxWindowPeer, const ::com::sun::star::awt::Rectangle& rArea, sal_Int16 nFlags ) throw(::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
sal_Int16 nRet = 0;
@@ -582,6 +601,7 @@ sal_Int16 VCLXMenu::execute( const ::com::sun::star::uno::Reference< ::com::sun:
void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -590,6 +610,7 @@ void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aC
::rtl::OUString SAL_CALL VCLXMenu::getCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::rtl::OUString aItemCommand;
@@ -600,6 +621,7 @@ void SAL_CALL VCLXMenu::setCommand( sal_Int16 nItemId, const ::rtl::OUString& aC
void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString& aHelp ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -608,6 +630,7 @@ void SAL_CALL VCLXMenu::setHelpCommand( sal_Int16 nItemId, const ::rtl::OUString
::rtl::OUString SAL_CALL VCLXMenu::getHelpCommand( sal_Int16 nItemId ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::rtl::OUString aHelpCommand;
@@ -708,12 +731,14 @@ namespace
::sal_Bool SAL_CALL VCLXMenu::isPopupMenu( ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
return IsPopupMenu();
}
void SAL_CALL VCLXMenu::clear( ) throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
mpMenu->Clear();
@@ -724,6 +749,7 @@ void SAL_CALL VCLXMenu::clear( ) throw (::com::sun::star::uno::RuntimeException
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::com::sun::star::awt::MenuItemType aMenuItemType =
@@ -740,6 +766,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
void SAL_CALL VCLXMenu::hideDisabledEntries( ::sal_Bool bHide )
throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
{
@@ -761,6 +788,7 @@ throw (::com::sun::star::uno::RuntimeException)
::sal_Bool SAL_CALL VCLXMenu::isInExecute( )
throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -773,6 +801,7 @@ throw (::com::sun::star::uno::RuntimeException)
void SAL_CALL VCLXMenu::endExecute()
throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -783,6 +812,7 @@ throw (::com::sun::star::uno::RuntimeException)
void SAL_CALL VCLXMenu::setLogo( const ::com::sun::star::awt::MenuLogo& aMenuLogo )
throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
@@ -807,6 +837,7 @@ throw (::com::sun::star::uno::RuntimeException)
::com::sun::star::awt::MenuLogo SAL_CALL VCLXMenu::getLogo( )
throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::com::sun::star::awt::MenuLogo aAWTMenuLogo;
@@ -827,6 +858,7 @@ throw (::com::sun::star::uno::RuntimeException)
void SAL_CALL VCLXMenu::enableAutoMnemonics( ::sal_Bool bEnable )
throw (::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu )
{
@@ -843,6 +875,7 @@ void SAL_CALL VCLXMenu::setAcceleratorKeyEvent( ::sal_Int16 nItemId,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -858,6 +891,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::com::sun::star::awt::KeyEvent aKeyEvent;
@@ -876,6 +910,7 @@ void SAL_CALL VCLXMenu::setHelpText( ::sal_Int16 nItemId, const ::rtl::OUString&
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -890,6 +925,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
rtl::OUString sHelpText;
@@ -907,6 +943,7 @@ void SAL_CALL VCLXMenu::setTipHelpText( ::sal_Int16 nItemId, const ::rtl::OUStri
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -921,6 +958,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
rtl::OUString sTipHelpText;
@@ -939,6 +977,7 @@ void SAL_CALL VCLXMenu::setItemImage(
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -954,6 +993,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > rxGraphic;
@@ -973,6 +1013,7 @@ void SAL_CALL VCLXMenu::setItemImageAngle( ::sal_Int16 nItemId, ::sal_Int32 nAng
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -987,6 +1028,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
::sal_Int32 nItemImageAngle( 0 );
@@ -1003,6 +1045,7 @@ void SAL_CALL VCLXMenu::setItemImageMirrorMode( ::sal_Int16 nItemId, ::sal_Bool
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
if ( mpMenu && IsPopupMenu() )
@@ -1017,6 +1060,7 @@ throw ( ::com::sun::star::container::NoSuchElementException,
throw ( ::com::sun::star::container::NoSuchElementException,
::com::sun::star::uno::RuntimeException)
{
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
sal_Bool bMirrorMode( sal_False );
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 2eeafa73d2d2..f85e29c21099 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -632,7 +632,15 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
// Wenn die Component einen Parent braucht, dann NULL zurueckgeben,
// spaeter mal ::com::sun::star::uno::Exception...
sal_Bool bException = sal_True;
- if ( ( nType == WINDOW_DIALOG ) || ( nType == WINDOW_MODALDIALOG ) || ( nType == WINDOW_MODELESSDIALOG ) )
+ if ( ( nType == WINDOW_DIALOG )
+ || ( nType == WINDOW_MODALDIALOG )
+ || ( nType == WINDOW_MODELESSDIALOG )
+ || ( nType == WINDOW_MESSBOX )
+ || ( nType == WINDOW_INFOBOX )
+ || ( nType == WINDOW_WARNINGBOX )
+ || ( nType == WINDOW_ERRORBOX )
+ || ( nType == WINDOW_QUERYBOX )
+ )
bException = sal_False;
else if ( ( nType == WINDOW_WINDOW ) ||
( nType == WINDOW_WORKWINDOW ) ||
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 248571819067..dd4d56586b03 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -67,6 +67,8 @@
#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <boost/bind.hpp>
+
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
@@ -109,117 +111,15 @@ namespace
m_rFlag = false;
}
};
-
- //................................................................
- //. MouseEventType
- //................................................................
- enum MouseEventType
- {
- META_FIRST_MOUSE_EVENT = 0,
-
- EVENT_MOUSE_PRESSED = 0,
- EVENT_MOUSE_RELEASED = 1,
- EVENT_MOUSE_ENTERED = 2,
- EVENT_MOUSE_EXITED = 3,
-
- META_LAST_MOUSE_EVENT = 3
- };
-
- //................................................................
- //. PlainEventType
- //................................................................
- enum PlainEventType
- {
- META_FIRST_PLAIN_EVENT = 4,
-
- EVENT_WINDOW_ENABLED = 4,
- EVENT_WINDOW_DISABLED = 5,
-
- META_LAST_PLAIN_EVENT = 5
- };
-
-#if OSL_DEBUG_LEVEL > 0
- static void checkEventDefinitions()
- {
- OSL_ENSURE( (int)META_LAST_MOUSE_EVENT < (int)META_FIRST_PLAIN_EVENT, "checkEventDefinitions: invalid event definitions!" );
- }
- #define DBG_CHECK_EVENTS() checkEventDefinitions()
-#else
- #define DBG_CHECK_EVENTS()
-#endif
-
- //................................................................
- //. AnyWindowEvent
- //................................................................
- struct AnyWindowEvent : public ::comphelper::AnyEvent
- {
- private:
- awt::MouseEvent m_aMouseEvent;
- lang::EventObject m_aPlainEvent;
-
- sal_Int32 m_nEventType;
-
- public:
- AnyWindowEvent( const awt::MouseEvent& _rEvent, MouseEventType _nType )
- :comphelper::AnyEvent()
- ,m_aMouseEvent( _rEvent )
- ,m_nEventType( static_cast< sal_Int32 >( _nType ) )
- {
- DBG_CHECK_EVENTS();
- }
-
- AnyWindowEvent( const lang::EventObject& _rEvent, PlainEventType _nType )
- :comphelper::AnyEvent()
- ,m_aPlainEvent( _rEvent )
- ,m_nEventType( static_cast< sal_Int32 >( _nType ) )
- {
- DBG_CHECK_EVENTS();
- }
-
- bool isMouseEvent() const
- {
- return ( META_FIRST_MOUSE_EVENT <= m_nEventType ) && ( m_nEventType <= META_LAST_MOUSE_EVENT );
- }
-
- bool isPlainEvent() const
- {
- return ( META_FIRST_PLAIN_EVENT <= m_nEventType ) && ( m_nEventType <= META_LAST_PLAIN_EVENT );
- }
-
- const awt::MouseEvent& getMouseEvent() const
- {
- OSL_ENSURE( isMouseEvent(), "AnyWindowEvent::getMouseEvent: no mouse event!" );
- return m_aMouseEvent;
- }
-
- MouseEventType getMouseEventType() const
- {
- OSL_ENSURE( isMouseEvent(), "AnyWindowEvent::getMouseEventType: no mouse event!" );
- return static_cast< MouseEventType >( m_nEventType );
- }
-
- const lang::EventObject& getPlainEvent() const
- {
- OSL_ENSURE( isPlainEvent(), "AnyWindowEvent::getPlainEvent: no plain event!" );
- return m_aPlainEvent;
- }
-
- PlainEventType getPlainEventType() const
- {
- OSL_ENSURE( isPlainEvent(), "AnyWindowEvent::getPlainEventType: no mouse event!" );
- return static_cast< PlainEventType >( m_nEventType );
- }
- };
}
//====================================================================
//= VCLXWindowImpl
//====================================================================
-class SAL_DLLPRIVATE VCLXWindowImpl : public ::comphelper::IEventProcessor
+class SAL_DLLPRIVATE VCLXWindowImpl
{
private:
- typedef ::std::vector< ::rtl::Reference< ::comphelper::AnyEvent > >
- EventArray;
+ typedef ::std::vector< VCLXWindow::Callback > CallbackArray;
private:
VCLXWindow& mrAntiImpl;
@@ -243,8 +143,8 @@ private:
VclContainerListenerMultiplexer maContainerListeners;
TopWindowListenerMultiplexer maTopWindowListeners;
- EventArray maEvents;
- ULONG mnEventId;
+ CallbackArray maCallbackEvents;
+ ULONG mnCallbackEventId;
public:
bool mbDisposing : 1;
@@ -285,13 +185,9 @@ public:
void setDirectVisible( sal_Bool bDirectVisible ) { mbDirectVisible = bDirectVisible; }
sal_Bool isDirectVisible() { return mbDirectVisible; }
- /** asynchronously notifies a mouse event to the VCLXWindow's XMouseListeners
- */
- void notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType );
-
- /** asynchronously notifies an event described by an EventObject to the respective listeners
+ /** impl-version of VCLXWindow::ImplExecuteAsyncWithoutSolarLock
*/
- void notifyPlainEvent( const lang::EventObject& _rPlainEvent, PlainEventType _nType );
+ void callBackAsync( const VCLXWindow::Callback& i_callback );
/** notifies the object that its VCLXWindow is being disposed
*/
@@ -322,21 +218,10 @@ protected:
virtual void SAL_CALL acquire();
virtual void SAL_CALL release();
- // IEventProcessor
- virtual void processEvent( const ::comphelper::AnyEvent& _rEvent );
-
private:
- DECL_LINK( OnProcessEvent, void* );
+ DECL_LINK( OnProcessCallbacks, void* );
private:
- /** notifies an arbitrary event
- @param _rEvent
- the event to notify
- */
- void impl_notifyAnyEvent(
- const ::rtl::Reference< ::comphelper::AnyEvent >& _rEvent
- );
-
private:
/** determines whether the instance is already disposed
@precond
@@ -373,7 +258,7 @@ VCLXWindowImpl::VCLXWindowImpl( VCLXWindow& _rAntiImpl, ::vos::IMutex& _rMutex,
,maPaintListeners( _rAntiImpl )
,maContainerListeners( _rAntiImpl )
,maTopWindowListeners( _rAntiImpl )
- ,mnEventId( 0 )
+ ,mnCallbackEventId( 0 )
,mbDisposing( false )
,mbDesignMode( false )
,mbSynthesizingVCLEvent( false )
@@ -394,9 +279,10 @@ VCLXWindowImpl::~VCLXWindowImpl()
void VCLXWindowImpl::disposing()
{
::vos::OGuard aGuard( mrMutex );
- if ( mnEventId )
- Application::RemoveUserEvent( mnEventId );
- mnEventId = 0;
+ if ( mnCallbackEventId )
+ Application::RemoveUserEvent( mnCallbackEventId );
+ mnCallbackEventId = 0;
+
mbDisposed= true;
::com::sun::star::lang::EventObject aEvent;
@@ -415,54 +301,48 @@ void VCLXWindowImpl::disposing()
}
//--------------------------------------------------------------------
-void VCLXWindowImpl::impl_notifyAnyEvent( const ::rtl::Reference< ::comphelper::AnyEvent >& _rEvent )
+void VCLXWindowImpl::callBackAsync( const VCLXWindow::Callback& i_callback )
{
- maEvents.push_back( _rEvent );
- if ( !mnEventId )
- mnEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessEvent ) );
-}
-
-//--------------------------------------------------------------------
-void VCLXWindowImpl::notifyMouseEvent( const awt::MouseEvent& _rMouseEvent, MouseEventType _nType )
-{
- ::vos::OClearableGuard aGuard( mrMutex );
- if ( maMouseListeners.getLength() )
- impl_notifyAnyEvent( new AnyWindowEvent( _rMouseEvent, _nType ) );
+ DBG_TESTSOLARMUTEX();
+ maCallbackEvents.push_back( i_callback );
+ if ( !mnCallbackEventId )
+ {
+ // ensure our VCLXWindow is not destroyed while the event is underway
+ mrAntiImpl.acquire();
+ mnCallbackEventId = Application::PostUserEvent( LINK( this, VCLXWindowImpl, OnProcessCallbacks ) );
+ }
}
-//--------------------------------------------------------------------
-void VCLXWindowImpl::notifyPlainEvent( const lang::EventObject& _rPlainEvent, PlainEventType _nType )
+//----------------------------------------------------------------------------------------------------------------------
+IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG )
{
- ::vos::OClearableGuard aGuard( mrMutex );
- if ( maWindow2Listeners.getLength() )
- impl_notifyAnyEvent( new AnyWindowEvent( _rPlainEvent, _nType ) );
-}
+ const Reference< uno::XInterface > xKeepAlive( mrAntiImpl );
-//--------------------------------------------------------------------
-IMPL_LINK( VCLXWindowImpl, OnProcessEvent, void*, EMPTYARG )
-{
- // work on a copy of the events array
- EventArray aEventsCopy;
+ // work on a copy of the callback array
+ CallbackArray aCallbacksCopy;
{
::vos::OGuard aGuard( mrMutex );
- aEventsCopy = maEvents;
- maEvents.clear();
+ aCallbacksCopy = maCallbackEvents;
+ maCallbackEvents.clear();
- if ( !mnEventId )
+ // we acquired our VCLXWindow once before posting the event, release this one ref now
+ mrAntiImpl.release();
+
+ if ( !mnCallbackEventId )
// we were disposed while waiting for the mutex to lock
return 1L;
- mnEventId = 0;
+ mnCallbackEventId = 0;
}
{
::toolkit::ReleaseSolarMutex aReleaseSolar;
- for ( EventArray::const_iterator loop = aEventsCopy.begin();
- loop != aEventsCopy.end();
+ for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
+ loop != aCallbacksCopy.end();
++loop
)
{
- processEvent( *(*loop) );
+ (*loop)();
}
}
@@ -470,59 +350,6 @@ IMPL_LINK( VCLXWindowImpl, OnProcessEvent, void*, EMPTYARG )
}
//--------------------------------------------------------------------
-void VCLXWindowImpl::processEvent( const ::comphelper::AnyEvent& _rEvent )
-{
- ::vos::OGuard aGuard( mrMutex );
- if ( impl_isDisposed() )
- // while we were waiting for our mutex, another thread disposed us
- return;
-
- const AnyWindowEvent& rEventDescriptor( static_cast< const AnyWindowEvent& >( _rEvent ) );
- if ( rEventDescriptor.isMouseEvent() )
- {
- const awt::MouseEvent& rEvent( rEventDescriptor.getMouseEvent() );
- switch ( rEventDescriptor.getMouseEventType() )
- {
- case EVENT_MOUSE_PRESSED:
- maMouseListeners.mousePressed( rEvent );
- break;
- case EVENT_MOUSE_RELEASED:
- maMouseListeners.mouseReleased( rEvent );
- break;
- case EVENT_MOUSE_ENTERED:
- maMouseListeners.mouseEntered( rEvent );
- break;
- case EVENT_MOUSE_EXITED:
- maMouseListeners.mouseExited( rEvent );
- break;
- default:
- DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (1)?" );
- break;
- }
- }
- else if ( rEventDescriptor.isPlainEvent() )
- {
- const lang::EventObject& rEvent( rEventDescriptor.getPlainEvent() );
- switch ( rEventDescriptor.getPlainEventType() )
- {
- case EVENT_WINDOW_ENABLED:
- maWindow2Listeners.notifyEach( &XWindowListener2::windowEnabled, rEvent );
- break;
- case EVENT_WINDOW_DISABLED:
- maWindow2Listeners.notifyEach( &XWindowListener2::windowDisabled, rEvent );
- break;
- default:
- DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (2)?" );
- break;
- }
- }
- else
- {
- DBG_ERROR( "VCLXWindowImpl::processEvent: what kind of event *is* this (3)?" );
- }
-}
-
-//--------------------------------------------------------------------
void SAL_CALL VCLXWindowImpl::acquire()
{
mrAntiImpl.acquire();
@@ -581,6 +408,13 @@ VCLXWindow::~VCLXWindow()
}
}
+//----------------------------------------------------------------------------------------------------------------------
+void VCLXWindow::ImplExecuteAsyncWithoutSolarLock( const Callback& i_callback )
+{
+ mpImpl->callBackAsync( i_callback );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
::toolkit::IAccessibleFactory& VCLXWindow::getAccessibleFactory()
{
return mpImpl->getAccessibleFactory().getFactory();
@@ -641,6 +475,28 @@ IMPL_LINK( VCLXWindow, WindowEventListener, VclSimpleEvent*, pEvent )
return 0;
}
+namespace
+{
+ struct CallWindow2Listener
+ {
+ CallWindow2Listener( ::cppu::OInterfaceContainerHelper& i_rWindow2Listeners, const bool i_bEnabled, const EventObject& i_rEvent )
+ :m_rWindow2Listeners( i_rWindow2Listeners )
+ ,m_bEnabled( i_bEnabled )
+ ,m_aEvent( i_rEvent )
+ {
+ }
+
+ void operator()()
+ {
+ m_rWindow2Listeners.notifyEach( m_bEnabled ? &XWindowListener2::windowEnabled : &XWindowListener2::windowDisabled, m_aEvent );
+ }
+
+ ::cppu::OInterfaceContainerHelper& m_rWindow2Listeners;
+ const bool m_bEnabled;
+ const EventObject m_aEvent;
+ };
+}
+
void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
{
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xThis( (::cppu::OWeakObject*)this );
@@ -650,10 +506,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
case VCLEVENT_WINDOW_ENABLED:
case VCLEVENT_WINDOW_DISABLED:
{
- bool bEnabled = ( VCLEVENT_WINDOW_ENABLED == rVclWindowEvent.GetId() );
- EventObject aEvent( *this );
- mpImpl->notifyPlainEvent( aEvent,
- bEnabled ? EVENT_WINDOW_ENABLED : EVENT_WINDOW_DISABLED );
+ Callback aCallback = CallWindow2Listener(
+ mpImpl->getWindow2Listeners(),
+ ( VCLEVENT_WINDOW_ENABLED == rVclWindowEvent.GetId() ),
+ EventObject( *this )
+ );
+ ImplExecuteAsyncWithoutSolarLock( aCallback );
}
break;
@@ -884,7 +742,13 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
MouseEvent aMEvt( aWhere, 1, MOUSE_SIMPLECLICK, MOUSE_LEFT, 0 );
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( aMEvt, *this ) );
aEvent.PopupTrigger = sal_True;
- mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED );
+
+ Callback aCallback = ::boost::bind(
+ &MouseListenerMultiplexer::mousePressed,
+ &mpImpl->getMouseListeners(),
+ aEvent
+ );
+ ImplExecuteAsyncWithoutSolarLock( aCallback );
}
}
break;
@@ -894,10 +758,13 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
if ( mpImpl->getMouseListeners().getLength() && ( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() ) )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) );
- mpImpl->notifyMouseEvent(
- aEvent,
- pMouseEvt->IsEnterWindow() ? EVENT_MOUSE_ENTERED : EVENT_MOUSE_EXITED
+
+ Callback aCallback = ::boost::bind(
+ pMouseEvt->IsEnterWindow() ? &MouseListenerMultiplexer::mouseEntered : &MouseListenerMultiplexer::mouseExited,
+ &mpImpl->getMouseListeners(),
+ aEvent
);
+ ImplExecuteAsyncWithoutSolarLock( aCallback );
}
if ( mpImpl->getMouseMotionListeners().getLength() && !pMouseEvt->IsEnterWindow() && !pMouseEvt->IsLeaveWindow() )
@@ -916,7 +783,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
if ( mpImpl->getMouseListeners().getLength() )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) );
- mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_PRESSED );
+ Callback aCallback = ::boost::bind(
+ &MouseListenerMultiplexer::mousePressed,
+ &mpImpl->getMouseListeners(),
+ aEvent
+ );
+ ImplExecuteAsyncWithoutSolarLock( aCallback );
}
}
break;
@@ -925,7 +797,12 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
if ( mpImpl->getMouseListeners().getLength() )
{
awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *(MouseEvent*)rVclWindowEvent.GetData(), *this ) );
- mpImpl->notifyMouseEvent( aEvent, EVENT_MOUSE_RELEASED );
+ Callback aCallback = ::boost::bind(
+ &MouseListenerMultiplexer::mouseReleased,
+ &mpImpl->getMouseListeners(),
+ aEvent
+ );
+ ImplExecuteAsyncWithoutSolarLock( aCallback );
}
}
break;
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index e2fc78421d5e..26e84905ee01 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -29,7 +29,7 @@
#include "precompiled_toolkit.hxx"
#include <toolkit/awt/vclxwindows.hxx>
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
-#include <com/sun/star/graphic/XGraphic.hpp>
+#include <com/sun/star/graphic/XGraphicProvider.hpp>
#include <toolkit/helper/vclunohelper.hxx>
#include <toolkit/helper/macros.hxx>
#include <toolkit/helper/property.hxx>
@@ -43,6 +43,9 @@
#include <com/sun/star/system/XSystemShellExecute.hpp>
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <com/sun/star/awt/ImageScaleMode.hpp>
+#include <com/sun/star/awt/XItemList.hpp>
+#include <comphelper/componentcontext.hxx>
+#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/processfactory.hxx>
#ifndef _SV_BUTTON_HXX
@@ -58,12 +61,20 @@
#include <vcl/scrbar.hxx>
#include <vcl/svapp.hxx>
#include <vcl/tabpage.hxx>
-#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::makeAny;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::lang::EventObject;
+using ::com::sun::star::awt::ItemListEvent;
+using ::com::sun::star::awt::XItemList;
using ::com::sun::star::graphic::XGraphic;
+using ::com::sun::star::graphic::XGraphicProvider;
using namespace ::com::sun::star;
using namespace ::com::sun::star::awt::VisualEffect;
@@ -626,7 +637,13 @@ void VCLXButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
::com::sun::star::awt::ActionEvent aEvent;
aEvent.Source = (::cppu::OWeakObject*)this;
aEvent.ActionCommand = maActionCommand;
- maActionListeners.actionPerformed( aEvent );
+
+ Callback aCallback = ::boost::bind(
+ &ActionListenerMultiplexer::actionPerformed,
+ &maActionListeners,
+ aEvent
+ );
+ ImplExecuteAsyncWithoutSolarLock( aCallback );
}
}
break;
@@ -1529,6 +1546,8 @@ void VCLXListBox::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
BASEPROPERTY_HELPURL,
BASEPROPERTY_LINECOUNT,
BASEPROPERTY_MULTISELECTION,
+ BASEPROPERTY_MULTISELECTION_SIMPLEMODE,
+ BASEPROPERTY_ITEM_SEPARATOR_POS,
BASEPROPERTY_PRINTABLE,
BASEPROPERTY_SELECTEDITEMS,
BASEPROPERTY_STRINGITEMLIST,
@@ -1550,22 +1569,6 @@ VCLXListBox::VCLXListBox()
{
}
-// ::com::sun::star::uno::XInterface
-::com::sun::star::uno::Any VCLXListBox::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::XListBox*, this ),
- SAL_STATIC_CAST( ::com::sun::star::awt::XTextLayoutConstrains*, this ) );
- return (aRet.hasValue() ? aRet : VCLXWindow::queryInterface( rType ));
-}
-
-// ::com::sun::star::lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( VCLXListBox )
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XListBox>* ) NULL ),
- getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XTextLayoutConstrains>* ) NULL ),
- VCLXWindow::getTypes()
-IMPL_XTYPEPROVIDER_END
-
void VCLXListBox::dispose() throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
@@ -1914,6 +1917,13 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com:
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
{
+ case BASEPROPERTY_ITEM_SEPARATOR_POS:
+ {
+ sal_Int16 nSeparatorPos(0);
+ if ( Value >>= nSeparatorPos )
+ pListBox->SetSeparatorPos( nSeparatorPos );
+ }
+ break;
case BASEPROPERTY_READONLY:
{
sal_Bool b = sal_Bool();
@@ -1928,6 +1938,9 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com:
pListBox->EnableMultiSelection( b );
}
break;
+ case BASEPROPERTY_MULTISELECTION_SIMPLEMODE:
+ ::toolkit::adjustBooleanWindowStyle( Value, pListBox, WB_SIMPLEMODE, sal_False );
+ break;
case BASEPROPERTY_LINECOUNT:
{
sal_Int16 n = sal_Int16();
@@ -1982,6 +1995,9 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com:
sal_uInt16 nPropType = GetPropertyId( PropertyName );
switch ( nPropType )
{
+ case BASEPROPERTY_ITEM_SEPARATOR_POS:
+ aProp <<= sal_Int16( pListBox->GetSeparatorPos() );
+ break;
case BASEPROPERTY_READONLY:
{
aProp <<= (sal_Bool) pListBox->IsReadOnly();
@@ -1992,6 +2008,11 @@ void VCLXListBox::setProperty( const ::rtl::OUString& PropertyName, const ::com:
aProp <<= (sal_Bool) pListBox->IsMultiSelectionEnabled();
}
break;
+ case BASEPROPERTY_MULTISELECTION_SIMPLEMODE:
+ {
+ aProp <<= (sal_Bool)( ( pListBox->GetStyle() & WB_SIMPLEMODE ) == 0 );
+ }
+ break;
case BASEPROPERTY_LINECOUNT:
{
aProp <<= (sal_Int16) pListBox->GetDropDownLineCount();
@@ -2096,6 +2117,114 @@ void VCLXListBox::ImplCallItemListeners()
}
}
+namespace
+{
+ Image lcl_getImageFromURL( const ::rtl::OUString& i_rImageURL )
+ {
+ if ( !i_rImageURL.getLength() )
+ return Image();
+
+ try
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XGraphicProvider > xProvider;
+ if ( aContext.createComponent( "com.sun.star.graphic.GraphicProvider", xProvider ) )
+ {
+ ::comphelper::NamedValueCollection aMediaProperties;
+ aMediaProperties.put( "URL", i_rImageURL );
+ Reference< XGraphic > xGraphic = xProvider->queryGraphic( aMediaProperties.getPropertyValues() );
+ return Image( xGraphic );
+ }
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return Image();
+ }
+}
+
+void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemInserted: no ListBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pListBox->GetEntryCount() ) ),
+ "VCLXListBox::listItemInserted: illegal (inconsistent) item position!" );
+ pListBox->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 VCLXListBox::listItemRemoved( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemRemoved: no ListBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pListBox->GetEntryCount() ) ),
+ "VCLXListBox::listItemRemoved: illegal (inconsistent) item position!" );
+
+ pListBox->RemoveEntry( i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() );
+
+ ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" );
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pListBox->GetEntryCount() ) ),
+ "VCLXListBox::listItemModified: illegal (inconsistent) item position!" );
+
+ // VCL's ListBox 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( pListBox->GetEntry( i_rEvent.ItemPosition ) );
+ const Image aNewImage( i_rEvent.ItemImageURL.IsPresent ? lcl_getImageFromURL( i_rEvent.ItemImageURL.Value ) : pListBox->GetEntryImage( i_rEvent.ItemPosition ) );
+
+ pListBox->RemoveEntry( i_rEvent.ItemPosition );
+ pListBox->InsertEntry( sNewText, aNewImage, i_rEvent.ItemPosition );
+}
+
+void SAL_CALL VCLXListBox::allItemsRemoved( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" );
+
+ pListBox->Clear();
+
+ (void)i_rEvent;
+}
+
+void SAL_CALL VCLXListBox::itemListChanged( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ ListBox* pListBox = dynamic_cast< ListBox* >( GetWindow() );
+ ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" );
+
+ pListBox->Clear();
+
+ 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 )
+ {
+ pListBox->InsertEntry( aItems[i].First, lcl_getImageFromURL( aItems[i].Second ) );
+ }
+}
+
+void SAL_CALL VCLXListBox::disposing( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ // just disambiguate
+ VCLXWindow::disposing( i_rEvent );
+}
// ----------------------------------------------------
// class VCLXMessageBox
@@ -2205,16 +2334,36 @@ VCLXDialog::~VCLXDialog()
::com::sun::star::uno::Any VCLXDialog::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::XDialog2*, this ),
SAL_STATIC_CAST( ::com::sun::star::awt::XDialog*, this ) );
return (aRet.hasValue() ? aRet : VCLXTopWindow::queryInterface( rType ));
}
// ::com::sun::star::lang::XTypeProvider
IMPL_XTYPEPROVIDER_START( VCLXDialog )
+ getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDialog2>* ) NULL ),
getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XDialog>* ) NULL ),
VCLXTopWindow::getTypes()
IMPL_XTYPEPROVIDER_END
+void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ Dialog* pDialog = dynamic_cast< Dialog* >( GetWindow() );
+ if ( pDialog )
+ pDialog->EndDialog( i_result );
+}
+
+void SAL_CALL VCLXDialog::setHelpId( ::sal_Int32 i_id ) throw (RuntimeException)
+{
+ ::vos::OGuard aGuard( GetMutex() );
+
+ Window* pWindow = GetWindow();
+ if ( pWindow )
+ pWindow->SetHelpId( i_id );
+}
+
void VCLXDialog::setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
@@ -2261,11 +2410,7 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException)
void VCLXDialog::endExecute() throw(::com::sun::star::uno::RuntimeException)
{
- ::vos::OGuard aGuard( GetMutex() );
-
- Dialog* pDlg = (Dialog*) GetWindow();
- if ( pDlg )
- pDlg->EndDialog( 0 );
+ endDialog(0);
}
void SAL_CALL VCLXDialog::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno::RuntimeException)
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index db9634fb44a1..405356c2b7ac 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -43,6 +43,9 @@
#include "toolkit/controls/tkscrollbar.hxx"
#endif
#include <toolkit/controls/stdtabcontroller.hxx>
+#include <toolkit/controls/tksimpleanimation.hxx>
+#include <toolkit/controls/tkthrobber.hxx>
+
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
@@ -453,6 +456,10 @@ Reference< XInterface > UnoControlDialogModel::createInstance( const ::rtl::OUSt
pNewModel = new OGeometryControlModel< UnoTreeModel >;
else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 )
pNewModel = new OGeometryControlModel< UnoGridModel >;
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoSimpleAnimationControlModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoSimpleAnimationControlModel >;
+ else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoThrobberControlModel ) == 0 )
+ pNewModel = new OGeometryControlModel< UnoThrobberControlModel >;
if ( !pNewModel )
{
@@ -492,7 +499,7 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th
static Sequence< ::rtl::OUString >* pNamesSeq = NULL;
if ( !pNamesSeq )
{
- pNamesSeq = new Sequence< ::rtl::OUString >( 21 );
+ pNamesSeq = new Sequence< ::rtl::OUString >( 24 );
::rtl::OUString* pNames = pNamesSeq->getArray();
pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel );
pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel );
@@ -515,8 +522,9 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th
pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel );
pNames[19] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel );
pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel );
- pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel );
-
+ pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel );
+ pNames[22] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel );
+ pNames[23] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel );
}
return *pNamesSeq;
}
@@ -1975,6 +1983,20 @@ void UnoDialogControl::ImplUpdateResourceResolver()
}
}
+void SAL_CALL UnoDialogControl::endDialog( ::sal_Int32 i_result ) throw (RuntimeException)
+{
+ Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY );
+ if ( xPeerDialog.is() )
+ xPeerDialog->endDialog( i_result );
+}
+
+void SAL_CALL UnoDialogControl::setHelpId( ::sal_Int32 i_id ) throw (RuntimeException)
+{
+ Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY );
+ if ( xPeerDialog.is() )
+ xPeerDialog->setHelpId( i_id );
+}
+
void UnoDialogControl::setTitle( const ::rtl::OUString& Title ) throw(RuntimeException)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
@@ -2081,24 +2103,24 @@ throw (RuntimeException)
::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl )
{
-
-
- ::rtl::OUString ret;
-
::rtl::OUString baseLocation;
::rtl::OUString url;
rbase >>= baseLocation;
rUrl >>= url;
+ ::rtl::OUString absoluteURL( url );
if ( url.getLength() > 0 )
{
INetURLObject urlObj(baseLocation);
urlObj.removeSegment();
baseLocation = urlObj.GetMainURL( INetURLObject::NO_DECODE );
- ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, ret );
+
+ ::rtl::OUString testAbsoluteURL;
+ if ( ::osl::FileBase::E_None == ::osl::FileBase::getAbsoluteFileURL( baseLocation, url, testAbsoluteURL ) )
+ absoluteURL = testAbsoluteURL;
}
- return ret;
+ return absoluteURL;
}
diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx
index 9c32ba500407..3d89bf59af82 100644
--- a/toolkit/source/controls/tksimpleanimation.cxx
+++ b/toolkit/source/controls/tksimpleanimation.cxx
@@ -109,8 +109,9 @@ namespace toolkit
throw( uno::RuntimeException )
{
uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() );
- aServices.realloc( aServices.getLength() + 1 );
- aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel );
+ aServices.realloc( aServices.getLength() + 2 );
+ aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel );
+ aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel );
return aServices;
}
diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx
index 978d3183fe23..1dc83f860e34 100644
--- a/toolkit/source/controls/tkthrobber.cxx
+++ b/toolkit/source/controls/tkthrobber.cxx
@@ -46,8 +46,13 @@ namespace toolkit
//--------------------------------------------------------------------
UnoThrobberControlModel::UnoThrobberControlModel()
{
- ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_BORDER );
+ ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
+ ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
+ ImplRegisterProperty( BASEPROPERTY_ENABLEVISIBLE );
+ ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
+ ImplRegisterProperty( BASEPROPERTY_HELPURL );
}
//--------------------------------------------------------------------
@@ -63,6 +68,8 @@ namespace toolkit
{
case BASEPROPERTY_DEFAULTCONTROL:
return uno::makeAny( ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ) );
+ case BASEPROPERTY_BORDER:
+ return uno::makeAny( (sal_Int16) 0 );
default:
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
@@ -100,8 +107,9 @@ namespace toolkit
throw( uno::RuntimeException )
{
uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() );
- aServices.realloc( aServices.getLength() + 1 );
- aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel );
+ aServices.realloc( aServices.getLength() + 2 );
+ aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel );
+ aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel );
return aServices;
}
@@ -151,8 +159,9 @@ namespace toolkit
throw( uno::RuntimeException )
{
uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() );
- aServices.realloc( aServices.getLength() + 1 );
- aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl );
+ aServices.realloc( aServices.getLength() + 2 );
+ aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl );
+ aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControl );
return aServices;
}
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index 5655e4e10abc..8606792fdf2f 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -67,6 +67,7 @@ UnoTreeModel::UnoTreeModel()
ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
ImplRegisterProperty( BASEPROPERTY_HELPURL );
ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
+ ImplRegisterProperty( BASEPROPERTY_TABSTOP );
ImplRegisterProperty( BASEPROPERTY_TREE_SELECTIONTYPE );
ImplRegisterProperty( BASEPROPERTY_TREE_EDITABLE );
ImplRegisterProperty( BASEPROPERTY_TREE_DATAMODEL );
@@ -361,6 +362,13 @@ Reference< XTreeNode > SAL_CALL UnoTreeControl::getClosestNodeForLocation( sal_I
// -------------------------------------------------------------------
+awt::Rectangle SAL_CALL UnoTreeControl::getNodeRect( const Reference< XTreeNode >& Node ) throw (IllegalArgumentException, RuntimeException)
+{
+ return Reference< XTreeControl >( getPeer(), UNO_QUERY_THROW )->getNodeRect( Node );
+}
+
+// -------------------------------------------------------------------
+
sal_Bool SAL_CALL UnoTreeControl::isEditing( ) throw (RuntimeException)
{
return Reference< XTreeControl >( getPeer(), UNO_QUERY_THROW )->isEditing();
diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx
index 0cae86616aa4..e646664c4a64 100644
--- a/toolkit/source/controls/tree/treecontrol.hxx
+++ b/toolkit/source/controls/tree/treecontrol.hxx
@@ -114,6 +114,7 @@ public:
virtual void SAL_CALL removeTreeExpansionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeExpansionListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getClosestNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getNodeRect( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isEditing( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL stopEditing( ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL cancelEditing( ) throw (::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 1abe0b34004f..d91077823495 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1535,3 +1535,55 @@ void SAL_CALL UnoControl::removeModeChangeApproveListener( const Reference< XMod
throw NoSupportException( );
}
+//----------------------------------------------------------------------------------------------------------------------
+awt::Point SAL_CALL UnoControl::convertPointToLogic( const awt::Point& i_Point, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException)
+{
+ Reference< XUnitConversion > xPeerConversion;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xPeerConversion = xPeerConversion.query( getPeer() );
+ }
+ if ( xPeerConversion.is() )
+ return xPeerConversion->convertPointToLogic( i_Point, i_TargetUnit );
+ return awt::Point( );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+awt::Point SAL_CALL UnoControl::convertPointToPixel( const awt::Point& i_Point, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException)
+{
+ Reference< XUnitConversion > xPeerConversion;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xPeerConversion = xPeerConversion.query( getPeer() );
+ }
+ if ( xPeerConversion.is() )
+ return xPeerConversion->convertPointToPixel( i_Point, i_SourceUnit );
+ return awt::Point( );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+awt::Size SAL_CALL UnoControl::convertSizeToLogic( const awt::Size& i_Size, ::sal_Int16 i_TargetUnit ) throw (IllegalArgumentException, RuntimeException)
+{
+ Reference< XUnitConversion > xPeerConversion;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xPeerConversion = xPeerConversion.query( getPeer() );
+ }
+ if ( xPeerConversion.is() )
+ return xPeerConversion->convertSizeToLogic( i_Size, i_TargetUnit );
+ return awt::Size( );
+}
+
+//----------------------------------------------------------------------------------------------------------------------
+awt::Size SAL_CALL UnoControl::convertSizeToPixel( const awt::Size& i_Size, ::sal_Int16 i_SourceUnit ) throw (IllegalArgumentException, RuntimeException)
+{
+ Reference< XUnitConversion > xPeerConversion;
+ {
+ ::osl::MutexGuard aGuard( GetMutex() );
+ xPeerConversion = xPeerConversion.query( getPeer() );
+ }
+ if ( xPeerConversion.is() )
+ return xPeerConversion->convertSizeToPixel( i_Size, i_SourceUnit );
+ return awt::Size( );
+}
+
diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx
index 29b683a5ed40..91d202409e86 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -216,10 +216,6 @@ sal_Bool UnoControlModel::ImplHasProperty( sal_uInt16 nPropId ) const
return mpData->Get( nPropId ) ? sal_True : sal_False;
}
-void UnoControlModel::ImplPropertyChanged( sal_uInt16 )
-{
-}
-
::com::sun::star::uno::Any UnoControlModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
::com::sun::star::uno::Any aDefault;
@@ -267,6 +263,7 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 )
aDefault <<= Reference< awt::XDevice >();
break;
+ case BASEPROPERTY_ITEM_SEPARATOR_POS:
case BASEPROPERTY_VERTICALALIGN:
case BASEPROPERTY_BORDERCOLOR:
case BASEPROPERTY_SYMBOL_COLOR:
@@ -342,6 +339,7 @@ void UnoControlModel::ImplPropertyChanged( sal_uInt16 )
case BASEPROPERTY_HARDLINEBREAKS:
case BASEPROPERTY_NOLABEL: aDefault <<= (sal_Bool) sal_False; break;
+ case BASEPROPERTY_MULTISELECTION_SIMPLEMODE:
case BASEPROPERTY_HIDEINACTIVESELECTION:
case BASEPROPERTY_ENFORCE_FORMAT:
case BASEPROPERTY_AUTOCOMPLETE:
@@ -1259,22 +1257,13 @@ sal_Bool UnoControlModel::convertFastPropertyValue( Any & rConvertedValue, Any &
void UnoControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nPropId, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception)
{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
-
// Fehlt: Die gefakten Einzelproperties des FontDescriptors...
ImplControlProperty* pProp = mpData->Get( nPropId );
- if ( pProp )
- {
- DBG_ASSERT( ( rValue.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID ) || ( GetPropertyAttribs( (sal_uInt16)nPropId ) & ::com::sun::star::beans::PropertyAttribute::MAYBEVOID ), "Property darf nicht VOID sein!" );
- ImplPropertyChanged( (sal_uInt16)nPropId );
- pProp->SetValue( rValue );
- }
- else
- {
- // exception...
- DBG_ERROR( "SetPropertyValues: Invalid Property!" );
- }
+ ENSURE_OR_RETURN_VOID( pProp, "UnoControlModel::setFastPropertyValue_NoBroadcast: invalid property id!" );
+
+ DBG_ASSERT( ( rValue.getValueType().getTypeClass() != ::com::sun::star::uno::TypeClass_VOID ) || ( GetPropertyAttribs( (sal_uInt16)nPropId ) & ::com::sun::star::beans::PropertyAttribute::MAYBEVOID ), "Property darf nicht VOID sein!" );
+ pProp->SetValue( rValue );
}
void UnoControlModel::getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nPropId ) const
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index ae9e59d045e7..cfb71111e3dc 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -73,8 +73,11 @@
#include <tools/time.hxx>
#include <algorithm>
+#include <functional>
using namespace ::com::sun::star;
+using ::com::sun::star::graphic::XGraphic;
+using ::com::sun::star::uno::Reference;
using namespace ::toolkit;
@@ -1841,19 +1844,130 @@ sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException)
return sal_True;
}
-// ----------------------------------------------------
-// class UnoControlListBoxModel
-// ----------------------------------------------------
+// =====================================================================================================================
+// = UnoControlListBoxModel_Data
+// =====================================================================================================================
+struct ListItem
+{
+ ::rtl::OUString ItemText;
+ ::rtl::OUString ItemImageURL;
+ Any ItemData;
+
+ ListItem()
+ :ItemText()
+ ,ItemImageURL()
+ ,ItemData()
+ {
+ }
+
+ ListItem( const ::rtl::OUString& i_rItemText )
+ :ItemText( i_rItemText )
+ ,ItemImageURL()
+ ,ItemData()
+ {
+ }
+};
+
+typedef beans::Pair< ::rtl::OUString, ::rtl::OUString > UnoListItem;
+
+struct StripItemData : public ::std::unary_function< ListItem, UnoListItem >
+{
+ UnoListItem operator()( const ListItem& i_rItem )
+ {
+ return UnoListItem( i_rItem.ItemText, i_rItem.ItemImageURL );
+ }
+};
+
+struct UnoControlListBoxModel_Data
+{
+ UnoControlListBoxModel_Data( UnoControlListBoxModel& i_rAntiImpl )
+ :m_bSettingLegacyProperty( false )
+ ,m_rAntiImpl( i_rAntiImpl )
+ ,m_aListItems()
+ {
+ }
+
+ sal_Int32 getItemCount() const { return sal_Int32( m_aListItems.size() ); }
+
+ const ListItem& getItem( const sal_Int32 i_nIndex ) const
+ {
+ if ( ( i_nIndex < 0 ) || ( i_nIndex >= sal_Int32( m_aListItems.size() ) ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), m_rAntiImpl );
+ return m_aListItems[ i_nIndex ];
+ }
+
+ ListItem& getItem( const sal_Int32 i_nIndex )
+ {
+ return const_cast< ListItem& >( static_cast< const UnoControlListBoxModel_Data* >( this )->getItem( i_nIndex ) );
+ }
+
+ ListItem& insertItem( const sal_Int32 i_nIndex )
+ {
+ if ( ( i_nIndex < 0 ) || ( i_nIndex > sal_Int32( m_aListItems.size() ) ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), m_rAntiImpl );
+ return *m_aListItems.insert( m_aListItems.begin() + i_nIndex, ListItem() );
+ }
+
+ Sequence< UnoListItem > getAllItems() const
+ {
+ Sequence< UnoListItem > aItems( sal_Int32( m_aListItems.size() ) );
+ ::std::transform( m_aListItems.begin(), m_aListItems.end(), aItems.getArray(), StripItemData() );
+ return aItems;
+ }
+
+ void setAllItems( const ::std::vector< ListItem >& i_rItems )
+ {
+ m_aListItems = i_rItems;
+ }
+
+ void removeItem( const sal_Int32 i_nIndex )
+ {
+ if ( ( i_nIndex < 0 ) || ( i_nIndex >= sal_Int32( m_aListItems.size() ) ) )
+ throw IndexOutOfBoundsException( ::rtl::OUString(), m_rAntiImpl );
+ m_aListItems.erase( m_aListItems.begin() + i_nIndex );
+ }
+
+ void removeAllItems()
+ {
+ ::std::vector< ListItem > aEmpty;
+ m_aListItems.swap( aEmpty );
+ }
+
+public:
+ bool m_bSettingLegacyProperty;
+
+private:
+ UnoControlListBoxModel& m_rAntiImpl;
+ ::std::vector< ListItem > m_aListItems;
+};
+
+// =====================================================================================================================
+// = UnoControlListBoxModel
+// =====================================================================================================================
+// ---------------------------------------------------------------------------------------------------------------------
UnoControlListBoxModel::UnoControlListBoxModel()
+ :UnoControlListBoxModel_Base()
+ ,m_pData( new UnoControlListBoxModel_Data( *this ) )
+ ,m_aItemListListeners( GetMutex() )
{
UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXListBox );
}
+// ---------------------------------------------------------------------------------------------------------------------
+UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource )
+ :UnoControlListBoxModel_Base( i_rSource )
+ ,m_pData( new UnoControlListBoxModel_Data( *this ) )
+ ,m_aItemListListeners( GetMutex() )
+{
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
::rtl::OUString UnoControlListBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException)
{
return ::rtl::OUString::createFromAscii( szServiceName_UnoControlListBoxModel );
}
+// ---------------------------------------------------------------------------------------------------------------------
uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
{
if ( nPropId == BASEPROPERTY_DEFAULTCONTROL )
@@ -1865,6 +1979,7 @@ uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
return UnoControlModel::ImplGetDefaultValue( nPropId );
}
+// ---------------------------------------------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& UnoControlListBoxModel::getInfoHelper()
{
static UnoPropertyArrayHelper* pHelper = NULL;
@@ -1876,6 +1991,7 @@ uno::Any UnoControlListBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
return *pHelper;
}
+// ---------------------------------------------------------------------------------------------------------------------
// beans::XMultiPropertySet
uno::Reference< beans::XPropertySetInfo > UnoControlListBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException)
{
@@ -1883,19 +1999,61 @@ uno::Reference< beans::XPropertySetInfo > UnoControlListBoxModel::getPropertySet
return xInfo;
}
-void UnoControlListBoxModel::ImplPropertyChanged( sal_uInt16 nPropId )
+// ---------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ struct CreateListItem : public ::std::unary_function< ::rtl::OUString, ListItem >
+ {
+ ListItem operator()( const ::rtl::OUString& i_rItemText )
+ {
+ return ListItem( i_rItemText );
+ }
+ };
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const uno::Any& rValue ) throw (uno::Exception)
{
- if ( nPropId == BASEPROPERTY_STRINGITEMLIST )
+ UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue );
+
+ if ( nHandle == BASEPROPERTY_STRINGITEMLIST )
{
+ // reset selection
uno::Sequence<sal_Int16> aSeq;
uno::Any aAny;
aAny <<= aSeq;
setPropertyValue( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ), aAny );
- }
- UnoControlModel::ImplPropertyChanged( nPropId );
+ if ( !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 ...
+ }
+ }
}
+// ---------------------------------------------------------------------------------------------------------------------
void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCount, sal_Int32* _pHandles,
uno::Any* _pValues, sal_Int32* _pValidHandles ) const SAL_THROW(())
{
@@ -1906,12 +2064,327 @@ void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCo
UnoControlModel::ImplNormalizePropertySequence( _nCount, _pHandles, _pValues, _pValidHandles );
}
+// ---------------------------------------------------------------------------------------------------------------------
+::sal_Int32 SAL_CALL UnoControlListBoxModel::getItemCount() throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ return m_pData->getItemCount();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::insertItem( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ ListItem& rItem( m_pData->insertItem( i_nPosition ) );
+ rItem.ItemText = i_rItemText;
+ rItem.ItemImageURL = i_rItemImageURL;
+
+ impl_handleInsert( i_nPosition, i_rItemText, i_rItemImageURL, aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::insertItemText( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ ListItem& rItem( m_pData->insertItem( i_nPosition ) );
+ rItem.ItemText = i_rItemText;
+
+ impl_handleInsert( i_nPosition, i_rItemText, ::boost::optional< ::rtl::OUString >(), aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::insertItemImage( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ ListItem& rItem( m_pData->insertItem( i_nPosition ) );
+ rItem.ItemImageURL = i_rItemImageURL;
+
+ impl_handleInsert( i_nPosition, ::boost::optional< ::rtl::OUString >(), i_rItemImageURL, aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::removeItem( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ m_pData->removeItem( i_nPosition );
+
+ impl_handleRemove( i_nPosition, aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::removeAllItems( ) throw (::com::sun::star::uno::RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ m_pData->removeAllItems();
+
+ impl_handleRemove( -1, aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::setItemText( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ rItem.ItemText = i_rItemText;
+
+ impl_handleModify( i_nPosition, i_rItemText, ::boost::optional< ::rtl::OUString >(), aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::setItemImage( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ rItem.ItemImageURL = i_rItemImageURL;
+
+ impl_handleModify( i_nPosition, ::boost::optional< ::rtl::OUString >(), i_rItemImageURL, aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPosition, const ::rtl::OUString& i_rItemText, const ::rtl::OUString& i_rItemImageURL ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ // SYNCHRONIZED ----->
+ ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ rItem.ItemText = i_rItemText;
+ rItem.ItemImageURL = i_rItemImageURL;
+
+ impl_handleModify( i_nPosition, i_rItemText, i_rItemImageURL, aGuard );
+ // <----- SYNCHRONIZED
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, const Any& i_rDataValue ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ rItem.ItemData = i_rDataValue;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ const ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ return rItem.ItemText;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+::rtl::OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ const ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ return rItem.ItemImageURL;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+beans::Pair< ::rtl::OUString, ::rtl::OUString > SAL_CALL UnoControlListBoxModel::getItemTextAndImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ const ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ return beans::Pair< ::rtl::OUString, ::rtl::OUString >( rItem.ItemText, rItem.ItemImageURL );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException)
+{
+ ::osl::ClearableMutexGuard aGuard( GetMutex() );
+ const ListItem& rItem( m_pData->getItem( i_nPosition ) );
+ return rItem.ItemData;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+Sequence< beans::Pair< ::rtl::OUString, ::rtl::OUString > > SAL_CALL UnoControlListBoxModel::getAllItems( ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( GetMutex() );
+ return m_pData->getAllItems();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::addItemListListener( const uno::Reference< awt::XItemListListener >& i_Listener ) throw (uno::RuntimeException)
+{
+ if ( i_Listener.is() )
+ m_aItemListListeners.addInterface( i_Listener );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL UnoControlListBoxModel::removeItemListListener( const uno::Reference< awt::XItemListListener >& i_Listener ) throw (uno::RuntimeException)
+{
+ if ( i_Listener.is() )
+ m_aItemListListeners.removeInterface( i_Listener );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void UnoControlListBoxModel::impl_getStringItemList( ::std::vector< ::rtl::OUString >& o_rStringItems ) const
+{
+ Sequence< ::rtl::OUString > aStringItemList;
+ Any aPropValue;
+ getFastPropertyValue( aPropValue, BASEPROPERTY_STRINGITEMLIST );
+ OSL_VERIFY( aPropValue >>= aStringItemList );
+
+ o_rStringItems.resize( size_t( aStringItemList.getLength() ) );
+ ::std::copy(
+ aStringItemList.getConstArray(),
+ aStringItemList.getConstArray() + aStringItemList.getLength(),
+ o_rStringItems.begin()
+ );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void UnoControlListBoxModel::impl_setStringItemList_nolck( const ::std::vector< ::rtl::OUString >& i_rStringItems )
+{
+ Sequence< ::rtl::OUString > aStringItems( i_rStringItems.size() );
+ ::std::copy(
+ i_rStringItems.begin(),
+ i_rStringItems.end(),
+ aStringItems.getArray()
+ );
+ m_pData->m_bSettingLegacyProperty = true;
+ try
+ {
+ setFastPropertyValue( BASEPROPERTY_STRINGITEMLIST, uno::makeAny( aStringItems ) );
+ }
+ catch( const Exception& )
+ {
+ m_pData->m_bSettingLegacyProperty = false;
+ throw;
+ }
+ m_pData->m_bSettingLegacyProperty = false;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void UnoControlListBoxModel::impl_handleInsert( const sal_Int32 i_nItemPosition, const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
+{
+ // SYNCHRONIZED ----->
+ // sync with legacy StringItemList property
+ ::std::vector< ::rtl::OUString > aStringItems;
+ impl_getStringItemList( aStringItems );
+ OSL_ENSURE( size_t( i_nItemPosition ) <= aStringItems.size(), "UnoControlListBoxModel::impl_handleInsert" );
+ if ( size_t( i_nItemPosition ) <= aStringItems.size() )
+ {
+ const ::rtl::OUString sItemText( !!i_rItemText ? *i_rItemText : ::rtl::OUString() );
+ aStringItems.insert( aStringItems.begin() + i_nItemPosition, sItemText );
+ }
+
+ i_rClearBeforeNotify.clear();
+ // <----- SYNCHRONIZED
+ impl_setStringItemList_nolck( aStringItems );
+
+ // notify ItemListListeners
+ impl_notifyItemListEvent_nolck( i_nItemPosition, i_rItemText, i_rItemImageURL, &XItemListListener::listItemInserted );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void UnoControlListBoxModel::impl_handleRemove( const sal_Int32 i_nItemPosition, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
+{
+ // SYNCHRONIZED ----->
+ const bool bAllItems = ( i_nItemPosition < 0 );
+ // sync with legacy StringItemList property
+ ::std::vector< ::rtl::OUString > aStringItems;
+ impl_getStringItemList( aStringItems );
+ if ( !bAllItems )
+ {
+ OSL_ENSURE( size_t( i_nItemPosition ) < aStringItems.size(), "UnoControlListBoxModel::impl_handleRemove" );
+ if ( size_t( i_nItemPosition ) < aStringItems.size() )
+ {
+ aStringItems.erase( aStringItems.begin() + i_nItemPosition );
+ }
+ }
+ else
+ {
+ aStringItems.resize(0);
+ }
+
+ i_rClearBeforeNotify.clear();
+ // <----- SYNCHRONIZED
+ impl_setStringItemList_nolck( aStringItems );
+
+ // notify ItemListListeners
+ if ( bAllItems )
+ {
+ EventObject aEvent( *this );
+ m_aItemListListeners.notifyEach( &XItemListListener::allItemsRemoved, aEvent );
+ }
+ else
+ {
+ impl_notifyItemListEvent_nolck( i_nItemPosition, ::boost::optional< ::rtl::OUString >(), ::boost::optional< ::rtl::OUString >(),
+ &XItemListListener::listItemRemoved );
+ }
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void UnoControlListBoxModel::impl_handleModify( const sal_Int32 i_nItemPosition, const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL, ::osl::ClearableMutexGuard& i_rClearBeforeNotify )
+{
+ // SYNCHRONIZED ----->
+ if ( !!i_rItemText )
+ {
+ // sync with legacy StringItemList property
+ ::std::vector< ::rtl::OUString > aStringItems;
+ impl_getStringItemList( aStringItems );
+ OSL_ENSURE( size_t( i_nItemPosition ) < aStringItems.size(), "UnoControlListBoxModel::impl_handleModify" );
+ if ( size_t( i_nItemPosition ) < aStringItems.size() )
+ {
+ aStringItems[ i_nItemPosition] = *i_rItemText;
+ }
+
+ i_rClearBeforeNotify.clear();
+ // <----- SYNCHRONIZED
+ impl_setStringItemList_nolck( aStringItems );
+ }
+ else
+ {
+ i_rClearBeforeNotify.clear();
+ // <----- SYNCHRONIZED
+ }
+
+ // notify ItemListListeners
+ impl_notifyItemListEvent_nolck( i_nItemPosition, i_rItemText, i_rItemImageURL, &XItemListListener::listItemModified );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_nItemPosition, const ::boost::optional< ::rtl::OUString >& i_rItemText,
+ const ::boost::optional< ::rtl::OUString >& i_rItemImageURL,
+ void ( SAL_CALL XItemListListener::*NotificationMethod )( const ItemListEvent& ) )
+{
+ ItemListEvent aEvent;
+ aEvent.Source = *this;
+ aEvent.ItemPosition = i_nItemPosition;
+ if ( !!i_rItemText )
+ {
+ aEvent.ItemText.IsPresent = sal_True;
+ aEvent.ItemText.Value = *i_rItemText;
+ }
+ if ( !!i_rItemImageURL )
+ {
+ aEvent.ItemImageURL.IsPresent = sal_True;
+ aEvent.ItemImageURL.Value = *i_rItemImageURL;
+ }
+
+ m_aItemListListeners.notifyEach( NotificationMethod, aEvent );
+}
+
// ----------------------------------------------------
// class UnoListBoxControl
// ----------------------------------------------------
UnoListBoxControl::UnoListBoxControl()
- : maActionListeners( *this ),
- maItemListeners( *this )
+ :maActionListeners( *this )
+ ,maItemListeners( *this )
{
maComponentInfos.nWidth = 100;
maComponentInfos.nHeight = 12;
@@ -1922,27 +2395,6 @@ UnoListBoxControl::UnoListBoxControl()
return ::rtl::OUString::createFromAscii( "listbox" );
}
-// uno::XInterface
-uno::Any UnoListBoxControl::queryAggregation( const uno::Type & rType ) throw(uno::RuntimeException)
-{
- uno::Any aRet = ::cppu::queryInterface( rType,
- SAL_STATIC_CAST( awt::XListBox*, this ),
- SAL_STATIC_CAST( awt::XItemListener*, this ),
- SAL_STATIC_CAST( lang::XEventListener*, SAL_STATIC_CAST( awt::XItemListener*, this ) ),
- SAL_STATIC_CAST( awt::XLayoutConstrains*, this ),
- SAL_STATIC_CAST( awt::XTextLayoutConstrains*, this ) );
- return (aRet.hasValue() ? aRet : UnoControlBase::queryAggregation( rType ));
-}
-
-// lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( UnoListBoxControl )
- getCppuType( ( uno::Reference< awt::XListBox>* ) NULL ),
- getCppuType( ( uno::Reference< awt::XItemListener>* ) NULL ),
- getCppuType( ( uno::Reference< awt::XLayoutConstrains>* ) NULL ),
- getCppuType( ( uno::Reference< awt::XTextLayoutConstrains>* ) NULL ),
- UnoControlBase::getTypes()
-IMPL_XTYPEPROVIDER_END
-
void UnoListBoxControl::dispose() throw(uno::RuntimeException)
{
lang::EventObject aEvt;
@@ -1966,24 +2418,32 @@ void UnoListBoxControl::ImplUpdateSelectedItemsProperty()
}
}
-void UnoListBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal )
+void UnoListBoxControl::updateFromModel()
{
- UnoControl::ImplSetPeerProperty( rPropName, rVal );
+ UnoControlBase::updateFromModel();
- // Wenn die SelectedItems vor der StringItemList gesetzt werden,
- // hat das keine Auswirkung...
+ Reference< XItemListListener > xItemListListener( getPeer(), UNO_QUERY );
+ ENSURE_OR_RETURN_VOID( xItemListListener.is(), "UnoListBoxControl::updateFromModel: a peer which is no ItemListListener?!" );
+
+ EventObject aEvent( getModel() );
+ xItemListListener->itemListChanged( aEvent );
+
+ // notify the change of the SelectedItems property, again. While our base class, in updateFromModel,
+ // already did this, our peer(s) can only legitimately set the selection after they have the string
+ // item list, which we just notified with the itemListChanged call.
+ const ::rtl::OUString sSelectedItemsPropName( GetPropertyName( BASEPROPERTY_SELECTEDITEMS ) );
+ ImplSetPeerProperty( sSelectedItemsPropName, ImplGetPropertyValue( sSelectedItemsPropName ) );
+}
+
+void UnoListBoxControl::ImplSetPeerProperty( const ::rtl::OUString& rPropName, const uno::Any& rVal )
+{
if ( rPropName == GetPropertyName( BASEPROPERTY_STRINGITEMLIST ) )
- {
- ::rtl::OUString aSelPropName = GetPropertyName( BASEPROPERTY_SELECTEDITEMS );
- uno::Any aVal = ImplGetPropertyValue( aSelPropName );
- if ( !( aVal.getValueType().getTypeClass() == uno::TypeClass_VOID ) )
- {
- uno::Reference< awt::XVclWindowPeer > xW( getPeer(), uno::UNO_QUERY );
- if (xW.is())
- // same comment as in UnoControl::ImplSetPeerProperty - see there
- xW->setProperty( aSelPropName, aVal );
- }
- }
+ // 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;
+
+ UnoControl::ImplSetPeerProperty( rPropName, rVal );
}
void UnoListBoxControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolkit, const uno::Reference< awt::XWindowPeer > & rParentPeer ) throw(uno::RuntimeException)
@@ -2281,6 +2741,66 @@ void UnoListBoxControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines
Impl_getColumnsAndLines( nCols, nLines );
}
+sal_Bool SAL_CALL UnoListBoxControl::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(), "UnoListBoxControl::setModel: illegal old model!" );
+ const Reference< XItemList > xNewItems( i_rModel, UNO_QUERY );
+ OSL_ENSURE( xNewItems.is() || !i_rModel.is(), "UnoListBoxControl::setModel: illegal new model!" );
+
+ if ( !UnoListBoxControl_Base::setModel( i_rModel ) )
+ return sal_False;
+
+ if ( xOldItems.is() )
+ xOldItems->removeItemListListener( this );
+ if ( xNewItems.is() )
+ xNewItems->addItemListListener( this );
+
+ return sal_True;
+}
+
+void SAL_CALL UnoListBoxControl::listItemInserted( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::listItemInserted: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemInserted( i_rEvent );
+}
+
+void SAL_CALL UnoListBoxControl::listItemRemoved( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::listItemRemoved: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemRemoved( i_rEvent );
+}
+
+void SAL_CALL UnoListBoxControl::listItemModified( const awt::ItemListEvent& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::listItemModified: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->listItemModified( i_rEvent );
+}
+
+void SAL_CALL UnoListBoxControl::allItemsRemoved( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::allItemsRemoved: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->allItemsRemoved( i_rEvent );
+}
+
+void SAL_CALL UnoListBoxControl::itemListChanged( const lang::EventObject& i_rEvent ) throw (uno::RuntimeException)
+{
+ const Reference< XItemListListener > xPeerListener( getPeer(), UNO_QUERY );
+ OSL_ENSURE( xPeerListener.is() || !getPeer().is(), "UnoListBoxControl::itemListChanged: invalid peer!" );
+ if ( xPeerListener.is() )
+ xPeerListener->itemListChanged( i_rEvent );
+}
+
// ----------------------------------------------------
// class UnoControlComboBoxModel
// ----------------------------------------------------
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index 6711e4503511..9a3dc7b9bfb3 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -191,6 +191,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_2 ( "ImageAlign", IMAGEALIGN, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ImagePosition", IMAGEPOSITION, sal_Int16, BOUND, MAYBEDEFAULT),
DECL_PROP_2 ( "ImageURL", IMAGEURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_3 ( "ItemSeparatorPos", ITEM_SEPARATOR_POS, sal_Int16, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "Label", LABEL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_3 ( "LineColor", LINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "LineCount", LINECOUNT, sal_Int16, BOUND, MAYBEDEFAULT ),
@@ -203,6 +204,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_1 ( "MouseTransparent", MOUSETRANSPARENT, bool, BOUND ),
DECL_PROP_2 ( "MultiLine", MULTILINE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "MultiSelection", MULTISELECTION, bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "MultiSelectionSimpleMode", MULTISELECTION_SIMPLEMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NativeWidgetLook", NATIVE_WIDGET_LOOK, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "NoLabel", NOLABEL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Orientation", ORIENTATION, sal_Int32, BOUND, MAYBEDEFAULT ),
@@ -222,7 +224,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_DEP_PROP_3 ( "ScrollValue", SCROLLVALUE, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ),
DECL_PROP_2 ( "ScrollValueMax", SCROLLVALUE_MAX, sal_Int32, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ScrollValueMin", SCROLLVALUE_MIN, sal_Int32, BOUND, MAYBEDEFAULT ),
- DECL_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ),
+ DECL_DEP_PROP_2 ( "SelectedItems", SELECTEDITEMS, Sequence<sal_Int16>, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ShowThousandsSeparator", NUMSHOWTHOUSANDSEP, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Sizeable", SIZEABLE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "Spin", SPIN, bool, BOUND, MAYBEDEFAULT ),
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 7d1dcaeb2762..aedf4024f2b9 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -284,10 +284,10 @@ TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager,
registerServices( xRegistryKey, "TreeControl", szServiceName_TreeControl );
registerServices( xRegistryKey, "TreeControlModel", szServiceName_TreeControlModel );
registerServices( xRegistryKey, "MutableTreeDataModel", szServiceName_MutableTreeDataModel );
- registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel );
- registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl );
- registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel );
- registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl );
+ registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel );
+ registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl );
+ registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel );
+ registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl );
registerServices( xRegistryKey, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink );
registerServices( xRegistryKey, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel );
registerServices( xRegistryKey, "GridControl", szServiceName_GridControl );
@@ -371,10 +371,10 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen
CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL )
CHECKANDCREATEFACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
CHECKANDCREATEFACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
- CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, NULL )
- CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, NULL )
- CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, NULL )
- CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, NULL )
+ CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel )
+ CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl )
+ CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel )
+ CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl )
CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
CHECKANDCREATEFACTORY( GridControl, szServiceName_GridControl, NULL );
diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx
index 1885387561cb..6a376391f46d 100644
--- a/toolkit/source/helper/servicenames.cxx
+++ b/toolkit/source/helper/servicenames.cxx
@@ -92,10 +92,10 @@ const sal_Char __FAR_DATA szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt
const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl";
const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel";
const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel";
-const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel";
-const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl";
-const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel";
-const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl";
+const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel";
+const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation";
+const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel";
+const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber";
const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink";
const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel";
const sal_Char __FAR_DATA szServiceName_GridControl[] = "com.sun.star.awt.grid.UnoControlGrid";
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 6833fd6632ce..b244d11dc305 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -130,6 +130,17 @@
#define ENSURE_OR_RETURN_FALSE(c, m) \
ENSURE_OR_RETURN(c, m, false)
+/** This macro asserts the given condition (in debug mode), and
+ returns afterwards, without return value "void".
+ */
+#define ENSURE_OR_RETURN_VOID( c, m ) \
+ if( !(c) ) \
+ { \
+ OSL_ENSURE( c, m ); \
+ return; \
+ }
+
+
/** This macro asserts the given condition (in debug mode), and
returns afterwards, without return value "void".
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx
index 82af190aab4f..c26ff5245739 100644
--- a/unotools/inc/unotools/configmgr.hxx
+++ b/unotools/inc/unotools/configmgr.hxx
@@ -99,7 +99,8 @@ namespace utl
PRODUCTXMLFILEFORMATVERSION,
WRITERCOMPATIBILITYVERSIONOOO11,
OPENSOURCECONTEXT,
- ABOUTBOXPRODUCTVERSION
+ ABOUTBOXPRODUCTVERSION,
+ OOOVENDOR
};
//direct readonly access to some special configuration elements
static com::sun::star::uno::Any GetDirectConfigProperty(ConfigProperty eProp);
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 5f16733b5249..0df6d49afe59 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -70,6 +70,8 @@ namespace
: public rtl::Static< ::rtl::OUString, ProductVersion > {};
struct AboutBoxProductVersion
: public rtl::Static< ::rtl::OUString, AboutBoxProductVersion > {};
+ struct OOOVendor
+ : public rtl::Static< ::rtl::OUString, OOOVendor > {};
struct ProductExtension
: public rtl::Static< ::rtl::OUString, ProductExtension > {};
struct XMLFileFormatName
@@ -433,6 +435,14 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
return aRet;
}
+ rtl::OUString &rOOOVendor = OOOVendor::get();
+ if ( eProp == OOOVENDOR && rOOOVendor.getLength() )
+ {
+ aRet <<= rOOOVendor;
+ return aRet;
+ }
+
+
rtl::OUString &rProductExtension = ProductExtension::get();
if ( eProp == PRODUCTEXTENSION && rProductExtension.getLength() )
{
@@ -493,6 +503,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case PRODUCTXMLFILEFORMATNAME :
case PRODUCTXMLFILEFORMATVERSION:
case OPENSOURCECONTEXT:
+ case OOOVENDOR:
case ABOUTBOXPRODUCTVERSION: sPath += C2U("Setup/Product"); break;
case DEFAULTCURRENCY: sPath += C2U("Setup/L10N"); break;
@@ -526,6 +537,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case PRODUCTNAME: sProperty = C2U("ooName"); break;
case PRODUCTVERSION: sProperty = C2U("ooSetupVersion"); break;
case ABOUTBOXPRODUCTVERSION: sProperty = C2U("ooSetupVersionAboutBox"); break;
+ case OOOVENDOR: sProperty = C2U("ooVendor"); break;
case PRODUCTEXTENSION: sProperty = C2U("ooSetupExtension"); break;
case PRODUCTXMLFILEFORMATNAME: sProperty = C2U("ooXMLFileFormatName"); break;
case PRODUCTXMLFILEFORMATVERSION: sProperty = C2U("ooXMLFileFormatVersion"); break;
@@ -565,6 +577,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
if ( eProp == PRODUCTVERSION )
aRet >>= rProductVersion;
+ if( eProp == OOOVENDOR )
+ aRet >>= rOOOVendor;
+
if ( eProp == ABOUTBOXPRODUCTVERSION )
{
aRet >>= rAboutBoxProductVersion;
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 4183b852735e..2b0182fd2a83 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -684,5 +684,17 @@ UUIInteractionHelper::handlePasswordRequest(
true /* bool bMSCryptoMode */);
return true;
}
+
+ task::PasswordRequest aPasswordRequest;
+ if( aAnyRequest >>= aPasswordRequest )
+ {
+ handlePasswordRequest_(getParentProperty(),
+ aPasswordRequest.Mode,
+ rRequest->getContinuations(),
+ rtl::OUString(),
+ false /* bool bMSCryptoMode */);
+ return true;
+ }
+
return false;
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e883bd60848d..0879e3574da3 100644..100755
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -868,14 +868,15 @@ UUIInteractionHelper::handleRequest_impl(
return true;
// @@@ Todo #i29340#: activate!
-// ucb::NameClashResolveRequest aNameClashResolveRequest;
-// if (aAnyRequest >>= aNameClashResolveRequest)
-// {
-// handleNameClashResolveRequest(aNameClashResolveRequest,
-// rRequest->getContinuations());
-// return true;
-// }
-
+#if 0
+ ucb::NameClashResolveRequest aNameClashResolveRequest;
+ if (aAnyRequest >>= aNameClashResolveRequest)
+ {
+ handleNameClashResolveRequest(aNameClashResolveRequest,
+ rRequest->getContinuations());
+ return true;
+ }
+#endif
if ( handleMasterPasswordRequest( rRequest ) )
return true;
@@ -1187,6 +1188,8 @@ executeMessageBox(
return aResult;
}
+// @@@ Todo #i29340#: activate!
+#if 0
enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE };
NameClashResolveDialogResult
@@ -1214,9 +1217,11 @@ executeSimpleNameClashResolveDialog(
"executeSimpleNameClashResolveDialog not yet implemented!" );
return ABORT;
}
-
+#endif
} // namespace
+// @@@ Todo #i29340#: activate!
+#if 0
void
UUIInteractionHelper::handleNameClashResolveRequest(
ucb::NameClashResolveRequest const & rRequest,
@@ -1284,6 +1289,7 @@ UUIInteractionHelper::handleNameClashResolveRequest(
break;
}
}
+#endif
void
UUIInteractionHelper::handleGenericErrorRequest(
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 6402653d3bda..581099462845 100644..100755
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -215,6 +215,8 @@ private:
com::sun::star::task::XInteractionRequest > const & rRequest)
SAL_THROW((com::sun::star::uno::RuntimeException));
+// @@@ Todo #i29340#: activate!
+#if 0
void
handleNameClashResolveRequest(
com::sun::star::ucb::NameClashResolveRequest const & rRequest,
@@ -223,6 +225,7 @@ private:
com::sun::star::task::XInteractionContinuation > > const &
rContinuations)
SAL_THROW((com::sun::star::uno::RuntimeException));
+#endif
bool
handleMasterPasswordRequest(
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 1ef370f43a92..5b1e24befc9b 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -473,7 +473,6 @@ static void AddPolygonToPath( CGMutablePathRef xPath,
const CGAffineTransform* pTransform = NULL;
const bool bHasCurves = rPolygon.areControlPointsUsed();
- bool bPendingCurve = false;
for( int nPointIdx = 0, nPrevIdx = 0;; nPrevIdx = nPointIdx++ )
{
int nClosedIdx = nPointIdx;
@@ -488,7 +487,7 @@ static void AddPolygonToPath( CGMutablePathRef xPath,
::basegfx::B2DPoint aPoint = rPolygon.getB2DPoint( nClosedIdx );
- if(bPixelSnap)
+ if( bPixelSnap)
{
// snap device coordinates to full pixels
aPoint.setX( basegfx::fround( aPoint.getX() ) );
@@ -498,9 +497,19 @@ static void AddPolygonToPath( CGMutablePathRef xPath,
if( bLineDraw )
aPoint += aHalfPointOfs;
- if( !nPointIdx ) // first point
+ if( !nPointIdx ) { // first point => just move there
CGPathMoveToPoint( xPath, pTransform, aPoint.getX(), aPoint.getY() );
- else if( !bPendingCurve ) // line segment
+ continue;
+ }
+
+ bool bPendingCurve = false;
+ if( bHasCurves )
+ {
+ bPendingCurve = rPolygon.isNextControlPointUsed( nPrevIdx );
+ bPendingCurve |= rPolygon.isPrevControlPointUsed( nClosedIdx );
+ }
+
+ if( !bPendingCurve ) // line segment
CGPathAddLineToPoint( xPath, pTransform, aPoint.getX(), aPoint.getY() );
else // cubic bezier segment
{
@@ -514,9 +523,6 @@ static void AddPolygonToPath( CGMutablePathRef xPath,
CGPathAddCurveToPoint( xPath, pTransform, aCP1.getX(), aCP1.getY(),
aCP2.getX(), aCP2.getY(), aPoint.getX(), aPoint.getY() );
}
-
- if( bHasCurves )
- bPendingCurve = rPolygon.isNextControlPointUsed( nClosedIdx );
}
if( bClosePath )
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 0fd028864bf4..b14354e1b4bd 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -1357,40 +1357,81 @@ void AquaSalFrame::GetWorkArea( Rectangle& rRect )
SalPointerState AquaSalFrame::GetPointerState()
{
SalPointerState state;
+ state.mnState = 0;
// get position
NSPoint aPt = [mpWindow mouseLocationOutsideOfEventStream];
CocoaToVCL( aPt, false );
state.maPos = Point(static_cast<long>(aPt.x), static_cast<long>(aPt.y));
- // FIXME: replace Carbon by Cocoa
- // Cocoa does not have an equivalent for GetCurrentEventButtonState
- // and GetCurrentEventKeyModifiers.
- // we could try to get away with tracking all events for modifierKeys
- // and all mouse events for button state in VCL_NSApllication::sendEvent,
- // but it is unclear whether this will get us the same result.
- // leave in GetCurrentEventButtonState and GetCurrentEventKeyModifiers for now
+ NSEvent* pCur = [NSApp currentEvent];
+ bool bMouseEvent = false;
+ if( pCur )
+ {
+ bMouseEvent = true;
+ switch( [pCur type] )
+ {
+ case NSLeftMouseDown: state.mnState |= MOUSE_LEFT; break;
+ case NSLeftMouseUp: break;
+ case NSRightMouseDown: state.mnState |= MOUSE_RIGHT; break;
+ case NSRightMouseUp: break;
+ case NSOtherMouseDown: state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0; break;
+ case NSOtherMouseUp: break;
+ case NSMouseMoved: break;
+ case NSLeftMouseDragged: state.mnState |= MOUSE_LEFT; break;
+ case NSRightMouseDragged: state.mnState |= MOUSE_RIGHT; break;
+ case NSOtherMouseDragged: state.mnState |= ([pCur buttonNumber] == 2) ? MOUSE_MIDDLE : 0; break;
+ break;
+ default:
+ bMouseEvent = false;
+ break;
+ }
+ }
+ if( bMouseEvent )
+ {
+ unsigned int nMask = (unsigned int)[pCur modifierFlags];
+ if( (nMask & NSShiftKeyMask) != 0 )
+ state.mnState |= KEY_SHIFT;
+ if( (nMask & NSControlKeyMask) != 0 )
+ state.mnState |= KEY_MOD3;
+ if( (nMask & NSAlternateKeyMask) != 0 )
+ state.mnState |= KEY_MOD2;
+ if( (nMask & NSCommandKeyMask) != 0 )
+ state.mnState |= KEY_MOD1;
+
+ }
+ else
+ {
+ // FIXME: replace Carbon by Cocoa
+ // Cocoa does not have an equivalent for GetCurrentEventButtonState
+ // and GetCurrentEventKeyModifiers.
+ // we could try to get away with tracking all events for modifierKeys
+ // and all mouse events for button state in VCL_NSApllication::sendEvent,
+ // but it is unclear whether this will get us the same result.
+ // leave in GetCurrentEventButtonState and GetCurrentEventKeyModifiers for now
+
+ // fill in button state
+ UInt32 nState = GetCurrentEventButtonState();
+ state.mnState = 0;
+ if( nState & 1 )
+ state.mnState |= MOUSE_LEFT; // primary button
+ if( nState & 2 )
+ state.mnState |= MOUSE_RIGHT; // secondary button
+ if( nState & 4 )
+ state.mnState |= MOUSE_MIDDLE; // tertiary button
+
+ // fill in modifier state
+ nState = GetCurrentEventKeyModifiers();
+ if( nState & shiftKey )
+ state.mnState |= KEY_SHIFT;
+ if( nState & controlKey )
+ state.mnState |= KEY_MOD3;
+ if( nState & optionKey )
+ state.mnState |= KEY_MOD2;
+ if( nState & cmdKey )
+ state.mnState |= KEY_MOD1;
+ }
- // fill in button state
- UInt32 nState = GetCurrentEventButtonState();
- state.mnState = 0;
- if( nState & 1 )
- state.mnState |= MOUSE_LEFT; // primary button
- if( nState & 2 )
- state.mnState |= MOUSE_RIGHT; // secondary button
- if( nState & 4 )
- state.mnState |= MOUSE_MIDDLE; // tertiary button
-
- // fill in modifier state
- nState = GetCurrentEventKeyModifiers();
- if( nState & shiftKey )
- state.mnState |= KEY_SHIFT;
- if( nState & controlKey )
- state.mnState |= KEY_MOD3;
- if( nState & optionKey )
- state.mnState |= KEY_MOD2;
- if( nState & cmdKey )
- state.mnState |= KEY_MOD1;
return state;
}
diff --git a/vcl/inc/vcl/help.hxx b/vcl/inc/vcl/help.hxx
index 4bca986812ed..30308aa8a723 100644
--- a/vcl/inc/vcl/help.hxx
+++ b/vcl/inc/vcl/help.hxx
@@ -48,6 +48,7 @@ class Window;
#define QUICKHELP_BOTTOM ((USHORT)0x0020)
#define QUICKHELP_NOAUTOPOS (QUICKHELP_LEFT | QUICKHELP_CENTER | QUICKHELP_RIGHT | QUICKHELP_TOP | QUICKHELP_VCENTER | QUICKHELP_BOTTOM)
#define QUICKHELP_CTRLTEXT ((USHORT)0x0040)
+#define QUICKHELP_NOEVADEPOINTER ((USHORT)0x4000)
#define QUICKHELP_BIDI_RTL ((USHORT)0x8000)
// By changes you must also change: rsc/vclrsc.hxx
diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx
index 6ce9f21500b5..a1104bbf4a86 100644
--- a/vcl/inc/vcl/impfont.hxx
+++ b/vcl/inc/vcl/impfont.hxx
@@ -177,7 +177,8 @@ class CmapResult;
class VCL_DLLPUBLIC ImplFontCharMap
{
public:
- explicit ImplFontCharMap( const CmapResult& );
+ explicit ImplFontCharMap( const CmapResult& );
+ virtual ~ImplFontCharMap();
static ImplFontCharMap* GetDefaultMap( bool bSymbols=false);
@@ -201,7 +202,6 @@ public:
int GetGlyphIndex( sal_uInt32 ) const;
private:
- /*virtual*/ ~ImplFontCharMap();
int ImplFindRangeIndex( sal_uInt32 ) const;
// prevent assignment and copy construction
diff --git a/vcl/inc/vcl/lstbox.hxx b/vcl/inc/vcl/lstbox.hxx
index 98cd05d999dd..3659e5aee485 100644
--- a/vcl/inc/vcl/lstbox.hxx
+++ b/vcl/inc/vcl/lstbox.hxx
@@ -130,6 +130,7 @@ public:
virtual USHORT GetEntryPos( const XubString& rStr ) const;
virtual USHORT GetEntryPos( const void* pData ) const;
+ Image GetEntryImage( USHORT nPos ) const;
virtual XubString GetEntry( USHORT nPos ) const;
virtual USHORT GetEntryCount() const;
diff --git a/vcl/inc/vcl/syswin.hxx b/vcl/inc/vcl/syswin.hxx
index b0e74df9a767..b3a7d9b8775e 100644
--- a/vcl/inc/vcl/syswin.hxx
+++ b/vcl/inc/vcl/syswin.hxx
@@ -179,6 +179,8 @@ private:
SystemWindow (const SystemWindow &);
SystemWindow & operator= (const SystemWindow &);
+ SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin );
+
protected:
// Single argument ctors shall be explicit.
explicit SystemWindow( WindowType nType );
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index b4ab10887fcd..ac1da931ba06 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -759,18 +759,26 @@ void ImplSetHelpWindowPos( Window* pHelpWin, USHORT nHelpWinStyle, USHORT nStyle
else if ( ( aPos.Y() + aSz.Height() ) > aScreenRect.Bottom() )
aPos.Y() = aScreenRect.Bottom() - aSz.Height();
- // the popup must not appear under the mouse
- // otherwise it would directly be closed due to a focus change...
- Rectangle aHelpRect( aPos, aSz );
- if( aHelpRect.IsInside( mPos ) )
+ if( ! (nStyle & QUICKHELP_NOEVADEPOINTER) )
{
- Point delta(2,2);
- Point pSize( aSz.Width(), aSz.Height() );
- Point pTest( mPos - pSize - delta );
- if( pTest.X() > aScreenRect.Left() && pTest.Y() > aScreenRect.Top() )
- aPos = pTest;
- else
- aPos = mPos + delta;
+ /* the remark below should be obsolete by now as the helpwindow should
+ not be focusable, leaving it as a hint. However it is sensible in most
+ conditions to evade the mouse pointer so the content window is fully visible.
+
+ // the popup must not appear under the mouse
+ // otherwise it would directly be closed due to a focus change...
+ */
+ Rectangle aHelpRect( aPos, aSz );
+ if( aHelpRect.IsInside( mPos ) )
+ {
+ Point delta(2,2);
+ Point pSize( aSz.Width(), aSz.Height() );
+ Point pTest( mPos - pSize - delta );
+ if( pTest.X() > aScreenRect.Left() && pTest.Y() > aScreenRect.Top() )
+ aPos = pTest;
+ else
+ aPos = mPos + delta;
+ }
}
Window* pWindow = pHelpWin->GetParent()->ImplGetFrameWindow();
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 70b67c0a3d57..6c7df5b106bf 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -885,6 +885,8 @@ void ListBox::StateChanged( StateChangedType nType )
{
SetStyle( ImplInitStyle( GetStyle() ) );
mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? TRUE : FALSE );
+ BOOL bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? TRUE : FALSE;
+ mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode );
}
else if( nType == STATE_CHANGE_MIRRORING )
{
@@ -1081,6 +1083,15 @@ void ListBox::RemoveEntry( USHORT nPos )
// -----------------------------------------------------------------------
+Image ListBox::GetEntryImage( USHORT nPos ) const
+{
+ if ( mpImplLB->GetEntryList()->HasEntryImage( nPos ) )
+ return mpImplLB->GetEntryList()->GetEntryImage( nPos );
+ return Image();
+}
+
+// -----------------------------------------------------------------------
+
USHORT ListBox::GetEntryPos( const XubString& rStr ) const
{
USHORT nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 620ca64f44d9..cb565122ea63 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -469,7 +469,7 @@ public: // TODO: is public really needed?
private:
// typeop exceution context
int mnStackIdx;
- ValType mnValStack[ NMAXSTACK];
+ ValType mnValStack[ NMAXSTACK+4];
ValType mnTransVals[ NMAXTRANS];
int mnHintSize;
@@ -1242,16 +1242,33 @@ void CffSubsetterContext::convertOneTypeEsc( void)
break;
}
case TYPE2OP::HFLEX1: {
- assert( mnStackIdx == 9 );
- writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, -6 );
- writeCurveTo( mnStackIdx, -4, -6, -3, -2, -1, -8 );
+ assert( mnStackIdx == 9);
+#if 0 // emulate hflex1 as straight line
+ const ValType* pX = &mnValStack[ mnStackIdx];
+ const ValType fDX = pX[-9] + pX[-7] + pX[-5] + pX[-4] + pX[-3] + pX[-1];
+ writeType1Val( fDX);
+ writeTypeOp( TYPE1OP::HLINETO);
+#else // emulate hflex1 as two curves
+ writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, 0);
+ writeCurveTo( mnStackIdx, -4, 0, -3, -2, -1, 0);
+ // TODO: emulate hflex1 using othersubr call
+#endif
mnStackIdx -= 9;
}
break;
case TYPE2OP::HFLEX: {
- assert( mnStackIdx == 7 );
- writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, -5 );
- writeCurveTo( mnStackIdx, -3, -5, -2, 0, -1, 0 );
+ assert( mnStackIdx == 7);
+ ValType* pX = &mnValStack[ mnStackIdx];
+#if 0 // emulate hflex as straight line
+ const ValType fDX = pX[-7] + pX[-6] + pX[-4] + pX[-3] + pX[-2] + pX[-1];
+ writeType1Val( fDX);
+ writeTypeOp( TYPE1OP::HLINETO);
+#else // emulate hflex as two curves
+ pX[+1] = -pX[-5]; // temp: +dy5==-dy2
+ writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, 0);
+ writeCurveTo( mnStackIdx, -3, 0, -2, +1, -1, 0);
+ // TODO: emulate hflex using othersubr call
+#endif
mnStackIdx -= 7;
}
break;
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx
index e5f54df41c9e..325146b6be8a 100644
--- a/vcl/source/gdi/metric.cxx
+++ b/vcl/source/gdi/metric.cxx
@@ -386,8 +386,9 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
const bool bSymbolic = (mpRangeCodes[0]>=0xF000) & (mpRangeCodes[1]<=0xF0FF);
if( !bSymbolic )
return 0;
- // check for symbol aliasing (U+F0xx -> U+00xx)
- nRange = ImplFindRangeIndex( cChar | 0xF000 );
+ // check for symbol aliasing (U+00xx <-> U+F0xx)
+ cChar |= 0xF000;
+ nRange = ImplFindRangeIndex( cChar );
}
// check that we are inside a range
if( (nRange & 1) != 0 )
@@ -401,7 +402,7 @@ int ImplFontCharMap::GetGlyphIndex( sal_uInt32 cChar ) const
nGlyphIndex += nStartIndex;
} else {
// the glyphid array has the glyph index
- nGlyphIndex = mpGlyphIds[ nGlyphIndex - nStartIndex];
+ nGlyphIndex = mpGlyphIds[ nGlyphIndex - nStartIndex ];
}
return nGlyphIndex;
diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx
index 62be0130e068..bb5e4e3ba36d 100644
--- a/vcl/source/gdi/outdev.cxx
+++ b/vcl/source/gdi/outdev.cxx
@@ -2383,6 +2383,16 @@ void OutputDevice::impPaintLineGeometryWithEvtlExpand(
{
const double fHalfLineWidth((rInfo.GetWidth() * 0.5) + 0.5);
+ if(aLinePolyPolygon.areControlPointsUsed())
+ {
+ // #i110768# When area geometry has to be created, do not
+ // use the fallback bezier decomposition inside createAreaGeometry,
+ // but one that is at least as good as ImplSubdivideBezier was.
+ // There, Polygon::AdaptiveSubdivide was used with default parameter
+ // 1.0 as quality index.
+ aLinePolyPolygon = basegfx::tools::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0);
+ }
+
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
aFillPolyPolygon.append(basegfx::tools::createAreaGeometry(
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index f4fcba72b0c2..949d3df5275f 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -579,6 +579,7 @@ Font OutputDevice::GetDefaultFont( USHORT nType, LanguageType eLang,
{
aFont.SetHeight( nDefaultHeight );
aFont.SetWeight( WEIGHT_NORMAL );
+ aFont.SetLanguage( eLang );
if ( aFont.GetCharSet() == RTL_TEXTENCODING_DONTKNOW )
aFont.SetCharSet( gsl_getSystemTextEncoding() );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 7ee5889ba532..77f7f74fc10e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9749,7 +9749,7 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask )
aLine.append( " ]\n" );
}
}
- else if( m_bIsPDF_A1 )
+ else if( m_bIsPDF_A1 && (bWriteMask || aTransparentColor != Color( COL_TRANSPARENT )) )
m_aErrors.insert( PDFWriter::Warning_Transparency_Omitted_PDFA );
aLine.append( ">>\n"
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index b7eb8e5f50bf..11971db34378 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -703,7 +703,7 @@ void PNGReaderImpl::ImplGetGrayPalette( sal_uInt16 nBitDepth )
nBitDepth = 8;
sal_uInt16 nPaletteEntryCount = 1 << nBitDepth;
- sal_uInt32 nAdd = 256 / (nPaletteEntryCount - 1);
+ sal_uInt32 nAdd = nBitDepth ? 256 / (nPaletteEntryCount - 1) : 0;
// no bitdepth==2 available
// but bitdepth==4 with two unused bits is close enough
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 80ae3a3a8c7f..5e187944c706 100755
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -133,20 +133,21 @@ int GetVerticalFlags( sal_UCS4 nChar )
/* #i52932# remember:
nChar == 0x2010 || nChar == 0x2015
nChar == 0x2016 || nChar == 0x2026
- are GF_NONE also, but already handled in the first if
+ are GF_NONE also, but already handled in the outer if condition
*/
if((nChar >= 0x3008 && nChar <= 0x301C && nChar != 0x3012)
|| (nChar == 0xFF3B || nChar == 0xFF3D)
|| (nChar >= 0xFF5B && nChar <= 0xFF9F) // halfwidth forms
- || (nChar == 0xFFE3)
- || (nChar >= 0x02F800 && nChar <= 0x02FFFF) )
+ || (nChar == 0xFFE3) )
return GF_NONE; // not rotated
else if( nChar == 0x30fc )
return GF_ROTR; // right
return GF_ROTL; // left
}
+ else if( (nChar >= 0x20000) && (nChar <= 0x3FFFF) ) // all SIP/TIP ideographs
+ return GF_ROTL; // left
- return GF_NONE;
+ return GF_NONE; // not rotated as default
}
// -----------------------------------------------------------------------
@@ -1800,8 +1801,8 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs )
int nRunStart, nRunEnd;
while (rArgs.GetNextRun(&nRunStart, &nRunEnd, &bRtl))
{
- if (bRtl) std::fill(vRtl.begin() + ( nRunStart - rArgs.mnMinCharPos ),
- vRtl.begin() + ( nRunEnd - rArgs.mnMinCharPos ), true);
+ if (bRtl) std::fill(vRtl.begin() + (nRunStart - rArgs.mnMinCharPos),
+ vRtl.begin() + (nRunEnd - rArgs.mnMinCharPos), true);
}
rArgs.ResetPos();
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ddfb1125d0d7..cebe1d1f596c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -32,6 +32,7 @@
#include "vcl/salinst.hxx"
#include "tools/list.hxx"
#include "tools/debug.hxx"
+#include "tools/diagnose_ex.h"
#include "vcl/svdata.hxx"
#include "vcl/svapp.hxx"
#include "vcl/mnemonic.hxx"
@@ -3464,6 +3465,9 @@ USHORT PopupMenu::Execute( Window* pExecWindow, const Point& rPopupPos )
USHORT PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, USHORT nFlags )
{
+ ENSURE_OR_RETURN( pExecWindow, "PopupMenu::Execute: need a non-NULL window!", 0 );
+
+
ULONG nPopupModeFlags = 0;
if ( nFlags & POPUPMENU_EXECUTE_DOWN )
nPopupModeFlags = FLOATWIN_POPUPMODE_DOWN;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 056b55dc3b61..f3624ef56f59 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -659,6 +659,63 @@ static void ImplWindowStateToStr( const WindowStateData& rData, ByteString& rStr
// -----------------------------------------------------------------------
+void SystemWindow::ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin )
+{
+ Rectangle aScreenRect;
+ if( Application::IsMultiDisplay() )
+ {
+ aScreenRect = Application::GetScreenPosSizePixel( GetScreenNumber() );
+ }
+ else
+ {
+ aScreenRect = Application::GetScreenPosSizePixel( 0 );
+ for( unsigned int i = 1; i < Application::GetScreenCount(); i++ )
+ aScreenRect.Union( Application::GetScreenPosSizePixel( i ) );
+ }
+ // unfortunately most of the time width and height are not really known
+ if( i_nWidth < 1 )
+ i_nWidth = 50;
+ if( i_nHeight < 1 )
+ i_nHeight = 50;
+
+ // check left border
+ bool bMove = false;
+ if( io_rX + i_nWidth < aScreenRect.Left() )
+ {
+ bMove = true;
+ io_rX = aScreenRect.Left();
+ }
+ // check right border
+ if( io_rX > aScreenRect.Right() - i_nWidth )
+ {
+ bMove = true;
+ io_rX = aScreenRect.Right() - i_nWidth;
+ }
+ // check top border
+ if( io_rY + i_nHeight < aScreenRect.Top() )
+ {
+ bMove = true;
+ io_rY = aScreenRect.Top();
+ }
+ // check bottom border
+ if( io_rY > aScreenRect.Bottom() - i_nHeight )
+ {
+ bMove = true;
+ io_rY = aScreenRect.Bottom() - i_nHeight;
+ }
+ Window* pParent = i_pConfigureWin->GetParent();
+ if( bMove && pParent )
+ {
+ // calculate absolute screen pos here, since that is what is contained in WindowState
+ Point aParentAbsPos( pParent->OutputToAbsoluteScreenPixel( Point(0,0) ) );
+ Size aParentSizePixel( pParent->GetOutputSizePixel() );
+ Point aPos( (aParentSizePixel.Width() - i_nWidth) / 2,
+ (aParentSizePixel.Height() - i_nHeight) / 2 );
+ io_rX = aParentAbsPos.X() + aPos.X();
+ io_rY = aParentAbsPos.Y() + aPos.Y();
+ }
+}
+
void SystemWindow::SetWindowStateData( const WindowStateData& rData )
{
ULONG nValidMask = rData.GetMask();
@@ -701,6 +758,10 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
//nState &= ~(WINDOWSTATE_STATE_MINIMIZED);
aState.mnState = nState & SAL_FRAMESTATE_SYSTEMMASK;
+ // normalize window positions onto screen
+ ImplMoveToScreen( aState.mnX, aState.mnY, aState.mnWidth, aState.mnHeight, pWindow );
+ ImplMoveToScreen( aState.mnMaximizedX, aState.mnMaximizedY, aState.mnMaximizedWidth, aState.mnMaximizedHeight, pWindow );
+
// #96568# avoid having multiple frames at the same screen location
// do the check only if not maximized
if( !((rData.GetMask() & WINDOWSTATE_MASK_STATE) && (nState & WINDOWSTATE_STATE_MAXIMIZED)) )
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index f63f999738a7..2679f4a29c02 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -636,9 +636,6 @@ void GtkXLib::Init()
Display *pDisp = gdk_x11_display_get_xdisplay( pGdkDisp );
- XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
- XSetErrorHandler ( (XErrorHandler)X11SalData::XErrorHdl );
-
m_pGtkSalDisplay = new GtkSalDisplay( pGdkDisp );
gdk_window_add_filter( NULL, call_filterGdkEvent, m_pGtkSalDisplay );
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 244c001b3aa0..cdc72485ae6c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3454,11 +3454,11 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aBackColor = getColor( pMenubarStyle->bg[GTK_STATE_NORMAL] );
aStyleSet.SetMenuBarColor( aBackColor );
aBackColor = getColor( pMenuStyle->bg[GTK_STATE_NORMAL] );
- aTextColor = getColor( pMenuTextStyle->text[GTK_STATE_NORMAL] );
+ aTextColor = getColor( pMenuTextStyle->fg[GTK_STATE_NORMAL] );
aStyleSet.SetMenuColor( aBackColor );
aStyleSet.SetMenuTextColor( aTextColor );
- aTextColor = getColor( pMenubarStyle->text[GTK_STATE_NORMAL] );
+ aTextColor = getColor( pMenubarStyle->fg[GTK_STATE_NORMAL] );
aStyleSet.SetMenuBarTextColor( aTextColor );
#if OSL_DEBUG_LEVEL > 1
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 3d11ce8a37ea..11d567c85098 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1353,15 +1353,11 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
//
// i.e. having a time < that of the toplevel frame means that the toplevel frame gets unfocused.
// awesome.
- bool bMetaCity = getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity");
- if( nUserTime == 0 &&
- ( bMetaCity ||
- (
- getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz") &&
- (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION))
- )
- )
- )
+ bool bHack =
+ getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") ||
+ getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("compiz")
+ ;
+ if( nUserTime == 0 && bHack )
{
/* #i99360# ugly workaround an X11 library bug */
nUserTime= getDisplay()->GetLastUserEventTime( true );
@@ -1369,7 +1365,7 @@ void GtkSalFrame::Show( BOOL bVisible, BOOL bNoActivate )
}
lcl_set_user_time( GTK_WIDGET(m_pWindow)->window, nUserTime );
- if( bMetaCity && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
+ if( bHack && ! bNoActivate && (m_nStyle & SAL_FRAME_STYLE_TOOLWINDOW) )
m_bSetFocusOnMap = true;
gtk_widget_show( m_pWindow );
@@ -3240,7 +3236,8 @@ GtkSalFrame::IMHandler::IMHandler( GtkSalFrame* pFrame )
: m_pFrame(pFrame),
m_nPrevKeyPresses( 0 ),
m_pIMContext( NULL ),
- m_bFocused( true )
+ m_bFocused( true ),
+ m_bPreeditJustChanged( false )
{
m_aInputEvent.mpTextAttr = NULL;
createIMContext();
@@ -3415,6 +3412,8 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
if( aDel.isDeleted() )
return true;
+ m_bPreeditJustChanged = false;
+
if( bResult )
return true;
else
@@ -3444,6 +3443,8 @@ bool GtkSalFrame::IMHandler::handleKeyEvent( GdkEventKey* pEvent )
if( aDel.isDeleted() )
return true;
+ m_bPreeditJustChanged = false;
+
std::list<PreviousKeyPress>::iterator iter = m_aPrevKeyPresses.begin();
std::list<PreviousKeyPress>::iterator iter_end = m_aPrevKeyPresses.end();
while (iter != iter_end)
@@ -3507,8 +3508,6 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
{
GTK_YIELD_GRAB();
- bool bWasPreedit = (pThis->m_aInputEvent.mpTextAttr != 0);
-
pThis->m_aInputEvent.mnTime = 0;
pThis->m_aInputEvent.mpTextAttr = 0;
pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
@@ -3532,6 +3531,9 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
* or because there never was a preedit.
*/
bool bSingleCommit = false;
+ bool bWasPreedit =
+ (pThis->m_aInputEvent.mpTextAttr != 0) ||
+ pThis->m_bPreeditJustChanged;
if( ! bWasPreedit
&& pThis->m_aInputEvent.maText.Len() == 1
&& ! pThis->m_aPrevKeyPresses.empty()
@@ -3546,7 +3548,6 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
bSingleCommit = true;
}
}
-
if( ! bSingleCommit )
{
pThis->m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pThis->m_aInputEvent);
@@ -3594,6 +3595,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
}
}
+ pThis->m_bPreeditJustChanged = true;
+
bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != NULL;
pThis->m_aInputEvent.mnTime = 0;
pThis->m_aInputEvent.maText = String( pText, RTL_TEXTENCODING_UTF8 );
@@ -3677,6 +3680,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
GtkSalFrame::IMHandler* pThis = (GtkSalFrame::IMHandler*)im_handler;
GTK_YIELD_GRAB();
+ pThis->m_bPreeditJustChanged = true;
+
vcl::DeletionListener aDel( pThis->m_pFrame );
pThis->doCallEndExtTextInput();
if( ! aDel.isDeleted() )
diff --git a/vcl/unx/inc/plugins/gtk/gtkframe.hxx b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
index 88a26b401eed..18dd476fc2c4 100644
--- a/vcl/unx/inc/plugins/gtk/gtkframe.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkframe.hxx
@@ -130,6 +130,7 @@ class GtkSalFrame : public SalFrame
int m_nPrevKeyPresses; // avoid using size()
GtkIMContext* m_pIMContext;
bool m_bFocused;
+ bool m_bPreeditJustChanged;
SalExtTextInputEvent m_aInputEvent;
std::vector< USHORT > m_aInputFlags;
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index e54d6e828911..3734cbec6ef7 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -231,6 +231,7 @@ protected:
XErrorHandler m_aHandler;
};
std::vector< XErrorStackEntry > m_aXErrorHandlerStack;
+ XIOErrorHandler m_aOrigXIOErrorHandler;
public:
SalXLib();
virtual ~SalXLib();
diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h
index da69f04b6f8f..6ccea2c4a00c 100644
--- a/vcl/unx/inc/salgdi.h
+++ b/vcl/unx/inc/salgdi.h
@@ -57,6 +57,10 @@ class ImplLayoutArgs;
class X11FontLayout;
class ServerFontLayout;
+namespace basegfx {
+ class B2DTrapezoid;
+}
+
// -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class CairoFontsCache
@@ -289,8 +293,11 @@ public:
virtual void drawPolyPolygon( sal_uInt32 nPoly,
const sal_uInt32* pPoints,
PCONSTSALPOINT* pPtAry );
- virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rPolyPolygon, double fTransparency );
- virtual bool drawPolyLine( const ::basegfx::B2DPolygon& rPolygon, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin);
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
+ virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin );
+ virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency );
+
+#if 1 // TODO: remove these obselete methods
virtual sal_Bool drawPolyLineBezier( ULONG nPoints,
const SalPoint* pPtAry,
const BYTE* pFlgAry );
@@ -301,6 +308,8 @@ public:
const sal_uInt32* pPoints,
const SalPoint* const* pPtAry,
const BYTE* const* pFlgAry );
+#endif
+
virtual void copyArea( long nDestX,
long nDestY,
long nSrcX,
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index 5e2801e47fc6..34b0ff652cde 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -182,9 +182,6 @@ void KDEXLib::Init()
SalDisplay *pSalDisplay = new SalKDEDisplay( pDisp );
- XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
- XSetErrorHandler ( (XErrorHandler)X11SalData::XErrorHdl );
-
pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod );
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index e8d184e6539b..5f8b5d2ae59e 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -744,7 +744,7 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
{
if( part == PART_BORDER )
{
- int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+ int size = kapp->style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
USHORT nStyle = val.getNumericVal();
if( nStyle & FRAME_DRAW_NODRAW )
{
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 2e5b86b79f9c..6a2793b8abe3 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -148,9 +148,6 @@ void KDEXLib::Init()
((VCLKDEApplication*)m_pApplication)->disp = pSalDisplay;
- XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
- XSetErrorHandler ( (XErrorHandler)X11SalData::XErrorHdl );
-
pInputMethod->CreateMethod( pDisp );
pInputMethod->AddConnectionWatch( pDisp, (void*)this );
pSalDisplay->SetInputMethod( pInputMethod );
@@ -175,4 +172,4 @@ void KDEXLib::doStartup()
fprintf( stderr, "called KStartupInfo::appStarted()\n" );
#endif
}
-} \ No newline at end of file
+}
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index 75d18de0787a..50ef71df8619 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -353,8 +353,9 @@ SalXLib::SalXLib()
nFDs_ = m_pTimeoutFDS[0] + 1;
}
- PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
m_bHaveSystemChildFrames = false;
+ m_aOrigXIOErrorHandler = XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
+ PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
}
SalXLib::~SalXLib()
@@ -364,6 +365,7 @@ SalXLib::~SalXLib()
close (m_pTimeoutFDS[1]);
PopXErrorLevel();
+ XSetIOErrorHandler (m_aOrigXIOErrorHandler);
}
void SalXLib::PushXErrorLevel( bool bIgnore )
@@ -459,8 +461,6 @@ void SalXLib::Init()
exit(0);
}
- XSetIOErrorHandler ( (XIOErrorHandler)X11SalData::XIOErrorHdl );
-
SalDisplay *pSalDisplay = new SalX11Display( pDisp );
pInputMethod->CreateMethod( pDisp );
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index 93e3eef53ab3..21183dc567ec 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -40,6 +40,7 @@
#include "vcl/fontcache.hxx"
#include "vcl/fontcache.hxx"
#include "vcl/fontsubset.hxx"
+#include "vcl/impfont.hxx"
#include "vcl/strhelper.hxx"
#include "vcl/ppdparser.hxx"
#include "vcl/svdata.hxx"
@@ -3795,6 +3796,35 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
free( pMetrics );
rUnicodeEnc.clear();
}
+
+ // fill the unicode map
+ // TODO: isn't this map already available elsewhere in the fontmanager?
+ const sal_uInt8* pCmapData = NULL;
+ int nCmapSize = 0;
+ if( GetSfntTable( pTTFont, O_cmap, &pCmapData, &nCmapSize ) )
+ {
+ CmapResult aCmapResult;
+ if( ParseCMAP( pCmapData, nCmapSize, aCmapResult ) )
+ {
+ const ImplFontCharMap aCharMap( aCmapResult );
+ for( sal_uInt32 cOld = 0;;)
+ {
+ // get next unicode covered by font
+ const sal_uInt32 c = aCharMap.GetNextChar( cOld );
+ if( c == cOld )
+ break;
+ cOld = c;
+#if 1 // TODO: remove when sal_Unicode covers all of unicode
+ if( c > (sal_Unicode)~0 )
+ break;
+#endif
+ // get the matching glyph index
+ const sal_uInt32 nGlyphId = aCharMap.GetGlyphIndex( c );
+ // update the requested map
+ rUnicodeEnc[ (sal_Unicode)c ] = nGlyphId;
+ }
+ }
+ }
}
CloseTTFont( pTTFont );
}
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 7637d3b2bd02..15e391256344 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -50,8 +50,9 @@
#include "basegfx/polygon/b2dpolygonclipper.hxx"
#include "basegfx/polygon/b2dlinegeometry.hxx"
#include "basegfx/matrix/b2dhommatrix.hxx"
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include "basegfx/matrix/b2dhommatrixtools.hxx"
#include "basegfx/polygon/b2dpolypolygoncutter.hxx"
+#include "basegfx/polygon/b2dtrapezoid.hxx"
#include <vector>
#include <queue>
@@ -1087,115 +1088,6 @@ SystemGraphicsData X11SalGraphics::GetGraphicsData() const
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-// B2DPolygon support methods
-
-namespace { // anonymous namespace to prevent export
-// the methods and structures here are used by the
-// B2DPolyPolygon->RenderTrapezoid conversion algorithm
-
-// compare two line segments
-// assumption: both segments point downward
-// assumption: they must have at least some y-overlap
-// assumption: rA.p1.y <= rB.p1.y
-bool IsLeftOf( const XLineFixed& rA, const XLineFixed& rB )
-{
- bool bAbove = (rA.p1.y <= rB.p1.y);
- const XLineFixed& rU = bAbove ? rA : rB;
- const XLineFixed& rL = bAbove ? rB : rA;
-
- const XFixed aXDiff = rU.p2.x - rU.p1.x;
- const XFixed aYDiff = rU.p2.y - rU.p1.y;
-
- // compare upper point of lower segment with line through upper segment
- if( (rU.p1.y != rL.p1.y) || (rU.p1.x != rL.p1.x) )
- {
- const sal_Int64 n1 = (sal_Int64)aXDiff * (rL.p1.y - rU.p1.y);
- const sal_Int64 n2 = (sal_Int64)aYDiff * (rL.p1.x - rU.p1.x);
- if( n1 != n2 )
- return ((n1 < n2) == bAbove);
- }
-
- // compare lower point of lower segment with line through upper segment
- if( (rU.p2.y != rL.p2.y) || (rU.p2.x != rL.p2.x) )
- {
- const sal_Int64 n3 = (sal_Int64)aXDiff * (rL.p2.y - rU.p1.y);
- const sal_Int64 n4 = (sal_Int64)aYDiff * (rL.p2.x - rU.p1.x);
- if( n3 != n4 )
- return ((n3 < n4) == bAbove);
- }
-
- // both segments overlap
- return false;
-}
-
-struct HalfTrapezoid
-{
- // assumptions:
- // maLine.p1.y <= mnY < maLine.p2.y
- XLineFixed maLine;
- XFixed mnY;
-
- XFixed getXMin() const { return std::min( maLine.p1.x, maLine.p2.x); }
- XFixed getXMax() const { return std::max( maLine.p1.x, maLine.p2.x); }
-};
-
-class HalfTrapCompare
-{
-public:
- bool operator()( const HalfTrapezoid& rA, const HalfTrapezoid& rB ) const
- {
- bool bIsTopLeft = false;
- if( rA.mnY != rB.mnY ) // sort top-first if possible
- bIsTopLeft = (rA.mnY < rB.mnY);
- else // else sort left-first
- bIsTopLeft = IsLeftOf( rA.maLine, rB.maLine );
- // adjust to priority_queue sorting convention
- return !bIsTopLeft;
- }
-};
-
-typedef std::vector< HalfTrapezoid > HTVector;
-typedef std::priority_queue< HalfTrapezoid, HTVector, HalfTrapCompare > HTQueueBase;
-// we need a priority queue with a reserve() to prevent countless reallocations
-class HTQueue
-: public HTQueueBase
-{
-public:
- void reserve( size_t n ) { c.reserve( n ); }
- void swapvec( HTVector& v ) { c.swap( v ); }
-};
-
-typedef std::vector<XTrapezoid> TrapezoidVector;
-
-class TrapezoidXCompare
-{
- const TrapezoidVector& mrVector;
-public:
- TrapezoidXCompare( const TrapezoidVector& rVector )
- : mrVector( rVector ) {}
- bool operator()( int nA, int nB ) const
- { return IsLeftOf( mrVector[nA].left, mrVector[nB].left ); }
-};
-
-typedef std::multiset< int, TrapezoidXCompare > ActiveTrapSet;
-
-class TrapezoidYCompare
-{
- const TrapezoidVector& mrVector;
-public:
- TrapezoidYCompare( const TrapezoidVector& rVector )
- : mrVector( rVector ) {}
- bool operator()( int nA, int nB ) const
- { return (mrVector[nA].bottom < mrVector[nB].bottom); }
-};
-
-typedef std::multiset< int, TrapezoidYCompare > VerticalTrapSet;
-
-#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND
-void splitIntersectingSegments( HTVector&);
-#endif // DISABLE_SOLVECROSSOVER_WORKAROUND
-} // end of anonymous namespace
-
// draw a poly-polygon
bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency)
{
@@ -1219,329 +1111,66 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
if( pRenderEnv )
return FALSE;
- // check xrender support for trapezoids
- XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
- if( !rRenderPeer.AreTrapezoidsSupported() )
- return FALSE;
- Picture aDstPic = GetXRenderPicture();
- // check xrender support for this drawable
- if( !aDstPic )
- return FALSE;
+ // snap to raster if requested
+ basegfx::B2DPolyPolygon aPolyPoly = rOrigPolyPoly;
+ const bool bSnapToRaster = !getAntiAliasB2DDraw();
+ if( bSnapToRaster )
+ aPolyPoly = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges( aPolyPoly );
// don't bother with polygons outside of visible area
const basegfx::B2DRange aViewRange( 0, 0, GetGraphicsWidth(), GetGraphicsHeight() );
- const basegfx::B2DRange aPolyRange = basegfx::tools::getRange( rOrigPolyPoly );
- const bool bNeedViewClip = aPolyRange.isInside( aViewRange );
- if( !aPolyRange.overlaps( aViewRange ) )
+ aPolyPoly = basegfx::tools::clipPolyPolygonOnRange( aPolyPoly, aViewRange, true, false );
+ if( !aPolyPoly.count() )
return true;
- // convert the polypolygon to trapezoids
-
- // prepare the polypolygon for the algorithm below:
- // - clip it against the view range
- // - make sure it contains no self-intersections
- // while we are at it guess the number of involved polygon points
- int nHTQueueReserve = 0;
- basegfx::B2DPolyPolygon aGoodPolyPoly;
- for( int nOrigPolyIdx = 0; nOrigPolyIdx < nOrigPolyCount; ++nOrigPolyIdx )
- {
- const ::basegfx::B2DPolygon aOuterPolygon = rOrigPolyPoly.getB2DPolygon( nOrigPolyIdx );
-
- // render-trapezoids should be inside the view => clip polygon against view range
- basegfx::B2DPolyPolygon aClippedPolygon( aOuterPolygon );
- if( bNeedViewClip )
- {
- aClippedPolygon = basegfx::tools::clipPolygonOnRange( aOuterPolygon, aViewRange, true, false );
- DBG_ASSERT( aClippedPolygon.count(), "polygon confirmed to overlap with view should not get here" );
- }
- const int nClippedPolyCount = aClippedPolygon.count();
- if( !nClippedPolyCount )
- continue;
-
-#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND
- for( int nClippedPolyIdx = 0; nClippedPolyIdx < nClippedPolyCount; ++nClippedPolyIdx )
- {
- const ::basegfx::B2DPolygon aSolvedPolygon = aClippedPolygon.getB2DPolygon( nClippedPolyIdx );
- const int nPointCount = aSolvedPolygon.count();
- aGoodPolyPoly.append( aSolvedPolygon );
- nHTQueueReserve += aSolvedPolygon.areControlPointsUsed() ? 8 * nPointCount : nPointCount;
- }
-#else // DISABLE_SOLVECROSSOVER_WORKAROUND
- // #i103259# polypoly.solveCrossover() fails to remove self-intersections
- // but polygon.solveCrossover() works. Use it to build the intersection-free polypolygon
- // TODO: if the self-intersection prevention is too expensive make the trap-algorithm tolerate intersections
- for( int nClippedPolyIdx = 0; nClippedPolyIdx < nClippedPolyCount; ++nClippedPolyIdx )
- {
- ::basegfx::B2DPolygon aUnsolvedPolygon = aClippedPolygon.getB2DPolygon( nClippedPolyIdx );
- basegfx::B2DPolyPolygon aSolvedPolyPoly( basegfx::tools::solveCrossovers( aUnsolvedPolygon) );
- const int nSolvedPolyCount = aSolvedPolyPoly.count();
- for( int nSolvedPolyIdx = 0; nSolvedPolyIdx < nSolvedPolyCount; ++nSolvedPolyIdx )
- {
- // build the intersection-free polypolygon one by one
- const ::basegfx::B2DPolygon aSolvedPolygon = aSolvedPolyPoly.getB2DPolygon( nSolvedPolyIdx );
- aGoodPolyPoly.append( aSolvedPolygon );
- // and while we are at it use the conviently available point count to guess the number of needed half-traps
- const int nPointCount = aSolvedPolygon.count();
- nHTQueueReserve += aSolvedPolygon.areControlPointsUsed() ? 8 * nPointCount : nPointCount;
- }
- }
-#endif // DISABLE_SOLVECROSSOVER_WORKAROUND
- }
- // #i100922# try to prevent priority-queue reallocations by reservering enough
- nHTQueueReserve = ((4*nHTQueueReserve) | 0x1FFF) + 1;
- HTVector aHTVector;
- aHTVector.reserve( nHTQueueReserve );
-
- // first convert the B2DPolyPolygon to HalfTrapezoids
- const int nGoodPolyCount = aGoodPolyPoly.count();
- for( int nGoodPolyIdx = 0; nGoodPolyIdx < nGoodPolyCount; ++nGoodPolyIdx )
- {
- ::basegfx::B2DPolygon aInnerPolygon = aGoodPolyPoly.getB2DPolygon( nGoodPolyIdx );
-
- // render-trapezoids have linear edges => get rid of bezier segments
- if( aInnerPolygon.areControlPointsUsed() )
- aInnerPolygon = ::basegfx::tools::adaptiveSubdivideByDistance( aInnerPolygon, 0.125 );
-
- const int nPointCount = aInnerPolygon.count();
- if( nPointCount >= 3 )
- {
- // convert polygon point pairs to HalfTrapezoids
- // connect the polygon point with the first one if needed
- XPointFixed aOldXPF = { 0, 0 };
- XPointFixed aNewXPF;
- for( int nPointIdx = 0; nPointIdx <= nPointCount; ++nPointIdx, aOldXPF = aNewXPF )
- {
- // auto-close the polygon if needed
- const int k = (nPointIdx < nPointCount) ? nPointIdx : 0;
- const ::basegfx::B2DPoint& aPoint = aInnerPolygon.getB2DPoint( k );
-
- // convert the B2DPoint into XRENDER units
- if(getAntiAliasB2DDraw())
- {
- aNewXPF.x = XDoubleToFixed( aPoint.getX() );
- aNewXPF.y = XDoubleToFixed( aPoint.getY() );
- }
- else
- {
- aNewXPF.x = XDoubleToFixed( basegfx::fround( aPoint.getX() ) );
- aNewXPF.y = XDoubleToFixed( basegfx::fround( aPoint.getY() ) );
- }
-
- // check if enough data is available for a new HalfTrapezoid
- if( nPointIdx == 0 )
- continue;
-
- // construct HalfTrapezoid as topdown segment
- HalfTrapezoid aHT;
- if( aNewXPF.y < aOldXPF.y )
- {
- aHT.maLine.p1 = aNewXPF;
- aHT.maLine.p2 = aOldXPF;
- }
- else
- {
- aHT.maLine.p2 = aNewXPF;
- aHT.maLine.p1 = aOldXPF;
- }
-
- aHT.mnY = aHT.maLine.p1.y;
+ // tesselate the polypolygon into trapezoids
+ basegfx::B2DTrapezoidVector aB2DTrapVector;
+ basegfx::tools::trapezoidSubdivide( aB2DTrapVector, aPolyPoly );
+ const int nTrapCount = aB2DTrapVector.size();
+ const bool bDrawn = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
+ return bDrawn;
+}
-#if 0 // ignore clipped HalfTrapezoids
- if( aHT.mnY < 0 )
- aHT.mnY = 0;
- else if( aHT.mnY > 10000 )
- continue;
-#endif
+// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- // queue up the HalfTrapezoid
- aHTVector.push_back( aHT );
- }
- }
- }
+bool X11SalGraphics::drawFilledTrapezoids( const ::basegfx::B2DTrapezoid* pB2DTraps, int nTrapCount, double fTransparency )
+{
+ if( nTrapCount <= 0 )
+ return true;
- if( aHTVector.empty() )
- return TRUE;
+ Picture aDstPic = GetXRenderPicture();
+ // check xrender support for this drawable
+ if( !aDstPic )
+ return false;
-#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND
- // find intersecting halftraps and split them up
- // TODO: remove when solveCrossOvers gets fast enough so its use can be enabled above
- // FAQ: why should segment intersection be handled before adaptiveSubdivide()?
- // Answer: because it is conceptually much faster
- // Example: consider two intersecting circles with a diameter of 1000 pixels
- // before subdivision: eight bezier segments
- // after subdivision: more than a thousand line segments
- // since even the best generic intersection finders have a complexity of O((n+k)*log(n+k))
- // it shows that testing while the segment count is still low is a much better approach.
- splitIntersectingSegments( aHTVector);
-#endif // DISABLE_SOLVECROSSOVER_WORKAROUND
-
- // build queue from vector of intersection-free segments
- // TODO: is replacing the priority-queue by a sorted vector worth it?
- std::make_heap( aHTVector.begin(), aHTVector.end(), HalfTrapCompare());
- HTQueue aHTQueue;
- aHTQueue.swapvec( aHTVector);
-
- // then convert the HalfTrapezoids into full Trapezoids
- TrapezoidVector aTrapVector;
- aTrapVector.reserve( aHTQueue.size() * 2 ); // just a guess
-
- TrapezoidXCompare aTrapXCompare( aTrapVector );
- ActiveTrapSet aActiveTraps( aTrapXCompare );
-
- TrapezoidYCompare aTrapYCompare( aTrapVector );
- VerticalTrapSet aVerticalTraps( aTrapYCompare );
-
- while( !aHTQueue.empty() )
+ // convert the B2DTrapezoids into XRender-Trapezoids
+ typedef std::vector<XTrapezoid> TrapezoidVector;
+ TrapezoidVector aTrapVector( nTrapCount );
+ const basegfx::B2DTrapezoid* pB2DTrap = pB2DTraps;
+ for( int i = 0; i < nTrapCount; ++pB2DTrap, ++i )
{
- XTrapezoid aTrapezoid;
-
- // convert a HalfTrapezoid pair
- // get the left side of the trapezoid
- const HalfTrapezoid& rLeft = aHTQueue.top();
- aTrapezoid.top = rLeft.mnY;
- aTrapezoid.left = rLeft.maLine;
- aHTQueue.pop();
-
- // ignore left segment that would result in an empty trapezoid
- if( aTrapezoid.left.p2.y <= aTrapezoid.top )
- continue;
-
- // get the right side of the trapezoid
- aTrapezoid.right.p2.y = aTrapezoid.bottom;
- while( !aHTQueue.empty() ) {
- const HalfTrapezoid& rRight = aHTQueue.top();
- aTrapezoid.right = rRight.maLine;
- aHTQueue.pop();
- // ignore right segment that would result in an empty trapezoid
- if( aTrapezoid.right.p2.y > aTrapezoid.top )
- break;
- }
-
- // the topmost endpoint determines the trapezoid bottom
- aTrapezoid.bottom = aTrapezoid.left.p2.y;
- if( aTrapezoid.bottom > aTrapezoid.right.p2.y )
- aTrapezoid.bottom = aTrapezoid.right.p2.y;
-
- // keep the full Trapezoid candidate
- aTrapVector.push_back( aTrapezoid );
-
- // unless it splits another trapezoid that is still active
- bool bSplit = false;
- ActiveTrapSet::iterator aActiveTrapsIt = aActiveTraps.begin();
- while(aActiveTrapsIt != aActiveTraps.end())
- {
- XTrapezoid& rLeftTrap = aTrapVector[ *aActiveTrapsIt ];
-
- // skip until first overlap candidate
- // TODO: use stl::*er_bound() instead
- if( IsLeftOf( aTrapezoid.left, rLeftTrap.left) )
- {
- ++aActiveTrapsIt;
- continue;
- }
-
- // in the ActiveTrapSet there are still trapezoids where
- // a vertical overlap with new trapezoids is no longer possible
- // they could have been removed in the verticaltraps loop below
- // but this would be expensive and is not needed as we can
- // simply ignore them until we stumble upon them here.
- if( rLeftTrap.bottom <= aTrapezoid.top )
- {
- ActiveTrapSet::iterator it = aActiveTrapsIt;
- if( aActiveTrapsIt != aActiveTraps.begin() )
- {
- --aActiveTrapsIt;
- aActiveTraps.erase( it );
- ++aActiveTrapsIt;
- }
- else
- {
- aActiveTraps.erase( it );
- aActiveTrapsIt = aActiveTraps.begin();
- }
- continue;
- }
-
- // check if there is horizontal overlap
- // aTrapezoid.left==rLeftTrap.right is allowed though
- if( !IsLeftOf( aTrapezoid.left, rLeftTrap.right ) )
- {
- ++aActiveTrapsIt;
- continue;
- }
-
- // prepare to split the old trapezoid and keep its upper part
- // find the old trapezoids entry in the VerticalTrapSet and remove it
- typedef std::pair<VerticalTrapSet::iterator, VerticalTrapSet::iterator> VTSPair;
- VTSPair aVTSPair = aVerticalTraps.equal_range( *aActiveTrapsIt );
- VerticalTrapSet::iterator aVTSit = aVTSPair.first;
- for(; aVTSit != aVTSPair.second; ++aVTSit )
- {
- if( *aVTSit != *aActiveTrapsIt )
- continue;
- aVerticalTraps.erase( aVTSit );
- break;
- }
- // then update the old trapezoid's bottom
- rLeftTrap.bottom = aTrapezoid.top;
- // enter the updated old trapzoid in VerticalTrapSet
- aVerticalTraps.insert( aVerticalTraps.begin(), *aActiveTrapsIt );
- // the old trapezoid is no longer active
- aActiveTraps.erase( aActiveTrapsIt );
-
- // the trapezoid causing the split has become obsolete
- // so its both sides have to be re-queued
- HalfTrapezoid aHT;
- aHT.mnY = aTrapezoid.top;
- aHT.maLine = aTrapezoid.left;
- aHTQueue.push( aHT );
- aHT.maLine = aTrapezoid.right;
- aHTQueue.push( aHT );
-
- bSplit = true;
- break;
- }
-
- // keep or forget the resulting full Trapezoid
- if( bSplit )
- aTrapVector.pop_back();
- else
- {
- aActiveTraps.insert( aTrapVector.size()-1 );
- aVerticalTraps.insert( aTrapVector.size()-1 );
- }
-
- // mark trapezoids that can no longer be split as inactive
- // and recycle their sides which were not fully resolved
- static const XFixed nMaxTop = +0x7FFFFFFF;
- const XFixed nNewTop = aHTQueue.empty() ? nMaxTop : aHTQueue.top().mnY;
- while( !aVerticalTraps.empty() )
- {
- // check the next trapezoid to be retired
- const XTrapezoid& rOldTrap = aTrapVector[ *aVerticalTraps.begin() ];
- if( nNewTop < rOldTrap.bottom )
- break;
- // this trapezoid can no longer be split
- aVerticalTraps.erase( aVerticalTraps.begin() );
-
- // recycle its sides that were not fully resolved
- HalfTrapezoid aHT;
- aHT.mnY = rOldTrap.bottom;
-
- if( rOldTrap.left.p2.y > aHT.mnY )
- {
- aHT.maLine = rOldTrap.left;
- aHTQueue.push( aHT );
- }
- if( rOldTrap.right.p2.y > aHT.mnY )
- {
- aHT.maLine = rOldTrap.right;
- aHTQueue.push( aHT );
- }
- }
+ XTrapezoid& rTrap = aTrapVector[ i ] ;
+
+ // set y-coordinates
+ const double fY1 = pB2DTrap->getTopY();
+ rTrap.left.p1.y = rTrap.right.p1.y = rTrap.top = XDoubleToFixed( fY1 );
+ const double fY2 = pB2DTrap->getBottomY();
+ rTrap.left.p2.y = rTrap.right.p2.y = rTrap.bottom = XDoubleToFixed( fY2 );
+
+ // set x-coordinates
+ const double fXL1 = pB2DTrap->getTopXLeft();
+ rTrap.left.p1.x = XDoubleToFixed( fXL1 );
+ const double fXR1 = pB2DTrap->getTopXRight();
+ rTrap.right.p1.x = XDoubleToFixed( fXR1 );
+ const double fXL2 = pB2DTrap->getBottomXLeft();
+ rTrap.left.p2.x = XDoubleToFixed( fXL2 );
+ const double fXR2 = pB2DTrap->getBottomXRight();
+ rTrap.right.p2.x = XDoubleToFixed( fXR2 );
}
- // create xrender Picture for polygon foreground
+ // get xrender Picture for polygon foreground
+ // TODO: cache it like the target picture which uses GetXRenderPicture()
+ XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
SalDisplay::RenderEntry& rEntry = GetDisplay()->GetRenderEntries( m_nScreen )[ 32 ];
if( !rEntry.m_aPicture )
{
@@ -1569,15 +1198,17 @@ bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPoly
rRenderPeer.CompositeTrapezoids( PictOpOver,
rEntry.m_aPicture, aDstPic, pMaskFormat, 0, 0, &aTrapVector[0], aTrapVector.size() );
- return TRUE;
+ return true;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin eLineJoin)
{
+ const bool bIsHairline = (rLineWidth.getX() == rLineWidth.getY()) && (rLineWidth.getX() <= 1.2);
+
// #i101491#
- if(rPolygon.count() > 1000)
+ if( !bIsHairline && (rPolygon.count() > 1000) )
{
// the used basegfx::tools::createAreaGeometry is simply too
// expensive with very big polygons; fallback to caller (who
@@ -1587,33 +1218,44 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const :
// the same way.
return false;
}
- const XRenderPeer& rRenderPeer = XRenderPeer::GetInstance();
- if( !rRenderPeer.AreTrapezoidsSupported() )
- return false;
- // get the area polygon for the line polygon
+ // temporarily adjust brush color to pen color
+ // since the line is drawn as an area-polygon
+ const SalColor aKeepBrushColor = nBrushColor_;
+ nBrushColor_ = nPenColor_;
+
+ // #i11575#desc5#b adjust B2D tesselation result to raster positions
basegfx::B2DPolygon aPolygon = rPolygon;
- if( (rLineWidth.getX() != rLineWidth.getY())
- && !basegfx::fTools::equalZero( rLineWidth.getY() ) )
+ const double fHalfWidth = 0.5 * rLineWidth.getX();
+ aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) );
+
+ // shortcut for hairline drawing to improve performance
+ if( bIsHairline )
{
- // prepare for createAreaGeometry() with anisotropic linewidth
- aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY()));
+ // hairlines can benefit from a simplified tesselation
+ // e.g. for hairlines the linejoin style can be ignored
+ basegfx::B2DTrapezoidVector aB2DTrapVector;
+ basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() );
+
+ // draw tesselation result
+ const int nTrapCount = aB2DTrapVector.size();
+ const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, 0.0 );
+
+ // restore the original brush GC
+ nBrushColor_ = aKeepBrushColor;
+ return bDrawOk;
}
- // special handling for hairlines to improve the drawing performance
- // TODO: revisit after basegfx performance related changes
- const bool bIsHairline = (rLineWidth.getX() < 1.2) && (rLineWidth.getY() < 1.2);
- if( bIsHairline )
+ // get the area polygon for the line polygon
+ if( (rLineWidth.getX() != rLineWidth.getY())
+ && !basegfx::fTools::equalZero( rLineWidth.getY() ) )
{
- // for hairlines the linejoin style becomes irrelevant
- eLineJoin = basegfx::B2DLINEJOIN_NONE;
- // createAreaGeometry is still too expensive when beziers are involved
- if( aPolygon.areControlPointsUsed() )
- aPolygon = ::basegfx::tools::adaptiveSubdivideByDistance( aPolygon, 0.125 );
+ // prepare for createAreaGeometry() with anisotropic linewidth
+ aPolygon.transform( basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getX() / rLineWidth.getY()));
}
// create the area-polygon for the line
- const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, 0.5*rLineWidth.getX(), eLineJoin) );
+ const basegfx::B2DPolyPolygon aAreaPolyPoly( basegfx::tools::createAreaGeometry(aPolygon, fHalfWidth, eLineJoin) );
if( (rLineWidth.getX() != rLineWidth.getY())
&& !basegfx::fTools::equalZero( rLineWidth.getX() ) )
@@ -1622,11 +1264,6 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const :
aPolygon.transform(basegfx::tools::createScaleB2DHomMatrix(1.0, rLineWidth.getY() / rLineWidth.getX()));
}
- // temporarily adjust brush color to pen color
- // since the line is drawn as an area-polygon
- const SalColor aKeepBrushColor = nBrushColor_;
- nBrushColor_ = nPenColor_;
-
// draw each area polypolygon component individually
// to emulate the polypolygon winding rule "non-zero"
bool bDrawOk = true;
@@ -1634,7 +1271,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const :
for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx )
{
const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) );
- bDrawOk = drawPolyPolygon( aOnePoly, 0.0);
+ bDrawOk = drawPolyPolygon( aOnePoly, 0.0 );
if( !bDrawOk )
break;
}
@@ -1646,259 +1283,3 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, const :
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#ifndef DISABLE_SOLVECROSSOVER_WORKAROUND
-// TODO: move the intersection solver into basegfx
-// and then support bezier-intersection finding too
-
-namespace { // anonymous namespace to prevent export
-
-typedef HalfTrapezoid LineSeg;
-typedef HTVector LSVector;
-
-inline bool operator==( const LineSeg& r1, const LineSeg& r2)
-{
- if( r1.maLine.p2.y != r2.maLine.p2.y) return false;
- if( r1.maLine.p2.x != r2.maLine.p2.x) return false;
- if( r1.maLine.p1.y != r2.maLine.p1.y) return false;
- if( r1.maLine.p1.x != r2.maLine.p1.x) return false;
- return true;
-}
-
-struct LSYMinCmp
-{
- bool operator()( const LineSeg& r1, const LineSeg& r2) const
- { return r2.maLine.p1.y < r1.maLine.p1.y; }
-};
-
-struct LSYMaxCmp
-{
- bool operator()( const LineSeg& r1, const LineSeg& r2) const
- { return r2.maLine.p2.y < r1.maLine.p2.y; }
-};
-
-struct LSXMinCmp
-{
- bool operator()( const LineSeg& r1, const LineSeg& r2) const
- { return( r1.getXMin() < r2.getXMin()); }
-};
-
-struct CutPoint
-{
- XFixed mnSegmentId;
- float mfCutParam;
- XPointFixed maPoint;
-};
-
-struct CutPointCmp
-{
- bool operator()( const CutPoint& r1, const CutPoint& r2) const
- {
- if( r1.mnSegmentId != r2.mnSegmentId)
- return (r1.mnSegmentId < r2.mnSegmentId);
- return (r1.mfCutParam < r2.mfCutParam);
- }
-};
-
-bool findIntersection( const LineSeg& rLS1, const LineSeg& rLS2, CutPoint aCutPoints[2])
-{
- // segments intersect at r1.p1 + s*(r1.p2-r1.p1) == r2.p1 + t*(r2.p2-r2.p1)
- // when both segment-parameters are ((0 <s<1) && (0<t<1))
- // (r1.p1 - r2.p1) == s * (r1.p1 - r1.p2) + t * (r2.p2 - r2.p1)
- // =>
- // (r1.p1x - r2.p1x) == s * (r1.p1x - r1.p2x) + t * (r2.p2x - r2.p1x)
- // (r1.p1y - r2.p1y) == s * (r1.p1y - r1.p2y) + t * (r2.p2y - r2.p1y)
- // check if lines are identical or parallel => not intersecting
- const XLineFixed& r1 = rLS1.maLine;
- const XLineFixed& r2 = rLS2.maLine;
- const double fDet = (double)(r1.p1.x - r1.p2.x) * (r2.p2.y - r2.p1.y)
- - (double)(r2.p2.x - r2.p1.x) * (r1.p1.y - r1.p2.y);
- static const double fEps = 1e-8;
- if( fabs(fDet) < fEps)
- return false;
- // check if intersecting with first segment
- const double fS1 = (double)(r2.p2.y - r2.p1.y) * (r1.p1.x - r2.p1.x);
- const double fS2 = (double)(r2.p2.x - r2.p1.x) * (r2.p1.y - r1.p1.y);
- const double fS = (fS1 + fS2) / fDet;
- if( (fS <= +fEps) || (fS >= 1-fEps))
- return false;
- // check if intersecting with second segment
- const double fT1 = (double)(r1.p2.y - r1.p1.y) * (r1.p1.x - r2.p1.x);
- const double fT2 = (double)(r1.p2.x - r1.p1.x) * (r2.p1.y - r1.p1.y);
- const double fT = (fT1 + fT2) / fDet;
- if( (fT <= +fEps) || (fT >= 1-fEps))
- return false;
- // force the intersection point to be exactly identical on both segments
- aCutPoints[0].maPoint.x = (XFixed)(r1.p1.x + fS * (r1.p2.x - r1.p1.x));
- aCutPoints[0].maPoint.y = (XFixed)(r1.p1.y + fS * (r1.p2.y - r1.p1.y));
- aCutPoints[1].maPoint.x = aCutPoints[0].maPoint.x;
- aCutPoints[1].maPoint.y = aCutPoints[0].maPoint.y;
- aCutPoints[0].mnSegmentId = rLS1.mnY;
- aCutPoints[0].mfCutParam = (float)fS;
- aCutPoints[1].mnSegmentId = rLS2.mnY;
- aCutPoints[1].mfCutParam = (float)fT;
- return true;
-}
-
-typedef std::priority_queue< LineSeg, LSVector, LSYMinCmp> LSYMinQueueBase;
-typedef std::priority_queue< LineSeg, LSVector, LSYMaxCmp> LSYMaxQueueBase;
-typedef std::multiset< LineSeg, LSXMinCmp> LSXMinSet;
-typedef std::set< CutPoint, CutPointCmp> CutPointSet;
-
-class LSYMinQueue : public LSYMinQueueBase
-{
-public:
- void reserve( size_t n) { c.reserve(n);}
- void swapvec( LSVector& v) { c.swap(v);}
-};
-
-class LSYMaxQueue : public LSYMaxQueueBase
-{
-public:
- void reserve( size_t n) { c.reserve(n);}
-};
-
-void addAndCutSegment( LSVector& rLSVector, const LineSeg& rLS, CutPointSet& rCutPointSet)
-{
- // short circuit when no segment was cut
- if( rCutPointSet.empty()) {
- rLSVector.push_back( rLS);
- return;
- }
-
- // find the first cut point for this segment
- LineSeg aCS = rLS;
- CutPoint aMinCutPoint;
- aMinCutPoint.mnSegmentId = rLS.mnY;
- aMinCutPoint.mfCutParam = 0.0;
- CutPointSet::iterator itFirst = rCutPointSet.lower_bound( aMinCutPoint);
- CutPointSet::iterator it = itFirst;
- // iterate through all cut points of this segment
- for(; it != rCutPointSet.end(); ++it) {
- const CutPoint rCutPoint = (*it);
- if( rCutPoint.mnSegmentId != rLS.mnY)
- break;
- // cut segment at the cutpoint
- aCS.maLine.p2 = rCutPoint.maPoint;
- rLSVector.push_back( aCS);
- // prepare for next segment cut
- aCS.maLine.p1 = aCS.maLine.p2;
- }
- // remove cutparams that will no longer be needed
- // TODO: is it worth it or should we just keep the cutparams?
- rCutPointSet.erase( itFirst, it);
-
- // add segment part remaining after last cut
- aCS.maLine.p2 = rLS.maLine.p2;
- rLSVector.push_back( aCS);
-}
-
-void splitIntersectingSegments( LSVector& rLSVector)
-{
- // get a unique id for each lineseg, temporarily abuse the mnY member
- LSVector::iterator aLSit = rLSVector.begin();
- for( int i = 0; aLSit != rLSVector.end(); ++aLSit) {
- LineSeg& rLS = *aLSit;
- rLS.mnY = i++;
- }
- // get an y-sorted queue from the input vector
- LSYMinQueue aYMinQueue;
- std::make_heap( rLSVector.begin(), rLSVector.end(), LSYMinCmp());
- aYMinQueue.swapvec( rLSVector);
-
- // prepare the result vector
- // try to avoid reallocations by guessing a reasonable result size
- rLSVector.reserve( aYMinQueue.size() * 3/2 );
-
- // find all intersections
- CutPointSet aCutPointSet;
- LSXMinSet aXMinSet;
- LSYMaxQueue aYMaxQueue;
- aYMaxQueue.reserve( aYMinQueue.size());
- // sweep-down and check all segment-pairs that overlap
- while( !aYMinQueue.empty()) {
- // get next input-segment
- const LineSeg& rLS = aYMinQueue.top();
- // retire obsoleted segments
- const XFixed fYCur = rLS.maLine.p1.y;
- while( !aYMaxQueue.empty()) {
- // check next segment to be retired
- const LineSeg& rOS = aYMaxQueue.top();
- if( fYCur < rOS.maLine.p2.y)
- break;
- // emit resolved segment into result
- addAndCutSegment( rLSVector, rOS, aCutPointSet);
- // find segment to be retired in xmin-compare-set
- LSXMinSet::iterator itR = aXMinSet.lower_bound( rOS);
- while( !(*itR == rOS)) ++itR;
- // retire segment from xmin-compare-set
- aXMinSet.erase( itR);
- // this segment is pining for the fjords
- aYMaxQueue.pop();
- }
-
- // iterate over all segments that might overlap
- // skip over the leftmost segments that cannot overlap
- const XFixed fXMax = rLS.getXMax();
- LSXMinSet::const_iterator itC = aXMinSet.begin();
- for(; itC != aXMinSet.end(); ++itC)
- if( (*itC).getXMin() <= fXMax)
- break;
- // TODO: if the linear search becomes too expensive
- // then use an XMaxQueue based approach to replace it
- const XFixed fXMin = rLS.getXMin();
- for(; itC != aXMinSet.end(); ++itC) {
- const LineSeg& rOS = *itC;
- if( fXMin >= rOS.getXMax())
- continue;
- if( fXMax < rOS.getXMin())
- break;
- CutPoint aCutPoints[2];
- if( !findIntersection( rLS, rOS, aCutPoints))
- continue;
- // remember cut parameters
- // TODO: std::set seems to use individual allocations
- // which results in perf-problems for many entries
- // => pre-allocate nodes by using a non-default allocator
- aCutPointSet.insert( aCutPoints[0]);
- aCutPointSet.insert( aCutPoints[1]);
- }
- // add segment to xmin-compare-set
- // TODO: do we have a good insertion hint?
- aXMinSet.insert( /*itC,*/ rLS);
- // register segment for retirement
- aYMaxQueue.push( rLS);
- aYMinQueue.pop();
- }
-
- // retire the remaining segments
- aXMinSet.clear();
- while( !aYMaxQueue.empty()) {
- // emit segments and cut them up if needed
- const LineSeg& rLS = aYMaxQueue.top();
- addAndCutSegment( rLSVector, rLS, aCutPointSet);
- aYMaxQueue.pop();
- }
-
- // get the segments ready to be consumed by the drawPolygon() caller
- aLSit = rLSVector.begin();
- LSVector::iterator aLSit2 = aLSit;
- for(; aLSit != rLSVector.end(); ++aLSit) {
- LineSeg& rLS = *aLSit;
- // restore the segment top member
- rLS.mnY = rLS.maLine.p1.y;
- // remove horizontal segments for now
- // TODO: until the trapezoid converter is adjusted to handle them
- if( rLS.maLine.p1.y == rLS.maLine.p2.y )
- continue;
- *(aLSit2++) = rLS;
- }
- if(aLSit2 != aLSit)
- rLSVector.resize( aLSit2 - rLSVector.begin() );
-}
-
-} // end anonymous namespace
-
-#endif // DISABLE_SOLVECROSSOVER_WORKAROUND
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index f00ee26c0d4d..6024b66f6010 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -2041,7 +2041,7 @@ static ImplFontSelectData GetFcSubstitute(const ImplFontSelectData &rFontSelData
{
ImplFontSelectData aRet(rFontSelData);
- const rtl::OString aLangAttrib; //TODO: = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage );
+ const rtl::OString aLangAttrib = MsLangId::convertLanguageToIsoByteString( rFontSelData.meLanguage );
psp::italic::type eItalic = psp::italic::Unknown;
if( rFontSelData.GetSlant() != ITALIC_DONTKNOW )
diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk
index d501765c8491..eb54531c375c 100644
--- a/vcl/util/makefile.mk
+++ b/vcl/util/makefile.mk
@@ -299,6 +299,7 @@ SHL2DEPN=$(SHL1IMPLIBN) $(SHL1TARGETN)
SHL2STDLIBS=\
$(VCLLIB)\
$(I18NPAPERLIB) \
+ $(I18NISOLANGLIB) \
$(TOOLSLIB) \
$(VOSLIB) \
$(BASEGFXLIB) \
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 1638c4e1bd36..d1b5a9cfdeae 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1579,15 +1579,24 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont
&& (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) )
lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
- // limit font requests to MAXFONTHEIGHT
+ // #i47675# limit font requests to MAXFONTHEIGHT
// TODO: share MAXFONTHEIGHT font instance
- if( -aLogFont.lfHeight <= MAXFONTHEIGHT )
+ if( (-aLogFont.lfHeight <= MAXFONTHEIGHT)
+ && (+aLogFont.lfWidth <= MAXFONTHEIGHT) )
+ {
o_rFontScale = 1.0;
- else
+ }
+ else if( -aLogFont.lfHeight >= +aLogFont.lfWidth )
{
o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
aLogFont.lfHeight = -MAXFONTHEIGHT;
- aLogFont.lfWidth = static_cast<LONG>( aLogFont.lfWidth / o_rFontScale );
+ aLogFont.lfWidth = FRound( aLogFont.lfWidth / o_rFontScale );
+ }
+ else // #i95867# also limit font widths
+ {
+ o_rFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT;
+ aLogFont.lfWidth = +MAXFONTHEIGHT;
+ aLogFont.lfHeight = FRound( aLogFont.lfHeight / o_rFontScale );
}
hNewFont = ::CreateFontIndirectW( &aLogFont );
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index a6567464ac5e..7314fd2b6164 100755..100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2891,8 +2891,8 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
BOOL bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0;
// TODO: once those options vanish: just set bCompBorder to TRUE
// to have the system colors read
- aStyleSettings.SetScrollBarSize( Min( GetSystemMetrics( SM_CXVSCROLL ), 20 ) ); // #99956# do not allow huge scrollbars, most of the UI is not scaled anymore
- aStyleSettings.SetSpinSize( Min( GetSystemMetrics( SM_CXVSCROLL ), 20 ) );
+ aStyleSettings.SetScrollBarSize( GetSystemMetrics( SM_CXVSCROLL ) );
+ aStyleSettings.SetSpinSize( GetSystemMetrics( SM_CXVSCROLL ) );
aStyleSettings.SetCursorBlinkTime( GetCaretBlinkTime() );
if ( bCompBorder )
{
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index bc3bd81761a5..cfcd2ac7e67e 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -43327,6 +43327,408 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmTFAutofit-->
+ <!--SPRM sprmTPc-->
+ <UML:Class xmi.id="sprmTPc" name="sprmTPc">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8resource"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x360D</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTPc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:Classifier.feature>
+ <UML:Attribute name="padding">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xf0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>4</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:padding</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U8"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="pcVert">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0xc</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:pcVert</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U8"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ <UML:Classifier.feature>
+ <UML:Attribute name="pcHorz">
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue/>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="comment"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="offset"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="shift"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x3</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="mask"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>2</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="bits"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:pcHorz</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="attrid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:StructuralFeature.type>
+ <UML:DataType xmi.idref="U8"/>
+ </UML:StructuralFeature.type>
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="attribute"/>
+ </UML:ModelElement.stereotype>
+ </UML:Attribute>
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Generalization isSpecification="false" xmi.id="sprmTPc-Properties">
+ <UML:Generalization.child>
+ <UML:Class xmi.idref="sprmTPc"/>
+ </UML:Generalization.child>
+ <UML:Generalization.parent>
+ <UML:Class xmi.idref="Properties"/>
+ </UML:Generalization.parent>
+ </UML:Generalization>
+ <!--SPRM sprmTPc-->
+ <!--SPRM sprmTDyaAbs-->
+ <UML:Class xmi.id="sprmTDyaAbs" name="sprmTDyaAbs">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x940F</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTDyaAbs</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ </UML:Class>
+ <!--SPRM sprmTDyaAbs-->
+ <!--SPRM sprmTDxaFromText-->
+ <UML:Class xmi.id="sprmTDxaFromText" name="sprmTDxaFromText">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x9410</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTDxaFromText</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ </UML:Class>
+ <!--SPRM sprmTDxaFromText-->
+ <!--SPRM sprmTDyaFromText-->
+ <UML:Class xmi.id="sprmTDyaFromText" name="sprmTDyaFromText">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x9411</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTDyaFromText</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ </UML:Class>
+ <!--SPRM sprmTDyaFromText-->
+ <!--SPRM sprmTDxaFromTextRight-->
+ <UML:Class xmi.id="sprmTDxaFromTextRight" name="sprmTDxaFromTextRight">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x941E</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTDxaFromTextRight</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ </UML:Class>
+ <!--SPRM sprmTDxaFromTextRight-->
+ <!--SPRM sprmTDyaFromTextBottom-->
+ <UML:Class xmi.id="sprmTDyaFromTextBottom" name="sprmTDyaFromTextBottom">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x941F</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTDyaFromTextBottom</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ </UML:Class>
+ <!--SPRM sprmTDyaFromTextBottom-->
+ <!--SPRM sprmTFNoAllowOverlap-->
+ <UML:Class xmi.id="sprmTFNoAllowOverlap" name="sprmTFNoAllowOverlap">
+ <UML:ModelElement.stereotype>
+ <UML:Stereotype xmi.idref="ww8sprm"/>
+ </UML:ModelElement.stereotype>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>0x3465</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmcode"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>rtf:sprmTFNoAllowOverlap</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="sprmid"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ <UML:ModelElement.taggedValue>
+ <UML:TaggedValue>
+ <UML:TaggedValue.dataValue>table</UML:TaggedValue.dataValue>
+ <UML:TaggedValue.type>
+ <UML:TagDefinition xmi.idref="kind"/>
+ </UML:TaggedValue.type>
+ </UML:TaggedValue>
+ </UML:ModelElement.taggedValue>
+ </UML:Class>
+ <!--SPRM sprmTFNoAllowOverlap-->
<!--SPRMS-->
<!--DFFS-->
<!--DFF UDefProp-->
diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
index e7891b36ef17..7b7b7e131ec7 100644
--- a/xmloff/inc/xmlnmspe.hxx
+++ b/xmloff/inc/xmlnmspe.hxx
@@ -88,8 +88,9 @@ const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key;
XML_NAMESPACE_EXT( OFFICE, 37U )
XML_NAMESPACE_EXT( TABLE, 38U )
XML_NAMESPACE_EXT( CHART, 39U )
+XML_NAMESPACE_EXT( DRAW, 40U )
-#define _XML_OLD_NAMESPACE_BASE 40U
+#define _XML_OLD_NAMESPACE_BASE 41U
// namespaces used in the technical preview (SO 5.2)
XML_OLD_NAMESPACE( FO, 0U )
diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx
index b12f93f0b8b2..e583a208fd83 100644
--- a/xmloff/inc/xmloff/shapeexport.hxx
+++ b/xmloff/inc/xmloff/shapeexport.hxx
@@ -191,6 +191,9 @@ private:
SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; }
const rtl::OUString msZIndex;
+ const rtl::OUString msPrintable;
+ const rtl::OUString msVisible;
+
const rtl::OUString msEmptyPres;
const rtl::OUString msModel;
const rtl::OUString msStartShape;
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index 06b057a3e91d..19eb9a3854df 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -148,6 +148,9 @@ namespace xmloff { namespace token {
XML_NP_TABLE_EXT,
XML_N_TABLE_EXT,
+ XML_NP_DRAW_EXT,
+ XML_N_DRAW_EXT,
+
// units
XML_UNIT_MM,
XML_UNIT_M,
@@ -2548,6 +2551,9 @@ namespace xmloff { namespace token {
XML_DIMENSION,
XML_VALIDATION_NAME,
+ XML_SCREEN,
+ XML_PRINTER,
+
// XForms tokens
// already defined: XML_ACTION, XML_VERSION, XML_ENCODING,
// XML_REPLACE, XML_SEPARATOR, XML_TYPE, XML_ID
diff --git a/xmloff/qa/unoapi/knownissues.xcl b/xmloff/qa/unoapi/knownissues.xcl
index 401d33d9a889..ac15aad11e71 100644
--- a/xmloff/qa/unoapi/knownissues.xcl
+++ b/xmloff/qa/unoapi/knownissues.xcl
@@ -10,17 +10,6 @@ xmloff.Impress.XMLImporter::com::sun::star::xml::sax::XDocumentHandler
xmloff.Impress.XMLMetaImporter::com::sun::star::xml::sax::XDocumentHandler
xmloff.Impress.XMLStylesImporter::com::sun::star::xml::sax::XDocumentHandler
-### i86555 ###
-xmloff.Chart.XMLExporter::com::sun::star::document::XFilter
-xmloff.Chart.XMLContentExporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLSettingsExporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLMetaExporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLImporter::com::sun::star::document::XFilter
-xmloff.Impress.XMLExporter::com::sun::star::document::XFilter
-xmloff.Draw.XMLContentExporter::com::sun::star::document::XFilter
-xmloff.Draw.XMLMetaExporter::com::sun::star::document::XFilter
-xmloff.Draw.XMLSettingsImporter::com::sun::star::document::XFilter
-
### i87695 ###
xmloff.Draw.XMLStylesExporter
xmloff.Impress.XMLStylesExporter
diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce
index c73533f4e4e8..69166aec6204 100644
--- a/xmloff/qa/unoapi/xmloff.sce
+++ b/xmloff/qa/unoapi/xmloff.sce
@@ -3,7 +3,7 @@
#111102# -o xmloff.Chart.XMLExporter
#111102# -o xmloff.Chart.XMLImporter
#111102# -o xmloff.Chart.XMLStylesExporter
-#111102# -o xmloff.Chart.XMLStylesImporter
+#111102# #i112047 -o xmloff.Chart.XMLStylesImporter
-o xmloff.Draw.XMLContentExporter
-o xmloff.Draw.XMLContentImporter
-o xmloff.Draw.XMLExporter
@@ -16,7 +16,7 @@
-o xmloff.Draw.XMLStylesImporter
#i111224 -o xmloff.Impress.XMLContentExporter
-o xmloff.Impress.XMLContentImporter
--o xmloff.Impress.XMLExporter
+#i112048 -o xmloff.Impress.XMLExporter
#i111111# -o xmloff.Impress.XMLImporter
-o xmloff.Impress.XMLMetaExporter
-o xmloff.Impress.XMLMetaImporter
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index c10ac0a23c03..b1ba8520c1db 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -387,7 +387,7 @@ void SvXMLExport::_InitCtor()
mpNamespaceMap->Add( GetXMLToken(XML_NP_OOOC), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
mpNamespaceMap->Add( GetXMLToken(XML_NP_OF), GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
- if (getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST)
+ if (getDefaultVersion() > SvtSaveOptions::ODFVER_012)
{
mpNamespaceMap->Add(
GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT);
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 597a1d50b0f9..c791fe4077d4 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -99,6 +99,7 @@ sal_Char __READONLY_DATA sXML_np__text[] = "_text";
sal_Char __READONLY_DATA sXML_np__table[] = "_table";
sal_Char __READONLY_DATA sXML_np__table_ext[] = "_table_ooo";
sal_Char __READONLY_DATA sXML_np__draw[] = "_draw";
+sal_Char __READONLY_DATA sXML_np__draw_ext[] = "_draw_ooo";
sal_Char __READONLY_DATA sXML_np__dr3d[] = "_dr3d";
sal_Char __READONLY_DATA sXML_np__fo[] = "_fo";
sal_Char __READONLY_DATA sXML_np__xlink[] = "_xlink";
@@ -263,6 +264,9 @@ void SvXMLImport::_InitCtor()
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw ) ),
GetXMLToken(XML_N_DRAW),
XML_NAMESPACE_DRAW );
+ mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__draw_ext ) ),
+ GetXMLToken(XML_N_DRAW_EXT),
+ XML_NAMESPACE_DRAW_EXT );
mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM (sXML_np__dr3d ) ),
GetXMLToken(XML_N_DR3D),
XML_NAMESPACE_DR3D );
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 2af9966bc351..83735b77d02c 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -156,6 +156,9 @@ namespace xmloff { namespace token {
TOKEN( "tableooo", XML_NP_TABLE_EXT ),
TOKEN( "http://openoffice.org/2009/table", XML_N_TABLE_EXT ),
+ TOKEN( "drawooo", XML_NP_DRAW_EXT ),
+ TOKEN( "http://openoffice.org/2010/draw", XML_N_DRAW_EXT ),
+
// units
TOKEN( "mm", XML_UNIT_MM ),
TOKEN( "m", XML_UNIT_M ),
@@ -2552,6 +2555,9 @@ namespace xmloff { namespace token {
TOKEN( "dimension", XML_DIMENSION ),
TOKEN( "validation-name", XML_VALIDATION_NAME ),
+ TOKEN( "screen", XML_SCREEN ),
+ TOKEN( "printer", XML_PRINTER ),
+
// XForms token
TOKEN( "model", XML_MODEL ),
TOKEN( "schema", XML_SCHEMA ),
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 249ce18331d9..862326495a70 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -641,12 +641,17 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
GetXMLToken(XML_N_ANIMATION),
XML_NAMESPACE_ANIMATION);
- if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST )
+ if( getDefaultVersion() > SvtSaveOptions::ODFVER_012 )
{
_GetNamespaceMap().Add(
GetXMLToken(XML_NP_OFFICE_EXT),
GetXMLToken(XML_N_OFFICE_EXT),
XML_NAMESPACE_OFFICE_EXT);
+
+ _GetNamespaceMap().Add(
+ GetXMLToken(XML_NP_DRAW_EXT),
+ GetXMLToken(XML_N_DRAW_EXT),
+ XML_NAMESPACE_DRAW_EXT);
}
GetShapeExport()->enableLayerExport();
@@ -2808,7 +2813,7 @@ void SdXMLExport::collectAnnotationAutoStyles( const Reference<XDrawPage>& xDraw
void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
{
// do not export in ODF 1.2 or older
- if( getDefaultVersion() != SvtSaveOptions::ODFVER_LATEST )
+ if( getDefaultVersion() <= SvtSaveOptions::ODFVER_012 )
return;
Reference< XAnnotationAccess > xAnnotationAccess( xDrawPage, UNO_QUERY );
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 20c7879416cf..d3dd99967ae9 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -83,6 +83,8 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
// #88546# init to FALSE
mbHandleProgressBar( sal_False ),
msZIndex( RTL_CONSTASCII_USTRINGPARAM("ZOrder") ),
+ msPrintable( RTL_CONSTASCII_USTRINGPARAM("Printable") ),
+ msVisible( RTL_CONSTASCII_USTRINGPARAM("Visible") ),
msEmptyPres( RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ),
msModel( RTL_CONSTASCII_USTRINGPARAM("Model") ),
msStartShape( RTL_CONSTASCII_USTRINGPARAM("StartShape") ),
@@ -705,6 +707,39 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
}
+ // export draw:display (do not export in ODF 1.2 or older)
+ if( xSet.is() && ( mrExport.getDefaultVersion() > SvtSaveOptions::ODFVER_012 ) )
+ {
+ if( aShapeInfo.meShapeType != XmlShapeTypeDrawPageShape && aShapeInfo.meShapeType != XmlShapeTypePresPageShape &&
+ aShapeInfo.meShapeType != XmlShapeTypeHandoutShape )
+
+ try
+ {
+ sal_Bool bVisible = sal_True;
+ sal_Bool bPrintable = sal_True;
+
+ xSet->getPropertyValue(msVisible) >>= bVisible;
+ xSet->getPropertyValue(msPrintable) >>= bPrintable;
+
+ XMLTokenEnum eDisplayToken = XML_TOKEN_INVALID;
+ const unsigned short nDisplay = (bVisible ? 2 : 0) | (bPrintable ? 1 : 0);
+ switch( nDisplay )
+ {
+ case 0: eDisplayToken = XML_NONE; break;
+ case 1: eDisplayToken = XML_PRINTER; break;
+ case 2: eDisplayToken = XML_SCREEN; break;
+ // case 3: eDisplayToken = XML_ALWAYS break; this is the default
+ }
+
+ if( eDisplayToken != XML_TOKEN_INVALID )
+ mrExport.AddAttribute(XML_NAMESPACE_DRAW_EXT, XML_DISPLAY, eDisplayToken );
+ }
+ catch( uno::Exception& )
+ {
+ DBG_ERROR( "XMLShapeExport::exportShape(), exception caught!" );
+ }
+ }
+
// #82003# test export count
// #91587# ALWAYS increment since now ALL to be exported shapes are counted.
if(mrExport.GetShapeExport()->IsHandleProgressBarEnabled())
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index f1bf683b57e9..b073e1e28d40 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -167,6 +167,8 @@ SdXMLShapeContext::SdXMLShapeContext(
, mnZOrder(-1)
, maSize(1, 1)
, maPosition(0, 0)
+, mbVisible(true)
+, mbPrintable(true)
{
}
@@ -444,6 +446,20 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape)
xMultiPropertyStates->setAllPropertiesToDefault();
}
+ if( !mbVisible || !mbPrintable ) try
+ {
+ uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY_THROW );
+ if( !mbVisible )
+ xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Visible" ) ), uno::Any( sal_False ) );
+
+ if( !mbPrintable )
+ xSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Printable" ) ), uno::Any( sal_False ) );
+ }
+ catch( Exception& )
+ {
+ DBG_ERROR( "SdXMLShapeContext::AddShape(), exception caught!" );
+ }
+
// #107848#
if(!mbTemporaryShape && (!GetImport().HasTextImport()
|| !GetImport().GetTextImport()->IsInsideDeleteContext()))
@@ -777,7 +793,7 @@ void SdXMLShapeContext::SetThumbnail()
void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue )
{
bool bHaveXmlId( false );
- if( XML_NAMESPACE_DRAW == nPrefix )
+ if( (XML_NAMESPACE_DRAW == nPrefix) || (XML_NAMESPACE_DRAW_EXT == nPrefix) )
{
if( IsXMLToken( rLocalName, XML_ZINDEX ) )
{
@@ -807,6 +823,11 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr
{
mnTransform.SetString(rValue, GetImport().GetMM100UnitConverter());
}
+ else if( IsXMLToken( rLocalName, XML_DISPLAY ) )
+ {
+ mbVisible = IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_SCREEN );
+ mbPrintable = IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_PRINTER );
+ }
}
else if( XML_NAMESPACE_PRESENTATION == nPrefix )
{
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 18453a8936af..bf15534fc260 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -83,6 +83,9 @@ protected:
com::sun::star::awt::Size maSize;
com::sun::star::awt::Point maPosition;
+ bool mbVisible;
+ bool mbPrintable;
+
/** if bSupportsStyle is false, auto styles will be set but not a style */
void SetStyle( bool bSupportsStyle = true );
void SetLayer();
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index bc01112d9b03..87710d310d76 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -119,7 +119,7 @@ using namespace ::com::sun::star::lang;
using namespace ::xmloff::token;
using ::com::sun::star::util::DateTime;
using namespace ::com::sun::star::ucb;
-
+using namespace ::com::sun::star;
using ::comphelper::UStringLess;
@@ -1823,8 +1823,28 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
Reference<XTextContent> xTextContent(xTmp, UNO_QUERY);
if (m_pImpl->m_xText.is() && xRange.is())
{
- m_pImpl->m_xText->insertTextContent(
- xRange, xTextContent, sal_True);
+ // #i107225# the combined characters need to be inserted first
+ // the selected text has to be removed afterwards
+ m_pImpl->m_xText->insertTextContent( xRange->getStart(), xTextContent, sal_True );
+
+ if( xRange->getString().getLength() )
+ {
+ try
+ {
+ uno::Reference< text::XTextCursor > xCrsr = xRange->getText()->createTextCursorByRange( xRange->getStart() );
+ xCrsr->goLeft( 1, true );
+ uno::Reference< beans::XPropertySet> xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW );
+ //the hard properties of the removed text need to be applied to the combined characters field
+ pStyle->FillPropertySet( xCrsrProperties );
+ xCrsr->collapseToEnd();
+ xCrsr->gotoRange( xRange->getEnd(), true );
+ xCrsr->setString( ::rtl::OUString() );
+ }
+ catch( const uno::Exception& rEx )
+ {
+ (void)rEx;
+ }
+ }
}
}
}
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index b30c24b4b419..1d9e67d23d28 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -653,6 +653,8 @@ void ElementDescriptor::readTreeControlModel( StyleBag * all_styles )
// collect elements
readDefaults();
+ readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) );
readSelectionTypeAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ),
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":selectiontype") ) );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index e3bce073b0b1..a0968eb007d5 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -930,6 +930,9 @@ void TreeControlElement::endElement()
}
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("tabstop") ),
+ _xAttributes );
ctx.importSelectionTypeProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("selectiontype") ),
_xAttributes );