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(co