summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-03-12 20:06:58 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-03-12 20:06:58 +0100
commitc61cd1a5a26de1d1f62389988b00229c04e36693 (patch)
tree9d6de00f4d149cba080fe88f1eff71a67786b5f0
parent064f1e4ed53cb16d174534e20a7d02b8c93a4948 (diff)
parentf2aeec8f22f37146c2f9120e8d0ead383049c1fa (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
-rw-r--r--animations/prj/build.lst2
-rw-r--r--animations/prj/d.lst1
-rw-r--r--animations/source/animcore/animcore.component67
-rw-r--r--animations/source/animcore/factreg.cxx6
-rw-r--r--animations/source/animcore/makefile.mk9
-rw-r--r--sd/inc/Outliner.hxx38
-rwxr-xr-x[-rw-r--r--]sd/inc/anminfo.hxx20
-rw-r--r--sd/inc/app.hrc44
-rw-r--r--sd/inc/drawdoc.hxx155
-rwxr-xr-xsd/inc/glob.hrc2
-rw-r--r--sd/inc/glob.hxx8
-rwxr-xr-x[-rw-r--r--]sd/inc/helpids.h475
-rwxr-xr-x[-rw-r--r--]sd/inc/pch/precompiled_sd.hxx6
-rw-r--r--sd/inc/sdabstdlg.hxx34
-rwxr-xr-x[-rw-r--r--]sd/inc/sdattr.hxx22
-rw-r--r--sd/inc/sdcommands.h310
-rwxr-xr-x[-rw-r--r--]sd/inc/sderror.hxx4
-rwxr-xr-x[-rw-r--r--]sd/inc/sdgrffilter.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/sdhtmlfilter.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/sdiocmpt.hxx20
-rw-r--r--sd/inc/sdmod.hxx16
-rw-r--r--sd/inc/sdpage.hxx80
-rwxr-xr-x[-rw-r--r--]sd/inc/sdresid.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/sdxmlwrp.hxx4
-rw-r--r--sd/inc/shapelist.hxx2
-rw-r--r--sd/inc/stlpool.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/stlsheet.hxx20
-rwxr-xr-x[-rw-r--r--]sd/inc/undo/undomanager.hxx20
-rw-r--r--sd/prj/build.lst4
-rwxr-xr-xsd/prj/d.lst2
-rwxr-xr-x[-rw-r--r--]sd/qa/unoapi/knownissues.xcl7
-rwxr-xr-x[-rw-r--r--]sd/qa/unoapi/sd.sce0
-rwxr-xr-x[-rw-r--r--]sd/sdi/SlideSorterController.sdi20
-rw-r--r--sd/sdi/ToolPanelViewShell.sdi177
-rwxr-xr-xsd/sdi/ViewShellBase.sdi213
-rwxr-xr-xsd/sdi/_drvwsh.sdi5
-rwxr-xr-xsd/sdi/sdraw.sdi391
-rwxr-xr-x[-rw-r--r--]sd/source/core/CustomAnimationPreset.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/core/anminfo.cxx16
-rw-r--r--sd/source/core/cusshow.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc.cxx88
-rw-r--r--sd/source/core/drawdoc2.cxx271
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc3.cxx356
-rw-r--r--sd/source/core/drawdoc4.cxx124
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc_animations.cxx2
-rw-r--r--[-rwxr-xr-x]sd/source/core/glob.src0
-rwxr-xr-x[-rw-r--r--]sd/source/core/pglink.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdattr.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdiocmpt.cxx14
-rw-r--r--sd/source/core/sdpage.cxx216
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdpage2.cxx32
-rw-r--r--sd/source/core/shapelist.cxx38
-rw-r--r--sd/source/core/stlpool.cxx98
-rwxr-xr-x[-rw-r--r--]sd/source/core/stlsheet.cxx107
-rwxr-xr-x[-rw-r--r--]sd/source/core/undo/undomanager.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/core/undo/undoobjects.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/filter/cgm/sdcgmfilter.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/eppt.cxx79
-rw-r--r--sd/source/filter/eppt/eppt.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/epptdef.hxx2
-rw-r--r--sd/source/filter/eppt/epptso.cxx100
-rw-r--r--sd/source/filter/eppt/escherex.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/escherex.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/filter/grf/sdgrffilter.cxx22
-rw-r--r--sd/source/filter/html/htmlex.cxx158
-rw-r--r--sd/source/filter/html/htmlex.hxx36
-rw-r--r--sd/source/filter/html/pubdlg.cxx150
-rw-r--r--sd/source/filter/html/pubdlg.src47
-rw-r--r--sd/source/filter/ppt/ppt97animations.cxx2
-rw-r--r--sd/source/filter/ppt/ppt97animations.hxx30
-rw-r--r--sd/source/filter/ppt/pptin.cxx230
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptin.hxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx24
-rw-r--r--sd/source/filter/ppt/propread.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/propread.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/filter/sdpptwrp.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/filter/xml/sdxmlwrp.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx4
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx15
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterView.cxx78
-rw-r--r--sd/source/ui/accessibility/AccessibleTreeNode.cxx25
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx38
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.src4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationDialog.cxx96
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationDialog.hxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.src41
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationList.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationList.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationPane.cxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationPane.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/DialogListBox.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/SlideTransitionPane.cxx36
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/motionpathtag.cxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/motionpathtag.hxx16
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx38
-rw-r--r--sd/source/ui/annotations/annotationmanagerimpl.hxx4
-rw-r--r--sd/source/ui/annotations/annotations.src29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationtag.cxx38
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationtag.hxx10
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx24
-rw-r--r--sd/source/ui/annotations/annotationwindow.hxx2
-rw-r--r--sd/source/ui/app/accel_tmpl.src117
-rw-r--r--sd/source/ui/app/app.img120
-rwxr-xr-xsd/source/ui/app/makefile.mk1
-rwxr-xr-xsd/source/ui/app/menuids2_tmpl.src190
-rw-r--r--sd/source/ui/app/menuids3_tmpl.src38
-rw-r--r--sd/source/ui/app/menuids4_tmpl.src2
-rw-r--r--sd/source/ui/app/menuids_tmpl.src274
-rw-r--r--sd/source/ui/app/optsitem.cxx375
-rw-r--r--sd/source/ui/app/popup.src57
-rw-r--r--sd/source/ui/app/popup2_tmpl.src28
-rw-r--r--sd/source/ui/app/sdmod.cxx48
-rw-r--r--sd/source/ui/app/sdmod1.cxx70
-rw-r--r--sd/source/ui/app/sdmod2.cxx84
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdpopup.cxx24
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdresid.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdxfer.cxx58
-rwxr-xr-xsd/source/ui/app/strings.src14
-rw-r--r--sd/source/ui/app/tbx_ww.src1123
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/tbxww.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/tmplctrl.cxx18
-rw-r--r--sd/source/ui/app/toolbox.src737
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/AnimationChildWindow.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/LayerDialogChildWindow.cxx2
-rw-r--r--sd/source/ui/dlg/LayerDialogContent.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/LayerTabBar.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/NavigatorChildWindow.cxx2
-rw-r--r--sd/source/ui/dlg/PaneChildWindows.cxx14
-rw-r--r--sd/source/ui/dlg/PaneDockingWindow.cxx68
-rw-r--r--[-rwxr-xr-x]sd/source/ui/dlg/PaneDockingWindow.src6
-rw-r--r--sd/source/ui/dlg/SpellDialogChildWindow.cxx4
-rw-r--r--sd/source/ui/dlg/animobjs.cxx168
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/animobjs.src24
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/assclass.cxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/brkdlg.cxx10
-rw-r--r--sd/source/ui/dlg/brkdlg.src1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/celltempl.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/copydlg.cxx38
-rw-r--r--sd/source/ui/dlg/copydlg.src14
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx92
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/custsdlg.src16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/diactrl.cxx6
-rw-r--r--sd/source/ui/dlg/dlgass.cxx190
-rw-r--r--sd/source/ui/dlg/dlgass.src25
-rw-r--r--sd/source/ui/dlg/dlgassim.cxx26
-rw-r--r--sd/source/ui/dlg/dlgassim.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgchar.cxx2
-rw-r--r--sd/source/ui/dlg/dlgctrls.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgfield.cxx14
-rw-r--r--sd/source/ui/dlg/dlgfield.src5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgolbul.cxx36
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgpage.cxx10
-rw-r--r--sd/source/ui/dlg/dlgsnap.cxx14
-rw-r--r--sd/source/ui/dlg/dlgsnap.src10
-rw-r--r--sd/source/ui/dlg/docprev.cxx16
-rw-r--r--sd/source/ui/dlg/filedlg.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/gluectrl.cxx14
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx47
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.src14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/ins_paste.cxx4
-rw-r--r--sd/source/ui/dlg/ins_paste.src3
-rw-r--r--sd/source/ui/dlg/inspagob.cxx8
-rw-r--r--sd/source/ui/dlg/inspagob.src4
-rw-r--r--sd/source/ui/dlg/layeroptionsdlg.src9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/masterlayoutdlg.cxx4
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.src5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/morphdlg.cxx8
-rw-r--r--sd/source/ui/dlg/morphdlg.src8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/navigatr.cxx130
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/navigatr.src5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/paragr.cxx24
-rw-r--r--sd/source/ui/dlg/paragr.src6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/present.cxx28
-rw-r--r--sd/source/ui/dlg/present.src19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/prltempl.cxx16
-rw-r--r--sd/source/ui/dlg/prntopts.cxx17
-rw-r--r--sd/source/ui/dlg/prntopts.src18
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx50
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx46
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/sdpreslt.cxx42
-rw-r--r--sd/source/ui/dlg/sdpreslt.src7
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx143
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tabtempl.cxx4
-rw-r--r--sd/source/ui/dlg/tpaction.cxx91
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tpaction.src16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tpoption.cxx90
-rw-r--r--sd/source/ui/dlg/tpoption.src19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/unchss.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/vectdlg.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/vectdlg.src11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/docshel2.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/docshel3.cxx8
-rw-r--r--sd/source/ui/docshell/docshel4.cxx98
-rw-r--r--sd/source/ui/docshell/docshell.cxx48
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/grdocsh.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationClassifier.hxx0
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationUpdater.hxx6
-rw-r--r--sd/source/ui/framework/factories/BasicPaneFactory.cxx2
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.cxx18
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.hxx6
-rw-r--r--sd/source/ui/framework/factories/ChildWindowPane.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/ChildWindowPane.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/FrameWindowPane.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/FullScreenPane.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/Pane.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ShellStackGuard.hxx0
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/bulmaper.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuarea.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fubullet.cxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuchar.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fucon3d.cxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconarc.cxx44
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconbez.cxx44
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconcs.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconrec.cxx54
-rw-r--r--sd/source/ui/func/fuconstr.cxx156
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconuno.cxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fucopy.cxx64
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fucushow.cxx4
-rw-r--r--sd/source/ui/func/fudraw.cxx186
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fudspord.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuediglu.cxx56
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuexpand.cxx51
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuformatpaintbrush.cxx46
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuhhconv.cxx20
-rw-r--r--sd/source/ui/func/fuinsert.cxx23
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuinsfil.cxx100
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuline.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fulinend.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fumorph.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuoaprms.cxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuolbull.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuoltext.cxx28
-rw-r--r--sd/source/ui/func/fuoutl.cxx6
-rw-r--r--sd/source/ui/func/fupage.cxx99
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuparagr.cxx4
-rw-r--r--sd/source/ui/func/fupoor.cxx102
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuprlout.cxx36
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuprobjs.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuscale.cxx12
-rw-r--r--sd/source/ui/func/fusearch.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusel.cxx214
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusldlg.cxx10
-rw-r--r--sd/source/ui/func/fusnapln.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusumry.cxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/futempl.cxx54
-rw-r--r--sd/source/ui/func/futext.cxx201
-rw-r--r--sd/source/ui/func/futransf.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/futxtatt.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuzoom.cxx30
-rw-r--r--sd/source/ui/func/sdundogr.cxx16
-rw-r--r--sd/source/ui/func/smarttag.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/unprlout.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/3dchld.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AccessibleOutlineEditSource.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AccessibleSlideView.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AccessibleTreeNode.hxx24
-rw-r--r--sd/source/ui/inc/AccessibleViewForwarder.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AnimationChildWindow.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/BreakDlg.hxx6
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx71
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx75
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/FrameView.hxx86
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/GraphicDocShell.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/GraphicObjectBar.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/LayerDialogChildWindow.hxx2
-rw-r--r--sd/source/ui/inc/LayerDialogContent.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/NavigatorChildWindow.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/NotesChildWindow.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/OutlineBulletDlg.hxx4
-rw-r--r--sd/source/ui/inc/OutlineView.hxx24
-rw-r--r--sd/source/ui/inc/OutlineViewShell.hxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/OutlinerIteratorImpl.hxx0
-rw-r--r--sd/source/ui/inc/PaneChildWindows.hxx12
-rw-r--r--sd/source/ui/inc/PaneDockingWindow.hxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PresentationViewShell.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PreviewRenderer.hxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/Ruler.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideSorter.hxx33
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideSorterChildWindow.hxx2
-rw-r--r--sd/source/ui/inc/SlideSorterViewShell.hxx19
-rw-r--r--sd/source/ui/inc/SlideView.hxx48
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideViewShell.hxx24
-rw-r--r--sd/source/ui/inc/SpellDialogChildWindow.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/TabControl.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/TemplateScanner.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/UpdateLockManager.hxx0
-rw-r--r--sd/source/ui/inc/View.hxx54
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewClipboard.hxx6
-rw-r--r--sd/source/ui/inc/ViewShell.hxx113
-rw-r--r--sd/source/ui/inc/ViewShellBase.hxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewTabControl.hxx2
-rw-r--r--sd/source/ui/inc/Window.hxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/animobjs.hrc3
-rw-r--r--sd/source/ui/inc/animobjs.hxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/celltempl.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/copydlg.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/custsdlg.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/diactrl.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlg_char.hxx2
-rw-r--r--sd/source/ui/inc/dlgass.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgfield.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgpage.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgsnap.hxx4
-rw-r--r--sd/source/ui/inc/docprev.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/drawview.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/Configuration.hxx0
-rw-r--r--sd/source/ui/inc/framework/FrameworkHelper.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/Pane.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fucon3d.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconarc.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconbez.hxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconcs.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconrec.hxx8
-rw-r--r--sd/source/ui/inc/fuconstr.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconuno.hxx12
-rw-r--r--sd/source/ui/inc/fudraw.hxx24
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fudspord.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuediglu.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuformatpaintbrush.hxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuhhconv.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuinsfil.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fumorph.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuoltext.hxx8
-rw-r--r--sd/source/ui/inc/fuoutl.hxx2
-rw-r--r--sd/source/ui/inc/fupoor.hxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fusearch.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fusel.hxx26
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuslid.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/futext.hxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuzoom.hxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/gluectrl.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ins_paste.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/inspagob.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/masterlayoutdlg.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/morphdlg.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/navigatr.hrc7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/navigatr.hxx26
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/optdlg.hxx2
-rw-r--r--sd/source/ui/inc/optsitem.hxx543
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/prltempl.hxx10
-rw-r--r--sd/source/ui/inc/prntopts.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/pubdlg.hxx10
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx25
-rw-r--r--sd/source/ui/inc/sdundogr.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/sdxfer.hxx26
-rw-r--r--sd/source/ui/inc/smarttag.hxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/sprite.hxx8
-rwxr-xr-xsd/source/ui/inc/strings.hrc3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tabtempl.hxx8
-rw-r--r--sd/source/ui/inc/taskpane/ControlContainer.hxx14
-rw-r--r--sd/source/ui/inc/taskpane/ScrollPanel.hxx6
-rw-r--r--sd/source/ui/inc/taskpane/SubToolPanel.hxx1
-rw-r--r--sd/source/ui/inc/taskpane/TitleBar.hxx2
-rw-r--r--sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tbx_ww.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tmplctrl.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/AsynchronousTask.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/IconCache.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tpaction.hrc3
-rw-r--r--sd/source/ui/inc/tpaction.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tpoption.hxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/undopage.hxx80
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unmodpg.hxx15
-rw-r--r--sd/source/ui/inc/unoaprms.hxx64
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unprlout.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/vectdlg.hxx2
-rw-r--r--sd/source/ui/inc/view/viewoverlaymanager.hxx2
-rw-r--r--sd/source/ui/inc/zoomlist.hxx6
-rw-r--r--sd/source/ui/notes/EditWindow.cxx50
-rw-r--r--sd/source/ui/notes/EditWindow.hxx8
-rw-r--r--sd/source/ui/notes/NotesChildWindow.cxx2
-rwxr-xr-xsd/source/ui/notes/NotesChildWindow.src3
-rw-r--r--sd/source/ui/notes/TextLogger.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/CanvasUpdateRequester.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterHelper.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterPreviewCache.cxx11
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/showwin.cxx62
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/showwindow.hxx14
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx23
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshow.hrc33
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshow.src70
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx623
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx14
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx150
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx44
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx81
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx6
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx141
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx66
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCache.cxx64
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx51
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx46
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx0
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx357
-rw-r--r--sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx294
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsAnimator.cxx299
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsClipboard.cxx366
-rw-r--r--sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx149
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx199
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx100
-rw-r--r--sd/source/ui/slidesorter/controller/SlsFocusManager.cxx136
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx8
-rw-r--r--sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx327
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx139
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsListener.hxx11
-rw-r--r--sd/source/ui/slidesorter/controller/SlsPageSelector.cxx254
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsProperties.cxx46
-rw-r--r--sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx422
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx2025
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx411
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx173
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx14
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx565
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsTransferable.cxx17
-rw-r--r--sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx305
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/makefile.mk14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx4
-rw-r--r--sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx61
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx13
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx46
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx180
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx61
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx39
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx18
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx153
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx122
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx16
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx70
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx145
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx88
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx85
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx6
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx25
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsTransferable.hxx (renamed from sd/source/ui/slidesorter/controller/SlsTransferable.hxx)40
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx100
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx70
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx124
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx0
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx101
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx214
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx362
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx60
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx71
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx131
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx330
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx145
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx138
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx0
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsResource.hrc111
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsTheme.hxx236
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx97
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx276
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx407
-rw-r--r--sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx240
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx4
-rw-r--r--sd/source/ui/slidesorter/model/SlsVisualState.cxx236
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/makefile.mk1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorter.cxx139
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx4
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterService.cxx60
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx124
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/makefile.mk0
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx1041
-rw-r--r--sd/source/ui/slidesorter/view/SlsButtonBar.cxx1558
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsFontProvider.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.cxx265
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.hxx121
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx537
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx448
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx565
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx99
-rw-r--r--sd/source/ui/slidesorter/view/SlsLayouter.cxx1684
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx287
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx584
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx128
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx1402
-rw-r--r--sd/source/ui/slidesorter/view/SlsResource.hxx50
-rw-r--r--sd/source/ui/slidesorter/view/SlsResource.src314
-rw-r--r--sd/source/ui/slidesorter/view/SlsTheme.cxx536
-rw-r--r--sd/source/ui/slidesorter/view/SlsToolTip.cxx230
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx14
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewOverlay.cxx609
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/makefile.mk32
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx32
-rw-r--r--sd/source/ui/table/TableDesignPane.src1
-rw-r--r--sd/source/ui/table/tablefunction.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/table/tableobjectbar.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/ControlContainer.cxx61
-rw-r--r--sd/source/ui/toolpanel/LayoutMenu.cxx38
-rw-r--r--sd/source/ui/toolpanel/LayoutMenu.hxx2
-rw-r--r--sd/source/ui/toolpanel/ScrollPanel.cxx33
-rw-r--r--sd/source/ui/toolpanel/SubToolPanel.cxx29
-rw-r--r--sd/source/ui/toolpanel/TaskPaneTreeNode.cxx2
-rw-r--r--sd/source/ui/toolpanel/TestMenu.cxx10
-rw-r--r--sd/source/ui/toolpanel/TestPanel.cxx6
-rw-r--r--sd/source/ui/toolpanel/TitleBar.cxx16
-rw-r--r--sd/source/ui/toolpanel/ToolPanel.cxx2
-rw-r--r--sd/source/ui/toolpanel/ToolPanelViewShell.cxx48
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx12
-rw-r--r--sd/source/ui/toolpanel/controls/DocumentHelper.cxx48
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/DocumentHelper.hxx2
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPageContainer.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx0
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx0
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPageObserver.cxx8
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx19
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx38
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/PreviewValueSet.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/PreviewValueSet.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/IconCache.cxx8
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx191
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx18
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx2
-rw-r--r--sd/source/ui/unoidl/SdUnoSlideView.cxx24
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx38
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/detreg.cxx24
-rw-r--r--sd/source/ui/unoidl/facreg.cxx109
-rw-r--r--sd/source/ui/unoidl/sddetect.cxx28
-rw-r--r--sd/source/ui/unoidl/unocpres.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unodoc.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unolayer.cxx6
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx20
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx6
-rw-r--r--sd/source/ui/unoidl/unopage.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unopool.cxx2
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx202
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/DocumentRenderer.hrc15
-rwxr-xr-xsd/source/ui/view/DocumentRenderer.src94
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/GraphicObjectBar.cxx4
-rw-r--r--sd/source/ui/view/GraphicViewShellBase.cxx10
-rw-r--r--sd/source/ui/view/ImpressViewShellBase.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/MediaObjectBar.cxx4
-rw-r--r--sd/source/ui/view/OutlineViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/Outliner.cxx142
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx4
-rw-r--r--sd/source/ui/view/PresentationViewShellBase.cxx9
-rw-r--r--sd/source/ui/view/SlideSorterViewShellBase.cxx8
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx4
-rw-r--r--sd/source/ui/view/ViewClipboard.cxx42
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx94
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx52
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx21
-rw-r--r--sd/source/ui/view/ViewTabBar.cxx14
-rw-r--r--sd/source/ui/view/drawview.cxx62
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drbezob.cxx26
-rw-r--r--sd/source/ui/view/drtxtob.cxx80
-rw-r--r--sd/source/ui/view/drtxtob1.cxx52
-rw-r--r--sd/source/ui/view/drviews1.cxx146
-rw-r--r--sd/source/ui/view/drviews2.cxx111
-rw-r--r--sd/source/ui/view/drviews3.cxx52
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews4.cxx66
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews5.cxx40
-rw-r--r--sd/source/ui/view/drviews6.cxx64
-rw-r--r--sd/source/ui/view/drviews7.cxx232
-rw-r--r--sd/source/ui/view/drviews8.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews9.cxx114
-rw-r--r--sd/source/ui/view/drviewsa.cxx75
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsb.cxx112
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsc.cxx55
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsd.cxx26
-rw-r--r--sd/source/ui/view/drviewse.cxx104
-rw-r--r--sd/source/ui/view/drviewsf.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsg.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsh.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsi.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsj.cxx68
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/frmview.cxx46
-rw-r--r--sd/source/ui/view/outlnvs2.cxx18
-rw-r--r--sd/source/ui/view/outlnvsh.cxx345
-rw-r--r--sd/source/ui/view/outlview.cxx270
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/presvish.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdruler.cxx16
-rw-r--r--sd/source/ui/view/sdview.cxx98
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview2.cxx118
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview3.cxx141
-rw-r--r--sd/source/ui/view/sdview4.cxx24
-rw-r--r--sd/source/ui/view/sdwindow.cxx58
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/tabcontr.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/unmodpg.cxx24
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx24
-rw-r--r--sd/source/ui/view/viewshe2.cxx56
-rw-r--r--sd/source/ui/view/viewshe3.cxx64
-rw-r--r--sd/source/ui/view/viewshel.cxx119
-rw-r--r--sd/source/ui/view/zoomlist.cxx24
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/sdraw/menubar/menubar.xml0
-rwxr-xr-x[-rw-r--r--]sd/util/exports.dxp1
-rwxr-xr-x[-rw-r--r--]sd/util/hidother.src26
-rwxr-xr-xsd/util/makefile.mk18
-rw-r--r--sd/util/sd.component102
-rw-r--r--sd/util/sdd.component34
-rw-r--r--slideshow/prj/build.lst2
-rw-r--r--slideshow/prj/d.lst2
-rw-r--r--slideshow/source/engine/OGLTrans/exports.dxp1
-rw-r--r--slideshow/source/engine/OGLTrans/ogltrans.component34
-rw-r--r--slideshow/source/engine/OGLTrans/win/makefile.mk8
-rw-r--r--slideshow/source/engine/makefile.mk2
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx12
-rw-r--r--slideshow/source/engine/shapes/shapeimporter.cxx11
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.cxx28
-rw-r--r--slideshow/source/engine/shapes/viewmediashape.hxx5
-rw-r--r--slideshow/source/engine/slide/layermanager.hxx4
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx50
-rw-r--r--slideshow/source/engine/slide/userpaintoverlay.cxx91
-rw-r--r--slideshow/source/engine/slide/userpaintoverlay.hxx9
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx54
-rw-r--r--slideshow/source/inc/slide.hxx7
-rw-r--r--slideshow/test/demoshow.cxx8
-rw-r--r--slideshow/util/exports.dxp1
-rw-r--r--slideshow/util/makefile.mk8
-rw-r--r--slideshow/util/makefile.pmk2
-rw-r--r--slideshow/util/slideshow.component34
637 files changed, 26414 insertions, 17729 deletions
diff --git a/animations/prj/build.lst b/animations/prj/build.lst
index 00a1eb69c743..276f25e46d9b 100644
--- a/animations/prj/build.lst
+++ b/animations/prj/build.lst
@@ -1,3 +1,3 @@
-animations animations : cppuhelper comphelper offuh NULL
+animations animations : cppuhelper comphelper offuh LIBXSLT:libxslt NULL
animations animations usr1 - all animations_mkout NULL
animations animations\source\animcore nmake - all animations_animcore NULL
diff --git a/animations/prj/d.lst b/animations/prj/d.lst
index bdab238656c3..9a91b35b2f50 100644
--- a/animations/prj/d.lst
+++ b/animations/prj/d.lst
@@ -7,3 +7,4 @@
mkdir: %_DEST%\inc%_EXT%\animations
..\inc\animations\animationnodehelper.hxx %_DEST%\inc%_EXT%\animations\animationnodehelper.hxx
+..\%__SRC%\misc\animcore.component %_DEST%\xml%_EXT%\animcore.component
diff --git a/animations/source/animcore/animcore.component b/animations/source/animcore/animcore.component
new file mode 100644
index 000000000000..1a9a390fb64b
--- /dev/null
+++ b/animations/source/animcore/animcore.component
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="animcore::Animate">
+ <service name="com.sun.star.animations.Animate"/>
+ </implementation>
+ <implementation name="animcore::AnimateColor">
+ <service name="com.sun.star.animations.AnimateColor"/>
+ </implementation>
+ <implementation name="animcore::AnimateMotion">
+ <service name="com.sun.star.animations.AnimateMotion"/>
+ </implementation>
+ <implementation name="animcore::AnimateSet">
+ <service name="com.sun.star.animations.AnimateSet"/>
+ </implementation>
+ <implementation name="animcore::AnimateTransform">
+ <service name="com.sun.star.animations.AnimateTransform"/>
+ </implementation>
+ <implementation name="animcore::Audio">
+ <service name="com.sun.star.animations.Audio"/>
+ </implementation>
+ <implementation name="animcore::Command">
+ <service name="com.sun.star.animations.Command"/>
+ </implementation>
+ <implementation name="animcore::IterateContainer">
+ <service name="com.sun.star.animations.IterateContainer"/>
+ </implementation>
+ <implementation name="animcore::ParallelTimeContainer">
+ <service name="com.sun.star.animations.ParallelTimeContainer"/>
+ </implementation>
+ <implementation name="animcore::SequenceTimeContainer">
+ <service name="com.sun.star.animations.SequenceTimeContainer"/>
+ </implementation>
+ <implementation name="animcore::TargetPropertiesCreator">
+ <service name="com.sun.star.animations.TargetPropertiesCreator"/>
+ </implementation>
+ <implementation name="animcore::TransitionFilter">
+ <service name="com.sun.star.animations.TransitionFilter"/>
+ </implementation>
+</component>
diff --git a/animations/source/animcore/factreg.cxx b/animations/source/animcore/factreg.cxx
index 63c2cacf516b..c79ac7d7852b 100644
--- a/animations/source/animcore/factreg.cxx
+++ b/animations/source/animcore/factreg.cxx
@@ -86,12 +86,6 @@ void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/animations/source/animcore/makefile.mk b/animations/source/animcore/makefile.mk
index c2a10716b844..9c6b4a2cdead 100644
--- a/animations/source/animcore/makefile.mk
+++ b/animations/source/animcore/makefile.mk
@@ -63,5 +63,12 @@ DEF1NAME= $(SHL1TARGET)
.ENDIF # L10N_framework
# --- Targets ------------------------------------------------------
-
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/animcore.component
+
+$(MISC)/animcore.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ animcore.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt animcore.component
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index a04cf7763174..aa75c763a459 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -121,7 +121,7 @@ public:
<const>OUTLINERMODE_OUTLINEVIEW</const> are defined in
editeng/outliner.hxx.
*/
- Outliner( SdDrawDocument* pDoc, USHORT nMode );
+ Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode );
virtual ~Outliner();
/** Despite the name this method is called prior to spell cheking *and*
@@ -142,8 +142,8 @@ public:
/** Initiate a find and/or replace on the next relevant text object.
@return
- Returns </TRUE> when the search/replace is finished (as
- indicated by user input to the search dialog). A </FALSE> value
+ Returns </sal_True> when the search/replace is finished (as
+ indicated by user input to the search dialog). A </sal_False> value
indicates that another call to this method is required.
*/
bool StartSearchAndReplace (const SvxSearchItem* pSearchItem);
@@ -164,8 +164,8 @@ public:
/** Starts the text conversion (hangul/hanja or Chinese simplified/traditional)
for the current viewshell */
- void StartConversion( INT16 nSourceLanguage, INT16 nTargetLanguage,
- const Font *pTargetFont, INT32 nOptions, BOOL bIsInteractive );
+ void StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+ const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
/** This is called internaly when text conversion is started.
The position of current view mode/page/object/caret position
@@ -204,7 +204,7 @@ private:
/** this is the language that is used for current text conversion.
Only valid if meMode is TEXT_CONVERSION.
*/
- INT16 mnConversionLanguage;
+ sal_Int16 mnConversionLanguage;
/** While the value of this flag is greater than 0 changes of the current page
do not lead to selecting the corresponding text in the outliner.
@@ -216,17 +216,17 @@ private:
/** This flag indicates whether there may exist a match of the search
string before/after the current position in the document. It can be
- set to </FALSE> only when starting from the beginning/end of the
+ set to </sal_False> only when starting from the beginning/end of the
document. When reaching the end/beginning with it still be set to
- </FALSE> then there exists no match and the search can be terminated.
+ </sal_False> then there exists no match and the search can be terminated.
*/
bool mbMatchMayExist;
/// The number of pages in the current view.
- USHORT mnPageCount;
+ sal_uInt16 mnPageCount;
/// Number of objects on the current page / in the current selection.
- INT32 mnObjectCount;
+ sal_Int32 mnObjectCount;
/** A <TRUE/> value indicates that the end of the find&replace or spell
check has been reached.
@@ -235,7 +235,7 @@ private:
/** Set to <TRUE/> when an object has been prepared successfully for
searching/spell checking. This flag directs the internal iteration
- which stops when set to </TRUE>.
+ which stops when set to </sal_True>.
*/
bool mbFoundObject;
@@ -297,7 +297,7 @@ private:
EditMode meStartEditMode;
/// The current page index on starting to search/spell check.
- USHORT mnStartPageIndex;
+ sal_uInt16 mnStartPageIndex;
/// The object in edit mode when searching /spell checking was started
/// (if any).
@@ -370,8 +370,8 @@ private:
/** Do search and replace for next match.
@return
- The return value specifies whether the search ended (</TRUE>) or
- another call to this method is required (</FALSE>).
+ The return value specifies whether the search ended (</sal_True>) or
+ another call to this method is required (</sal_False>).
*/
bool SearchAndReplaceOnce (void);
@@ -410,7 +410,7 @@ private:
/** Handle the situation that the iterator has reached the last object.
This may result in setting the <member>mbEndOfSearch</member> flag
- back to </FALSE>. This method may show either the end-of-search
+ back to </sal_False>. This method may show either the end-of-search
dialog or the wrap-arround dialog.
*/
void EndOfSearch (void);
@@ -470,11 +470,11 @@ private:
@param nPageIndex
The new page index.
*/
- void SetPage (EditMode eEditMode, USHORT nPageIndex);
+ void SetPage (EditMode eEditMode, sal_uInt16 nPageIndex);
/** Switch on edit mode for the currently selected text object.
*/
- void EnterEditMode (BOOL bGrabFocus=TRUE);
+ void EnterEditMode (sal_Bool bGrabFocus=sal_True);
/** Return the position at which a new search is started with respect to
the search direction as specified by the argument.
@@ -538,14 +538,14 @@ private:
required. When all text objects have been processed then
<FALSE/> is returned.
*/
- virtual BOOL SpellNextDocument (void);
+ virtual sal_Bool SpellNextDocument (void);
/** Show the given message box and make it modal. It is assumed that
the parent of the given dialog is NULL, i.e. the application
window. This function makes sure that the otherwise non-modal
search dialog, if visible, is locked, too.
*/
- USHORT ShowModalMessageBox (Dialog& rMessageBox);
+ sal_uInt16 ShowModalMessageBox (Dialog& rMessageBox);
};
} // end of namespace sd
diff --git a/sd/inc/anminfo.hxx b/sd/inc/anminfo.hxx
index 326cccef37d8..54aacefdf79f 100644..100755
--- a/sd/inc/anminfo.hxx
+++ b/sd/inc/anminfo.hxx
@@ -55,24 +55,24 @@ public:
::com::sun::star::presentation::AnimationEffect meEffect; // Animationseffekt
::com::sun::star::presentation::AnimationEffect meTextEffect; // Animationseffekt fuer Textinhalt
::com::sun::star::presentation::AnimationSpeed meSpeed; // Geschwindigkeit der Animation
- BOOL mbActive; // eingeschaltet ?
- BOOL mbDimPrevious; // Objekt abblenden
- BOOL mbIsMovie; // wenn Gruppenobjekt, dann Sequenz aus den
- BOOL mbDimHide; // verstecken statt abblenden
+ sal_Bool mbActive; // eingeschaltet ?
+ sal_Bool mbDimPrevious; // Objekt abblenden
+ sal_Bool mbIsMovie; // wenn Gruppenobjekt, dann Sequenz aus den
+ sal_Bool mbDimHide; // verstecken statt abblenden
Color maBlueScreen; // identifiziert "Hintergrundpixel"
Color maDimColor; // zum Abblenden des Objekts
String maSoundFile; // Pfad zum Soundfile in MSDOS-Notation
- BOOL mbSoundOn; // Sound ein/aus
- BOOL mbPlayFull; // Sound ganz abspielen
+ sal_Bool mbSoundOn; // Sound ein/aus
+ sal_Bool mbPlayFull; // Sound ganz abspielen
SdrPathObj* mpPathObj; // das Pfadobjekt
::com::sun::star::presentation::ClickAction meClickAction; // Aktion bei Mausklick
::com::sun::star::presentation::AnimationEffect meSecondEffect; // fuer Objekt ausblenden
::com::sun::star::presentation::AnimationSpeed meSecondSpeed; // fuer Objekt ausblenden
String maSecondSoundFile; // fuer Objekt ausblenden
- BOOL mbSecondSoundOn; // fuer Objekt ausblenden
- BOOL mbSecondPlayFull;// fuer Objekt ausblenden
- USHORT mnVerb; // fuer OLE-Objekt
- ULONG mnPresOrder;
+ sal_Bool mbSecondSoundOn; // fuer Objekt ausblenden
+ sal_Bool mbSecondPlayFull;// fuer Objekt ausblenden
+ sal_uInt16 mnVerb; // fuer OLE-Objekt
+ sal_uLong mnPresOrder;
SdrObject& mrObject;
SD_DLLPUBLIC void SetBookmark( const String& rBookmark );
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index eb622351dc1b..707a62fd791d 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -32,6 +32,50 @@
#include <sfx2/sfx.hrc>
#endif
+// HelpIDs fuer Vorlagen
+#define HID_STANDARD_STYLESHEET_NAME (HID_SD_START + 70)
+#define HID_POOLSHEET_OBJWITHARROW (HID_SD_START + 71)
+#define HID_POOLSHEET_OBJWITHSHADOW (HID_SD_START + 72)
+#define HID_POOLSHEET_OBJWITHOUTFILL (HID_SD_START + 73)
+#define HID_POOLSHEET_TEXT (HID_SD_START + 74)
+#define HID_POOLSHEET_TEXTBODY (HID_SD_START + 75)
+#define HID_POOLSHEET_TEXTBODY_JUSTIFY (HID_SD_START + 76)
+#define HID_POOLSHEET_TEXTBODY_INDENT (HID_SD_START + 77)
+#define HID_POOLSHEET_TITLE (HID_SD_START + 78)
+#define HID_POOLSHEET_TITLE1 (HID_SD_START + 79)
+#define HID_POOLSHEET_TITLE2 (HID_SD_START + 80)
+#define HID_POOLSHEET_HEADLINE (HID_SD_START + 81)
+#define HID_POOLSHEET_HEADLINE1 (HID_SD_START + 82)
+#define HID_POOLSHEET_HEADLINE2 (HID_SD_START + 83)
+#define HID_POOLSHEET_MEASURE (HID_SD_START + 84)
+#define HID_PSEUDOSHEET_TITLE (HID_SD_START + 85)
+#define HID_PSEUDOSHEET_OUTLINE (HID_SD_START + 86)
+#define HID_PSEUDOSHEET_OUTLINE1 (HID_SD_START + 87)
+#define HID_PSEUDOSHEET_OUTLINE2 (HID_SD_START + 88)
+#define HID_PSEUDOSHEET_OUTLINE3 (HID_SD_START + 89)
+#define HID_PSEUDOSHEET_OUTLINE4 (HID_SD_START + 90)
+#define HID_PSEUDOSHEET_OUTLINE5 (HID_SD_START + 91)
+#define HID_PSEUDOSHEET_OUTLINE6 (HID_SD_START + 92)
+#define HID_PSEUDOSHEET_OUTLINE7 (HID_SD_START + 93)
+#define HID_PSEUDOSHEET_OUTLINE8 (HID_SD_START + 94)
+#define HID_PSEUDOSHEET_OUTLINE9 (HID_SD_START + 95)
+#define HID_PSEUDOSHEET_BACKGROUNDOBJECTS (HID_SD_START + 96)
+#define HID_PSEUDOSHEET_BACKGROUND (HID_SD_START + 97)
+#define HID_PSEUDOSHEET_NOTES (HID_SD_START + 98)
+#define HID_PSEUDOSHEET_SUBTITLE (HID_SD_START + 101)
+
+#define HID_SD_CELL_STYLE_DEFAULT (HID_SD_START + 194)
+#define HID_SD_CELL_STYLE_BANDED (HID_SD_START + 195)
+#define HID_SD_CELL_STYLE_HEADER (HID_SD_START + 196)
+#define HID_SD_CELL_STYLE_TOTAL (HID_SD_START + 197)
+#define HID_SD_CELL_STYLE_FIRST_COLUMN (HID_SD_START + 198)
+#define HID_SD_CELL_STYLE_LAST_COLUMN (HID_SD_START + 199)
+
+#define SHELLID_SD_TASK_PANE_PREVIEW_CURRENT (HID_SD_START + 174)
+#define SHELLID_SD_TASK_PANE_PREVIEW_RECENT (HID_SD_START + 175)
+#define SHELLID_SD_TASK_PANE_PREVIEW_ALL (HID_SD_START + 176)
+#define SHELLID_SD_TASK_PANE_PREVIEW_LAYOUTS (HID_SD_START + 177)
+
#define SID_BACKGROUND (SID_SD_START)
#define SID_LASTVERSION (SID_SD_START+1)
#define SID_PAGESETUP (SID_SD_START+2)
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 47cf7eddb0a9..7c74a3dc6524 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -171,8 +171,8 @@ private:
List* mpCustomShowList;
::sd::DrawDocShell* mpDocSh;
SdTransferable * mpCreatingTransferable;
- BOOL mbHasOnlineSpellErrors;
- BOOL mbInitialOnlineSpellingEnabled;
+ sal_Bool mbHasOnlineSpellErrors;
+ sal_Bool mbInitialOnlineSpellingEnabled;
String maBookmarkFile;
::sd::DrawDocShellRef mxBookmarkDocShRef;
@@ -180,17 +180,17 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 > mxPresentation;
- BOOL mbNewOrLoadCompleted;
+ sal_Bool mbNewOrLoadCompleted;
- BOOL mbOnlineSpell;
- BOOL mbSummationOfParagraphs;
+ sal_Bool mbOnlineSpell;
+ sal_Bool mbSummationOfParagraphs;
bool mbStartWithPresentation; // is set to true when starting with command line parameter -start
LanguageType meLanguage;
LanguageType meLanguageCJK;
LanguageType meLanguageCTL;
SvxNumType mePageNumType;
::sd::DrawDocShellRef mxAllocedDocShRef; // => AllocModel()
- BOOL mbAllocDocSh; // => AllocModel()
+ sal_Bool mbAllocDocSh; // => AllocModel()
DocumentType meDocType;
CharClass* mpCharClass;
::com::sun::star::lang::Locale* mpLocale;
@@ -198,8 +198,8 @@ private:
::std::auto_ptr<ImpDrawPageListWatcher> mpDrawPageListWatcher;
::std::auto_ptr<ImpMasterPageListWatcher> mpMasterPageListWatcher;
- void UpdatePageObjectsInNotes(USHORT nStartPos);
- void UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement);
+ void UpdatePageObjectsInNotes(sal_uInt16 nStartPos);
+ void UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement);
void FillOnlineSpellingList(SdPage* pPage);
void SpellObject(SdrTextObj* pObj);
@@ -232,21 +232,21 @@ public:
SfxItemPool& GetPool() { return( *pItemPool ); }
- ::sd::Outliner* GetOutliner(BOOL bCreateOutliner=TRUE);
- SD_DLLPUBLIC ::sd::Outliner* GetInternalOutliner(BOOL bCreateOutliner=TRUE);
+ ::sd::Outliner* GetOutliner(sal_Bool bCreateOutliner=sal_True);
+ SD_DLLPUBLIC ::sd::Outliner* GetInternalOutliner(sal_Bool bCreateOutliner=sal_True);
::sd::DrawDocShell* GetDocSh() const { return mpDocSh; }
- LanguageType GetLanguage( const USHORT nId ) const;
- void SetLanguage( const LanguageType eLang, const USHORT nId );
+ LanguageType GetLanguage( const sal_uInt16 nId ) const;
+ void SetLanguage( const LanguageType eLang, const sal_uInt16 nId );
SvxNumType GetPageNumType() const;
void SetPageNumType(SvxNumType eType) { mePageNumType = eType; }
- SD_DLLPUBLIC String CreatePageNumValue(USHORT nNum) const;
+ SD_DLLPUBLIC String CreatePageNumValue(sal_uInt16 nNum) const;
DocumentType GetDocumentType() const { return meDocType; }
- void SetAllocDocSh(BOOL bAlloc);
+ void SetAllocDocSh(sal_Bool bAlloc);
void CreatingDataObj( SdTransferable* pTransferable ) { mpCreatingTransferable = pTransferable; }
@@ -256,25 +256,25 @@ public:
for newly created slides.
*/
SD_DLLPUBLIC void CreateFirstPages( SdDrawDocument* pRefDocument = 0 );
- SD_DLLPUBLIC BOOL CreateMissingNotesAndHandoutPages();
+ SD_DLLPUBLIC sal_Bool CreateMissingNotesAndHandoutPages();
- void MovePage(USHORT nPgNum, USHORT nNewPos);
- void InsertPage(SdrPage* pPage, USHORT nPos=0xFFFF);
- void DeletePage(USHORT nPgNum);
- SdrPage* RemovePage(USHORT nPgNum);
+ void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos);
+ void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
+ void DeletePage(sal_uInt16 nPgNum);
+ SdrPage* RemovePage(sal_uInt16 nPgNum);
- virtual void InsertMasterPage(SdrPage* pPage, USHORT nPos=0xFFFF);
- virtual SdrPage* RemoveMasterPage(USHORT nPgNum);
+ virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF);
+ virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum);
- void RemoveUnnecessaryMasterPages( SdPage* pMaster=NULL, BOOL bOnlyDuplicatePages=FALSE, BOOL bUndo=TRUE );
- SD_DLLPUBLIC void SetMasterPage(USHORT nSdPageNum, const String& rLayoutName,
- SdDrawDocument* pSourceDoc, BOOL bMaster, BOOL bCheckMasters);
+ void RemoveUnnecessaryMasterPages( SdPage* pMaster=NULL, sal_Bool bOnlyDuplicatePages=sal_False, sal_Bool bUndo=sal_True );
+ SD_DLLPUBLIC void SetMasterPage(sal_uInt16 nSdPageNum, const String& rLayoutName,
+ SdDrawDocument* pSourceDoc, sal_Bool bMaster, sal_Bool bCheckMasters);
SD_DLLPUBLIC SdDrawDocument* OpenBookmarkDoc(const String& rBookmarkFile);
SdDrawDocument* OpenBookmarkDoc(SfxMedium& rMedium);
- BOOL InsertBookmark(List* pBookmarkList, List* pExchangeList, BOOL bLink,
- BOOL bReplace, USHORT nPgPos, BOOL bNoDialogs,
- ::sd::DrawDocShell* pBookmarkDocSh, BOOL bCopy,
+ sal_Bool InsertBookmark(List* pBookmarkList, List* pExchangeList, sal_Bool bLink,
+ sal_Bool bReplace, sal_uInt16 nPgPos, sal_Bool bNoDialogs,
+ ::sd::DrawDocShell* pBookmarkDocSh, sal_Bool bCopy,
Point* pObjPos);
bool IsStartWithPresentation() const;
@@ -288,7 +288,7 @@ public:
@attention Beware! This method in it's current state does not
handle all combinations of their input parameters
- correctly. For example, for pBookmarkList=NULL, bReplace=TRUE
+ correctly. For example, for pBookmarkList=NULL, bReplace=sal_True
is ignored (no replace happens).
@param pBookmarkList
@@ -325,16 +325,16 @@ public:
Whether the replace operation should take the name from the new
page, or preserve the old name
*/
- BOOL InsertBookmarkAsPage(List* pBookmarkList, List* pExchangeList,
- BOOL bLink, BOOL bReplace, USHORT nPgPos,
- BOOL bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
- BOOL bCopy, BOOL bMergeMasterPages,
- BOOL bPreservePageNames);
- BOOL InsertBookmarkAsObject(List* pBookmarkList, List* pExchangeListL,
- BOOL bLink, ::sd::DrawDocShell* pBookmarkDocSh,
+ sal_Bool InsertBookmarkAsPage(List* pBookmarkList, List* pExchangeList,
+ sal_Bool bLink, sal_Bool bReplace, sal_uInt16 nPgPos,
+ sal_Bool bNoDialogs, ::sd::DrawDocShell* pBookmarkDocSh,
+ sal_Bool bCopy, sal_Bool bMergeMasterPages,
+ sal_Bool bPreservePageNames);
+ sal_Bool InsertBookmarkAsObject(List* pBookmarkList, List* pExchangeListL,
+ sal_Bool bLink, ::sd::DrawDocShell* pBookmarkDocSh,
Point* pObjPos);
void IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList,
- USHORT nBMSdPageCount,
+ sal_uInt16 nBMSdPageCount,
InsertBookmarkAsPage_PageFunctorBase& rPageIterator );
SD_DLLPUBLIC void CloseBookmarkDoc();
@@ -353,25 +353,25 @@ public:
Returns the index of the page with the given name or
SDRPAGE_NOTFOUND (=0xffff) when such a page does not exist.
*/
- USHORT GetPageByName(const String& rPgName, BOOL& rbIsMasterPage ) const;
- SD_DLLPUBLIC SdPage*GetSdPage(USHORT nPgNum, PageKind ePgKind) const;
- SD_DLLPUBLIC USHORT GetSdPageCount(PageKind ePgKind) const;
+ sal_uInt16 GetPageByName(const String& rPgName, sal_Bool& rbIsMasterPage ) const;
+ SD_DLLPUBLIC SdPage*GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const;
+ SD_DLLPUBLIC sal_uInt16 GetSdPageCount(PageKind ePgKind) const;
- void SetSelected(SdPage* pPage, BOOL bSelect);
- BOOL MovePages(USHORT nTargetPage);
+ void SetSelected(SdPage* pPage, sal_Bool bSelect);
+ sal_Bool MovePages(sal_uInt16 nTargetPage);
- SD_DLLPUBLIC SdPage*GetMasterSdPage(USHORT nPgNum, PageKind ePgKind);
- SD_DLLPUBLIC USHORT GetMasterSdPageCount(PageKind ePgKind) const;
+ SD_DLLPUBLIC SdPage*GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind);
+ SD_DLLPUBLIC sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const;
- USHORT GetMasterPageUserCount(SdrPage* pMaster) const;
+ sal_uInt16 GetMasterPageUserCount(SdrPage* pMaster) const;
const sd::PresentationSettings& getPresentationSettings() const { return maPresentationSettings; }
sd::PresentationSettings& getPresentationSettings() { return maPresentationSettings; }
const ::com::sun::star::uno::Reference< ::com::sun::star::presentation::XPresentation2 >& getPresentation() const;
- void SetSummationOfParagraphs( BOOL bOn = TRUE ) { mbSummationOfParagraphs = bOn; }
- BOOL IsSummationOfParagraphs() const { return mbSummationOfParagraphs; }
+ void SetSummationOfParagraphs( sal_Bool bOn = sal_True ) { mbSummationOfParagraphs = bOn; }
+ sal_Bool IsSummationOfParagraphs() const { return mbSummationOfParagraphs; }
/** Set the mode that controls whether (and later how) the formatting of the document
depends on the current printer metrics.
@@ -395,20 +395,20 @@ public:
*/
sal_Int32 GetPrinterIndependentLayout (void);
- void SetOnlineSpell( BOOL bIn );
- BOOL GetOnlineSpell() const { return mbOnlineSpell; }
+ void SetOnlineSpell( sal_Bool bIn );
+ sal_Bool GetOnlineSpell() const { return mbOnlineSpell; }
void StopOnlineSpelling();
- void StartOnlineSpelling(BOOL bForceSpelling=TRUE);
+ void StartOnlineSpelling(sal_Bool bForceSpelling=sal_True);
void ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl);
void InsertObject(SdrObject* pObj, SdPage* pPage);
void RemoveObject(SdrObject* pObj, SdPage* pPage);
- ULONG GetLinkCount();
+ sal_uLong GetLinkCount();
List* GetFrameViewList() const { return mpFrameViewList; }
- SD_DLLPUBLIC List* GetCustomShowList(BOOL bCreate = FALSE);
+ SD_DLLPUBLIC List* GetCustomShowList(sal_Bool bCreate = sal_False);
void NbcSetChanged(sal_Bool bFlag = sal_True);
@@ -423,9 +423,9 @@ public:
void NewOrLoadCompleted(DocCreationMode eMode);
void NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool );
- BOOL IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
+ sal_Bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
- ::sd::FrameView* GetFrameView(ULONG nPos) {
+ ::sd::FrameView* GetFrameView(sal_uLong nPos) {
return static_cast< ::sd::FrameView*>(
mpFrameViewList->GetObject(nPos));}
@@ -446,8 +446,8 @@ public:
void CheckMasterPages();
void Merge(SdrModel& rSourceModel,
- USHORT nFirstPageNum=0, USHORT nLastPageNum=0xFFFF,
- USHORT nDestPos=0xFFFF,
+ sal_uInt16 nFirstPageNum=0, sal_uInt16 nLastPageNum=0xFFFF,
+ sal_uInt16 nDestPos=0xFFFF,
bool bMergeMasterPages = false, bool bAllMasterPages = false,
bool bUndo = true, bool bTreadSourceAsConst = false);
@@ -492,20 +492,24 @@ public:
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
+ @param nInsertPosition
+ Position where to insert the standard page. When -1 then the
+ new page set is inserted after the current page.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
- USHORT CreatePage (
+ sal_uInt16 CreatePage (
SdPage* pCurrentPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
- BOOL bIsPageBack,
- BOOL bIsPageObj);
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj,
+ const sal_Int32 nInsertPosition = -1);
/** This method acts as a simplified front end for the more complex
<member>DuplicatePage()</member> method.
@@ -517,7 +521,7 @@ public:
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
- USHORT DuplicatePage (USHORT nPageNum);
+ sal_uInt16 DuplicatePage (sal_uInt16 nPageNum);
/** Create and insert a set of two new pages that are copies of the
given <argument>pCurrentPage</argument> and its associated notes
@@ -548,20 +552,24 @@ public:
This flag indicates whether to show the background shape.
@param bIsPageObj
This flag indicates whether to show the shapes on the master page.
+ @param nInsertPosition
+ Position where to insert the standard page. When -1 then the
+ new page set is inserted after the current page.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
- USHORT DuplicatePage (
+ sal_uInt16 DuplicatePage (
SdPage* pCurrentPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
- BOOL bIsPageBack,
- BOOL bIsPageObj);
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj,
+ const sal_Int32 nInsertPosition = -1);
/** return the document fonts for latin, cjk and ctl according to the current
languages set at this document */
@@ -619,23 +627,26 @@ private:
The standard page to insert.
@param pNotesPage
The notes page to insert.
+ @param nInsertPosition
+ Position where to insert the standard page. When -1 then the
+ new page set is inserted after the current page.
@return
Returns an index of the inserted pages that can be used with the
<member>GetSdPage()</member> method.
*/
- USHORT InsertPageSet (
+ sal_uInt16 InsertPageSet (
SdPage* pCurrentPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
- BOOL bIsPageBack,
- BOOL bIsPageObj,
-
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj,
SdPage* pStandardPage,
- SdPage* pNotesPage);
+ SdPage* pNotesPage,
+ sal_Int32 nInsertPosition = -1);
/** Set up a newly created page and insert it into the list of pages.
@param pPreviousPage
@@ -656,9 +667,9 @@ private:
SdPage* pPreviousPage,
SdPage* pPage,
const String& sPageName,
- USHORT nInsertionPoint,
- BOOL bIsPageBack,
- BOOL bIsPageObj);
+ sal_uInt16 nInsertionPoint,
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj);
virtual void PageListChanged();
virtual void MasterPageListChanged();
@@ -680,8 +691,8 @@ private:
DrawDocShell* mpDocShell;
SdDrawDocument* mpDoc;
- BOOL mbIsEnableSetModified;
- BOOL mbIsDocumentChanged;
+ sal_Bool mbIsEnableSetModified;
+ sal_Bool mbIsDocumentChanged;
};
}
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc
index 73189f135e62..89b2b670adf9 100755
--- a/sd/inc/glob.hrc
+++ b/sd/inc/glob.hrc
@@ -154,5 +154,7 @@
#define STR_CUSTOMANIMATIONPANE RID_GLOB_START+227
#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
+#define RID_SLIDESORTER_ICONS RID_GLOB_START+227
+
diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index 77adcd8503eb..20b264651847 100644
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -71,10 +71,10 @@
#define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + 30
// Inventor-Id fuer StarDraw UserData
-const UINT32 SdUDInventor=UINT32('S')*0x00000001+
- UINT32('D')*0x00000100+
- UINT32('U')*0x00010000+
- UINT32('D')*0x01000000;
+const sal_uInt32 SdUDInventor=sal_uInt32('S')*0x00000001+
+ sal_uInt32('D')*0x00000100+
+ sal_uInt32('U')*0x00010000+
+ sal_uInt32('D')*0x01000000;
// Object-Ids fuer StarDraw UserData
#define SD_ANIMATIONINFO_ID 1
diff --git a/sd/inc/helpids.h b/sd/inc/helpids.h
index 9a0bad271409..9056d9eb2051 100644..100755
--- a/sd/inc/helpids.h
+++ b/sd/inc/helpids.h
@@ -25,259 +25,230 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SOLAR_HRC
-#include <svl/solar.hrc>
-#endif
-
-#define HID_SD_PRINT_OPTIONS (HID_SD_START + 0)
-#define HID_SD_OPTIONS_SNAP (HID_SD_START + 1)
-#define HID_SD_OPTIONS_VIEW (HID_SD_START + 2)
-
-#define HID_SD_AUTOPILOT_PAGE1 (HID_SD_START + 3)
-#define HID_SD_AUTOPILOT_PAGE2 (HID_SD_START + 4)
-#define HID_SD_AUTOPILOT_PAGE3 (HID_SD_START + 5)
-#define HID_SD_AUTOPILOT_PAGE4 (HID_SD_START + 6)
-#define HID_SD_AUTOPILOT_PAGE5 (HID_SD_START + 7)
-#define HID_SD_AUTOPILOT_PAGE6 (HID_SD_START + 8)
-
-#define HID_SD_CBX_ONLYSELECTED (HID_SD_START + 9)
-#define HID_SD_BTN_FILTERDIALOG (HID_SD_START + 10)
-
-#define HID_SD_BTN_PAGE (HID_SD_START + 11)
-#define HID_SD_BTN_MASTERPAGE (HID_SD_START + 12)
-#define HID_SD_BTN_LAYER (HID_SD_START + 13)
-
-#define HID_SD_BTN_DRAW (HID_SD_START + 14)
-#define HID_SD_BTN_SLIDE (HID_SD_START + 15)
-#define HID_SD_BTN_OUTLINE (HID_SD_START + 16)
-#define HID_SD_BTN_NOTES (HID_SD_START + 17)
-#define HID_SD_BTN_HANDOUT (HID_SD_START + 18)
-
-#define HID_SD_WIN_DOCUMENT (HID_SD_START + 19)
-
-#define HID_SD_OPTIONS_LAYOUT (HID_SD_START + 20)
-#define HID_SD_OPTIONS_CONTENTS (HID_SD_START + 21)
-#define HID_SD_OPTIONS_MISC (HID_SD_START + 22)
-
-#define HID_SD_EFFECT_PREVIEW (HID_SD_START + 23)
-#define HID_SD_CTL_NEWFOIL (HID_SD_START + 24)
-#define HID_SD_NAVIGATOR_TLB (HID_SD_START + 25)
-#define HID_SD_NAVIGATOR (HID_SD_START + 26)
-
-#define HID_SD_CTL_EFFECTS (HID_SD_START + 27)
-#define HID_SD_CTL_TEXT_EFFECTS (HID_SD_START + 28)
-
-#define HID_SD_CTL_SLIDE_CHANGE (HID_SD_START + 29)
-
-#define HID_SD_NAVIGATOR_TBX (HID_SD_START + 30)
-#define HID_SD_NAVIGATOR_LB (HID_SD_START + 31)
-
-#define HID_SD_NAVIGATOR_TBI_PEN (HID_SD_START + 33)
-#define HID_SD_NAVIGATOR_TBI_FIRST (HID_SD_START + 34)
-#define HID_SD_NAVIGATOR_TBI_PREV (HID_SD_START + 35)
-#define HID_SD_NAVIGATOR_TBI_NEXT (HID_SD_START + 36)
-#define HID_SD_NAVIGATOR_TBI_LAST (HID_SD_START + 37)
-#define HID_SD_NAVIGATOR_TBI_DRAGTYPE (HID_SD_START + 38)
-#define HID_SD_NAVIGATOR_TBI_SHAPE_FILTER (HID_SD_START + 39)
+#include <sfx2/sfxcommands.h>
+#include <svx/svxcommands.h>
+#include "sdcommands.h"
+
+#define HID_SDDRAWVIEWSHELL "SD_HID_SDDRAWVIEWSHELL"
+#define HID_SDGRAPHICVIEWSHELL "SD_HID_SDGRAPHICVIEWSHELL"
+#define HID_SDOUTLINEVIEWSHELL "SD_HID_SDOUTLINEVIEWSHELL"
+#define HID_SD_PRINT_OPTIONS "SD_HID_SD_PRINT_OPTIONS"
+#define HID_SD_OPTIONS_SNAP "SD_HID_SD_OPTIONS_SNAP"
+#define HID_SD_OPTIONS_VIEW "SD_HID_SD_OPTIONS_VIEW"
+#define HID_SD_AUTOPILOT_PAGE1 "SD_HID_SD_AUTOPILOT_PAGE1"
+#define HID_SD_AUTOPILOT_PAGE2 "SD_HID_SD_AUTOPILOT_PAGE2"
+#define HID_SD_AUTOPILOT_PAGE3 "SD_HID_SD_AUTOPILOT_PAGE3"
+#define HID_SD_AUTOPILOT_PAGE4 "SD_HID_SD_AUTOPILOT_PAGE4"
+#define HID_SD_AUTOPILOT_PAGE5 "SD_HID_SD_AUTOPILOT_PAGE5"
+#define HID_SD_AUTOPILOT_PAGE6 "SD_HID_SD_AUTOPILOT_PAGE6"
+#define HID_SD_CBX_ONLYSELECTED "SD_HID_SD_CBX_ONLYSELECTED"
+#define HID_SD_BTN_FILTERDIALOG "SD_HID_SD_BTN_FILTERDIALOG"
+#define HID_SD_BTN_PAGE "SD_HID_SD_BTN_PAGE"
+#define HID_SD_BTN_MASTERPAGE "SD_HID_SD_BTN_MASTERPAGE"
+#define HID_SD_BTN_LAYER "SD_HID_SD_BTN_LAYER"
+#define HID_SD_BTN_DRAW "SD_HID_SD_BTN_DRAW"
+#define HID_SD_BTN_SLIDE "SD_HID_SD_BTN_SLIDE"
+#define HID_SD_BTN_OUTLINE "SD_HID_SD_BTN_OUTLINE"
+#define HID_SD_BTN_NOTES "SD_HID_SD_BTN_NOTES"
+#define HID_SD_BTN_HANDOUT "SD_HID_SD_BTN_HANDOUT"
+#define HID_SD_WIN_DOCUMENT "SD_HID_SD_WIN_DOCUMENT"
+#define HID_SD_OPTIONS_LAYOUT "SD_HID_SD_OPTIONS_LAYOUT"
+#define HID_SD_OPTIONS_CONTENTS "SD_HID_SD_OPTIONS_CONTENTS"
+#define HID_SD_OPTIONS_MISC "SD_HID_SD_OPTIONS_MISC"
+#define HID_SD_EFFECT_PREVIEW "SD_HID_SD_EFFECT_PREVIEW"
+#define HID_SD_CTL_NEWFOIL "SD_HID_SD_CTL_NEWFOIL"
+#define HID_SD_NAVIGATOR_TLB "SD_HID_SD_NAVIGATOR_TLB"
+#define HID_SD_NAVIGATOR "SD_HID_SD_NAVIGATOR"
+#define HID_SD_CTL_EFFECTS "SD_HID_SD_CTL_EFFECTS"
+#define HID_SD_CTL_TEXT_EFFECTS "SD_HID_SD_CTL_TEXT_EFFECTS"
+#define HID_SD_CTL_SLIDE_CHANGE "SD_HID_SD_CTL_SLIDE_CHANGE"
+#define HID_SD_NAVIGATOR_TBX "SD_HID_SD_NAVIGATOR_TBX"
+#define HID_SD_NAVIGATOR_LB "SD_HID_SD_NAVIGATOR_LB"
+#define HID_SD_NAVIGATOR_TBI_PEN "SD_HID_SD_NAVIGATOR_TBI_PEN"
+#define HID_SD_NAVIGATOR_TBI_FIRST "SD_HID_SD_NAVIGATOR_TBI_FIRST"
+#define HID_SD_NAVIGATOR_TBI_PREV "SD_HID_SD_NAVIGATOR_TBI_PREV"
+#define HID_SD_NAVIGATOR_TBI_NEXT "SD_HID_SD_NAVIGATOR_TBI_NEXT"
+#define HID_SD_NAVIGATOR_TBI_LAST "SD_HID_SD_NAVIGATOR_TBI_LAST"
+#define HID_SD_NAVIGATOR_TBI_DRAGTYPE "SD_HID_SD_NAVIGATOR_TBI_DRAGTYPE"
+#define HID_SD_NAVIGATOR_TBI_SHAPE_FILTER "SD_HID_SD_NAVIGATOR_TBI_SHAPE_FILTER"
// Toolboxen
-#define HID_SD_DRAW_DEFAULTTOOLBOX (HID_SD_START + 40)
-#define HID_SD_PLUGINTOOLBOX (HID_SD_START + 41)
-#define HID_SD_DRAW_TOOLBOX (HID_SD_START + 42)
-#define HID_SD_SLIDE_TOOLBOX (HID_SD_START + 43)
-#define HID_SD_OUTLINE_TOOLBOX (HID_SD_START + 44)
-#define HID_SD_DRAW_OBJ_TOOLBOX (HID_SD_START + 45)
-#define HID_SD_DRAW_OPTIONS_TOOLBOX (HID_SD_START + 46)
-#define HID_SD_DRAW_COMMONTASK_TOOLBOX (HID_SD_START + 47)
-#define HID_SD_BEZIER_TOOLBOX (HID_SD_START + 48)
-#define HID_SD_TEXT_TOOLBOX (HID_SD_START + 49)
-#define HID_SD_GLUEPOINTS_TOOLBOX (HID_SD_START + 50)
-#define HID_SD_SLIDE_OBJ_TOOLBOX (HID_SD_START + 51)
+#define HID_SD_DRAW_DEFAULTTOOLBOX "SD_HID_SD_DRAW_DEFAULTTOOLBOX"
+#define HID_SD_PLUGINTOOLBOX "SD_HID_SD_PLUGINTOOLBOX"
+#define HID_SD_DRAW_TOOLBOX "SD_HID_SD_DRAW_TOOLBOX"
+#define HID_SD_SLIDE_TOOLBOX "SD_HID_SD_SLIDE_TOOLBOX"
+#define HID_SD_OUTLINE_TOOLBOX "SD_HID_SD_OUTLINE_TOOLBOX"
+#define HID_SD_DRAW_OBJ_TOOLBOX "SD_HID_SD_DRAW_OBJ_TOOLBOX"
+#define HID_SD_DRAW_OPTIONS_TOOLBOX "SD_HID_SD_DRAW_OPTIONS_TOOLBOX"
+#define HID_SD_DRAW_COMMONTASK_TOOLBOX "SD_HID_SD_DRAW_COMMONTASK_TOOLBOX"
+#define HID_SD_BEZIER_TOOLBOX "SD_HID_SD_BEZIER_TOOLBOX"
+#define HID_SD_TEXT_TOOLBOX "SD_HID_SD_TEXT_TOOLBOX"
+#define HID_SD_GLUEPOINTS_TOOLBOX "SD_HID_SD_GLUEPOINTS_TOOLBOX"
+#define HID_SD_SLIDE_OBJ_TOOLBOX "SD_HID_SD_SLIDE_OBJ_TOOLBOX"
// FloatingWindows
-#define HID_SD_FW_ALIGNMENT (HID_SD_START + 52)
-#define HID_SD_FW_ZOOM (HID_SD_START + 53)
-#define HID_SD_FW_CHOOSE_MODE (HID_SD_START + 54)
-#define HID_SD_FW_TEXT (HID_SD_START + 55)
-#define HID_SD_FW_RECTANGLES (HID_SD_START + 56)
-#define HID_SD_FW_ELLIPSES (HID_SD_START + 57)
-#define HID_SD_FW_LINES (HID_SD_START + 58)
-#define HID_SD_FW_ARROWS (HID_SD_START + 59)
-#define HID_SD_FW_3D_OBJECTS (HID_SD_START + 60)
-#define HID_SD_FW_CONNECTORS (HID_SD_START + 61)
-#define HID_SD_FW_INSERT (HID_SD_START + 62)
-#define HID_SD_FW_POSITION (HID_SD_START + 63)
-
-#define HID_SD_BTN_PREVIEW (HID_SD_START + 64)
-
-#define HID_SD_NAVIGATOR_MENU1 (HID_SD_START + 65)
-#define HID_SD_NAVIGATOR_MENU2 (HID_SD_START + 66)
-#define HID_SD_NAVIGATOR_MENU3 (HID_SD_START + 67)
-
-#define HID_SD_WIN_PRESENTATION (HID_SD_START + 68)
-
-// HelpIDs fuer Vorlagen
-#define HID_STANDARD_STYLESHEET_NAME (HID_SD_START + 70)
-#define HID_POOLSHEET_OBJWITHARROW (HID_SD_START + 71)
-#define HID_POOLSHEET_OBJWITHSHADOW (HID_SD_START + 72)
-#define HID_POOLSHEET_OBJWITHOUTFILL (HID_SD_START + 73)
-#define HID_POOLSHEET_TEXT (HID_SD_START + 74)
-#define HID_POOLSHEET_TEXTBODY (HID_SD_START + 75)
-#define HID_POOLSHEET_TEXTBODY_JUSTIFY (HID_SD_START + 76)
-#define HID_POOLSHEET_TEXTBODY_INDENT (HID_SD_START + 77)
-#define HID_POOLSHEET_TITLE (HID_SD_START + 78)
-#define HID_POOLSHEET_TITLE1 (HID_SD_START + 79)
-#define HID_POOLSHEET_TITLE2 (HID_SD_START + 80)
-#define HID_POOLSHEET_HEADLINE (HID_SD_START + 81)
-#define HID_POOLSHEET_HEADLINE1 (HID_SD_START + 82)
-#define HID_POOLSHEET_HEADLINE2 (HID_SD_START + 83)
-#define HID_POOLSHEET_MEASURE (HID_SD_START + 84)
-
-#define HID_PSEUDOSHEET_TITLE (HID_SD_START + 85)
-#define HID_PSEUDOSHEET_OUTLINE (HID_SD_START + 86)
-#define HID_PSEUDOSHEET_OUTLINE1 (HID_SD_START + 87)
-#define HID_PSEUDOSHEET_OUTLINE2 (HID_SD_START + 88)
-#define HID_PSEUDOSHEET_OUTLINE3 (HID_SD_START + 89)
-#define HID_PSEUDOSHEET_OUTLINE4 (HID_SD_START + 90)
-#define HID_PSEUDOSHEET_OUTLINE5 (HID_SD_START + 91)
-#define HID_PSEUDOSHEET_OUTLINE6 (HID_SD_START + 92)
-#define HID_PSEUDOSHEET_OUTLINE7 (HID_SD_START + 93)
-#define HID_PSEUDOSHEET_OUTLINE8 (HID_SD_START + 94)
-#define HID_PSEUDOSHEET_OUTLINE9 (HID_SD_START + 95)
-#define HID_PSEUDOSHEET_BACKGROUNDOBJECTS (HID_SD_START + 96)
-#define HID_PSEUDOSHEET_BACKGROUND (HID_SD_START + 97)
-#define HID_PSEUDOSHEET_NOTES (HID_SD_START + 98)
-
-#define HID_DLG_DEFINE_CUSTOMSHOW (HID_SD_START + 99)
-#define HID_DLG_DEFINE_CUSTOMSHOW_CTL (HID_SD_START + 100)
-
-#define HID_PSEUDOSHEET_SUBTITLE (HID_SD_START + 101)
-
-#define HID_CTL_ACTION_DLG_1 (HID_SD_START + 102)
-#define HID_CTL_ACTION_DLG_2 (HID_SD_START + 103)
-
-#define HID_SD_BTN_PRESENTATION (HID_SD_START + 104)
-
-#define HID_SD_HTMLEXPORT_PAGE1 (HID_SD_START + 105)
-#define HID_SD_HTMLEXPORT_PAGE2 (HID_SD_START + 106)
-#define HID_SD_HTMLEXPORT_PAGE3 (HID_SD_START + 107)
-#define HID_SD_HTMLEXPORT_PAGE4 (HID_SD_START + 108)
-#define HID_SD_HTMLEXPORT_PAGE5 (HID_SD_START + 109)
-#define HID_SD_HTMLEXPORT_PAGE6 (HID_SD_START + 110)
-
-#define HID_SD_CHGFOIL_LAYOUT (HID_SD_START + 111)
-#define HID_SD_CHGFOIL_BACKGROUND (HID_SD_START + 112)
-#define HID_SD_CHGFOIL_OBJECTS (HID_SD_START + 113)
-#define HID_SD_CHGFOIL_NAME (HID_SD_START + 114)
-
-#define HID_SD_HTMLEXPORT_DLG_DNAME (HID_SD_START + 115)
-
-#define HID_FM_CTL_SELECTION (HID_SD_START + 116)
-
-#define HID_SD_AUTOPILOT_REGION (HID_SD_START + 117)
-#define HID_SD_AUTOPILOT_TEMPLATES (HID_SD_START + 118)
-#define HID_SD_AUTOPILOT_OPEN (HID_SD_START + 119)
-#define HID_SD_AUTOPILOT_PAGETEMPLATES (HID_SD_START + 120)
-
-#define HID_SD_DRAW_GRAF_TOOLBOX (HID_SD_START + 121)
-
-#define HID_SD_FW_GRAFFILTERS (HID_SD_START + 122)
-
-#define HID_SD_TABBAR_PAGES (HID_SD_START + 123)
-#define HID_SD_TABBAR_LAYERS (HID_SD_START + 124)
-
-#define HID_SD_UNDODELETEWARNING_DLG (HID_SD_START + 125)
-#define HID_SD_UNDODELETEWARNING_CBX (HID_SD_START + 126)
-
-#define HID_SD_PAGEOBJSTLB (HID_SD_START + 127)
-
-#define HID_SD_NAMEDIALOG_OBJECT (HID_SD_START + 128)
-#define HID_SD_NAMEDIALOG_PAGE (HID_SD_START + 129)
-#define HID_SD_NAMEDIALOG_LINEEND (HID_SD_START + 130)
-
-#define HID_SD_DRAW_3D_TOOLBOX (HID_SD_START + 131)
-#define HID_SD_DRAW_FONTWORK_TOOLBOX (HID_SD_START + 132)
-
-#define HID_SD_TABPAGE_HEADERFOOTER_SLIDE (HID_SD_START + 133)
-#define HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT (HID_SD_START + 134)
-
-#define HID_SD_DRAW_MEDIA_TOOLBOX (HID_SD_START + 135)
-
-#define HID_SD_TASK_PANE (HID_SD_START + 136)
-#define HID_SD_SLIDE_DESIGNS (HID_SD_START + 137)
-#define HID_SD_CURRENT_MASTERS (HID_SD_START + 138)
-#define HID_SD_RECENT_MASTERS (HID_SD_START + 139)
-#define HID_SD_ALL_MASTERS (HID_SD_START + 140)
-#define HID_SD_SLIDE_LAYOUTS (HID_SD_START + 141)
-#define HID_SD_CUSTOM_ANIMATIONS (HID_SD_START + 142)
-#define HID_SD_SLIDE_TRANSITIONS (HID_SD_START + 143)
-
-#define HID_SD_CUSTOMANIMATIONPANE_PB_ADD_EFFECT (HID_SD_START + 144)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_CHANGE_EFFECT (HID_SD_START + 145)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_REMOVE_EFFECT (HID_SD_START + 146)
-#define HID_SD_CUSTOMANIMATIONPANE_LB_START (HID_SD_START + 147)
-#define HID_SD_CUSTOMANIMATIONPANE_LB_PROPERTY (HID_SD_START + 148)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_PROPERTY_MORE (HID_SD_START + 149)
-#define HID_SD_CUSTOMANIMATIONPANE_CB_SPEED (HID_SD_START + 150)
-#define HID_SD_CUSTOMANIMATIONPANE_CT_CUSTOM_ANIMATION_LIST (HID_SD_START + 151)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_MOVE_UP (HID_SD_START + 152)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_MOVE_DOWN (HID_SD_START + 153)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_PLAY (HID_SD_START + 154)
-#define HID_SD_CUSTOMANIMATIONPANE_PB_SLIDE_SHOW (HID_SD_START + 155)
-#define HID_SD_CUSTOMANIMATIONPANE_CB_AUTOPREVIEW (HID_SD_START + 156)
-
-#define HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES (HID_SD_START + 157)
-#define HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL (HID_SD_START + 158)
-#define HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY (HID_SD_START + 159)
-#define HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW (HID_SD_START + 160)
-#define HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW (HID_SD_START + 161)
-
-#define HID_SD_SLIDETRANSITIONPANE_LB_SLIDE_TRANSITIONS (HID_SD_START + 162)
-#define HID_SD_SLIDETRANSITIONPANE_LB_SPEED (HID_SD_START + 163)
-#define HID_SD_SLIDETRANSITIONPANE_LB_SOUND (HID_SD_START + 164)
-#define HID_SD_SLIDETRANSITIONPANE_CB_LOOP_SOUND (HID_SD_START + 165)
-#define HID_SD_SLIDETRANSITIONPANE_RB_ADVANCE_ON_MOUSE (HID_SD_START + 166)
-#define HID_SD_SLIDETRANSITIONPANE_RB_ADVANCE_AUTO (HID_SD_START + 167)
-#define HID_SD_SLIDETRANSITIONPANE_MF_ADVANCE_AUTO_AFTER (HID_SD_START + 168)
-#define HID_SD_SLIDETRANSITIONPANE_PB_APPLY_TO_ALL (HID_SD_START + 169)
-#define HID_SD_SLIDETRANSITIONPANE_PB_PLAY (HID_SD_START + 170)
-#define HID_SD_SLIDETRANSITIONPANE_PB_SLIDE_SHOW (HID_SD_START + 171)
-#define HID_SD_SLIDETRANSITIONPANE_CB_AUTO_PREVIEW (HID_SD_START + 172)
-
-#define HID_SD_TASK_PANE_VIEW_MENU (HID_SD_START + 173)
-#define HID_SD_TASK_PANE_PREVIEW_CURRENT (HID_SD_START + 174)
-#define HID_SD_TASK_PANE_PREVIEW_RECENT (HID_SD_START + 175)
-#define HID_SD_TASK_PANE_PREVIEW_ALL (HID_SD_START + 176)
-#define HID_SD_TASK_PANE_PREVIEW_LAYOUTS (HID_SD_START + 177)
-
-#define HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE (HID_SD_START + 178)
-#define HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS (HID_SD_START + 179)
-#define HID_SD_CUSTOMANIMATIONDIALOG_EXIT (HID_SD_START + 180)
-#define HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH (HID_SD_START + 181)
-#define HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS (HID_SD_START + 182)
-
-#define HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX (HID_SD_START + 183)
-#define HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX (HID_SD_START + 184)
-#define HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX (HID_SD_START + 185)
-#define HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX (HID_SD_START + 186)
-#define HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX (HID_SD_START + 187)
-#define HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX (HID_SD_START + 188)
-#define HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX (HID_SD_START + 189)
-#define HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX (HID_SD_START + 190)
-
-#define HID_SD_SLIDESHOW_DISPLAY (HID_SD_START + 191)
-
-#define HID_SD_RULER_HORIZONTAL (HID_SD_START + 192)
-#define HID_SD_RULER_VERTICAL (HID_SD_START + 193)
-
-#define HID_SD_CELL_STYLE_DEFAULT (HID_SD_START + 194)
-#define HID_SD_CELL_STYLE_BANDED (HID_SD_START + 195)
-#define HID_SD_CELL_STYLE_HEADER (HID_SD_START + 196)
-#define HID_SD_CELL_STYLE_TOTAL (HID_SD_START + 197)
-#define HID_SD_CELL_STYLE_FIRST_COLUMN (HID_SD_START + 198)
-#define HID_SD_CELL_STYLE_LAST_COLUMN (HID_SD_START + 199)
-
-#define HID_SD_TABLE_DESIGN (HID_SD_START + 200)
-#define HID_SD_ANNOTATIONS (HID_SD_START + 201)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+#define HID_SD_FW_ALIGNMENT "SD_HID_SD_FW_ALIGNMENT"
+#define HID_SD_FW_ZOOM "SD_HID_SD_FW_ZOOM"
+#define HID_SD_FW_CHOOSE_MODE "SD_HID_SD_FW_CHOOSE_MODE"
+#define HID_SD_FW_TEXT "SD_HID_SD_FW_TEXT"
+#define HID_SD_FW_RECTANGLES "SD_HID_SD_FW_RECTANGLES"
+#define HID_SD_FW_ELLIPSES "SD_HID_SD_FW_ELLIPSES"
+#define HID_SD_FW_LINES "SD_HID_SD_FW_LINES"
+#define HID_SD_FW_ARROWS "SD_HID_SD_FW_ARROWS"
+#define HID_SD_FW_3D_OBJECTS "SD_HID_SD_FW_3D_OBJECTS"
+#define HID_SD_FW_CONNECTORS "SD_HID_SD_FW_CONNECTORS"
+#define HID_SD_FW_INSERT "SD_HID_SD_FW_INSERT"
+#define HID_SD_FW_POSITION "SD_HID_SD_FW_POSITION"
+
+#define HID_SD_BTN_PREVIEW "SD_HID_SD_BTN_PREVIEW"
+
+#define HID_SD_NAVIGATOR_MENU1 "SD_HID_SD_NAVIGATOR_MENU1"
+#define HID_SD_NAVIGATOR_MENU2 "SD_HID_SD_NAVIGATOR_MENU2"
+#define HID_SD_NAVIGATOR_MENU3 "SD_HID_SD_NAVIGATOR_MENU3"
+
+#define HID_SD_WIN_PRESENTATION "SD_HID_SD_WIN_PRESENTATION"
+
+#define HID_DLG_DEFINE_CUSTOMSHOW "SD_HID_DLG_DEFINE_CUSTOMSHOW"
+#define HID_DLG_DEFINE_CUSTOMSHOW_CTL "SD_HID_DLG_DEFINE_CUSTOMSHOW_CTL"
+
+#define HID_CTL_ACTION_DLG_1 "SD_HID_CTL_ACTION_DLG_1"
+#define HID_CTL_ACTION_DLG_2 "SD_HID_CTL_ACTION_DLG_2"
+
+#define HID_SD_BTN_PRESENTATION "SD_HID_SD_BTN_PRESENTATION"
+
+#define HID_SD_HTMLEXPORT_PAGE1 "SD_HID_SD_HTMLEXPORT_PAGE1"
+#define HID_SD_HTMLEXPORT_PAGE2 "SD_HID_SD_HTMLEXPORT_PAGE2"
+#define HID_SD_HTMLEXPORT_PAGE3 "SD_HID_SD_HTMLEXPORT_PAGE3"
+#define HID_SD_HTMLEXPORT_PAGE4 "SD_HID_SD_HTMLEXPORT_PAGE4"
+#define HID_SD_HTMLEXPORT_PAGE5 "SD_HID_SD_HTMLEXPORT_PAGE5"
+#define HID_SD_HTMLEXPORT_PAGE6 "SD_HID_SD_HTMLEXPORT_PAGE6"
+
+#define HID_SD_CHGFOIL_LAYOUT "SD_HID_SD_CHGFOIL_LAYOUT"
+#define HID_SD_CHGFOIL_BACKGROUND "SD_HID_SD_CHGFOIL_BACKGROUND"
+#define HID_SD_CHGFOIL_OBJECTS "SD_HID_SD_CHGFOIL_OBJECTS"
+#define HID_SD_CHGFOIL_NAME "SD_HID_SD_CHGFOIL_NAME"
+
+#define HID_SD_HTMLEXPORT_DLG_DNAME "SD_HID_SD_HTMLEXPORT_DLG_DNAME"
+
+#define HID_FM_CTL_SELECTION "SD_HID_FM_CTL_SELECTION"
+
+#define HID_SD_AUTOPILOT_REGION "SD_HID_SD_AUTOPILOT_REGION"
+#define HID_SD_AUTOPILOT_TEMPLATES "SD_HID_SD_AUTOPILOT_TEMPLATES"
+#define HID_SD_AUTOPILOT_OPEN "SD_HID_SD_AUTOPILOT_OPEN"
+#define HID_SD_AUTOPILOT_PAGETEMPLATES "SD_HID_SD_AUTOPILOT_PAGETEMPLATES"
+
+#define HID_SD_DRAW_GRAF_TOOLBOX "SD_HID_SD_DRAW_GRAF_TOOLBOX"
+
+#define HID_SD_FW_GRAFFILTERS "SD_HID_SD_FW_GRAFFILTERS"
+
+#define HID_SD_TABBAR_PAGES "SD_HID_SD_TABBAR_PAGES"
+#define HID_SD_TABBAR_LAYERS "SD_HID_SD_TABBAR_LAYERS"
+
+#define HID_SD_UNDODELETEWARNING_DLG "SD_HID_SD_UNDODELETEWARNING_DLG"
+#define HID_SD_UNDODELETEWARNING_CBX "SD_HID_SD_UNDODELETEWARNING_CBX"
+
+#define HID_SD_PAGEOBJSTLB "SD_HID_SD_PAGEOBJSTLB"
+
+#define HID_SD_NAMEDIALOG_OBJECT "SD_HID_SD_NAMEDIALOG_OBJECT"
+#define HID_SD_NAMEDIALOG_PAGE "SD_HID_SD_NAMEDIALOG_PAGE"
+#define HID_SD_NAMEDIALOG_LINEEND "SD_HID_SD_NAMEDIALOG_LINEEND"
+
+#define HID_SD_DRAW_3D_TOOLBOX "SD_HID_SD_DRAW_3D_TOOLBOX"
+#define HID_SD_DRAW_FONTWORK_TOOLBOX "SD_HID_SD_DRAW_FONTWORK_TOOLBOX"
+
+#define HID_SD_TABPAGE_HEADERFOOTER_SLIDE "SD_HID_SD_TABPAGE_HEADERFOOTER_SLIDE"
+#define HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT "SD_HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT"
+
+#define HID_SD_DRAW_MEDIA_TOOLBOX "SD_HID_SD_DRAW_MEDIA_TOOLBOX"
+
+#define HID_SD_TASK_PANE "SD_HID_SD_TASK_PANE"
+#define HID_SD_SLIDE_DESIGNS "SD_HID_SD_SLIDE_DESIGNS"
+#define HID_SD_CURRENT_MASTERS "SD_HID_SD_CURRENT_MASTERS"
+#define HID_SD_RECENT_MASTERS "SD_HID_SD_RECENT_MASTERS"
+#define HID_SD_ALL_MASTERS "SD_HID_SD_ALL_MASTERS"
+#define HID_SD_SLIDE_LAYOUTS "SD_HID_SD_SLIDE_LAYOUTS"
+#define HID_SD_CUSTOM_ANIMATIONS "SD_HID_SD_CUSTOM_ANIMATIONS"
+#define HID_SD_SLIDE_TRANSITIONS "SD_HID_SD_SLIDE_TRANSITIONS"
+
+#define HID_SD_CUSTOMANIMATIONPANE_PB_ADD_EFFECT "SD_HID_SD_CUSTOMANIMATIONPANE_PB_ADD_EFFECT"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_CHANGE_EFFECT "SD_HID_SD_CUSTOMANIMATIONPANE_PB_CHANGE_EFFECT"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_REMOVE_EFFECT "SD_HID_SD_CUSTOMANIMATIONPANE_PB_REMOVE_EFFECT"
+#define HID_SD_CUSTOMANIMATIONPANE_LB_START "SD_HID_SD_CUSTOMANIMATIONPANE_LB_START"
+#define HID_SD_CUSTOMANIMATIONPANE_LB_PROPERTY "SD_HID_SD_CUSTOMANIMATIONPANE_LB_PROPERTY"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_PROPERTY_MORE "SD_HID_SD_CUSTOMANIMATIONPANE_PB_PROPERTY_MORE"
+#define HID_SD_CUSTOMANIMATIONPANE_CB_SPEED "SD_HID_SD_CUSTOMANIMATIONPANE_CB_SPEED"
+#define HID_SD_CUSTOMANIMATIONPANE_CT_CUSTOM_ANIMATION_LIST "SD_HID_SD_CUSTOMANIMATIONPANE_CT_CUSTOM_ANIMATION_LIST"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_MOVE_UP "SD_HID_SD_CUSTOMANIMATIONPANE_PB_MOVE_UP"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_MOVE_DOWN "SD_HID_SD_CUSTOMANIMATIONPANE_PB_MOVE_DOWN"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_PLAY "SD_HID_SD_CUSTOMANIMATIONPANE_PB_PLAY"
+#define HID_SD_CUSTOMANIMATIONPANE_PB_SLIDE_SHOW "SD_HID_SD_CUSTOMANIMATIONPANE_PB_SLIDE_SHOW"
+#define HID_SD_CUSTOMANIMATIONPANE_CB_AUTOPREVIEW "SD_HID_SD_CUSTOMANIMATIONPANE_CB_AUTOPREVIEW"
+
+#define HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES "SD_HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES"
+#define HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL "SD_HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL"
+#define HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY "SD_HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY"
+#define HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW "SD_HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW"
+#define HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW "SD_HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW"
+
+#define HID_SD_SLIDETRANSITIONPANE_LB_SLIDE_TRANSITIONS "SD_HID_SD_SLIDETRANSITIONPANE_LB_SLIDE_TRANSITIONS"
+#define HID_SD_SLIDETRANSITIONPANE_LB_SPEED "SD_HID_SD_SLIDETRANSITIONPANE_LB_SPEED"
+#define HID_SD_SLIDETRANSITIONPANE_LB_SOUND "SD_HID_SD_SLIDETRANSITIONPANE_LB_SOUND"
+#define HID_SD_SLIDETRANSITIONPANE_CB_LOOP_SOUND "SD_HID_SD_SLIDETRANSITIONPANE_CB_LOOP_SOUND"
+#define HID_SD_SLIDETRANSITIONPANE_RB_ADVANCE_ON_MOUSE "SD_HID_SD_SLIDETRANSITIONPANE_RB_ADVANCE_ON_MOUSE"
+#define HID_SD_SLIDETRANSITIONPANE_RB_ADVANCE_AUTO "SD_HID_SD_SLIDETRANSITIONPANE_RB_ADVANCE_AUTO"
+#define HID_SD_SLIDETRANSITIONPANE_MF_ADVANCE_AUTO_AFTER "SD_HID_SD_SLIDETRANSITIONPANE_MF_ADVANCE_AUTO_AFTER"
+#define HID_SD_SLIDETRANSITIONPANE_PB_APPLY_TO_ALL "SD_HID_SD_SLIDETRANSITIONPANE_PB_APPLY_TO_ALL"
+#define HID_SD_SLIDETRANSITIONPANE_PB_PLAY "SD_HID_SD_SLIDETRANSITIONPANE_PB_PLAY"
+#define HID_SD_SLIDETRANSITIONPANE_PB_SLIDE_SHOW "SD_HID_SD_SLIDETRANSITIONPANE_PB_SLIDE_SHOW"
+#define HID_SD_SLIDETRANSITIONPANE_CB_AUTO_PREVIEW "SD_HID_SD_SLIDETRANSITIONPANE_CB_AUTO_PREVIEW"
+
+#define HID_SD_TASK_PANE_VIEW_MENU "SD_HID_SD_TASK_PANE_VIEW_MENU"
+#define HID_SD_TASK_PANE_PREVIEW_CURRENT "SD_HID_SD_TASK_PANE_PREVIEW_CURRENT"
+#define HID_SD_TASK_PANE_PREVIEW_RECENT "SD_HID_SD_TASK_PANE_PREVIEW_RECENT"
+#define HID_SD_TASK_PANE_PREVIEW_ALL "SD_HID_SD_TASK_PANE_PREVIEW_ALL"
+#define HID_SD_TASK_PANE_PREVIEW_LAYOUTS "SD_HID_SD_TASK_PANE_PREVIEW_LAYOUTS"
+
+#define HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE "SD_HID_SD_CUSTOMANIMATIONDIALOG_ENTRANCE"
+#define HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS "SD_HID_SD_CUSTOMANIMATIONDIALOG_EMPHASIS"
+#define HID_SD_CUSTOMANIMATIONDIALOG_EXIT "SD_HID_SD_CUSTOMANIMATIONDIALOG_EXIT"
+#define HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH "SD_HID_SD_CUSTOMANIMATIONDIALOG_MOTIONPATH"
+#define HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS "SD_HID_SD_CUSTOMANIMATIONDIALOG_MISCEFFECTS"
+
+#define HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_PRESETPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_COLORPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_FONTPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_ROTATIONPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX"
+#define HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX "SD_HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX"
+
+#define HID_SD_SLIDESHOW_DISPLAY "SD_HID_SD_SLIDESHOW_DISPLAY"
+
+#define HID_SD_RULER_HORIZONTAL "SD_HID_SD_RULER_HORIZONTAL"
+#define HID_SD_RULER_VERTICAL "SD_HID_SD_RULER_VERTICAL"
+
+#define HID_SD_TABLE_DESIGN "SD_HID_SD_TABLE_DESIGN"
+#define HID_SD_ANNOTATIONS "SD_HID_SD_ANNOTATIONS"
+
+#define HID_DLG_INSERT_PAGES_OBJS "SD_HID_DLG_INSERT_PAGES_OBJS"
+#define HID_TABPAGE_PARA_NUMBERING "SD_HID_TABPAGE_PARA_NUMBERING"
+#define HID_VECTORIZE_DLG "SD_HID_VECTORIZE_DLG"
+#define HID_UNDO_DELETE_WARNING "SD_HID_UNDO_DELETE_WARNING"
+
+#define HID_MN_SUB_GROUP "SD_HID_MN_SUB_GROUP"
+#define HID_MN_SUB_GRAPHIC "SD_HID_MN_SUB_GRAPHIC"
+#define HID_MN_SUB_SEND "SD_HID_MN_SUB_SEND"
+#define HID_MN_SUB_MASTER_LAYOUTS "SD_HID_MN_SUB_MASTER_LAYOUTS"
+#define HID_MN_SUB_VIEW "SD_HID_MN_SUB_VIEW"
+#define HID_MN_SUB_MASTERPAGE "SD_HID_MN_SUB_MASTERPAGE"
+#define HID_MN_SUB_FIELD "SD_HID_MN_SUB_FIELD"
+#define HID_MN_SUB_TEMPLATES "SD_HID_MN_SUB_TEMPLATES"
+#define HID_MN_SUB_SPELLING "SD_HID_MN_SUB_SPELLING"
+#define HID_MN_SUB_POSITION "SD_HID_MN_SUB_POSITION"
+#define HID_MN_SUB_OUTPUT_QUALITY "SD_HID_MN_SUB_OUTPUT_QUALITY"
+#define HID_MN_SUB_PREVIEW_OUTPUT_QUALITY "SD_HID_MN_SUB_PREVIEW_OUTPUT_QUALITY"
+#define HID_MN_SUB_CONVERT "SD_HID_MN_SUB_CONVERT"
+#define HID_MN_SUB_MIRROR "SD_HID_MN_SUB_MIRROR"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 6b3ed86c68f0..8c8f7f0feba6 100644..100755
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -531,7 +531,6 @@
#include "unotools/pathoptions.hxx"
#include "svl/poolitem.hxx"
#include "svtools/prgsbar.hxx"
-#include "svtools/printdlg.hxx"
#include "svl/ptitem.hxx"
#include "svl/rectitem.hxx"
#include "unotools/saveopt.hxx"
@@ -618,7 +617,6 @@
#include "svx/galbrws.hxx"
#include "svx/gallery.hxx"
#include "svx/globl3d.hxx"
-#include "svx/globlac.hrc"
#include "svx/globlmn.hrc"
#include "svx/grafctrl.hxx"
#include "svx/hlnkitem.hxx"
@@ -864,7 +862,7 @@
#include "vcl/group.hxx"
#include "vcl/help.hxx"
#include "vcl/image.hxx"
-#include "vcl/imagebtn.hxx"
+#include "vcl/button.hxx"
#include "vcl/jobset.hxx"
#include "vcl/lineinfo.hxx"
#include "vcl/lstbox.hxx"
@@ -901,7 +899,7 @@
#include "vcl/virdev.hxx"
#include "vcl/waitobj.hxx"
#include "vcl/window.hxx"
-#include "vcl/wintypes.hxx"
+#include "tools/wintypes.hxx"
#include "vcl/wrkwin.hxx"
#include "osl/diagnose.h"
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 936f0d11dc30..0fb8f600113c 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -81,8 +81,8 @@ public:
class AbstractSdCustomShowDlg : public VclAbstractDialog //add for SdCustomShowDlg
{
public:
- virtual BOOL IsModified() const = 0;
- virtual BOOL IsCustomShow() const = 0;
+ virtual sal_Bool IsModified() const = 0;
+ virtual sal_Bool IsCustomShow() const = 0;
};
class AbstractAssistentDlg : public VclAbstractDialog //add for AssistentDlg
@@ -90,11 +90,11 @@ class AbstractAssistentDlg : public VclAbstractDialog //add for AssistentDlg
public:
virtual SfxObjectShellLock GetDocument() = 0;
virtual OutputType GetOutputMedium() const = 0;
- virtual BOOL IsSummary() const = 0;
+ virtual sal_Bool IsSummary() const = 0;
virtual StartType GetStartType() const = 0;
virtual String GetDocPath() const = 0;
- virtual BOOL GetStartWithFlag() const = 0;
- virtual BOOL IsDocEmpty() const = 0;
+ virtual sal_Bool GetStartWithFlag() const = 0;
+ virtual sal_Bool IsDocEmpty() const = 0;
virtual String GetPassword() = 0;
};
@@ -111,7 +111,7 @@ public:
virtual void GetAttr(SfxItemSet& rOutAttrs) = 0;
virtual void HideRadioGroup() = 0;
virtual void HideDeleteBtn() = 0;
- virtual void SetInputFields(BOOL bEnableX, BOOL bEnableY) = 0;
+ virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY) = 0;
//from class ::Window
virtual void SetText( const XubString& rStr ) = 0;
};
@@ -121,31 +121,31 @@ class AbstractSdInsertLayerDlg : public VclAbstractDialog //add for SdInsertLay
public:
virtual void GetAttr( SfxItemSet& rOutAttrs ) = 0;
//from class ::Window
- virtual void SetHelpId( ULONG nHelpId ) = 0;
+ virtual void SetHelpId( const rtl::OString& rHelpId ) = 0;
};
class AbstractSdInsertPasteDlg : public VclAbstractDialog //add for SdInsertPasteDlg
{
public:
- virtual BOOL IsInsertBefore() const = 0;
+ virtual sal_Bool IsInsertBefore() const = 0;
};
class AbstractSdInsertPagesObjsDlg : public VclAbstractDialog //add for SdInsertPagesObjsDlg
{
public:
virtual ::Window* GetWindow() = 0; //this method is added for return a ::Window type pointer
- virtual List* GetList( USHORT nType ) = 0;
- virtual BOOL IsLink() = 0;
- virtual BOOL IsRemoveUnnessesaryMasterPages() const = 0;
+ virtual List* GetList( sal_uInt16 nType ) = 0;
+ virtual sal_Bool IsLink() = 0;
+ virtual sal_Bool IsRemoveUnnessesaryMasterPages() const = 0;
};
class AbstractMorphDlg : public VclAbstractDialog //add for MorphDlg
{
public:
virtual void SaveSettings() const = 0;
- virtual USHORT GetFadeSteps() const = 0;
- virtual BOOL IsAttributeFade() const = 0;
- virtual BOOL IsOrientationFade() const = 0;
+ virtual sal_uInt16 GetFadeSteps() const = 0;
+ virtual sal_Bool IsAttributeFade() const = 0;
+ virtual sal_Bool IsOrientationFade() const = 0;
};
class AbstractSdStartPresDlg : public VclAbstractDialog //add for SdStartPresentationDlg
@@ -186,12 +186,12 @@ class SdAbstractDialogFactory
public:
static SdAbstractDialogFactory* Create();
- virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, ULONG nSumActionCount, ULONG nObjCount ) = 0;
+ virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount ) = 0;
virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorTable* pColTab, ::sd::View* pView ) = 0;
virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc ) = 0;
virtual SfxAbstractTabDialog* CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell ) = 0;
- virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, BOOL bAreaPage = TRUE ) = 0;
- virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, BOOL bAutoPilot) = 0;
+ virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True ) = 0;
+ virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot) = 0;
virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) = 0;
virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView) = 0;
virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, String aStr ) = 0;
diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx
index 7f055caf633a..3f9b927fd567 100644..100755
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -79,7 +79,7 @@ public:
class SdAttrLayerVisible : public SfxBoolItem
{
public:
- SdAttrLayerVisible( BOOL bValue = TRUE ) :
+ SdAttrLayerVisible( sal_Bool bValue = sal_True ) :
SfxBoolItem( ATTR_LAYER_VISIBLE, bValue ) {}
};
@@ -88,7 +88,7 @@ public:
class SdAttrLayerPrintable : public SfxBoolItem
{
public:
- SdAttrLayerPrintable( BOOL bValue = TRUE ) :
+ SdAttrLayerPrintable( sal_Bool bValue = sal_True ) :
SfxBoolItem( ATTR_LAYER_PRINTABLE, bValue ) {}
};
@@ -97,7 +97,7 @@ public:
class SdAttrLayerLocked : public SfxBoolItem
{
public:
- SdAttrLayerLocked( BOOL bValue = FALSE ) :
+ SdAttrLayerLocked( sal_Bool bValue = sal_False ) :
SfxBoolItem( ATTR_LAYER_LOCKED, bValue ) {}
};
@@ -106,7 +106,7 @@ public:
class SdAttrLayerThisPage : public SfxBoolItem
{
public:
- SdAttrLayerThisPage( BOOL bValue = FALSE ) :
+ SdAttrLayerThisPage( sal_Bool bValue = sal_False ) :
SfxBoolItem( ATTR_LAYER_THISPAGE, bValue ) {}
};
@@ -120,8 +120,8 @@ public:
DiaEffectItem( SvStream& rIn );
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- USHORT GetValueCount() const { return FADE_EFFECT_COUNT; }
+ virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
+ sal_uInt16 GetValueCount() const { return FADE_EFFECT_COUNT; }
::com::sun::star::presentation::FadeEffect GetValue() const
{ return (::com::sun::star::presentation::FadeEffect) SfxEnumItem::GetValue(); }
};
@@ -136,8 +136,8 @@ public:
DiaSpeedItem( SvStream& rIn );
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- USHORT GetValueCount() const { return FADE_SPEED_COUNT; }
+ virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
+ sal_uInt16 GetValueCount() const { return FADE_SPEED_COUNT; }
FadeSpeed GetValue() const
{ return (FadeSpeed) SfxEnumItem::GetValue(); }
};
@@ -152,8 +152,8 @@ public:
DiaAutoItem( SvStream& rIn );
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const;
- USHORT GetValueCount() const { return PRESCHANGE_COUNT; }
+ virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
+ sal_uInt16 GetValueCount() const { return PRESCHANGE_COUNT; }
PresChange GetValue() const { return (PresChange) SfxEnumItem::GetValue(); }
};
@@ -163,7 +163,7 @@ class DiaTimeItem : public SfxUInt32Item
{
public:
TYPEINFO();
- DiaTimeItem( UINT32 nValue = 0L );
+ DiaTimeItem( sal_uInt32 nValue = 0L );
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h
new file mode 100644
index 000000000000..d0c1c059cdbe
--- /dev/null
+++ b/sd/inc/sdcommands.h
@@ -0,0 +1,310 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SD_SDCOMMANDS_HRC
+#define SD_SDCOMMANDS_HRC
+
+#define CMD_SID_OBJECT_MIRROR ".uno:Mirror"
+#define CMD_SID_OBJECT_CHOOSE_MODE ".uno:AdvancedMode"
+#define CMD_SID_ANIMATION_EFFECTS ".uno:AnimationEffects"
+#define CMD_SID_ANIMATION_OBJECTS ".uno:AnimationObjects"
+#define CMD_SID_ANIMATOR_ADD ".uno:AnimatorAddObject"
+#define CMD_SID_ANIMATOR_CREATE ".uno:AnimatorCreateObject"
+#define CMD_SID_ANIMATOR_INIT ".uno:AnimatorInit"
+#define CMD_SID_ANIMATOR_STATE ".uno:AnimatorState"
+#define CMD_SID_DRAWTBX_ARROWS ".uno:ArrowsToolbox"
+#define CMD_SID_MOREBACK ".uno:Backward"
+#define CMD_SID_BEFORE_OBJ ".uno:BeforeObject"
+#define CMD_SID_BEHIND_OBJ ".uno:BehindObject"
+#define CMD_SID_BIG_HANDLES ".uno:BigHandles"
+#define CMD_SID_BREAK ".uno:Break"
+#define CMD_SID_CAPTUREPOINT ".uno:CapturePoint"
+#define CMD_SID_CHANGEBEZIER ".uno:ChangeBezier"
+#define CMD_SID_CHANGEPOLYGON ".uno:ChangePolygon"
+#define CMD_SID_CLICK_CHANGE_ROTATION ".uno:ClickChangeRotation"
+#define CMD_SID_OBJECT_CLOSE ".uno:CloseObject"
+#define CMD_SID_COLORVIEW ".uno:ColorView"
+#define CMD_SID_COMBINE ".uno:Combine"
+#define CMD_SID_3D_CONE ".uno:Cone"
+#define CMD_SID_CONNECT ".uno:Connect"
+#define CMD_SID_TOOL_CONNECTOR ".uno:Connector"
+#define CMD_SID_CONNECTOR_ARROW_END ".uno:ConnectorArrowEnd"
+#define CMD_SID_CONNECTOR_ARROWS ".uno:ConnectorArrows"
+#define CMD_SID_CONNECTOR_ARROW_START ".uno:ConnectorArrowStart"
+#define CMD_SID_CONNECTION_DLG ".uno:ConnectorAttributes"
+#define CMD_SID_CONNECTOR_CIRCLE_END ".uno:ConnectorCircleEnd"
+#define CMD_SID_CONNECTOR_CIRCLES ".uno:ConnectorCircles"
+#define CMD_SID_CONNECTOR_CIRCLE_START ".uno:ConnectorCircleStart"
+#define CMD_SID_CONNECTOR_CURVE ".uno:ConnectorCurve"
+#define CMD_SID_CONNECTOR_CURVE_ARROW_END ".uno:ConnectorCurveArrowEnd"
+#define CMD_SID_CONNECTOR_CURVE_ARROWS ".uno:ConnectorCurveArrows"
+#define CMD_SID_CONNECTOR_CURVE_ARROW_START ".uno:ConnectorCurveArrowStart"
+#define CMD_SID_CONNECTOR_CURVE_CIRCLE_END ".uno:ConnectorCurveCircleEnd"
+#define CMD_SID_CONNECTOR_CURVE_CIRCLES ".uno:ConnectorCurveCircles"
+#define CMD_SID_CONNECTOR_CURVE_CIRCLE_START ".uno:ConnectorCurveCircleStart"
+#define CMD_SID_CONNECTOR_LINE ".uno:ConnectorLine"
+#define CMD_SID_CONNECTOR_LINE_ARROW_END ".uno:ConnectorLineArrowEnd"
+#define CMD_SID_CONNECTOR_LINE_ARROWS ".uno:ConnectorLineArrows"
+#define CMD_SID_CONNECTOR_LINE_ARROW_START ".uno:ConnectorLineArrowStart"
+#define CMD_SID_CONNECTOR_LINE_CIRCLE_END ".uno:ConnectorLineCircleEnd"
+#define CMD_SID_CONNECTOR_LINE_CIRCLES ".uno:ConnectorLineCircles"
+#define CMD_SID_CONNECTOR_LINE_CIRCLE_START ".uno:ConnectorLineCircleStart"
+#define CMD_SID_CONNECTOR_LINES ".uno:ConnectorLines"
+#define CMD_SID_CONNECTOR_LINES_ARROW_END ".uno:ConnectorLinesArrowEnd"
+#define CMD_SID_CONNECTOR_LINES_ARROWS ".uno:ConnectorLinesArrows"
+#define CMD_SID_CONNECTOR_LINES_ARROW_START ".uno:ConnectorLinesArrowStart"
+#define CMD_SID_CONNECTOR_LINES_CIRCLE_END ".uno:ConnectorLinesCircleEnd"
+#define CMD_SID_CONNECTOR_LINES_CIRCLES ".uno:ConnectorLinesCircles"
+#define CMD_SID_CONNECTOR_LINES_CIRCLE_START ".uno:ConnectorLinesCircleStart"
+#define CMD_SID_DRAWTBX_CONNECTORS ".uno:ConnectorToolbox"
+#define CMD_SID_CONVERT_TO_CONTOUR ".uno:convert_to_contour"
+#define CMD_SID_CONVERT_TO_3D ".uno:ConvertInto3D"
+#define CMD_SID_CONVERT_TO_3D_LATHE ".uno:ConvertInto3DLathe"
+#define CMD_SID_CONVERT_TO_3D_LATHE_FAST ".uno:ConvertInto3DLatheFast"
+#define CMD_SID_CONVERT_TO_BITMAP ".uno:ConvertIntoBitmap"
+#define CMD_SID_CONVERT_TO_METAFILE ".uno:ConvertIntoMetaFile"
+#define CMD_SID_CONVERT_TO_1BIT_MATRIX ".uno:ConvertTo1BitMatrix"
+#define CMD_SID_CONVERT_TO_1BIT_THRESHOLD ".uno:ConvertTo1BitThreshold"
+#define CMD_SID_CONVERT_TO_4BIT_COLORS ".uno:ConvertTo4BitColors"
+#define CMD_SID_CONVERT_TO_4BIT_GRAYS ".uno:ConvertTo4BitGrays"
+#define CMD_SID_CONVERT_TO_8BIT_COLORS ".uno:ConvertTo8BitColors"
+#define CMD_SID_CONVERT_TO_8BIT_GRAYS ".uno:ConvertTo8BitGrays"
+#define CMD_SID_CONVERT_TO_24BIT ".uno:ConvertToTrueColor"
+#define CMD_SID_COPYOBJECTS ".uno:CopyObjects"
+#define CMD_SID_OBJECT_CROOK_ROTATE ".uno:CrookRotate"
+#define CMD_SID_OBJECT_CROOK_SLANT ".uno:CrookSlant"
+#define CMD_SID_OBJECT_CROOK_STRETCH ".uno:CrookStretch"
+#define CMD_SID_3D_CUBE ".uno:Cube"
+#define CMD_SID_CUSTOMSHOW_DLG ".uno:CustomShowDialog"
+#define CMD_SID_3D_CYLINDER ".uno:Cylinder"
+#define CMD_SID_3D_PYRAMID ".uno:Cyramid"
+#define CMD_SID_DELETE_LAYER ".uno:DeleteLayer"
+#define CMD_SID_DELETE_PAGE ".uno:DeletePage"
+#define CMD_SID_DELETE_SNAPITEM ".uno:DeleteSnapItem"
+#define CMD_SID_UNSELECT ".uno:DeSelect"
+#define CMD_SID_DIAMODE ".uno:DiaMode"
+#define CMD_SID_DISMANTLE ".uno:Dismantle"
+#define CMD_SID_DOUBLECLICK_TEXTEDIT ".uno:DoubleClickTextEdit"
+#define CMD_SID_DRAWINGMODE ".uno:DrawingMode"
+#define CMD_SID_DUPLICATE_PAGE ".uno:DuplicatePage"
+#define CMD_SID_EDIT_HYPERLINK ".uno:EditHyperlink"
+#define CMD_SID_EDIT_OUTLINER ".uno:EditOutline"
+#define CMD_SID_CUSTOM_ANIMATION_PANEL ".uno:CustomAnimation"
+#define CMD_SID_CUSTOM_ANIMATION_SCHEMES_PANEL ".uno:CustomAnimationSchemes"
+#define CMD_SID_DRAWTBX_ELLIPSES ".uno:EllipseToolbox"
+#define CMD_SID_EXPAND_PAGE ".uno:ExpandPage"
+#define CMD_SID_SETFILLCOLOR ".uno:SetFillColor"
+#define CMD_SID_MOREFRONT ".uno:Forward"
+#define CMD_SID_GETBLUE ".uno:GetBlue"
+#define CMD_SID_GETFILLSTYLE ".uno:GetFillStyle"
+#define CMD_SID_GETGREEN ".uno:GetGreen"
+#define CMD_SID_GETLINESTYLE ".uno:GetLineStyle"
+#define CMD_SID_GETLINEWIDTH ".uno:GetLineWidth"
+#define CMD_SID_GETRED ".uno:GetRed"
+#define CMD_SID_GLUE_EDITMODE ".uno:GlueEditMode"
+#define CMD_SID_GLUE_ESCDIR ".uno:GlueEscapeDirection"
+#define CMD_SID_GLUE_ESCDIR_BOTTOM ".uno:GlueEscapeDirectionBottom"
+#define CMD_SID_GLUE_ESCDIR_LEFT ".uno:GlueEscapeDirectionLeft"
+#define CMD_SID_GLUE_ESCDIR_RIGHT ".uno:GlueEscapeDirectionRight"
+#define CMD_SID_GLUE_ESCDIR_TOP ".uno:GlueEscapeDirectionTop"
+#define CMD_SID_GLUE_HORZALIGN_CENTER ".uno:GlueHorzAlignCenter"
+#define CMD_SID_GLUE_HORZALIGN_LEFT ".uno:GlueHorzAlignLeft"
+#define CMD_SID_GLUE_HORZALIGN_RIGHT ".uno:GlueHorzAlignRight"
+#define CMD_SID_GLUE_INSERT_POINT ".uno:GlueInsertPoint"
+#define CMD_SID_GLUE_PERCENT ".uno:GluePercent"
+#define CMD_SID_GLUE_VERTALIGN_BOTTOM ".uno:GlueVertAlignBottom"
+#define CMD_SID_GLUE_VERTALIGN_CENTER ".uno:GlueVertAlignCenter"
+#define CMD_SID_GLUE_VERTALIGN_TOP ".uno:GlueVertAlignTop"
+#define CMD_SID_GRADIENT ".uno:Gradient"
+#define CMD_SID_SETGRADENDCOLOR ".uno:GradientEndColor"
+#define CMD_SID_SETGRADSTARTCOLOR ".uno:GradientStartColor"
+#define CMD_SID_GRAPHIC_EXPORT ".uno:GraphicExport"
+#define CMD_SID_GRID_FRONT ".uno:GridFront"
+#define CMD_SID_3D_HALF_SPHERE ".uno:HalfSphere"
+#define CMD_SID_HANDLES_DRAFT ".uno:HandlesDraft"
+#define CMD_SID_HANDOUT_MASTERPAGE ".uno:HandoutMasterPage"
+#define CMD_SID_HANDOUTMODE ".uno:HandoutMode"
+#define CMD_SID_HATCH ".uno:Hatch"
+#define CMD_SID_SETHATCHCOLOR ".uno:HatchColor"
+#define CMD_SID_HELPLINES_FRONT ".uno:HelplinesFront"
+#define CMD_SID_HELPLINES_USE ".uno:HelplinesUse"
+#define CMD_SID_HELPLINES_VISIBLE ".uno:HelplinesVisible"
+#define CMD_SID_HIDE_SLIDE ".uno:HideSlide"
+#define CMD_SID_SHOW_SLIDE ".uno:ShowSlide"
+#define CMD_SID_HYPHENATION ".uno:Hyphenation"
+#define CMD_SID_INSERTFILE ".uno:ImportFromFile"
+#define CMD_SID_INSERT_FLD_AUTHOR ".uno:InsertAuthorField"
+#define CMD_SID_INSERT_FLD_DATE_FIX ".uno:InsertDateFieldFix"
+#define CMD_SID_INSERT_FLD_DATE_VAR ".uno:InsertDateFieldVar"
+#define CMD_SID_INSERT_FLD_FILE ".uno:InsertFileField"
+#define CMD_SID_INSERTLAYER ".uno:InsertLayer"
+#define CMD_SID_INSERTPAGE ".uno:InsertPage"
+#define CMD_SID_INSERT_FLD_PAGE ".uno:InsertPageField"
+#define CMD_SID_INSERT_FLD_PAGES ".uno:InsertPagesField"
+#define CMD_SID_INSERTPAGE_QUICK ".uno:InsertPageQuick"
+#define CMD_SID_INSERT_FLD_TIME_FIX ".uno:InsertTimeFieldFix"
+#define CMD_SID_INSERT_FLD_TIME_VAR ".uno:InsertTimeFieldVar"
+#define CMD_SID_DRAWTBX_INSERT ".uno:InsertToolbox"
+#define CMD_SID_OBJECT_GRADIENT ".uno:InteractiveGradient"
+#define CMD_SID_OBJECT_TRANSPARENCE ".uno:InteractiveTransparence"
+#define CMD_SID_LAYERMODE ".uno:LayerMode"
+#define CMD_SID_STATUS_LAYOUT ".uno:LayoutStatus"
+#define CMD_SID_LEAVE_ALL_GROUPS ".uno:LeaveAllGroups"
+#define CMD_SID_LINE_ARROW_CIRCLE ".uno:LineArrowCircle"
+#define CMD_SID_LINE_ARROW_END ".uno:LineArrowEnd"
+#define CMD_SID_LINE_ARROWS ".uno:LineArrows"
+#define CMD_SID_LINE_ARROW_SQUARE ".uno:LineArrowSquare"
+#define CMD_SID_LINE_ARROW_START ".uno:LineArrowStart"
+#define CMD_SID_LINE_CIRCLE_ARROW ".uno:LineCircleArrow"
+#define CMD_SID_SETLINECOLOR ".uno:LineColor"
+#define CMD_SID_LINEEND_POLYGON ".uno:LineEndPolygon"
+#define CMD_SID_LINE_SQUARE_ARROW ".uno:LineSquareArrow"
+#define CMD_SID_LINETO ".uno:LineTo"
+#define CMD_SID_DRAWTBX_LINES ".uno:LineToolbox"
+#define CMD_SID_MANAGE_LINKS ".uno:ManageLinks"
+#define CMD_SID_MASTERPAGE ".uno:MasterPage"
+#define CMD_SID_MEASURE_DLG ".uno:MeasureAttributes"
+#define CMD_SID_DRAW_MEASURELINE ".uno:MeasureLine"
+#define CMD_SID_HORIZONTAL ".uno:MirrorHorz"
+#define CMD_SID_VERTICAL ".uno:MirrorVert"
+#define CMD_SID_MODIFY_FIELD ".uno:ModifyField"
+#define CMD_SID_MODIFYLAYER ".uno:ModifyLayer"
+#define CMD_SID_MODIFYPAGE ".uno:ModifyPage"
+#define CMD_SID_ASSIGN_LAYOUT ".uno:AssignLayout"
+#define CMD_SID_PRESENTATIONOBJECT ".uno:ModifyPresentationObject"
+#define CMD_SID_POLYGON_MORPHING ".uno:Morphing"
+#define CMD_SID_MOVETO ".uno:MoveTo"
+#define CMD_SID_NAME_GROUP ".uno:NameGroup"
+#define CMD_SID_OBJECT_TITLE_DESCRIPTION ".uno:ObjectTitleDescription"
+#define CMD_SID_NAVIGATOR_INIT ".uno:NavigatorInit"
+#define CMD_SID_NAVIGATOR_OBJECT ".uno:NavigatorObject"
+#define CMD_SID_NAVIGATOR_PAGE ".uno:NavigatorPage"
+#define CMD_SID_NAVIGATOR_PAGENAME ".uno:NavigatorPageName"
+#define CMD_SID_NAVIGATOR_PEN ".uno:NavigatorPen"
+#define CMD_SID_NAVIGATOR_STATE ".uno:NavigatorState"
+#define CMD_SID_CONNECTION_NEW_ROUTING ".uno:NewRouting"
+#define CMD_SID_NOTES_MASTERPAGE ".uno:NotesMasterPage"
+#define CMD_SID_NOTESMODE ".uno:NotesMode"
+#define CMD_SID_POSITION ".uno:ObjectPosition"
+#define CMD_SID_DRAWTBX_3D_OBJECTS ".uno:Objects3DToolbox"
+#define CMD_SID_ORIGINAL_SIZE ".uno:OriginalSize"
+#define CMD_SID_SAVEGRAPHIC ".uno:SaveGraphic"
+#define CMD_SID_OUTLINEMODE ".uno:OutlineMode"
+#define CMD_SID_OUTPUT_QUALITY_BLACKWHITE ".uno:OutputQualityBlackWhite"
+#define CMD_SID_OUTPUT_QUALITY_COLOR ".uno:OutputQualityColor"
+#define CMD_SID_OUTPUT_QUALITY_CONTRAST ".uno:OutputQualityContrast"
+#define CMD_SID_OUTPUT_QUALITY_GRAYSCALE ".uno:OutputQualityGrayscale"
+#define CMD_SID_PACKNGO ".uno:PackAndGo"
+#define CMD_SID_PAGEMARGIN ".uno:PageMargin"
+#define CMD_SID_PAGEMODE ".uno:PageMode"
+#define CMD_SID_PAGESETUP ".uno:PageSetup"
+#define CMD_SID_PAGESIZE ".uno:PageSize"
+#define CMD_SID_PAGES_PER_ROW ".uno:PagesPerRow"
+#define CMD_SID_STATUS_PAGE ".uno:PageStatus"
+#define CMD_SID_PARASPACE_DECREASE ".uno:ParaspaceDecrease"
+#define CMD_SID_PARASPACE_INCREASE ".uno:ParaspaceIncrease"
+#define CMD_SID_PICK_THROUGH ".uno:PickThrough"
+#define CMD_SID_DRAW_POLYGON ".uno:Polygon"
+#define CMD_SID_PRESENTATION ".uno:Presentation"
+#define CMD_SID_PRESENTATION_DLG ".uno:PresentationDialog"
+#define CMD_SID_PRESENTATION_END ".uno:PresentationEnd"
+#define CMD_SID_CLEAR_UNDO_STACK ".uno:ClearUndoStack"
+#define CMD_SID_PRESENTATION_LAYOUT ".uno:PresentationLayout"
+#define CMD_SID_PREVIEW_STATE ".uno:PreviewState"
+#define CMD_SID_PREVIEW_WIN ".uno:PreviewWindow"
+#define CMD_SID_QUICKEDIT ".uno:QuickEdit"
+#define CMD_SID_DRAWTBX_RECTANGLES ".uno:RectangleToolbox"
+#define CMD_SID_REHEARSE_TIMINGS ".uno:RehearseTimings"
+#define CMD_SID_RENAMELAYER ".uno:RenameLayer"
+#define CMD_SID_RENAMEPAGE ".uno:RenamePage"
+#define CMD_SID_RENAMEPAGE_QUICK ".uno:RenamePageQuick"
+#define CMD_SID_REVERSE_ORDER ".uno:ReverseOrder"
+#define CMD_SID_RULER_OBJECT ".uno:RulerObject"
+#define CMD_SID_SELECTAT ".uno:SelectAt"
+#define CMD_SID_SELECTGRADIENT ".uno:SelectGradient"
+#define CMD_SID_SELECTHATCH ".uno:SelectHatch"
+#define CMD_SID_SETFILLSTYLE ".uno:SetFillStyle"
+#define CMD_SID_SETLINESTYLE ".uno:SetLineStyle"
+#define CMD_SID_SETLINEWIDTH ".uno:SetLineWidth"
+#define CMD_SID_SET_SNAPITEM ".uno:SetSnapItem"
+#define CMD_SID_OBJECT_SHEAR ".uno:Shear"
+#define CMD_SID_3D_SHELL ".uno:Shell3D"
+#define CMD_SID_SLIDE_TRANSITIONS_PANEL ".uno:SlideChangeWindow"
+#define CMD_SID_SLIDE_MASTERPAGE ".uno:SlideMasterPage"
+#define CMD_SID_SNAP_BORDER ".uno:SnapBorder"
+#define CMD_SID_SNAP_FRAME ".uno:SnapFrame"
+#define CMD_SID_SNAP_POINTS ".uno:SnapPoints"
+#define CMD_SID_SOLID_CREATE ".uno:SolidCreate"
+#define CMD_SID_3D_SPHERE ".uno:Sphere"
+#define CMD_SID_STARTAPP ".uno:StartApplication"
+#define CMD_SID_SUMMARY_PAGE ".uno:SummaryPage"
+#define CMD_SID_SWITCHLAYER ".uno:SwitchLayer"
+#define CMD_SID_SWITCHPAGE ".uno:SwitchPage"
+#define CMD_SID_SWITCH_POINTEDIT ".uno:SwitchPointEdit"
+#define CMD_SID_TEXTALIGNMENT ".uno:TextAlignment"
+#define CMD_SID_TEXTATTR_DLG ".uno:TextAttributes"
+#define CMD_SID_TEXT_FITTOSIZE ".uno:TextFitToSizeTool"
+#define CMD_SID_DRAWTBX_TEXT ".uno:TextToolbox"
+#define CMD_SID_TITLE_MASTERPAGE ".uno:TitleMasterPage"
+#define CMD_SID_3D_TORUS ".uno:Torus"
+#define CMD_SID_TEXT_FITTOSIZE_VERTICAL ".uno:VerticalTextFitToSizeTool"
+#define CMD_SID_ZOOM_PANNING ".uno:ZoomPanning"
+#define CMD_SID_OBJECT_CROP ".uno:Crop"
+#define CMD_SID_HEADER_AND_FOOTER ".uno:HeaderAndFooter"
+#define CMD_SID_INSERT_PAGE_NUMBER ".uno:InsertPageNumber"
+#define CMD_SID_INSERT_DATE_TIME ".uno:InsertDateAndTime"
+#define CMD_SID_MASTER_LAYOUTS ".uno:MasterLayouts"
+#define CMD_SID_DRAW_FONTWORK ".uno:DrawFontwork"
+#define CMD_SID_DRAW_FONTWORK_VERTICAL ".uno:DrawFontworkVertical"
+#define CMD_SID_LAYER_DIALOG_WIN ".uno:LayerDialogChildWindow"
+#define CMD_SID_INSERT_MASTER_PAGE ".uno:InsertMasterPage"
+#define CMD_SID_DELETE_MASTER_PAGE ".uno:DeleteMasterPage"
+#define CMD_SID_RENAME_MASTER_PAGE ".uno:RenameMasterPage"
+#define CMD_SID_CLOSE_MASTER_VIEW ".uno:CloseMasterView"
+#define CMD_SID_SELECT_BACKGROUND ".uno:SelectBackground"
+#define CMD_SID_DISPLAY_MASTER_BACKGROUND ".uno:DisplayMasterBackground"
+#define CMD_SID_DISPLAY_MASTER_OBJECTS ".uno:DisplayMasterObjects"
+#define CMD_SID_TABLE_TOOLBOX ".uno:TableToolBox"
+#define CMD_SID_TABLE_DISTRIBUTE_COLUMNS ".uno:DistributeColumns"
+#define CMD_SID_TABLE_DISTRIBUTE_ROWS ".uno:DistributeRows"
+#define CMD_SID_TP_APPLY_TO_ALL_SLIDES ".uno:TaskPaneApplyToAllSlides"
+#define CMD_SID_TP_APPLY_TO_SELECTED_SLIDES ".uno:TaskPaneApplyToSelectedSlides"
+#define CMD_SID_TP_USE_FOR_NEW_PRESENTATIONS ".uno:TaskPaneUseForNewPresentations"
+#define CMD_SID_TP_SHOW_SMALL_PREVIEW ".uno:TaskPaneShowSmallPreview"
+#define CMD_SID_TP_SHOW_LARGE_PREVIEW ".uno:TaskPaneShowLargePreview"
+#define CMD_SID_TP_EDIT_MASTER ".uno:TaskPaneEditMaster"
+#define CMD_SID_INSERTPAGE_LAYOUT_MENU ".uno:TaskPaneInsertPage"
+#define CMD_SID_SWITCH_SHELL ".uno:SwitchViewShell"
+#define CMD_SID_SWITCH_SHELL_PANE ".uno:SwitchViewShellPane"
+#define CMD_SID_LEFT_PANE_IMPRESS ".uno:LeftPaneImpress"
+#define CMD_SID_LEFT_PANE_DRAW ".uno:LeftPaneDraw"
+#define CMD_SID_RIGHT_PANE ".uno:RightPane"
+#define CMD_SID_NOTES_WINDOW ".uno:NotesChildWindow"
+#define CMD_SID_NORMAL_MULTI_PANE_GUI ".uno:NormalMultiPaneGUI"
+#define CMD_SID_SLIDE_SORTER_MULTI_PANE_GUI ".uno:SlideSorterMultiPaneGUI"
+#define CMD_SID_TASK_PANE ".uno:TaskPaneShowPanel"
+
+#endif
diff --git a/sd/inc/sderror.hxx b/sd/inc/sderror.hxx
index 1eb815eef6e1..e98f419b73b6 100644..100755
--- a/sd/inc/sderror.hxx
+++ b/sd/inc/sderror.hxx
@@ -50,12 +50,12 @@
#ifndef __RSC
-inline bool IsWarning( ULONG nErr )
+inline bool IsWarning( sal_uLong nErr )
{
return 0 != ( nErr & ERRCODE_WARNING_MASK & nErr );
}
-inline bool IsError( ULONG nErr )
+inline bool IsError( sal_uLong nErr )
{
return nErr && 0 == ( ERRCODE_WARNING_MASK & nErr );
}
diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index 83d4eae50800..d9c0446cc98e 100644..100755
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -51,7 +51,7 @@ public:
sal_Bool Export();
static void SaveGraphic( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape );
- static void HandleGraphicFilterError( USHORT nFilterError, ULONG nStreamError = ERRCODE_NONE );
+ static void HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong nStreamError = ERRCODE_NONE );
};
#endif // _SD_SDGRFFILTER_HXX
diff --git a/sd/inc/sdhtmlfilter.hxx b/sd/inc/sdhtmlfilter.hxx
index 28f8df649a10..e2c52c1655d6 100644..100755
--- a/sd/inc/sdhtmlfilter.hxx
+++ b/sd/inc/sdhtmlfilter.hxx
@@ -48,7 +48,7 @@ public:
virtual sal_Bool Export();
private:
- DECL_LINK( IOProgressHdl, USHORT* );
+ DECL_LINK( IOProgressHdl, sal_uInt16* );
};
diff --git a/sd/inc/sdiocmpt.hxx b/sd/inc/sdiocmpt.hxx
index 36fd3eb8e39b..7c25924ff009 100644..100755
--- a/sd/inc/sdiocmpt.hxx
+++ b/sd/inc/sdiocmpt.hxx
@@ -38,17 +38,17 @@ class old_SdrDownCompat
{
protected:
SvStream& rStream;
- UINT32 nSubRecSiz;
- UINT32 nSubRecPos;
- UINT16 nMode;
- BOOL bOpen;
+ sal_uInt32 nSubRecSiz;
+ sal_uInt32 nSubRecPos;
+ sal_uInt16 nMode;
+ sal_Bool bOpen;
protected:
void Read();
void Write();
public:
- old_SdrDownCompat(SvStream& rNewStream, UINT16 nNewMode);
+ old_SdrDownCompat(SvStream& rNewStream, sal_uInt16 nNewMode);
~old_SdrDownCompat();
void OpenSubRecord();
void CloseSubRecord();
@@ -56,20 +56,20 @@ public:
//////////////////////////////////////////////////////////////////////////////
#include "sddllapi.h"
-#define SDIOCOMPAT_VERSIONDONTKNOW (UINT16)0xffff
+#define SDIOCOMPAT_VERSIONDONTKNOW (sal_uInt16)0xffff
class SD_DLLPUBLIC SdIOCompat : public old_SdrDownCompat
{
private:
- UINT16 nVersion;
+ sal_uInt16 nVersion;
public:
// nNewMode: STREAM_READ oder STREAM_WRITE
// nVer: nur beim Schreiben angeben
- SdIOCompat(SvStream& rNewStream, USHORT nNewMode,
- UINT16 nVer = SDIOCOMPAT_VERSIONDONTKNOW);
+ SdIOCompat(SvStream& rNewStream, sal_uInt16 nNewMode,
+ sal_uInt16 nVer = SDIOCOMPAT_VERSIONDONTKNOW);
~SdIOCompat();
- UINT16 GetVersion() const { return nVersion; }
+ sal_uInt16 GetVersion() const { return nVersion; }
};
#endif // _SD_SDIOCMPT_HXX
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 29aad772d6c3..f133e9320317 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -115,13 +115,11 @@ public:
void Execute(SfxRequest& rReq);
void GetState(SfxItemSet&);
- virtual void FillStatusBar(StatusBar& rBar);
-
SdOptions* GetSdOptions(DocumentType eDocType);
SD_DLLPUBLIC SvStorageStreamRef GetOptionStream( const String& rOptionName, SdOptionStreamMode eMode );
- BOOL GetWaterCan() const { return bWaterCan; }
- void SetWaterCan( BOOL bWC ) { bWaterCan = bWC; }
+ sal_Bool GetWaterCan() const { return bWaterCan; }
+ void SetWaterCan( sal_Bool bWC ) { bWaterCan = bWC; }
SvxSearchItem* GetSearchItem() { return (pSearchItem); }
void SetSearchItem(SvxSearchItem* pItem) { pSearchItem = pItem; }
@@ -143,9 +141,9 @@ public:
SD_DLLPUBLIC SvNumberFormatter* GetNumberFormatter();
//virtuelle Methoden fuer den Optionendialog
- virtual SfxItemSet* CreateItemSet( USHORT nId );
- virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
- virtual SfxTabPage* CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet );
+ virtual SfxItemSet* CreateItemSet( sal_uInt16 nId );
+ virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
+ virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
protected:
@@ -154,8 +152,8 @@ protected:
SvxSearchItem* pSearchItem;
SvNumberFormatter* pNumberFormatter;
SvStorageRef xOptionStorage;
- BOOL bAutoSave;
- BOOL bWaterCan;
+ sal_Bool bAutoSave;
+ sal_Bool bWaterCan;
SfxErrorHandler* mpErrorHdl;
/** This device is used for printer independent layout. It is virtual
in the sense that it does not represent a printer. The pointer may
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index a8ae44b9b524..68431d0c82d4 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -126,12 +126,12 @@ protected:
AutoLayout meAutoLayout; // AutoLayout
sd::ShapeList maPresentationShapeList; // Praesentationsobjekte
sd::ScopeLock maLockAutoLayoutArrangement;
- BOOL mbSelected; // Selektionskennung
+ sal_Bool mbSelected; // Selektionskennung
PresChange mePresChange; // manuell/automatisch/halbautomatisch
- UINT32 mnTime; // Anzeigedauer in Sekunden
- BOOL mbSoundOn; // mit/ohne Sound (TRUE/FALSE)
- BOOL mbExcluded; // wird in der Show nicht/doch
- // angezeigt (TRUE/FALSE)
+ sal_uInt32 mnTime; // Anzeigedauer in Sekunden
+ sal_Bool mbSoundOn; // mit/ohne Sound (sal_True/sal_False)
+ sal_Bool mbExcluded; // wird in der Show nicht/doch
+ // angezeigt (sal_True/sal_False)
String maLayoutName; // Name des Layouts
String maSoundFile; // Pfad zum Soundfile (MSDOS-Notation)
bool mbLoopSound;
@@ -139,10 +139,10 @@ protected:
String maCreatedPageName; // von GetPageName erzeugter Seitenname
String maFileName; // Filename
String maBookmarkName; // Bookmarkname
- BOOL mbScaleObjects; // Objekte sollen skaliert werden
- BOOL mbBackgroundFullSize; // Hintergrundobjekt auf ganze Seite darstellen
+ sal_Bool mbScaleObjects; // Objekte sollen skaliert werden
+ sal_Bool mbBackgroundFullSize; // Hintergrundobjekt auf ganze Seite darstellen
rtl_TextEncoding meCharSet; // Text-Encoding
- USHORT mnPaperBin; // PaperBin
+ sal_uInt16 mnPaperBin; // PaperBin
Orientation meOrientation; // Print-Orientation
SdPageLink* mpPageLink; // PageLink (nur bei gelinkten Seiten)
@@ -172,25 +172,25 @@ protected:
public:
TYPEINFO();
- SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, BOOL bMasterPage=FALSE);
+ SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage=sal_False);
SdPage(const SdPage& rSrcPage);
~SdPage();
virtual SdrPage* Clone() const;
virtual SdrPage* Clone(SdrModel* pNewModel) const;
virtual void SetSize(const Size& aSize);
- virtual void SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 Lwr);
- virtual void SetLftBorder(INT32 nBorder);
- virtual void SetRgtBorder(INT32 nBorder);
- virtual void SetUppBorder(INT32 nBorder);
- virtual void SetLwrBorder(INT32 nBorder);
+ virtual void SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 Lwr);
+ virtual void SetLftBorder(sal_Int32 nBorder);
+ virtual void SetRgtBorder(sal_Int32 nBorder);
+ virtual void SetUppBorder(sal_Int32 nBorder);
+ virtual void SetLwrBorder(sal_Int32 nBorder);
virtual void SetModel(SdrModel* pNewModel);
virtual bool IsReadOnly() const;
sd::ShapeList& GetPresentationShapeList() { return maPresentationShapeList; }
void EnsureMasterPageDefaultBackground();
- SdrObject* CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL bInsert=FALSE);
+ SdrObject* CreatePresObj(PresObjKind eObjKind, sal_Bool bVertical, const Rectangle& rRect, sal_Bool bInsert=sal_False);
SdrObject* CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert);
SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false );
PresObjKind GetPresObjKind(SdrObject* pObj) const;
@@ -208,20 +208,20 @@ public:
/** inserts the given SdrObject into the presentation object list */
void InsertPresObj(SdrObject* pObj, PresObjKind eKind );
- void SetAutoLayout(AutoLayout eLayout, BOOL bInit=FALSE, BOOL bCreate=FALSE);
+ void SetAutoLayout(AutoLayout eLayout, sal_Bool bInit=sal_False, sal_Bool bCreate=sal_False);
AutoLayout GetAutoLayout() const { return meAutoLayout; }
- void CreateTitleAndLayout(BOOL bInit=FALSE, BOOL bCreate=FALSE);
+ void CreateTitleAndLayout(sal_Bool bInit=sal_False, sal_Bool bCreate=sal_False);
SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit );
- virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND,
+ virtual void NbcInsertObject(SdrObject* pObj, sal_uLong nPos=CONTAINER_APPEND,
const SdrInsertReason* pReason=NULL);
- virtual SdrObject* NbcRemoveObject(ULONG nObjNum);
- virtual SdrObject* RemoveObject(ULONG nObjNum);
+ virtual SdrObject* NbcRemoveObject(sal_uLong nObjNum);
+ virtual SdrObject* RemoveObject(sal_uLong nObjNum);
// Also overload ReplaceObject methods to realize when
// objects are removed with this mechanism instead of RemoveObject
- virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum);
- virtual SdrObject* ReplaceObject(SdrObject* pNewObj, ULONG nObjNum);
+ virtual SdrObject* NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum);
+ virtual SdrObject* ReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum);
virtual void SetLinkData(const String& rLinkName, const String& rLinkData);
@@ -230,8 +230,8 @@ public:
void SetPageKind(PageKind ePgType) { mePageKind = ePgType; }
PageKind GetPageKind() const { return mePageKind; }
- void SetSelected(BOOL bSel) { mbSelected = bSel; }
- BOOL IsSelected() const { return mbSelected; }
+ void SetSelected(sal_Bool bSel) { mbSelected = bSel; }
+ sal_Bool IsSelected() const { return mbSelected; }
void SetFadeEffect(::com::sun::star::presentation::FadeEffect eNewEffect);
::com::sun::star::presentation::FadeEffect GetFadeEffect() const;
@@ -239,17 +239,17 @@ public:
void SetPresChange(PresChange eChange) { mePresChange = eChange; }
PresChange GetPresChange() const { return mePresChange; }
- void SetTime(UINT32 nNewTime) { mnTime = nNewTime; }
- UINT32 GetTime() const { return mnTime; }
+ void SetTime(sal_uInt32 nNewTime) { mnTime = nNewTime; }
+ sal_uInt32 GetTime() const { return mnTime; }
- void SetSound(BOOL bNewSoundOn) { mbSoundOn = bNewSoundOn; }
- BOOL IsSoundOn() const { return mbSoundOn; }
+ void SetSound(sal_Bool bNewSoundOn) { mbSoundOn = bNewSoundOn; }
+ sal_Bool IsSoundOn() const { return mbSoundOn; }
- void SetExcluded(BOOL bNewExcluded) { mbExcluded = bNewExcluded; }
- BOOL IsExcluded() const { return mbExcluded; }
+ void SetExcluded(sal_Bool bNewExcluded) { mbExcluded = bNewExcluded; }
+ sal_Bool IsExcluded() const { return mbExcluded; }
- void SetScaleObjects(BOOL bScale) { mbScaleObjects = bScale; }
- BOOL IsScaleObjects() const { return mbScaleObjects; }
+ void SetScaleObjects(sal_Bool bScale) { mbScaleObjects = bScale; }
+ sal_Bool IsScaleObjects() const { return mbScaleObjects; }
void SetSoundFile(const String& rStr) { maSoundFile = rStr; }
String GetSoundFile() const { return maSoundFile; }
@@ -292,24 +292,24 @@ public:
void DisconnectLink();
void ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect,
- BOOL bScaleAllObj);
+ sal_Bool bScaleAllObj);
const String& GetName() const;
String GetRealName() const { return FmFormPage::GetName(); };
void SetPresentationLayout(const String& rLayoutName,
- BOOL bReplaceStyleSheets = TRUE,
- BOOL bSetMasterPage = TRUE,
- BOOL bReverseOrder = FALSE);
+ sal_Bool bReplaceStyleSheets = sal_True,
+ sal_Bool bSetMasterPage = sal_True,
+ sal_Bool bReverseOrder = sal_False);
void EndListenOutlineText();
- void SetBackgroundFullSize( BOOL bIn );
- BOOL IsBackgroundFullSize() const { return mbBackgroundFullSize; }
+ void SetBackgroundFullSize( sal_Bool bIn );
+ sal_Bool IsBackgroundFullSize() const { return mbBackgroundFullSize; }
rtl_TextEncoding GetCharSet() { return(meCharSet); }
- void SetPaperBin(USHORT nBin) { mnPaperBin = nBin; }
- USHORT GetPaperBin() const { return mnPaperBin; }
+ void SetPaperBin(sal_uInt16 nBin) { mnPaperBin = nBin; }
+ sal_uInt16 GetPaperBin() const { return mnPaperBin; }
virtual void SetOrientation(Orientation eOrient);
virtual Orientation GetOrientation() const;
diff --git a/sd/inc/sdresid.hxx b/sd/inc/sdresid.hxx
index 617957b6b9e2..b764fc289c71 100644..100755
--- a/sd/inc/sdresid.hxx
+++ b/sd/inc/sdresid.hxx
@@ -35,7 +35,7 @@
class SD_DLLPUBLIC SdResId : public ResId
{
public:
- SdResId(USHORT nId);
+ SdResId(sal_uInt16 nId);
};
#endif /* _SD_SDRESID_HXX */
diff --git a/sd/inc/sdxmlwrp.hxx b/sd/inc/sdxmlwrp.hxx
index 46f534c509b2..1b8c00acff77 100644..100755
--- a/sd/inc/sdxmlwrp.hxx
+++ b/sd/inc/sdxmlwrp.hxx
@@ -50,7 +50,7 @@ public:
::sd::DrawDocShell& rDocShell,
sal_Bool bShowProgress,
SdXMLFilterMode eFilterMode = SDXMLMODE_Normal,
- ULONG nStoreVer = SOFFICE_FILEFORMAT_8 );
+ sal_uLong nStoreVer = SOFFICE_FILEFORMAT_8 );
virtual ~SdXMLFilter (void);
sal_Bool Import( ErrCode& nError );
@@ -58,7 +58,7 @@ public:
private:
SdXMLFilterMode meFilterMode;
- ULONG mnStoreVer;
+ sal_uLong mnStoreVer;
};
#endif // _SDXMLWRP_HXX
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index f2b97694bb5e..680d95cd2710 100644
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -48,8 +48,6 @@ namespace sd
a pointer to the next shape in list or 0*/
SdrObject* removeShape( SdrObject& rObject );
- void replaceShape( SdrObject& rOldObject, SdrObject& rNewObject );
-
/** removes all shapes from this list */
void clear();
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index b92177893fd4..2a7f82ad5f2e 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -131,7 +131,7 @@ public:
protected:
void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily );
- virtual SfxStyleSheetBase* Create(const String& rName, SfxStyleFamily eFamily, USHORT nMask);
+ virtual SfxStyleSheetBase* Create(const String& rName, SfxStyleFamily eFamily, sal_uInt16 nMask);
virtual SfxStyleSheetBase* Create(const SdStyleSheet& rStyle);
using SfxStyleSheetPool::Create;
diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index 633510d7633e..cae4bbdb1066 100644..100755
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -60,19 +60,19 @@ typedef cppu::ImplInheritanceHelper5< SfxUnoStyleSheet,
class SdStyleSheet : public SdStyleSheetBase, private ::cppu::BaseMutex
{
public:
- SdStyleSheet( const rtl::OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, USHORT nMask );
+ SdStyleSheet( const rtl::OUString& rDisplayName, SfxStyleSheetBasePool& rPool, SfxStyleFamily eFamily, sal_uInt16 nMask );
SdStyleSheet( const SdStyleSheet& );
- virtual BOOL SetParent (const String& rParentName);
+ virtual sal_Bool SetParent (const String& rParentName);
virtual SfxItemSet& GetItemSet();
- virtual BOOL IsUsed() const;
- virtual BOOL HasFollowSupport() const;
- virtual BOOL HasParentSupport() const;
- virtual BOOL HasClearParentSupport() const;
- virtual BOOL SetName( const UniString& );
- virtual void SetHelpId( const String& r, ULONG nId );
+ virtual sal_Bool IsUsed() const;
+ virtual sal_Bool HasFollowSupport() const;
+ virtual sal_Bool HasParentSupport() const;
+ virtual sal_Bool HasClearParentSupport() const;
+ virtual sal_Bool SetName( const UniString& );
+ virtual void SetHelpId( const String& r, sal_uLong nId );
- void AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems = TRUE);
+ void AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingItems = sal_True);
SdStyleSheet* GetRealStyleSheet() const;
SdStyleSheet* GetPseudoStyleSheet() const;
@@ -131,7 +131,7 @@ public:
protected:
const SfxItemPropertySimpleEntry* getPropertyMapEntry( const ::rtl::OUString& rPropertyName ) const throw();
- virtual void Load (SvStream& rIn, USHORT nVersion);
+ virtual void Load (SvStream& rIn, sal_uInt16 nVersion);
virtual void Store(SvStream& rOut);
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
diff --git a/sd/inc/undo/undomanager.hxx b/sd/inc/undo/undomanager.hxx
index 9702fff68ac5..68437afe6703 100644..100755
--- a/sd/inc/undo/undomanager.hxx
+++ b/sd/inc/undo/undomanager.hxx
@@ -38,34 +38,24 @@ namespace sd
class UndoManager : public SfxUndoManager
{
public:
- UndoManager( USHORT nMaxUndoActionCount = 20 );
+ UndoManager( sal_uInt16 nMaxUndoActionCount = 20 );
- virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
- virtual void LeaveListAction();
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0);
- virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
-
- bool isInListAction() const { return mnListLevel != 0; }
- bool isInUndo() const { return maIsInUndoLock.isLocked(); }
-
- virtual BOOL Undo( USHORT nCount=1 );
- virtual BOOL Redo( USHORT nCount=1 );
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
/** Set or reset the undo manager linked with the called undo manager.
*/
- void SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager);
+ void SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager);
private:
using SfxUndoManager::Undo;
using SfxUndoManager::Redo;
- int mnListLevel;
- ScopeLock maIsInUndoLock;
-
/** Used when the outline view is visible as a last resort to
synchronize the undo managers.
*/
- SfxUndoManager* mpLinkedUndoManager;
+ ::svl::IUndoManager* mpLinkedUndoManager;
/** Call ClearRedo() at the linked undo manager, when present.
diff --git a/sd/prj/build.lst b/sd/prj/build.lst
index 43af3763a557..291603c7c7d5 100644
--- a/sd/prj/build.lst
+++ b/sd/prj/build.lst
@@ -1,4 +1,4 @@
-sd sd : filter l10n animations svx sfx2 stoc canvas oox NULL
+sd sd : filter L10N:l10n animations svx sfx2 stoc canvas LIBXSLT:libxslt oox NULL
sd sd usr1 - all sd_mkout NULL
sd sd\inc nmake - all sd_inc NULL
sd sd\prj get - all sd_prj NULL
@@ -28,7 +28,7 @@ sd sd\source\ui\slidesorter\controller nmake - all sd_slscontroller sd_sdi sd_i
sd sd\source\ui\slidesorter\cache nmake - all sd_slscache sd_inc NULL
sd sd\source\ui\controller nmake - all sd_controller sd_inc NULL
sd sd\source\ui\notes nmake - all sd_notes sd_inc NULL
-sd sd\source\ui\table nmake - all sd_table sd_inc NULL
+sd sd\source\ui\table nmake - all sd_table sd_sdi sd_inc NULL
sd sd\source\filter\ppt nmake - all sd_ppt sd_inc NULL
sd sd\source\filter nmake - all sd_filt sd_sdi sd_ppt sd_inc NULL
sd sd\source\filter\cgm nmake - all sd_cgm sd_inc NULL
diff --git a/sd/prj/d.lst b/sd/prj/d.lst
index 14f85e982eab..0ebbb9a4eff0 100755
--- a/sd/prj/d.lst
+++ b/sd/prj/d.lst
@@ -55,3 +55,5 @@ mkdir: %_DEST%\inc%_EXT%\sd
..\uiconfig\sdraw\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\statusbar\*.xml
..\uiconfig\simpress\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\statusbar\*.xml
+..\%__SRC%\misc\sd.component %_DEST%\xml%_EXT%\sd.component
+..\%__SRC%\misc\sdd.component %_DEST%\xml%_EXT%\sdd.component
diff --git a/sd/qa/unoapi/knownissues.xcl b/sd/qa/unoapi/knownissues.xcl
index 0f28aebd2890..a47bdb898d4c 100644..100755
--- a/sd/qa/unoapi/knownissues.xcl
+++ b/sd/qa/unoapi/knownissues.xcl
@@ -54,3 +54,10 @@ sd.DrawController_PresentationView::com::sun::star::beans::XPropertySet
### i109518 ###
sd.SdXPresentation::com::sun::star::presentation::XPresentation
sd.SdXPresentation::com::sun::star::beans::XPropertySet
+
+### i113161 ###
+sd.SdLayer::com::sun::star::beans::XPropertySet
+sd.SdLayer::com::sun::star::drawing::Layer
+
+### i113386 ###
+sd.AccessibleDrawDocumentView::com::sun::star::accessibility::XAccessibleComponent
diff --git a/sd/qa/unoapi/sd.sce b/sd/qa/unoapi/sd.sce
index c964c1ba0090..c964c1ba0090 100644..100755
--- a/sd/qa/unoapi/sd.sce
+++ b/sd/qa/unoapi/sd.sce
diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi
index 487f83171fe4..765cc0426fab 100644..100755
--- a/sd/sdi/SlideSorterController.sdi
+++ b/sd/sdi/SlideSorterController.sdi
@@ -85,6 +85,11 @@ interface SlideSorterView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
+ SID_DUPLICATE_PAGE
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetMenuState ;
+ ]
SID_DELETE_PAGE
[
ExecMethod = FuTemporary ;
@@ -232,21 +237,6 @@ interface SlideSorterView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
- /*
- SID_PRINTDOC // ole : no, status : ?
- [
- StateMethod = GetMenuState ;
- ]
- SID_PRINTDOCDIRECT // ole : no, status : ?
- [
- StateMethod = GetMenuState ;
- ]
- SID_SETUPPRINTER // ole : no, status : ?
- [
- StateMethod = GetMenuState ;
- ]
-*/
-
SID_OUTPUT_QUALITY_COLOR // ole : no, status : play rec
[
ExecMethod = ExecCtrl ;
diff --git a/sd/sdi/ToolPanelViewShell.sdi b/sd/sdi/ToolPanelViewShell.sdi
index a72342c52da5..2514f5775e18 100644
--- a/sd/sdi/ToolPanelViewShell.sdi
+++ b/sd/sdi/ToolPanelViewShell.sdi
@@ -24,183 +24,6 @@
*
************************************************************************/
-SfxVoidItem TaskPaneApplyToAllSlides SID_TP_APPLY_TO_ALL_SLIDES
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxVoidItem TaskPaneApplyToSelectedSlides SID_TP_APPLY_TO_SELECTED_SLIDES
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxVoidItem TaskPaneUseForNewPresentations SID_TP_USE_FOR_NEW_PRESENTATIONS
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxVoidItem TaskPaneShowSmallPreview SID_TP_SHOW_SMALL_PREVIEW
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-
-SfxVoidItem TaskPaneShowLargePreview SID_TP_SHOW_LARGE_PREVIEW
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxVoidItem TaskPaneEditMaster SID_TP_EDIT_MASTER
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxVoidItem TaskPaneInsertPage SID_INSERTPAGE_LAYOUT_MENU
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = TRUE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_INSERT;
-]
-
-
interface MasterPagesSelectorInterface
{
SID_TP_APPLY_TO_ALL_SLIDES
diff --git a/sd/sdi/ViewShellBase.sdi b/sd/sdi/ViewShellBase.sdi
index 3602e711db1b..9c1bc7252cfb 100755
--- a/sd/sdi/ViewShellBase.sdi
+++ b/sd/sdi/ViewShellBase.sdi
@@ -25,219 +25,6 @@
*
************************************************************************/
-/** This item holds the requested type of view shell when calling the
- SID_SWITCH_SHELL slot.
-*/
-SfxInt32Item SwitchViewShell SID_SWITCH_SHELL
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-
-/** This item holds the requested pane of the multi pane GUI in which a
- change of the view shell is requested by a call to the SID_SWITCH_SHELL
- slot.
-*/
-SfxInt32Item SwitchViewShellPane SID_SWITCH_SHELL_PANE
-[
- // flags:
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- // config:
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxBoolItem LeftPaneImpress SID_LEFT_PANE_IMPRESS
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_MODIFY;
-]
-
-SfxBoolItem LeftPaneDraw SID_LEFT_PANE_DRAW
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_MODIFY;
-]
-
-SfxVoidItem NotesChildWindow SID_NOTES_WINDOW
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-SfxBoolItem NormalMultiPaneGUI SID_NORMAL_MULTI_PANE_GUI
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_MODIFY;
-]
-
-SfxBoolItem SlideSorterMultiPaneGUI SID_SLIDE_SORTER_MULTI_PANE_GUI
-
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Asynchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_MODIFY;
-]
-
-SfxVoidItem TaskPaneShowPanel SID_SHOW_TOOL_PANEL (
- SfxBoolItem IsPanelVisible ID_VAL_ISVISIBLE,
- SfxUInt32Item PanelId ID_VAL_PANEL_INDEX)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
interface ViewShellBaseView
{
SID_SWITCH_SHELL
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 4ef8e62a6a1a..041dca8b105d 100755
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -324,11 +324,6 @@ interface DrawView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
- SID_INSERT_APPLET // ole : yes, status : ?
- [
- ExecMethod = FuTemporary ;
- StateMethod = GetMenuState ;
- ]
SID_INSERT_PLUGIN // ole : yes, status : ?
[
ExecMethod = FuTemporary ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index fc8f8a9a1984..5e13f85ccdc8 100755
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -6875,3 +6875,394 @@ SfxVoidItem DistributeRows SID_TABLE_DISTRIBUTE_ROWS
ToolBoxConfig = TRUE,
GroupId = GID_TABLE;
]
+
+SfxVoidItem TaskPaneApplyToAllSlides SID_TP_APPLY_TO_ALL_SLIDES
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxVoidItem TaskPaneApplyToSelectedSlides SID_TP_APPLY_TO_SELECTED_SLIDES
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxVoidItem TaskPaneUseForNewPresentations SID_TP_USE_FOR_NEW_PRESENTATIONS
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxVoidItem TaskPaneShowSmallPreview SID_TP_SHOW_SMALL_PREVIEW
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+
+SfxVoidItem TaskPaneShowLargePreview SID_TP_SHOW_LARGE_PREVIEW
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxVoidItem TaskPaneEditMaster SID_TP_EDIT_MASTER
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxVoidItem TaskPaneInsertPage SID_INSERTPAGE_LAYOUT_MENU
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = TRUE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_INSERT;
+]
+
+/** This item holds the requested type of view shell when calling the
+ SID_SWITCH_SHELL slot.
+*/
+SfxInt32Item SwitchViewShell SID_SWITCH_SHELL
+[
+ /* flags: */
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+
+/** This item holds the requested pane of the multi pane GUI in which a
+ change of the view shell is requested by a call to the SID_SWITCH_SHELL
+ slot.
+*/
+SfxInt32Item SwitchViewShellPane SID_SWITCH_SHELL_PANE
+[
+ // flags:
+ AutoUpdate = FALSE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ // config:
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxBoolItem LeftPaneImpress SID_LEFT_PANE_IMPRESS
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+SfxBoolItem LeftPaneDraw SID_LEFT_PANE_DRAW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+SfxVoidItem NotesChildWindow SID_NOTES_WINDOW
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+SfxBoolItem NormalMultiPaneGUI SID_NORMAL_MULTI_PANE_GUI
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+SfxBoolItem SlideSorterMultiPaneGUI SID_SLIDE_SORTER_MULTI_PANE_GUI
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_MODIFY;
+]
+
+SfxVoidItem TaskPaneShowPanel SID_SHOW_TOOL_PANEL (
+ SfxBoolItem IsPanelVisible ID_VAL_ISVISIBLE,
+ SfxUInt32Item PanelId ID_VAL_PANEL_INDEX)
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = TRUE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index cedce0f46e22..464cbfb3d719 100644..100755
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -219,8 +219,8 @@ Reference< XAnimationNode > CustomAnimationPreset::create( const rtl::OUString&
UStringList CustomAnimationPreset::getProperties() const
{
String aProperties( maProperty );
- USHORT nTokens = aProperties.GetTokenCount();
- USHORT nToken;
+ sal_uInt16 nTokens = aProperties.GetTokenCount();
+ sal_uInt16 nToken;
UStringList aPropertyList;
for( nToken = 0; nToken < nTokens; nToken++ )
aPropertyList.push_back( aProperties.GetToken( nToken ) );
@@ -233,8 +233,8 @@ bool CustomAnimationPreset::hasProperty( const OUString& rProperty )const
{
String aProperties( maProperty );
String aProperty( rProperty );
- USHORT nTokens = aProperties.GetTokenCount();
- USHORT nToken;
+ sal_uInt16 nTokens = aProperties.GetTokenCount();
+ sal_uInt16 nToken;
for( nToken = 0; nToken < nTokens; nToken++ )
{
if( aProperties.GetToken( nToken ) == aProperty )
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index 4502892eac10..9de84eeb217b 100644..100755
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -51,18 +51,18 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
meEffect (presentation::AnimationEffect_NONE),
meTextEffect (presentation::AnimationEffect_NONE),
meSpeed (presentation::AnimationSpeed_SLOW),
- mbActive (TRUE),
- mbDimPrevious (FALSE),
- mbIsMovie (FALSE),
- mbDimHide (FALSE),
- mbSoundOn (FALSE),
- mbPlayFull (FALSE),
+ mbActive (sal_True),
+ mbDimPrevious (sal_False),
+ mbIsMovie (sal_False),
+ mbDimHide (sal_False),
+ mbSoundOn (sal_False),
+ mbPlayFull (sal_False),
mpPathObj (NULL),
meClickAction (presentation::ClickAction_NONE),
meSecondEffect (presentation::AnimationEffect_NONE),
meSecondSpeed (presentation::AnimationSpeed_SLOW),
- mbSecondSoundOn (FALSE),
- mbSecondPlayFull (FALSE),
+ mbSecondSoundOn (sal_False),
+ mbSecondPlayFull (sal_False),
mnVerb (0),
mnPresOrder (LIST_APPEND),
mrObject (rObject)
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index efc958005bc0..72fe6ddb18fb 100644
--- a/sd/source/core/cusshow.cxx
+++ b/sd/source/core/cusshow.cxx
@@ -107,7 +107,7 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage )
}
else
{
- ULONG nPos;
+ sal_uLong nPos;
while( (nPos = GetPos( (void*)pOldPage )) != CONTAINER_ENTRY_NOTFOUND )
{
Replace( (void*)pNewPage, nPos );
@@ -117,7 +117,7 @@ void SdCustomShow::ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage )
void SdCustomShow::RemovePage( const SdPage* pPage )
{
- ULONG nPos;
+ sal_uLong nPos;
while( (nPos = GetPos( (void*)pPage )) != CONTAINER_ENTRY_NOTFOUND )
{
Remove( nPos );
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index a299f2f34b4a..1551403c82fd 100644..100755
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -160,15 +160,15 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
, mpCustomShowList(NULL)
, mpDocSh(static_cast< ::sd::DrawDocShell*>(pDrDocSh))
, mpCreatingTransferable( NULL )
-, mbHasOnlineSpellErrors(FALSE)
-, mbInitialOnlineSpellingEnabled(TRUE)
-, mbNewOrLoadCompleted(FALSE)
+, mbHasOnlineSpellErrors(sal_False)
+, mbInitialOnlineSpellingEnabled(sal_True)
+, mbNewOrLoadCompleted(sal_False)
, mbStartWithPresentation( false )
, meLanguage( LANGUAGE_SYSTEM )
, meLanguageCJK( LANGUAGE_SYSTEM )
, meLanguageCTL( LANGUAGE_SYSTEM )
, mePageNumType(SVX_ARABIC)
-, mbAllocDocSh(FALSE)
+, mbAllocDocSh(sal_False)
, meDocType(eType)
, mpCharClass(NULL)
, mpLocale(NULL)
@@ -184,11 +184,11 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
if (mpDocSh)
{
- SetSwapGraphics(TRUE);
+ SetSwapGraphics(sal_True);
}
// Masseinheit (von App) und Massstab (von SdMod) setzen
- INT32 nX, nY;
+ sal_Int32 nX, nY;
SdOptions* pOptions = SD_MOD()->GetSdOptions(meDocType);
pOptions->GetScale( nX, nY );
@@ -248,12 +248,12 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
// for korean and japanese languages we have a different default for apply spacing between asian, latin and ctl text
if( ( LANGUAGE_KOREAN == eRealCTLLanguage ) || ( LANGUAGE_KOREAN_JOHAB == eRealCTLLanguage ) || ( LANGUAGE_JAPANESE == eRealCTLLanguage ) )
{
- GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( FALSE, EE_PARA_ASIANCJKSPACING ) );
+ GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) );
}
// DefTab und SpellOptions setzen
// Jetzt am Modul (SD)
- USHORT nDefTab = pOptions->GetDefTab();
+ sal_uInt16 nDefTab = pOptions->GetDefTab();
SetDefaultTabulator( nDefTab );
try
@@ -280,7 +280,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
SetLinkManager( new sfx2::LinkManager(mpDocSh) );
}
- ULONG nCntrl = rOutliner.GetControlWord();
+ sal_uLong nCntrl = rOutliner.GetControlWord();
nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
nCntrl |= EE_CNTRL_URLSFXEXECUTE;
@@ -329,7 +329,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguage() );
- ULONG nCntrl2 = pHitTestOutliner->GetControlWord();
+ sal_uLong nCntrl2 = pHitTestOutliner->GetControlWord();
nCntrl2 |= EE_CNTRL_ALLOWBIGOBJS;
nCntrl2 |= EE_CNTRL_URLSFXEXECUTE;
nCntrl2 &= ~EE_CNTRL_ONLINESPELLING;
@@ -345,7 +345,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
*
* Es werden auf Pages und MasterPages folgende Default-Layer angelegt:
*
- * Layer STR_LAYOUT : Standardlayer fr alle Zeichenobjekte
+ * Layer STR_LAYOUT : Standardlayer f�r alle Zeichenobjekte
*
* Layer STR_BCKGRND : Hintergrund der MasterPage
* (auf normalen Pages z.Z. keine Verwendung)
@@ -353,7 +353,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
* Layer STR_BCKGRNDOBJ: Objekte auf dem Hintergrund der MasterPage
* (auf normalen Pages z.Z. keine Verwendung)
*
- * Layer STR_CONTROLS : Standardlayer fr Controls
+ * Layer STR_CONTROLS : Standardlayer f�r Controls
*
**************************************************************************/
{
@@ -396,7 +396,7 @@ SdDrawDocument::~SdDrawDocument()
mpOnlineSearchItem = NULL;
CloseBookmarkDoc();
- SetAllocDocSh(FALSE);
+ SetAllocDocSh(sal_False);
ClearModel(sal_True);
@@ -414,7 +414,7 @@ SdDrawDocument::~SdDrawDocument()
::sd::FrameView* pFrameView = NULL;
- for (ULONG i = 0; i < mpFrameViewList->Count(); i++)
+ for (sal_uLong i = 0; i < mpFrameViewList->Count(); i++)
{
// Ggf. FrameViews loeschen
pFrameView =
@@ -429,7 +429,7 @@ SdDrawDocument::~SdDrawDocument()
if (mpCustomShowList)
{
- for (ULONG j = 0; j < mpCustomShowList->Count(); j++)
+ for (sal_uLong j = 0; j < mpCustomShowList->Count(); j++)
{
// Ggf. CustomShows loeschen
SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(j);
@@ -473,10 +473,10 @@ SdrModel* SdDrawDocument::AllocModel() const
if( meDocType == DOCUMENT_TYPE_IMPRESS )
mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell(
- SFX_CREATE_MODE_EMBEDDED, TRUE, meDocType ) );
+ SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType ) );
else
mpCreatingTransferable->SetDocShell( new ::sd::GraphicDocShell(
- SFX_CREATE_MODE_EMBEDDED, TRUE, meDocType ) );
+ SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType ) );
pNewDocSh = static_cast< ::sd::DrawDocShell*>( pObj = mpCreatingTransferable->GetDocShell() );
pNewDocSh->DoInitNew( NULL );
@@ -492,7 +492,7 @@ SdrModel* SdDrawDocument::AllocModel() const
pNewStylePool->CopyTableStyles(*pOldStylePool);
- for (USHORT i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++)
+ for (sal_uInt16 i = 0; i < GetMasterSdPageCount(PK_STANDARD); i++)
{
// Alle Layouts der MasterPage mitnehmen
String aOldLayoutName(((SdDrawDocument*) this)->GetMasterSdPage(i, PK_STANDARD)->GetLayoutName());
@@ -507,9 +507,9 @@ SdrModel* SdDrawDocument::AllocModel() const
{
// Es wird eine DocShell erzeugt, welche mit GetAllocedDocSh() zurueckgegeben wird
SdDrawDocument* pDoc = (SdDrawDocument*) this;
- pDoc->SetAllocDocSh(FALSE);
+ pDoc->SetAllocDocSh(sal_False);
pDoc->mxAllocedDocShRef = new ::sd::DrawDocShell(
- SFX_CREATE_MODE_EMBEDDED, TRUE, meDocType);
+ SFX_CREATE_MODE_EMBEDDED, sal_True, meDocType);
pDoc->mxAllocedDocShRef->DoInitNew(NULL);
pNewModel = pDoc->mxAllocedDocShRef->GetDoc();
}
@@ -601,9 +601,9 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
CheckMasterPages();
if ( GetMasterSdPageCount(PK_STANDARD) > 1 )
- RemoveUnnecessaryMasterPages( NULL, TRUE, FALSE );
+ RemoveUnnecessaryMasterPages( NULL, sal_True, sal_False );
- for ( USHORT i = 0; i < GetPageCount(); i++ )
+ for ( sal_uInt16 i = 0; i < GetPageCount(); i++ )
{
// Check for correct layout names
SdPage* pPage = (SdPage*) GetPage( i );
@@ -619,7 +619,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
}
}
- for ( USHORT nPage = 0; nPage < GetMasterPageCount(); nPage++)
+ for ( sal_uInt16 nPage = 0; nPage < GetMasterPageCount(); nPage++)
{
// LayoutName and PageName must be the same
SdPage* pPage = (SdPage*) GetMasterPage( nPage );
@@ -650,7 +650,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// dokumentspezifisch wie StyleSheetPool und StyleRequestHandler
::Outliner& rDrawOutliner = GetDrawOutliner();
rDrawOutliner.SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
- ULONG nCntrl = rDrawOutliner.GetControlWord();
+ sal_uLong nCntrl = rDrawOutliner.GetControlWord();
if (mbOnlineSpell)
nCntrl |= EE_CNTRL_ONLINESPELLING;
else
@@ -676,7 +676,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
// Praesentationsobjekte muessen wieder Listener der entsprechenden
// Vorlagen werden
SdStyleSheetPool* pSPool = (SdStyleSheetPool*) GetStyleSheetPool();
- USHORT nPage, nPageCount;
+ sal_uInt16 nPage, nPageCount;
// create missing layout style sheets for broken documents
// that where created with the 5.2
@@ -703,15 +703,15 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
}
}
- mbNewOrLoadCompleted = TRUE;
+ mbNewOrLoadCompleted = sal_True;
/**************************************************************************
* Alle gelinkten Pages aktualisieren
**************************************************************************/
SdPage* pPage = NULL;
- USHORT nMaxSdPages = GetSdPageCount(PK_STANDARD);
+ sal_uInt16 nMaxSdPages = GetSdPageCount(PK_STANDARD);
- for (USHORT nSdPage=0; nSdPage < nMaxSdPages; nSdPage++)
+ for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++)
{
pPage = (SdPage*) GetSdPage(nSdPage, PK_STANDARD);
@@ -723,7 +723,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
UpdateAllLinks();
- SetChanged( FALSE );
+ SetChanged( sal_False );
}
/** updates all links, only links in this document should by resolved */
@@ -766,16 +766,16 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if (pObj->GetObjInventor() == SdrInventor)
{
OutlinerParaObject* pOPO = pObj->GetOutlinerParaObject();
- UINT16 nId = pObj->GetObjIdentifier();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
if (nId == OBJ_TITLETEXT)
{
if( pOPO && pOPO->GetOutlinerMode() == OUTLINERMODE_DONTKNOW )
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
- // TRUE: harte Attribute dabei nicht loeschen
+ // sal_True: harte Attribute dabei nicht loeschen
if (pTitleSheet)
- pObj->SetStyleSheet(pTitleSheet, TRUE);
+ pObj->SetStyleSheet(pTitleSheet, sal_True);
}
else if (nId == OBJ_OUTLINETEXT)
{
@@ -793,7 +793,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if( iter == aOutlineList.begin())
// Textrahmen hoert auf StyleSheet der Ebene1
- pObj->NbcSetStyleSheet(pSheet, TRUE);
+ pObj->NbcSetStyleSheet(pSheet, sal_True);
}
}
}
@@ -805,9 +805,9 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
if (aString.Len())
{
- sd::Outliner* pInternalOutl = GetInternalOutliner(TRUE);
+ sd::Outliner* pInternalOutl = GetInternalOutliner(sal_True);
pPage->SetObjText( (SdrTextObj*) pObj, pInternalOutl, ePresObjKind, aString );
- pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), TRUE );
+ pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( ePresObjKind ), sal_True );
pInternalOutl->Clear();
}
}
@@ -825,7 +825,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
|*
\************************************************************************/
-::sd::Outliner* SdDrawDocument::GetOutliner(BOOL bCreateOutliner)
+::sd::Outliner* SdDrawDocument::GetOutliner(sal_Bool bCreateOutliner)
{
if (!mpOutliner && bCreateOutliner)
{
@@ -850,7 +850,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
|*
\************************************************************************/
-::sd::Outliner* SdDrawDocument::GetInternalOutliner(BOOL bCreateOutliner)
+::sd::Outliner* SdDrawDocument::GetInternalOutliner(sal_Bool bCreateOutliner)
{
if ( !mpInternalOutliner && bCreateOutliner )
{
@@ -858,9 +858,9 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
// MT:
// Dieser Outliner wird nur fuer das Erzeugen spezieller Textobjekte
// verwendet. Da in diesen Textobjekten keine Portion-Informationen
- // gespeichert werden muessen, kann/soll der Update-Mode immer FALSE bleiben.
- mpInternalOutliner->SetUpdateMode( FALSE );
- mpInternalOutliner->EnableUndo( FALSE );
+ // gespeichert werden muessen, kann/soll der Update-Mode immer sal_False bleiben.
+ mpInternalOutliner->SetUpdateMode( sal_False );
+ mpInternalOutliner->EnableUndo( sal_False );
if (mpDocSh)
mpInternalOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
@@ -869,8 +869,8 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
mpInternalOutliner->SetStyleSheetPool((SfxStyleSheetPool*)GetStyleSheetPool());
}
- DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->GetUpdateMode() == FALSE ) , "InternalOutliner: UpdateMode = TRUE !" );
- DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->IsUndoEnabled() == FALSE ), "InternalOutliner: Undo = TRUE !" );
+ DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->GetUpdateMode() == sal_False ) , "InternalOutliner: UpdateMode = sal_True !" );
+ DBG_ASSERT( !mpInternalOutliner || ( mpInternalOutliner->IsUndoEnabled() == sal_False ), "InternalOutliner: Undo = sal_True !" );
// MT: Wer ihn vollmuellt, macht ihn auch gleich wieder leer:
// Vorteile:
@@ -887,10 +887,10 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
|*
\************************************************************************/
-void SdDrawDocument::SetOnlineSpell(BOOL bIn)
+void SdDrawDocument::SetOnlineSpell(sal_Bool bIn)
{
mbOnlineSpell = bIn;
- ULONG nCntrl = 0;
+ sal_uLong nCntrl = 0;
if(mpOutliner)
{
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 63d14f9b9732..96ccc779b0cb 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -101,8 +101,8 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const
/**************************************************************************
* Zuerst alle Pages durchsuchen
**************************************************************************/
- USHORT nPage = 0;
- const USHORT nMaxPages = GetPageCount();
+ sal_uInt16 nPage = 0;
+ const sal_uInt16 nMaxPages = GetPageCount();
while (nPage < nMaxPages && !pObjFound)
{
@@ -129,7 +129,7 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const
* Wenn nicht gefunden, dann alle MasterPages durchsuchen
**************************************************************************/
nPage = 0;
- const USHORT nMaxMasterPages = GetMasterPageCount();
+ const sal_uInt16 nMaxMasterPages = GetMasterPageCount();
while (nPage < nMaxMasterPages && !pObjFound)
{
@@ -162,14 +162,14 @@ SdrObject* SdDrawDocument::GetObj(const String& rObjName) const
|*
\************************************************************************/
-USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage) const
+sal_uInt16 SdDrawDocument::GetPageByName(const String& rPgName, sal_Bool& rbIsMasterPage) const
{
SdPage* pPage = NULL;
- USHORT nPage = 0;
- const USHORT nMaxPages = GetPageCount();
- USHORT nPageNum = SDRPAGE_NOTFOUND;
+ sal_uInt16 nPage = 0;
+ const sal_uInt16 nMaxPages = GetPageCount();
+ sal_uInt16 nPageNum = SDRPAGE_NOTFOUND;
- rbIsMasterPage = FALSE;
+ rbIsMasterPage = sal_False;
// Search all regular pages and all notes pages (handout pages are
// ignored.)
@@ -189,7 +189,7 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage
}
// Search all master pages when not found among non-master pages.
- const USHORT nMaxMasterPages = GetMasterPageCount();
+ const sal_uInt16 nMaxMasterPages = GetMasterPageCount();
nPage = 0;
while (nPage < nMaxMasterPages && nPageNum == SDRPAGE_NOTFOUND)
@@ -200,7 +200,7 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage
if (pPage && pPage->GetName() == rPgName)
{
nPageNum = nPage;
- rbIsMasterPage = TRUE;
+ rbIsMasterPage = sal_True;
}
nPage++;
@@ -209,22 +209,22 @@ USHORT SdDrawDocument::GetPageByName(const String& rPgName, BOOL& rbIsMasterPage
return nPageNum;
}
-SdPage* SdDrawDocument::GetSdPage(USHORT nPgNum, PageKind ePgKind) const
+SdPage* SdDrawDocument::GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
{
return mpDrawPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum));
}
-USHORT SdDrawDocument::GetSdPageCount(PageKind ePgKind) const
+sal_uInt16 SdDrawDocument::GetSdPageCount(PageKind ePgKind) const
{
return (sal_uInt16)mpDrawPageListWatcher->GetSdPageCount(ePgKind);
}
-SdPage* SdDrawDocument::GetMasterSdPage(USHORT nPgNum, PageKind ePgKind)
+SdPage* SdDrawDocument::GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
{
return mpMasterPageListWatcher->GetSdPage(ePgKind, sal_uInt32(nPgNum));
}
-USHORT SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const
+sal_uInt16 SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const
{
return (sal_uInt16)mpMasterPageListWatcher->GetSdPageCount(ePgKind);
}
@@ -236,12 +236,12 @@ USHORT SdDrawDocument::GetMasterSdPageCount(PageKind ePgKind) const
|*
\************************************************************************/
-void SdDrawDocument::UpdatePageObjectsInNotes(USHORT nStartPos)
+void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
{
- USHORT nPageCount = GetPageCount();
+ sal_uInt16 nPageCount = GetPageCount();
SdPage* pPage = NULL;
- for (USHORT nPage = nStartPos; nPage < nPageCount; nPage++)
+ for (sal_uInt16 nPage = nStartPos; nPage < nPageCount; nPage++)
{
pPage = (SdPage*)GetPage(nPage);
@@ -249,9 +249,9 @@ void SdDrawDocument::UpdatePageObjectsInNotes(USHORT nStartPos)
// und Nummer korrigieren
if (pPage && pPage->GetPageKind() == PK_NOTES)
{
- ULONG nObjCount = pPage->GetObjCount();
+ sal_uLong nObjCount = pPage->GetObjCount();
SdrObject* pObj = NULL;
- for (ULONG nObj = 0; nObj < nObjCount; nObj++)
+ for (sal_uLong nObj = 0; nObj < nObjCount; nObj++)
{
pObj = pPage->GetObj(nObj);
if (pObj->GetObjIdentifier() == OBJ_PAGE &&
@@ -277,10 +277,10 @@ void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String
return;
SfxItemPool& pPool(GetPool());
- USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
- for (USHORT nOff = 0; nOff < nCount; nOff++)
+ sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
+ for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
{
- const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+ const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem);
if(pFldItem)
@@ -317,15 +317,15 @@ void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String
}
}
-void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement)
+void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_Int32 nIncrement)
{
bool bNotes = (pPage->GetPageKind() == PK_NOTES);
SfxItemPool& pPool(GetPool());
- USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
- for (USHORT nOff = 0; nOff < nCount; nOff++)
+ sal_uInt32 nCount = pPool.GetItemCount2(EE_FEATURE_FIELD);
+ for (sal_uInt32 nOff = 0; nOff < nCount; nOff++)
{
- const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+ const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem;
if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0)
@@ -357,7 +357,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int3
aURLCopy.Erase(aURLCopy.Len() - sNotes.Len(), sNotes.Len());
sal_Int32 number = aURLCopy.ToInt32();
- USHORT realPageNumber = (nPos + 1)/ 2;
+ sal_uInt16 realPageNumber = (nPos + 1)/ 2;
if ( number >= realPageNumber )
{
@@ -385,12 +385,12 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int3
|*
\************************************************************************/
-void SdDrawDocument::MovePage(USHORT nPgNum, USHORT nNewPos)
+void SdDrawDocument::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
// Seite verschieben
FmFormModel::MovePage(nPgNum, nNewPos);
- USHORT nMin = Min(nPgNum, nNewPos);
+ sal_uInt16 nMin = Min(nPgNum, nNewPos);
UpdatePageObjectsInNotes(nMin);
}
@@ -401,7 +401,7 @@ void SdDrawDocument::MovePage(USHORT nPgNum, USHORT nNewPos)
|*
\************************************************************************/
-void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos)
+void SdDrawDocument::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
{
bool bLast = (nPos == GetPageCount());
@@ -422,7 +422,7 @@ void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos)
|*
\************************************************************************/
-void SdDrawDocument::DeletePage(USHORT nPgNum)
+void SdDrawDocument::DeletePage(sal_uInt16 nPgNum)
{
FmFormModel::DeletePage(nPgNum);
@@ -435,7 +435,7 @@ void SdDrawDocument::DeletePage(USHORT nPgNum)
|*
\************************************************************************/
-SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum)
+SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
{
SdrPage* pPage = FmFormModel::RemovePage(nPgNum);
@@ -453,7 +453,7 @@ SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum)
// Warning: This is not called for new master pages created from SdrModel::Merge,
// you also have to modify code in SdDrawDocument::Merge!
-void SdDrawDocument::InsertMasterPage(SdrPage* pPage, USHORT nPos )
+void SdDrawDocument::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos )
{
FmFormModel::InsertMasterPage( pPage, nPos );
if( pPage && pPage->IsMasterPage() && (static_cast<SdPage*>(pPage)->GetPageKind() == PK_STANDARD) )
@@ -465,7 +465,7 @@ void SdDrawDocument::InsertMasterPage(SdrPage* pPage, USHORT nPos )
}
}
-SdrPage* SdDrawDocument::RemoveMasterPage(USHORT nPgNum)
+SdrPage* SdDrawDocument::RemoveMasterPage(sal_uInt16 nPgNum)
{
SdPage* pPage = static_cast<SdPage*>(GetMasterPage(nPgNum ));
if( pPage && pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) )
@@ -485,7 +485,7 @@ SdrPage* SdDrawDocument::RemoveMasterPage(USHORT nPgNum)
|*
\************************************************************************/
-void SdDrawDocument::SetSelected(SdPage* pPage, BOOL bSelect)
+void SdDrawDocument::SetSelected(SdPage* pPage, sal_Bool bSelect)
{
PageKind ePageKind = pPage->GetPageKind();
@@ -528,7 +528,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
* Wenn noch keine Seite im Model vorhanden ist (Datei-Neu), wird
* eine neue Seite eingefuegt
**************************************************************************/
- USHORT nPageCount = GetPageCount();
+ sal_uInt16 nPageCount = GetPageCount();
if (nPageCount <= 1)
{
@@ -538,7 +538,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* Handzettel-Seite einfuegen
**********************************************************************/
- SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(FALSE) );
+ SdPage* pHandoutPage = dynamic_cast< SdPage* >( AllocPage(sal_False) );
SdPage* pRefPage = NULL;
@@ -563,7 +563,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* MasterPage einfuegen und an der Handzettel-Seite vermerken
**********************************************************************/
- SdPage* pHandoutMPage = (SdPage*) AllocPage(TRUE);
+ SdPage* pHandoutMPage = (SdPage*) AllocPage(sal_True);
pHandoutMPage->SetSize( pHandoutPage->GetSize() );
pHandoutMPage->SetPageKind(PK_HANDOUT);
pHandoutMPage->SetBorder( pHandoutPage->GetLftBorder(),
@@ -579,14 +579,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
* Eine Standard-Seite ist daher schon vorhanden.
**********************************************************************/
SdPage* pPage;
- BOOL bClipboard = FALSE;
+ sal_Bool bClipboard = sal_False;
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_STANDARD );
if (nPageCount == 0)
{
- pPage = dynamic_cast< SdPage* >( AllocPage(FALSE) );
+ pPage = dynamic_cast< SdPage* >( AllocPage(sal_False) );
if( pRefPage )
{
@@ -598,7 +598,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
// Draw: stets Default-Groesse mit Raendern
pPage->SetSize(aDefSize);
- SfxPrinter* pPrinter = mpDocSh->GetPrinter(FALSE);
+ SfxPrinter* pPrinter = mpDocSh->GetPrinter(sal_False);
if (pPrinter && pPrinter->IsValid())
{
Size aOutSize(pPrinter->GetOutputSize());
@@ -606,10 +606,10 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
aPageOffset -= pPrinter->PixelToLogic( Point() );
long nOffset = !aPageOffset.X() && !aPageOffset.X() ? 0 : PRINT_OFFSET;
- ULONG nTop = aPageOffset.Y();
- ULONG nLeft = aPageOffset.X();
- ULONG nBottom = Max((long)(aDefSize.Height() - aOutSize.Height() - nTop + nOffset), 0L);
- ULONG nRight = Max((long)(aDefSize.Width() - aOutSize.Width() - nLeft + nOffset), 0L);
+ sal_uLong nTop = aPageOffset.Y();
+ sal_uLong nLeft = aPageOffset.X();
+ sal_uLong nBottom = Max((long)(aDefSize.Height() - aOutSize.Height() - nTop + nOffset), 0L);
+ sal_uLong nRight = Max((long)(aDefSize.Width() - aOutSize.Width() - nLeft + nOffset), 0L);
pPage->SetBorder(nLeft, nTop, nRight, nBottom);
}
@@ -635,14 +635,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
}
else
{
- bClipboard = TRUE;
+ bClipboard = sal_True;
pPage = (SdPage*) GetPage(1);
}
/**********************************************************************
* MasterPage einfuegen und an der Seite vermerken
**********************************************************************/
- SdPage* pMPage = (SdPage*) AllocPage(TRUE);
+ SdPage* pMPage = (SdPage*) AllocPage(sal_True);
pMPage->SetSize( pPage->GetSize() );
pMPage->SetBorder( pPage->GetLftBorder(),
pPage->GetUppBorder(),
@@ -656,7 +656,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* Notizen-Seite einfuegen
**********************************************************************/
- SdPage* pNotesPage = (SdPage*) AllocPage(FALSE);
+ SdPage* pNotesPage = (SdPage*) AllocPage(sal_False);
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_NOTES );
@@ -688,7 +688,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
/**********************************************************************
* MasterPage einfuegen und an der Notizen-Seite vermerken
**********************************************************************/
- SdPage* pNotesMPage = (SdPage*) AllocPage(TRUE);
+ SdPage* pNotesMPage = (SdPage*) AllocPage(sal_True);
pNotesMPage->SetSize( pNotesPage->GetSize() );
pNotesMPage->SetPageKind(PK_NOTES);
pNotesMPage->SetBorder( pNotesPage->GetLftBorder(),
@@ -702,14 +702,14 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
if( !pRefPage && (meDocType != DOCUMENT_TYPE_DRAW) )
- pPage->SetAutoLayout( AUTOLAYOUT_TITLE, TRUE, TRUE );
+ pPage->SetAutoLayout( AUTOLAYOUT_TITLE, sal_True, sal_True );
mpWorkStartupTimer = new Timer();
mpWorkStartupTimer->SetTimeoutHdl( LINK(this, SdDrawDocument, WorkStartupHdl) );
mpWorkStartupTimer->SetTimeout(2000);
mpWorkStartupTimer->Start();
- SetChanged(FALSE);
+ SetChanged(sal_False);
}
}
@@ -721,10 +721,10 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
|*
\************************************************************************/
-BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages()
+sal_Bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
{
- BOOL bOK = FALSE;
- USHORT nPageCount = GetPageCount();
+ sal_Bool bOK = sal_False;
+ sal_uInt16 nPageCount = GetPageCount();
if (nPageCount != 0)
{
@@ -738,7 +738,7 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages()
pHandoutPage->SetPageKind(PK_HANDOUT);
pHandoutPage->TRG_SetMasterPage( *pHandoutMPage );
- for (USHORT i = 1; i < nPageCount; i = i + 2)
+ for (sal_uInt16 i = 1; i < nPageCount; i = i + 2)
{
SdPage* pPage = (SdPage*) GetPage(i);
@@ -757,9 +757,9 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages()
pNotesPage->TRG_SetMasterPage(*GetMasterPage(nMasterPageAfterPagesMasterPage));
}
- bOK = TRUE;
+ bOK = sal_True;
StopWorkStartupDelay();
- SetChanged(FALSE);
+ SetChanged(sal_False);
}
return(bOK);
@@ -768,17 +768,17 @@ BOOL SdDrawDocument::CreateMissingNotesAndHandoutPages()
/*************************************************************************
|*
|* - selektierte Seiten hinter genannte Seite schieben
-|* (nTargetPage = (USHORT)-1 --> vor erste Seite schieben)
-|* - ergibt TRUE, wenn Seiten verschoben wurden
+|* (nTargetPage = (sal_uInt16)-1 --> vor erste Seite schieben)
+|* - ergibt sal_True, wenn Seiten verschoben wurden
|*
\************************************************************************/
-BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
+sal_Bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
{
SdPage* pPage = NULL;
- USHORT nPage;
- USHORT nNoOfPages = GetSdPageCount(PK_STANDARD);
- BOOL bSomethingHappened = FALSE;
+ sal_uInt16 nPage;
+ sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD);
+ sal_Bool bSomethingHappened = sal_False;
const bool bUndo = IsUndoEnabled();
@@ -798,7 +798,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
// falls noetig, nach vorne hangeln, bis nicht selektierte Seite gefunden
nPage = nTargetPage;
- if (nPage != (USHORT)-1)
+ if (nPage != (sal_uInt16)-1)
{
pPage = GetSdPage(nPage, PK_STANDARD);
while (nPage > 0 && pPage->IsSelected())
@@ -809,12 +809,12 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
if (pPage->IsSelected())
{
- nPage = (USHORT)-1;
+ nPage = (sal_uInt16)-1;
}
}
// vor der ersten Seite einfuegen
- if (nPage == (USHORT)-1)
+ if (nPage == (sal_uInt16)-1)
{
while (aPageList.Count() > 0)
{
@@ -831,7 +831,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
if( bUndo )
AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*pPg, nPage+1, 2));
MovePage(nPage+1, 2);
- bSomethingHappened = TRUE;
+ bSomethingHappened = sal_True;
}
aPageList.Remove();
}
@@ -859,7 +859,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
if( bUndo )
AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*pPg, nPage+1, nTargetPage+1));
MovePage(nPage+1, nTargetPage+1);
- bSomethingHappened = TRUE;
+ bSomethingHappened = sal_True;
}
}
else
@@ -874,10 +874,10 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
if( bUndo )
AddUndo(GetSdrUndoFactory().CreateUndoSetPageNum(*pPg, nPage, nTargetPage));
MovePage(nPage, nTargetPage);
- bSomethingHappened = TRUE;
+ bSomethingHappened = sal_True;
}
}
- aPageList.Remove((ULONG)0);
+ aPageList.Remove((sal_uLong)0);
nTargetPage = pPage->GetPageNum();
}
}
@@ -895,7 +895,7 @@ BOOL SdDrawDocument::MovePages(USHORT nTargetPage)
|*
\************************************************************************/
-ULONG SdDrawDocument::GetLinkCount()
+sal_uLong SdDrawDocument::GetLinkCount()
{
return ( pLinkManager->GetLinks().Count() );
}
@@ -906,24 +906,24 @@ ULONG SdDrawDocument::GetLinkCount()
|*
\************************************************************************/
-void SdDrawDocument::SetLanguage( const LanguageType eLang, const USHORT nId )
+void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
if( nId == EE_CHAR_LANGUAGE && meLanguage != eLang )
{
meLanguage = eLang;
- bChanged = TRUE;
+ bChanged = sal_True;
}
else if( nId == EE_CHAR_LANGUAGE_CJK && meLanguageCJK != eLang )
{
meLanguageCJK = eLang;
- bChanged = TRUE;
+ bChanged = sal_True;
}
else if( nId == EE_CHAR_LANGUAGE_CTL && meLanguageCTL != eLang )
{
meLanguageCTL = eLang;
- bChanged = TRUE;
+ bChanged = sal_True;
}
if( bChanged )
@@ -942,7 +942,7 @@ void SdDrawDocument::SetLanguage( const LanguageType eLang, const USHORT nId )
|*
\************************************************************************/
-LanguageType SdDrawDocument::GetLanguage( const USHORT nId ) const
+LanguageType SdDrawDocument::GetLanguage( const sal_uInt16 nId ) const
{
LanguageType eLangType = meLanguage;
@@ -964,9 +964,9 @@ LanguageType SdDrawDocument::GetLanguage( const USHORT nId ) const
IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG )
{
if( mpDocSh )
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
- BOOL bChanged = IsChanged(); // merken
+ sal_Bool bChanged = IsChanged(); // merken
// Autolayouts initialisieren
SdPage* pHandoutMPage = GetMasterSdPage(0, PK_HANDOUT);
@@ -974,7 +974,7 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG )
if (pHandoutMPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
// AutoLayout wurde noch nicht umgesetzt -> Initialisieren
- pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, TRUE, TRUE);
+ pHandoutMPage->SetAutoLayout(AUTOLAYOUT_HANDOUT6, sal_True, sal_True);
}
SdPage* pPage = GetSdPage(0, PK_STANDARD);
@@ -982,7 +982,7 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG )
if (pPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
// AutoLayout wurde noch nicht umgesetzt -> Initialisieren
- pPage->SetAutoLayout(AUTOLAYOUT_NONE, TRUE, TRUE);
+ pPage->SetAutoLayout(AUTOLAYOUT_NONE, sal_True, sal_True);
}
SdPage* pNotesPage = GetSdPage(0, PK_NOTES);
@@ -990,13 +990,13 @@ IMPL_LINK( SdDrawDocument, WorkStartupHdl, Timer *, EMPTYARG )
if (pNotesPage->GetAutoLayout() == AUTOLAYOUT_NONE)
{
// AutoLayout wurde noch nicht umgesetzt -> Initialisieren
- pNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, TRUE, TRUE);
+ pNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, sal_True, sal_True);
}
- SetChanged(bChanged || FALSE);
+ SetChanged(bChanged || sal_False);
if( mpDocSh )
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
return 0;
}
@@ -1044,8 +1044,8 @@ SdAnimationInfo* SdDrawDocument::GetAnimationInfo(SdrObject* pObject) const
SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCreate /* = false */ )
{
- USHORT nUD = 0;
- USHORT nUDCount = rObject.GetUserDataCount();
+ sal_uInt16 nUD = 0;
+ sal_uInt16 nUDCount = rObject.GetUserDataCount();
SdrObjUserData* pUD = 0;
SdAnimationInfo* pRet = 0;
@@ -1075,10 +1075,10 @@ SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) const
SdrObjUserData* pUserData = NULL;
SdIMapInfo* pIMapInfo = NULL;
- USHORT nCount = pObject->GetUserDataCount();
+ sal_uInt16 nCount = pObject->GetUserDataCount();
// gibt es in den User-Daten eine IMap-Information?
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pUserData = pObject->GetUserData( i );
@@ -1103,7 +1103,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
Point aRelPoint( rWinPoint );
ImageMap& rImageMap = (ImageMap&) pIMapInfo->GetImageMap();
const Rectangle& rRect = pObj->GetLogicRect();
- BOOL bObjSupported = FALSE;
+ sal_Bool bObjSupported = sal_False;
// HitTest ausfuehren
if ( pObj->ISA( SdrGrafObj ) ) // einfaches Grafik-Objekt
@@ -1131,12 +1131,12 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
pGrafObj->GetGrafPrefMapMode(), aMap100 );
delete pGeoData;
- bObjSupported = TRUE;
+ bObjSupported = sal_True;
}
else if ( pObj->ISA( SdrOle2Obj ) ) // OLE-Objekt
{
aGraphSize = ( (SdrOle2Obj*) pObj )->GetOrigObjSize();
- bObjSupported = TRUE;
+ bObjSupported = sal_True;
}
// hat alles geklappt, dann HitTest ausfuehren
@@ -1163,7 +1163,7 @@ void SdDrawDocument::CheckMasterPages()
{
// RemoveMasterPage(2); // code to test the creation of notes pages
- USHORT nMaxPages = GetMasterPageCount();
+ sal_uInt16 nMaxPages = GetMasterPageCount();
// we need at least a handout master and one master page
if( nMaxPages < 2 )
@@ -1174,7 +1174,7 @@ void SdDrawDocument::CheckMasterPages()
SdPage* pPage = NULL;
SdPage* pNotesPage = NULL;
- USHORT nPage;
+ sal_uInt16 nPage;
// first see if the page order is correct
for( nPage = 1; nPage < nMaxPages; nPage++ )
@@ -1199,7 +1199,7 @@ void SdDrawDocument::CheckMasterPages()
if( pPage->GetPageKind() != PK_STANDARD )
{
bChanged = sal_True;
- USHORT nFound = nPage + 1;
+ sal_uInt16 nFound = nPage + 1;
while( nFound < nMaxPages )
{
pPage = static_cast<SdPage*>(GetMasterPage( nFound ));
@@ -1230,7 +1230,7 @@ void SdDrawDocument::CheckMasterPages()
{
bChanged = sal_True;
- USHORT nFound = nPage + 1;
+ sal_uInt16 nFound = nPage + 1;
while( nFound < nMaxPages )
{
pNotesPage = static_cast<SdPage*>(GetMasterPage( nFound ));
@@ -1299,15 +1299,16 @@ void SdDrawDocument::CheckMasterPages()
}
}
-USHORT SdDrawDocument::CreatePage (
+sal_uInt16 SdDrawDocument::CreatePage (
SdPage* pActualPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
- BOOL bIsPageBack,
- BOOL bIsPageObj)
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj,
+ const sal_Int32 nInsertPosition)
{
SdPage* pPreviousStandardPage;
SdPage* pPreviousNotesPage;
@@ -1319,20 +1320,20 @@ USHORT SdDrawDocument::CreatePage (
if (ePageKind == PK_NOTES)
{
pPreviousNotesPage = pActualPage;
- USHORT nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
+ sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3);
eStandardLayout = pPreviousStandardPage->GetAutoLayout();
}
else
{
pPreviousStandardPage = pActualPage;
- USHORT nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
+ sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1);
eNotesLayout = pPreviousNotesPage->GetAutoLayout();
}
// Create new standard page and set it up.
- pStandardPage = (SdPage*) AllocPage(FALSE);
+ pStandardPage = (SdPage*) AllocPage(sal_False);
// Set the size here since else the presobj autolayout
// will be wrong.
@@ -1347,7 +1348,7 @@ USHORT SdDrawDocument::CreatePage (
// User layout of current standard page.
pStandardPage->SetLayoutName( pPreviousStandardPage->GetLayoutName() );
- pStandardPage->SetAutoLayout(eStandardLayout, TRUE);
+ pStandardPage->SetAutoLayout(eStandardLayout, sal_True);
pStandardPage->setHeaderFooterSettings( pPreviousStandardPage->getHeaderFooterSettings() );
// transition settings of current page
@@ -1362,7 +1363,7 @@ USHORT SdDrawDocument::CreatePage (
pStandardPage->SetTime( pPreviousStandardPage->GetTime() );
// Create new notes page and set it up.
- pNotesPage = (SdPage*) AllocPage(FALSE);
+ pNotesPage = (SdPage*) AllocPage(sal_False);
pNotesPage->SetPageKind(PK_NOTES);
// Use master page of current page.
@@ -1370,26 +1371,27 @@ USHORT SdDrawDocument::CreatePage (
// Use layout of current notes page.
pNotesPage->SetLayoutName( pPreviousNotesPage->GetLayoutName() );
- pNotesPage->SetAutoLayout(eNotesLayout, TRUE);
+ pNotesPage->SetAutoLayout(eNotesLayout, sal_True);
pNotesPage->setHeaderFooterSettings( pPreviousNotesPage->getHeaderFooterSettings() );
return InsertPageSet (
- pActualPage, ePageKind,
+ pActualPage,
+ ePageKind,
sStandardPageName,
sNotesPageName,
eStandardLayout,
eNotesLayout,
bIsPageBack,
bIsPageObj,
-
pStandardPage,
- pNotesPage);
+ pNotesPage,
+ nInsertPosition);
}
-USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum)
+sal_uInt16 SdDrawDocument::DuplicatePage (sal_uInt16 nPageNum)
{
PageKind ePageKind = PK_STANDARD;
@@ -1398,8 +1400,8 @@ USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum)
// Get background flags.
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
// Get layout from current page.
@@ -1417,15 +1419,16 @@ USHORT SdDrawDocument::DuplicatePage (USHORT nPageNum)
-USHORT SdDrawDocument::DuplicatePage (
+sal_uInt16 SdDrawDocument::DuplicatePage (
SdPage* pActualPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
- BOOL bIsPageBack,
- BOOL bIsPageObj)
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj,
+ const sal_Int32 nInsertPosition)
{
SdPage* pPreviousStandardPage;
SdPage* pPreviousNotesPage;
@@ -1437,13 +1440,13 @@ USHORT SdDrawDocument::DuplicatePage (
if (ePageKind == PK_NOTES)
{
pPreviousNotesPage = pActualPage;
- USHORT nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
+ sal_uInt16 nNotesPageNum = pPreviousNotesPage->GetPageNum() + 2;
pPreviousStandardPage = (SdPage*) GetPage(nNotesPageNum - 3);
}
else
{
pPreviousStandardPage = pActualPage;
- USHORT nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
+ sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
pPreviousNotesPage = (SdPage*) GetPage(nStandardPageNum - 1);
}
@@ -1452,38 +1455,39 @@ USHORT SdDrawDocument::DuplicatePage (
pNotesPage = (SdPage*) pPreviousNotesPage->Clone();
return InsertPageSet (
- pActualPage, ePageKind,
+ pActualPage,
+ ePageKind,
sStandardPageName,
sNotesPageName,
eStandardLayout,
eNotesLayout,
bIsPageBack,
bIsPageObj,
-
pStandardPage,
- pNotesPage);
+ pNotesPage,
+ nInsertPosition);
}
-USHORT SdDrawDocument::InsertPageSet (
+sal_uInt16 SdDrawDocument::InsertPageSet (
SdPage* pActualPage,
PageKind ePageKind,
const String& sStandardPageName,
const String& sNotesPageName,
AutoLayout eStandardLayout,
AutoLayout eNotesLayout,
- BOOL bIsPageBack,
- BOOL bIsPageObj,
-
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj,
SdPage* pStandardPage,
- SdPage* pNotesPage)
+ SdPage* pNotesPage,
+ sal_Int32 nInsertPosition)
{
SdPage* pPreviousStandardPage;
SdPage* pPreviousNotesPage;
- USHORT nStandardPageNum;
- USHORT nNotesPageNum;
+ sal_uInt16 nStandardPageNum;
+ sal_uInt16 nNotesPageNum;
String aStandardPageName = sStandardPageName;
String aNotesPageName = sNotesPageName;
@@ -1508,13 +1512,16 @@ USHORT SdDrawDocument::InsertPageSet (
eNotesLayout = pPreviousNotesPage->GetAutoLayout();
}
+ OSL_ASSERT(nNotesPageNum==nStandardPageNum+1);
+ if (nInsertPosition < 0)
+ nInsertPosition = nStandardPageNum;
// Set up and insert the standard page.
SetupNewPage (
pPreviousStandardPage,
pStandardPage,
aStandardPageName,
- nStandardPageNum,
+ nInsertPosition,
bIsPageBack,
bIsPageObj);
@@ -1524,7 +1531,7 @@ USHORT SdDrawDocument::InsertPageSet (
pPreviousNotesPage,
pNotesPage,
aNotesPageName,
- nNotesPageNum,
+ nInsertPosition+1,
bIsPageBack,
bIsPageObj);
@@ -1540,9 +1547,9 @@ void SdDrawDocument::SetupNewPage (
SdPage* pPreviousPage,
SdPage* pPage,
const String& sPageName,
- USHORT nInsertionPoint,
- BOOL bIsPageBack,
- BOOL bIsPageObj)
+ sal_uInt16 nInsertionPoint,
+ sal_Bool bIsPageBack,
+ sal_Bool bIsPageObj)
{
if (pPreviousPage != NULL)
{
@@ -1559,8 +1566,8 @@ void SdDrawDocument::SetupNewPage (
if (pPreviousPage != NULL)
{
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers = pPreviousPage->TRG_GetMasterPageVisibleLayers();
aVisibleLayers.Set(aBckgrnd, bIsPageBack);
aVisibleLayers.Set(aBckgrndObj, bIsPageObj);
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index b4a698c9cfdf..6f32b90725ab 100644..100755
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -58,6 +58,7 @@
#include <sot/formats.hxx>
#include <set>
+#include <boost/bind.hpp>
#include "glob.hrc"
#include "drawdoc.hxx"
@@ -80,9 +81,9 @@
using namespace ::com::sun::star;
-#define POOL_BUFFER_SIZE (USHORT)32768
-#define BASIC_BUFFER_SIZE (USHORT)8192
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define POOL_BUFFER_SIZE (sal_uInt16)32768
+#define BASIC_BUFFER_SIZE (sal_uInt16)8192
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
/*************************************************************************
|*
@@ -92,24 +93,24 @@ using namespace ::com::sun::star;
SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
SdDrawDocument* pBookmarkDoc = NULL;
String aBookmarkName = rMedium.GetName();
const SfxFilter* pFilter = rMedium.GetFilter();
if ( !pFilter )
{
- rMedium.UseInteractionHandler( TRUE );
+ rMedium.UseInteractionHandler( sal_True );
SFX_APP()->GetFilterMatcher().GuessFilter( rMedium, &pFilter );
}
if ( !pFilter )
{
- bOK = FALSE;
+ bOK = sal_False;
}
else if ( maBookmarkFile != aBookmarkName && aBookmarkName.Len() )
{
- BOOL bCreateGraphicShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.drawing.DrawingDocument" );
- BOOL bCreateImpressShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.presentation.PresentationDocument" );
+ sal_Bool bCreateGraphicShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.drawing.DrawingDocument" );
+ sal_Bool bCreateImpressShell = pFilter->GetServiceName().EqualsAscii( "com.sun.star.presentation.PresentationDocument" );
if ( bCreateGraphicShell || bCreateImpressShell )
{
CloseBookmarkDoc();
@@ -120,10 +121,10 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
// direkt laden
if ( bCreateGraphicShell )
// Draw
- mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, TRUE);
+ mxBookmarkDocShRef = new ::sd::GraphicDocShell(SFX_CREATE_MODE_STANDARD, sal_True);
else
// Impress
- mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, TRUE);
+ mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, sal_True);
bOK = mxBookmarkDocShRef->DoLoad(&rMedium);
if( bOK )
@@ -164,7 +165,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const String& rBookmarkFile)
if (maBookmarkFile != rBookmarkFile && rBookmarkFile.Len())
{
- SfxMedium* pMedium = new SfxMedium( rBookmarkFile, STREAM_READ, FALSE );
+ SfxMedium* pMedium = new SfxMedium( rBookmarkFile, STREAM_READ, sal_False );
pBookmarkDoc = OpenBookmarkDoc(*pMedium);
}
else if (mxBookmarkDocShRef.Is())
@@ -181,26 +182,26 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const String& rBookmarkFile)
|*
\************************************************************************/
-BOOL SdDrawDocument::InsertBookmark(
+sal_Bool SdDrawDocument::InsertBookmark(
List* pBookmarkList, // Liste der Namen der einzufuegenden Bookmarks
List* pExchangeList, // Liste der zu verwendenen Namen
- BOOL bLink, // Bookmarks sollen als Verknuepfung eingefuegt werden
- BOOL bReplace, // Aktuellen Seiten (Standard&Notiz) werden ersetzt
- USHORT nInsertPos, // Einfuegeposition fuer Seiten
- BOOL bNoDialogs, // Keine Dialoge anzeigen
+ sal_Bool bLink, // Bookmarks sollen als Verknuepfung eingefuegt werden
+ sal_Bool bReplace, // Aktuellen Seiten (Standard&Notiz) werden ersetzt
+ sal_uInt16 nInsertPos, // Einfuegeposition fuer Seiten
+ sal_Bool bNoDialogs, // Keine Dialoge anzeigen
::sd::DrawDocShell* pBookmarkDocSh, // Wenn gesetzt, so ist dieses das Source-Dokument
- BOOL bCopy, // Seiten werden kopiert
+ sal_Bool bCopy, // Seiten werden kopiert
Point* pObjPos) // Einfuegeposition fuer Objekte
{
- BOOL bOK = TRUE;
- BOOL bInsertPages = FALSE;
+ sal_Bool bOK = sal_True;
+ sal_Bool bInsertPages = sal_False;
if (!pBookmarkList)
{
/**********************************************************************
* Alle Seiten werden eingefuegt
**********************************************************************/
- bInsertPages = TRUE;
+ bInsertPages = sal_True;
}
else
{
@@ -218,20 +219,20 @@ BOOL SdDrawDocument::InsertBookmark(
aBookmarkName = maBookmarkFile;
}
else
- bOK = FALSE;
+ bOK = sal_False;
- for (USHORT nPos = 0; bOK && ( nPos < pBookmarkList->Count() ) && !bInsertPages; nPos++)
+ for (sal_uInt16 nPos = 0; bOK && ( nPos < pBookmarkList->Count() ) && !bInsertPages; nPos++)
{
/******************************************************************
* Gibt es in der Bookmark-Liste einen Seitennamen?
******************************************************************/
String aBMPgName (*(String*) pBookmarkList->GetObject(nPos));
- BOOL bIsMasterPage;
+ sal_Bool bIsMasterPage;
if( pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage ) != SDRPAGE_NOTFOUND )
{
// Seite gefunden
- bInsertPages = TRUE;
+ bInsertPages = sal_True;
}
}
}
@@ -240,7 +241,7 @@ BOOL SdDrawDocument::InsertBookmark(
{
// Zuerst werden alle Seiten-Bookmarks eingefuegt
bOK = InsertBookmarkAsPage(pBookmarkList, pExchangeList, bLink, bReplace,
- nInsertPos, bNoDialogs, pBookmarkDocSh, bCopy, TRUE, FALSE);
+ nInsertPos, bNoDialogs, pBookmarkDocSh, bCopy, sal_True, sal_False);
}
if ( bOK && pBookmarkList )
@@ -273,7 +274,7 @@ SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase::~InsertBookmarkAsPage_Page
{
}
-void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList, USHORT nBMSdPageCount,
+void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* pBookmarkList, sal_uInt16 nBMSdPageCount,
SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase& rPageIterator )
{
//
@@ -303,15 +304,15 @@ void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* p
if( !pBookmarkList )
{
// simply take master page of nPos'th page in source document
- pBMMPage = (SdPage*)(&(pBookmarkDoc->GetSdPage((USHORT)nPos, PK_STANDARD)->TRG_GetMasterPage()));
+ pBMMPage = (SdPage*)(&(pBookmarkDoc->GetSdPage((sal_uInt16)nPos, PK_STANDARD)->TRG_GetMasterPage()));
}
else
{
// fetch nPos'th entry from bookmark list, and determine master page
String aBMPgName (*(String*) pBookmarkList->GetObject(nPos));
- BOOL bIsMasterPage;
+ sal_Bool bIsMasterPage;
- USHORT nBMPage = pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage );
+ sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName( aBMPgName, bIsMasterPage );
if (nBMPage != SDRPAGE_NOTFOUND)
{
@@ -325,7 +326,7 @@ void SdDrawDocument::IterateBookmarkPages( SdDrawDocument* pBookmarkDoc, List* p
// enforce that bookmarked page is a standard page and not already a master page
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
- const USHORT nBMSdPage = (nBMPage - 1) / 2;
+ const sal_uInt16 nBMSdPage = (nBMPage - 1) / 2;
pBMMPage = (SdPage*) (&(pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD)->TRG_GetMasterPage()));
}
}
@@ -343,7 +344,7 @@ class InsertBookmarkAsPage_FindDuplicateLayouts : public SdDrawDocument::InsertB
{
public:
InsertBookmarkAsPage_FindDuplicateLayouts( List* pLayoutsToTransfer, SdDrawDocument* pBookmarkDoc,
- List* pBookmarkList, USHORT nBMSdPageCount ) :
+ List* pBookmarkList, sal_uInt16 nBMSdPageCount ) :
mpLayoutsToTransfer(pLayoutsToTransfer), mpBookmarkDoc(pBookmarkDoc),
mpBookmarkList(pBookmarkList), mnBMSdPageCount(nBMSdPageCount) {}
virtual ~InsertBookmarkAsPage_FindDuplicateLayouts() {};
@@ -352,7 +353,7 @@ private:
List* mpLayoutsToTransfer;
SdDrawDocument* mpBookmarkDoc;
List* mpBookmarkList;
- USHORT mnBMSdPageCount;
+ sal_uInt16 mnBMSdPageCount;
};
void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc, SdPage* pBMMPage )
@@ -365,18 +366,18 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
pLayout->Erase( pLayout->SearchAscii( SD_LT_SEPARATOR ));
String* pTest = (String*) mpLayoutsToTransfer->First();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
while (pTest && !bFound) // found yet?
{
if (*pLayout == *pTest)
- bFound = TRUE;
+ bFound = sal_True;
else
pTest = (String*)mpLayoutsToTransfer->Next();
}
- const USHORT nMPageCount = rDoc.GetMasterPageCount();
- for (USHORT nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
+ const sal_uInt16 nMPageCount = rDoc.GetMasterPageCount();
+ for (sal_uInt16 nMPage = 0; nMPage < nMPageCount && !bFound; nMPage++)
{
/**************************************************************
* Gibt es die Layouts schon im Dokument?
@@ -386,7 +387,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
aTest.Erase( aTest.SearchAscii( SD_LT_SEPARATOR ));
if (aTest == *pLayout)
- bFound = TRUE;
+ bFound = sal_True;
}
if (!bFound)
@@ -395,23 +396,37 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc
delete pLayout;
}
+/** Just add one page to the container given to the constructor.
+*/
+class InsertBookmarkAsPage_AddBookmarkedPages
+ : public SdDrawDocument::InsertBookmarkAsPage_PageFunctorBase
+{
+public:
+ InsertBookmarkAsPage_AddBookmarkedPages(::std::vector<SdPage*>& rContainer)
+ : mrContainer(rContainer) {}
+ ~InsertBookmarkAsPage_AddBookmarkedPages(void) {}
+ void operator() (SdDrawDocument&, SdPage* pPage) { mrContainer.push_back(pPage); }
+private:
+ ::std::vector<SdPage*>& mrContainer;
+};
-BOOL SdDrawDocument::InsertBookmarkAsPage(
+
+sal_Bool SdDrawDocument::InsertBookmarkAsPage(
List* pBookmarkList,
List* pExchangeList, // Liste der zu verwendenen Namen
- BOOL bLink,
- BOOL bReplace,
- USHORT nInsertPos,
- BOOL bNoDialogs,
+ sal_Bool bLink,
+ sal_Bool bReplace,
+ sal_uInt16 nInsertPos,
+ sal_Bool bNoDialogs,
::sd::DrawDocShell* pBookmarkDocSh,
- BOOL bCopy,
- BOOL bMergeMasterPages,
- BOOL bPreservePageNames)
+ sal_Bool bCopy,
+ sal_Bool bMergeMasterPages,
+ sal_Bool bPreservePageNames)
{
- BOOL bOK = TRUE;
- BOOL bContinue = TRUE;
- BOOL bScaleObjects = FALSE;
- USHORT nReplacedStandardPages = 0;
+ sal_Bool bOK = sal_True;
+ sal_Bool bContinue = sal_True;
+ sal_Bool bScaleObjects = sal_False;
+ sal_uInt16 nReplacedStandardPages = 0;
SdDrawDocument* pBookmarkDoc = NULL;
String aBookmarkName;
@@ -432,16 +447,16 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
}
else
{
- return FALSE;
+ return sal_False;
}
- const USHORT nSdPageCount = GetSdPageCount(PK_STANDARD);
- const USHORT nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PK_STANDARD);
- const USHORT nMPageCount = GetMasterPageCount();
+ const sal_uInt16 nSdPageCount = GetSdPageCount(PK_STANDARD);
+ const sal_uInt16 nBMSdPageCount = pBookmarkDoc->GetSdPageCount(PK_STANDARD);
+ const sal_uInt16 nMPageCount = GetMasterPageCount();
if (nSdPageCount==0 || nBMSdPageCount==0 || nMPageCount==0)
{
- bContinue = bOK = FALSE;
+ bContinue = bOK = sal_False;
return(bContinue);
}
@@ -451,18 +466,18 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// Note that the pointers are used later on as general page pointers.
SdPage* pRefPage = GetSdPage(0, PK_STANDARD);
Size aSize(pRefPage->GetSize());
- INT32 nLeft = pRefPage->GetLftBorder();
- INT32 nRight = pRefPage->GetRgtBorder();
- INT32 nUpper = pRefPage->GetUppBorder();
- INT32 nLower = pRefPage->GetLwrBorder();
+ sal_Int32 nLeft = pRefPage->GetLftBorder();
+ sal_Int32 nRight = pRefPage->GetRgtBorder();
+ sal_Int32 nUpper = pRefPage->GetUppBorder();
+ sal_Int32 nLower = pRefPage->GetLwrBorder();
Orientation eOrient = pRefPage->GetOrientation();
SdPage* pNPage = GetSdPage(0, PK_NOTES);
Size aNSize(GetSdPage(0, PK_NOTES)->GetSize());
- INT32 nNLeft = pNPage->GetLftBorder();
- INT32 nNRight = pNPage->GetRgtBorder();
- INT32 nNUpper = pNPage->GetUppBorder();
- INT32 nNLower = pNPage->GetLwrBorder();
+ sal_Int32 nNLeft = pNPage->GetLftBorder();
+ sal_Int32 nNRight = pNPage->GetRgtBorder();
+ sal_Int32 nNUpper = pNPage->GetUppBorder();
+ sal_Int32 nNLower = pNPage->GetLwrBorder();
Orientation eNOrient = pRefPage->GetOrientation();
// Seitengroesse und -raender an die Werte der letzten
@@ -474,7 +489,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if( !pBookmarkList )
bScaleObjects = pRefPage->IsScaleObjects();
else
- bScaleObjects = TRUE;
+ bScaleObjects = sal_True;
}
else
{
@@ -487,7 +502,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
pBMPage->GetLwrBorder() != pRefPage->GetLwrBorder())
{
String aStr(SdResId(STR_SCALE_OBJECTS));
- USHORT nBut = QueryBox( NULL, WB_YES_NO_CANCEL, aStr).Execute();
+ sal_uInt16 nBut = QueryBox( NULL, WB_YES_NO_CANCEL, aStr).Execute();
bScaleObjects = nBut == RET_YES;
bContinue = nBut != RET_CANCEL;
@@ -505,7 +520,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
|* den Seiten transferieren, sonst verlieren die Textobjekte
|* beim Transfer den Bezug zur Vorlage
\*************************************************************************/
- SfxUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = NULL;
if( mpDocSh )
{
pUndoMgr = mpDocSh->GetUndoManager();
@@ -532,7 +547,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// Wenn Vorlagen kopiert werden muessen, dann muessen auch die
// MasterPages kopiert werden!
if( pLayout )
- bMergeMasterPages = TRUE;
+ bMergeMasterPages = sal_True;
while (pLayout)
{
@@ -544,7 +559,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
{
if( pUndoMgr )
{
- SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, TRUE);
+ SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, sal_True);
pUndoMgr->AddUndoAction(pMovStyles);
}
}
@@ -573,17 +588,17 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
nInsertPos = GetPageCount();
}
- USHORT nActualInsertPos = nInsertPos;
+ sal_uInt16 nActualInsertPos = nInsertPos;
List aNameList;
- std::set<USHORT> aRenameSet;
- USHORT nBMSdPage;
+ std::set<sal_uInt16> aRenameSet;
+ sal_uInt16 nBMSdPage;
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
{
SdPage* pBMPage = pBookmarkDoc->GetSdPage(nBMSdPage, PK_STANDARD);
String pName( pBMPage->GetName() );
- BOOL bIsMasterPage;
+ sal_Bool bIsMasterPage;
if (bLink)
{
@@ -606,8 +621,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
0xFFFF, // Aber alle anderen
nActualInsertPos, // An Position einfuegen
bMergeMasterPages, // MasterPages mitnehmen
- FALSE, // Aber nur die benoetigten MasterPages
- TRUE, // Undo-Aktion erzeugen
+ sal_False, // Aber nur die benoetigten MasterPages
+ sal_True, // Undo-Aktion erzeugen
bCopy); // Seiten kopieren (oder mergen)
for (nBMSdPage=0; nBMSdPage < nBMSdPageCount; nBMSdPage++)
@@ -647,29 +662,30 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if (nInsertPos >= GetPageCount())
{
// Seiten werden hinten angefuegt
- bReplace = FALSE;
+ bReplace = sal_False;
nInsertPos = GetPageCount();
}
- USHORT nActualInsertPos = nInsertPos;
+ sal_uInt16 nActualInsertPos = nInsertPos;
- for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++)
+ // Collect the bookmarked pages.
+ ::std::vector<SdPage*> aBookmarkedPages (pBookmarkList->Count(), NULL);
+ for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++)
{
- /**************************************************************
- * Namen der Bookmark-Seiten aus Liste holen
- **************************************************************/
String aPgName(*(String*) pBookmarkList->GetObject(nPos));
- BOOL bIsMasterPage;
- USHORT nBMPage = pBookmarkDoc->GetPageByName( aPgName, bIsMasterPage );
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nBMPage = pBookmarkDoc->GetPageByName( aPgName, bIsMasterPage );
if (nBMPage != SDRPAGE_NOTFOUND)
{
- pBMPage = (SdPage*) pBookmarkDoc->GetPage(nBMPage);
- }
- else
- {
- pBMPage = NULL;
+ aBookmarkedPages[nPos] = dynamic_cast<SdPage*>(pBookmarkDoc->GetPage(nBMPage));
}
+ }
+
+ for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++)
+ {
+ pBMPage = aBookmarkedPages[nPos];
+ sal_uInt16 nBMPage = pBMPage!=NULL ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND;
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
@@ -681,7 +697,9 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// delay renaming *after* pages are copied (might destroy source otherwise)
// don't change name if source and dest model are the same!
// avoid renaming if replacing the same page
- USHORT nPageSameName = GetPageByName(aPgName, bIsMasterPage);
+ String aPgName(*(String*) pBookmarkList->GetObject(nPos));
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nPageSameName = GetPageByName(aPgName, bIsMasterPage);
if( pBookmarkDoc != this &&
nPageSameName != SDRPAGE_NOTFOUND &&
( !bReplace ||
@@ -690,7 +708,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
bMustRename = sal_True;
}
- SdPage* pBookmarkPage = dynamic_cast< SdPage* >( pBookmarkDoc->GetPage(nBMPage) );
+ SdPage* pBookmarkPage = pBMPage;
if (bReplace )
{
ReplacePageInCustomShows( dynamic_cast< SdPage* >( GetPage( nActualInsertPos ) ), pBookmarkPage );
@@ -701,8 +719,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
nBMPage+1, // Bis Seite (Notizen)
nActualInsertPos, // An Position einfuegen
bMergeMasterPages, // MasterPages mitnehmen
- FALSE, // Aber nur die benoetigten MasterPages
- TRUE, // Undo-Aktion erzeugen
+ sal_False, // Aber nur die benoetigten MasterPages
+ sal_True, // Undo-Aktion erzeugen
bCopy); // Seiten kopieren (oder mergen)
if( bReplace )
@@ -801,17 +819,17 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
|* DrawingEngine gleiche Praesentationslayouts nicht erkennen kann.
|* Ueberzaehlige MasterPages entfernen.
\*************************************************************************/
- USHORT nNewMPageCount = GetMasterPageCount();
+ sal_uInt16 nNewMPageCount = GetMasterPageCount();
// rueckwaerts, damit Nummern nicht durcheinander geraten
- for (USHORT nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--)
+ for (sal_uInt16 nPage = nNewMPageCount - 1; nPage >= nMPageCount; nPage--)
{
pRefPage = (SdPage*) GetMasterPage(nPage);
String aMPLayout(pRefPage->GetLayoutName());
PageKind eKind = pRefPage->GetPageKind();
// gibt's den schon?
- for (USHORT nTest = 0; nTest < nMPageCount; nTest++)
+ for (sal_uInt16 nTest = 0; nTest < nMPageCount; nTest++)
{
SdPage* pTest = (SdPage*) GetMasterPage(nTest);
String aTest(pTest->GetLayoutName());
@@ -837,8 +855,8 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
// nInsertPos > 2 is always true when inserting into non-empty models
if (nInsertPos > 0)
{
- USHORT nSdPageStart = (nInsertPos - 1) / 2;
- USHORT nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount +
+ sal_uInt16 nSdPageStart = (nInsertPos - 1) / 2;
+ sal_uInt16 nSdPageEnd = GetSdPageCount(PK_STANDARD) - nSdPageCount +
nSdPageStart - 1;
const bool bRemoveEmptyPresObj = pBookmarkDoc &&
(pBookmarkDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS) &&
@@ -849,7 +867,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
nSdPageEnd = nSdPageStart + nReplacedStandardPages - 1;
}
- for (USHORT nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++)
+ for (sal_uInt16 nSdPage = nSdPageStart; nSdPage <= nSdPageEnd; nSdPage++)
{
pRefPage = GetSdPage(nSdPage, PK_STANDARD);
@@ -883,7 +901,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if (bScaleObjects)
{
Rectangle aBorderRect(nLeft, nUpper, nRight, nLower);
- pRefPage->ScaleObjects(aSize, aBorderRect, TRUE);
+ pRefPage->ScaleObjects(aSize, aBorderRect, sal_True);
}
pRefPage->SetSize(aSize);
pRefPage->SetBorder(nLeft, nUpper, nRight, nLower);
@@ -902,7 +920,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if (bScaleObjects)
{
Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower);
- pRefPage->ScaleObjects(aNSize, aBorderRect, TRUE);
+ pRefPage->ScaleObjects(aNSize, aBorderRect, sal_True);
}
pRefPage->SetSize(aNSize);
@@ -913,7 +931,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
pRefPage->RemoveEmptyPresentationObjects();
}
- for (USHORT nPage = nMPageCount; nPage < nNewMPageCount; nPage++)
+ for (sal_uInt16 nPage = nMPageCount; nPage < nNewMPageCount; nPage++)
{
pRefPage = (SdPage*) GetMasterPage(nPage);
if (pRefPage->GetPageKind() == PK_STANDARD)
@@ -921,7 +939,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if (bScaleObjects)
{
Rectangle aBorderRect(nLeft, nUpper, nRight, nLower);
- pRefPage->ScaleObjects(aSize, aBorderRect, TRUE);
+ pRefPage->ScaleObjects(aSize, aBorderRect, sal_True);
}
pRefPage->SetSize(aSize);
pRefPage->SetBorder(nLeft, nUpper, nRight, nLower);
@@ -932,7 +950,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
if (bScaleObjects)
{
Rectangle aBorderRect(nNLeft, nNUpper, nNRight, nNLower);
- pRefPage->ScaleObjects(aNSize, aBorderRect, TRUE);
+ pRefPage->ScaleObjects(aNSize, aBorderRect, sal_True);
}
pRefPage->SetSize(aNSize);
pRefPage->SetBorder(nNLeft, nNUpper, nNRight, nNLower);
@@ -945,7 +963,7 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
}
// Make absolutely sure no double masterpages are there
- RemoveUnnecessaryMasterPages(NULL, TRUE, TRUE);
+ RemoveUnnecessaryMasterPages(NULL, sal_True, sal_True);
if( bUndo )
EndUndo();
@@ -960,15 +978,15 @@ BOOL SdDrawDocument::InsertBookmarkAsPage(
|*
\************************************************************************/
-BOOL SdDrawDocument::InsertBookmarkAsObject(
+sal_Bool SdDrawDocument::InsertBookmarkAsObject(
List* pBookmarkList,
List* pExchangeList, // Liste der zu verwendenen Namen
- BOOL /* bLink */,
+ sal_Bool /* bLink */,
::sd::DrawDocShell* pBookmarkDocSh,
Point* pObjPos)
{
- BOOL bOK = TRUE;
- BOOL bOLEObjFound = FALSE;
+ sal_Bool bOK = sal_True;
+ sal_Bool bOLEObjFound = sal_False;
::sd::View* pBMView = NULL;
SdDrawDocument* pBookmarkDoc = NULL;
@@ -990,7 +1008,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
}
else
{
- return FALSE;
+ return sal_False;
}
if (!pBookmarkList)
@@ -1004,7 +1022,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
SdrPage* pPage;
SdrPageView* pPV;
- for (USHORT nPos = 0; nPos < pBookmarkList->Count(); nPos++)
+ for (sal_uInt16 nPos = 0; nPos < pBookmarkList->Count(); nPos++)
{
/******************************************************************
* Namen der Bookmarks aus Liste holen
@@ -1020,7 +1038,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
if (pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() == OBJ_OLE2)
{
- bOLEObjFound = TRUE;
+ bOLEObjFound = sal_True;
}
if (!pBMView)
@@ -1043,7 +1061,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
pPV = pBMView->ShowSdrPage(pPage);
}
- pBMView->MarkObj(pObj, pPV, FALSE);
+ pBMView->MarkObj(pObj, pPV, sal_False);
}
}
}
@@ -1090,7 +1108,7 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
aObjPos = Rectangle(Point(), pPage->GetSize()).Center();
}
- ULONG nCountBefore = 0;
+ sal_uLong nCountBefore = 0;
if (pExchangeList)
{
@@ -1100,13 +1118,13 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
}
if (bOLEObjFound)
- pBMView->GetDoc()->SetAllocDocSh(TRUE);
+ pBMView->GetDoc()->SetAllocDocSh(sal_True);
SdDrawDocument* pTmpDoc = (SdDrawDocument*) pBMView->GetAllMarkedModel();
bOK = pView->Paste(*pTmpDoc, aObjPos, pPage);
if (bOLEObjFound)
- pBMView->GetDoc()->SetAllocDocSh(FALSE);
+ pBMView->GetDoc()->SetAllocDocSh(sal_False);
if (!bOLEObjFound)
delete pTmpDoc; // Wird ansonsten von der DocShell zerstoert
@@ -1116,9 +1134,9 @@ BOOL SdDrawDocument::InsertBookmarkAsObject(
if (pExchangeList)
{
// Anzahl Objekte nach dem Einfuegen bestimmen
- ULONG nCount = pPage->GetObjCount();
+ sal_uLong nCount = pPage->GetObjCount();
- for (ULONG nObj = nCountBefore; nObj < nCount; nObj++)
+ for (sal_uLong nObj = nCountBefore; nObj < nCount; nObj++)
{
// Zuverwendener Name aus Exchange-Liste holen
if (pExchangeList->GetCurObject())
@@ -1188,7 +1206,7 @@ void SdDrawDocument::DisposeLoadedModels()
bool SdDrawDocument::IsReadOnly() const
{
- return FALSE;
+ return sal_False;
}
@@ -1199,7 +1217,7 @@ bool SdDrawDocument::IsReadOnly() const
|*
\************************************************************************/
-void SdDrawDocument::SetAllocDocSh(BOOL bAlloc)
+void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc)
{
mbAllocDocSh = bAlloc;
@@ -1217,7 +1235,7 @@ void SdDrawDocument::SetAllocDocSh(BOOL bAlloc)
|*
\************************************************************************/
-List* SdDrawDocument::GetCustomShowList(BOOL bCreate)
+List* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
{
if (!mpCustomShowList && bCreate)
{
@@ -1293,9 +1311,9 @@ SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo)
if( pRet )
{
// try to get some information from stream
- const ULONG nStartPos = pRet->Tell();
- const ULONG nEndPos = pRet->Seek( STREAM_SEEK_TO_END );
- const ULONG nStmLen = nEndPos - nStartPos;
+ const sal_uLong nStartPos = pRet->Tell();
+ const sal_uLong nEndPos = pRet->Seek( STREAM_SEEK_TO_END );
+ const sal_uLong nStmLen = nEndPos - nStartPos;
sal_uChar aTestByte;
// try to read one byte
@@ -1316,13 +1334,13 @@ SvStream* SdDrawDocument::GetDocumentStream(SdrDocumentStreamInfo& rStreamInfo)
|*
\************************************************************************/
-void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnlyDuplicatePages, BOOL bUndo)
+void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool bOnlyDuplicatePages, sal_Bool bUndo)
{
::sd::View* pView = NULL;
- SfxUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = NULL;
if( bUndo && !IsUndoEnabled() )
- bUndo = FALSE;
+ bUndo = sal_False;
if (mpDocSh)
{
@@ -1335,7 +1353,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl
/***********************************************************
* Alle MasterPages pruefen
***********************************************************/
- USHORT nSdMasterPageCount = GetMasterSdPageCount( PK_STANDARD );
+ sal_uInt16 nSdMasterPageCount = GetMasterSdPageCount( PK_STANDARD );
for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--)
{
SdPage* pMaster = pMasterPage;
@@ -1343,12 +1361,12 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl
if (!pMaster)
{
- pMaster = (SdPage*) GetMasterSdPage( (USHORT) nMPage, PK_STANDARD );
- pNotesMaster = (SdPage*) GetMasterSdPage( (USHORT) nMPage, PK_NOTES );
+ pMaster = (SdPage*) GetMasterSdPage( (sal_uInt16) nMPage, PK_STANDARD );
+ pNotesMaster = (SdPage*) GetMasterSdPage( (sal_uInt16) nMPage, PK_NOTES );
}
else
{
- for ( USHORT nMPg = 0; nMPg < GetMasterPageCount(); nMPg++ )
+ for ( sal_uInt16 nMPg = 0; nMPg < GetMasterPageCount(); nMPg++ )
{
if ( pMaster == GetMasterPage( nMPg ) )
{
@@ -1365,21 +1383,21 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl
pNotesMaster )
{
// Do not delete master pages that have their precious flag set.
- BOOL bDeleteMaster = !pMaster->IsPrecious();
+ sal_Bool bDeleteMaster = !pMaster->IsPrecious();
String aLayoutName = pMaster->GetLayoutName();
if(bOnlyDuplicatePages )
{
// remove only duplicate pages
- bDeleteMaster = FALSE;
- for (USHORT i = 0; i < GetMasterSdPageCount( PK_STANDARD ); i++)
+ bDeleteMaster = sal_False;
+ for (sal_uInt16 i = 0; i < GetMasterSdPageCount( PK_STANDARD ); i++)
{
SdPage* pMPg = (SdPage*) GetMasterSdPage( i, PK_STANDARD );
if( pMPg != pMaster &&
pMPg->GetLayoutName() == aLayoutName )
{
// duplicate page found -> remove it
- bDeleteMaster = TRUE;
+ bDeleteMaster = sal_True;
}
}
}
@@ -1424,15 +1442,15 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl
EndUndo(); // schon hier, damit sich Joes Actions ZWISCHEN unsere eigenen schieben
// alte Layoutvorlagen loeschen, wenn sie nicht mehr benoetigt werden
- BOOL bDeleteOldStyleSheets = TRUE;
- for ( USHORT nMPg = 0;
+ sal_Bool bDeleteOldStyleSheets = sal_True;
+ for ( sal_uInt16 nMPg = 0;
nMPg < GetMasterPageCount() && bDeleteOldStyleSheets;
nMPg++ )
{
SdPage* pMPg = (SdPage*) GetMasterPage(nMPg);
if (pMPg->GetLayoutName() == aLayoutName)
{
- bDeleteOldStyleSheets = FALSE;
+ bDeleteOldStyleSheets = sal_False;
}
}
@@ -1479,16 +1497,16 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, BOOL bOnl
|* Ist rLayoutName leer, so wird die erste MasterPage genommen
\************************************************************************/
-void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
+void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
const String& rLayoutName,
SdDrawDocument* pSourceDoc,
- BOOL bMaster,
- BOOL bCheckMasters)
+ sal_Bool bMaster,
+ sal_Bool bCheckMasters)
{
if( mpDocSh )
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
- SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
const bool bUndo = IsUndoEnabled();
@@ -1513,7 +1531,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if (pSourceDoc)
{
List* pReplList = NULL;
- BOOL bLayoutReloaded = FALSE; // Wurde ex. Layout wieder geladen?
+ sal_Bool bLayoutReloaded = sal_False; // Wurde ex. Layout wieder geladen?
/*********************************************************************
|* LayoutName, Page and Notespage
@@ -1531,7 +1549,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
aSearchFor.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
aSearchFor.Append( String(SdResId(STR_LAYOUT_OUTLINE))) ;
- for (USHORT nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); nMP++)
+ for (sal_uInt16 nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); nMP++)
{
SdPage* pMP = (SdPage*) pSourceDoc->GetMasterPage(nMP);
@@ -1564,7 +1582,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
pUndoMgr->LeaveListAction();
if( mpDocSh )
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
OSL_FAIL( "SdDrawDocument::SetMasterPage() failed!" );
@@ -1573,13 +1591,13 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if (pSourceDoc != this)
{
- const USHORT nMasterPageCount = GetMasterPageCount();
- for ( USHORT nMPage = 0; nMPage < nMasterPageCount; nMPage++ )
+ const sal_uInt16 nMasterPageCount = GetMasterPageCount();
+ for ( sal_uInt16 nMPage = 0; nMPage < nMasterPageCount; nMPage++ )
{
SdPage* pCheckMaster = (SdPage*)GetMasterPage(nMPage);
if( pCheckMaster->GetName() == aNewLayoutName )
{
- bLayoutReloaded = TRUE;
+ bLayoutReloaded = sal_True;
break;
}
}
@@ -1610,7 +1628,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
{
// Es ist eine gleichnamige Vorlage vorhanden ist: Inhalte ersetzen
#ifdef DBG_UTIL
- BOOL bTest =
+ sal_Bool bTest =
#endif
pMySheet->SetName(pHisSheet->GetName());
DBG_ASSERT(bTest, "StyleSheet-Umbenennung fehlgeschlagen");
@@ -1640,7 +1658,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
pReplData->aNewName = pMySheet->GetName();
String aTemp(pMySheet->GetName());
- USHORT nPos = aTemp.SearchAscii( SD_LT_SEPARATOR );
+ sal_uInt16 nPos = aTemp.SearchAscii( SD_LT_SEPARATOR );
aTemp.Erase(0, nPos);
aTemp.Insert(aOldLayoutName, 0);
pReplData->aName = aTemp;
@@ -1670,7 +1688,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if (rParentOfOld.Len() > 0 && rParentOfNew.Len() == 0)
{
- for (ULONG i = 0; i < pReplList->Count(); i++)
+ for (sal_uLong i = 0; i < pReplList->Count(); i++)
{
StyleReplaceData* pRD = (StyleReplaceData*)pReplList->
GetObject(i);
@@ -1695,7 +1713,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
{
// UndoAction fuer das Erzeugen und Einfuegen vorn StyleSheets
// auf den UndoManager legen
- SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aCreatedStyles, TRUE);
+ SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction( this, aCreatedStyles, sal_True);
pUndoMgr->AddUndoAction(pMovStyles);
}
}
@@ -1723,7 +1741,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
// dagegen ersetzt, so muss vor der Position der alten Masterpage
// eingefuegt werden, damit ab jetzt beim Suchen (z. B. SdPage::
// SetPresentationLayout) die neue Masterpage zuerst gefunden wird
- USHORT nInsertPos = rOldMaster.GetPageNum();
+ sal_uInt16 nInsertPos = rOldMaster.GetPageNum();
BegUndo();
if (!bLayoutReloaded)
@@ -1754,7 +1772,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if (bMaster || bLayoutReloaded)
{
- for (USHORT nPage = 1; nPage < GetPageCount(); nPage++)
+ for (sal_uInt16 nPage = 1; nPage < GetPageCount(); nPage++)
{
pPage = (SdPage*) GetPage(nPage);
String aTest = pPage->GetLayoutName();
@@ -1783,7 +1801,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
(this,
pPage->IsMasterPage() ? aLayoutName : aOldLayoutName,
aLayoutName,
- eAutoLayout, eAutoLayout, FALSE, pPage);
+ eAutoLayout, eAutoLayout, sal_False, pPage);
pUndoMgr->AddUndoAction(pPLUndoAction);
}
pPage->SetPresentationLayout(aLayoutName);
@@ -1804,7 +1822,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
rOldMaster.GetUppBorder(),
rOldMaster.GetRgtBorder(),
rOldMaster.GetLwrBorder());
- pMaster->ScaleObjects(aSize, aBorderRect, TRUE);
+ pMaster->ScaleObjects(aSize, aBorderRect, sal_True);
pMaster->SetSize(aSize);
pMaster->SetBorder(rOldMaster.GetLftBorder(),
rOldMaster.GetUppBorder(),
@@ -1818,7 +1836,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
rOldNotesMaster.GetUppBorder(),
rOldNotesMaster.GetRgtBorder(),
rOldNotesMaster.GetLwrBorder());
- pNotesMaster->ScaleObjects(aSize, aNotesBorderRect, TRUE);
+ pNotesMaster->ScaleObjects(aSize, aNotesBorderRect, sal_True);
pNotesMaster->SetSize(aSize);
pNotesMaster->SetBorder(rOldNotesMaster.GetLftBorder(),
rOldNotesMaster.GetUppBorder(),
@@ -1852,9 +1870,9 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
\********************************************************************/
String aName = String(SdResId(STR_LAYOUT_DEFAULT_NAME));
String aTest;
- BOOL bNotANewName = TRUE;
- USHORT nCount = 0;
- USHORT nMPgCount = GetMasterPageCount();
+ sal_Bool bNotANewName = sal_True;
+ sal_uInt16 nCount = 0;
+ sal_uInt16 nMPgCount = GetMasterPageCount();
for (nCount = 0; bNotANewName; nCount++)
{
@@ -1864,15 +1882,15 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
aTest += String::CreateFromInt32( nCount );
// gibt's schon eine, die so heisst?
- bNotANewName = FALSE;
- for (USHORT nMPg = 1; nMPg < nMPgCount; nMPg++)
+ bNotANewName = sal_False;
+ for (sal_uInt16 nMPg = 1; nMPg < nMPgCount; nMPg++)
{
const SdrPage* pTest = GetMasterPage(nMPg);
String aPageLayoutName(pTest->GetLayoutName());
aPageLayoutName.Erase( aPageLayoutName.SearchAscii( SD_LT_SEPARATOR ));
if (aPageLayoutName == aTest)
- bNotANewName = TRUE;
+ bNotANewName = sal_True;
}
}
aName = aTest;
@@ -1889,7 +1907,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if( bUndo )
{
- SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, TRUE);
+ SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction(this, aCreatedStyles, sal_True);
pUndoMgr->AddUndoAction(pMovStyles);
}
@@ -1900,7 +1918,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
if( bUndo )
BegUndo();
- pMaster = (SdPage*) AllocPage(TRUE);
+ pMaster = (SdPage*) AllocPage(sal_True);
pMaster->SetSize(pSelectedPage->GetSize());
pMaster->SetBorder(pSelectedPage->GetLftBorder(),
pSelectedPage->GetUppBorder(),
@@ -1915,7 +1933,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
pMaster->SetAutoLayout(AUTOLAYOUT_NONE, true, true);
- pNotesMaster = (SdPage*) AllocPage(TRUE);
+ pNotesMaster = (SdPage*) AllocPage(sal_True);
pNotesMaster->SetPageKind(PK_NOTES);
pNotesMaster->SetSize(pNotes->GetSize());
pNotesMaster->SetBorder(pNotes->GetLftBorder(),
@@ -1940,7 +1958,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
List* pPageList = new List;
if (bMaster)
{
- for (USHORT nPage = 1; nPage < GetPageCount(); nPage++)
+ for (sal_uInt16 nPage = 1; nPage < GetPageCount(); nPage++)
{
pPage = (SdPage*) GetPage(nPage);
const String s(pPage->GetLayoutName());
@@ -1971,7 +1989,7 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
SdPresentationLayoutUndoAction * pPLUndoAction =
new SdPresentationLayoutUndoAction
(this, aOldLayoutName, aName,
- eOldAutoLayout, eNewAutoLayout, TRUE,
+ eOldAutoLayout, eNewAutoLayout, sal_True,
pPage);
pUndoMgr->AddUndoAction(pPLUndoAction);
}
@@ -2006,14 +2024,14 @@ void SdDrawDocument::SetMasterPage(USHORT nSdPageNum,
pUndoMgr->LeaveListAction();
if( mpDocSh )
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
}
void SdDrawDocument::Merge(SdrModel& rSourceModel,
- USHORT nFirstPageNum, USHORT nLastPageNum,
- USHORT nDestPos,
+ sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
+ sal_uInt16 nDestPos,
bool bMergeMasterPages, bool bAllMasterPages,
bool bUndo, bool bTreadSourceAsConst)
{
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 150cf7939272..3470a41f46d1 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -116,6 +116,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <svl/itemset.hxx>
+#include "app.hrc"
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -149,8 +150,8 @@ void SdDrawDocument::CreateLayoutTemplates()
// nicht benutzt, nicht benutzerdefiniert
// SB hatte wahrscheinlich Probleme mit SFXSTYLEBIT_AUTO, da dann gar nichts
// mehr im Gestalter angezeigt wird. Dieses Problem ist zu 364 j behoben worden
- // USHORT nMask = SFXSTYLEBIT_ALL & ~(SFXSTYLEBIT_USED | SFXSTYLEBIT_USERDEF);
- USHORT nMask = SFXSTYLEBIT_AUTO;
+ // sal_uInt16 nMask = SFXSTYLEBIT_ALL & ~(SFXSTYLEBIT_USED | SFXSTYLEBIT_USERDEF);
+ sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
String aName(aStdName);
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -161,7 +162,7 @@ void SdDrawDocument::CreateLayoutTemplates()
String aNullStr;
::basegfx::B2DPolyPolygon aNullPolyPolygon;
- Color aNullCol(RGB_Color(COL_BLACK));
+ Color aNullCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE));
XDash aNullDash;
XGradient aNullGrad(aNullCol,RGB_Color(COL_WHITE));
@@ -171,19 +172,20 @@ void SdDrawDocument::CreateLayoutTemplates()
// Linienattribute (Extended OutputDevice)
rISet.Put(XLineStyleItem(XLINE_SOLID));
- rISet.Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
+ rISet.Put(XLineColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_STROKE)));
rISet.Put(XLineWidthItem(0));
rISet.Put(XLineDashItem(pPool,aNullDash));
rISet.Put(XLineStartItem(pPool,aNullPolyPolygon));
rISet.Put(XLineEndItem(pPool,aNullPolyPolygon));
- rISet.Put(XLineStartWidthItem(300));
- rISet.Put(XLineEndWidthItem(300));
+ rISet.Put(XLineStartWidthItem(200));
+ rISet.Put(XLineEndWidthItem(200));
rISet.Put(XLineStartCenterItem());
rISet.Put(XLineEndCenterItem());
+ rISet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK));
// Fuellattribute (Extended OutputDevice)
rISet.Put(XFillStyleItem(XFILL_SOLID));
- rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING))); // "Blue 8"
+ rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING)));
rISet.Put(XFillGradientItem(pPool,aNullGrad));
rISet.Put(XFillHatchItem(pPool,aNullHatch));
@@ -194,10 +196,10 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put(XFillBitmapItem(pPool,aNullBmp));
// Schattenattribute (Drawing Engine)
- rISet.Put(SdrShadowItem(FALSE));
+ rISet.Put(SdrShadowItem(sal_False));
rISet.Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
- rISet.Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz
- rISet.Put(SdrShadowYDistItem(300));
+ rISet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+ rISet.Put(SdrShadowYDistItem(200));
Font aLatinFont, aCJKFont, aCTLFont;
@@ -228,8 +230,8 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) );
rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) );
- rISet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE ));
- rISet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW ));
+ rISet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE ));
+ rISet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW ));
rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE));
rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE));
rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
@@ -249,7 +251,7 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) );
// #i16874# enable kerning by default but only for new documents
- rISet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rISet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
// Bullet
// BulletItem und BulletFont fuer Titel und Gliederung
@@ -293,7 +295,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XLineStartWidthItem(700));
pISet->Put(XLineEndWidthItem(300));
- pISet->Put(XLineStartCenterItem(TRUE));
+ pISet->Put(XLineStartCenterItem(sal_True));
// ---- Objekt mit Schatten -------------------------------------------
@@ -303,12 +305,12 @@ void SdDrawDocument::CreateLayoutTemplates()
pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHSHADOW );
pISet = &pSheet->GetItemSet();
- pISet->Put(SdrShadowItem(TRUE));
+ pISet->Put(SdrShadowItem(sal_True));
pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
- pISet->Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz
- pISet->Put(SdrShadowYDistItem(300));
+ pISet->Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+ pISet->Put(SdrShadowYDistItem(200));
- // ---- Objekt ohne Fllung -------------------------------------------
+ // ---- Objekt ohne F�llung -------------------------------------------
aName = String(SdResId(STR_POOLSHEET_OBJWITHOUTFILL));
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -317,6 +319,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(XFILL_NONE));
+ pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
// ---- Text ----------------------------------------------------------
@@ -329,7 +332,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XLineStyleItem(XLINE_NONE));
pISet->Put(XFillStyleItem(XFILL_NONE));
- // ---- Textk”rper ----------------------------------------------------
+ // ---- Textk�rper ----------------------------------------------------
aName = String(SdResId(STR_POOLSHEET_TEXTBODY));
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -342,7 +345,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(SvxFontHeightItem(564, 100, EE_CHAR_FONTHEIGHT)); // 16 pt
- // ---- Textk”rper mit Blocksatz --------------------------------------
+ // ---- Textk�rper mit Blocksatz --------------------------------------
aName = String(SdResId(STR_POOLSHEET_TEXTBODY_JUSTIFY));
pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
@@ -395,7 +398,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet->Put(XFillStyleItem(XFILL_SOLID));
pISet->Put(XFillColorItem(String(), RGB_Color(COL_CYAN)));
- pISet->Put(SdrShadowItem(TRUE));
+ pISet->Put(SdrShadowItem(sal_True));
pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
pISet->Put(SdrShadowXDistItem(200)); // 2 mm Schattendistanz
pISet->Put(SdrShadowYDistItem(200));
@@ -419,7 +422,7 @@ void SdDrawDocument::CreateLayoutTemplates()
Color aOrange4(255, 204, 153);
pISet->Put(XFillColorItem(String(), aOrange4));
- pISet->Put(SdrShadowItem(TRUE));
+ pISet->Put(SdrShadowItem(sal_True));
pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
pISet->Put(SdrShadowXDistItem(200)); // 2 mm Schattendistanz
pISet->Put(SdrShadowYDistItem(200));
@@ -495,6 +498,7 @@ void SdDrawDocument::CreateLayoutTemplates()
pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(XFILL_NONE));
+ pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT )); // 12 pt
@@ -557,7 +561,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
// ---- Default -----------------------------------------------
- USHORT nMask = SFXSTYLEBIT_AUTO;
+ sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
OUString aDefaultCellStyleName( RTL_CONSTASCII_USTRINGPARAM("default") );
@@ -611,7 +615,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
rISet.Put( SdrTextLowerDistItem( 130 ) );
rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) );
- rISet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rISet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
rISet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) );
rISet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_LEFT) );
@@ -723,11 +727,11 @@ void SdDrawDocument::CreateDefaultCellStyles()
|*
\************************************************************************/
-USHORT SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const
+sal_uInt16 SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const
{
- USHORT nResult = 0;
- USHORT nPage;
- USHORT nPageCount = GetPageCount();
+ sal_uInt16 nResult = 0;
+ sal_uInt16 nPage;
+ sal_uInt16 nPageCount = GetPageCount();
for (nPage = 0; nPage < nPageCount; nPage++)
{
@@ -771,14 +775,14 @@ void SdDrawDocument::StopOnlineSpelling()
|*
\************************************************************************/
-void SdDrawDocument::StartOnlineSpelling(BOOL bForceSpelling)
+void SdDrawDocument::StartOnlineSpelling(sal_Bool bForceSpelling)
{
if (mbOnlineSpell && (bForceSpelling || mbInitialOnlineSpellingEnabled) &&
mpDocSh && !mpDocSh->IsReadOnly() )
{
StopOnlineSpelling();
- ::sd::Outliner* pOutl = GetInternalOutliner(TRUE);
+ ::sd::Outliner* pOutl = GetInternalOutliner(sal_True);
Reference< XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() );
if ( xSpellChecker.is() )
@@ -791,7 +795,7 @@ void SdDrawDocument::StartOnlineSpelling(BOOL bForceSpelling)
pOutl->SetDefaultLanguage( meLanguage );
mpOnlineSpellingList = new ShapeList;
- USHORT nPage;
+ sal_uInt16 nPage;
for ( nPage = 0; nPage < GetPageCount(); nPage++ )
{
@@ -842,14 +846,14 @@ void SdDrawDocument::FillOnlineSpellingList(SdPage* pPage)
SdrObjListIter aGroupIter(*((SdrObjGroup*)pObj)->GetSubList(),
IM_DEEPNOGROUPS);
- BOOL bSubTextObjFound = FALSE;
+ sal_Bool bSubTextObjFound = sal_False;
while (aGroupIter.IsMore() && !bSubTextObjFound)
{
if (aGroupIter.Next()->GetOutlinerParaObject())
{
// Textobjekt im Gruppenobjekt gefunden
- bSubTextObjFound = TRUE;
+ bSubTextObjFound = sal_True;
}
}
@@ -911,7 +915,7 @@ IMPL_LINK(SdDrawDocument, OnlineSpellingHdl, Timer*, EMPTYARG )
else
{
// Spelling wurde initial durchgefuehrt
- mbInitialOnlineSpellingEnabled = FALSE;
+ mbInitialOnlineSpellingEnabled = sal_False;
// Suche beenden
StopOnlineSpelling();
@@ -933,14 +937,14 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
{
if (pObj && pObj->GetOutlinerParaObject() /* && pObj != pView->GetTextEditObject() */)
{
- mbHasOnlineSpellErrors = FALSE;
- ::sd::Outliner* pOutl = GetInternalOutliner(TRUE);
- pOutl->SetUpdateMode(TRUE);
+ mbHasOnlineSpellErrors = sal_False;
+ ::sd::Outliner* pOutl = GetInternalOutliner(sal_True);
+ pOutl->SetUpdateMode(sal_True);
Link aEvtHdl = pOutl->GetStatusEventHdl();
pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl));
- USHORT nOldOutlMode = pOutl->GetMode();
- USHORT nOutlMode = OUTLINERMODE_TEXTOBJECT;
+ sal_uInt16 nOldOutlMode = pOutl->GetMode();
+ sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
if (((SdrTextObj*) pObj)->GetObjInventor() == SdrInventor &&
((SdrTextObj*) pObj)->GetObjIdentifier() == OBJ_OUTLINETEXT)
{
@@ -976,9 +980,9 @@ void SdDrawDocument::SpellObject(SdrTextObj* pObj)
}
pOutl->SetStatusEventHdl(aEvtHdl);
- pOutl->SetUpdateMode(FALSE);
+ pOutl->SetUpdateMode(sal_False);
pOutl->Init( nOldOutlMode );
- mbHasOnlineSpellErrors = FALSE;
+ mbHasOnlineSpellErrors = sal_False;
}
}
@@ -1023,7 +1027,7 @@ void SdDrawDocument::RemoveObject(SdrObject* pObj, SdPage* /*pPage*/)
\************************************************************************/
IMPL_LINK(SdDrawDocument, OnlineSpellEventHdl, EditStatus*, pEditStat)
{
- ULONG nStat = pEditStat->GetStatusWord();
+ sal_uLong nStat = pEditStat->GetStatusWord();
mbHasOnlineSpellErrors = (nStat & EE_STAT_WRONGWORDCHANGED) != 0;
return(0);
@@ -1041,7 +1045,7 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
delete mpOnlineSearchItem;
mpOnlineSearchItem = NULL;
- USHORT nCommand = pInfo->nCommand;
+ sal_uInt16 nCommand = pInfo->nCommand;
if (nCommand == SPELLCMD_IGNOREWORD
// restart when add to dictionary takes place, too.
@@ -1049,7 +1053,7 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
{
if(pObj && pOutl && pObj->ISA(SdrTextObj))
{
- BOOL bModified(IsChanged());
+ sal_Bool bModified(IsChanged());
((SdrTextObj*)pObj)->SetOutlinerParaObject(pOutl->CreateParaObject());
SetChanged(bModified);
pObj->BroadcastObjectChange();
@@ -1074,9 +1078,9 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
void SdDrawDocument::RestoreLayerNames()
{
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- USHORT nLayerCount = rLayerAdmin.GetLayerCount();
+ sal_uInt16 nLayerCount = rLayerAdmin.GetLayerCount();
- for (USHORT nLayer = 0; nLayer < nLayerCount; nLayer++)
+ for (sal_uInt16 nLayer = 0; nLayer < nLayerCount; nLayer++)
{
SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer);
@@ -1114,10 +1118,10 @@ void SdDrawDocument::RestoreLayerNames()
|*
\************************************************************************/
-String SdDrawDocument::CreatePageNumValue(USHORT nNum) const
+String SdDrawDocument::CreatePageNumValue(sal_uInt16 nNum) const
{
String aPageNumValue;
- BOOL bUpper = FALSE;
+ sal_Bool bUpper = sal_False;
switch (mePageNumType)
{
@@ -1128,7 +1132,7 @@ String SdDrawDocument::CreatePageNumValue(USHORT nNum) const
aPageNumValue += (sal_Unicode)(char)((nNum - 1) % 26 + 'a');
break;
case SVX_ROMAN_UPPER:
- bUpper = TRUE;
+ bUpper = sal_True;
case SVX_ROMAN_LOWER:
aPageNumValue += SvxNumberFormat::CreateRomanString(nNum, bUpper);
break;
@@ -1156,11 +1160,11 @@ String SdDrawDocument::CreatePageNumValue(USHORT nNum) const
void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const String& rNewName)
{
String aOldName(rOldLayoutName);
- USHORT nPos = aOldName.SearchAscii( SD_LT_SEPARATOR );
+ sal_uInt16 nPos = aOldName.SearchAscii( SD_LT_SEPARATOR );
// erase everything after '~LT~'
aOldName.Erase(nPos + sizeof(SD_LT_SEPARATOR) - 1 );
- USHORT nLen = aOldName.Len();
+ sal_uInt16 nLen = aOldName.Len();
List aReplList;
SfxStyleSheetIterator aIter(mxStyleSheetPool.get(), SD_STYLE_FAMILY_MASTERPAGE);
@@ -1197,7 +1201,7 @@ void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const St
// an allen Seiten, die das jetzt umbeannte Layout benutzen, die
// Textobjekte von der Aenderung unterrichten und Layoutnamen setzen
- USHORT nPage;
+ sal_uInt16 nPage;
for (nPage = 0; nPage < GetPageCount(); nPage++)
{
SdPage* pPage = (SdPage*) GetPage(nPage);
@@ -1207,7 +1211,7 @@ void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const St
{
pPage->SetLayoutName(aPageLayoutName);
- for (ULONG nObj = 0; nObj < pPage->GetObjCount(); nObj++)
+ for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++)
{
SdrObject* pObj = pPage->GetObj(nObj);
@@ -1255,7 +1259,7 @@ void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const St
pPage->SetLayoutName(aPageLayoutName);
pPage->SetName(rNewName);
- for (ULONG nObj = 0; nObj < pPage->GetObjCount(); nObj++)
+ for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++)
{
SdrObject* pObj = pPage->GetObj(nObj);
@@ -1318,14 +1322,14 @@ void SdDrawDocument::SetTextDefaults() const
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, FALSE);
+ SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, sal_False);
aNumberFormat.SetLSpace( 0 );
aNumberFormat.SetAbsLSpace( 0 );
aNumberFormat.SetFirstLineOffset( 0 );
aNumRule.SetLevel( 0, aNumberFormat );
- for( USHORT i = 1; i < aNumRule.GetLevelCount(); i++ )
+ for( sal_uInt16 i = 1; i < aNumRule.GetLevelCount(); i++ )
{
const short nLSpace = (i + 1) * 600;
aNumberFormat.SetLSpace(nLSpace);
@@ -1448,17 +1452,17 @@ void ModifyGuard::init()
mpDocShell = mpDoc->GetDocSh();
}
- mbIsEnableSetModified = mpDocShell ? mpDocShell->IsEnableSetModified() : FALSE;
- mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : FALSE;
+ mbIsEnableSetModified = mpDocShell ? mpDocShell->IsEnableSetModified() : sal_False;
+ mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : sal_False;
if( mbIsEnableSetModified )
- mpDocShell->EnableSetModified( FALSE );
+ mpDocShell->EnableSetModified( sal_False );
}
ModifyGuard::~ModifyGuard()
{
if( mbIsEnableSetModified )
- mpDocShell->EnableSetModified( TRUE );
+ mpDocShell->EnableSetModified( sal_True );
if( mpDoc && (mpDoc->IsChanged() != mbIsDocumentChanged) )
mpDoc->SetChanged(mbIsDocumentChanged);
diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx
index 2d024f8a7c84..0c3979bb6ec0 100644..100755
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -42,7 +42,7 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP
{
if ( mpCustomShowList )
{
- for (ULONG i = 0; i < mpCustomShowList->Count(); i++)
+ for (sal_uLong i = 0; i < mpCustomShowList->Count(); i++)
{
SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(i);
if( pNewPage == 0 )
diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src
index a0ed03c3ce06..a0ed03c3ce06 100755..100644
--- a/sd/source/core/glob.src
+++ b/sd/source/core/glob.src
diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx
index 6c19008f6c16..21263657c503 100644..100755
--- a/sd/source/core/pglink.cxx
+++ b/sd/source/core/pglink.cxx
@@ -105,21 +105,21 @@ void SdPageLink::DataChanged( const String& ,
List aBookmarkList;
aBookmarkList.Insert(&aBookmarkName);
- USHORT nInsertPos = pPage->GetPageNum();
- BOOL bLink = TRUE;
- BOOL bReplace = TRUE;
- BOOL bNoDialogs = FALSE;
- BOOL bCopy = FALSE;
+ sal_uInt16 nInsertPos = pPage->GetPageNum();
+ sal_Bool bLink = sal_True;
+ sal_Bool bReplace = sal_True;
+ sal_Bool bNoDialogs = sal_False;
+ sal_Bool bCopy = sal_False;
if( pDoc->pDocLockedInsertingLinks )
{
// resolving links while loading pDoc
- bNoDialogs = TRUE;
- bCopy = TRUE;
+ bNoDialogs = sal_True;
+ bCopy = sal_True;
}
pDoc->InsertBookmarkAsPage(&aBookmarkList, NULL, bLink, bReplace,
- nInsertPos, bNoDialogs, NULL, bCopy, TRUE, TRUE);
+ nInsertPos, bNoDialogs, NULL, bCopy, sal_True, sal_True);
if( !pDoc->pDocLockedInsertingLinks )
pDoc->CloseBookmarkDoc();
diff --git a/sd/source/core/sdattr.cxx b/sd/source/core/sdattr.cxx
index f1e5fd073ea8..743fb0b3887a 100644..100755
--- a/sd/source/core/sdattr.cxx
+++ b/sd/source/core/sdattr.cxx
@@ -43,7 +43,7 @@ TYPEINIT1_AUTOFACTORY( DiaEffectItem, SfxEnumItem );
DiaEffectItem::DiaEffectItem( presentation::FadeEffect eFE ) :
- SfxEnumItem( ATTR_DIA_EFFECT, (USHORT)eFE )
+ SfxEnumItem( ATTR_DIA_EFFECT, (sal_uInt16)eFE )
{
}
@@ -60,7 +60,7 @@ SfxPoolItem* DiaEffectItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* DiaEffectItem::Create( SvStream& rIn, USHORT ) const
+SfxPoolItem* DiaEffectItem::Create( SvStream& rIn, sal_uInt16 ) const
{
return new DiaEffectItem( rIn );
}
@@ -74,7 +74,7 @@ TYPEINIT1_AUTOFACTORY( DiaSpeedItem, SfxEnumItem );
DiaSpeedItem::DiaSpeedItem( FadeSpeed eFS ) :
- SfxEnumItem( ATTR_DIA_SPEED, (USHORT)eFS )
+ SfxEnumItem( ATTR_DIA_SPEED, (sal_uInt16)eFS )
{
}
@@ -91,7 +91,7 @@ SfxPoolItem* DiaSpeedItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, USHORT ) const
+SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, sal_uInt16 ) const
{
return new DiaSpeedItem( rIn );
}
@@ -104,7 +104,7 @@ SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, USHORT ) const
TYPEINIT1_AUTOFACTORY( DiaAutoItem, SfxEnumItem );
DiaAutoItem::DiaAutoItem( PresChange eChange ) :
- SfxEnumItem( ATTR_DIA_AUTO, (USHORT)eChange )
+ SfxEnumItem( ATTR_DIA_AUTO, (sal_uInt16)eChange )
{
}
@@ -121,7 +121,7 @@ SfxPoolItem* DiaAutoItem::Clone( SfxItemPool* ) const
}
-SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, USHORT ) const
+SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, sal_uInt16 ) const
{
return new DiaAutoItem( rIn );
}
@@ -134,7 +134,7 @@ SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, USHORT ) const
TYPEINIT1_AUTOFACTORY( DiaTimeItem, SfxUInt32Item );
-DiaTimeItem::DiaTimeItem( UINT32 nValue ) :
+DiaTimeItem::DiaTimeItem( sal_uInt32 nValue ) :
SfxUInt32Item( ATTR_DIA_TIME, nValue )
{
}
diff --git a/sd/source/core/sdiocmpt.cxx b/sd/source/core/sdiocmpt.cxx
index f67f550b984c..306f9ff394dd 100644..100755
--- a/sd/source/core/sdiocmpt.cxx
+++ b/sd/source/core/sdiocmpt.cxx
@@ -36,12 +36,12 @@
//////////////////////////////////////////////////////////////////////////////
-old_SdrDownCompat::old_SdrDownCompat(SvStream& rNewStream, UINT16 nNewMode)
+old_SdrDownCompat::old_SdrDownCompat(SvStream& rNewStream, sal_uInt16 nNewMode)
: rStream(rNewStream),
nSubRecSiz(0),
nSubRecPos(0),
nMode(nNewMode),
- bOpen(FALSE)
+ bOpen(sal_False)
{
OpenSubRecord();
}
@@ -78,7 +78,7 @@ void old_SdrDownCompat::OpenSubRecord()
Write();
}
- bOpen = TRUE;
+ bOpen = sal_True;
}
void old_SdrDownCompat::CloseSubRecord()
@@ -86,11 +86,11 @@ void old_SdrDownCompat::CloseSubRecord()
if(rStream.GetError())
return;
- UINT32 nAktPos(rStream.Tell());
+ sal_uInt32 nAktPos(rStream.Tell());
if(nMode == STREAM_READ)
{
- UINT32 nReadAnz(nAktPos - nSubRecPos);
+ sal_uInt32 nReadAnz(nAktPos - nSubRecPos);
if(nReadAnz != nSubRecSiz)
{
rStream.Seek(nSubRecPos + nSubRecSiz);
@@ -104,7 +104,7 @@ void old_SdrDownCompat::CloseSubRecord()
rStream.Seek(nAktPos);
}
- bOpen = FALSE;
+ bOpen = sal_False;
}
/*************************************************************************
@@ -113,7 +113,7 @@ void old_SdrDownCompat::CloseSubRecord()
|*
\************************************************************************/
-SdIOCompat::SdIOCompat(SvStream& rNewStream, USHORT nNewMode, UINT16 nVer)
+SdIOCompat::SdIOCompat(SvStream& rNewStream, sal_uInt16 nNewMode, sal_uInt16 nVer)
: old_SdrDownCompat(rNewStream, nNewMode), nVersion(nVer)
{
if (nNewMode == STREAM_WRITE)
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index e225235a9092..3a90a78a27c4 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -65,7 +65,7 @@
#include "../ui/inc/DrawDocShell.hxx"
#include "Outliner.hxx"
-
+#include "app.hrc"
#include "eetext.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
@@ -97,20 +97,20 @@ TYPEINIT2( SdPage, FmFormPage, SdrObjUserCall );
|*
\************************************************************************/
-SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, BOOL bMasterPage)
+SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage)
: FmFormPage(rNewDoc, pBasic, bMasterPage)
, SdrObjUserCall()
, mePageKind(PK_STANDARD)
, meAutoLayout(AUTOLAYOUT_NONE)
-, mbSelected(FALSE)
+, mbSelected(sal_False)
, mePresChange(PRESCHANGE_MANUAL)
, mnTime(1)
-, mbSoundOn(FALSE)
-, mbExcluded(FALSE)
-, mbLoopSound(FALSE)
-, mbStopSound(FALSE)
-, mbScaleObjects(TRUE)
-, mbBackgroundFullSize( FALSE )
+, mbSoundOn(sal_False)
+, mbExcluded(sal_False)
+, mbLoopSound(sal_False)
+, mbStopSound(sal_False)
+, mbScaleObjects(sal_True)
+, mbBackgroundFullSize( sal_False )
, meCharSet(gsl_getSystemTextEncoding())
, mnPaperBin(PAPERBIN_PRINTER_SETTINGS)
, mpPageLink(NULL)
@@ -194,7 +194,7 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc
case PRESOBJ_CALC:
case PRESOBJ_IMAGE:
case PRESOBJ_MEDIA:
- bFound = TRUE;
+ bFound = sal_True;
break;
default:
break;
@@ -247,10 +247,10 @@ void SdPage::EnsureMasterPageDefaultBackground()
/** creates a presentation object with the given PresObjKind on this page. A user call will be set
*/
-SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL /* bInsert */ )
+SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, sal_Bool bVertical, const Rectangle& rRect, sal_Bool /* bInsert */ )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
SdrObject* pSdrObj = NULL;
@@ -265,7 +265,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if (mbMaster)
{
- pSdrObj->SetNotVisibleAsMaster(TRUE);
+ pSdrObj->SetNotVisibleAsMaster(sal_True);
}
}
break;
@@ -276,7 +276,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if (mbMaster)
{
- pSdrObj->SetNotVisibleAsMaster(TRUE);
+ pSdrObj->SetNotVisibleAsMaster(sal_True);
}
}
break;
@@ -287,7 +287,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if (mbMaster)
{
- pSdrObj->SetNotVisibleAsMaster(TRUE);
+ pSdrObj->SetNotVisibleAsMaster(sal_True);
}
}
break;
@@ -386,7 +386,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
pSdrObj = new SdrPageObj();
}
- pSdrObj->SetResizeProtect(TRUE);
+ pSdrObj->SetResizeProtect(sal_True);
}
break;
@@ -416,7 +416,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// Tell the object EARLY that it is vertical to have the
// defaults for AutoGrowWidth/Height reversed
if(bVertical)
- ((SdrTextObj*)pSdrObj)->SetVerticalWriting(TRUE);
+ ((SdrTextObj*)pSdrObj)->SetVerticalWriting(sal_True);
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
if( bVertical )
@@ -432,9 +432,9 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// potential problem: This action was still NOT
// adapted for vertical text. This sure needs to be done.
if(bVertical)
- aTempAttr.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aTempAttr.Put(SdrTextAutoGrowWidthItem(sal_False));
else
- aTempAttr.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aTempAttr.Put(SdrTextAutoGrowHeightItem(sal_False));
}
// check if we need another vertical adjustement than the default
@@ -462,7 +462,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
{
SdrOutliner* pOutliner = ( (SdDrawDocument*) GetModel() )->GetInternalOutliner();
- USHORT nOutlMode = pOutliner->GetMode();
+ sal_uInt16 nOutlMode = pOutliner->GetMode();
pOutliner->Init( OUTLINERMODE_TEXTOBJECT );
pOutliner->SetStyleSheet( 0, NULL );
pOutliner->SetVertical( bVertical );
@@ -508,7 +508,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
// Hintergrundobjekte der MasterPage
pSdrObj->SetLayer( rLayerAdmin.
- GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE) );
+ GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False) );
}
// Objekt am StyleSheet anmelden
@@ -517,12 +517,12 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
{
SfxStyleSheet* pSheetForPresObj = GetStyleSheetForPresObj(eObjKind);
if(pSheetForPresObj)
- pSdrObj->SetStyleSheet(pSheetForPresObj, FALSE);
+ pSdrObj->SetStyleSheet(pSheetForPresObj, sal_False);
}
if (eObjKind == PRESOBJ_OUTLINE)
{
- for (USHORT nLevel = 1; nLevel < 10; nLevel++)
+ for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
String aName(maLayoutName);
aName += sal_Unicode( ' ' );
@@ -541,7 +541,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
eObjKind == PRESOBJ_GRAPHIC )
{
SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() );
- aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ aSet.Put( SdrTextContourFrameItem( sal_True ) );
aSet.Put( SvxAdjustItem( SVX_ADJUST_CENTER, EE_PARA_JUST ) );
pSdrObj->SetMergedItemSet(aSet);
@@ -578,7 +578,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForMasterPageBackground() const
{
String aName(GetLayoutName());
String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));
- USHORT nPos = aName.Search(aSep);
+ sal_uInt16 nPos = aName.Search(aSep);
if (nPos != STRING_NOTFOUND)
{
@@ -597,7 +597,7 @@ SfxStyleSheet* SdPage::GetStyleSheetForPresObj(PresObjKind eObjKind) const
{
String aName(GetLayoutName());
String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ));
- USHORT nPos = aName.Search(aSep);
+ sal_uInt16 nPos = aName.Search(aSep);
if (nPos != STRING_NOTFOUND)
{
nPos = nPos + aSep.Len();
@@ -712,8 +712,8 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
{
if( pObj->GetUserCall() )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
if( bUndo )
pUndoManager->AddUndoAction( new UndoObjectUserCall(*pObj) );
@@ -726,9 +726,9 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
{
// MasterPage-Objekt wurde veraendert, daher
// Objekte auf allen Seiten anpassen
- USHORT nPageCount = ((SdDrawDocument*) pModel)->GetSdPageCount(mePageKind);
+ sal_uInt16 nPageCount = ((SdDrawDocument*) pModel)->GetSdPageCount(mePageKind);
- for (USHORT i = 0; i < nPageCount; i++)
+ for (sal_uInt16 i = 0; i < nPageCount; i++)
{
SdPage* pLoopPage = ((SdDrawDocument*) pModel)->GetSdPage(i, mePageKind);
@@ -758,10 +758,10 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
|*
\************************************************************************/
-void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate )
+void SdPage::CreateTitleAndLayout(sal_Bool bInit, sal_Bool bCreate )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
SdPage* pMasterPage = this;
@@ -807,7 +807,7 @@ void SdPage::CreateTitleAndLayout(BOOL bInit, BOOL bCreate )
while( iter != aAreas.end() )
{
- SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, FALSE, (*iter++), TRUE) );
+ SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, sal_False, (*iter++), sal_True) );
// #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
pPageObj->SetReferencedPage(0L);
@@ -859,17 +859,17 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
if( eObjKind == PRESOBJ_TITLE )
{
Rectangle aTitleRect( GetTitleRect() );
- return CreatePresObj(PRESOBJ_TITLE, FALSE, aTitleRect, bInsert);
+ return CreatePresObj(PRESOBJ_TITLE, sal_False, aTitleRect, bInsert);
}
else if( eObjKind == PRESOBJ_OUTLINE )
{
Rectangle aLayoutRect( GetLayoutRect() );
- return CreatePresObj( PRESOBJ_OUTLINE, FALSE, aLayoutRect, bInsert);
+ return CreatePresObj( PRESOBJ_OUTLINE, sal_False, aLayoutRect, bInsert);
}
else if( eObjKind == PRESOBJ_NOTES )
{
Rectangle aLayoutRect( GetLayoutRect() );
- return CreatePresObj( PRESOBJ_NOTES, FALSE, aLayoutRect, bInsert);
+ return CreatePresObj( PRESOBJ_NOTES, sal_False, aLayoutRect, bInsert);
}
else if( (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_DATETIME) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_HEADER ) )
{
@@ -894,21 +894,21 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
Point aPos( long(nLftBorder+(aPageSize.Width()*0.05)), Y );
Size aSize( W1, H );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_DATETIME, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_DATETIME, sal_False, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_FOOTER )
{
Point aPos( long(nLftBorder+ aPageSize.Width() * 0.342), Y );
Size aSize( W2, H );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_FOOTER, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_FOOTER, sal_False, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_SLIDENUMBER )
{
Point aPos( long(nLftBorder+(aPageSize.Width()*0.717)), Y );
Size aSize( W1, H );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_SLIDENUMBER, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_SLIDENUMBER, sal_False, aRect, bInsert );
}
else
{
@@ -939,25 +939,25 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
{
Point aPos( X1, Y1 );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_HEADER, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_HEADER, sal_False, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_DATETIME )
{
Point aPos( X2, Y1 );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_DATETIME, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_DATETIME, sal_False, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_FOOTER )
{
Point aPos( X1, Y2 );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_FOOTER, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_FOOTER, sal_False, aRect, bInsert );
}
else if( eObjKind == PRESOBJ_SLIDENUMBER )
{
Point aPos( X2, Y2 );
Rectangle aRect( aPos, aSize );
- return CreatePresObj( PRESOBJ_SLIDENUMBER, FALSE, aRect, bInsert );
+ return CreatePresObj( PRESOBJ_SLIDENUMBER, sal_False, aRect, bInsert );
}
OSL_FAIL("SdPage::CreateDefaultPresObj() - this should not happen!");
@@ -1292,7 +1292,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
break;
case 6: // title, 4 shapes
{
- ULONG nX = long (aLayoutPos.X());
+ sal_uLong nX = long (aLayoutPos.X());
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.488);
@@ -1352,7 +1352,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
}
case 11: // title, 6 shapes
{
- ULONG nX = long (aLayoutPos.X());
+ sal_uLong nX = long (aLayoutPos.X());
aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
aLayoutSize.Width() = long (aLayoutSize.Width() * 0.322);
@@ -1541,14 +1541,14 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
}
}
-void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
+void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate )
{
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
const bool bSwitchLayout = eLayout != GetAutoLayout();
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
meAutoLayout = eLayout;
@@ -1616,7 +1616,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
|*
\************************************************************************/
-void SdPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason* pReason)
+void SdPage::NbcInsertObject(SdrObject* pObj, sal_uLong nPos, const SdrInsertReason* pReason)
{
FmFormPage::NbcInsertObject(pObj, nPos, pReason);
@@ -1641,7 +1641,7 @@ void SdPage::NbcInsertObject(SdrObject* pObj, ULONG nPos, const SdrInsertReason*
|*
\************************************************************************/
-SdrObject* SdPage::RemoveObject(ULONG nObjNum)
+SdrObject* SdPage::RemoveObject(sal_uLong nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::RemoveObject(nObjNum);
@@ -1653,7 +1653,7 @@ SdrObject* SdPage::RemoveObject(ULONG nObjNum)
|*
\************************************************************************/
-SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum)
+SdrObject* SdPage::NbcRemoveObject(sal_uLong nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::NbcRemoveObject(nObjNum);
@@ -1661,7 +1661,7 @@ SdrObject* SdPage::NbcRemoveObject(ULONG nObjNum)
// Also overload ReplaceObject methods to realize when
// objects are removed with this mechanism instead of RemoveObject
-SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
+SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::NbcReplaceObject(pNewObj, nObjNum);
@@ -1669,7 +1669,7 @@ SdrObject* SdPage::NbcReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
// Also overload ReplaceObject methods to realize when
// objects are removed with this mechanism instead of RemoveObject
-SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, ULONG nObjNum)
+SdrObject* SdPage::ReplaceObject(SdrObject* pNewObj, sal_uLong nObjNum)
{
onRemoveObject(GetObj( nObjNum ));
return FmFormPage::ReplaceObject(pNewObj, nObjNum);
@@ -1716,7 +1716,7 @@ void SdPage::SetSize(const Size& aSize)
}
}
-void SdPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr)
+void SdPage::SetBorder(sal_Int32 nLft, sal_Int32 nUpp, sal_Int32 nRgt, sal_Int32 nLwr)
{
if (nLft != GetLftBorder() || nUpp != GetUppBorder() ||
nRgt != GetRgtBorder() || nLwr != GetLwrBorder() )
@@ -1725,7 +1725,7 @@ void SdPage::SetBorder(INT32 nLft, INT32 nUpp, INT32 nRgt, INT32 nLwr)
}
}
-void SdPage::SetLftBorder(INT32 nBorder)
+void SdPage::SetLftBorder(sal_Int32 nBorder)
{
if (nBorder != GetLftBorder() )
{
@@ -1733,7 +1733,7 @@ void SdPage::SetLftBorder(INT32 nBorder)
}
}
-void SdPage::SetRgtBorder(INT32 nBorder)
+void SdPage::SetRgtBorder(sal_Int32 nBorder)
{
if (nBorder != GetRgtBorder() )
{
@@ -1741,7 +1741,7 @@ void SdPage::SetRgtBorder(INT32 nBorder)
}
}
-void SdPage::SetUppBorder(INT32 nBorder)
+void SdPage::SetUppBorder(sal_Int32 nBorder)
{
if (nBorder != GetUppBorder() )
{
@@ -1749,7 +1749,7 @@ void SdPage::SetUppBorder(INT32 nBorder)
}
}
-void SdPage::SetLwrBorder(INT32 nBorder)
+void SdPage::SetLwrBorder(sal_Int32 nBorder)
{
if (nBorder != GetLwrBorder() )
{
@@ -1763,7 +1763,7 @@ void SdPage::SetLwrBorder(INT32 nBorder)
|*
\************************************************************************/
-void SdPage::SetBackgroundFullSize( BOOL bIn )
+void SdPage::SetBackgroundFullSize( sal_Bool bIn )
{
if( bIn != mbBackgroundFullSize )
{
@@ -1782,7 +1782,7 @@ void SdPage::SetBackgroundFullSize( BOOL bIn )
|*
\************************************************************************/
-void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, BOOL bScaleAllObj)
+void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderRect, sal_Bool bScaleAllObj)
{
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
@@ -1790,10 +1790,10 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
SdrObject* pObj = NULL;
Point aRefPnt(0, 0);
Size aNewPageSize(rNewPageSize);
- INT32 nLeft = rNewBorderRect.Left();
- INT32 nRight = rNewBorderRect.Right();
- INT32 nUpper = rNewBorderRect.Top();
- INT32 nLower = rNewBorderRect.Bottom();
+ sal_Int32 nLeft = rNewBorderRect.Left();
+ sal_Int32 nRight = rNewBorderRect.Right();
+ sal_Int32 nUpper = rNewBorderRect.Top();
+ sal_Int32 nLower = rNewBorderRect.Bottom();
// Negative Werte stehen fuer nicht zu aendernde Werte
// -> aktuelle Werte verwenden
@@ -1840,11 +1840,11 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
Fraction aFractX = Fraction(aNewPageSize.Width(), nOldWidth);
Fraction aFractY = Fraction(aNewPageSize.Height(), nOldHeight);
- ULONG nObjCnt = (mbScaleObjects ? GetObjCount() : 0);
+ sal_uLong nObjCnt = (mbScaleObjects ? GetObjCount() : 0);
- for (ULONG nObj = 0; nObj < nObjCnt; nObj++)
+ for (sal_uLong nObj = 0; nObj < nObjCnt; nObj++)
{
- BOOL bIsPresObjOnMaster = FALSE;
+ sal_Bool bIsPresObjOnMaster = sal_False;
// Alle Objekte
pObj = GetObj(nObj);
@@ -1852,7 +1852,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
if (mbMaster && IsPresObj(pObj))
{
// Es ist ein Praesentationsobjekt auf der MasterPage
- bIsPresObjOnMaster = TRUE;
+ bIsPresObjOnMaster = sal_True;
}
if (pObj)
@@ -1882,9 +1882,9 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
/**********************************************************
* Praesentationsvorlage: Texthoehe anpassen
**********************************************************/
- USHORT nIndexTitle = 0;
- USHORT nIndexOutline = 0;
- USHORT nIndexNotes = 0;
+ sal_uInt16 nIndexTitle = 0;
+ sal_uInt16 nIndexOutline = 0;
+ sal_uInt16 nIndexNotes = 0;
if (pObj == GetPresObj(PRESOBJ_TITLE, nIndexTitle))
{
@@ -1895,7 +1895,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
SfxItemSet& rSet = pTitleSheet->GetItemSet();
SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) rSet.Get(EE_CHAR_FONTHEIGHT);
- ULONG nFontHeight = rOldHgt.GetHeight();
+ sal_uLong nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
rSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT));
@@ -1923,7 +1923,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
String aName(GetLayoutName());
aName += sal_Unicode( ' ' );
- for (USHORT i=1; i<=9; i++)
+ for (sal_uInt16 i=1; i<=9; i++)
{
String sLayoutName(aName);
sLayoutName += String::CreateFromInt32( (sal_Int32)i );
@@ -1935,7 +1935,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
SfxItemSet aTempSet(pOutlineSheet->GetItemSet());
SvxFontHeightItem& rOldHgt = (SvxFontHeightItem&) aTempSet.Get(EE_CHAR_FONTHEIGHT);
- ULONG nFontHeight = rOldHgt.GetHeight();
+ sal_uLong nFontHeight = rOldHgt.GetHeight();
nFontHeight = long(nFontHeight * (double) aFractY);
aTempSet.Put(SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT));
@@ -1956,7 +1956,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
}
// Bullet anpassen
- ((SdStyleSheet*) pOutlineSheet)->AdjustToFontHeight(aTempSet, FALSE);
+ ((SdStyleSheet*) pOutlineSheet)->AdjustToFontHeight(aTempSet, sal_False);
// Sonderbehandlung: die INVALIDS auf NULL-Pointer
// zurueckgesetzen (sonst landen INVALIDs oder
@@ -1985,8 +1985,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
if (pNotesSheet)
{
- ULONG nHeight = pObj->GetLogicRect().GetSize().Height();
- ULONG nFontHeight = (ULONG) (nHeight * 0.0741);
+ sal_uLong nHeight = pObj->GetLogicRect().GetSize().Height();
+ sal_uLong nFontHeight = (sal_uLong) (nHeight * 0.0741);
SfxItemSet& rSet = pNotesSheet->GetItemSet();
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT ));
rSet.Put( SvxFontHeightItem(nFontHeight, 100, EE_CHAR_FONTHEIGHT_CJK ));
@@ -2003,8 +2003,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
/******************************************************
* Normales Textobjekt: Texthoehe anpassen
******************************************************/
- ULONG nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType();
- USHORT nWhich = EE_CHAR_FONTHEIGHT;
+ sal_uLong nScriptType = pObj->GetOutlinerParaObject()->GetTextObject().GetScriptType();
+ sal_uInt16 nWhich = EE_CHAR_FONTHEIGHT;
if ( nScriptType == SCRIPTTYPE_ASIAN )
nWhich = EE_CHAR_FONTHEIGHT_CJK;
else if ( nScriptType == SCRIPTTYPE_COMPLEX )
@@ -2052,8 +2052,8 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
if( !pModel || !pSourceObj )
return pSourceObj;
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && rPage.IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && rPage.IsInserted();
SdrObject* pNewObj = pSourceObj;
if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) )
@@ -2066,15 +2066,15 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
if(pOutlParaObj)
{
// Text umsetzen
- ::sd::Outliner* pOutl = pModel->GetInternalOutliner( TRUE );
+ ::sd::Outliner* pOutl = pModel->GetInternalOutliner( sal_True );
pOutl->Clear();
pOutl->SetText( *pOutlParaObj );
pOutlParaObj = pOutl->CreateParaObject();
pNewObj->SetOutlinerParaObject( pOutlParaObj );
pOutl->Clear();
- pNewObj->SetEmptyPresObj(FALSE);
+ pNewObj->SetEmptyPresObj(sal_False);
- for (USHORT nLevel = 1; nLevel < 10; nLevel++)
+ for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
// Neue Vorlage zuweisen
String aName(rPage.GetLayoutName());
@@ -2132,7 +2132,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
pOutlParaObj = pOutl->CreateParaObject();
pNewObj->SetOutlinerParaObject( pOutlParaObj );
pOutl->Clear();
- pNewObj->SetEmptyPresObj(FALSE);
+ pNewObj->SetEmptyPresObj(sal_False);
// Linken Einzug zuruecksetzen
SfxItemSet aSet(pModel->GetPool(), EE_PARA_LRSPACE, EE_PARA_LRSPACE );
@@ -2148,7 +2148,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj(PRESOBJ_TEXT);
if (pSheet)
- pNewObj->SetStyleSheet(pSheet, TRUE);
+ pNewObj->SetStyleSheet(pSheet, sal_True);
// Remove subtitle shape from page
if( bUndo )
@@ -2192,8 +2192,8 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
*/
SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit )
{
- sd::UndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
- const bool bUndo = pUndoManager && pUndoManager->isInListAction() && IsInserted();
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
if (!pObj && bInit)
{
@@ -2208,7 +2208,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
if( bUndo )
{
pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
- pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, TRUE, TRUE ) );
+ pUndoManager->AddUndoAction( pModel->GetSdrUndoFactory().CreateUndoAttrObject( *pObj, sal_True, sal_True ) );
pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
}
@@ -2237,13 +2237,13 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
SdrTextMinFrameHeightItem aMinHeight( aRect.GetSize().Height() );
aTempAttr.Put( aMinHeight );
- aTempAttr.Put( SdrTextAutoGrowHeightItem(FALSE) );
+ aTempAttr.Put( SdrTextAutoGrowHeightItem(sal_False) );
pTextObject->SetMergedItemSet(aTempAttr);
pTextObject->SetLogicRect(aRect);
// switch on AutoGrowHeight
SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() );
- aAttr.Put( SdrTextAutoGrowHeightItem(TRUE) );
+ aAttr.Put( SdrTextAutoGrowHeightItem(sal_True) );
pTextObject->SetMergedItemSet(aAttr);
}
@@ -2254,13 +2254,13 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
SfxItemSet aTempAttr( ((SdDrawDocument*) pModel)->GetPool() );
SdrTextMinFrameWidthItem aMinWidth( aRect.GetSize().Width() );
aTempAttr.Put( aMinWidth );
- aTempAttr.Put( SdrTextAutoGrowWidthItem(FALSE) );
+ aTempAttr.Put( SdrTextAutoGrowWidthItem(sal_False) );
pTextObject->SetMergedItemSet(aTempAttr);
pTextObject->SetLogicRect(aRect);
// switch on AutoGrowWidth
SfxItemSet aAttr( ((SdDrawDocument*) pModel)->GetPool() );
- aAttr.Put( SdrTextAutoGrowWidthItem(TRUE) );
+ aAttr.Put( SdrTextAutoGrowWidthItem(sal_True) );
pTextObject->SetMergedItemSet(aAttr);
}
}
@@ -2281,8 +2281,8 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
if( bVertical && (( eObjKind == PRESOBJ_TITLE) || (eObjKind == PRESOBJ_OUTLINE)))
{
SfxItemSet aNewSet(pObj->GetMergedItemSet());
- aNewSet.Put( SdrTextAutoGrowWidthItem(TRUE) );
- aNewSet.Put( SdrTextAutoGrowHeightItem(FALSE) );
+ aNewSet.Put( SdrTextAutoGrowWidthItem(sal_True) );
+ aNewSet.Put( SdrTextAutoGrowHeightItem(sal_False) );
if( eObjKind == PRESOBJ_OUTLINE )
{
aNewSet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) );
@@ -2367,14 +2367,14 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *( (SdDrawDocument*) GetModel() )->GetDocSh() ) );
pOutl->SetEditTextObjectPool(pPool);
pOutl->SetStyleSheetPool((SfxStyleSheetPool*)GetModel()->GetStyleSheetPool());
- pOutl->EnableUndo(FALSE);
- pOutl->SetUpdateMode( FALSE );
+ pOutl->EnableUndo(sal_False);
+ pOutl->SetUpdateMode( sal_False );
}
- USHORT nOutlMode = pOutl->GetMode();
+ sal_uInt16 nOutlMode = pOutl->GetMode();
Size aPaperSize = pOutl->GetPaperSize();
- BOOL bUpdateMode = pOutl->GetUpdateMode();
- pOutl->SetUpdateMode(FALSE);
+ sal_Bool bUpdateMode = pOutl->GetUpdateMode();
+ pOutl->SetUpdateMode(sal_False);
pOutl->SetParaAttribs( 0, pOutl->GetEmptyItemSet() );
// Always set the object's StyleSheet at the Outliner to
@@ -2514,7 +2514,7 @@ void SdPage::SetLayoutName(String aName)
if( mbMaster )
{
String aSep( RTL_CONSTASCII_USTRINGPARAM(SD_LT_SEPARATOR) );
- USHORT nPos = maLayoutName.Search( aSep );
+ sal_uInt16 nPos = maLayoutName.Search( aSep );
if ( nPos != STRING_NOTFOUND )
{
FmFormPage::SetName(maLayoutName.Copy(0, nPos));
@@ -2537,7 +2537,7 @@ const String& SdPage::GetName() const
if ((mePageKind == PK_STANDARD || mePageKind == PK_NOTES) && !mbMaster)
{
// default name for handout pages
- USHORT nNum = (GetPageNum() + 1) / 2;
+ sal_uInt16 nNum = (GetPageNum() + 1) / 2;
aCreatedPageName = String(SdResId(STR_PAGE));
aCreatedPageName += sal_Unicode( ' ' );
@@ -2836,7 +2836,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
if (aString.Len())
{
- BOOL bVertical = FALSE;
+ sal_Bool bVertical = sal_False;
OutlinerParaObject* pOldPara = pTextObj->GetOutlinerParaObject();
if( pOldPara )
bVertical = pOldPara->IsVertical(); // is old para object vertical?
@@ -2860,8 +2860,8 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
}
pTextObj->SetTextEditOutliner( NULL ); // to make stylesheet settings work
- pTextObj->NbcSetStyleSheet( GetStyleSheetForPresObj(ePresObjKind), TRUE );
- pTextObj->SetEmptyPresObj(TRUE);
+ pTextObj->NbcSetStyleSheet( GetStyleSheetForPresObj(ePresObjKind), sal_True );
+ pTextObj->SetEmptyPresObj(sal_True);
bRet = true;
}
}
@@ -2919,7 +2919,7 @@ void SdPage::CalculateHandoutAreas( SdDrawDocument& rModel, AutoLayout eLayout,
};
sal_uInt16* pOffsets = aOffsets[0];
- USHORT nColCnt = 0, nRowCnt = 0;
+ sal_uInt16 nColCnt = 0, nRowCnt = 0;
switch ( eLayout )
{
case AUTOLAYOUT_HANDOUT1:
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 76a23d4b730e..e5576bc01c1a 100644..100755
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -67,7 +67,7 @@ extern void NotifyDocumentEvent( SdDrawDocument* pDocument, const rtl::OUString&
/*************************************************************************
|*
-|* SetPresentationLayout, setzt: Layoutnamen, Masterpage-Verknpfung und
+|* SetPresentationLayout, setzt: Layoutnamen, Masterpage-Verkn�pfung und
|* Vorlagen fuer Praesentationsobjekte
|*
|* Vorraussetzungen: - Die Seite muss bereits das richtige Model kennen!
@@ -75,20 +75,20 @@ extern void NotifyDocumentEvent( SdDrawDocument* pDocument, const rtl::OUString&
|* - Die entsprechenden StyleSheets muessen bereits im
|* im StyleSheetPool sein.
|*
-|* bReplaceStyleSheets = TRUE : Benannte StyleSheets werden ausgetauscht
-|* FALSE: Alle StyleSheets werden neu zugewiesen
+|* bReplaceStyleSheets = sal_True : Benannte StyleSheets werden ausgetauscht
+|* sal_False: Alle StyleSheets werden neu zugewiesen
|*
-|* bSetMasterPage = TRUE : MasterPage suchen und zuweisen
+|* bSetMasterPage = sal_True : MasterPage suchen und zuweisen
|*
-|* bReverseOrder = FALSE: MasterPages von vorn nach hinten suchen
-|* TRUE : MasterPages von hinten nach vorn suchen (fuer Undo-Action)
+|* bReverseOrder = sal_False: MasterPages von vorn nach hinten suchen
+|* sal_True : MasterPages von hinten nach vorn suchen (fuer Undo-Action)
|*
\************************************************************************/
void SdPage::SetPresentationLayout(const String& rLayoutName,
- BOOL bReplaceStyleSheets,
- BOOL bSetMasterPage,
- BOOL bReverseOrder)
+ sal_Bool bReplaceStyleSheets,
+ sal_Bool bSetMasterPage,
+ sal_Bool bReverseOrder)
{
/*********************************************************************
|* Layoutname der Seite
@@ -105,8 +105,8 @@ void SdPage::SetPresentationLayout(const String& rLayoutName,
{
SdPage* pMaster;
SdPage* pFoundMaster = 0;
- USHORT nMaster = 0;
- USHORT nMasterCount = pModel->GetMasterPageCount();
+ sal_uInt16 nMaster = 0;
+ sal_uInt16 nMasterCount = pModel->GetMasterPageCount();
if( !bReverseOrder )
{
@@ -154,9 +154,9 @@ void SdPage::SetPresentationLayout(const String& rLayoutName,
boost::ptr_vector<StyleReplaceData> aReplList;
bool bListsFilled = false;
- ULONG nObjCount = GetObjCount();
+ sal_uLong nObjCount = GetObjCount();
- for (ULONG nObj = 0; nObj < nObjCount; nObj++)
+ for (sal_uLong nObj = 0; nObj < nObjCount; nObj++)
{
SdrTextObj* pObj = (SdrTextObj*) GetObj(nObj);
@@ -252,14 +252,14 @@ void SdPage::SetPresentationLayout(const String& rLayoutName,
SfxStyleSheet* pSheet = GetStyleSheetForPresObj(PRESOBJ_TITLE);
if (pSheet)
- pObj->SetStyleSheet(pSheet, TRUE);
+ pObj->SetStyleSheet(pSheet, sal_True);
}
else
{
SfxStyleSheet* pSheet = GetStyleSheetForPresObj(GetPresObjKind(pObj));
if (pSheet)
- pObj->SetStyleSheet(pSheet, TRUE);
+ pObj->SetStyleSheet(pSheet, sal_True);
}
}
}
@@ -395,7 +395,7 @@ SdPage::SdPage(const SdPage& rSrcPage)
while((pObj = rSrcPage.maPresentationShapeList.getNextShape(pObj)) != 0)
InsertPresObj(GetObj(pObj->GetOrdNum()), rSrcPage.GetPresObjKind(pObj));
- mbSelected = FALSE;
+ mbSelected = sal_False;
mnTransitionType = rSrcPage.mnTransitionType;
mnTransitionSubtype = rSrcPage.mnTransitionSubtype;
mbTransitionDirection = rSrcPage.mbTransitionDirection;
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index 3e809868187c..2e3b35f3e585 100644
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -85,44 +85,6 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject )
return 0;
}
-void ShapeList::replaceShape( SdrObject& rOldObject, SdrObject& rNewObject )
-{
- if( &rOldObject == &rNewObject )
- return;
-
- ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rNewObject ) );
- if( aIter != maShapeList.end() )
- {
- bool bIterErased = aIter == maIter;
- (*aIter)->RemoveObjectUser(*this);
- aIter = maShapeList.erase( aIter );
-
- if( bIterErased )
- maIter = aIter;
- }
-
- aIter = std::find( maShapeList.begin(), maShapeList.end(), &rOldObject );
- if( aIter != maShapeList.end() )
- {
- bool bIterErased = aIter == maIter;
-
- ListImpl::iterator iNew( maShapeList.insert( aIter, &rNewObject ) );
-
- (*aIter)->RemoveObjectUser(*this);
- aIter = maShapeList.erase( aIter );
-
- rNewObject.AddObjectUser( *this );
-
- if( bIterErased )
- maIter = iNew;
- }
- else
- {
- OSL_FAIL("sd::ShapeList::replaceShape(), given shape not part of list!");
- addShape( rNewObject );
- }
-}
-
/** removes all shapes from this list
NOTE: iterators will become invalid */
void ShapeList::clear()
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 7338f7066b58..b3d53d599844 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -75,6 +75,7 @@
#include "sdpage.hxx"
#include "helpids.h"
#include <svl/itemset.hxx>
+#include "app.hrc"
using ::rtl::OUString;
using namespace ::com::sun::star::uno;
@@ -119,7 +120,7 @@ SdStyleSheetPool::~SdStyleSheetPool()
// ----------------------------------------------------------
-SfxStyleSheetBase* SdStyleSheetPool::Create(const String& rName, SfxStyleFamily eFamily, USHORT _nMask )
+SfxStyleSheetBase* SdStyleSheetPool::Create(const String& rName, SfxStyleFamily eFamily, sal_uInt16 _nMask )
{
return new SdStyleSheet(rName, *this, eFamily, _nMask);
}
@@ -155,7 +156,7 @@ void SdStyleSheetPool::CreateOutlineSheetList (const String& rLayoutName, std::v
aName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
aName += String(SdResId(STR_LAYOUT_OUTLINE));
- for (USHORT nSheet = 1; nSheet < 10; nSheet++)
+ for (sal_uInt16 nSheet = 1; nSheet < 10; nSheet++)
{
String aFullName(aName);
aFullName.Append( sal_Unicode( ' ' ));
@@ -211,7 +212,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
SfxStyleSheetBase* pParent = NULL;
SvxLRSpaceItem aSvxLRSpaceItem( EE_PARA_LRSPACE );
SvxULSpaceItem aSvxULSpaceItem( EE_PARA_ULSPACE );
- USHORT nLevel;
+ sal_uInt16 nLevel;
for( nLevel = 1; nLevel < 10; nLevel++)
{
@@ -246,8 +247,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
rSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) );
rSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) );
rSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) );
- rSet.Put( SvxShadowedItem(FALSE, EE_CHAR_SHADOW ) );
- rSet.Put( SvxContourItem(FALSE, EE_CHAR_OUTLINE ) );
+ rSet.Put( SvxShadowedItem(sal_False, EE_CHAR_SHADOW ) );
+ rSet.Put( SvxContourItem(sal_False, EE_CHAR_OUTLINE ) );
rSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
rSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
rSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR) );
@@ -256,7 +257,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
rSet.Put( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
rSet.Put( SdrTextAutoGrowHeightItem(FALSE) );
// #i16874# enable kerning by default but only for new documents
- rSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
if( nLevel == 1 )
{
@@ -265,8 +266,8 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
}
}
- ULONG nFontSize = 20;
- USHORT nLower = 100;
+ sal_uLong nFontSize = 20;
+ sal_uInt16 nLower = 100;
switch (nLevel)
{
@@ -299,7 +300,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
}
// FontSize
- nFontSize = (USHORT)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
+ nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
SfxItemSet& rOutlineSet = pSheet->GetItemSet();
rOutlineSet.Put( SvxFontHeightItem( nFontSize, 100, EE_CHAR_FONTHEIGHT ) );
rOutlineSet.Put( SvxFontHeightItem( nFontSize, 100, EE_CHAR_FONTHEIGHT_CJK ) );
@@ -367,15 +368,15 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
rTitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ));
rTitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ));
rTitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
- rTitleSet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW ));
- rTitleSet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE ));
+ rTitleSet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW ));
+ rTitleSet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE ));
rTitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
rTitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
rTitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
rTitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
rTitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #i16874# enable kerning by default but only for new documents
- rTitleSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rTitleSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
aBulletFont.SetSize(Size(0,1552)); // 44 pt
PutNumBulletItem( pSheet, aBulletFont );
@@ -412,15 +413,15 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
rSubtitleSet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ));
rSubtitleSet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ));
rSubtitleSet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
- rSubtitleSet.Put(SvxShadowedItem(FALSE, EE_CHAR_SHADOW ));
- rSubtitleSet.Put(SvxContourItem(FALSE, EE_CHAR_OUTLINE ));
+ rSubtitleSet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW ));
+ rSubtitleSet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE ));
rSubtitleSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
rSubtitleSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF ) );
rSubtitleSet.Put(SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ));
rSubtitleSet.Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
rSubtitleSet.Put( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
// #i16874# enable kerning by default but only for new documents
- rSubtitleSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rSubtitleSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
aSvxLRSpaceItem.SetTxtLeft(0);
rSubtitleSet.Put(aSvxLRSpaceItem);
@@ -460,14 +461,14 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
rNotesSet.Put( SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE ) );
rNotesSet.Put( SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE ) );
rNotesSet.Put( SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ) );
- rNotesSet.Put( SvxShadowedItem(FALSE, EE_CHAR_SHADOW ) );
- rNotesSet.Put( SvxContourItem(FALSE, EE_CHAR_OUTLINE ) );
+ rNotesSet.Put( SvxShadowedItem(sal_False, EE_CHAR_SHADOW ) );
+ rNotesSet.Put( SvxContourItem(sal_False, EE_CHAR_OUTLINE ) );
rNotesSet.Put( SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK ) );
rNotesSet.Put( SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF) );
rNotesSet.Put( SvxColorItem( Color(COL_AUTO), EE_CHAR_COLOR ) );
rNotesSet.Put( SvxLRSpaceItem( 0, 0, 600, -600, EE_PARA_LRSPACE ) );
// #i16874# enable kerning by default but only for new documents
- rNotesSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rNotesSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
/* #i35937# */
@@ -487,12 +488,13 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
pSheet->SetParent(String());
SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
- rBackgroundObjectsSet.Put(SdrShadowItem(FALSE));
+ rBackgroundObjectsSet.Put(SdrShadowItem(sal_False));
rBackgroundObjectsSet.Put(SdrShadowColorItem(String(), Color(COL_GRAY)));
- rBackgroundObjectsSet.Put(SdrShadowXDistItem(300)); // 3 mm Schattendistanz
- rBackgroundObjectsSet.Put(SdrShadowYDistItem(300));
+ rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+ rBackgroundObjectsSet.Put(SdrShadowYDistItem(200));
// #i16874# enable kerning by default but only for new documents
- rBackgroundObjectsSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rBackgroundObjectsSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
+ rBackgroundObjectsSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK));
}
/**************************************************************************
@@ -512,7 +514,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
rBackgroundSet.Put(XLineStyleItem(XLINE_NONE));
rBackgroundSet.Put(XFillStyleItem(XFILL_NONE));
// #i16874# enable kerning by default but only for new documents
- rBackgroundSet.Put( SvxAutoKernItem( TRUE, EE_CHAR_PAIRKERNING ) );
+ rBackgroundSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
}
DBG_ASSERT( !bCheck || !bCreated, "missing layout style sheets detected!" );
@@ -718,7 +720,7 @@ void SdStyleSheetPool::CreateLayoutSheetNames(const String& rLayoutName, std::ve
String aName(SdResId(STR_LAYOUT_OUTLINE));
String aStr;
- for (USHORT nLevel = 1; nLevel < 10; nLevel++)
+ for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
aStr = String( aPrefix );
aStr.Append(aName);
@@ -759,7 +761,7 @@ void SdStyleSheetPool::CreateLayoutSheetList(const String& rLayoutName, SdStyleS
{
String aLayoutNameWithSep(rLayoutName);
aLayoutNameWithSep.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
- USHORT nLen = aLayoutNameWithSep.Len();
+ sal_uInt16 nLen = aLayoutNameWithSep.Len();
SfxStyleSheetIterator aIter(this, SD_STYLE_FAMILY_MASTERPAGE);
SfxStyleSheetBase* pSheet = aIter.First();
@@ -785,7 +787,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
SfxStyleSheetBase* pSheet = NULL;
SfxStyleSheetBase* pParent = NULL;
- USHORT nUsedMask = SFXSTYLEBIT_USED;
+ sal_uInt16 nUsedMask = SFXSTYLEBIT_USED;
aName = String(SdResId(STR_PSEUDOSHEET_TITLE));
if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
@@ -835,7 +837,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
pParent = NULL;
SetSearchMask(SD_STYLE_FAMILY_PSEUDO);
aName = String(SdResId(STR_PSEUDOSHEET_OUTLINE));
- for (USHORT nLevel = 1; nLevel < 10; nLevel++)
+ for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
String aLevelName(aName);
aLevelName.Append( sal_Unicode( ' ' ));
@@ -877,12 +879,12 @@ void SdStyleSheetPool::UpdateStdNames()
if( !pStyle->IsUserDefined() )
{
String aOldName = pStyle->GetName();
- ULONG nHelpId = pStyle->GetHelpId( aHelpFile );
+ sal_uLong nHelpId = pStyle->GetHelpId( aHelpFile );
SfxStyleFamily eFam = pStyle->GetFamily();
- BOOL bHelpKnown = TRUE;
+ sal_Bool bHelpKnown = sal_True;
String aNewName;
- USHORT nNameId = 0;
+ sal_uInt16 nNameId = 0;
switch( nHelpId )
{
case HID_STANDARD_STYLESHEET_NAME: nNameId = STR_STANDARD_STYLESHEET_NAME; break;
@@ -925,7 +927,7 @@ void SdStyleSheetPool::UpdateStdNames()
default:
// 0 oder falsche (alte) HelpId
- bHelpKnown = FALSE;
+ bHelpKnown = sal_False;
}
if( bHelpKnown )
{
@@ -966,7 +968,7 @@ void SdStyleSheetPool::UpdateStdNames()
if ( pEraseList )
{
// Styles, welche nicht umbenannt werden konnten, muessen entfernt werden
- for ( ULONG i = 0; i < pEraseList->Count(); i++ )
+ for ( sal_uLong i = 0; i < pEraseList->Count(); i++ )
{
SfxStyleSheetBase* pEraseSheet = ( SfxStyleSheetBase* ) pEraseList->GetObject( i );
Remove( pEraseSheet );
@@ -984,7 +986,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
Font& rBulletFont )
{
String aHelpFile;
- ULONG nHelpId = pSheet->GetHelpId( aHelpFile );
+ sal_uLong nHelpId = pSheet->GetHelpId( aHelpFile );
SfxItemSet& rSet = pSheet->GetItemSet();
switch ( nHelpId )
@@ -1000,13 +1002,9 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetStart(1);
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
- SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , FALSE);
- aNumberFormat.SetLSpace( 0 );
- aNumberFormat.SetAbsLSpace( 0 );
- aNumberFormat.SetFirstLineOffset( 0 );
- aNumRule.SetLevel( 0, aNumberFormat );
+ SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10 , sal_False);
- for( USHORT i = 1; i < aNumRule.GetLevelCount(); i++ )
+ for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
const short nLSpace = (i + 1) * 600;
aNumberFormat.SetLSpace(nLSpace);
@@ -1030,8 +1028,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
if(pDefaultRule)
{
- SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, FALSE);
- for(USHORT i=0; i < aNumRule.GetLevelCount(); i++)
+ SvxNumRule aNumRule(pDefaultRule->GetFeatureFlags(), 10, sal_False);
+ for(sal_uInt16 i=0; i < aNumRule.GetLevelCount(); i++)
{
SvxNumberFormat aFrmt( pDefaultRule->GetLevel(i) );
aFrmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
@@ -1057,8 +1055,8 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE|NUM_SYMBOL_ALIGNMENT,
- 10, FALSE );
- for( UINT16 i = 0; i < aNumRule.GetLevelCount(); i++ )
+ 10, sal_False );
+ for( sal_uInt16 i = 0; i < aNumRule.GetLevelCount(); i++ )
{
aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
aNumberFormat.SetBulletRelSize(45);
@@ -1067,7 +1065,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
aNumberFormat.SetAbsLSpace(nLSpace);
short nFirstLineOffset = -600;
- ULONG nFontSize = 20;
+ sal_uLong nFontSize = 20;
switch(i)
{
case 0:
@@ -1102,7 +1100,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
}
aNumberFormat.SetFirstLineOffset(nFirstLineOffset);
- nFontSize = (USHORT)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
+ nFontSize = (sal_uInt16)((nFontSize * 2540L) / 72); // Pt --> 1/100 mm
rBulletFont.SetSize(Size(0,846)); // 24 pt
aNumberFormat.SetBulletFont(&rBulletFont);
aNumRule.SetLevel( i, aNumberFormat );
@@ -1130,10 +1128,10 @@ Font SdStyleSheetPool::GetBulletFont() const
aBulletFont.SetOverline(UNDERLINE_NONE);
aBulletFont.SetStrikeout(STRIKEOUT_NONE);
aBulletFont.SetItalic(ITALIC_NONE);
- aBulletFont.SetOutline(FALSE);
- aBulletFont.SetShadow(FALSE);
+ aBulletFont.SetOutline(sal_False);
+ aBulletFont.SetShadow(sal_False);
aBulletFont.SetColor(Color(COL_AUTO));
- aBulletFont.SetTransparent(TRUE);
+ aBulletFont.SetTransparent(sal_True);
return aBulletFont;
}
@@ -1382,10 +1380,10 @@ SdStyleSheetVector SdStyleSheetPool::CreateChildList( SdStyleSheet* pSheet )
{
SdStyleSheetVector aResult;
- USHORT nListenerCount = pSheet->GetListenerCount();
+ sal_uInt16 nListenerCount = pSheet->GetListenerCount();
if (nListenerCount > 0)
{
- for (USHORT n = 0; n < nListenerCount; n++)
+ for (sal_uInt16 n = 0; n < nListenerCount; n++)
{
SdStyleSheet* pChild = dynamic_cast< SdStyleSheet* >( pSheet->GetListener(n) );
if(pChild && pChild->GetParent() == pSheet->GetName())
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index c921786753c6..0b439edd3b26 100644..100755
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -132,7 +132,7 @@ void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*
mpStyleSheet->notifyModifyListener();
}
-SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, USHORT _nMask)
+SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, sal_uInt16 _nMask)
: SdStyleSheetBase( UniString( rDisplayName ), _rPool, eFamily, _nMask)
, ::cppu::BaseMutex()
, msApiName( rDisplayName )
@@ -170,7 +170,7 @@ rtl::OUString SdStyleSheet::GetApiName() const
}
-void SdStyleSheet::Load (SvStream& rIn, USHORT nVersion)
+void SdStyleSheet::Load (SvStream& rIn, sal_uInt16 nVersion)
{
SfxStyleSheetBase::Load(rIn, nVersion);
@@ -200,9 +200,9 @@ void SdStyleSheet::Store(SvStream& rOut)
|*
\************************************************************************/
-BOOL SdStyleSheet::SetParent(const String& rParentName)
+sal_Bool SdStyleSheet::SetParent(const String& rParentName)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
if (SfxStyleSheet::SetParent(rParentName))
{
@@ -214,7 +214,7 @@ BOOL SdStyleSheet::SetParent(const String& rParentName)
SfxStyleSheetBase* pStyle = rPool.Find(rParentName, nFamily);
if (pStyle)
{
- bResult = TRUE;
+ bResult = sal_True;
SfxItemSet& rParentSet = pStyle->GetItemSet();
GetItemSet().SetParent(&rParentSet);
Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
@@ -222,14 +222,14 @@ BOOL SdStyleSheet::SetParent(const String& rParentName)
}
else
{
- bResult = TRUE;
+ bResult = sal_True;
GetItemSet().SetParent(NULL);
Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
}
else
{
- bResult = TRUE;
+ bResult = sal_True;
}
}
return bResult;
@@ -248,7 +248,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
// ggfs. das ItemSet 'on demand' anlegen
if (!pSet)
{
- USHORT nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST,
+ sal_uInt16 nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
@@ -276,7 +276,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
{
if (!pSet)
{
- USHORT nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST,
+ sal_uInt16 nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
@@ -312,7 +312,7 @@ SfxItemSet& SdStyleSheet::GetItemSet()
{
if (!pSet)
{
- USHORT nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST,
+ sal_uInt16 nWhichPairTable[] = { XATTR_LINE_FIRST, XATTR_LINE_LAST,
XATTR_FILL_FIRST, XATTR_FILL_LAST,
SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
@@ -345,14 +345,14 @@ SfxItemSet& SdStyleSheet::GetItemSet()
|*
\************************************************************************/
-BOOL SdStyleSheet::IsUsed() const
+sal_Bool SdStyleSheet::IsUsed() const
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
- USHORT nListenerCount = GetListenerCount();
+ sal_uInt16 nListenerCount = GetListenerCount();
if (nListenerCount > 0)
{
- for (USHORT n = 0; n < nListenerCount; n++)
+ for (sal_uInt16 n = 0; n < nListenerCount; n++)
{
SfxListener* pListener = GetListener(n);
if( pListener == this )
@@ -471,7 +471,7 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
else
{
String aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE));
- USHORT nPos = aName.Search(aOutlineStr);
+ sal_uInt16 nPos = aName.Search(aOutlineStr);
if (nPos != STRING_NOTFOUND)
{
String aNumStr(aName.Copy(aOutlineStr.Len()));
@@ -533,7 +533,7 @@ SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const
else
{
String aOutlineStr((SdResId(STR_LAYOUT_OUTLINE)));
- USHORT nPos = aStyleName.Search(aOutlineStr);
+ sal_uInt16 nPos = aStyleName.Search(aOutlineStr);
if (nPos != STRING_NOTFOUND)
{
String aNumStr(aStyleName.Copy(aOutlineStr.Len()));
@@ -564,7 +564,7 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
// bekommt, sorgt er dafuer, dass das eigentlich gemeinte StyleSheet
// broadcastet
SfxSimpleHint* pSimple = PTR_CAST(SfxSimpleHint, &rHint);
- ULONG nId = pSimple == NULL ? 0 : pSimple->GetId();
+ sal_uLong nId = pSimple == NULL ? 0 : pSimple->GetId();
if (nId == SFX_HINT_DATACHANGED && nFamily == SD_STYLE_FAMILY_PSEUDO)
{
SdStyleSheet* pRealStyle = GetRealStyleSheet();
@@ -579,11 +579,11 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
|* berechnet, dass das Verhaeltnis zur Fonthoehe so ist wie im StyleSheet.
|*
|* bOnlyMissingItems legt fest, ob lediglich nicht gesetzte Items ergaenzt
-|* (TRUE) oder explizit gesetzte Items ueberschreiben werden sollen (FALSE)
+|* (sal_True) oder explizit gesetzte Items ueberschreiben werden sollen (sal_False)
|*
\************************************************************************/
-void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems)
+void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingItems)
{
// Bulletbreite und Texteinzug an neue Fonthoehe
// anpassen, wenn sie nicht explizit gesetzt wurden
@@ -601,15 +601,15 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems)
rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SFX_ITEM_SET)
{
const SfxItemSet* pCurSet = &GetItemSet();
- UINT32 nNewHeight = ((SvxFontHeightItem&)rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight();
- UINT32 nOldHeight = ((SvxFontHeightItem&)pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight();
+ sal_uInt32 nNewHeight = ((SvxFontHeightItem&)rSet.Get(EE_CHAR_FONTHEIGHT)).GetHeight();
+ sal_uInt32 nOldHeight = ((SvxFontHeightItem&)pCurSet->Get(EE_CHAR_FONTHEIGHT)).GetHeight();
if (rSet.GetItemState(EE_PARA_BULLET) != SFX_ITEM_SET || !bOnlyMissingItems)
{
const SvxBulletItem& rBItem = (const SvxBulletItem&)pCurSet->Get(EE_PARA_BULLET);
double fBulletFraction = double(rBItem.GetWidth()) / nOldHeight;
SvxBulletItem aNewBItem(rBItem);
- aNewBItem.SetWidth((UINT32)(fBulletFraction * nNewHeight));
+ aNewBItem.SetWidth((sal_uInt32)(fBulletFraction * nNewHeight));
rSet.Put(aNewBItem);
}
@@ -618,7 +618,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems)
const SvxLRSpaceItem& rLRItem = (const SvxLRSpaceItem&)pCurSet->Get(EE_PARA_LRSPACE);
double fIndentFraction = double(rLRItem.GetTxtLeft()) / nOldHeight;
SvxLRSpaceItem aNewLRItem(rLRItem);
- aNewLRItem.SetTxtLeft((USHORT)(fIndentFraction * nNewHeight));
+ aNewLRItem.SetTxtLeft((sal_uInt16)(fIndentFraction * nNewHeight));
double fFirstIndentFraction = double(rLRItem.GetTxtFirstLineOfst()) / nOldHeight;
aNewLRItem.SetTxtFirstLineOfst((short)(fFirstIndentFraction * nNewHeight));
rSet.Put(aNewLRItem);
@@ -629,9 +629,9 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems)
const SvxULSpaceItem& rULItem = (const SvxULSpaceItem&)pCurSet->Get(EE_PARA_ULSPACE);
SvxULSpaceItem aNewULItem(rULItem);
double fLowerFraction = double(rULItem.GetLower()) / nOldHeight;
- aNewULItem.SetLower((USHORT)(fLowerFraction * nNewHeight));
+ aNewULItem.SetLower((sal_uInt16)(fLowerFraction * nNewHeight));
double fUpperFraction = double(rULItem.GetUpper()) / nOldHeight;
- aNewULItem.SetUpper((USHORT)(fUpperFraction * nNewHeight));
+ aNewULItem.SetUpper((sal_uInt16)(fUpperFraction * nNewHeight));
rSet.Put(aNewULItem);
}
}
@@ -639,35 +639,35 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, BOOL bOnlyMissingItems)
// --------------------------------------------------------------------
-BOOL SdStyleSheet::HasFollowSupport() const
+sal_Bool SdStyleSheet::HasFollowSupport() const
{
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------------------------
-BOOL SdStyleSheet::HasParentSupport() const
+sal_Bool SdStyleSheet::HasParentSupport() const
{
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------
-BOOL SdStyleSheet::HasClearParentSupport() const
+sal_Bool SdStyleSheet::HasClearParentSupport() const
{
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------
-BOOL SdStyleSheet::SetName( const UniString& rName )
+sal_Bool SdStyleSheet::SetName( const UniString& rName )
{
return SfxStyleSheet::SetName( rName );
}
// --------------------------------------------------------------------
-void SdStyleSheet::SetHelpId( const String& r, ULONG nId )
+void SdStyleSheet::SetHelpId( const String& r, sal_uLong nId )
{
SfxStyleSheet::SetHelpId( r, nId );
@@ -962,13 +962,11 @@ void SAL_CALL SdStyleSheet::setName( const OUString& rName ) throw(RuntimeExcep
{
SolarMutexGuard aGuard;
throwIfDisposed();
- if( IsUserDefined() )
+
+ if( SetName( rName ) )
{
- if( SetName( rName ) )
- {
- msApiName = rName;
- Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
- }
+ msApiName = rName;
+ Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
}
@@ -1015,28 +1013,25 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) throw
SolarMutexGuard aGuard;
throwIfDisposed();
- if( IsUserDefined() )
+ if( rParentName.getLength() )
{
- if( rParentName.getLength() )
- {
- const SfxStyles& rStyles = mxPool->GetStyles();
+ const SfxStyles& rStyles = mxPool->GetStyles();
for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); ++iter )
+ {
+ SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
+ if( pStyle && (pStyle->nFamily == nFamily) && (pStyle->msApiName == rParentName) )
{
- SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
- if( pStyle && (pStyle->nFamily == nFamily) && (pStyle->msApiName == rParentName) )
- {
- if( pStyle != this )
- SetParent( pStyle->GetName() );
- return;
- }
+ if( pStyle != this )
+ SetParent( pStyle->GetName() );
+ return;
}
- throw NoSuchElementException();
- }
- else
- {
- SetParent( rParentName );
}
+ throw NoSuchElementException();
+ }
+ else
+ {
+ SetParent( rParentName );
}
}
@@ -1304,7 +1299,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
case XATTR_LINESTART:
case XATTR_LINEDASH:
{
- NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((USHORT)pEntry->nWID);
+ NameOrIndex* pItem = (NameOrIndex*)rStyleSet.GetItem((sal_uInt16)pEntry->nWID);
if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) )
eState = PropertyState_DEFAULT_VALUE;
}
diff --git a/sd/source/core/undo/undomanager.cxx b/sd/source/core/undo/undomanager.cxx
index f08c7961a163..adeafcbd60eb 100644..100755
--- a/sd/source/core/undo/undomanager.cxx
+++ b/sd/source/core/undo/undomanager.cxx
@@ -33,42 +33,24 @@
using namespace sd;
-UndoManager::UndoManager( USHORT nMaxUndoActionCount /* = 20 */ )
+UndoManager::UndoManager( sal_uInt16 nMaxUndoActionCount /* = 20 */ )
: SfxUndoManager( nMaxUndoActionCount )
-, mnListLevel( 0 )
, mpLinkedUndoManager(NULL)
{
}
-void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId /* =0 */)
+void UndoManager::EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId /* =0 */)
{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
- mnListLevel++;
SfxUndoManager::EnterListAction( rComment, rRepeatComment, nId );
}
}
-void UndoManager::LeaveListAction()
+void UndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg /* = sal_False */ )
{
- if( !isInUndo() )
- {
- SfxUndoManager::LeaveListAction();
- if( mnListLevel )
- {
- mnListLevel--;
- }
- else
- {
- OSL_FAIL("sd::UndoManager::LeaveListAction(), no open list action!" );
- }
- }
-}
-
-void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALSE */ )
-{
- if( !isInUndo() )
+ if( !IsDoing() )
{
ClearLinkedRedoActions();
SfxUndoManager::AddUndoAction( pAction, bTryMerg );
@@ -80,22 +62,7 @@ void UndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg /* = FALS
}
-BOOL UndoManager::Undo( USHORT nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Undo( nCount );
-}
-
-BOOL UndoManager::Redo( USHORT nCount )
-{
- ScopeLockGuard aGuard( maIsInUndoLock );
- return SfxUndoManager::Redo( nCount );
-}
-
-
-
-
-void UndoManager::SetLinkedUndoManager (SfxUndoManager* pLinkedUndoManager)
+void UndoManager::SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager)
{
mpLinkedUndoManager = pLinkedUndoManager;
}
diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx
index 8687de4d3c9f..566bdfd94dcf 100644..100755
--- a/sd/source/core/undo/undoobjects.cxx
+++ b/sd/source/core/undo/undoobjects.cxx
@@ -245,7 +245,7 @@ void UndoObjectSetText::Redo()
if( mpUndoAnimation )
mpUndoAnimation->Redo();
SdrUndoObjSetText::Redo();
- mxSdrObject->SetEmptyPresObj(mbNewEmptyPresObj ? TRUE : FALSE );
+ mxSdrObject->SetEmptyPresObj(mbNewEmptyPresObj ? sal_True : sal_False );
}
}
@@ -348,7 +348,7 @@ void UndoAutoLayoutPosAndSize::Redo()
{
SdPage* pPage = static_cast< SdPage* >( mxPage.get() );
if( pPage )
- pPage->SetAutoLayout( pPage->GetAutoLayout(), FALSE, FALSE );
+ pPage->SetAutoLayout( pPage->GetAutoLayout(), sal_False, sal_False );
}
//////////////////////////////////////////////////////////////////////////////
@@ -403,7 +403,7 @@ void UndoGeoObject::Redo()
//////////////////////////////////////////////////////////////////////////////
UndoAttrObject::UndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText )
-: SdrUndoAttrObj( rObject, bStyleSheet1 ? TRUE : FALSE, bSaveText ? TRUE : FALSE )
+: SdrUndoAttrObj( rObject, bStyleSheet1 ? sal_True : sal_False, bSaveText ? sal_True : sal_False )
, mxPage( rObject.GetPage() )
, mxSdrObject( &rObject )
{
diff --git a/sd/source/filter/cgm/sdcgmfilter.cxx b/sd/source/filter/cgm/sdcgmfilter.cxx
index 884d5524bbee..405a3acb0cdf 100644..100755
--- a/sd/source/filter/cgm/sdcgmfilter.cxx
+++ b/sd/source/filter/cgm/sdcgmfilter.cxx
@@ -68,8 +68,8 @@ using namespace ::com::sun::star::frame;
// - Typedefs -
// ------------
-typedef UINT32 ( __LOADONCALLAPI *ImportCGM )( ::rtl::OUString&, Reference< XModel >&, UINT32, Reference< XStatusIndicator >& );
-typedef BOOL ( __LOADONCALLAPI *ExportCGM )( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* );
+typedef sal_uInt32 ( __LOADONCALLAPI *ImportCGM )( ::rtl::OUString&, Reference< XModel >&, sal_uInt32, Reference< XStatusIndicator >& );
+typedef sal_Bool ( __LOADONCALLAPI *ExportCGM )( ::rtl::OUString&, Reference< XModel >&, Reference< XStatusIndicator >&, void* );
// ---------------
// - SdPPTFilter -
@@ -97,7 +97,7 @@ sal_Bool SdCGMFilter::Import()
{
ImportCGM FncImportCGM = reinterpret_cast< ImportCGM >( pLibrary->getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ImportCGM" ) ) ) );
::rtl::OUString aFileURL( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
- UINT32 nRetValue;
+ sal_uInt32 nRetValue;
if( mrDocument.GetPageCount() == 0L )
mrDocument.CreateFirstPages();
@@ -107,7 +107,7 @@ sal_Bool SdCGMFilter::Import()
if( nRetValue )
{
- bRet = TRUE;
+ bRet = sal_True;
if( ( nRetValue &~0xff000000 ) != 0xffffff ) // maybe the backgroundcolor is already white
{ // so we must not set a master page
@@ -117,7 +117,7 @@ sal_Bool SdCGMFilter::Import()
if(pSdPage)
{
// set PageFill to given color
- const Color aColor((BYTE)(nRetValue >> 16), (BYTE)(nRetValue >> 8), (BYTE)(nRetValue >> 16));
+ const Color aColor((sal_uInt8)(nRetValue >> 16), (sal_uInt8)(nRetValue >> 8), (sal_uInt8)(nRetValue >> 16));
pSdPage->getSdrPageProperties().PutItem(XFillColorItem(String(), aColor));
pSdPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_SOLID));
}
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 5c8cf3c4ba2d..b61043809a6e 100644..100755
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -106,7 +106,7 @@ void PPTWriter::exportPPTPre()
if ( mXStatusIndicator.is() )
{
- mbStatusIndicator = TRUE;
+ mbStatusIndicator = sal_True;
mnStatMaxValue = ( mnPages + mnMasterPages ) * 5;
mXStatusIndicator->start( String( RTL_CONSTASCII_USTRINGPARAM( "PowerPoint Export" ) ),
mnStatMaxValue + ( mnStatMaxValue >> 3 ) );
@@ -154,7 +154,7 @@ void PPTWriter::exportPPTPost( )
if ( !ImplCreateDocumentSummaryInformation() )
return;
- mbStatus = TRUE;
+ mbStatus = sal_True;
};
// ---------------------------------------------------------------------------------------------
@@ -446,6 +446,11 @@ PPTWriter::~PPTWriter()
void* pPtr;
delete mpExEmbed;
delete mpPptEscherEx;
+ delete mpCurUserStrm;
+ delete mpPicStrm;
+ delete mpStrm;
+
+
std::vector< PPTExStyleSheet* >::iterator aStyleSheetIter( maStyleSheetList.begin() );
while( aStyleSheetIter < maStyleSheetList.end() )
@@ -468,7 +473,7 @@ sal_Bool PPTWriter::ImplCreateCurrentUserStream()
{
mpCurUserStrm = mrStg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Current User" ) ) );
if ( !mpCurUserStrm )
- return FALSE;
+ return sal_False;
char pUserName[] = "Current User";
sal_uInt32 nLenOfUserName = strlen( pUserName );
sal_uInt32 nSizeOfRecord = 0x14 + ( ( nLenOfUserName + 4 ) & ~ 3 );
@@ -491,7 +496,7 @@ sal_Bool PPTWriter::ImplCreateCurrentUserStream()
*mpCurUserStrm << (sal_uInt8)0; // pad bytes
};
mpCurUserStrm->Seek( nEditPos );
- return TRUE;
+ return sal_True;
};
// ---------------------------------------------------------------------------------------------
@@ -698,9 +703,9 @@ sal_Bool PPTWriter::ImplCreateDocument()
mpPptEscherEx->AddAtom( 40, EPP_DocumentAtom, 1 );
*mpStrm << nWidth // Slide Size in Master coordinates X
<< nHeight // " " " " " Y
- << (INT32)maNotesPageSize.Width // Notes Page Size X
- << (INT32)maNotesPageSize.Height // " " " Y
- << (INT32)1 << (INT32)2; // the scale used when the Powerpoint document is embedded. the default is 1:2
+ << (sal_Int32)maNotesPageSize.Width // Notes Page Size X
+ << (sal_Int32)maNotesPageSize.Height // " " " Y
+ << (sal_Int32)1 << (sal_Int32)2; // the scale used when the Powerpoint document is embedded. the default is 1:2
mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTESMASTER_PERSIST_KEY, mpStrm->Tell() );
*mpStrm << (sal_uInt32)0 // Reference to NotesMaster ( 0 if none );
<< (sal_uInt32)0 // Reference to HandoutMaster ( 0 if none );
@@ -734,12 +739,12 @@ sal_Bool PPTWriter::ImplCreateDocument()
mpPptEscherEx->InsertPersistOffset( EPP_MAINSLIDE_PERSIST_KEY | i, mpStrm->Tell() );
*mpStrm << (sal_uInt32)0 // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY )
<< (sal_uInt32)4 // flags - only bit 3 used, if set then slide contains shapes other than placeholders
- << (INT32)0 // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects
- << (INT32)i + 0x100 // slideId - Unique slide identifier, used for OLE link monikers for example
+ << (sal_Int32)0 // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects
+ << (sal_Int32)i + 0x100 // slideId - Unique slide identifier, used for OLE link monikers for example
<< (sal_uInt32)0; // reserved, usualy 0
if ( !GetPageByIndex( i, NORMAL ) ) // sehr aufregend: noch einmal ueber alle seiten
- return FALSE;
+ return sal_False;
SetCurrentStyleSheet( GetMasterIndex( NORMAL ) );
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed >
@@ -763,8 +768,8 @@ sal_Bool PPTWriter::ImplCreateDocument()
mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTES_PERSIST_KEY | i, mpStrm->Tell() );
*mpStrm << (sal_uInt32)0
<< (sal_uInt32)4
- << (INT32)0
- << (INT32)i + 0x100
+ << (sal_Int32)0
+ << (sal_Int32)i + 0x100
<< (sal_uInt32)0;
}
mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText
@@ -784,7 +789,7 @@ sal_Bool PPTWriter::ImplCreateDocument()
{
::rtl::OUString aCustomShow;
sal_uInt32 nPenColor = 0x1000000;
- INT32 nRestartTime = 0x7fffffff;
+ sal_Int32 nRestartTime = 0x7fffffff;
sal_Int16 nStartSlide = 0;
sal_Int16 nEndSlide = 0;
sal_uInt32 nFlags = 0; // Bit 0: Auto advance
@@ -834,7 +839,7 @@ sal_Bool PPTWriter::ImplCreateDocument()
nFlags |= 1;
}
- if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsEndless" ) ) ) ) // muesste eigendlich heissen IsNotEndless !=)"§()&
+ if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "IsEndless" ) ) ) ) // muesste eigendlich heissen IsNotEndless !=)"�()&
{
sal_Bool bBool = sal_False;
mAny >>= bBool;
@@ -902,8 +907,8 @@ sal_Bool PPTWriter::ImplCreateDocument()
{
mpPptEscherEx->BeginAtom();
- INT32 nSlideCount = aXIC->getCount();
- for ( INT32 j = 0; j < nSlideCount; j++ ) // Anzahl der Slides
+ sal_Int32 nSlideCount = aXIC->getCount();
+ for ( sal_Int32 j = 0; j < nSlideCount; j++ ) // Anzahl der Slides
{
mAny = aXIC->getByIndex( j );
if ( mAny.getValue() )
@@ -948,7 +953,7 @@ sal_Bool PPTWriter::ImplCreateDocument()
}
mpPptEscherEx->AddAtom( 0, EPP_EndDocument );
mpPptEscherEx->CloseContainer(); // EPP_Document
- return TRUE;
+ return sal_True;
};
// ---------------------------------------------------------------------------------------------
@@ -1031,7 +1036,7 @@ sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
rStrm << (sal_uInt32)( nCurrentOfs - ( nParaOfs + 4 ) );
rStrm << nParaCount;
rStrm.Seek( nCurrentOfs );
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------------------------
@@ -1049,7 +1054,7 @@ sal_Bool PPTWriter::ImplCreateMainNotes()
mpPptEscherEx->OpenContainer( ESCHER_DgContainer );
mpPptEscherEx->EnterGroup(0,0);
- ImplWritePage( GetLayout( 20 ), aSolverContainer, NOTICE, TRUE );
+ ImplWritePage( GetLayout( 20 ), aSolverContainer, NOTICE, sal_True );
mpPptEscherEx->LeaveGroup();
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -1073,7 +1078,7 @@ sal_Bool PPTWriter::ImplCreateMainNotes()
mpPptEscherEx->AddAtom( 32, EPP_ColorSchemeAtom, 0, 1 );
*mpStrm << (sal_uInt32)0xffffff << (sal_uInt32)0x000000 << (sal_uInt32)0x808080 << (sal_uInt32)0x000000 << (sal_uInt32)0x99cc00 << (sal_uInt32)0xcc3333 << (sal_uInt32)0xffcccc << (sal_uInt32)0xb2b2b2;
mpPptEscherEx->CloseContainer(); // EPP_Notes
- return TRUE;
+ return sal_True;
}
// ---------------------------------------------------------------------------------------------
@@ -1182,7 +1187,7 @@ void PPTWriter::ImplWriteNotes( sal_uInt32 nPageNum )
mpPptEscherEx->OpenContainer( ESCHER_DgContainer );
mpPptEscherEx->EnterGroup(0,0);
- ImplWritePage( GetLayout( 20 ), aSolverContainer, NOTICE, FALSE ); // Die Shapes der Seite werden im PPT Dok. erzeugt
+ ImplWritePage( GetLayout( 20 ), aSolverContainer, NOTICE, sal_False ); // Die Shapes der Seite werden im PPT Dok. erzeugt
mpPptEscherEx->LeaveGroup();
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -1310,13 +1315,13 @@ void PPTWriter::ImplWriteOLE( )
::uno::Reference < embed::XEmbeddedObject > xObj( ( (SdrOle2Obj*) pSdrObj )->GetObjRef() );
if( xObj.is() )
{
- SvStorageRef xTempStorage( new SvStorage( new SvMemoryStream(), TRUE ) );
+ SvStorageRef xTempStorage( new SvStorage( new SvMemoryStream(), sal_True ) );
aOleExport.ExportOLEObject( xObj, *xTempStorage );
//TODO/MBA: testing
String aPersistStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( SVEXT_PERSIST_STREAM ) ) );
SvMemoryStream aStream;
- SvStorageRef xCleanStorage( new SvStorage( FALSE, aStream ) );
+ SvStorageRef xCleanStorage( new SvStorage( sal_False, aStream ) );
xTempStorage->CopyTo( xCleanStorage );
// create a dummy content stream, the dummy content is necessary for ppt, but not for
// doc files, so we can't share code.
@@ -1342,7 +1347,7 @@ void PPTWriter::ImplWriteOLE( )
{
String aName;
::com::sun::star::awt::Size aSize;
- SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) );
+ SvStorageRef xDest( new SvStorage( new SvMemoryStream(), sal_True ) );
sal_Bool bOk = SvxMSConvertOCXControls::WriteOCXStream( xDest, pPtr->xControlModel, aSize, aName );
if ( bOk )
pStrm = xDest->CreateMemoryStream();
@@ -1469,7 +1474,7 @@ sal_Bool PPTWriter::ImplWriteAtomEnding()
*mpCurUserStrm << (sal_uInt32)nPos; // offset to current edit setzen
mpPptEscherEx->AddAtom( 28, EPP_UserEditAtom );
- *mpStrm << (INT32)0x100 // last slide ID
+ *mpStrm << (sal_Int32)0x100 // last slide ID
<< (sal_uInt32)0x03000dbc // minor and major app version that did the save
<< (sal_uInt32)0 // offset last save, 0 after a full save
<< nPersistOfs // File offset to persist pointers for this save operation
@@ -1478,37 +1483,37 @@ sal_Bool PPTWriter::ImplWriteAtomEnding()
<< (sal_Int16)EPP_LastViewTypeSlideView // last view type
<< (sal_Int16)0x12; // padword
- return TRUE;
+ return sal_True;
}
// ---------------------
// - exported function -
// ---------------------
-extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI ExportPPT( SvStorageRef& rSvStorage,
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI ExportPPT( SvStorageRef& rSvStorage,
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rXModel,
::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rXStatInd,
SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags )
{
PPTWriter* pPPTWriter;
- BOOL bStatus = FALSE;
+ sal_Bool bStatus = sal_False;
pPPTWriter = new PPTWriter( rSvStorage, rXModel, rXStatInd, pVBA, nCnvrtFlags );
if ( pPPTWriter )
{
pPPTWriter->exportPPT();
- bStatus = ( pPPTWriter->IsValid() == TRUE );
+ bStatus = ( pPPTWriter->IsValid() == sal_True );
delete pPPTWriter;
}
return bStatus;
}
-extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool __LOADONCALLAPI SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas )
{
- SvStorageRef xDest( new SvStorage( new SvMemoryStream(), TRUE ) );
- SvxImportMSVBasic aMSVBas( rDocShell, *xDest, FALSE, FALSE );
- aMSVBas.SaveOrDelMSVBAStorage( TRUE, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) );
+ SvStorageRef xDest( new SvStorage( new SvMemoryStream(), sal_True ) );
+ SvxImportMSVBasic aMSVBas( rDocShell, *xDest, sal_False, sal_False );
+ aMSVBas.SaveOrDelMSVBAStorage( sal_True, String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) );
SvStorageRef xOverhead = xDest->OpenSotStorage( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead") ) );
if ( xOverhead.Is() && ( xOverhead->GetError() == SVSTREAM_OK ) )
@@ -1519,7 +1524,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rD
SvStorageStreamRef xTemp = xOverhead2->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM("_MS_VBA_Overhead2") ) );
if ( xTemp.Is() && ( xTemp->GetError() == SVSTREAM_OK ) )
{
- UINT32 nLen = xTemp->GetSize();
+ sal_uInt32 nLen = xTemp->GetSize();
if ( nLen )
{
char* pTemp = new char[ nLen ];
@@ -1528,15 +1533,15 @@ extern "C" SAL_DLLPUBLIC_EXPORT BOOL __LOADONCALLAPI SaveVBA( SfxObjectShell& rD
xTemp->Seek( STREAM_SEEK_TO_BEGIN );
xTemp->Read( pTemp, nLen );
pBas = new SvMemoryStream( pTemp, nLen, STREAM_READ );
- pBas->ObjectOwnsMemory( TRUE );
- return TRUE;
+ pBas->ObjectOwnsMemory( sal_True );
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index 11cd4f714fae..8ff33e63e9dc 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -192,9 +192,9 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
sal_uInt32 mnTextSize;
SvStorageRef mrStg;
- SvStorageStream* mpCurUserStrm;
- SvStorageStream* mpStrm;
- SvStorageStream* mpPicStrm;
+ SvStream* mpCurUserStrm;
+ SvStream* mpStrm;
+ SvStream* mpPicStrm;
PptEscherEx* mpPptEscherEx;
List maExOleObj;
diff --git a/sd/source/filter/eppt/epptdef.hxx b/sd/source/filter/eppt/epptdef.hxx
index 7b5f2d17a9b8..ad93ec30f5a2 100644..100755
--- a/sd/source/filter/eppt/epptdef.hxx
+++ b/sd/source/filter/eppt/epptdef.hxx
@@ -133,7 +133,7 @@
#define EPP_PST_ExtendedParagraphMasterAtom 4013
#define EPP_PST_ExtendedPresRuleContainer 4014 // consist of 4012, 4015,
#define EPP_PST_ExtendedParagraphHeaderAtom 4015 // the instance of this atom indices the current presobj
- // the first UINT32 in this atom indices the current slideId
+ // the first sal_uInt32 in this atom indices the current slideId
#define EPP_FontEnityAtom 4023
#define EPP_FontEmbedData 4024
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index acd0a571e797..0466af7e6418 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -615,10 +615,10 @@ sal_Bool PPTWriter::ImplCloseDocument()
if ( nOldPos )
{
mpStrm->Seek( nOldPos );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// ---------------------------------------------------------------------------------------------
@@ -701,7 +701,7 @@ sal_Bool PropValue::ImplGetPropertyValue( const ::com::sun::star::uno::Reference
sal_Bool PropStateValue::ImplGetPropertyValue( const String& rString, sal_Bool bGetPropertyState )
{
ePropState = ::com::sun::star::beans::PropertyState_AMBIGUOUS_VALUE;
- sal_Bool bRetValue = TRUE;
+ sal_Bool bRetValue = sal_True;
#ifdef UNX
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
aXPropSetInfo( mXPropSet->getPropertySetInfo() );
@@ -712,7 +712,7 @@ sal_Bool PropStateValue::ImplGetPropertyValue( const String& rString, sal_Bool b
{
mAny = mXPropSet->getPropertyValue( rString );
if ( !mAny.hasValue() )
- bRetValue = FALSE;
+ bRetValue = sal_False;
else if ( bGetPropertyState )
ePropState = mXPropState->getPropertyState( rString );
else
@@ -720,7 +720,7 @@ sal_Bool PropStateValue::ImplGetPropertyValue( const String& rString, sal_Bool b
}
catch( ::com::sun::star::uno::Exception& )
{
- bRetValue = FALSE;
+ bRetValue = sal_False;
}
return bRetValue;
}
@@ -729,14 +729,14 @@ sal_Bool PropStateValue::ImplGetPropertyValue( const String& rString, sal_Bool b
void PPTWriter::ImplWriteParagraphs( SvStream& rOut, TextObj& rTextObj )
{
- sal_Bool bFirstParagraph = TRUE;
+ sal_Bool bFirstParagraph = sal_True;
sal_uInt32 nCharCount;
sal_uInt32 nPropertyFlags = 0;
sal_uInt16 nDepth = 0;
sal_Int16 nLineSpacing;
int nInstance = rTextObj.GetInstance();
- for ( ParagraphObj* pPara = rTextObj.First() ; pPara; pPara = rTextObj.Next(), bFirstParagraph = FALSE )
+ for ( ParagraphObj* pPara = rTextObj.First() ; pPara; pPara = rTextObj.Next(), bFirstParagraph = sal_False )
{
PortionObj* pPortion = (PortionObj*)pPara->First();
nCharCount = pPara->Count();
@@ -1450,12 +1450,12 @@ void PPTWriter::ImplWriteObjectEffect( SvStream& rSt,
sal_uInt32 nSoundRef = 0; // 0 if storage is from clipboard. Otherwise index(ID) in SoundCollection list.
sal_uInt32 nDelayTime = 0; // delay before playing object
sal_uInt16 nSlideCount = 1; // number of slides to play object
- UINT8 nBuildType = 1; // type of build
- UINT8 nFlyMethod = 0; // animation effect( fly, zoom, appear, etc )
- UINT8 nFlyDirection = 0; // Animation direction( left, right, up, down, etc )
- UINT8 nAfterEffect = 0; // what to do after build
- UINT8 nSubEffect = 0; // build by word or letter
- UINT8 nOleVerb = 0; // Determines object's class (sound, video, other)
+ sal_uInt8 nBuildType = 1; // type of build
+ sal_uInt8 nFlyMethod = 0; // animation effect( fly, zoom, appear, etc )
+ sal_uInt8 nFlyDirection = 0; // Animation direction( left, right, up, down, etc )
+ sal_uInt8 nAfterEffect = 0; // what to do after build
+ sal_uInt8 nSubEffect = 0; // build by word or letter
+ sal_uInt8 nOleVerb = 0; // Determines object's class (sound, video, other)
if ( eAe == ::com::sun::star::presentation::AnimationEffect_NONE )
{
@@ -1935,8 +1935,8 @@ void PPTWriter::ImplWriteObjectEffect( SvStream& rSt,
}
}
}
- sal_Bool bDimHide = FALSE;
- sal_Bool bDimPrevious = FALSE;
+ sal_Bool bDimHide = sal_False;
+ sal_Bool bDimPrevious = sal_False;
if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "DimHide" ) ) ) )
mAny >>= bDimHide;
if ( ImplGetPropertyValue( String( RTL_CONSTASCII_USTRINGPARAM( "DimPrevious" ) ) ) )
@@ -2132,7 +2132,7 @@ sal_Bool PPTWriter::ImplGetEffect( const ::com::sun::star::uno::Reference< ::com
if ( GetPropertyValue( aAny, rPropSet, String( RTL_CONSTASCII_USTRINGPARAM( "SoundOn" ) ) ) )
aAny >>= bIsSound;
else
- bIsSound = FALSE;
+ bIsSound = sal_False;
sal_Bool bHasEffect = ( ( eEffect != ::com::sun::star::presentation::AnimationEffect_NONE )
|| ( eTextEffect != ::com::sun::star::presentation::AnimationEffect_NONE )
@@ -2225,16 +2225,16 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
nIndices = nInstance = nLastPer = nShapeCount = nEffectCount = 0;
- sal_Bool bIsTitlePossible = TRUE; // bei mehr als einem title geht powerpoint in die knie
+ sal_Bool bIsTitlePossible = sal_True; // bei mehr als einem title geht powerpoint in die knie
sal_uInt32 nOutlinerCount = 0; // die gliederungsobjekte muessen dem layout entsprechen,
sal_uInt32 nPrevTextStyle = 0; // es darf nicht mehr als zwei geben
nOlePictureId = 0;
- sal_Bool bAdditionalText = FALSE;
+ sal_Bool bAdditionalText = sal_False;
- sal_Bool bSecOutl = FALSE;
+ sal_Bool bSecOutl = sal_False;
sal_uInt32 nPObjects = 0;
SvMemoryStream* pClientTextBox = NULL;
@@ -2260,7 +2260,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
nGroups = GetGroupsClosed();
for ( sal_uInt32 i = 0; i < nGroups; i++, mpPptEscherEx->LeaveGroup() ) ;
- if ( GetShapeByIndex( GetCurrentGroupIndex(), TRUE ) )
+ if ( GetShapeByIndex( GetCurrentGroupIndex(), sal_True ) )
{
sal_Bool bIsSound;
sal_Bool bMediaClickAction = sal_False;
@@ -2478,7 +2478,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
mpPptEscherEx->EnterGroup( 0,0 );
nGroupLevel = mpPptEscherEx->GetGroupLevel();
bNeedText = sal_False;
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
mnTextSize = 0;
}
mnAngle = 0;
@@ -2562,7 +2562,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
::com::sun::star::awt::Size aSize;
String aControlName;
- SvStorageRef xTemp( new SvStorage( new SvMemoryStream(), TRUE ) );
+ SvStorageRef xTemp( new SvStorage( new SvMemoryStream(), sal_True ) );
if ( SvxMSConvertOCXControls::WriteOCXStream( xTemp, aXControlModel, aSize, aControlName ) )
{
String aUserName( xTemp->GetUserName() );
@@ -2594,7 +2594,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( ( nStringLen > 1 ) && ( ( xCompObj->Tell() + nStringLen ) < nStreamLen ) )
{ // i think that the OleIdentifier will follow
ByteString aTemp;
- sal_Char* p = aTemp.AllocBuffer( (USHORT)(nStringLen - 1) );
+ sal_Char* p = aTemp.AllocBuffer( (sal_uInt16)(nStringLen - 1) );
xCompObj->Read( p, nStringLen - 1 );
aOleIdentifier = String( aTemp, gsl_getSystemTextEncoding() );
}
@@ -2636,7 +2636,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
*pTmp++ = 0;
*pTmp = 0;
- aPropOpt.AddOpt( ESCHER_Prop_wzName, TRUE, nBufSize, pBuf, nBufSize );
+ aPropOpt.AddOpt( ESCHER_Prop_wzName, sal_True, nBufSize, pBuf, nBufSize );
}
}
else if ( mType == "drawing.Connector" )
@@ -2668,7 +2668,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
aTextRefPoint = ::com::sun::star::awt::Point( maRect.Left(), maRect.Top() );
mnTextSize = 0;
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
mpPptEscherEx->EnterGroup( &maRect,0 );
}
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -2689,7 +2689,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mpPptEscherEx->EnterGroup( 0,0 );
nGroupLevel = mpPptEscherEx->GetGroupLevel();
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
mnTextSize = 0;
}
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -2708,7 +2708,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mpPptEscherEx->EnterGroup( 0,0 );
nGroupLevel = mpPptEscherEx->GetGroupLevel();
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
mnTextSize = 0;
}
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -2727,7 +2727,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mpPptEscherEx->EnterGroup( 0,0 );
nGroupLevel = mpPptEscherEx->GetGroupLevel();
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
mnTextSize = 0;
}
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -2746,7 +2746,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mpPptEscherEx->EnterGroup( 0,0 );
nGroupLevel = mpPptEscherEx->GetGroupLevel();
- bAdditionalText = TRUE;
+ bAdditionalText = sal_True;
mnTextSize = 0;
}
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
@@ -2816,7 +2816,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
else
nPlaceHolderAtom = EPP_PLACEHOLDER_NOTESBODY;
}
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
else if ( mType == "presentation.TitleText" )
{
@@ -2832,7 +2832,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
else if ( rLayout.bTitlePossible && bIsTitlePossible )
{
- bIsTitlePossible = FALSE;
+ bIsTitlePossible = sal_False;
ImplGetText();
TextObjBinary aTextObj( mXText, EPP_TEXTTYPE_Title, maFontCollection, (PPTExBulletProvider&)*this );
@@ -2911,12 +2911,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
}
else
- mbPresObj = FALSE;
+ mbPresObj = sal_False;
}
if ( !mbPresObj )
{
mType = "drawing.Text";
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
}
else if ( ( mType == "presentation.Outliner" ) || ( mType == "presentation.Subtitle" ) )
@@ -3007,12 +3007,12 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
}
else
- mbPresObj = FALSE;
+ mbPresObj = sal_False;
}
if ( !mbPresObj )
{
mType = "drawing.Text";
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
}
else if ( ( mType == "drawing.Page" ) || ( mType == "presentation.Page" ) )
@@ -3024,7 +3024,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
else
nPlaceHolderAtom = EPP_PLACEHOLDER_NOTESSLIDEIMAGE;
}
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
else if ( mType == "drawing.Frame" )
{
@@ -3111,7 +3111,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mbPresObj = sal_False;
mType = "drawing.Text";
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
}
else if ( mType == "presentation.Footer" )
@@ -3122,7 +3122,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mbPresObj = sal_False;
mType = "drawing.Text";
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
}
else if ( mType == "presentation.DateTime" )
@@ -3133,7 +3133,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mbPresObj = sal_False;
mType = "drawing.Text";
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
}
else if ( mType == "presentation.SlideNumber" )
@@ -3144,7 +3144,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
{
mbPresObj = sal_False;
mType = "drawing.Text";
- ImplCreateTextShape( aPropOpt, aSolverContainer, TRUE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_True );
}
}
else if ( ( (sal_Char)'3' == mType.GetChar( 8 ) ) && ( (char)'D' == mType.GetChar( 9 ) ) ) // drawing.3D
@@ -3329,9 +3329,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( !pClientTextBox )
pClientTextBox = new SvMemoryStream( 0x200, 0x200 );
- if ( mbEmptyPresObj == FALSE )
+ if ( mbEmptyPresObj == sal_False )
{
- if ( ( ePageType == NORMAL ) && ( bMasterPage == FALSE ) )
+ if ( ( ePageType == NORMAL ) && ( bMasterPage == sal_False ) )
{
sal_uInt32 nTextType = EPP_TEXTTYPE_Body;
if ( mnTextStyle == EPP_TEXTSTYLE_BODY )
@@ -3433,7 +3433,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( bAdditionalText )
{
- bAdditionalText = FALSE;
+ bAdditionalText = sal_False;
::com::sun::star::uno::Any aAny;
EscherPropertyContainer aPropOpt;
@@ -3449,7 +3449,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
double fDist = hypot( maRect.GetWidth(), maRect.GetHeight() );
maRect = Rectangle( Point( aTextRefPoint.X, aTextRefPoint.Y ),
Point( (sal_Int32)( aTextRefPoint.X + fDist ), aTextRefPoint.Y - 1 ) );
- ImplCreateTextShape( aPropOpt, aSolverContainer, FALSE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_False );
aPropOpt.AddOpt( ESCHER_Prop_FitTextToShape, 0x60006 ); // Size Shape To Fit Text
if ( mnAngle < 0 )
mnAngle = ( 36000 + mnAngle ) % 36000;
@@ -3458,7 +3458,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
else
{
- ImplCreateTextShape( aPropOpt, aSolverContainer, FALSE );
+ ImplCreateTextShape( aPropOpt, aSolverContainer, sal_False );
if ( mnAngle < 0 )
mnAngle = ( 36000 + mnAngle ) % 36000;
else
@@ -3561,10 +3561,10 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
mpPptEscherEx->OpenContainer( ESCHER_SpgrContainer );
mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
mpPptEscherEx->AddAtom( 16, ESCHER_Spgr, 1 );
- *mpStrm << (INT32)maRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
- << (INT32)maRect.Top()
- << (INT32)maRect.Right()
- << (INT32)maRect.Bottom();
+ *mpStrm << (sal_Int32)maRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
+ << (sal_Int32)maRect.Top()
+ << (sal_Int32)maRect.Right()
+ << (sal_Int32)maRect.Bottom();
sal_uInt32 nShapeId = mpPptEscherEx->GenerateShapeId();
mpPptEscherEx->AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId ); // Flags: Group | Patriarch
@@ -3614,7 +3614,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
if ( nRowCount )
{
SvMemoryStream aMemStrm;
- aMemStrm.ObjectOwnsMemory( FALSE );
+ aMemStrm.ObjectOwnsMemory( sal_False );
aMemStrm << nRowCount
<< nRowCount
<< (sal_uInt16)4;
diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx
index dba09a161337..7714ca4d761b 100644
--- a/sd/source/filter/eppt/escherex.cxx
+++ b/sd/source/filter/eppt/escherex.cxx
@@ -51,7 +51,7 @@ sal_uInt32 PptEscherEx::DrawingGroupContainerSize()
void PptEscherEx::WriteDrawingGroupContainer( SvStream& rSt )
{
- UINT32 nSize = DrawingGroupContainerSize();
+ sal_uInt32 nSize = DrawingGroupContainerSize();
rSt << (sal_uInt32)( 0xf | ( 1035 << 16 ) ) // EPP_PPDrawingGroup
<< (sal_uInt32)( nSize - 8 );
@@ -62,7 +62,7 @@ void PptEscherEx::WriteDrawingGroupContainer( SvStream& rSt )
sal_uInt32 PptEscherEx::ImplDggContainerSize()
{
- UINT32 nSize;
+ sal_uInt32 nSize;
nSize = mxGlobal->GetDggAtomSize();
nSize += mxGlobal->GetBlibStoreContainerSize();
@@ -130,7 +130,7 @@ sal_uInt32 PptEscherEx::ImplSplitMenuColorsAtomSize()
void PptEscherEx::ImplWriteSplitMenuColorsAtom( SvStream& rSt )
{
- UINT32 nSize = ImplSplitMenuColorsAtomSize();
+ sal_uInt32 nSize = ImplSplitMenuColorsAtomSize();
if ( nSize )
{
rSt << (sal_uInt32)( ( ESCHER_SplitMenuColors << 16 ) | ( ESCHER_SPLIT_MENU_COLORS_COUNT << 4 ) )
@@ -151,9 +151,9 @@ PptEscherEx::~PptEscherEx()
// ---------------------------------------------------------------------------------------------
-void PptEscherEx::OpenContainer( UINT16 n_EscherContainer, int nRecInstance )
+void PptEscherEx::OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance )
{
- *mpOutStrm << (UINT16)( ( nRecInstance << 4 ) | 0xf ) << n_EscherContainer << (UINT32)0;
+ *mpOutStrm << (sal_uInt16)( ( nRecInstance << 4 ) | 0xf ) << n_EscherContainer << (sal_uInt32)0;
mOffsets.push_back( mpOutStrm->Tell() - 4 );
mRecTypes.push_back( n_EscherContainer );
@@ -163,12 +163,12 @@ void PptEscherEx::OpenContainer( UINT16 n_EscherContainer, int nRecInstance )
{
if ( !mbEscherDg )
{
- mbEscherDg = TRUE;
+ mbEscherDg = sal_True;
mnCurrentDg = mxGlobal->GenerateDrawingId();
AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg );
PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() );
- *mpOutStrm << (UINT32)0 // The number of shapes in this drawing
- << (UINT32)0; // The last MSOSPID given to an SP in this DG
+ *mpOutStrm << (sal_uInt32)0 // The number of shapes in this drawing
+ << (sal_uInt32)0; // The last MSOSPID given to an SP in this DG
}
}
break;
@@ -177,7 +177,7 @@ void PptEscherEx::OpenContainer( UINT16 n_EscherContainer, int nRecInstance )
{
if ( mbEscherDg )
{
- mbEscherSpgr = TRUE;
+ mbEscherSpgr = sal_True;
}
}
break;
@@ -197,7 +197,7 @@ void PptEscherEx::CloseContainer()
*/
if ( ( mRecTypes.back() != ESCHER_SpgrContainer ) || ( mnGroupLevel < 12 ) )
{
- UINT32 nSize, nPos = mpOutStrm->Tell();
+ sal_uInt32 nSize, nPos = mpOutStrm->Tell();
nSize = ( nPos - mOffsets.back() ) - 4;
mpOutStrm->Seek( mOffsets.back() );
*mpOutStrm << nSize;
@@ -208,7 +208,7 @@ void PptEscherEx::CloseContainer()
{
if ( mbEscherDg )
{
- mbEscherDg = FALSE;
+ mbEscherDg = sal_False;
if ( DoSeek( ESCHER_Persist_Dg | mnCurrentDg ) )
*mpOutStrm << mxGlobal->GetDrawingShapeCount( mnCurrentDg ) << mxGlobal->GetLastShapeId( mnCurrentDg );
}
@@ -219,7 +219,7 @@ void PptEscherEx::CloseContainer()
{
if ( mbEscherSpgr )
{
- mbEscherSpgr = FALSE;
+ mbEscherSpgr = sal_False;
}
}
@@ -253,10 +253,10 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie
OpenContainer( ESCHER_SpContainer );
AddAtom( 16, ESCHER_Spgr, 1 );
PtReplaceOrInsert( ESCHER_Persist_Grouping_Snap | mnGroupLevel, mpOutStrm->Tell() );
- *mpOutStrm << (INT32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
- << (INT32)aRect.Top()
- << (INT32)aRect.Right()
- << (INT32)aRect.Bottom();
+ *mpOutStrm << (sal_Int32)aRect.Left() // Bounding box fuer die Gruppierten shapes an die sie attached werden
+ << (sal_Int32)aRect.Top()
+ << (sal_Int32)aRect.Right()
+ << (sal_Int32)aRect.Bottom();
nShapeId = GenerateShapeId();
if ( !mnGroupLevel )
@@ -268,7 +268,7 @@ sal_uInt32 PptEscherEx::EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClie
{
AddAtom( 8, ESCHER_ClientAnchor );
PtReplaceOrInsert( ESCHER_Persist_Grouping_Logic | mnGroupLevel, mpOutStrm->Tell() );
- *mpOutStrm << (INT16)aRect.Top() << (INT16)aRect.Left() << (INT16)aRect.Right() << (INT16)aRect.Bottom();
+ *mpOutStrm << (sal_Int16)aRect.Top() << (sal_Int16)aRect.Left() << (sal_Int16)aRect.Right() << (sal_Int16)aRect.Bottom();
}
else
{
diff --git a/sd/source/filter/eppt/escherex.hxx b/sd/source/filter/eppt/escherex.hxx
index 4589ea8f5c6c..4b77a1a755c1 100644..100755
--- a/sd/source/filter/eppt/escherex.hxx
+++ b/sd/source/filter/eppt/escherex.hxx
@@ -31,7 +31,7 @@
#include <filter/msfilter/escherex.hxx>
// ---------------------------------------------------------------------------------------------
-// Werte fuer den ULONG im PPT_PST_TextHeaderAtom
+// Werte fuer den sal_uLong im PPT_PST_TextHeaderAtom
enum PPT_TextHeader
{
PPTTH_TITLE,
@@ -63,12 +63,12 @@ class PptEscherEx : public EscherEx
PptEscherEx( SvStream& rOut );
~PptEscherEx();
- void OpenContainer( UINT16 n_EscherContainer, int nRecInstance = 0 );
+ void OpenContainer( sal_uInt16 n_EscherContainer, int nRecInstance = 0 );
void CloseContainer();
sal_uInt32 EnterGroup( Rectangle* pBoundRect, SvMemoryStream* pClientData );
- UINT32 DrawingGroupContainerSize();
+ sal_uInt32 DrawingGroupContainerSize();
void WriteDrawingGroupContainer( SvStream& rSt );
using EscherEx::EnterGroup;
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 162379581d3d..a40a84e693c0 100644..100755
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -108,7 +108,7 @@ using namespace ::sfx2;
class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper1< com::sun::star::task::XInteractionHandler >
{
com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > m_xInter;
- USHORT nFilterError;
+ sal_uInt16 nFilterError;
public:
@@ -119,7 +119,7 @@ class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper1< com::sun:
~SdGRFFilter_ImplInteractionHdl();
- USHORT GetErrorCode() const { return nFilterError; };
+ sal_uInt16 GetErrorCode() const { return nFilterError; };
virtual void SAL_CALL handle( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest >& )
throw( com::sun::star::uno::RuntimeException );
@@ -137,7 +137,7 @@ void SdGRFFilter_ImplInteractionHdl::handle( const com::sun::star::uno::Referenc
com::sun::star::drawing::GraphicFilterRequest aErr;
if ( xRequest->getRequest() >>= aErr )
- nFilterError = (USHORT)aErr.ErrCode;
+ nFilterError = (sal_uInt16)aErr.ErrCode;
else
m_xInter->handle( xRequest );
}
@@ -160,9 +160,9 @@ SdGRFFilter::~SdGRFFilter()
// -----------------------------------------------------------------------------
-void SdGRFFilter::HandleGraphicFilterError( USHORT nFilterError, ULONG nStreamError )
+void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong nStreamError )
{
- USHORT nId;
+ sal_uInt16 nId;
switch( nFilterError )
{
@@ -209,14 +209,14 @@ sal_Bool SdGRFFilter::Import()
Graphic aGraphic;
const String aFileName( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
GraphicFilter* pGraphicFilter = GraphicFilter::GetGraphicFilter();
- const USHORT nFilter = pGraphicFilter->GetImportFormatNumberForTypeName( mrMedium.GetFilter()->GetTypeName() );
+ const sal_uInt16 nFilter = pGraphicFilter->GetImportFormatNumberForTypeName( mrMedium.GetFilter()->GetTypeName() );
sal_Bool bRet = sal_False;
// ggf. Filterdialog ausfuehren
if ( !pGraphicFilter->HasImportDialog( nFilter ) || pGraphicFilter->DoImportDialog( NULL, nFilter ) )
{
SvStream* pIStm = mrMedium.GetInStream();
- USHORT nReturn = pIStm ? pGraphicFilter->ImportGraphic( aGraphic, aFileName, *pIStm, nFilter ) : 1;
+ sal_uInt16 nReturn = pIStm ? pGraphicFilter->ImportGraphic( aGraphic, aFileName, *pIStm, nFilter ) : 1;
if( nReturn )
HandleGraphicFilterError( nReturn, pGraphicFilter->GetLastError().nStreamError );
@@ -314,7 +314,7 @@ sal_Bool SdGRFFilter::Export()
if ( pSet && pGraphicFilter && xSource.is() )
{
const String aTypeName( mrMedium.GetFilter()->GetTypeName() );
- const USHORT nFilter = pGraphicFilter->GetExportFormatNumberForTypeName( aTypeName );
+ const sal_uInt16 nFilter = pGraphicFilter->GetExportFormatNumberForTypeName( aTypeName );
if ( nFilter != GRFILTER_FORMAT_NOTFOUND )
{
uno::Reference< task::XInteractionHandler > mXInteractionHandler;
@@ -479,11 +479,11 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
GraphicFilter& rGF = *GraphicFilter::GetGraphicFilter();
Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
OUString aDefaultFormatName;
- USHORT nCount = rGF.GetExportFormatCount();
+ sal_uInt16 nCount = rGF.GetExportFormatCount();
std::map< OUString, OUString > aMimeTypeMap;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
const OUString aExportFormatName( rGF.GetExportFormatName( i ) );
const OUString aFilterMimeType( rGF.GetExportFormatMediaType( i ) );
@@ -496,7 +496,7 @@ void SdGRFFilter::SaveGraphic( const ::com::sun::star::uno::Reference< ::com::su
if( aDefaultFormatName.getLength() == 0 )
{
nCount = rGF.GetImportFormatCount();
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
const OUString aFilterMimeType( rGF.GetImportFormatMediaType( i ) );
if( aMimeType == aFilterMimeType )
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 80f21e0676f7..fd46e1412a5e 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -159,9 +159,9 @@ public:
EasyFile();
~EasyFile();
- ULONG createStream( const String& rUrl, SvStream*& rpStr );
- ULONG createFileName( const String& rUrl, String& rFileName );
- ULONG close();
+ sal_uLong createStream( const String& rUrl, SvStream*& rpStr );
+ sal_uLong createFileName( const String& rUrl, String& rFileName );
+ sal_uLong close();
};
// *********************************************************************
@@ -356,7 +356,7 @@ String HtmlState::SetLink( const String& aLink, const String& aTarget )
// class HtmlExport Methoden
// *********************************************************************
-static String getParagraphStyle( SdrOutliner* pOutliner, USHORT nPara )
+static String getParagraphStyle( SdrOutliner* pOutliner, sal_uInt16 nPara )
{
SfxItemSet aParaSet( pOutliner->GetParaAttribs( nPara ) );
@@ -439,7 +439,7 @@ HtmlExport::~HtmlExport()
// ------------------------------------------------------------------
if(mpImageFiles && mpHTMLFiles && mpPageNames && mpTextFiles)
{
- for ( USHORT nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
+ for ( sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
{
delete mpImageFiles[nSdPage];
delete mpHTMLFiles[nSdPage];
@@ -490,7 +490,7 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
xub_StrLen nPos = aTmp.Search( '%' );
if(nPos != STRING_NOTFOUND)
aTmp.Erase(nPos,1);
- mnCompression = (INT16)aTmp.ToInt32();
+ mnCompression = (sal_Int16)aTmp.ToInt32();
}
}
else if( pParams->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Width" ) ) )
@@ -654,7 +654,7 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
Size aTmpSize( pPage->GetSize() );
double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
- mnHeightPixel = (USHORT)(mnWidthPixel/dRatio);
+ mnHeightPixel = (sal_uInt16)(mnWidthPixel/dRatio);
//------------------------------------------------------------------
// Ziel ausklamuestern...
@@ -666,7 +666,7 @@ void HtmlExport::InitExportParameters( const Sequence< PropertyValue >& rParams
maIndex = aINetURLObj.GetLastName();
mnSdPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
- for( USHORT nPage = 0; nPage < mnSdPageCount; nPage++ )
+ for( sal_uInt16 nPage = 0; nPage < mnSdPageCount; nPage++ )
{
pPage = mpDoc->GetSdPage( nPage, PK_STANDARD );
@@ -707,7 +707,7 @@ void HtmlExport::ExportHtml()
if( mbDownload )
{
// Separator such und Extension ausblenden
- USHORT nSepPos = maDocFileName.Search( sal_Unicode('.') );
+ sal_uInt16 nSepPos = maDocFileName.Search( sal_Unicode('.') );
if(nSepPos != STRING_NOTFOUND)
maDocFileName.Erase(nSepPos);
@@ -717,7 +717,7 @@ void HtmlExport::ExportHtml()
//////
- USHORT nProgrCount = mnSdPageCount;
+ sal_uInt16 nProgrCount = mnSdPageCount;
nProgrCount += mbImpress?mnSdPageCount:0;
nProgrCount += mbContentsPage?1:0;
nProgrCount += (mbFrames && mbNotes)?mnSdPageCount:0;
@@ -817,8 +817,8 @@ void HtmlExport::SetDocColors( SdPage* pPage )
if(pSheet)
{
SfxItemSet& rSet = pSheet->GetItemSet();
- if(rSet.GetItemState(EE_CHAR_COLOR,TRUE) == SFX_ITEM_ON)
- maTextColor = ((SvxColorItem*)rSet.GetItem(EE_CHAR_COLOR,TRUE))->GetValue();
+ if(rSet.GetItemState(EE_CHAR_COLOR,sal_True) == SFX_ITEM_ON)
+ maTextColor = ((SvxColorItem*)rSet.GetItem(EE_CHAR_COLOR,sal_True))->GetValue();
}
// Standard Hintergrundfarbe aus Background der MasterPage der ersten Seite
@@ -833,7 +833,7 @@ void HtmlExport::SetDocColors( SdPage* pPage )
///////////////////////////////////////////////////////////////////////
-void HtmlExport::InitProgress( USHORT nProgrCount )
+void HtmlExport::InitProgress( sal_uInt16 nProgrCount )
{
String aStr(SdResId(STR_CREATE_PAGES));
mpProgress = new SfxProgress( mpDocSh, aStr, nProgrCount );
@@ -872,7 +872,7 @@ void HtmlExport::ExportWebCast()
mnPagesWritten = 0;
InitProgress( mnSdPageCount + 9 );
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
CreateFileNames();
@@ -1014,7 +1014,7 @@ bool HtmlExport::CreateImagesForPresPages()
aDescriptor[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM("FilterData") );
aDescriptor[2].Value <<= aFilterData;
- for (USHORT nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
+ for (sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
{
SdPage* pPage = maPages[ nSdPage ];
@@ -1044,11 +1044,11 @@ bool HtmlExport::CreateImagesForPresPages()
// =====================================================================
SdrTextObj* HtmlExport::GetLayoutTextObject(SdrPage* pPage)
{
- ULONG nObjectCount = pPage->GetObjCount();
+ sal_uLong nObjectCount = pPage->GetObjCount();
SdrObject* pObject = NULL;
SdrTextObj* pResult = NULL;
- for (ULONG nObject = 0; nObject < nObjectCount; nObject++)
+ for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++)
{
pObject = pPage->GetObj(nObject);
if (pObject->GetObjInventor() == SdrInventor &&
@@ -1084,7 +1084,7 @@ bool HtmlExport::CreateHtmlTextForPresPages()
SdrOutliner* pOutliner = mpDoc->GetInternalOutliner();
- for(USHORT nSdPage = 0; nSdPage < mnSdPageCount && bOk; nSdPage++)
+ for(sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount && bOk; nSdPage++)
{
SdPage* pPage = maPages[ nSdPage ];
@@ -1151,7 +1151,7 @@ bool HtmlExport::CreateHtmlTextForPresPages()
the given filename */
bool HtmlExport::WriteHtml( const String& rFileName, bool bAddExtension, const String& rHtmlData )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
String aFileName( rFileName );
if( bAddExtension )
@@ -1221,19 +1221,19 @@ String HtmlExport::CreateTextForPage( SdrOutliner* pOutliner,
pOutliner->Clear();
pOutliner->SetText( *pOPO );
- ULONG nCount = pOutliner->GetParagraphCount();
+ sal_uLong nCount = pOutliner->GetParagraphCount();
Paragraph* pPara = NULL;
sal_Int16 nActDepth = -1;
String aParaText;
- for (ULONG nPara = 0; nPara < nCount; nPara++)
+ for (sal_uLong nPara = 0; nPara < nCount; nPara++)
{
pPara = pOutliner->GetParagraph(nPara);
if(pPara == 0)
continue;
- const sal_Int16 nDepth = (USHORT) pOutliner->GetDepth( (USHORT) nPara );
+ const sal_Int16 nDepth = (sal_uInt16) pOutliner->GetDepth( (sal_uInt16) nPara );
aParaText = ParagraphToHTMLString(pOutliner,nPara,rBackgroundColor);
if(aParaText.Len() == 0)
@@ -1318,8 +1318,8 @@ String HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
pOutliner->Clear();
pOutliner->SetText( *pOPO );
- ULONG nCount = pOutliner->GetParagraphCount();
- for (ULONG nPara = 0; nPara < nCount; nPara++)
+ sal_uLong nCount = pOutliner->GetParagraphCount();
+ for (sal_uLong nPara = 0; nPara < nCount; nPara++)
{
aStr.AppendAscii("<p style=\"");
aStr.Append( getParagraphStyle( pOutliner, nPara ) );
@@ -1336,7 +1336,7 @@ String HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
// =====================================================================
// Wandelt einen Paragraphen des Outliners in Html
// =====================================================================
-String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, ULONG nPara, const Color& rBackgroundColor )
+String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, sal_uLong nPara, const Color& rBackgroundColor )
{
String aStr;
@@ -1346,7 +1346,7 @@ String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, ULONG nPara, c
// TODO: MALTE!!!
EditEngine& rEditEngine = *(EditEngine*)&pOutliner->GetEditEngine();
bool bOldUpdateMode = rEditEngine.GetUpdateMode();
- rEditEngine.SetUpdateMode(TRUE);
+ rEditEngine.SetUpdateMode(sal_True);
Paragraph* pPara = pOutliner->GetParagraph(nPara);
if(NULL == pPara)
@@ -1354,15 +1354,15 @@ String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, ULONG nPara, c
HtmlState aState( (mbUserAttr || mbDocColors) ? maTextColor : Color(COL_BLACK) );
SvUShorts aPortionList;
- rEditEngine.GetPortions( (USHORT) nPara, aPortionList );
- USHORT nPortionCount = aPortionList.Count();
+ rEditEngine.GetPortions( (sal_uInt16) nPara, aPortionList );
+ sal_uInt16 nPortionCount = aPortionList.Count();
- USHORT nPos1 = 0;
- for( USHORT nPortion = 0; nPortion < nPortionCount; nPortion++ )
+ sal_uInt16 nPos1 = 0;
+ for( sal_uInt16 nPortion = 0; nPortion < nPortionCount; nPortion++ )
{
- USHORT nPos2 = aPortionList.GetObject(nPortion);
+ sal_uInt16 nPos2 = aPortionList.GetObject(nPortion);
- ESelection aSelection( (USHORT) nPara, nPos1, (USHORT) nPara, nPos2);
+ ESelection aSelection( (sal_uInt16) nPara, nPos1, (sal_uInt16) nPara, nPos2);
SfxItemSet aSet( rEditEngine.GetAttribs( aSelection ) );
@@ -1479,7 +1479,7 @@ bool HtmlExport::CreateHtmlForPresPages()
List aClickableObjects;
- for(USHORT nSdPage = 0; nSdPage < mnSdPageCount && bOk; nSdPage++)
+ for(sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount && bOk; nSdPage++)
{
// Klickbare Objekte finden (auch auf der Masterpage) und
// in Liste stellen. In umgekehrter Zeichenreihenfolge in
@@ -1497,8 +1497,8 @@ bool HtmlExport::CreateHtmlForPresPages()
while (!bMasterDone)
{
- // TRUE = rueckwaerts
- SdrObjListIter aIter(*pPage, IM_DEEPWITHGROUPS, TRUE);
+ // sal_True = rueckwaerts
+ SdrObjListIter aIter(*pPage, IM_DEEPWITHGROUPS, sal_True);
SdrObject* pObject = aIter.Next();
while (pObject)
@@ -1526,7 +1526,7 @@ bool HtmlExport::CreateHtmlForPresPages()
else
bMasterDone = true;
}
- ULONG nClickableObjectCount = aClickableObjects.Count();
+ sal_uLong nClickableObjectCount = aClickableObjects.Count();
// HTML Head
String aStr(maHTMLHeader);
@@ -1539,7 +1539,7 @@ bool HtmlExport::CreateHtmlForPresPages()
pPage = maPages[ nSdPage ];
if( meMode == PUBLISH_KIOSK )
{
- ULONG nSecs = 0;
+ sal_uLong nSecs = 0;
bool bEndless = false;
if( !mbAutoSlide )
{
@@ -1620,7 +1620,7 @@ bool HtmlExport::CreateHtmlForPresPages()
{
aStr.AppendAscii( "<map name=\"map0\">\r\n" );
- for (ULONG nObject = 0; nObject < nClickableObjectCount; nObject++)
+ for (sal_uLong nObject = 0; nObject < nClickableObjectCount; nObject++)
{
SdrObject* pObject = (SdrObject*)aClickableObjects.GetObject(nObject);
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObject);
@@ -1630,7 +1630,7 @@ bool HtmlExport::CreateHtmlForPresPages()
Point aLogPos(aRect.TopLeft());
bool bIsSquare = aRect.GetWidth() == aRect.GetHeight();
- ULONG nPageWidth = pPage->GetSize().Width() - pPage->GetLftBorder() -
+ sal_uLong nPageWidth = pPage->GetSize().Width() - pPage->GetLftBorder() -
pPage->GetRgtBorder();
// das BoundRect bezieht sich auf den physikalischen
@@ -1652,17 +1652,17 @@ bool HtmlExport::CreateHtmlForPresPages()
if (pIMapInfo)
{
const ImageMap& rIMap = pIMapInfo->GetImageMap();
- UINT16 nAreaCount = rIMap.GetIMapObjectCount();
- for (UINT16 nArea = 0; nArea < nAreaCount; nArea++)
+ sal_uInt16 nAreaCount = rIMap.GetIMapObjectCount();
+ for (sal_uInt16 nArea = 0; nArea < nAreaCount; nArea++)
{
IMapObject* pArea = rIMap.GetIMapObject(nArea);
- UINT16 nType = pArea->GetType();
+ sal_uInt16 nType = pArea->GetType();
String aURL( pArea->GetURL() );
// ggfs. Seiten- oder Objektnamen umwandeln in den
// Namen der entsprechenden HTML-Datei
- BOOL bIsMasterPage;
- USHORT nPgNum = mpDoc->GetPageByName( aURL, bIsMasterPage );
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nPgNum = mpDoc->GetPageByName( aURL, bIsMasterPage );
SdrObject* pObj = NULL;
if (nPgNum == SDRPAGE_NOTFOUND)
@@ -1706,9 +1706,9 @@ bool HtmlExport::CreateHtmlForPresPages()
aCenter.X() = (long)(aCenter.X() * fLogicToPixel);
aCenter.Y() = (long)(aCenter.Y() * fLogicToPixel);
- ULONG nCircleRadius = (((IMapCircleObject*)pArea)->
+ sal_uLong nCircleRadius = (((IMapCircleObject*)pArea)->
GetRadius(false));
- nCircleRadius = (ULONG)(nCircleRadius * fLogicToPixel);
+ nCircleRadius = (sal_uLong)(nCircleRadius * fLogicToPixel);
aStr += CreateHTMLCircleArea(nCircleRadius,
aCenter.X(), aCenter.Y(),
aURL);
@@ -1746,8 +1746,8 @@ bool HtmlExport::CreateHtmlForPresPages()
{
case presentation::ClickAction_BOOKMARK:
{
- BOOL bIsMasterPage;
- USHORT nPgNum = mpDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage );
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nPgNum = mpDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage );
SdrObject* pObj = NULL;
if( nPgNum == SDRPAGE_NOTFOUND )
@@ -1769,25 +1769,25 @@ bool HtmlExport::CreateHtmlForPresPages()
case presentation::ClickAction_PREVPAGE:
{
- ULONG nPage = nSdPage;
+ sal_uLong nPage = nSdPage;
if (nSdPage == 0)
nPage = 0;
else
nPage = nSdPage - 1;
- aHRef = CreatePageURL( (USHORT) nPage);
+ aHRef = CreatePageURL( (sal_uInt16) nPage);
}
break;
case presentation::ClickAction_NEXTPAGE:
{
- ULONG nPage = nSdPage;
+ sal_uLong nPage = nSdPage;
if (nSdPage == mnSdPageCount - 1)
nPage = mnSdPageCount - 1;
else
nPage = nSdPage + 1;
- aHRef = CreatePageURL( (USHORT) nPage);
+ aHRef = CreatePageURL( (sal_uInt16) nPage);
}
break;
@@ -1898,7 +1898,7 @@ bool HtmlExport::CreateContentPage()
aStr += RESTOHTML(STR_HTMLEXP_CONTENTS);
aStr.AppendAscii( "</h3>" );
- for(USHORT nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
+ for(sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
{
String aPageName = *mpPageNames[nSdPage];
aStr.AppendAscii( "<div align=\"left\">" );
@@ -1982,7 +1982,7 @@ bool HtmlExport::CreateNotesPages()
bool bOk = true;
SdrOutliner* pOutliner = mpDoc->GetInternalOutliner();
- for( USHORT nSdPage = 0; bOk && nSdPage < mnSdPageCount; nSdPage++ )
+ for( sal_uInt16 nSdPage = 0; bOk && nSdPage < mnSdPageCount; nSdPage++ )
{
SdPage* pPage = maNotesPages[nSdPage];
if( mbDocColors )
@@ -2038,7 +2038,7 @@ bool HtmlExport::CreateOutlinePages()
aStr += CreateBodyTag();
SdrOutliner* pOutliner = mpDoc->GetInternalOutliner();
- for(USHORT nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
+ for(sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
{
SdPage* pPage = maPages[ nSdPage ];
@@ -2091,7 +2091,7 @@ void HtmlExport::CreateFileNames()
mbHeader = false; // Ueberschrift auf Uebersichtsseite?
- for (USHORT nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
+ for (sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
{
String* pName;
if(nSdPage == 0 && !mbContentsPage && !mbFrames )
@@ -2167,7 +2167,7 @@ String HtmlExport::getDocumentTitle()
}
}
- for( UINT16 i = 0; i < mDocTitle.Len(); i++ )
+ for( sal_uInt16 i = 0; i < mDocTitle.Len(); i++ )
if( mDocTitle.GetChar(i) == (sal_Unicode)0xff)
mDocTitle.SetChar(i, sal_Unicode(' ') );
}
@@ -2177,7 +2177,7 @@ String HtmlExport::getDocumentTitle()
mDocTitle = maDocFileName;
int nDot = mDocTitle.Search( '.' );
if( nDot > 0 )
- mDocTitle.Erase( (USHORT)nDot );
+ mDocTitle.Erase( (sal_uInt16)nDot );
}
mbHeader = true;
}
@@ -2515,7 +2515,7 @@ bool HtmlExport::CreateNavBarFrames()
// ====================================================================
// Buttonleiste fuer Standard ausgeben
// ====================================================================
-String HtmlExport::CreateNavBar( USHORT nSdPage, bool bIsText ) const
+String HtmlExport::CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const
{
// Navigationsleiste vorbereiten
String aStrNavFirst( SdResId(STR_HTMLEXP_FIRSTPAGE) );
@@ -2692,8 +2692,8 @@ String HtmlExport::CreateLink( const String& aLink,
// Erzeugt ein Image-tag
// =====================================================================
String HtmlExport::CreateImage( const String& aImage, const String& aAltText,
- INT16 nWidth,
- INT16 nHeight ) const
+ sal_Int16 nWidth,
+ sal_Int16 nHeight ) const
{
String aStr( RTL_CONSTASCII_USTRINGPARAM("<img src=\""));
aStr += StringToURL(aImage);
@@ -2748,9 +2748,9 @@ String HtmlExport::ColorToHTMLString( Color aColor )
// =====================================================================
// Area fuer Kreis erzeugen; es werden Pixelkoordinaten erwartet
// =====================================================================
-String HtmlExport::CreateHTMLCircleArea( ULONG nRadius,
- ULONG nCenterX,
- ULONG nCenterY,
+String HtmlExport::CreateHTMLCircleArea( sal_uLong nRadius,
+ sal_uLong nCenterX,
+ sal_uLong nCenterY,
const String& rHRef ) const
{
String aStr( RTL_CONSTASCII_USTRINGPARAM("<area shape=\"circle\" alt=\"\" coords=\"" ));
@@ -2847,7 +2847,7 @@ String HtmlExport::StringToHTMLString( const String& rString )
// =====================================================================
// Erzeugt die URL einer bestimmten Seite
// =====================================================================
-String HtmlExport::CreatePageURL( USHORT nPgNum )
+String HtmlExport::CreatePageURL( sal_uInt16 nPgNum )
{
if(mbFrames)
{
@@ -2870,7 +2870,7 @@ bool HtmlExport::CopyScript( const String& rPath, const String& rSource, const S
meEC.SetContext( STR_HTMLEXP_ERROR_OPEN_FILE, rSource );
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
SvStream* pIStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
if( pIStm )
@@ -2944,7 +2944,7 @@ static const char * ASP_Scripts[] = { "common.inc", "webcast.asp", "show.asp", "
/** erzeugt und speichert die f�r WebShow ben�tigte ASP Scripte */
bool HtmlExport::CreateASPScripts()
{
- for( USHORT n = 0; n < (sizeof( ASP_Scripts ) / sizeof(char *)); n++ )
+ for( sal_uInt16 n = 0; n < (sizeof( ASP_Scripts ) / sizeof(char *)); n++ )
{
String aScript;
@@ -2965,7 +2965,7 @@ static const char *PERL_Scripts[] = { "webcast.pl", "common.pl", "editpic.pl", "
/** erzeugt und speichert die f�r WebShow ben�tigte PERL Scripte */
bool HtmlExport::CreatePERLScripts()
{
- for( USHORT n = 0; n < (sizeof( PERL_Scripts ) / sizeof(char *)); n++ )
+ for( sal_uInt16 n = 0; n < (sizeof( PERL_Scripts ) / sizeof(char *)); n++ )
{
String aScript;
aScript.AssignAscii( PERL_Scripts[n] );
@@ -2986,7 +2986,7 @@ bool HtmlExport::CreatePERLScripts()
bool HtmlExport::CreateImageFileList()
{
String aStr;
- for( USHORT nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
+ for( sal_uInt16 nSdPage = 0; nSdPage < mnSdPageCount; nSdPage++)
{
aStr += String::CreateFromInt32( nSdPage + 1 );
aStr.Append(sal_Unicode(';'));
@@ -3014,7 +3014,7 @@ bool HtmlExport::CreateImageNumberFile()
meEC.SetContext( STR_HTMLEXP_ERROR_CREATE_FILE, aFileName );
EasyFile aFile;
SvStream* pStr;
- ULONG nErr = aFile.createStream(aFull, pStr);
+ sal_uLong nErr = aFile.createStream(aFull, pStr);
if(nErr == 0)
{
*pStr << (const char *)"1";
@@ -3185,9 +3185,9 @@ EasyFile::~EasyFile()
}
// =====================================================================
-ULONG EasyFile::createStream( const String& rUrl, SvStream* &rpStr )
+sal_uLong EasyFile::createStream( const String& rUrl, SvStream* &rpStr )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
if(bOpen)
nErr = close();
@@ -3225,9 +3225,9 @@ ULONG EasyFile::createStream( const String& rUrl, SvStream* &rpStr )
}
// =====================================================================
-ULONG EasyFile::createFileName( const String& rURL, String& rFileName )
+sal_uLong EasyFile::createFileName( const String& rURL, String& rFileName )
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
if( bOpen )
nErr = close();
@@ -3250,9 +3250,9 @@ ULONG EasyFile::createFileName( const String& rURL, String& rFileName )
}
// =====================================================================
-ULONG EasyFile::close()
+sal_uLong EasyFile::close()
{
- ULONG nErr = 0;
+ sal_uLong nErr = 0;
delete pOStm;
pOStm = NULL;
@@ -3286,7 +3286,7 @@ HtmlErrorContext::HtmlErrorContext(Window *_pWin)
// =====================================================================
-BOOL HtmlErrorContext::GetString( ULONG, String& rCtxStr )
+sal_Bool HtmlErrorContext::GetString( sal_uLong, String& rCtxStr )
{
DBG_ASSERT( mnResId != 0, "No error context set" );
if( mnResId == 0 )
@@ -3302,7 +3302,7 @@ BOOL HtmlErrorContext::GetString( ULONG, String& rCtxStr )
// =====================================================================
-void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL )
+void HtmlErrorContext::SetContext( sal_uInt16 nResId, const String& rURL )
{
mnResId = nResId;
maURL1 = rURL;
@@ -3311,7 +3311,7 @@ void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL )
// =====================================================================
-void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL1, const String& rURL2 )
+void HtmlErrorContext::SetContext( sal_uInt16 nResId, const String& rURL1, const String& rURL2 )
{
mnResId = nResId;
maURL1 = rURL1;
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index fd5a30fa2f0c..31ae7ba80175 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -77,7 +77,7 @@ class View;
class HtmlErrorContext : public ErrorContext
{
private:
- USHORT mnResId;
+ sal_uInt16 mnResId;
String maURL1;
String maURL2;
@@ -85,10 +85,10 @@ public:
HtmlErrorContext(Window *pWin=0);
~HtmlErrorContext() {};
- virtual BOOL GetString( ULONG nErrId, String& rCtxStr );
+ virtual sal_Bool GetString( sal_uLong nErrId, String& rCtxStr );
- void SetContext( USHORT nResId, const String& rURL );
- void SetContext( USHORT nResId, const String& rURL1, const String& rURL2 );
+ void SetContext( sal_uInt16 nResId, const String& rURL );
+ void SetContext( sal_uInt16 nResId, const String& rURL1, const String& rURL2 );
};
// =====================================================================
@@ -109,12 +109,12 @@ class HtmlExport
HtmlPublishMode meMode;
SfxProgress* mpProgress;
bool mbImpress;
- USHORT mnSdPageCount;
- USHORT mnPagesWritten;
+ sal_uInt16 mnSdPageCount;
+ sal_uInt16 mnPagesWritten;
bool mbContentsPage;
- INT16 mnButtonThema;
- UINT16 mnWidthPixel;
- UINT16 mnHeightPixel;
+ sal_Int16 mnButtonThema;
+ sal_uInt16 mnWidthPixel;
+ sal_uInt16 mnHeightPixel;
PublishingFormat meFormat;
bool mbHeader;
bool mbNotes;
@@ -125,14 +125,14 @@ class HtmlExport
String maAuthor;
String maHomePage;
String maInfo;
- INT16 mnCompression;
+ sal_Int16 mnCompression;
String maDocFileName;
String maFramePage;
String mDocTitle;
bool mbDownload;
bool mbAutoSlide;
- UINT32 mnSlideDuration;
+ sal_uInt32 mnSlideDuration;
bool mbSlideSound;
bool mbHiddenSlides;
bool mbEndless;
@@ -190,30 +190,30 @@ class HtmlExport
String CreateLink( const String& aLink, const String& aText,
const String& aTarget = String()) const;
- String CreateImage( const String& aImage, const String& aAltText, INT16 nWidth = -1, INT16 nHeight = -1 ) const;
- String CreateNavBar( USHORT nSdPage, bool bIsText ) const;
+ String CreateImage( const String& aImage, const String& aAltText, sal_Int16 nWidth = -1, sal_Int16 nHeight = -1 ) const;
+ String CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const;
String CreateBodyTag() const;
- String ParagraphToHTMLString( SdrOutliner* pOutliner, ULONG nPara, const Color& rBackgroundColor );
+ String ParagraphToHTMLString( SdrOutliner* pOutliner, sal_uLong nPara, const Color& rBackgroundColor );
String TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState, const Color& rBackgroundColor );
String CreateTextForTitle( SdrOutliner* pOutliner, SdPage* pPage, const Color& rBackgroundColor );
String CreateTextForPage( SdrOutliner* pOutliner, SdPage* pPage, bool bHeadLine, const Color& rBackgroundColor );
String CreateTextForNotesPage( SdrOutliner* pOutliner, SdPage* pPage, bool bHeadLine, const Color& rBackgroundColor );
- String CreateHTMLCircleArea( ULONG nRadius, ULONG nCenterX,
- ULONG nCenterY, const String& rHRef ) const;
+ String CreateHTMLCircleArea( sal_uLong nRadius, sal_uLong nCenterX,
+ sal_uLong nCenterY, const String& rHRef ) const;
String CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPolyPoly, Size aShift, double fFactor, const String& rHRef ) const;
String CreateHTMLRectArea( const Rectangle& rRect,
const String& rHRef ) const;
- String CreatePageURL( USHORT nPgNum );
+ String CreatePageURL( sal_uInt16 nPgNum );
String InsertSound( const String& rSoundFile );
bool CopyFile( const String& rSourceFile, const String& rDestPath );
bool CopyScript( const String& rPath, const String& rSource, const String& rDest, bool bUnix = false );
- void InitProgress( USHORT nProgrCount );
+ void InitProgress( sal_uInt16 nProgrCount );
void ResetProgress();
String WriteMetaCharset() const;
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index f44c5f124992..07f44ce83aa4 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -76,13 +76,13 @@ using ::rtl::OUString;
extern void InterpolateFixedBitmap( FixedBitmap * pBitmap );
// Kennung fuer die Config Datei mit den Html Einstellungen
-const UINT16 nMagic = (UINT16)0x1977;
+const sal_uInt16 nMagic = (sal_uInt16)0x1977;
// Key fuer die soffice.ini
#define KEY_QUALITY "JPG-EXPORT-QUALITY"
// Die Help Ids der einzelnen Seiten
-ULONG aPageHelpIds[NOOFPAGES] =
+const char* aPageHelpIds[NOOFPAGES] =
{
HID_SD_HTMLEXPORT_PAGE1,
HID_SD_HTMLEXPORT_PAGE2,
@@ -108,39 +108,39 @@ public:
String m_aURL;
// special Kiosk options
- BOOL m_bAutoSlide;
- UINT32 m_nSlideDuration;
- BOOL m_bEndless;
+ sal_Bool m_bAutoSlide;
+ sal_uInt32 m_nSlideDuration;
+ sal_Bool m_bEndless;
// special HTML options
- BOOL m_bContentPage;
- BOOL m_bNotes;
+ sal_Bool m_bContentPage;
+ sal_Bool m_bNotes;
// misc options
- UINT16 m_nResolution;
+ sal_uInt16 m_nResolution;
String m_aCompression;
PublishingFormat m_eFormat;
- BOOL m_bSlideSound;
- BOOL m_bHiddenSlides;
+ sal_Bool m_bSlideSound;
+ sal_Bool m_bHiddenSlides;
// titel page information
String m_aAuthor;
String m_aEMail;
String m_aWWW;
String m_aMisc;
- BOOL m_bDownload;
- BOOL m_bCreated; // not used
+ sal_Bool m_bDownload;
+ sal_Bool m_bCreated; // not used
// buttons and colorscheme
- INT16 m_nButtonThema;
- BOOL m_bUserAttr;
+ sal_Int16 m_nButtonThema;
+ sal_Bool m_bUserAttr;
Color m_aBackColor;
Color m_aTextColor;
Color m_aLinkColor;
Color m_aVLinkColor;
Color m_aALinkColor;
- BOOL m_bUseAttribs;
- BOOL m_bUseColor;
+ sal_Bool m_bUseAttribs;
+ sal_Bool m_bUseColor;
SdPublishingDesign();
@@ -155,8 +155,8 @@ public:
SdPublishingDesign::SdPublishingDesign()
{
m_eMode = PUBLISH_HTML;
- m_bContentPage = TRUE;
- m_bNotes = TRUE;
+ m_bContentPage = sal_True;
+ m_bNotes = sal_True;
m_eFormat = FORMAT_PNG;
@@ -174,12 +174,12 @@ SdPublishingDesign::SdPublishingDesign()
m_aAuthor += sal_Unicode(' ');
m_aAuthor += (String)aUserOptions.GetLastName();
m_aEMail = aUserOptions.GetEmail();
- m_bDownload = FALSE;
+ m_bDownload = sal_False;
m_nButtonThema = -1;
- m_bUserAttr = FALSE;
- m_bUseAttribs = TRUE;
- m_bUseColor = TRUE;
+ m_bUserAttr = sal_False;
+ m_bUseAttribs = sal_True;
+ m_bUseColor = sal_True;
m_aBackColor = COL_WHITE;
m_aTextColor = COL_BLACK;
@@ -189,12 +189,12 @@ SdPublishingDesign::SdPublishingDesign()
m_eScript = SCRIPT_ASP;
- m_bAutoSlide = TRUE;
+ m_bAutoSlide = sal_True;
m_nSlideDuration = 15;
- m_bEndless = TRUE;
+ m_bEndless = sal_True;
- m_bSlideSound = TRUE;
- m_bHiddenSlides = FALSE;
+ m_bSlideSound = sal_True;
+ m_bHiddenSlides = sal_False;
}
// =====================================================================
@@ -268,7 +268,7 @@ SvStream& operator >> (SvStream& rIn, SdPublishingDesign& rDesign)
{
SdIOCompat aIO(rIn, STREAM_READ);
- UINT16 nTemp16;
+ sal_uInt16 nTemp16;
rIn.ReadByteString( rDesign.m_aDesignName, RTL_TEXTENCODING_UTF8 );
rIn >> nTemp16;
@@ -320,12 +320,12 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
// Name
rOut.WriteByteString( rDesign.m_aDesignName, RTL_TEXTENCODING_UTF8 );
- rOut << (UINT16)rDesign.m_eMode;
+ rOut << (sal_uInt16)rDesign.m_eMode;
rOut << rDesign.m_bContentPage;
rOut << rDesign.m_bNotes;
rOut << rDesign.m_nResolution;
rOut.WriteByteString( rDesign.m_aCompression, RTL_TEXTENCODING_UTF8 );
- rOut << (UINT16)rDesign.m_eFormat;
+ rOut << (sal_uInt16)rDesign.m_eFormat;
rOut.WriteByteString( rDesign.m_aAuthor, RTL_TEXTENCODING_UTF8 );
rOut.WriteByteString( rDesign.m_aEMail, RTL_TEXTENCODING_UTF8 );
rOut.WriteByteString( rDesign.m_aWWW, RTL_TEXTENCODING_UTF8 );
@@ -342,7 +342,7 @@ SvStream& operator << (SvStream& rOut, const SdPublishingDesign& rDesign)
rOut << rDesign.m_bUseAttribs;
rOut << rDesign.m_bUseColor;
- rOut << (UINT16)rDesign.m_eScript;
+ rOut << (sal_uInt16)rDesign.m_eScript;
rOut.WriteByteString( rDesign.m_aURL, RTL_TEXTENCODING_UTF8 );
rOut.WriteByteString( rDesign.m_aCGI, RTL_TEXTENCODING_UTF8 );
@@ -389,8 +389,8 @@ SdPublishingDlg::SdPublishingDlg(Window* pWindow, DocumentType eDocType)
, aNextPageButton(this,SdResId(BUT_NEXT))
, aFinishButton(this,SdResId(BUT_FINISH))
, aAssistentFunc(NOOFPAGES)
-, m_bButtonsDirty(TRUE)
-, m_bDesignListDirty(FALSE)
+, m_bButtonsDirty(sal_True)
+, m_bDesignListDirty(sal_False)
, m_pDesign(NULL)
{
m_bImpress = eDocType == DOCUMENT_TYPE_IMPRESS;
@@ -433,7 +433,7 @@ SdPublishingDlg::SdPublishingDlg(Window* pWindow, DocumentType eDocType)
pPage3_Png->SetClickHdl(LINK(this,SdPublishingDlg, GfxFormatHdl));
pPage3_Gif->SetClickHdl(LINK(this,SdPublishingDlg, GfxFormatHdl));
pPage3_Jpg->SetClickHdl(LINK(this,SdPublishingDlg, GfxFormatHdl));
- pPage3_Quality->Enable(FALSE);
+ pPage3_Quality->Enable(sal_False);
pPage3_Resolution_1->SetClickHdl(LINK(this,SdPublishingDlg, ResolutionHdl ));
pPage3_Resolution_2->SetClickHdl(LINK(this,SdPublishingDlg, ResolutionHdl ));
@@ -465,7 +465,7 @@ SdPublishingDlg::SdPublishingDlg(Window* pWindow, DocumentType eDocType)
pPage5_Buttons->SetLineCount( 4 );
pPage5_Buttons->SetExtraSpacing( 1 );
- for( UINT16 nIndex = 0; nIndex < m_pDesignList->Count(); nIndex++ )
+ for( sal_uInt16 nIndex = 0; nIndex < m_pDesignList->Count(); nIndex++ )
{
SdPublishingDesign *pDesign = (SdPublishingDesign*)
m_pDesignList->GetObject(nIndex);
@@ -489,7 +489,7 @@ SdPublishingDlg::~SdPublishingDlg()
{
if( m_pDesignList )
{
- for( UINT16 nIndex = 0; nIndex < m_pDesignList->Count(); nIndex++ )
+ for( sal_uInt16 nIndex = 0; nIndex < m_pDesignList->Count(); nIndex++ )
delete (SdPublishingDesign*)m_pDesignList->GetObject(nIndex);
}
@@ -790,8 +790,8 @@ void SdPublishingDlg::SetDefaults()
SdPublishingDesign aDefault;
SetDesign(&aDefault);
- pPage1_NewDesign->Check(TRUE);
- pPage1_OldDesign->Check(FALSE);
+ pPage1_NewDesign->Check(sal_True);
+ pPage1_OldDesign->Check(sal_False);
UpdatePage();
}
@@ -978,8 +978,8 @@ IMPL_LINK( SdPublishingDlg, DesignHdl, RadioButton *, pButton )
{
if(pButton == pPage1_NewDesign)
{
- pPage1_NewDesign->Check(TRUE); // wegen DesignDeleteHdl
- pPage1_OldDesign->Check(FALSE);
+ pPage1_NewDesign->Check(sal_True); // wegen DesignDeleteHdl
+ pPage1_OldDesign->Check(sal_False);
pPage1_Designs->Disable();
pPage1_DelDesign->Disable();
m_pDesign = NULL;
@@ -989,14 +989,14 @@ IMPL_LINK( SdPublishingDlg, DesignHdl, RadioButton *, pButton )
}
else
{
- pPage1_NewDesign->Check(FALSE);
+ pPage1_NewDesign->Check(sal_False);
pPage1_Designs->Enable();
pPage1_DelDesign->Enable();
if(pPage1_Designs->GetSelectEntryCount() == 0)
pPage1_Designs->SelectEntryPos(0);
- USHORT nPos = pPage1_Designs->GetSelectEntryPos();
+ sal_uInt16 nPos = pPage1_Designs->GetSelectEntryPos();
m_pDesign = (SdPublishingDesign*)m_pDesignList->GetObject(nPos);
DBG_ASSERT(m_pDesign, "Kein Design? Das darf nicht sein! (CL)");
@@ -1012,7 +1012,7 @@ IMPL_LINK( SdPublishingDlg, DesignHdl, RadioButton *, pButton )
// =====================================================================
IMPL_LINK( SdPublishingDlg, DesignSelectHdl, ListBox *, EMPTYARG )
{
- USHORT nPos = pPage1_Designs->GetSelectEntryPos();
+ sal_uInt16 nPos = pPage1_Designs->GetSelectEntryPos();
m_pDesign = (SdPublishingDesign*)m_pDesignList->GetObject(nPos);
DBG_ASSERT(m_pDesign, "Kein Design? Das darf nicht sein! (CL)");
@@ -1029,7 +1029,7 @@ IMPL_LINK( SdPublishingDlg, DesignSelectHdl, ListBox *, EMPTYARG )
// =====================================================================
IMPL_LINK( SdPublishingDlg, DesignDeleteHdl, PushButton *, EMPTYARG )
{
- USHORT nPos = pPage1_Designs->GetSelectEntryPos();
+ sal_uInt16 nPos = pPage1_Designs->GetSelectEntryPos();
SdPublishingDesign* pDesign = (SdPublishingDesign*)
m_pDesignList->GetObject(nPos);
DBG_ASSERT(pDesign, "Kein Design? Das darf nicht sein! (CL)");
@@ -1045,7 +1045,7 @@ IMPL_LINK( SdPublishingDlg, DesignDeleteHdl, PushButton *, EMPTYARG )
delete pDesign;
- m_bDesignListDirty = TRUE;
+ m_bDesignListDirty = sal_True;
UpdatePage();
@@ -1053,11 +1053,11 @@ IMPL_LINK( SdPublishingDlg, DesignDeleteHdl, PushButton *, EMPTYARG )
}
// =====================================================================
-// Clickhandler fuer das ändern des Servertyps
+// Clickhandler fuer das �ndern des Servertyps
// =====================================================================
IMPL_LINK( SdPublishingDlg, WebServerHdl, RadioButton *, pButton )
{
- BOOL bASP = pButton == pPage2_ASP;
+ sal_Bool bASP = pButton == pPage2_ASP;
pPage2_ASP->Check( bASP );
pPage2_PERL->Check( !bASP );
@@ -1130,7 +1130,7 @@ IMPL_LINK( SdPublishingDlg, ResolutionHdl, RadioButton *, pButton )
IMPL_LINK( SdPublishingDlg, ButtonsHdl, ValueSet *, EMPTYARG )
{
// wird eine Bitmap Schaltflaeche gewaehlt, TexOnly ausschalten
- pPage5_TextOnly->Check(FALSE);
+ pPage5_TextOnly->Check(sal_False);
return 0;
}
@@ -1172,7 +1172,7 @@ IMPL_LINK( SdPublishingDlg, ColorHdl, PushButton *, pButton)
m_aALinkColor = aDlg.GetColor();
}
- pPage6_User->Check(TRUE);
+ pPage6_User->Check(sal_True);
pPage6_Preview->SetColors( m_aBackColor, m_aTextColor, m_aLinkColor,
m_aVLinkColor, m_aALinkColor );
pPage6_Preview->Invalidate();
@@ -1194,19 +1194,19 @@ IMPL_LINK( SdPublishingDlg, FinishHdl, OKButton *, EMPTYARG )
SdPublishingDesign* pDesign = new SdPublishingDesign();
GetDesign(pDesign);
- BOOL bSave = FALSE;
+ sal_Bool bSave = sal_False;
if(pPage1_OldDesign->IsChecked() && m_pDesign)
{
// aenderungen??
if(!(*pDesign == *m_pDesign))
- bSave = TRUE;
+ bSave = sal_True;
}
else
{
SdPublishingDesign aDefaultDesign;
if(!(aDefaultDesign == *pDesign))
- bSave = TRUE;
+ bSave = sal_True;
}
if(bSave)
@@ -1215,10 +1215,10 @@ IMPL_LINK( SdPublishingDlg, FinishHdl, OKButton *, EMPTYARG )
if(m_pDesign)
aName = m_pDesign->m_aDesignName;
- BOOL bRetry;
+ sal_Bool bRetry;
do
{
- bRetry = FALSE;
+ bRetry = sal_False;
SdDesignNameDlg aDlg(this, aName );
@@ -1227,7 +1227,7 @@ IMPL_LINK( SdPublishingDlg, FinishHdl, OKButton *, EMPTYARG )
pDesign->m_aDesignName = aDlg.GetDesignName();
SdPublishingDesign* pSameNameDes = NULL;
- UINT16 nIndex;
+ sal_uInt16 nIndex;
for( nIndex = 0; nIndex < m_pDesignList->Count(); nIndex++ )
{
pSameNameDes = (SdPublishingDesign*)
@@ -1252,7 +1252,7 @@ IMPL_LINK( SdPublishingDlg, FinishHdl, OKButton *, EMPTYARG )
if(!bRetry)
{
m_pDesignList->Insert(pDesign);
- m_bDesignListDirty = TRUE;
+ m_bDesignListDirty = sal_True;
pDesign = NULL;
}
}
@@ -1322,7 +1322,7 @@ void SdPublishingDlg::UpdatePage()
pPage2_Index_txt->Show();
pPage2_Index->Show();
- BOOL bPerl = pPage2_PERL->IsChecked();
+ sal_Bool bPerl = pPage2_PERL->IsChecked();
pPage2_Index->Enable(bPerl);
pPage2_Index_txt->Enable(bPerl);
pPage2_URL_txt->Enable(bPerl);
@@ -1351,7 +1351,7 @@ void SdPublishingDlg::UpdatePage()
pPage2_Duration_txt->Show();
pPage2_Duration->Show();
pPage2_Endless->Show();
- BOOL bAuto = pPage2_ChgAuto->IsChecked();
+ sal_Bool bAuto = pPage2_ChgAuto->IsChecked();
pPage2_Duration->Enable(bAuto);
pPage2_Endless->Enable(bAuto);
}
@@ -1429,14 +1429,14 @@ void SdPublishingDlg::LoadPreviewButtons()
{
if( mpButtonSet->getPreview( nSet, aButtonNames, aImage ) )
{
- pPage5_Buttons->InsertItem( (USHORT)nSet+1, aImage );
+ pPage5_Buttons->InsertItem( (sal_uInt16)nSet+1, aImage );
if( nHeight < aImage.GetSizePixel().Height() )
nHeight = aImage.GetSizePixel().Height();
}
}
pPage5_Buttons->SetItemHeight( nHeight );
- m_bButtonsDirty = FALSE;
+ m_bButtonsDirty = sal_False;
}
}
@@ -1568,7 +1568,7 @@ void SdPublishingDlg::GetDesign( SdPublishingDesign* pDesign )
pDesign->m_aEMail = pPage4_Email->GetText();
pDesign->m_aWWW = pPage4_WWW->GetText();
pDesign->m_aMisc = pPage4_Misc->GetText();
- pDesign->m_bDownload = m_bImpress?pPage4_Download->IsChecked():FALSE;
+ pDesign->m_bDownload = m_bImpress?pPage4_Download->IsChecked():sal_False;
if(pPage5_TextOnly->IsChecked())
pDesign->m_nButtonThema = -1;
@@ -1589,7 +1589,7 @@ void SdPublishingDlg::GetDesign( SdPublishingDesign* pDesign )
pDesign->m_aURL = pPage2_URL->GetText();
pDesign->m_bAutoSlide = pPage2_ChgAuto->IsChecked();
- pDesign->m_nSlideDuration = (UINT32)pPage2_Duration->GetTime().GetMSFromTime() / 1000;
+ pDesign->m_nSlideDuration = (sal_uInt32)pPage2_Duration->GetTime().GetMSFromTime() / 1000;
pDesign->m_bEndless = pPage2_Endless->IsChecked();
}
@@ -1606,9 +1606,9 @@ IMPL_LINK( SdPublishingDlg, LastPageHdl, PushButton *, EMPTYARG )
// =====================================================================
// Designs laden
// =====================================================================
-BOOL SdPublishingDlg::Load()
+sal_Bool SdPublishingDlg::Load()
{
- m_bDesignListDirty = FALSE;
+ m_bDesignListDirty = sal_False;
m_pDesignList = new List();
@@ -1629,25 +1629,25 @@ BOOL SdPublishingDlg::Load()
return sal_False;
}
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE );
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, sal_True );
SvStream* pStream = aMedium.GetInStream();
if( !pStream )
- return( FALSE );
+ return( sal_False );
- UINT16 aCheck;
+ sal_uInt16 aCheck;
*pStream >> aCheck;
if(aCheck != nMagic)
- return FALSE;
+ return sal_False;
SdIOCompat aIO(*pStream, STREAM_READ);
- UINT16 nDesigns;
+ sal_uInt16 nDesigns;
*pStream >> nDesigns;
- for( UINT16 nIndex = 0;
+ for( sal_uInt16 nIndex = 0;
pStream->GetError() == SVSTREAM_OK && nIndex < nDesigns;
nIndex++ )
{
@@ -1663,29 +1663,29 @@ BOOL SdPublishingDlg::Load()
// =====================================================================
// Designs speichern
// =====================================================================
-BOOL SdPublishingDlg::Save()
+sal_Bool SdPublishingDlg::Save()
{
INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
aURL.Append( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "designs.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, FALSE );
+ SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, sal_False );
aMedium.IsRemote();
SvStream* pStream = aMedium.GetOutStream();
if( !pStream )
- return( FALSE );
+ return( sal_False );
- UINT16 aCheck = nMagic;
+ sal_uInt16 aCheck = nMagic;
*pStream << aCheck;
// damit SdIOCompat vor dem Stream destruiert wird
{
SdIOCompat aIO(*pStream, STREAM_WRITE, 0);
- UINT16 nDesigns = (UINT16) m_pDesignList->Count();
+ sal_uInt16 nDesigns = (sal_uInt16) m_pDesignList->Count();
*pStream << nDesigns;
- for( UINT16 nIndex = 0;
+ for( sal_uInt16 nIndex = 0;
pStream->GetError() == SVSTREAM_OK && nIndex < nDesigns;
nIndex++ )
{
diff --git a/sd/source/filter/html/pubdlg.src b/sd/source/filter/html/pubdlg.src
index 00e9b4af75e4..9aabf8f5e971 100644
--- a/sd/source/filter/html/pubdlg.src
+++ b/sd/source/filter/html/pubdlg.src
@@ -30,6 +30,7 @@
ModalDialog DLG_PUBLISHING
{
+ HelpID = "sd:ModalDialog:DLG_PUBLISHING";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 272 , 190 ) ;
@@ -59,6 +60,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE1_NEW_DESIGN
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE1_NEW_DESIGN";
Pos = MAP_APPFONT( 12, 50 );
Size = MAP_APPFONT( 153, 10 );
Text [ en-US ] = "New design";
@@ -66,6 +68,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE1_OLD_DESIGN
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE1_OLD_DESIGN";
Pos = MAP_APPFONT( 12, 63 );
Size = MAP_APPFONT( 153, 10 );
Text [ en-US ] = "Existing design";
@@ -73,6 +76,7 @@ ModalDialog DLG_PUBLISHING
ListBox PAGE1_DESIGNS
{
+ HelpID = "sd:ListBox:DLG_PUBLISHING:PAGE1_DESIGNS";
Border = TRUE ;
Pos = MAP_APPFONT ( 21 , 75 ) ;
Size = MAP_APPFONT ( 144 , 63 ) ;
@@ -82,6 +86,7 @@ ModalDialog DLG_PUBLISHING
PushButton PAGE1_DEL_DESIGN
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:PAGE1_DEL_DESIGN";
Pos = MAP_APPFONT ( 168 , 75 ) ;
Size = MAP_APPFONT ( 92 , 14 ) ;
TabStop = TRUE ;
@@ -120,6 +125,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_STANDARD
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_STANDARD";
Pos = MAP_APPFONT( 12, 50 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Standard H~TML format";
@@ -127,6 +133,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_FRAMES
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_FRAMES";
Pos = MAP_APPFONT( 12, 63 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Standard HTML with ~frames";
@@ -134,6 +141,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_KIOSK
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_KIOSK";
Pos = MAP_APPFONT( 12, 76 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "~Automatic";
@@ -141,6 +149,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_WEBCAST
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_WEBCAST";
Pos = MAP_APPFONT( 12, 89 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "~WebCast";
@@ -199,6 +208,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE2_CONTENT
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE2_CONTENT";
Pos = MAP_APPFONT( 144, 49 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Create title page";
@@ -213,6 +223,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE2_NOTES
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE2_NOTES";
Pos = MAP_APPFONT( 144, 63 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Show notes";
@@ -231,6 +242,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_CHG_DEFAULT
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_CHG_DEFAULT";
Pos = MAP_APPFONT ( 144 , 49 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
@@ -239,6 +251,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_CHG_AUTO
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_CHG_AUTO";
Pos = MAP_APPFONT ( 144 , 63 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
@@ -254,6 +267,7 @@ ModalDialog DLG_PUBLISHING
TimeField PAGE2_DURATION_TMF
{
+ HelpID = "sd:TimeField:DLG_PUBLISHING:PAGE2_DURATION_TMF";
Pos = MAP_APPFONT ( 196, 76 ) ;
Size = MAP_APPFONT ( 48, 12 ) ;
Border = TRUE ;
@@ -279,6 +293,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE2_ENDLESS
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE2_ENDLESS";
Pos = MAP_APPFONT ( 154, 91 );
Size = MAP_APPFONT ( 108, 10 );
Text [ en-US ] = "~Endless" ;
@@ -297,6 +312,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_ASP
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_ASP";
Pos = MAP_APPFONT( 144, 49 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "~Active Server Pages (ASP)";
@@ -304,6 +320,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE2_PERL
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE2_PERL";
Pos = MAP_APPFONT( 144, 63 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Perl" ;
@@ -318,6 +335,7 @@ ModalDialog DLG_PUBLISHING
Edit PAGE2_INDEX
{
+ HelpID = "sd:Edit:DLG_PUBLISHING:PAGE2_INDEX";
BORDER = TRUE;
Pos = MAP_APPFONT( 154, 88 );
Size = MAP_APPFONT( 105, 12 );
@@ -333,6 +351,7 @@ ModalDialog DLG_PUBLISHING
Edit PAGE2_URL
{
+ HelpID = "sd:Edit:DLG_PUBLISHING:PAGE2_URL";
BORDER = TRUE;
Pos = MAP_APPFONT( 154, 116 );
Size = MAP_APPFONT( 105, 12 );
@@ -348,6 +367,7 @@ ModalDialog DLG_PUBLISHING
Edit PAGE2_CGI
{
+ HelpID = "sd:Edit:DLG_PUBLISHING:PAGE2_CGI";
BORDER = TRUE;
Pos = MAP_APPFONT( 154, 144 );
Size = MAP_APPFONT( 105, 12 );
@@ -382,6 +402,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE3_PNG
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE3_PNG";
Pos = MAP_APPFONT( 12, 49 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "~PNG";
@@ -389,6 +410,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE3_GIF
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE3_GIF";
Pos = MAP_APPFONT( 12, 63 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "~GIF";
@@ -396,6 +418,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE3_JPG
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE3_JPG";
Pos = MAP_APPFONT( 12, 77 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "~JPG";
@@ -403,6 +426,7 @@ ModalDialog DLG_PUBLISHING
ComboBox PAGE3_QUALITY
{
+ HelpID = "sd:ComboBox:DLG_PUBLISHING:PAGE3_QUALITY";
Pos = MAP_APPFONT( 18, 91 );
Size = MAP_APPFONT( 28, 70 );
TabStop = TRUE ;
@@ -436,6 +460,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE3_RESOLUTION_1
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE3_RESOLUTION_1";
Pos = MAP_APPFONT( 144, 49 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Low resolution (~640x480 pixels)";
@@ -443,6 +468,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE3_RESOLUTION_2
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE3_RESOLUTION_2";
Pos = MAP_APPFONT( 144, 63 );
Size = MAP_APPFONT( 116, 10 );
Text [ en-US ] = "Medium resolution (~800x600 pixels)";
@@ -450,6 +476,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE3_RESOLUTION_3
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE3_RESOLUTION_3";
Pos = MAP_APPFONT ( 144, 77 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
Text [ en-US ] = "High resolution (~1024x768 pixels)";
@@ -468,6 +495,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE3_SLD_SOUND
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE3_SLD_SOUND";
Pos = MAP_APPFONT ( 12, 125 );
Size = MAP_APPFONT ( 252, 10 );
Text [ en-US ] = "~Export sounds when slide advances" ;
@@ -475,6 +503,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE3_HIDDEN_SLIDES
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE3_HIDDEN_SLIDES";
Pos = MAP_APPFONT ( 12, 138 );
Size = MAP_APPFONT ( 252, 10 );
Text [ en-US ] = "Export ~hidden slides" ;
@@ -509,6 +538,7 @@ ModalDialog DLG_PUBLISHING
Edit PAGE4_AUTHOR
{
+ HelpID = "sd:Edit:DLG_PUBLISHING:PAGE4_AUTHOR";
BORDER = TRUE ;
Pos = MAP_APPFONT ( 136, 49 );
Size = MAP_APPFONT ( 128, 12 );
@@ -524,6 +554,7 @@ ModalDialog DLG_PUBLISHING
Edit PAGE4_EMAIL_EDIT
{
+ HelpID = "sd:Edit:DLG_PUBLISHING:PAGE4_EMAIL_EDIT";
BORDER = TRUE ;
Pos = MAP_APPFONT ( 136 , 65 ) ;
Size = MAP_APPFONT ( 128 , 12 ) ;
@@ -539,6 +570,7 @@ ModalDialog DLG_PUBLISHING
Edit PAGE4_WWW_EDIT
{
+ HelpID = "sd:Edit:DLG_PUBLISHING:PAGE4_WWW_EDIT";
BORDER = TRUE ;
Pos = MAP_APPFONT ( 136, 81 ) ;
Size = MAP_APPFONT ( 128, 12 ) ;
@@ -554,6 +586,7 @@ ModalDialog DLG_PUBLISHING
MultiLineEdit PAGE4_MISC
{
+ HelpID = "sd:MultiLineEdit:DLG_PUBLISHING:PAGE4_MISC";
Border = TRUE ;
Pos = MAP_APPFONT ( 136, 97 ) ;
Size = MAP_APPFONT ( 128 , 45 ) ;
@@ -564,6 +597,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE4_DOWNLOAD
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE4_DOWNLOAD";
Pos = MAP_APPFONT ( 12 , 149 ) ;
Size = MAP_APPFONT ( 252 , 10 ) ;
TabStop = TRUE ;
@@ -572,6 +606,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE4_CREATED
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE4_CREATED";
Pos = MAP_APPFONT ( 12 , 152 ) ;
Size = MAP_APPFONT ( 252 , 10 ) ;
TabStop = TRUE ;
@@ -600,6 +635,7 @@ ModalDialog DLG_PUBLISHING
CheckBox PAGE5_TEXTONLY
{
+ HelpID = "sd:CheckBox:DLG_PUBLISHING:PAGE5_TEXTONLY";
Pos = MAP_APPFONT ( 12, 50 );
Size = MAP_APPFONT ( 243, 10 );
Text [ en-US ] = "~Text only";
@@ -635,6 +671,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE6_DOCCOLORS
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE6_DOCCOLORS";
Pos = MAP_APPFONT( 12, 50 );
Size = MAP_APPFONT( 246, 10 );
Text [ en-US ] = "~Apply color scheme from document";
@@ -642,6 +679,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE6_DEFAULT
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE6_DEFAULT";
Pos = MAP_APPFONT( 12, 63 );
Size = MAP_APPFONT( 246, 10 );
Text [ en-US ] = "Use ~browser colors";
@@ -649,6 +687,7 @@ ModalDialog DLG_PUBLISHING
RadioButton PAGE6_USER
{
+ HelpID = "sd:RadioButton:DLG_PUBLISHING:PAGE6_USER";
Pos = MAP_APPFONT( 12, 76 );
Size = MAP_APPFONT( 246, 10 );
Text [ en-US ] = "~Use custom color scheme";
@@ -656,6 +695,7 @@ ModalDialog DLG_PUBLISHING
PushButton PAGE6_TEXT
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:PAGE6_TEXT";
Pos = MAP_APPFONT( 21, 89 );
Size = MAP_APPFONT( 72, 14 );
Text [ en-US ] = "Text";
@@ -663,6 +703,7 @@ ModalDialog DLG_PUBLISHING
PushButton PAGE6_LINK
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:PAGE6_LINK";
Pos = MAP_APPFONT( 21, 106 );
Size = MAP_APPFONT( 72, 14 );
Text [ en-US ] = "Hyper~link";
@@ -670,6 +711,7 @@ ModalDialog DLG_PUBLISHING
PushButton PAGE6_ALINK
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:PAGE6_ALINK";
Pos = MAP_APPFONT( 21, 123 );
Size = MAP_APPFONT( 72, 14 );
Text [ en-US ] = "Active Li~nk";
@@ -677,6 +719,7 @@ ModalDialog DLG_PUBLISHING
PushButton PAGE6_VLINK
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:PAGE6_VLINK";
Pos = MAP_APPFONT( 21, 140 );
Size = MAP_APPFONT( 72, 14 );
Text [ en-US ] = "~Visited Link";
@@ -691,6 +734,7 @@ ModalDialog DLG_PUBLISHING
PushButton PAGE6_BACK
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:PAGE6_BACK";
Pos = MAP_APPFONT( 199, 89 );
Size = MAP_APPFONT( 60, 14 );
Text [ en-US ] = "Bac~kground";
@@ -706,6 +750,7 @@ ModalDialog DLG_PUBLISHING
PushButton BUT_LAST
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:BUT_LAST";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 112 , 170 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -715,6 +760,7 @@ ModalDialog DLG_PUBLISHING
PushButton BUT_NEXT
{
+ HelpID = "sd:PushButton:DLG_PUBLISHING:BUT_NEXT";
DefButton = TRUE ;
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 165 , 170 ) ;
@@ -758,6 +804,7 @@ ModalDialog DLG_DESIGNNAME
Edit EDT_NAME
{
+ HelpID = "sd:Edit:DLG_DESIGNNAME:EDT_NAME";
BORDER = TRUE ;
Pos = MAP_APPFONT ( 4, 4 );
Size = MAP_APPFONT ( 152, 14 );
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index 033e0e33604e..8836b1b4851d 100644
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -165,7 +165,7 @@ bool Ppt97Animation::HasAfterEffect_DimAfterEffect() const
return m_aAtom.nAfterEffect == 3;
}
#endif
-UINT32 Ppt97Animation::GetSoundRef() const
+sal_uInt32 Ppt97Animation::GetSoundRef() const
{
return m_aAtom.nSoundRef;
}
diff --git a/sd/source/filter/ppt/ppt97animations.hxx b/sd/source/filter/ppt/ppt97animations.hxx
index 64e10250a53c..705f42978a50 100644
--- a/sd/source/filter/ppt/ppt97animations.hxx
+++ b/sd/source/filter/ppt/ppt97animations.hxx
@@ -41,22 +41,22 @@ class Ppt97AnimationInfoAtom
friend class Ppt97Animation;
//-- member
- UINT32 nDimColor;
- UINT32 nFlags; // 0x0004: time instead of click
- UINT32 nSoundRef;
- INT32 nDelayTime; // 1/1000 sec
- UINT16 nOrderID;
- UINT16 nSlideCount;
- UINT8 nBuildType;
- UINT8 nFlyMethod;
- UINT8 nFlyDirection;
- UINT8 nAfterEffect; //nAfterEffect: 0: none; 1: change color; 2: dim on next effect; 3: dim after effect;
- UINT8 nSubEffect;
- UINT8 nOLEVerb;
+ sal_uInt32 nDimColor;
+ sal_uInt32 nFlags; // 0x0004: time instead of click
+ sal_uInt32 nSoundRef;
+ sal_Int32 nDelayTime; // 1/1000 sec
+ sal_uInt16 nOrderID;
+ sal_uInt16 nSlideCount;
+ sal_uInt8 nBuildType;
+ sal_uInt8 nFlyMethod;
+ sal_uInt8 nFlyDirection;
+ sal_uInt8 nAfterEffect; //nAfterEffect: 0: none; 1: change color; 2: dim on next effect; 3: dim after effect;
+ sal_uInt8 nSubEffect;
+ sal_uInt8 nOLEVerb;
// unknown, because whole size needs to be 28
- UINT8 nUnknown1;
- UINT8 nUnknown2;
+ sal_uInt8 nUnknown1;
+ sal_uInt8 nUnknown2;
//-- methods
void ReadStream( SvStream& rIn );
@@ -107,7 +107,7 @@ public: //public methods
bool HasParagraphEffect() const;
bool HasSoundEffect() const;
sal_Int32 GetDimColor() const;
- UINT32 GetSoundRef() const;
+ sal_uInt32 GetSoundRef() const;
bool HasAnimateAssociatedShape() const; //true if the shape should be animated in addition to the text
//set methods
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index c63aaf9f07c0..6fc45cc710a4 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -156,7 +156,7 @@ SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvSto
SfxItemSet& rSet = pSheet->GetItemSet();
// if autokerning is set in style, override it, ppt has no autokerning
- if( rSet.GetItemState( EE_CHAR_PAIRKERNING, FALSE ) == SFX_ITEM_SET )
+ if( rSet.GetItemState( EE_CHAR_PAIRKERNING, sal_False ) == SFX_ITEM_SET )
rSet.ClearItem( EE_CHAR_PAIRKERNING );
}
}
@@ -178,7 +178,7 @@ ImplSdPPTImport::ImplSdPPTImport( SdDrawDocument* pDocument, SvStorage& rStorage
: SdrPowerPointImport ( rParam, rMedium.GetBaseURL() )
, mrMed ( rMedium )
, mrStorage ( rStorage_ )
-, mbDocumentFound ( FALSE )
+, mbDocumentFound ( sal_False )
, mnFilterOptions ( 0 )
{
mpDoc = pDocument;
@@ -186,22 +186,22 @@ ImplSdPPTImport::ImplSdPPTImport( SdDrawDocument* pDocument, SvStorage& rStorage
{
mbDocumentFound = SeekToDocument( &maDocHd ); // maDocHd = the latest DocumentHeader
while ( SeekToRec( rStCtrl, PPT_PST_Document, nStreamLen, &maDocHd ) )
- mbDocumentFound = TRUE;
+ mbDocumentFound = sal_True;
- UINT32 nDggContainerOfs = 0;
+ sal_uInt32 nDggContainerOfs = 0;
if ( mbDocumentFound )
{
- ULONG nPosMerk = rStCtrl.Tell();
+ sal_uLong nPosMerk = rStCtrl.Tell();
pStData = rStorage_.OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "Pictures" ) ), STREAM_STD_READ );
rStCtrl.Seek( maDocHd.GetRecBegFilePos() + 8 );
- ULONG nDocLen = maDocHd.GetRecEndFilePos();
+ sal_uLong nDocLen = maDocHd.GetRecEndFilePos();
DffRecordHeader aPPDGHd;
if ( SeekToRec( rStCtrl, PPT_PST_PPDrawingGroup, nDocLen, &aPPDGHd ) )
{
- ULONG nPPDGLen = aPPDGHd.GetRecEndFilePos();
+ sal_uLong nPPDGLen = aPPDGHd.GetRecEndFilePos();
if ( SeekToRec( rStCtrl, DFF_msofbtDggContainer, nPPDGLen, NULL ) )
nDggContainerOfs = rStCtrl.Tell();
}
@@ -253,7 +253,7 @@ ImplSdPPTImport::~ImplSdPPTImport()
sal_Bool ImplSdPPTImport::Import()
{
if ( !bOk )
- return FALSE;
+ return sal_False;
pSdrModel->setLock(true);
pSdrModel->EnableUndo(false);
@@ -265,8 +265,8 @@ sal_Bool ImplSdPPTImport::Import()
((EditEngine&)rOutl.GetEditEngine()).SetControlWord( nControlWord );
SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
- mnBackgroundLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), FALSE );
- mnBackgroundObjectsLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), FALSE );
+ mnBackgroundLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), sal_False );
+ mnBackgroundObjectsLayerID = rAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), sal_False );
::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
if ( pDocShell )
@@ -278,11 +278,11 @@ sal_Bool ImplSdPPTImport::Import()
{
PropItem aPropItem;
- UINT32 nType, nPropSize, nPropCount;
+ sal_uInt32 nType, nPropSize, nPropCount;
pDInfoSec2->Read();
- BYTE aPropSetGUID[ 16 ] =
+ sal_uInt8 aPropSetGUID[ 16 ] =
{
0x02, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae
};
@@ -295,14 +295,14 @@ sal_Bool ImplSdPPTImport::Import()
if ( ( nType == VT_I4 ) || ( nType == VT_UI4 ) )
{
// examine PID_HEADINGPAIR to get the correct entry for PID_DOCPARTS
- UINT32 nSlideCount, nVecCount;
+ sal_uInt32 nSlideCount, nVecCount;
aPropItem >> nSlideCount;
if ( nSlideCount && pSection->GetProperty( PID_HEADINGPAIR, aPropItem ) )
{
- UINT32 nSlideTitleIndex = 0, nSlideTitleCount = 0;
- UINT32 nFontIndex, nFontCount = 0;
- UINT32 nDesignTemplateIndex, nDesignTemplateCount = 0;
- UINT32 i, nTemp, nEntryCount = 0;
+ sal_uInt32 nSlideTitleIndex = 0, nSlideTitleCount = 0;
+ sal_uInt32 nFontIndex, nFontCount = 0;
+ sal_uInt32 nDesignTemplateIndex, nDesignTemplateCount = 0;
+ sal_uInt32 i, nTemp, nEntryCount = 0;
String aUString;
@@ -315,7 +315,7 @@ sal_Bool ImplSdPPTImport::Import()
for ( i = 0; i < nVecCount; i++ )
{
- if ( !aPropItem.Read( aUString, VT_EMPTY, FALSE ) )
+ if ( !aPropItem.Read( aUString, VT_EMPTY, sal_False ) )
break;
aPropItem >> nType;
if ( ( nType != VT_I4 ) && ( nType != VT_UI4 ) )
@@ -354,7 +354,7 @@ sal_Bool ImplSdPPTImport::Import()
}
for ( i = 0; i < nSlideTitleCount; i++ )
{
- if ( !aPropItem.Read( aUString, nType, FALSE ) )
+ if ( !aPropItem.Read( aUString, nType, sal_False ) )
break;
String* pString = new String( aUString );
if ( pString->EqualsAscii( "No Slide Title" ))
@@ -379,7 +379,7 @@ sal_Bool ImplSdPPTImport::Import()
}
}
- BYTE aUserPropSetGUID[ 16 ] =
+ sal_uInt8 aUserPropSetGUID[ 16 ] =
{
0x05, 0xd5, 0xcd, 0xd5, 0x9c, 0x2e, 0x1b, 0x10, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae
};
@@ -389,7 +389,7 @@ sal_Bool ImplSdPPTImport::Import()
Dictionary aDict;
if ( pSection->GetDictionary( aDict ) )
{
- UINT32 nPropId = aDict.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_HLINKS" )));
+ sal_uInt32 nPropId = aDict.GetProperty( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_HLINKS" )));
if ( nPropId )
{
if ( pSection->GetProperty( nPropId, aPropItem ) )
@@ -403,7 +403,7 @@ sal_Bool ImplSdPPTImport::Import()
if ( ! ( nPropCount % 6 ) )
{
- UINT32 i;
+ sal_uInt32 i;
nPropCount /= 6; // 6 propertys a hyperlink
@@ -515,7 +515,7 @@ sal_Bool ImplSdPPTImport::Import()
{
pHyperlink->aConvSubString = String( SdResId( STR_PAGE ) );
pHyperlink->aConvSubString.Append( sal_Unicode( ' ' ) );
- pHyperlink->aConvSubString.Append( mpDoc->CreatePageNumValue( (USHORT)nPageNumber + 1 ) );
+ pHyperlink->aConvSubString.Append( mpDoc->CreatePageNumValue( (sal_uInt16)nPageNumber + 1 ) );
}
}
}
@@ -540,7 +540,7 @@ sal_Bool ImplSdPPTImport::Import()
DffRecordHeader aHyperHd;
if ( SeekToRec( rStCtrl, PPT_PST_ExObjList, maDocHd.GetRecEndFilePos(), &aHyperHd ) )
{
- UINT32 nExObjHyperListLen = aHyperHd.GetRecEndFilePos();
+ sal_uInt32 nExObjHyperListLen = aHyperHd.GetRecEndFilePos();
for ( void* pPtr = aHyperList.First(); pPtr; pPtr = aHyperList.Next() )
{
DffRecordHeader aHyperE;
@@ -574,24 +574,24 @@ sal_Bool ImplSdPPTImport::Import()
SfxProgress* pStbMgr = new SfxProgress( pDocShell, String( SdResId( STR_POWERPOINT_IMPORT ) ),
pMasterPages->Count() + pSlidePages->Count() + pNotePages->Count() );
- UINT32 nImportedPages = 0;
+ sal_uInt32 nImportedPages = 0;
{
- UINT16 nMasterAnz = GetPageCount( PPT_MASTERPAGE );
+ sal_uInt16 nMasterAnz = GetPageCount( PPT_MASTERPAGE );
- for ( USHORT nMasterNum = 0; nMasterNum < nMasterAnz; nMasterNum++ )
+ for ( sal_uInt16 nMasterNum = 0; nMasterNum < nMasterAnz; nMasterNum++ )
{
SetPageNum( nMasterNum, PPT_MASTERPAGE );
- SdPage* pPage = (SdPage*)MakeBlancPage( TRUE );
+ SdPage* pPage = (SdPage*)MakeBlancPage( sal_True );
if ( pPage )
{
- BOOL bNotesMaster = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bNotesMaster;
- BOOL bStarDrawFiller = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bStarDrawFiller;
+ sal_Bool bNotesMaster = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bNotesMaster;
+ sal_Bool bStarDrawFiller = (*GetPageList( eAktPageKind ) )[ nAktPageNum ]->bStarDrawFiller;
PageKind ePgKind = ( bNotesMaster ) ? PK_NOTES : PK_STANDARD;
pPage->SetPageKind( ePgKind );
pSdrModel->InsertMasterPage( (SdrPage*)pPage );
if ( bNotesMaster && bStarDrawFiller )
- ((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_NOTES, TRUE );
+ ((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_NOTES, sal_True );
if ( nMasterNum )
{
boost::optional< sal_Int16 > oStartNumbering;
@@ -651,8 +651,8 @@ sal_Bool ImplSdPPTImport::Import()
/////////////////////
if ( pPage->GetPageKind() == PK_STANDARD )
{
- UINT32 nTitleInstance = TSS_TYPE_PAGETITLE;
- UINT32 nOutlinerInstance = TSS_TYPE_BODY;
+ sal_uInt32 nTitleInstance = TSS_TYPE_PAGETITLE;
+ sal_uInt32 nOutlinerInstance = TSS_TYPE_BODY;
/////////////////////
// titelstylesheet //
@@ -670,7 +670,7 @@ sal_Bool ImplSdPPTImport::Import()
////////////////////////
// outlinerstylesheet //
////////////////////////
- UINT16 nLevel;
+ sal_uInt16 nLevel;
PPTParagraphObj* pParagraphs[ 9 ];
PPTParagraphObj* pPreviousPara = NULL;
@@ -751,7 +751,7 @@ sal_Bool ImplSdPPTImport::Import()
((SdPage*)pNotesClone)->SetLayoutName( aLayoutName );
}
}
- else if ( ( pPersist->bStarDrawFiller == FALSE ) )
+ else if ( ( pPersist->bStarDrawFiller == sal_False ) )
{
PptSlidePersistEntry* pE = pPersist;
while( ( pE->aSlideAtom.nFlags & 4 ) && pE->aSlideAtom.nMasterId )
@@ -762,7 +762,7 @@ sal_Bool ImplSdPPTImport::Import()
else
pE = (*pList)[ nNextMaster ];
}
- SdrObject* pObj = ImportPageBackgroundObject( *pMPage, pE->nBackgroundOffset, TRUE ); // import background
+ SdrObject* pObj = ImportPageBackgroundObject( *pMPage, pE->nBackgroundOffset, sal_True ); // import background
if ( pObj )
pMPage->NbcInsertObject( pObj );
@@ -898,24 +898,24 @@ sal_Bool ImplSdPPTImport::Import()
// importing slide pages //
////////////////////////////////////
{
- UINT32 nFPosMerk = rStCtrl.Tell();
+ sal_uInt32 nFPosMerk = rStCtrl.Tell();
PptPageKind ePageKind = eAktPageKind;
- UINT16 nPageNum = nAktPageNum;
+ sal_uInt16 nPageNum = nAktPageNum;
- SdPage* pHandoutPage = (SdPage*)MakeBlancPage( FALSE );
+ SdPage* pHandoutPage = (SdPage*)MakeBlancPage( sal_False );
pHandoutPage->SetPageKind( PK_HANDOUT );
pSdrModel->InsertPage( pHandoutPage );
- USHORT nPageAnz = GetPageCount( PPT_SLIDEPAGE );
+ sal_uInt16 nPageAnz = GetPageCount( PPT_SLIDEPAGE );
if ( nPageAnz )
{
- for ( USHORT nPage = 0; nPage < nPageAnz; nPage++ )
+ for ( sal_uInt16 nPage = 0; nPage < nPageAnz; nPage++ )
{
sal_Bool bNewAnimationsUsed = sal_False;
mePresChange = PRESCHANGE_SEMIAUTO;
SetPageNum( nPage, PPT_SLIDEPAGE );
- SdPage* pPage = (SdPage*)MakeBlancPage( FALSE );
+ SdPage* pPage = (SdPage*)MakeBlancPage( sal_False );
PptSlidePersistEntry* pMasterPersist = NULL;
if ( HasMasterPage( nPage, PPT_SLIDEPAGE ) ) // try to get the LayoutName from the masterpage
{
@@ -987,7 +987,7 @@ sal_Bool ImplSdPPTImport::Import()
// creating the corresponding note page
eAktPageKind = PPT_NOTEPAGE;
- SdPage* pNotesPage = (SdPage*)MakeBlancPage( FALSE );
+ SdPage* pNotesPage = (SdPage*)MakeBlancPage( sal_False );
sal_uInt16 nNotesMasterNum = GetMasterPageIndex( nPage, PPT_SLIDEPAGE ) + 1;
sal_uInt32 nNotesPageId = GetNotesPageId( nPage );
if ( nNotesPageId )
@@ -1011,13 +1011,13 @@ sal_Bool ImplSdPPTImport::Import()
pSdrModel->InsertPage( pNotesPage ); // SJ: #i29625# because of form controls, the
ImportPage( pNotesPage, pMasterPersist2 ); // page must be inserted before importing
SetHeaderFooterPageSettings( pNotesPage, pMasterPersist2 );
- pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, FALSE );
+ pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, sal_False );
}
else
{
pNotesPage->SetPageKind( PK_NOTES );
pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
- pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, TRUE );
+ pNotesPage->SetAutoLayout( AUTOLAYOUT_NOTES, sal_True );
pSdrModel->InsertPage( pNotesPage );
SdrObject* pPageObj = pNotesPage->GetPresObj( PRESOBJ_PAGE, 1 );
if ( pPageObj )
@@ -1033,7 +1033,7 @@ sal_Bool ImplSdPPTImport::Import()
{
// Das kann bei Dokumentvorlagen vorkommen
eAktPageKind = PPT_SLIDEPAGE;
- SdrPage* pPage = MakeBlancPage( FALSE );
+ SdrPage* pPage = MakeBlancPage( sal_False );
pSdrModel->InsertPage( pPage );
// #i37397#, trying to set the title master for the first page
@@ -1058,10 +1058,10 @@ sal_Bool ImplSdPPTImport::Import()
((SdPage*)pPage)->TRG_SetMasterPage( *((SdPage*)pFoundMaster) );
((SdPage*)pPage)->SetLayoutName( ((SdPage*)pFoundMaster)->GetLayoutName() );
}
- ((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_TITLE, TRUE, TRUE );
+ ((SdPage*)pPage)->SetAutoLayout( AUTOLAYOUT_TITLE, sal_True, sal_True );
eAktPageKind = PPT_NOTEPAGE;
- SdrPage* pNPage = MakeBlancPage( FALSE );
+ SdrPage* pNPage = MakeBlancPage( sal_False );
pSdrModel->InsertPage( pNPage );
}
SetPageNum( nPageNum, ePageKind );
@@ -1089,7 +1089,7 @@ sal_Bool ImplSdPPTImport::Import()
case PPT_LAYOUT_TITLEANDBODYSLIDE :
{
eAutoLayout = AUTOLAYOUT_ENUM;
- USHORT nID1 = pSlideLayout->aPlaceholderId[ 1 ];
+ sal_uInt16 nID1 = pSlideLayout->aPlaceholderId[ 1 ];
switch ( nID1 )
{
case PPT_PLACEHOLDER_BODY :
@@ -1117,8 +1117,8 @@ sal_Bool ImplSdPPTImport::Import()
case PPT_LAYOUT_2COLUMNSANDTITLE :
{
eAutoLayout = AUTOLAYOUT_2TEXT;
- USHORT nID1 = pSlideLayout->aPlaceholderId[ 1 ];
- USHORT nID2 = pSlideLayout->aPlaceholderId[ 2 ];
+ sal_uInt16 nID1 = pSlideLayout->aPlaceholderId[ 1 ];
+ sal_uInt16 nID2 = pSlideLayout->aPlaceholderId[ 2 ];
if ( nID1 == PPT_PLACEHOLDER_BODY && nID2 == PPT_PLACEHOLDER_GRAPH )
eAutoLayout = AUTOLAYOUT_TEXTCHART;
else if ( nID1 == PPT_PLACEHOLDER_GRAPH && nID2 == PPT_PLACEHOLDER_BODY )
@@ -1143,8 +1143,8 @@ sal_Bool ImplSdPPTImport::Import()
case PPT_LAYOUT_2ROWSANDTITLE :
{
eAutoLayout = AUTOLAYOUT_2TEXT;
- USHORT nID1 = pSlideLayout->aPlaceholderId[ 1 ];
- USHORT nID2 = pSlideLayout->aPlaceholderId[ 2 ];
+ sal_uInt16 nID1 = pSlideLayout->aPlaceholderId[ 1 ];
+ sal_uInt16 nID2 = pSlideLayout->aPlaceholderId[ 2 ];
if ( nID1 == PPT_PLACEHOLDER_BODY && nID2 == PPT_PLACEHOLDER_OBJECT )
eAutoLayout = AUTOLAYOUT_TEXTOVEROBJ;
else if ( nID1 == PPT_PLACEHOLDER_OBJECT && nID2 == PPT_PLACEHOLDER_BODY )
@@ -1191,17 +1191,17 @@ sal_Bool ImplSdPPTImport::Import()
break;
}
if ( eAutoLayout != AUTOLAYOUT_NONE )
- pPage->SetAutoLayout( eAutoLayout, FALSE );
+ pPage->SetAutoLayout( eAutoLayout, sal_False );
}
}
//////////////////////////////////////////////////////////////
// Handzettel-MasterPage: Autolayout setzen //
//////////////////////////////////////////////////////////////
SdPage* pHandoutMPage = mpDoc->GetMasterSdPage( 0, PK_HANDOUT );
- pHandoutMPage->SetAutoLayout( AUTOLAYOUT_HANDOUT6, TRUE, TRUE );
+ pHandoutMPage->SetAutoLayout( AUTOLAYOUT_HANDOUT6, sal_True, sal_True );
}
- UINT32 nSlideCount = GetPageCount();
+ sal_uInt32 nSlideCount = GetPageCount();
for ( i = 0; ( i < nSlideCount) && ( i < maSlideNameList.Count() ); i++ )
{
SdPage* pPage = mpDoc->GetSdPage( i, PK_STANDARD );
@@ -1295,22 +1295,22 @@ sal_Bool ImplSdPPTImport::Import()
if ( SeekToRec( rStCtrl, PPT_PST_NamedShowSlides, aCuHeader.GetRecEndFilePos(), &aContent ) )
{
PptSlidePersistList* pPageList = GetPageList( PPT_SLIDEPAGE );
- UINT32 nSCount = aContent.nRecLen >> 2;
+ sal_uInt32 nSCount = aContent.nRecLen >> 2;
if ( pPageList && nSCount )
{
- List* pList = mpDoc->GetCustomShowList( TRUE );
+ List* pList = mpDoc->GetCustomShowList( sal_True );
if ( pList )
{
SdCustomShow* pSdCustomShow = new SdCustomShow( mpDoc );
if ( pSdCustomShow )
{
pSdCustomShow->SetName( aCuShow );
- UINT32 nFound = 0;
- for ( UINT32 nS = 0; nS < nSCount; nS++ )
+ sal_uInt32 nFound = 0;
+ for ( sal_uInt32 nS = 0; nS < nSCount; nS++ )
{
- UINT32 nPageNumber;
+ sal_uInt32 nPageNumber;
rStCtrl >> nPageNumber;
- USHORT nPage = pPageList->FindPage( nPageNumber );
+ sal_uInt16 nPage = pPageList->FindPage( nPageNumber );
if ( nPage != PPTSLIDEPERSIST_ENTRY_NOTFOUND )
{
SdPage* pPage = mpDoc->GetSdPage( nPage, PK_STANDARD );
@@ -1351,7 +1351,7 @@ sal_Bool ImplSdPPTImport::Import()
>> nEndSlide;
sal_Unicode nChar;
- for ( UINT32 i2 = 0; i2 < 32; i2++ )
+ for ( sal_uInt32 i2 = 0; i2 < 32; i2++ )
{
rStCtrl >> nChar;
if ( nChar )
@@ -1368,7 +1368,7 @@ sal_Bool ImplSdPPTImport::Import()
if ( aCustomShow.Len() )
{
void* pPtr;
- List* pList = mpDoc->GetCustomShowList( FALSE );
+ List* pList = mpDoc->GetCustomShowList( sal_False );
if ( pList )
{
for ( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
@@ -1427,7 +1427,7 @@ void ImplSdPPTImport::SetHeaderFooterPageSettings( SdPage* pPage, const PptSlide
bool bVisible = pHFE->IsToDisplay( i );
if ( ( eAktPageKind == PPT_SLIDEPAGE )
&& ( rSlidePersist.aSlideAtom.aLayout.eLayout == PPT_LAYOUT_TITLESLIDE )
- && ( aDocAtom.bTitlePlaceholdersOmitted == TRUE ) )
+ && ( aDocAtom.bTitlePlaceholdersOmitted == sal_True ) )
{
bVisible = sal_False;
}
@@ -1512,7 +1512,7 @@ bool Ppt97AnimationStlSortHelper::operator()( const std::pair< SdrObject*, Ppt97
void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimationsUsed )
{
- ULONG nFilePosMerk = rStCtrl.Tell();
+ sal_uLong nFilePosMerk = rStCtrl.Tell();
// PageKind an der Seite setzen (bisher nur PK_STANDARD oder PK_NOTES)
if ( pPage->GetPageKind() == PK_STANDARD )
@@ -1528,7 +1528,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
if(pPage->TRG_HasMasterPage())
{
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- aVisibleLayers.Set(mnBackgroundObjectsLayerID, FALSE);
+ aVisibleLayers.Set(mnBackgroundObjectsLayerID, sal_False);
pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
}
}
@@ -1536,11 +1536,11 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
DffRecordHeader aPageRecHd;
if ( pPage && SeekToAktPage( &aPageRecHd ) )
{
- ULONG nPageRecEnd = aPageRecHd.GetRecEndFilePos();
+ sal_uLong nPageRecEnd = aPageRecHd.GetRecEndFilePos();
- BOOL bTryTwice = ( eAktPageKind == PPT_SLIDEPAGE );
- BOOL bSSSlideInfoAtom = FALSE;
- while ( TRUE )
+ sal_Bool bTryTwice = ( eAktPageKind == PPT_SLIDEPAGE );
+ sal_Bool bSSSlideInfoAtom = sal_False;
+ while ( sal_True )
{
while ( ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nPageRecEnd ) )
{
@@ -1550,7 +1550,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
{
case PPT_PST_SSSlideInfoAtom:
{
- bSSSlideInfoAtom = TRUE;
+ bSSSlideInfoAtom = sal_True;
if ( eAktPageKind == PPT_MASTERPAGE )
{
if ( pActualSlidePersist )
@@ -1800,10 +1800,10 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
pPage->SetPresChange( mePresChange );
if ( nBuildFlags & 4 )
- pPage->SetExcluded( TRUE ); // Dia nicht anzeigen
+ pPage->SetExcluded( sal_True ); // Dia nicht anzeigen
if ( nBuildFlags & 16 )
{ // Dia mit Soundeffekt
- pPage->SetSound( TRUE );
+ pPage->SetSound( sal_True );
String aSoundFile( ReadSound( nSoundRef ) );
pPage->SetSoundFile( aSoundFile );
}
@@ -1817,19 +1817,19 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
}
aHd.SeekToEndOfRecord( rStCtrl );
}
- if ( bTryTwice && ( bSSSlideInfoAtom == FALSE ) )
+ if ( bTryTwice && ( bSSSlideInfoAtom == sal_False ) )
{
- bTryTwice = FALSE;
+ bTryTwice = sal_False;
if ( HasMasterPage( nAktPageNum, eAktPageKind ) )
{
- USHORT nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
+ sal_uInt16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
PptSlidePersistList* pPageList = GetPageList( PPT_MASTERPAGE );
if ( pPageList && ( nMasterNum < pPageList->Count() ) )
{
PptSlidePersistEntry* pE = (*pPageList)[ nMasterNum ];
if ( pE )
{
- UINT32 nOfs = pE->aPersistAtom.nReserved;
+ sal_uInt32 nOfs = pE->aPersistAtom.nReserved;
if ( nOfs )
{
rStCtrl.Seek( nOfs );
@@ -1888,31 +1888,31 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const sal_Bool bNewAnimat
//
///////////////////////////////////////////////////////////////////////////
-String ImplSdPPTImport::ReadSound(UINT32 nSoundRef) const
+String ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
{
String aRetval;
- UINT32 nPosMerk = rStCtrl.Tell();
+ sal_uInt32 nPosMerk = rStCtrl.Tell();
DffRecordHeader aDocHd;
if ( SeekToDocument( &aDocHd ) )
{
- UINT32 nSoundLen = aDocHd.GetRecEndFilePos();
+ sal_uInt32 nSoundLen = aDocHd.GetRecEndFilePos();
DffRecordHeader aSoundBlockRecHd;
if( SeekToRec( rStCtrl, PPT_PST_SoundCollection, nSoundLen, &aSoundBlockRecHd ) )
{
- UINT32 nDataLen = aSoundBlockRecHd.GetRecEndFilePos();
+ sal_uInt32 nDataLen = aSoundBlockRecHd.GetRecEndFilePos();
DffRecordHeader aSoundRecHd;
- BOOL bRefStrValid = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bRefStrValid = sal_False;
+ sal_Bool bDone = sal_False;
while( !bDone && SeekToRec( rStCtrl, PPT_PST_Sound, nDataLen, &aSoundRecHd ) )
{
- UINT32 nStrLen = aSoundRecHd.GetRecEndFilePos();
+ sal_uInt32 nStrLen = aSoundRecHd.GetRecEndFilePos();
String aRefStr;
- UINT32 nPosMerk2 = rStCtrl.Tell();
+ sal_uInt32 nPosMerk2 = rStCtrl.Tell();
if ( SeekToRec( rStCtrl, PPT_PST_CString, nStrLen, NULL, 2 ) )
{
if ( ReadString( aRefStr ) )
- bRefStrValid = TRUE;
+ bRefStrValid = sal_True;
}
if ( bRefStrValid )
{
@@ -1922,7 +1922,7 @@ String ImplSdPPTImport::ReadSound(UINT32 nSoundRef) const
if ( SeekToRec( rStCtrl, PPT_PST_CString, nStrLen, NULL, 0 ) )
{
ReadString( aRetval );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
@@ -1931,13 +1931,13 @@ String ImplSdPPTImport::ReadSound(UINT32 nSoundRef) const
// ueberpruefen, ob diese Sound-Datei schon
// existiert. Wenn nicht, exportiere diese
// in unser lokales Sound-Verzeichnis.
- BOOL bSoundExists = FALSE;
+ sal_Bool bSoundExists = sal_False;
List* pSoundList = new List();
GalleryExplorer::FillObjList( GALLERY_THEME_SOUNDS, *pSoundList );
GalleryExplorer::FillObjList( GALLERY_THEME_USERSOUNDS, *pSoundList );
- for( ULONG n = 0; ( n < pSoundList->Count() ) && !bSoundExists; n++ )
+ for( sal_uLong n = 0; ( n < pSoundList->Count() ) && !bSoundExists; n++ )
{
INetURLObject aURL( *(String*)pSoundList->GetObject( n ) );
String aSoundName( aURL.GetName() );
@@ -1945,7 +1945,7 @@ String ImplSdPPTImport::ReadSound(UINT32 nSoundRef) const
if( aSoundName == aRetval )
{
aRetval = *(String*)pSoundList->GetObject( n );
- bSoundExists = TRUE;
+ bSoundExists = sal_True;
}
}
@@ -1964,8 +1964,8 @@ String ImplSdPPTImport::ReadSound(UINT32 nSoundRef) const
INetURLObject aGalleryUserSound( aGalleryDir.GetToken( aGalleryDir.GetTokenCount( ';' ) - 1 ) );
aGalleryUserSound.Append( aRetval );
- UINT32 nSoundDataLen = aSoundDataRecHd.nRecLen;
- UINT8* pBuf = new UINT8[ nSoundDataLen ];
+ sal_uInt32 nSoundDataLen = aSoundDataRecHd.nRecLen;
+ sal_uInt8* pBuf = new sal_uInt8[ nSoundDataLen ];
rStCtrl.Read( pBuf, nSoundDataLen );
SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( aGalleryUserSound.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC );
@@ -2229,7 +2229,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{
pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
if ( pSheet )
- ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, TRUE );
+ ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, sal_True );
DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for titleobject (SJ)" );
}
break;
@@ -2237,7 +2237,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{
pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT );
if ( pSheet )
- ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, TRUE );
+ ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, sal_True );
DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for subtitleobject (SJ)" );
}
break;
@@ -2245,7 +2245,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
case TSS_TYPE_HALFBODY :
case TSS_TYPE_QUARTERBODY :
{
- for ( UINT16 nLevel = 9; nLevel; nLevel-- )
+ for ( sal_uInt16 nLevel = 9; nLevel; nLevel-- )
{
String aName( pPage->GetLayoutName() );
aName.Append( (sal_Unicode)( ' ' ) );
@@ -2257,7 +2257,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
}
DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for outlinerobject (SJ)" );
if ( pSheet )
- ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, TRUE );
+ ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, sal_True );
ppStyleSheetAry = &pStyleSheetAry[ 0 ];
}
break;
@@ -2268,7 +2268,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{
pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
if ( pSheet )
- ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, TRUE );
+ ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, sal_True );
DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for titleobject (SJ)" );
}
else
@@ -2276,7 +2276,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
pSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_NOTES );
DBG_ASSERT( pSheet, "ImplSdPPTImport::ApplyTextObj -> could not get stylesheet for notesobj (SJ)" );
if ( pSheet )
- ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, TRUE );
+ ((SdrAttrObj*)pText)->SdrAttrObj::NbcSetStyleSheet( pSheet, sal_True );
}
}
break;
@@ -2311,8 +2311,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
{
if ( !bIsHeaderFooter )
{
- pText->SetNotVisibleAsMaster( TRUE );
- pText->SetEmptyPresObj( TRUE );
+ pText->SetNotVisibleAsMaster( sal_True );
+ pText->SetEmptyPresObj( sal_True );
}
pText->SetUserCall( pPage );
pPage->InsertPresObj( pText, ePresKind );
@@ -2335,13 +2335,13 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
rItemSet.Put( (SdrTextVertAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_VERTADJUST ) );
rItemSet.Put( (SdrTextHorzAdjustItem&)pText->GetMergedItem( SDRATTR_TEXT_HORZADJUST ) );
}
- pText->NbcSetStyleSheet( pSheet2, FALSE );
+ pText->NbcSetStyleSheet( pSheet2, sal_False );
}
SfxItemSet aTempAttr( mpDoc->GetPool() );
SdrTextMinFrameHeightItem aMinHeight( pText->GetLogicRect().GetSize().Height() );
aTempAttr.Put( aMinHeight );
- SdrTextAutoGrowHeightItem aAutoGrowHeight( FALSE );
+ SdrTextAutoGrowHeightItem aAutoGrowHeight( sal_False );
aTempAttr.Put( aAutoGrowHeight );
pText->SetMergedItemSet(aTempAttr);
}
@@ -2355,8 +2355,8 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
const PptSlideLayoutAtom* pSlideLayout = GetSlideLayoutAtom();
if ( pSlideLayout || ( eAktPageKind == PPT_NOTEPAGE ) )
{
- INT16 nPlaceholderId = pPlaceHolder->nPlaceholderId;
- UINT16 i = 0;
+ sal_Int16 nPlaceholderId = pPlaceHolder->nPlaceholderId;
+ sal_uInt16 i = 0;
if ( eAktPageKind == PPT_SLIDEPAGE )
{
for ( ; i < 8; i++ )
@@ -2427,14 +2427,14 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
}
else
{
- SdrObject* pPresObj = pPage->CreatePresObj( ePresObjKind, bVertical, pText->GetLogicRect(), TRUE );
+ SdrObject* pPresObj = pPage->CreatePresObj( ePresObjKind, bVertical, pText->GetLogicRect(), sal_True );
pPresObj->SetUserCall( pPage );
SfxItemSet aSet( pSdrModel->GetItemPool() );
ApplyAttributes( rStCtrl, aSet );
pPresObj->SetMergedItemSet(aSet);
- if ( ( eAktPageKind != PPT_NOTEPAGE ) && ( pSlideLayout->aPlacementId[ i ] != (ULONG)-1 ) )
+ if ( ( eAktPageKind != PPT_NOTEPAGE ) && ( pSlideLayout->aPlacementId[ i ] != (sal_uLong)-1 ) )
{
SdrObject* pTitleObj = ((SdPage&)pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_TITLE );
SdrObject* pOutlineObj = ((SdPage&)pPage->TRG_GetMasterPage()).GetPresObj( PRESOBJ_OUTLINE );
@@ -2580,21 +2580,21 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
pProcessData->pPage->InsertPresObj( pObj, PRESOBJ_PAGE );
}
- BOOL bInhabitanceChecked = FALSE;
- BOOL bAnimationInfoFound = FALSE;
+ sal_Bool bInhabitanceChecked = sal_False;
+ sal_Bool bAnimationInfoFound = sal_False;
DffRecordHeader aMasterShapeHd;
if ( maShapeRecords.SeekToContent( rSt, DFF_msofbtClientData, SEEK_FROM_CURRENT_AND_RESTART ) )
{
DffRecordHeader& rHdClientData = *maShapeRecords.Current();
- while( TRUE )
+ while( sal_True )
{
- UINT32 nClientDataLen = rHdClientData.GetRecEndFilePos();
+ sal_uInt32 nClientDataLen = rHdClientData.GetRecEndFilePos();
DffRecordHeader aHd;
do
{
rSt >> aHd;
- UINT32 nHdRecEnd = aHd.GetRecEndFilePos();
+ sal_uInt32 nHdRecEnd = aHd.GetRecEndFilePos();
switch ( aHd.nRecType )
{
case PPT_PST_AnimationInfo :
@@ -2638,14 +2638,14 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
maAnimations[pObj] = pAnimation;
- bAnimationInfoFound = TRUE;
+ bAnimationInfoFound = sal_True;
}
}
}
break;
case PPT_PST_InteractiveInfo:
{
- UINT32 nFilePosMerk2 = rSt.Tell();
+ sal_uInt32 nFilePosMerk2 = rSt.Tell();
String aMacroName;
if(SeekToRec( rSt, PPT_PST_CString, nHdRecEnd, NULL, 0 ) )
@@ -2707,7 +2707,7 @@ SdrObject* ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( bInhabitanceChecked || bAnimationInfoFound )
break;
- bInhabitanceChecked = TRUE;
+ bInhabitanceChecked = sal_True;
if ( ! ( IsProperty( DFF_Prop_hspMaster ) && SeekToShape( rSt, pData, GetPropertyValue( DFF_Prop_hspMaster ) ) ) )
break;
rSt >> aMasterShapeHd;
diff --git a/sd/source/filter/ppt/pptin.hxx b/sd/source/filter/ppt/pptin.hxx
index f45505d75e1f..2f38ff74d444 100644..100755
--- a/sd/source/filter/ppt/pptin.hxx
+++ b/sd/source/filter/ppt/pptin.hxx
@@ -62,7 +62,7 @@ class ImplSdPPTImport : public SdrPowerPointImport
// SvStream* mpPicStream;
DffRecordHeader maDocHd;
List maSlideNameList;
- BOOL mbDocumentFound;
+ sal_Bool mbDocumentFound;
sal_uInt32 mnFilterOptions;
SdDrawDocument* mpDoc;
PresChange mePresChange;
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 04c7566bbbee..4a5eb0688243 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -929,9 +929,9 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
if( aString.getLength() >= 7 && aString[0] == '#' )
{
Color aColor;
- aColor.SetRed( (UINT8)(lcl_gethex( aString[1] ) * 16 + lcl_gethex( aString[2] )) );
- aColor.SetGreen( (UINT8)(lcl_gethex( aString[3] ) * 16 + lcl_gethex( aString[4] )) );
- aColor.SetBlue( (UINT8)(lcl_gethex( aString[5] ) * 16 + lcl_gethex( aString[6] )) );
+ aColor.SetRed( (sal_uInt8)(lcl_gethex( aString[1] ) * 16 + lcl_gethex( aString[2] )) );
+ aColor.SetGreen( (sal_uInt8)(lcl_gethex( aString[3] ) * 16 + lcl_gethex( aString[4] )) );
+ aColor.SetBlue( (sal_uInt8)(lcl_gethex( aString[5] ) * 16 + lcl_gethex( aString[6] )) );
rValue <<= (sal_Int32)aColor.GetColor();
bRet = true;
}
@@ -940,9 +940,9 @@ bool AnimationImporter::convertAnimationValue( MS_AttributeNames eAttribute, Any
aString = aString.copy( 4, aString.getLength() - 5 );
Color aColor;
sal_Int32 index = 0;
- aColor.SetRed( (UINT8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
- aColor.SetGreen( (UINT8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
- aColor.SetRed( (UINT8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
+ aColor.SetRed( (sal_uInt8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
+ aColor.SetGreen( (sal_uInt8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
+ aColor.SetRed( (sal_uInt8)aString.getToken( 0, (sal_Unicode)',', index ).toInt32() );
rValue <<= (sal_Int32)aColor.GetColor();
bRet = true;
}
@@ -1839,7 +1839,7 @@ Any AnimationImporter::implGetColorAny( sal_Int32 nMode, sal_Int32 nA, sal_Int3
dump( "rgb(%ld", nA );
dump( ",%ld", nB );
dump( ",%ld)", nC );
- Color aColor( (UINT8)nA, (UINT8)nB, (UINT8)nC );
+ Color aColor( (sal_uInt8)nA, (sal_uInt8)nB, (sal_uInt8)nC );
return makeAny( (sal_Int32)aColor.GetRGBColor() );
}
case 1: // hsl
@@ -1857,7 +1857,7 @@ Any AnimationImporter::implGetColorAny( sal_Int32 nMode, sal_Int32 nA, sal_Int3
case 2: // index
{
Color aColor;
- mpPPTImport->GetColorFromPalette((USHORT)nA, aColor );
+ mpPPTImport->GetColorFromPalette((sal_uInt16)nA, aColor );
dump( "index(%ld", nA );
dump( " [%ld", (sal_Int32)aColor.GetRed() );
dump( ",%ld", (sal_Int32)aColor.GetGreen() );
@@ -3077,9 +3077,9 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
const EditTextObject& rEditTextObject = pOPO->GetTextObject();
- const USHORT nParaCount = rEditTextObject.GetParagraphCount();
+ const sal_uInt16 nParaCount = rEditTextObject.GetParagraphCount();
- USHORT nPara = 0;
+ sal_uInt16 nPara = 0;
while( (nPara < nParaCount) && (begin > 0) )
{
@@ -3238,11 +3238,11 @@ void AnimationImporter::dump_atom_header( const Atom* pAtom, bool bOpen, bool bA
// --------------------------------------------------------------------
-void AnimationImporter::dump( UINT32 nLen, bool bNewLine )
+void AnimationImporter::dump( sal_uInt32 nLen, bool bNewLine )
{
char * faul = "0123456789abcdef";
- UINT32 i = 0;
+ sal_uInt32 i = 0;
int b = 0;
sal_Int8 nData;
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 74f89d2ebd45..150acf381c4d 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -103,7 +103,7 @@ static xub_StrLen lcl_getMaxSafeStrLen(sal_uInt32 nSize)
return static_cast< xub_StrLen >( nSize );
}
-BOOL PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign )
+sal_Bool PropItem::Read( String& rString, sal_uInt32 nStringType, sal_Bool bAlign )
{
sal_uInt32 i, nItemSize, nType, nItemPos;
sal_Bool bRetValue = sal_False;
@@ -255,7 +255,7 @@ void Dictionary::AddProperty( sal_uInt32 nId, const String& rString )
// -----------------------------------------------------------------------
-UINT32 Dictionary::GetProperty( const String& rString )
+sal_uInt32 Dictionary::GetProperty( const String& rString )
{
for ( Dict* pDict = (Dict*)First(); pDict; pDict = (Dict*)Next() )
{
diff --git a/sd/source/filter/ppt/propread.hxx b/sd/source/filter/ppt/propread.hxx
index b268fb3d019d..9adbd89aeb3e 100644..100755
--- a/sd/source/filter/ppt/propread.hxx
+++ b/sd/source/filter/ppt/propread.hxx
@@ -129,13 +129,13 @@ class Dictionary : protected List
{
friend class Section;
- void AddProperty( UINT32 nId, const String& rString );
+ void AddProperty( sal_uInt32 nId, const String& rString );
public :
Dictionary(){};
~Dictionary();
Dictionary& operator=( Dictionary& rDictionary );
- UINT32 GetProperty( const String& rPropName );
+ sal_uInt32 GetProperty( const String& rPropName );
};
// ------------------------------------------------------------------------
@@ -146,7 +146,7 @@ class Section : private List
protected:
- BYTE aFMTID[ 16 ];
+ sal_uInt8 aFMTID[ 16 ];
void AddProperty( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize );
@@ -167,7 +167,7 @@ class Section : private List
class PropRead : private List
{
sal_Bool mbStatus;
- SvStorageStream* mpSvStream;
+ SvStorageStreamRef mpSvStream;
sal_uInt16 mnByteOrder;
sal_uInt16 mnFormat;
@@ -182,7 +182,7 @@ class PropRead : private List
~PropRead();
PropRead& operator=( PropRead& rPropRead );
- const Section* GetSection( const BYTE* pFMTID );
+ const Section* GetSection( const sal_uInt8* pFMTID );
sal_Bool IsValid() const { return mbStatus; };
void Read();
};
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index 05024bb46680..5f25abc4f9f3 100644..100755
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -52,7 +52,7 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::frame;
-typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&,
+typedef sal_Bool ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&,
Reference< XModel > &,
Reference< XStatusIndicator > &,
SvMemoryStream*, sal_uInt32 nCnvrtFlags );
@@ -60,7 +60,7 @@ typedef BOOL ( __LOADONCALLAPI *ExportPPT )( SvStorageRef&,
typedef sal_Bool ( SAL_CALL *ImportPPT )( const ::rtl::OUString&, Sequence< PropertyValue >*,
SdDrawDocument*, SvStream&, SvStorage&, SfxMedium& );
-typedef BOOL ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& );
+typedef sal_Bool ( __LOADONCALLAPI *SaveVBA )( SfxObjectShell&, SvMemoryStream*& );
// ---------------
// - SdPPTFilter -
@@ -84,7 +84,7 @@ SdPPTFilter::~SdPPTFilter()
sal_Bool SdPPTFilter::Import()
{
sal_Bool bRet = sal_False;
- SotStorageRef pStorage = new SotStorage( mrMedium.GetInStream(), FALSE );
+ SotStorageRef pStorage = new SotStorage( mrMedium.GetInStream(), sal_False );
if( !pStorage->GetError() )
{
/* check if there is a dualstorage, then the
@@ -143,7 +143,7 @@ sal_Bool SdPPTFilter::Export()
{
if( mxModel.is() )
{
- SotStorageRef xStorRef = new SotStorage( mrMedium.GetOutStream(), FALSE );
+ SotStorageRef xStorRef = new SotStorage( mrMedium.GetOutStream(), sal_False );
ExportPPT PPTExport = reinterpret_cast<ExportPPT>(pLibrary->getFunctionSymbol( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ExportPPT")) ));
if( PPTExport && xStorRef.Is() )
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 7c8e648778ed..1683734512fc 100644..100755
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -174,7 +174,7 @@ struct XML_SERVICES
const sal_Char* mpSettings;
};
-XML_SERVICES* getServices( bool bImport, bool bDraw, ULONG nStoreVer )
+XML_SERVICES* getServices( bool bImport, bool bDraw, sal_uLong nStoreVer )
{
static XML_SERVICES gServices[] =
{
@@ -197,7 +197,7 @@ XML_SERVICES* getServices( bool bImport, bool bDraw, ULONG nStoreVer )
// - SdXMLWrapper -
// ----------------
-SdXMLFilter::SdXMLFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, sal_Bool bShowProgress, SdXMLFilterMode eFilterMode, ULONG nStoreVer ) :
+SdXMLFilter::SdXMLFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, sal_Bool bShowProgress, SdXMLFilterMode eFilterMode, sal_uLong nStoreVer ) :
SdFilter( rMedium, rDocShell, bShowProgress ), meFilterMode( eFilterMode ), mnStoreVer( nStoreVer )
{
}
@@ -842,12 +842,12 @@ sal_Bool SdXMLFilter::Export()
SvXMLEmbeddedObjectHelper* pObjectHelper = NULL;
SvXMLGraphicHelper* pGraphicHelper = NULL;
- sal_Bool bDocRet = FALSE;
+ sal_Bool bDocRet = sal_False;
if( !mxModel.is() )
{
OSL_FAIL("Got NO Model in XMLExport");
- return FALSE;
+ return sal_False;
}
sal_Bool bLocked = mxModel->hasControllersLocked();
@@ -861,7 +861,7 @@ sal_Bool SdXMLFilter::Export()
if( !xServiceInfo.is() || !xServiceInfo->supportsService( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GenericDrawingDocument" ) ) ) )
{
OSL_FAIL( "Model is no DrawingDocument in XMLExport" );
- return FALSE;
+ return sal_False;
}
uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() );
@@ -869,7 +869,7 @@ sal_Bool SdXMLFilter::Export()
if( !xServiceFactory.is() )
{
OSL_FAIL( "got no service manager" );
- return FALSE;
+ return sal_False;
}
uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ) );
@@ -877,7 +877,7 @@ sal_Bool SdXMLFilter::Export()
if( !xWriter.is() )
{
OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" );
- return FALSE;
+ return sal_False;
}
uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY );
@@ -963,7 +963,7 @@ sal_Bool SdXMLFilter::Export()
pObjectHelper = SvXMLEmbeddedObjectHelper::Create( xStorage, *mrDocShell.GetDoc()->GetPersist(), EMBEDDEDOBJECTHELPER_MODE_WRITE, sal_False );
xObjectResolver = pObjectHelper;
- pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_WRITE, FALSE );
+ pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_WRITE, sal_False );
xGrfResolver = pGraphicHelper;
}
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 9a8ed5dd8ddb..53bbedffc062 100644..100755
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -152,7 +152,7 @@ void AccessibleDocumentViewBase::Init (void)
pWindow->AddChildEventListener (maWindowLink);
- USHORT nCount = pWindow->GetChildCount();
+ sal_uInt16 nCount = pWindow->GetChildCount();
for (sal_uInt16 i=0; i<nCount; i++)
{
Window* pChildWindow = pWindow->GetChild (i);
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 9fd2430d64e6..51354728f1c6 100644..100755
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -108,12 +108,12 @@ namespace accessibility
return *( const_cast< AccessibleOutlineEditSource* > (this) );
}
- BOOL AccessibleOutlineEditSource::IsValid() const
+ sal_Bool AccessibleOutlineEditSource::IsValid() const
{
if( mpOutliner && mpOutlinerView )
{
// Our view still on outliner?
- ULONG nCurrView, nViews;
+ sal_uLong nCurrView, nViews;
for( nCurrView=0, nViews=mpOutliner->GetViewCount(); nCurrView<nViews; ++nCurrView )
{
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index 20147ca70d67..989d12c5d4bf 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -38,6 +38,8 @@
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
#include <com/sun/star/accessibility/AccessibleRole.hpp>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <comphelper/accessibleeventnotifier.hxx>
@@ -386,10 +388,11 @@ awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds (void)
const SolarMutexGuard aSolarGuard;
- Rectangle aBBox (mrSlideSorter.GetView().GetPageBoundingBox (
- mnPageNumber,
- ::sd::slidesorter::view::SlideSorterView::CS_SCREEN,
- ::sd::slidesorter::view::SlideSorterView::BBT_INFO));
+ Rectangle aBBox (
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ mrSlideSorter.GetModel().GetPageDescriptor(mnPageNumber),
+ ::sd::slidesorter::view::PageObjectLayouter::PageObject,
+ ::sd::slidesorter::view::PageObjectLayouter::WindowCoordinateSystem));
if (mxParent.is())
{
@@ -477,7 +480,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterObject::getForeground (void)
{
ThrowIfDisposed ();
svtools::ColorConfig aColorConfig;
- UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
@@ -488,7 +491,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterObject::getBackground (void)
throw (::com::sun::star::uno::RuntimeException)
{
ThrowIfDisposed ();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 00c4d93b2288..a4e6eae35faa 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -63,6 +63,14 @@ using namespace ::com::sun::star::accessibility;
namespace accessibility {
+/** Inner implementation class of the AccessibleSlideSorterView.
+
+ Note that some event broadcasting is done asynchronously because
+ otherwise it could lead to deadlocks on (at least) some Solaris
+ machines. Probably (but unverified) this can happen on all GTK based
+ systems. The asynchronous broadcasting is just a workaround for a
+ poorly understood problem.
+*/
class AccessibleSlideSorterView::Implementation
: public SfxListener
{
@@ -73,7 +81,7 @@ public:
::Window* pWindow);
~Implementation (void);
- void UpdateChildren (void);
+ void RequestUpdateChildren (void);
void Clear (void);
sal_Int32 GetVisibleChildCount (void) const;
AccessibleSlideSorterObject* GetAccessibleChild (sal_Int32 nIndex);
@@ -84,8 +92,9 @@ public:
void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
DECL_LINK(WindowEventListener, VclWindowEvent*);
DECL_LINK(SelectionChangeListener, void*);
+ DECL_LINK(BroadcastSelectionChange, void*);
DECL_LINK(FocusChangeListener, void*);
- DECL_LINK(VisibilityChangeListener, void*);
+ DECL_LINK(UpdateChildrenCallback, void*);
private:
AccessibleSlideSorterView& mrAccessibleSlideSorter;
@@ -98,6 +107,10 @@ private:
::Window* mpWindow;
sal_Int32 mnFocusedIndex;
bool mbModelChangeLocked;
+ sal_uLong mnUpdateChildrenUserEventId;
+ sal_uLong mnSelectionChangeUserEventId;
+
+ void UpdateChildren (void);
};
@@ -115,7 +128,6 @@ AccessibleSlideSorterView::AccessibleSlideSorterView(
mnClientId(0),
mpContentWindow(pContentWindow)
{
- OSL_TRACE("creating AccessibleSlideSorterView");
}
@@ -568,7 +580,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterView::getForeground (void)
{
ThrowIfDisposed();
svtools::ColorConfig aColorConfig;
- UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
@@ -579,7 +591,7 @@ sal_Int32 SAL_CALL AccessibleSlideSorterView::getBackground (void)
throw (RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -781,6 +793,9 @@ sal_Bool AccessibleSlideSorterView::IsDisposed (void)
return (rBHelper.bDisposed || rBHelper.bInDispose);
}
+
+
+
//===== AccessibleSlideSorterView::Implementation =============================
AccessibleSlideSorterView::Implementation::Implementation (
@@ -795,7 +810,9 @@ AccessibleSlideSorterView::Implementation::Implementation (
mbListeningToDocument(false),
mpWindow(pWindow),
mnFocusedIndex(-1),
- mbModelChangeLocked(false)
+ mbModelChangeLocked(false),
+ mnUpdateChildrenUserEventId(0),
+ mnSelectionChangeUserEventId(0)
{
ConnectListeners();
UpdateChildren();
@@ -806,6 +823,10 @@ AccessibleSlideSorterView::Implementation::Implementation (
AccessibleSlideSorterView::Implementation::~Implementation (void)
{
+ if (mnUpdateChildrenUserEventId != 0)
+ Application::RemoveUserEvent(mnUpdateChildrenUserEventId);
+ if (mnSelectionChangeUserEventId != 0)
+ Application::RemoveUserEvent(mnSelectionChangeUserEventId);
ReleaseListeners();
Clear();
}
@@ -813,6 +834,17 @@ AccessibleSlideSorterView::Implementation::~Implementation (void)
+void AccessibleSlideSorterView::Implementation::RequestUpdateChildren (void)
+{
+ if (mnUpdateChildrenUserEventId == 0)
+ mnUpdateChildrenUserEventId = Application::PostUserEvent(
+ LINK(this, AccessibleSlideSorterView::Implementation,
+ UpdateChildrenCallback));
+}
+
+
+
+
void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
{
if (mbModelChangeLocked)
@@ -822,10 +854,9 @@ void AccessibleSlideSorterView::Implementation::UpdateChildren (void)
return;
}
- ::sd::slidesorter::view::SlideSorterView::PageRange aRange (
- mrSlideSorter.GetView().GetVisiblePageRange());
- mnFirstVisibleChild = aRange.first;
- mnLastVisibleChild = aRange.second;
+ const Pair aRange (mrSlideSorter.GetView().GetVisiblePageRange());
+ mnFirstVisibleChild = aRange.A();
+ mnLastVisibleChild = aRange.B();
// Release all children.
Clear();
@@ -864,7 +895,7 @@ void AccessibleSlideSorterView::Implementation::Clear (void)
sal_Int32 AccessibleSlideSorterView::Implementation::GetVisibleChildCount (void) const
{
- if (mnFirstVisibleChild <= mnLastVisibleChild)
+ if (mnFirstVisibleChild<=mnLastVisibleChild && mnFirstVisibleChild>=0)
return mnLastVisibleChild - mnFirstVisibleChild + 1;
else
return 0;
@@ -939,7 +970,7 @@ void AccessibleSlideSorterView::Implementation::ConnectListeners (void)
mrSlideSorter.GetController().GetFocusManager().AddFocusChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,FocusChangeListener));
mrSlideSorter.GetView().AddVisibilityChangeListener(
- LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
+ LINK(this,AccessibleSlideSorterView::Implementation,UpdateChildrenCallback));
}
@@ -952,7 +983,7 @@ void AccessibleSlideSorterView::Implementation::ReleaseListeners (void)
mrSlideSorter.GetController().GetSelectionManager()->RemoveSelectionChangeListener(
LINK(this,AccessibleSlideSorterView::Implementation,SelectionChangeListener));
mrSlideSorter.GetView().RemoveVisibilityChangeListener(
- LINK(this,AccessibleSlideSorterView::Implementation,VisibilityChangeListener));
+ LINK(this,AccessibleSlideSorterView::Implementation,UpdateChildrenCallback));
if (mpWindow != NULL)
mpWindow->RemoveEventListener(
@@ -980,7 +1011,7 @@ void AccessibleSlideSorterView::Implementation::Notify (
switch (rSdrHint.GetKind())
{
case HINT_PAGEORDERCHG:
- UpdateChildren();
+ RequestUpdateChildren();
break;
default:
break;
@@ -997,7 +1028,7 @@ void AccessibleSlideSorterView::Implementation::Notify (
case sd::ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END:
mbModelChangeLocked = false;
- UpdateChildren();
+ RequestUpdateChildren();
break;
default:
break;
@@ -1014,7 +1045,7 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWin
{
case VCLEVENT_WINDOW_MOVE:
case VCLEVENT_WINDOW_RESIZE:
- UpdateChildren();
+ RequestUpdateChildren();
break;
case VCLEVENT_WINDOW_GETFOCUS:
@@ -1035,6 +1066,18 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, WindowEventListener, VclWin
IMPL_LINK(AccessibleSlideSorterView::Implementation, SelectionChangeListener, void*, EMPTYARG )
{
+ if (mnSelectionChangeUserEventId == 0)
+ mnSelectionChangeUserEventId = Application::PostUserEvent(
+ LINK(this, AccessibleSlideSorterView::Implementation, BroadcastSelectionChange));
+ return 1;
+}
+
+
+
+
+IMPL_LINK(AccessibleSlideSorterView::Implementation, BroadcastSelectionChange, void*, EMPTYARG )
+{
+ mnSelectionChangeUserEventId = 0;
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::SELECTION_CHANGED,
Any(),
@@ -1078,8 +1121,9 @@ IMPL_LINK(AccessibleSlideSorterView::Implementation, FocusChangeListener, void*,
-IMPL_LINK(AccessibleSlideSorterView::Implementation, VisibilityChangeListener, void*, EMPTYARG )
+IMPL_LINK(AccessibleSlideSorterView::Implementation, UpdateChildrenCallback, void*, EMPTYARG )
{
+ mnUpdateChildrenUserEventId = 0;
UpdateChildren();
return 1;
diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
index 449b3d2235e6..f6fb75d1fe34 100644
--- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx
+++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
@@ -83,27 +83,6 @@ AccessibleTreeNode::AccessibleTreeNode(
-AccessibleTreeNode::AccessibleTreeNode(
- const Reference<XAccessible>& rxParent,
- ::sd::toolpanel::TreeNode& rNode,
- const OUString& rsName,
- const OUString& rsDescription,
- const sal_Int16 eRole)
- : AccessibleTreeNodeBase(MutexOwner::maMutex),
- mxParent(rxParent),
- mrTreeNode(rNode),
- mrStateSet(new ::utl::AccessibleStateSetHelper()),
- msName(rsName),
- msDescription(rsDescription),
- meRole(eRole),
- mnClientId(0)
-{
- CommonConstructor();
-}
-
-
-
-
void AccessibleTreeNode::CommonConstructor (void)
{
UpdateStateSet();
@@ -570,7 +549,7 @@ sal_Int32 SAL_CALL AccessibleTreeNode::getForeground (void)
{
ThrowIfDisposed();
svtools::ColorConfig aColorConfig;
- UINT32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
+ sal_uInt32 nColor = aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor;
return static_cast<sal_Int32>(nColor);
}
@@ -581,7 +560,7 @@ sal_Int32 SAL_CALL AccessibleTreeNode::getBackground (void)
throw (RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 5a8a7af836b0..539c6864b15c 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -88,7 +88,7 @@ public:
virtual void MouseButtonUp( const MouseEvent& rMEvt );
- USHORT InsertCategory( const XubString& rStr, USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 InsertCategory( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
void SetDoubleClickLink( const Link& rDoubleClickHdl ) { maDoubleClickHdl = rDoubleClickHdl; }
@@ -103,7 +103,7 @@ private:
CategoryListBox::CategoryListBox( Window* pParent, const ResId& rResId )
: ListBox( pParent, rResId )
{
- EnableUserDraw( TRUE );
+ EnableUserDraw( sal_True );
SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) );
}
@@ -111,9 +111,9 @@ CategoryListBox::~CategoryListBox()
{
}
-USHORT CategoryListBox::InsertCategory( const XubString& rStr, USHORT nPos /* = LISTBOX_APPEND */ )
+sal_uInt16 CategoryListBox::InsertCategory( const XubString& rStr, sal_uInt16 nPos /* = LISTBOX_APPEND */ )
{
- USHORT n = ListBox::InsertEntry( rStr, nPos );
+ sal_uInt16 n = ListBox::InsertEntry( rStr, nPos );
if( n != LISTBOX_ENTRY_NOTFOUND )
ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | LISTBOX_ENTRY_FLAG_DISABLE_SELECTION );
@@ -122,7 +122,7 @@ USHORT CategoryListBox::InsertCategory( const XubString& rStr, USHORT nPos /* =
void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
{
- const USHORT nItem = rUDEvt.GetItemId();
+ const sal_uInt16 nItem = rUDEvt.GetItemId();
if( ListBox::GetEntryFlags(nItem) & LISTBOX_ENTRY_FLAG_DISABLE_SELECTION )
{
@@ -148,7 +148,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt )
}
else
{
- DrawEntry( rUDEvt, TRUE, TRUE );
+ DrawEntry( rUDEvt, sal_True, sal_True );
}
}
@@ -210,9 +210,9 @@ private:
CustomAnimationCreateDialog* mpParent;
- USHORT mnCurvePathPos;
- USHORT mnPolygonPathPos;
- USHORT mnFreeformPathPos;
+ sal_uInt16 mnCurvePathPos;
+ sal_uInt16 mnPolygonPathPos;
+ sal_uInt16 mnFreeformPathPos;
};
@@ -261,7 +261,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
FreeResource();
- USHORT nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nFirstEffect = LISTBOX_ENTRY_NOTFOUND;
if( nTabId == MOTIONPATH )
{
@@ -293,7 +293,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
CustomAnimationPresetPtr pDescriptor = (*aIter++);
if( pDescriptor.get() && (bHasText || !pDescriptor->isTextOnly() ) )
{
- USHORT nPos = mpLBEffects->InsertEntry( pDescriptor->getLabel() );
+ sal_uInt16 nPos = mpLBEffects->InsertEntry( pDescriptor->getLabel() );
mpLBEffects->SetEntryData( nPos, static_cast<void*>( new CustomAnimationPresetPtr( pDescriptor ) ) );
if( nFirstEffect == LISTBOX_ENTRY_NOTFOUND )
@@ -336,7 +336,7 @@ IMPL_LINK( CustomAnimationCreateTabPage, implDoubleClickHdl, Control*, pControl
if( pControl == mpLBEffects )
{
if( mpLBEffects->GetSelectEntryCount() )
- mpParent->EndDialog( TRUE );
+ mpParent->EndDialog( sal_True );
}
return 0;
}
@@ -351,7 +351,7 @@ void CustomAnimationCreateTabPage::onSelectEffect()
CustomAnimationPresetPtr pPreset( *p );
const double fDuration = pPreset->getDuration();
- USHORT nPos = 0xffff;
+ sal_uInt16 nPos = 0xffff;
if( fDuration == 5.0 )
nPos = 0;
@@ -378,7 +378,7 @@ void CustomAnimationCreateTabPage::onSelectEffect()
void CustomAnimationCreateTabPage::clearEffects()
{
- USHORT nPos = mpLBEffects->GetEntryCount();
+ sal_uInt16 nPos = mpLBEffects->GetEntryCount();
while( nPos-- )
delete static_cast< CustomAnimationPresetPtr* >( mpLBEffects->GetEntryData( nPos ) );
@@ -405,7 +405,7 @@ PathKind CustomAnimationCreateTabPage::getCreatePathKind() const
if( mpLBEffects->GetSelectEntryCount() == 1 )
{
- const USHORT nPos = mpLBEffects->GetSelectEntryPos();
+ const sal_uInt16 nPos = mpLBEffects->GetSelectEntryPos();
if( nPos == mnCurvePathPos )
{
eKind = CURVE;
@@ -427,7 +427,7 @@ PathKind CustomAnimationCreateTabPage::getCreatePathKind() const
double CustomAnimationCreateTabPage::getDuration() const
{
- USHORT nPos = mpCBSpeed->GetSelectEntryPos();
+ sal_uInt16 nPos = mpCBSpeed->GetSelectEntryPos();
if( (nPos == 0xffff) || !mpCBSpeed->IsEnabled() )
{
CustomAnimationPresetPtr pPreset = getSelectedPreset();
@@ -449,7 +449,7 @@ double CustomAnimationCreateTabPage::getDuration() const
void CustomAnimationCreateTabPage::setDuration( double fDuration )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( fDuration < 2.0f )
{
if( fDuration < 1.0f )
@@ -483,12 +483,12 @@ bool CustomAnimationCreateTabPage::getIsPreview() const
void CustomAnimationCreateTabPage::setIsPreview( bool bIsPreview )
{
- mpCBXPReview->Check( bIsPreview ? TRUE : FALSE );
+ mpCBXPReview->Check( bIsPreview ? sal_True : sal_False );
}
bool CustomAnimationCreateTabPage::select( const OUString& rsPresetId )
{
- USHORT nPos = mpLBEffects->GetEntryCount();
+ sal_uInt16 nPos = mpLBEffects->GetEntryCount();
while( nPos-- )
{
void* pEntryData = mpLBEffects->GetEntryData( nPos );
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.src b/sd/source/ui/animations/CustomAnimationCreateDialog.src
index 0f83818fafb3..62abf708d883 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.src
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.src
@@ -98,11 +98,13 @@ TabDialog DLG_CUSTOMANIMATION_CREATE
TabPage RID_TP_CUSTOMANIMATION_ENTRANCE
{
+ HelpID = "sd:TabPage:RID_TP_CUSTOMANIMATION_ENTRANCE";
Hide = TRUE;
Size = MAP_APPFONT ( 156, 217 );
ListBox LB_EFFECTS
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_ENTRANCE:LB_EFFECTS";
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT( 144, 160 );
OutputSize = TRUE;
@@ -121,6 +123,7 @@ TabPage RID_TP_CUSTOMANIMATION_ENTRANCE
ComboBox CB_SPEED
{
+ HelpID = "sd:ComboBox:RID_TP_CUSTOMANIMATION_ENTRANCE:CB_SPEED";
Pos = MAP_APPFONT ( 48 , 166 ) ;
Size = MAP_APPFONT ( 101, 48 );
TabStop = TRUE ;
@@ -130,6 +133,7 @@ TabPage RID_TP_CUSTOMANIMATION_ENTRANCE
CheckBox CBX_PREVIEW
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_ENTRANCE:CBX_PREVIEW";
Pos = MAP_APPFONT ( 3 , 181 ) ;
Size = MAP_APPFONT ( 143 , 10 ) ;
TabStop = TRUE ;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 842ae8d9c513..8de65743ad02 100644..100755
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -121,7 +121,7 @@ public:
virtual Control* getControl();
private:
- std::map< USHORT, rtl::OUString > maPropertyValues;
+ std::map< sal_uInt16, rtl::OUString > maPropertyValues;
ListBox* mpControl;
};
@@ -161,7 +161,7 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
while( aIter != aEnd )
{
- USHORT nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( (*aIter) ) );
+ sal_uInt16 nPos = mpControl->InsertEntry( rPresets.getUINameForProperty( (*aIter) ) );
if( (*aIter) == aPropertyValue )
mpControl->SelectEntryPos( nPos );
maPropertyValues[nPos] = (*aIter++);
@@ -169,7 +169,7 @@ void PresetPropertyBox::setValue( const Any& rValue, const OUString& rPresetId )
}
else
{
- mpControl->Enable( FALSE );
+ mpControl->Enable( sal_False );
}
}
}
@@ -233,7 +233,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, Window* pParent, con
if ( !pColorTable )
{
pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
- bKillTable = TRUE;
+ bKillTable = sal_True;
}
sal_Int32 nColor = 0;
@@ -242,7 +242,7 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, Window* pParent, con
for ( long i = 0; i < pColorTable->Count(); i++ )
{
XColorEntry* pEntry = pColorTable->GetColor(i);
- USHORT nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
+ sal_uInt16 nPos = mpControl->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
if( pEntry->GetColor().GetRGBColor() == (sal_uInt32)nColor )
mpControl->SelectEntryPos( nPos );
}
@@ -324,7 +324,7 @@ FontPropertyBox::FontPropertyBox( sal_Int32 nControlType, Window* pParent, const
if(!pFontList)
{
- pFontList = new FontList( Application::GetDefaultDevice(), NULL, FALSE );
+ pFontList = new FontList( Application::GetDefaultDevice(), NULL, sal_False );
bMustDelete = true;
}
@@ -583,7 +583,7 @@ TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, Window
mpMetric->SetMax( 100 );
mpMenu = new PopupMenu();
- for( USHORT i = 25; i < 101; i += 25 )
+ for( sal_uInt16 i = 25; i < 101; i += 25 )
{
String aStr( String::CreateFromInt32( i ) );
aStr += sal_Unicode('%');
@@ -613,7 +613,7 @@ TransparencyPropertyBox::~TransparencyPropertyBox()
void TransparencyPropertyBox::updateMenu()
{
sal_Int64 nValue = mpMetric->GetValue();
- for( USHORT i = 25; i < 101; i += 25 )
+ for( sal_uInt16 i = 25; i < 101; i += 25 )
mpMenu->CheckItem( i, nValue == i );
}
@@ -1241,10 +1241,10 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
if ( !pColorTable )
{
pColorTable = new XColorTable( SvtPathOptions().GetPalettePath() );
- bKillTable = TRUE;
+ bKillTable = sal_True;
}
- mpCLBDimColor->SetUpdateMode( FALSE );
+ mpCLBDimColor->SetUpdateMode( sal_False );
for ( long i = 0; i < pColorTable->Count(); i++ )
{
@@ -1252,7 +1252,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
mpCLBDimColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() );
}
- mpCLBDimColor->SetUpdateMode( TRUE );
+ mpCLBDimColor->SetUpdateMode( sal_True );
if ( bKillTable )
delete pColorTable;
@@ -1377,7 +1377,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
sal_Bool bHasAfterEffect = sal_False;
pSet->getPropertyValue( nHandleHasAfterEffect ) >>= bHasAfterEffect;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( bHasAfterEffect )
{
nPos++;
@@ -1391,7 +1391,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
sal_Int32 nColor = 0;
aDimColor >>= nColor;
Color aColor( nColor );
- USHORT nColorPos = mpCLBDimColor->GetEntryPos( aColor );
+ sal_uInt16 nColorPos = mpCLBDimColor->GetEntryPos( aColor );
if ( LISTBOX_ENTRY_NOTFOUND != nColorPos )
mpCLBDimColor->SelectEntryPos( nColorPos );
else
@@ -1416,7 +1416,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
{
if( pSet->getPropertyState( nHandleIterateType ) != STLPropertyState_AMBIGUOUS)
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
sal_Int32 nIterateType = 0;
pSet->getPropertyValue( nHandleIterateType ) >>= nIterateType;
@@ -1439,16 +1439,16 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
}
else
{
- mpFTTextAnim->Enable( FALSE );
- mpLBTextAnim->Enable( FALSE );
- mpMFTextDelay->Enable( FALSE );
- mpFTTextDelay->Enable( FALSE );
+ mpFTTextAnim->Enable( sal_False );
+ mpLBTextAnim->Enable( sal_False );
+ mpMFTextDelay->Enable( sal_False );
+ mpFTTextDelay->Enable( sal_False );
}
if( pSet->getPropertyState( nHandleSoundURL ) != STLPropertyState_AMBIGUOUS )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const Any aValue( pSet->getPropertyValue( nHandleSoundURL ) );
@@ -1465,20 +1465,20 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con
{
const String aTmp( aSoundURL );
- ULONG i;
+ sal_uLong i;
for( i = 0; i < maSoundList.Count(); i++ )
{
String* pString = (String*)maSoundList.GetObject( i );
if( *pString == aTmp )
{
- nPos = (USHORT)i+2;
+ nPos = (sal_uInt16)i+2;
break;
}
}
if( nPos == 0 )
{
- nPos = (USHORT)maSoundList.Count()+2;
+ nPos = (sal_uInt16)maSoundList.Count()+2;
maSoundList.Insert( new String( aTmp ), LIST_APPEND );
INetURLObject aURL( aTmp );
nPos = mpLBSound->InsertEntry( aURL.GetBase(), nPos );
@@ -1526,7 +1526,7 @@ CustomAnimationEffectTabPage::~CustomAnimationEffectTabPage()
void CustomAnimationEffectTabPage::updateControlStates()
{
- USHORT nPos = mpLBAfterEffect->GetSelectEntryPos();
+ sal_uInt16 nPos = mpLBAfterEffect->GetSelectEntryPos();
mpCLBDimColor->Enable( nPos == 1 );
mpFTDimColor->Enable( nPos == 1 );
@@ -1545,7 +1545,7 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, Control*, pControl )
{
if( pControl == mpLBAfterEffect )
{
- USHORT nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
+ sal_uInt16 nPos = static_cast<ListBox*>( mpLBAfterEffect )->GetSelectEntryPos();
if( nPos == 1 )
{
if( mpCLBDimColor->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
@@ -1559,7 +1559,7 @@ IMPL_LINK( CustomAnimationEffectTabPage, implSelectHdl, Control*, pControl )
}
else if( pControl == mpLBSound )
{
- USHORT nPos = mpLBSound->GetSelectEntryPos();
+ sal_uInt16 nPos = mpLBSound->GetSelectEntryPos();
if( nPos == (mpLBSound->GetEntryCount() - 1) )
{
openSoundFileDialog();
@@ -1625,7 +1625,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
pSet->setPropertyValue( nHandleDecelerate, makeAny( fTemp ) );
}
- USHORT nPos = mpLBAfterEffect->GetSelectEntryPos();
+ sal_uInt16 nPos = mpLBAfterEffect->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Bool bAfterEffect = nPos != 0;
@@ -1736,7 +1736,7 @@ void CustomAnimationEffectTabPage::fillSoundListBox()
mpLBSound->InsertEntry( String( SdResId( STR_CUSTOMANIMATION_NO_SOUND ) ) );
mpLBSound->InsertEntry( String( SdResId( STR_CUSTOMANIMATION_STOP_PREVIOUS_SOUND ) ) );
- for( ULONG i = 0; i < maSoundList.Count(); i++ )
+ for( sal_uLong i = 0; i < maSoundList.Count(); i++ )
{
String* pString = (String*)maSoundList.GetObject( i );
INetURLObject aURL( *pString );
@@ -1811,8 +1811,8 @@ void CustomAnimationEffectTabPage::openSoundFileDialog()
String aStr; aStr += sal_Unicode('%');
aStrWarning.SearchAndReplace( aStr , aFile );
WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning );
- aWarningBox.SetModalInputMode (TRUE);
- bQuitLoop = aWarningBox.Execute()==RET_RETRY ? FALSE : TRUE;
+ aWarningBox.SetModalInputMode (sal_True);
+ bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True;
bValidSoundFile=false;
}
@@ -1827,12 +1827,12 @@ void CustomAnimationEffectTabPage::openSoundFileDialog()
if( !bValidSoundFile )
nPos = 0;
- mpLBSound->SelectEntryPos( (USHORT) nPos );
+ mpLBSound->SelectEntryPos( (sal_uInt16) nPos );
}
void CustomAnimationEffectTabPage::onSoundPreview()
{
- const USHORT nPos = mpLBSound->GetSelectEntryPos();
+ const sal_uInt16 nPos = mpLBSound->GetSelectEntryPos();
if( nPos >= 2 ) try
{
@@ -1905,7 +1905,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
{
sal_Int16 nStart = 0;
pSet->getPropertyValue( nHandleStart ) >>= nStart;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch( nStart )
{
case EffectNodeType::WITH_PREVIOUS: nPos = 1; break;
@@ -1936,7 +1936,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
else
{
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fDuration == 5.0 )
nPos = 0;
@@ -1965,7 +1965,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
if( aRepeatCount.hasValue() )
aRepeatCount >>= fRepeat;
- USHORT nPos = LISTBOX_ENTRY_NOTFOUND;
+ sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
if( fRepeat == 0 )
nPos = 0;
@@ -2000,7 +2000,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
sal_Int16 nFill = 0;
if( pSet->getPropertyValue( nHandleRewind ) >>= nFill )
{
- mpCBXRewind->Check( (nFill == AnimationFill::REMOVE) ? TRUE : FALSE );
+ mpCBXRewind->Check( (nFill == AnimationFill::REMOVE) ? sal_True : sal_False );
}
else
{
@@ -2042,7 +2042,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
}
String aDescription( getShapeDescription( xShape, true ) );
- USHORT nPos = mpLBTrigger->InsertEntry( aDescription );
+ sal_uInt16 nPos = mpLBTrigger->InsertEntry( aDescription );
mpLBTrigger->SetEntryData( nPos, (void*)(sal_IntPtr)nShape );
if( xShape == xTrigger )
@@ -2059,8 +2059,8 @@ IMPL_LINK( CustomAnimationDurationTabPage, implControlHdl, Control*, pControl )
{
if( pControl == mpLBTrigger.get() )
{
- mpRBClickSequence->Check( FALSE );
- mpRBInteractive->Check( TRUE );
+ mpRBClickSequence->Check( sal_False );
+ mpRBInteractive->Check( sal_True );
}
return 0;
@@ -2068,7 +2068,7 @@ IMPL_LINK( CustomAnimationDurationTabPage, implControlHdl, Control*, pControl )
void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
{
- USHORT nPos = mpLBStart->GetSelectEntryPos();
+ sal_uInt16 nPos = mpLBStart->GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Int16 nStart;
@@ -2268,7 +2268,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
{
sal_Int32 nTextGrouping = 0;
if( pSet->getPropertyValue( nHandleTextGrouping ) >>= nTextGrouping )
- maLBGroupText.SelectEntryPos( (USHORT)(nTextGrouping + 1) );
+ maLBGroupText.SelectEntryPos( (sal_uInt16)(nTextGrouping + 1) );
}
if( pSet->getPropertyState( nHandleHasVisibleShape ) != STLPropertyState_AMBIGUOUS )
@@ -2300,7 +2300,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
}
else
{
- maCBXAnimateForm.Enable( FALSE );
+ maCBXAnimateForm.Enable( sal_False );
}
maCBXReverse.SetState( STATE_DONTKNOW );
@@ -2322,7 +2322,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
sal_Int32 nPos = 6;
while( (nPos > 2) && (nPos > nMaxParaDepth) )
{
- maLBGroupText.RemoveEntry( (USHORT)nPos );
+ maLBGroupText.RemoveEntry( (sal_uInt16)nPos );
nPos--;
}
}
@@ -2332,7 +2332,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
{
- USHORT nPos = maLBGroupText.GetSelectEntryPos();
+ sal_uInt16 nPos = maLBGroupText.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
sal_Int32 nTextGrouping = nPos - 1;
@@ -2381,7 +2381,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
void CustomAnimationTextAnimTabPage::updateControlStates()
{
- USHORT nPos = maLBGroupText.GetSelectEntryPos();
+ sal_uInt16 nPos = maLBGroupText.GetSelectEntryPos();
maCBXGroupAuto.Enable( nPos > 1 );
maMFGroupAuto.Enable( nPos > 1 );
@@ -2389,12 +2389,12 @@ void CustomAnimationTextAnimTabPage::updateControlStates()
if( !mbHasVisibleShapes && nPos > 0 )
{
- maCBXAnimateForm.Check(FALSE);
- maCBXAnimateForm.Enable(FALSE);
+ maCBXAnimateForm.Check(sal_False);
+ maCBXAnimateForm.Enable(sal_False);
}
else
{
- maCBXAnimateForm.Enable(TRUE);
+ maCBXAnimateForm.Enable(sal_True);
}
}
@@ -2406,7 +2406,7 @@ IMPL_LINK( CustomAnimationTextAnimTabPage, implSelectHdl, Control*, EMPTYARG )
// --------------------------------------------------------------------
-CustomAnimationDialog::CustomAnimationDialog( Window* pParent, STLPropertySet* pSet, USHORT nPage /* = 0 */ )
+CustomAnimationDialog::CustomAnimationDialog( Window* pParent, STLPropertySet* pSet, sal_uInt16 nPage /* = 0 */ )
: TabDialog( pParent, SdResId( DLG_CUSTOMANIMATION ) ), mpSet( pSet ), mpResultSet( 0 )
{
mpTabControl = new TabControl( this, SdResId( 1 ) );
diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx
index 0bbf9fc9cd10..8e5de14a9e2d 100644..100755
--- a/sd/source/ui/animations/CustomAnimationDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.hxx
@@ -159,7 +159,7 @@ class STLPropertySet;
class CustomAnimationDialog : public TabDialog
{
public:
- CustomAnimationDialog( Window* pParent, STLPropertySet* pSet, USHORT nPage = 0 );
+ CustomAnimationDialog( Window* pParent, STLPropertySet* pSet, sal_uInt16 nPage = 0 );
~CustomAnimationDialog();
STLPropertySet* getDefaultSet() { return mpSet; }
diff --git a/sd/source/ui/animations/CustomAnimationDialog.src b/sd/source/ui/animations/CustomAnimationDialog.src
index 8232638678e1..270fef75db50 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.src
+++ b/sd/source/ui/animations/CustomAnimationDialog.src
@@ -96,6 +96,7 @@ TabDialog DLG_CUSTOMANIMATION
TabPage RID_TP_CUSTOMANIMATION_EFFECT
{
+ HelpID = "sd:TabPage:RID_TP_CUSTOMANIMATION_EFFECT";
Hide = TRUE;
Size = MAP_APPFONT ( WIDTH , 159 );
Text [ en-US ] = "Effect";
@@ -120,6 +121,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
ListBox LB_PROPERTY_1
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_EFFECT:LB_PROPERTY_1";
Pos = MAP_APPFONT ( X2+6 , 14 ) ;
Size = MAP_APPFONT ( W2, 100 );
Hide = TRUE;
@@ -139,6 +141,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
ListBox LB_PROPERTY_2
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_EFFECT:LB_PROPERTY_2";
Pos = MAP_APPFONT ( X2+6 , 14 ) ;
Size = MAP_APPFONT ( W2, 100 );
Hide = TRUE;
@@ -149,6 +152,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
CheckBox CB_SMOOTH_START
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_EFFECT:CB_SMOOTH_START";
Pos = MAP_APPFONT( X1+6, 14 );
Size = MAP_APPFONT ( (W0 / 2) , 10 ) ;
Hide = TRUE;
@@ -158,6 +162,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
CheckBox CB_SMOOTH_END
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_EFFECT:CB_SMOOTH_END";
Pos = MAP_APPFONT( X1 + (W0 / 2) + 3, 14 );
Size = MAP_APPFONT ( (W0 / 2) , 10 ) ;
Hide = TRUE;
@@ -167,6 +172,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
CheckBox CB_AUTORESTART
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_EFFECT:CB_AUTORESTART";
Pos = MAP_APPFONT( X1+6, 14 );
Size = MAP_APPFONT ( W0 , 10 ) ;
Hide = TRUE;
@@ -190,6 +196,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
RadioButton RB_FROM_START
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_EFFECT:RB_FROM_START";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 16 ) ;
Size = MAP_APPFONT( W0, 10 );
@@ -201,6 +208,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
RadioButton RB_FROM_LAST
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_EFFECT:RB_FROM_LAST";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 29 ) ;
Size = MAP_APPFONT( W0, 10 );
@@ -212,6 +220,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
RadioButton RB_FROM_TIME
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_EFFECT:RB_FROM_TIME";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 42 ) ;
Size = MAP_APPFONT( W0, 10 );
@@ -223,6 +232,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
MetricField MF_START_TIME
{
+ HelpID = "sd:MetricField:RID_TP_CUSTOMANIMATION_EFFECT:MF_START_TIME";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 55 ) ;
Size = MAP_APPFONT ( W1, 12 );
@@ -253,6 +263,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
RadioButton RB_STOP_ON_CLICK
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_EFFECT:RB_STOP_ON_CLICK";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 81 ) ;
Size = MAP_APPFONT( W0, 10 );
@@ -264,6 +275,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
RadioButton RB_STOP_ON_NEXT_SLIDE
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_EFFECT:RB_STOP_ON_NEXT_SLIDE";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 94 ) ;
Size = MAP_APPFONT( W0, 10 );
@@ -275,6 +287,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
RadioButton RB_STOP_AFTER_N_SLIDES
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_EFFECT:RB_STOP_AFTER_N_SLIDES";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 107 ) ;
Size = MAP_APPFONT( W0, 10 );
@@ -286,6 +299,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
MetricField MF_STOP_AFTER_SLIDES
{
+ HelpID = "sd:MetricField:RID_TP_CUSTOMANIMATION_EFFECT:MF_STOP_AFTER_SLIDES";
OutputSize = TRUE;
Pos = MAP_APPFONT ( X1 , 55 ) ;
Size = MAP_APPFONT ( W1, 12 );
@@ -329,6 +343,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
ListBox LB_SOUND
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_EFFECT:LB_SOUND";
Pos = MAP_APPFONT ( X2 , 3 ) ;
Size = MAP_APPFONT ( W2 - 19, 100 );
TabStop = TRUE ;
@@ -338,6 +353,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
PushButton PB_SOUND_PREVIEW
{
+ HelpID = "sd:PushButton:RID_TP_CUSTOMANIMATION_EFFECT:PB_SOUND_PREVIEW";
Pos = MAP_APPFONT ( X2 + W2 - 16 , 2 ) ;
Size = MAP_APPFONT( 16, 14 );
OutputSize = TRUE;
@@ -355,6 +371,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
ListBox LB_AFTER_EFFECT
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_EFFECT:LB_AFTER_EFFECT";
Pos = MAP_APPFONT ( X2 , 18 ) ;
Size = MAP_APPFONT ( W2, 100 );
TabStop = TRUE ;
@@ -379,6 +396,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
ListBox CLB_DIMCOLOR
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_EFFECT:CLB_DIMCOLOR";
Pos = MAP_APPFONT( X2, 33 );
Size = MAP_APPFONT ( W2, 100 );
TabStop = TRUE ;
@@ -397,6 +415,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
ListBox LB_TEXT_ANIM
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_EFFECT:LB_TEXT_ANIM";
Pos = MAP_APPFONT ( X2 , 48 ) ;
Size = MAP_APPFONT ( W2, 100 );
TabStop = TRUE ;
@@ -422,6 +441,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
MetricField MF_TEXT_DELAY
{
+ HelpID = "sd:MetricField:RID_TP_CUSTOMANIMATION_EFFECT:MF_TEXT_DELAY";
Pos = MAP_APPFONT ( X2, 64 ) ;
Size = MAP_APPFONT ( 42, 12 );
TabStop = TRUE ;
@@ -440,6 +460,7 @@ TabPage RID_TP_CUSTOMANIMATION_EFFECT
TabPage RID_TP_CUSTOMANIMATION_DURATION
{
+ HelpID = "sd:TabPage:RID_TP_CUSTOMANIMATION_DURATION";
Hide = TRUE;
Size = MAP_APPFONT ( WIDTH , 159 );
Text [ en-US ] = "Timing";
@@ -455,6 +476,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
ListBox LB_START
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_DURATION:LB_START";
Pos = MAP_APPFONT ( X2 , 3 ) ;
Size = MAP_APPFONT ( W2, 48 );
TabStop = TRUE ;
@@ -480,6 +502,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
MetricField MF_START_DELAY
{
+ HelpID = "sd:MetricField:RID_TP_CUSTOMANIMATION_DURATION:MF_START_DELAY";
Pos = MAP_APPFONT ( X2 , 18 ) ;
Size = MAP_APPFONT ( W2, 12 );
Border = TRUE ;
@@ -506,6 +529,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
ComboBox CB_DURATION
{
+ HelpID = "sd:ComboBox:RID_TP_CUSTOMANIMATION_DURATION:CB_DURATION";
Pos = MAP_APPFONT ( X2 , 33 ) ;
Size = MAP_APPFONT ( W2, 48 );
TabStop = TRUE ;
@@ -524,6 +548,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
ComboBox CB_REPEAT
{
+ HelpID = "sd:ComboBox:RID_TP_CUSTOMANIMATION_DURATION:CB_REPEAT";
Pos = MAP_APPFONT ( X2 , 48 ) ;
Size = MAP_APPFONT ( W2, 48 );
TabStop = TRUE ;
@@ -533,6 +558,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
CheckBox CBX_REWIND
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_DURATION:CBX_REWIND";
Pos = MAP_APPFONT ( X0 , 66 ) ;
Size = MAP_APPFONT ( W0 , 10 ) ;
TabStop = TRUE ;
@@ -550,6 +576,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
RadioButton RB_CLICKSEQUENCE
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_DURATION:RB_CLICKSEQUENCE";
Pos = MAP_APPFONT ( X1+6, 92 ) ;
Size = MAP_APPFONT ( W0 , 10 ) ;
Text [ en-US ] = "Animate as part of click sequence" ;
@@ -558,6 +585,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
RadioButton RB_INTERACTIVE
{
+ HelpID = "sd:RadioButton:RID_TP_CUSTOMANIMATION_DURATION:RB_INTERACTIVE";
Pos = MAP_APPFONT ( X1+6, 105 ) ;
Size = MAP_APPFONT ( W0 , 10 ) ;
Text [ en-US ] = "Start effect on click of" ;
@@ -566,6 +594,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
ListBox LB_TRIGGER
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_DURATION:LB_TRIGGER";
Pos = MAP_APPFONT ( X1+18 , 118 );
Size = MAP_APPFONT ( W2, 80 );
TabStop = TRUE ;
@@ -576,6 +605,7 @@ TabPage RID_TP_CUSTOMANIMATION_DURATION
TabPage RID_TP_CUSTOMANIMATION_TEXT
{
+ HelpID = "sd:TabPage:RID_TP_CUSTOMANIMATION_TEXT";
Hide = TRUE;
Size = MAP_APPFONT ( WIDTH , 159 );
Text [ en-US ] = "Text Animation";
@@ -591,6 +621,7 @@ TabPage RID_TP_CUSTOMANIMATION_TEXT
ListBox LB_GROUP_TEXT
{
+ HelpID = "sd:ListBox:RID_TP_CUSTOMANIMATION_TEXT:LB_GROUP_TEXT";
Pos = MAP_APPFONT ( X2 , 3 ) ;
Size = MAP_APPFONT ( W2, 48 );
TabStop = TRUE ;
@@ -609,8 +640,9 @@ TabPage RID_TP_CUSTOMANIMATION_TEXT
};
};
- Checkbox CBX_GROUP_AUTO
+ CheckBox CBX_GROUP_AUTO
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_TEXT:CBX_GROUP_AUTO";
Pos = MAP_APPFONT ( X0 , 20 ) ;
Size = MAP_APPFONT ( W0 , 10 ) ;
TabStop = TRUE ;
@@ -620,6 +652,7 @@ TabPage RID_TP_CUSTOMANIMATION_TEXT
MetricField MF_GROUP_AUTO
{
+ HelpID = "sd:MetricField:RID_TP_CUSTOMANIMATION_TEXT:MF_GROUP_AUTO";
Pos = MAP_APPFONT ( X2 , 18 ) ;
Size = MAP_APPFONT ( W2, 12 );
Border = TRUE ;
@@ -635,16 +668,18 @@ TabPage RID_TP_CUSTOMANIMATION_TEXT
SpinSize = 5 ;
};
- Checkbox CBX_ANIMATE_FORM
+ CheckBox CBX_ANIMATE_FORM
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_TEXT:CBX_ANIMATE_FORM";
Pos = MAP_APPFONT ( X0 , 33 ) ;
Size = MAP_APPFONT ( W0 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Animate attached shape" ;
};
- Checkbox CBX_REVERSE
+ CheckBox CBX_REVERSE
{
+ HelpID = "sd:CheckBox:RID_TP_CUSTOMANIMATION_TEXT:CBX_REVERSE";
Pos = MAP_APPFONT ( X0 , 46 ) ;
Size = MAP_APPFONT ( W0 , 10 ) ;
TabStop = TRUE ;
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 80607b4da7bd..65bc9f10fe74 100644..100755
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -211,10 +211,10 @@ static OUString getDescription( const Any& rTarget, bool bWithText = true )
class CustomAnimationListEntryItem : public SvLBoxString
{
public:
- CustomAnimationListEntryItem( SvLBoxEntry*,USHORT nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent );
+ CustomAnimationListEntryItem( SvLBoxEntry*,sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent );
virtual ~CustomAnimationListEntryItem();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
@@ -226,7 +226,7 @@ private:
// --------------------------------------------------------------------
-CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvLBoxEntry* pEntry, USHORT nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent )
+CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvLBoxEntry* pEntry, sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent )
: SvLBoxString( pEntry, nFlags, aDescription )
, mpParent( pParent )
, maDescription( aDescription )
@@ -255,7 +255,7 @@ void CustomAnimationListEntryItem::InitViewData( SvLBox* pView, SvLBoxEntry* pEn
// --------------------------------------------------------------------
-void CustomAnimationListEntryItem::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* pEntry )
+void CustomAnimationListEntryItem::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry )
{
SvViewDataItem* pViewData = mpParent->GetViewDataItem( pEntry, this );
@@ -275,7 +275,7 @@ void CustomAnimationListEntryItem::Paint( const Point& rPos, SvLBox& rDev, USHOR
aPos.X() += 19;
- USHORT nImage;
+ sal_uInt16 nImage;
switch( mpEffect->getPresetClass() )
{
case EffectPresetClass::ENTRANCE: nImage = IMG_CUSTOMANIMATION_ENTRANCE_EFFECT; break;
@@ -361,11 +361,11 @@ CustomAnimationListEntry::~CustomAnimationListEntry()
class CustomAnimationTriggerEntryItem : public SvLBoxString
{
public:
- CustomAnimationTriggerEntryItem( SvLBoxEntry*,USHORT nFlags, OUString aDescription, CustomAnimationList* pParent );
+ CustomAnimationTriggerEntryItem( SvLBoxEntry*,sal_uInt16 nFlags, OUString aDescription, CustomAnimationList* pParent );
virtual ~CustomAnimationTriggerEntryItem();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
@@ -376,7 +376,7 @@ private:
// --------------------------------------------------------------------
-CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvLBoxEntry* pEntry, USHORT nFlags, OUString aDescription, CustomAnimationList* pParent )
+CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvLBoxEntry* pEntry, sal_uInt16 nFlags, OUString aDescription, CustomAnimationList* pParent )
: SvLBoxString( pEntry, nFlags, aDescription ), mpParent( pParent ), maDescription( aDescription )
{
}
@@ -389,9 +389,9 @@ CustomAnimationTriggerEntryItem::~CustomAnimationTriggerEntryItem()
// --------------------------------------------------------------------
-USHORT CustomAnimationTriggerEntryItem::IsA()
+sal_uInt16 CustomAnimationTriggerEntryItem::IsA()
{
- return (USHORT)-1;
+ return (sal_uInt16)-1;
}
// --------------------------------------------------------------------
@@ -409,7 +409,7 @@ void CustomAnimationTriggerEntryItem::InitViewData( SvLBox* pView, SvLBoxEntry*
// --------------------------------------------------------------------
-void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvLBox& rDev, USHORT, SvLBoxEntry* )
+void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* )
{
Size aSize( rDev.GetOutputSizePixel().Width(), static_cast< SvTreeListBox* >(&rDev)->GetEntryHeight() );
@@ -467,7 +467,7 @@ CustomAnimationList::CustomAnimationList( ::Window* pParent, const ResId& rResId
, mpController( pController )
, mpLastParentEntry(0)
{
- SetWindowBits( WinBits( WB_TABSTOP | WB_BORDER | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT ) );
+ SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT );
EnableContextMenuHandling();
SetSelectionMode( MULTIPLE_SELECTION );
@@ -477,7 +477,7 @@ CustomAnimationList::CustomAnimationList( ::Window* pParent, const ResId& rResId
// --------------------------------------------------------------------
-const Image& CustomAnimationList::getImage( USHORT nId )
+const Image& CustomAnimationList::getImage( sal_uInt16 nId )
{
DBG_ASSERT( (nId >= IMG_CUSTOMANIMATION_ON_CLICK) && (nId <= IMG_CUSTOMANIMATION_MEDIA_STOP), "sd::CustomAnimationList::getImage(), illegal index!" );
@@ -756,7 +756,7 @@ void CustomAnimationList::onSelectionChanged( Any aSelection )
{
try
{
- SelectAll(FALSE);
+ SelectAll(sal_False);
if( aSelection.hasValue() )
{
@@ -854,7 +854,7 @@ EffectSequence CustomAnimationList::getSelection() const
// --------------------------------------------------------------------
-BOOL CustomAnimationList::DoubleClickHdl()
+sal_Bool CustomAnimationList::DoubleClickHdl()
{
mpController->onDoubleClick();
return false;
@@ -904,7 +904,7 @@ PopupMenu* CustomAnimationList::CreateContextMenu()
// --------------------------------------------------------------------
-void CustomAnimationList::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void CustomAnimationList::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
mpController->onContextMenu( nSelectedPopupEntry );
}
diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx
index 3d111c3cbc7a..914e29e685d7 100644..100755
--- a/sd/source/ui/animations/CustomAnimationList.hxx
+++ b/sd/source/ui/animations/CustomAnimationList.hxx
@@ -45,7 +45,7 @@ class ICustomAnimationListController
public:
virtual void onSelect() = 0;
virtual void onDoubleClick() = 0;
- virtual void onContextMenu( USHORT nSelectedPopupEntry ) = 0;
+ virtual void onContextMenu( sal_uInt16 nSelectedPopupEntry ) = 0;
virtual ~ICustomAnimationListController() {}
};
@@ -76,12 +76,12 @@ public:
// overrides
virtual void SelectHdl();
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual void Paint( const Rectangle& rRect );
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
virtual void KeyInput( const KeyEvent& rKEvt );
@@ -89,7 +89,7 @@ public:
virtual void notify_change();
- const Image& getImage( USHORT nId );
+ const Image& getImage( sal_uInt16 nId );
bool isExpanded( const CustomAnimationEffectPtr& pEffect ) const;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index edec385e221e..1a4142e12bfa 100644..100755
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -290,7 +290,7 @@ CustomAnimationPane::~CustomAnimationPane()
void CustomAnimationPane::addUndo()
{
- SfxUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
if( pManager )
{
SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
@@ -730,15 +730,15 @@ void CustomAnimationPane::updateControls()
if( !mxView.is() )
{
- mpPBAddEffect->Enable( FALSE );
- mpPBChangeEffect->Enable( FALSE );
- mpPBRemoveEffect->Enable( FALSE );
- mpFLEffect->Enable( FALSE );
- mpFTStart->Enable( FALSE );
- mpLBStart->Enable( FALSE );
- mpPBPropertyMore->Enable( FALSE );
- mpLBProperty->Enable( FALSE );
- mpFTProperty->Enable( FALSE );
+ mpPBAddEffect->Enable( sal_False );
+ mpPBChangeEffect->Enable( sal_False );
+ mpPBRemoveEffect->Enable( sal_False );
+ mpFLEffect->Enable( sal_False );
+ mpFTStart->Enable( sal_False );
+ mpLBStart->Enable( sal_False );
+ mpPBPropertyMore->Enable( sal_False );
+ mpLBProperty->Enable( sal_False );
+ mpFTProperty->Enable( sal_False );
mpCustomAnimationList->clear();
return;
}
@@ -817,12 +817,12 @@ void CustomAnimationPane::updateControls()
else
{
mpLBProperty->setSubControl( 0 );
- mpFTProperty->Enable( FALSE );
- mpLBProperty->Enable( FALSE );
- mpPBPropertyMore->Enable( FALSE );
+ mpFTProperty->Enable( sal_False );
+ mpLBProperty->Enable( sal_False );
+ mpPBPropertyMore->Enable( sal_False );
}
- USHORT nPos = 0xffff;
+ sal_uInt16 nPos = 0xffff;
sal_Int16 nNodeType = pEffect->getNodeType();
switch( nNodeType )
@@ -858,19 +858,19 @@ void CustomAnimationPane::updateControls()
mpCBSpeed->SelectEntryPos( nPos );
}
- mpPBPropertyMore->Enable( TRUE );
+ mpPBPropertyMore->Enable( sal_True );
- mpFTChangeOrder->Enable( TRUE );
+ mpFTChangeOrder->Enable( sal_True );
}
else
{
mpLBProperty->setSubControl( 0 );
- mpFTProperty->Enable( FALSE );
- mpLBProperty->Enable( FALSE );
- mpPBPropertyMore->Enable( FALSE );
- mpFTSpeed->Enable(FALSE);
- mpCBSpeed->Enable(FALSE);
- mpFTChangeOrder->Enable( FALSE );
+ mpFTProperty->Enable( sal_False );
+ mpLBProperty->Enable( sal_False );
+ mpPBPropertyMore->Enable( sal_False );
+ mpFTSpeed->Enable(sal_False);
+ mpCBSpeed->Enable(sal_False);
+ mpFTChangeOrder->Enable( sal_False );
mpLBStart->SetNoSelection();
mpCBSpeed->SetNoSelection();
mpFLEffect->SetText( maStrModify );
@@ -1057,7 +1057,7 @@ void CustomAnimationPane::onDoubleClick()
showOptions();
}
-void CustomAnimationPane::onContextMenu( USHORT nSelectedPopupEntry )
+void CustomAnimationPane::onContextMenu( sal_uInt16 nSelectedPopupEntry )
{
switch( nSelectedPopupEntry )
{
@@ -1741,7 +1741,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
}
}
-void CustomAnimationPane::showOptions( USHORT nPage /* = 0 */ )
+void CustomAnimationPane::showOptions( sal_uInt16 nPage /* = 0 */ )
{
STLPropertySet* pSet = createSelectionSet();
@@ -1937,7 +1937,7 @@ void CustomAnimationPane::onChange( bool bCreate )
{
if( bCreate )
{
- mpCustomAnimationList->SelectAll( FALSE );
+ mpCustomAnimationList->SelectAll( sal_False );
// gather shapes from the selection
std::vector< Any >::iterator aIter( aTargets.begin() );
@@ -1947,6 +1947,16 @@ void CustomAnimationPane::onChange( bool bCreate )
{
CustomAnimationEffectPtr pCreated = mpMainSequence->append( pDescriptor, (*aIter), fDuration );
+ // if only one shape with text and no fill or outline is selected, animate only by first level paragraphs
+ if( bHasText && (aTargets.size() == 1) )
+ {
+ Reference< XShape > xShape( (*aIter), UNO_QUERY );
+ if( xShape.is() && !hasVisibleShape( xShape ) )
+ {
+ mpMainSequence->createTextGroup( pCreated, 1, -1.0, sal_False, sal_False );
+ }
+ }
+
if( bFirst )
bFirst = false;
else
@@ -1996,7 +2006,7 @@ void CustomAnimationPane::onChange( bool bCreate )
void CustomAnimationPane::createPath( PathKind eKind, std::vector< Any >& rTargets, double fDuration)
{
- USHORT nSID = 0;
+ sal_uInt16 nSID = 0;
switch( eKind )
{
@@ -2065,7 +2075,7 @@ void CustomAnimationPane::onChangeStart()
if( mpLBStart->GetSelectEntryCount() == 1 )
{
sal_Int16 nNodeType;
- USHORT nPos= mpLBStart->GetSelectEntryPos();
+ sal_uInt16 nPos= mpLBStart->GetSelectEntryPos();
switch( nPos )
{
case 0: nNodeType = EffectNodeType::ON_CLICK; break;
@@ -2151,7 +2161,7 @@ void CustomAnimationPane::onChangeSpeed()
double fDuration;
- USHORT nPos= mpCBSpeed->GetSelectEntryPos();
+ sal_uInt16 nPos= mpCBSpeed->GetSelectEntryPos();
switch( nPos )
{
@@ -2429,7 +2439,7 @@ void CustomAnimationPane::markShapesFromSelectedEffects()
Reference< XShape > xShape( pEffect->getTargetShape() );
SdrObject* pObj = GetSdrObjectFromXShape( xShape );
if( pObj )
- pView->MarkObj(pObj, pView->GetSdrPageView(), FALSE, FALSE);
+ pView->MarkObj(pObj, pView->GetSdrPageView(), sal_False, sal_False);
}
}
}
@@ -2445,7 +2455,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
CustomAnimationEffectPtr pEffect = xTag->getEffect();
if( (pPathObj != 0) && pEffect.get() != 0 )
{
- SfxUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
+ ::svl::IUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
if( pManager )
{
SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx
index a21797767b31..b3166080560c 100644..100755
--- a/sd/source/ui/animations/CustomAnimationPane.hxx
+++ b/sd/source/ui/animations/CustomAnimationPane.hxx
@@ -96,7 +96,7 @@ public:
// ICustomAnimationListController
virtual void onSelect();
virtual void onDoubleClick();
- virtual void onContextMenu( USHORT nSelectedPopupEntry );
+ virtual void onContextMenu( sal_uInt16 nSelectedPopupEntry );
void addUndo();
@@ -110,7 +110,7 @@ private:
void updateMotionPathTags();
void markShapesFromSelectedEffects();
- void showOptions( USHORT nPage = 0 );
+ void showOptions( sal_uInt16 nPage = 0 );
void moveSelection( bool bUp );
void onPreview( bool bForcePreview );
diff --git a/sd/source/ui/animations/DialogListBox.cxx b/sd/source/ui/animations/DialogListBox.cxx
index 204d2067d7a4..fb239afeeb7a 100644..100755
--- a/sd/source/ui/animations/DialogListBox.cxx
+++ b/sd/source/ui/animations/DialogListBox.cxx
@@ -280,7 +280,7 @@ void DialogListBox::StateChanged( StateChangedType nType )
}
else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) )
{
- BOOL bUpdate = IsUpdateMode();
+ sal_Bool bUpdate = IsUpdateMode();
mpChild->SetUpdateMode( bUpdate );
if ( bUpdate && IsReallyVisible() )
ImplCheckScrollBars();
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index a5f460b21014..1f4c9197375e 100644..100755
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -132,9 +132,9 @@ struct TransitionEffect
mfDuration = 2.0;
mnTime = 0;
mePresChange = PRESCHANGE_MANUAL;
- mbSoundOn = FALSE;
- mbLoopSound = FALSE;
- mbStopSound = FALSE;
+ mbSoundOn = sal_False;
+ mbLoopSound = sal_False;
+ mbStopSound = sal_False;
mbEffectAmbiguous = false;
mbDurationAmbiguous = false;
@@ -183,12 +183,12 @@ struct TransitionEffect
{
if( mbStopSound )
{
- rOutPage.SetStopSound( TRUE );
- rOutPage.SetSound( FALSE );
+ rOutPage.SetStopSound( sal_True );
+ rOutPage.SetSound( sal_False );
}
else
{
- rOutPage.SetStopSound( FALSE );
+ rOutPage.SetStopSound( sal_False );
rOutPage.SetSound( mbSoundOn );
rOutPage.SetSoundFile( maSound );
}
@@ -222,9 +222,9 @@ struct TransitionEffect
// other settings
double mfDuration;
- ULONG mnTime;
+ sal_uLong mnTime;
PresChange mePresChange;
- BOOL mbSoundOn;
+ sal_Bool mbSoundOn;
String maSound;
bool mbLoopSound;
bool mbStopSound;
@@ -264,9 +264,9 @@ void lcl_CreateUndoForPages(
const ::sd::slidesorter::SharedPageSelection& rpPages,
::sd::ViewShellBase& rBase )
{
- ::sd::DrawDocShell* pDocSh = rBase.GetDocShell();
- SfxUndoManager* pManager = pDocSh->GetUndoManager();
- SdDrawDocument* pDoc = pDocSh->GetDoc();
+ ::sd::DrawDocShell* pDocSh = rBase.GetDocShell();
+ ::svl::IUndoManager* pManager = pDocSh->GetUndoManager();
+ SdDrawDocument* pDoc = pDocSh->GetDoc();
if( pManager && pDocSh && pDoc )
{
String aComment( SdResId(STR_UNDO_SLIDE_PARAMS) );
@@ -345,7 +345,7 @@ struct lcl_EqualsSoundFileName : public ::std::unary_function< String, bool >
{
// note: formerly this was a case insensitive search for all
// platforms. It seems more sensible to do this platform-dependent
-#if defined( WIN ) || defined( WNT )
+#if defined( WNT )
return maStr.EqualsIgnoreCaseAscii( rStr );
#else
return maStr.Equals( rStr );
@@ -836,7 +836,7 @@ void SlideTransitionPane::updateControls()
if( lcl_findSoundInList( maSoundList, aEffect.maSound, nPos ))
{
// skip first three entries
- maLB_SOUND.SelectEntryPos( (USHORT)nPos + 3 );
+ maLB_SOUND.SelectEntryPos( (sal_uInt16)nPos + 3 );
maCurrentSoundFile = aEffect.maSound;
}
}
@@ -857,8 +857,8 @@ void SlideTransitionPane::updateControls()
if( aEffect.mbPresChangeAmbiguous )
{
- maRB_ADVANCE_ON_MOUSE.Check( FALSE );
- maRB_ADVANCE_AUTO.Check( FALSE );
+ maRB_ADVANCE_ON_MOUSE.Check( sal_False );
+ maRB_ADVANCE_AUTO.Check( sal_False );
}
else
{
@@ -960,7 +960,7 @@ void SlideTransitionPane::openSoundFileDialog()
String aStr( sal_Unicode( '%' ));
aStrWarning.SearchAndReplace( aStr , aFile );
WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning );
- aWarningBox.SetModalInputMode (TRUE);
+ aWarningBox.SetModalInputMode (sal_True);
bQuitLoop = (aWarningBox.Execute() != RET_RETRY);
bValidSoundFile = false;
@@ -969,7 +969,7 @@ void SlideTransitionPane::openSoundFileDialog()
if( bValidSoundFile )
// skip first three entries in list
- maLB_SOUND.SelectEntryPos( (USHORT)nPos + 3 );
+ maLB_SOUND.SelectEntryPos( (sal_uInt16)nPos + 3 );
}
if( ! bValidSoundFile )
@@ -978,7 +978,7 @@ void SlideTransitionPane::openSoundFileDialog()
{
tSoundListType::size_type nPos = 0;
if( lcl_findSoundInList( maSoundList, maCurrentSoundFile, nPos ))
- maLB_SOUND.SelectEntryPos( (USHORT)nPos + 3 );
+ maLB_SOUND.SelectEntryPos( (sal_uInt16)nPos + 3 );
else
maLB_SOUND.SelectEntryPos( 0 ); // NONE
}
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 8bd045b8bc90..3ad395ed8615 100644..100755
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -136,7 +136,7 @@ bool PathDragMove::BeginSdrDrag()
}
}
Show();
- return TRUE;
+ return sal_True;
}
bool PathDragMove::EndSdrDrag(bool /*bCopy*/)
@@ -144,7 +144,7 @@ bool PathDragMove::EndSdrDrag(bool /*bCopy*/)
Hide();
if( mxTag.is() )
mxTag->MovePath( DragStat().GetDX(), DragStat().GetDY() );
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------
@@ -204,7 +204,7 @@ bool PathDragResize::EndSdrDrag(bool /*bCopy*/)
pPathObj->SetPathPoly( aDragPoly );
}
}
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------
@@ -267,7 +267,7 @@ public:
SdPathHdl( const SmartTagReference& xTag, SdrPathObj* mpPathObj );
virtual ~SdPathHdl();
virtual void CreateB2dIAObject();
- virtual BOOL IsFocusHdl() const;
+ virtual sal_Bool IsFocusHdl() const;
virtual Pointer GetSdrDragPointer() const;
virtual bool isMarkable() const;
@@ -332,9 +332,9 @@ void SdPathHdl::CreateB2dIAObject()
// --------------------------------------------------------------------
-BOOL SdPathHdl::IsFocusHdl() const
+sal_Bool SdPathHdl::IsFocusHdl() const
{
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------------------------
@@ -402,7 +402,7 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con
aStartArrow.setClosed(true);
mpPathObj->SetMergedItem(XLineStartItem(aEmpty,::basegfx::B2DPolyPolygon(aStartArrow)));
mpPathObj->SetMergedItem(XLineStartWidthItem(400));
- mpPathObj->SetMergedItem(XLineStartCenterItem(TRUE));
+ mpPathObj->SetMergedItem(XLineStartCenterItem(sal_True));
updatePathAttributes();
@@ -450,7 +450,7 @@ void MotionPathTag::updatePathAttributes()
aEndArrow.setClosed(true);
mpPathObj->SetMergedItem(XLineEndItem(aEmpty,::basegfx::B2DPolyPolygon(aEndArrow)));
mpPathObj->SetMergedItem(XLineEndWidthItem(400));
- mpPathObj->SetMergedItem(XLineEndCenterItem(TRUE));
+ mpPathObj->SetMergedItem(XLineEndCenterItem(sal_True));
}
else
{
@@ -585,7 +585,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
if( pHdl && !rMEvt.IsRight() )
{
mrView.BrkAction();
- const USHORT nDrgLog = (USHORT)pOut->PixelToLogic(Size(DRGPIX,0)).Width();
+ const sal_uInt16 nDrgLog = (sal_uInt16)pOut->PixelToLogic(Size(DRGPIX,0)).Width();
rtl::Reference< MotionPathTag > xTag( this );
SdrDragMethod* pDragMethod;
@@ -626,7 +626,7 @@ bool MotionPathTag::KeyInput( const KeyEvent& rKEvt )
if( !mpPathObj )
return false;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_DELETE:
@@ -800,13 +800,13 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt )
if(mrView.IsDragObj())
{
bool bWasNoSnap = mrView.GetDragStat().IsNoSnap();
- BOOL bWasSnapEnabled = mrView.IsSnapEnabled();
+ sal_Bool bWasSnapEnabled = mrView.IsSnapEnabled();
// switch snapping off
if(!bWasNoSnap)
- ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(TRUE);
+ ((SdrDragStat&)mrView.GetDragStat()).SetNoSnap(sal_True);
if(bWasSnapEnabled)
- mrView.SetSnapEnabled(FALSE);
+ mrView.SetSnapEnabled(sal_False);
mrView.MovAction(aEndPoint);
mrView.EndDragObj();
@@ -830,7 +830,7 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt )
// --------------------------------------------------------------------
-ULONG MotionPathTag::GetMarkablePointCount() const
+sal_uLong MotionPathTag::GetMarkablePointCount() const
{
if( mpPathObj && isSelected() )
{
@@ -844,7 +844,7 @@ ULONG MotionPathTag::GetMarkablePointCount() const
// --------------------------------------------------------------------
-ULONG MotionPathTag::GetMarkedPointCount() const
+sal_uLong MotionPathTag::GetMarkedPointCount() const
{
if( mpMark )
{
@@ -859,9 +859,9 @@ ULONG MotionPathTag::GetMarkedPointCount() const
// --------------------------------------------------------------------
-BOOL MotionPathTag::MarkPoint(SdrHdl& rHdl, BOOL bUnmark )
+sal_Bool MotionPathTag::MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark )
{
- BOOL bRet=FALSE;
+ sal_Bool bRet=sal_False;
if( mpPathObj && mrView.IsPointMarkable( rHdl ) && (rHdl.GetKind() != HDL_SMARTTAG) )
{
SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( &rHdl );
@@ -873,7 +873,7 @@ BOOL MotionPathTag::MarkPoint(SdrHdl& rHdl, BOOL bUnmark )
{
pPts->ForceSort();
mrView.MarkListHasChanged();
- bRet=TRUE;
+ bRet=sal_True;
}
}
}
@@ -882,16 +882,16 @@ BOOL MotionPathTag::MarkPoint(SdrHdl& rHdl, BOOL bUnmark )
// --------------------------------------------------------------------
-BOOL MotionPathTag::MarkPoints(const Rectangle* pRect, BOOL bUnmark )
+sal_Bool MotionPathTag::MarkPoints(const Rectangle* pRect, sal_Bool bUnmark )
{
- BOOL bChgd=FALSE;
+ sal_Bool bChgd=sal_False;
if( mpPathObj && isSelected() )
{
sal_Int32 nHdlNum = mrView.GetHdlList().GetHdlCount() - 1;
while( nHdlNum > 0 )
{
- SmartHdl* pHdl = dynamic_cast< SmartHdl* >( mrView.GetHdl( sal::static_int_cast< ULONG >( nHdlNum-- ) ) );
+ SmartHdl* pHdl = dynamic_cast< SmartHdl* >( mrView.GetHdl( sal::static_int_cast< sal_uLong >( nHdlNum-- ) ) );
if( pHdl && (pHdl->getTag().get() == this) && mrView.IsPointMarkable(*pHdl) && pHdl->IsSelected()==bUnmark)
{
@@ -899,7 +899,7 @@ BOOL MotionPathTag::MarkPoints(const Rectangle* pRect, BOOL bUnmark )
if( pRect==NULL || pRect->IsInside(aPos))
{
if( mrView.MarkPointHelper(pHdl,mpMark,bUnmark) )
- bChgd=TRUE;
+ bChgd=sal_True;
}
}
}
@@ -982,7 +982,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
if( isSelected() )
{
- mrView.GetSdrPageView()->SetHasMarkedObj(TRUE);
+ mrView.GetSdrPageView()->SetHasMarkedObj(sal_True);
if( !mrView.IsFrameDragSingles() )
{
@@ -1005,7 +1005,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
rHandlerList.AddHdl( pSmartHdl );
- const bool bSelected= pMrkPnts && pMrkPnts->Exist(sal::static_int_cast< USHORT >(nHandle));
+ const bool bSelected= pMrkPnts && pMrkPnts->Exist(sal::static_int_cast< sal_uInt16 >(nHandle));
pSmartHdl->SetSelected(bSelected);
if( mrView.IsPlusHandlesAlwaysVisible() || bSelected )
@@ -1018,7 +1018,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
{
pPlusHdl->SetObj(mpPathObj);
pPlusHdl->SetPageView(mrView.GetSdrPageView());
- pPlusHdl->SetPlusHdl(TRUE);
+ pPlusHdl->SetPlusHdl(sal_True);
rHandlerList.AddHdl(pPlusHdl);
}
}
@@ -1031,10 +1031,10 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
if(!aRect.IsEmpty())
{
- ULONG nCount = rHandlerList.GetHdlCount();
+ sal_uLong nCount = rHandlerList.GetHdlCount();
- BOOL bWdt0=aRect.Left()==aRect.Right();
- BOOL bHgt0=aRect.Top()==aRect.Bottom();
+ sal_Bool bWdt0=aRect.Left()==aRect.Right();
+ sal_Bool bHgt0=aRect.Top()==aRect.Bottom();
if (bWdt0 && bHgt0)
{
rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft(),HDL_UPLFT));
@@ -1116,7 +1116,7 @@ void MotionPathTag::selectionChanged()
if( mrView.GetViewShell() && mrView.GetViewShell()->GetViewFrame() )
{
SfxBindings& rBindings = mrView.GetViewShell()->GetViewFrame()->GetBindings();
- rBindings.InvalidateAll(TRUE);
+ rBindings.InvalidateAll(sal_True);
}
}
// --------------------------------------------------------------------
@@ -1149,7 +1149,7 @@ void MotionPathTag::DeleteMarkedPoints()
}
}
-BOOL MotionPathTag::IsDeleteMarkedPointsPossible() const
+sal_Bool MotionPathTag::IsDeleteMarkedPointsPossible() const
{
return mpPathObj && isSelected() && (GetMarkedPointCount() != 0);
}
@@ -1165,12 +1165,12 @@ bool MotionPathTag::IsRipUpAtMarkedPointsPossible() const
return false;
}
-BOOL MotionPathTag::IsSetMarkedSegmentsKindPossible() const
+sal_Bool MotionPathTag::IsSetMarkedSegmentsKindPossible() const
{
if( mpPathObj )
return mrView.IsSetMarkedSegmentsKindPossible();
else
- return FALSE;
+ return sal_False;
}
SdrPathSegmentKind MotionPathTag::GetMarkedSegmentsKind() const
@@ -1199,12 +1199,12 @@ void MotionPathTag::SetMarkedSegmentsKind(SdrPathSegmentKind eKind)
}
}
-BOOL MotionPathTag::IsSetMarkedPointsSmoothPossible() const
+sal_Bool MotionPathTag::IsSetMarkedPointsSmoothPossible() const
{
if( mpPathObj )
return mrView.IsSetMarkedPointsSmoothPossible();
else
- return FALSE;
+ return sal_False;
}
SdrPathSmoothKind MotionPathTag::GetMarkedPointsSmooth() const
@@ -1252,7 +1252,7 @@ void MotionPathTag::SetMarkedPointsSmooth(SdrPathSmoothKind eKind)
}
}
-void MotionPathTag::CloseMarkedObjects(BOOL /*bToggle*/, BOOL /*bOpen*/ )
+void MotionPathTag::CloseMarkedObjects(sal_Bool /*bToggle*/, sal_Bool /*bOpen*/ )
{
// not supported for motion path
}
diff --git a/sd/source/ui/animations/motionpathtag.hxx b/sd/source/ui/animations/motionpathtag.hxx
index 9065bfee2147..d176e4d85bf3 100644..100755
--- a/sd/source/ui/animations/motionpathtag.hxx
+++ b/sd/source/ui/animations/motionpathtag.hxx
@@ -65,11 +65,11 @@ public:
virtual bool KeyInput( const KeyEvent& rKEvt );
// callbacks from sdr view
- virtual ULONG GetMarkablePointCount() const;
- virtual ULONG GetMarkedPointCount() const;
- virtual BOOL MarkPoint(SdrHdl& rHdl, BOOL bUnmark=FALSE);
+ virtual sal_uLong GetMarkablePointCount() const;
+ virtual sal_uLong GetMarkedPointCount() const;
+ virtual sal_Bool MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark=sal_False);
virtual void CheckPossibilities();
- virtual BOOL MarkPoints(const Rectangle* pRect, BOOL bUnmark);
+ virtual sal_Bool MarkPoints(const Rectangle* pRect, sal_Bool bUnmark);
const CustomAnimationEffectPtr& getEffect() const { return mpEffect; }
@@ -77,20 +77,20 @@ public:
// IPolyPolygonEditorController
virtual void DeleteMarkedPoints();
- virtual BOOL IsDeleteMarkedPointsPossible() const;
+ virtual sal_Bool IsDeleteMarkedPointsPossible() const;
virtual void RipUpAtMarkedPoints();
virtual bool IsRipUpAtMarkedPointsPossible() const;
- virtual BOOL IsSetMarkedSegmentsKindPossible() const;
+ virtual sal_Bool IsSetMarkedSegmentsKindPossible() const;
virtual SdrPathSegmentKind GetMarkedSegmentsKind() const;
virtual void SetMarkedSegmentsKind(SdrPathSegmentKind eKind);
- virtual BOOL IsSetMarkedPointsSmoothPossible() const;
+ virtual sal_Bool IsSetMarkedPointsSmoothPossible() const;
virtual SdrPathSmoothKind GetMarkedPointsSmooth() const;
virtual void SetMarkedPointsSmooth(SdrPathSmoothKind eKind);
- virtual void CloseMarkedObjects(BOOL bToggle, BOOL bOpen );
+ virtual void CloseMarkedObjects(sal_Bool bToggle, sal_Bool bOpen );
virtual bool IsOpenCloseMarkedObjectsPossible() const;
virtual SdrObjClosedKind GetMarkedObjectsClosedState() const;
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 3aadb8a5ed37..52439cb09282 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -198,7 +198,7 @@ AnnotationManagerImpl::AnnotationManagerImpl( ViewShellBase& rViewShellBase )
{
SdOptions* pOptions = SD_MOD()->GetSdOptions(mpDoc->GetDocumentType());
if( pOptions )
- mbShowAnnotations = pOptions->IsShowComments() == TRUE;
+ mbShowAnnotations = pOptions->IsShowComments() == sal_True;
}
// --------------------------------------------------------------------
@@ -340,7 +340,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq)
if( pArgs )
{
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, sal_True, &pPoolItem ) )
{
OUString sAuthor( (( const SfxStringItem* ) pPoolItem )->GetValue() );
DeleteAnnotationsByAuthor( sAuthor );
@@ -356,7 +356,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq)
if( pArgs )
{
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETE_POSTIT, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_DELETE_POSTIT, sal_True, &pPoolItem ) )
( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue() >>= xAnnotation;
}
}
@@ -460,7 +460,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
if( pArgs )
{
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == pArgs->GetItemState( rReq.GetSlot(), TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( rReq.GetSlot(), sal_True, &pPoolItem ) )
( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue() >>= xAnnotation;
}
@@ -471,7 +471,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
std::auto_ptr< ::Outliner > pOutliner( new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT) );
mpDoc->SetCalcFieldValueHdl( pOutliner.get() );
- pOutliner->SetUpdateMode( TRUE );
+ pOutliner->SetUpdateMode( sal_True );
String aStr(SdResId(STR_ANNOTATION_REPLY));
OUString sAuthor( xAnnotation->getAuthor() );
@@ -491,8 +491,8 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
aStr.Append( sQuote );
aStr.Append( String(RTL_CONSTASCII_USTRINGPARAM("\"\n") ) );
- USHORT nParaCount = aStr.GetTokenCount( '\n' );
- for( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ sal_uInt16 nParaCount = aStr.GetTokenCount( '\n' );
+ for( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ )
pOutliner->Insert( aStr.GetToken( nPara, '\n' ), LIST_APPEND, -1 );
if( pOutliner->GetParagraphCount() > 1 )
@@ -501,7 +501,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC));
ESelection aSel;
- aSel.nEndPara = (USHORT)pOutliner->GetParagraphCount()-2;
+ aSel.nEndPara = (sal_uInt16)pOutliner->GetParagraphCount()-2;
aSel.nEndPos = pOutliner->GetText( pOutliner->GetParagraph( aSel.nEndPara ) ).Len();
pOutliner->QuickSetAttribs( aAnswerSet, aSel );
@@ -722,7 +722,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
::boost::shared_ptr<DrawViewShell> pDrawViewShell(::boost::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell()));
if (pDrawViewShell.get() != NULL)
{
- pDrawViewShell->ChangeEditMode(pPage->IsMasterPage() ? EM_MASTERPAGE : EM_PAGE, FALSE);
+ pDrawViewShell->ChangeEditMode(pPage->IsMasterPage() ? EM_MASTERPAGE : EM_PAGE, sal_False);
pDrawViewShell->SwitchPage((pPage->GetPageNum() - 1) >> 1);
SfxDispatcher* pDispatcher = getDispatcher( mrBase );
@@ -750,7 +750,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
WB_YES_NO | WB_DEF_YES,
String(SdResId(nStringId)));
aQuestionBox.SetImage (QueryBox::GetStandardImage());
- USHORT nBoxResult = aQuestionBox.Execute();
+ sal_uInt16 nBoxResult = aQuestionBox.Execute();
if(nBoxResult != BUTTONID_YES)
break;
}
@@ -778,7 +778,7 @@ void AnnotationManagerImpl::onTagDeselected( AnnotationTag& rTag )
// --------------------------------------------------------------------
-void AnnotationManagerImpl::SelectAnnotation( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > xAnnotation, bool bEdit /* = FALSE */ )
+void AnnotationManagerImpl::SelectAnnotation( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > xAnnotation, bool bEdit /* = sal_False */ )
{
mxSelectedAnnotation = xAnnotation;
@@ -998,7 +998,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation
aStr.SearchAndReplaceAscii("%1", aReplace);
pMenu->SetItemText( SID_DELETEALLBYAUTHOR_POSTIT, aStr );
pMenu->EnableItem( SID_REPLYTO_POSTIT, (sAuthor != sCurrentAuthor) && !bReadOnly );
- pMenu->EnableItem( SID_DELETE_POSTIT, (xAnnotation.is() && !bReadOnly) ? TRUE : FALSE );
+ pMenu->EnableItem( SID_DELETE_POSTIT, (xAnnotation.is() && !bReadOnly) ? sal_True : sal_False );
pMenu->EnableItem( SID_DELETEALLBYAUTHOR_POSTIT, !bReadOnly );
pMenu->EnableItem( SID_DELETEALL_POSTIT, !bReadOnly );
@@ -1006,11 +1006,11 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation
{
if( pAnnotationWindow->IsProtected() || bReadOnly )
{
- pMenu->EnableItem( SID_ATTR_CHAR_WEIGHT, FALSE );
- pMenu->EnableItem( SID_ATTR_CHAR_POSTURE, FALSE );
- pMenu->EnableItem( SID_ATTR_CHAR_UNDERLINE, FALSE );
- pMenu->EnableItem( SID_ATTR_CHAR_STRIKEOUT, FALSE );
- pMenu->EnableItem( SID_PASTE, FALSE );
+ pMenu->EnableItem( SID_ATTR_CHAR_WEIGHT, sal_False );
+ pMenu->EnableItem( SID_ATTR_CHAR_POSTURE, sal_False );
+ pMenu->EnableItem( SID_ATTR_CHAR_UNDERLINE, sal_False );
+ pMenu->EnableItem( SID_ATTR_CHAR_STRIKEOUT, sal_False );
+ pMenu->EnableItem( SID_PASTE, sal_False );
}
else
{
@@ -1046,13 +1046,13 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation
pMenu->EnableItem( SID_COPY, pAnnotationWindow->getView()->HasSelection() );
}
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
// set slot images
Reference< ::com::sun::star::frame::XFrame > xFrame( mrBase.GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface() );
if( xFrame.is() )
{
- for( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ )
+ for( sal_uInt16 nPos = 0; nPos < pMenu->GetItemCount(); nPos++ )
{
nId = pMenu->GetItemId( nPos );
if( pMenu->IsItemEnabled( nId ) )
diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx
index 0a31dfa0d04e..e9e50e34946e 100644
--- a/sd/source/ui/annotations/annotationmanagerimpl.hxx
+++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx
@@ -79,7 +79,7 @@ public:
void SelectNextAnnotation(bool bForeward);
- void SelectAnnotation( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > xAnnotation, bool bEdit = FALSE );
+ void SelectAnnotation( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > xAnnotation, bool bEdit = sal_False );
void GetSelectedAnnotation( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation );
void InsertAnnotation();
@@ -133,7 +133,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation > mxSelectedAnnotation;
bool mbShowAnnotations;
- ULONG mnUpdateTagsEvent;
+ sal_uLong mnUpdateTagsEvent;
Font maFont;
};
diff --git a/sd/source/ui/annotations/annotations.src b/sd/source/ui/annotations/annotations.src
index 0ca43731d6b0..536d10f9a417 100644
--- a/sd/source/ui/annotations/annotations.src
+++ b/sd/source/ui/annotations/annotations.src
@@ -28,6 +28,7 @@
#include "annotations.hrc"
#include "glob.hrc"
#include <svx/svxids.hrc>
+#include "helpids.h"
Menu RID_ANNOTATION_CONTEXTMENU
{
@@ -36,7 +37,7 @@ Menu RID_ANNOTATION_CONTEXTMENU
MenuItem
{
Identifier = SID_REPLYTO_POSTIT;
- HelpID = SID_REPLYTO_POSTIT ;
+ HelpId = CMD_SID_REPLYTO_POSTIT ;
Text [ en-US ] = "~Reply";
};
MenuItem
@@ -46,25 +47,25 @@ Menu RID_ANNOTATION_CONTEXTMENU
MenuItem
{
Identifier = SID_ATTR_CHAR_WEIGHT;
- HelpID = SID_ATTR_CHAR_WEIGHT ;
+ HelpId = CMD_SID_ATTR_CHAR_WEIGHT ;
Text [ en-US ] = "~Bold";
};
MenuItem
{
Identifier = SID_ATTR_CHAR_POSTURE;
- HelpID = SID_ATTR_CHAR_POSTURE;
+ HelpId = CMD_SID_ATTR_CHAR_POSTURE;
Text [ en-US ] = "~Italic";
};
MenuItem
{
Identifier = SID_ATTR_CHAR_UNDERLINE;
- HelpID = SID_ATTR_CHAR_UNDERLINE;
+ HelpId = CMD_SID_ATTR_CHAR_UNDERLINE;
Text [ en-US ] = "~Underline";
};
MenuItem
{
Identifier = SID_ATTR_CHAR_STRIKEOUT;
- HelpID = SID_ATTR_CHAR_STRIKEOUT;
+ HelpId = CMD_SID_ATTR_CHAR_STRIKEOUT;
Text [ en-US ] = "~Strikethrough";
};
MenuItem
@@ -74,13 +75,13 @@ Menu RID_ANNOTATION_CONTEXTMENU
MenuItem
{
Identifier = SID_COPY ;
- HelpID = SID_COPY ;
+ HelpId = CMD_SID_COPY ;
Text [ en-US ] = "~Copy" ;
};
MenuItem
{
Identifier = SID_PASTE ;
- HelpID = SID_PASTE ;
+ HelpId = CMD_SID_PASTE ;
Text [ en-US ] = "~Paste" ;
};
MenuItem
@@ -90,19 +91,19 @@ Menu RID_ANNOTATION_CONTEXTMENU
MenuItem
{
Identifier = SID_DELETE_POSTIT ;
- HelpID = SID_DELETE_POSTIT;
+ HelpId = CMD_SID_DELETE_POSTIT;
Text [ en-US ] = "~Delete Comment" ;
};
MenuItem
{
Identifier = SID_DELETEALLBYAUTHOR_POSTIT ;
- HelpID = SID_DELETEALLBYAUTHOR_POSTIT;
+ HelpId = CMD_SID_DELETEALLBYAUTHOR_POSTIT;
Text [ en-US ] = "Delete All Comments b~y %1" ;
};
MenuItem
{
Identifier = SID_DELETEALL_POSTIT;
- HelpID = SID_DELETEALL_POSTIT;
+ HelpId = CMD_SID_DELETEALL_POSTIT;
Text [ en-US ] = "Delete ~All Comments" ;
};
};
@@ -115,7 +116,7 @@ Menu RID_ANNOTATION_TAG_CONTEXTMENU
MenuItem
{
Identifier = SID_REPLYTO_POSTIT;
- HelpID = SID_REPLYTO_POSTIT;
+ HelpId = CMD_SID_REPLYTO_POSTIT;
Text [ en-US ] = "~Reply";
};
MenuItem
@@ -125,19 +126,19 @@ Menu RID_ANNOTATION_TAG_CONTEXTMENU
MenuItem
{
Identifier = SID_DELETE_POSTIT ;
- HelpID = SID_DELETE_POSTIT ;
+ HelpId = CMD_SID_DELETE_POSTIT ;
Text [ en-US ] = "~Delete Comment" ;
};
MenuItem
{
Identifier = SID_DELETEALLBYAUTHOR_POSTIT ;
- HelpID = SID_DELETEALLBYAUTHOR_POSTIT ;
+ HelpId = CMD_SID_DELETEALLBYAUTHOR_POSTIT ;
Text [ en-US ] = "Delete All Comments ~by %1" ;
};
MenuItem
{
Identifier = SID_DELETEALL_POSTIT;
- HelpID = SID_DELETEALL_POSTIT;
+ HelpId = CMD_SID_DELETEALL_POSTIT;
Text [ en-US ] = "Delete ~All Comments" ;
};
};
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 4a27c730b0a7..ad03711b5717 100644..100755
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -161,7 +161,7 @@ bool AnnotationDragMove::EndSdrDrag(bool /*bCopy*/)
Hide();
if( mxTag.is() )
mxTag->Move( DragStat().GetDX(), DragStat().GetDY() );
- return TRUE;
+ return sal_True;
}
void AnnotationDragMove::CancelSdrDrag()
@@ -177,7 +177,7 @@ public:
AnnotationHdl( const SmartTagReference& xTag, const Reference< XAnnotation >& xAnnotation, const Point& rPnt );
virtual ~AnnotationHdl();
virtual void CreateB2dIAObject();
- virtual BOOL IsFocusHdl() const;
+ virtual sal_Bool IsFocusHdl() const;
virtual Pointer GetSdrDragPointer() const;
virtual bool isMarkable() const;
@@ -250,10 +250,10 @@ void AnnotationHdl::CreateB2dIAObject()
pOverlayObject = new ::sdr::overlay::OverlayAnimatedBitmapEx(aPosition, aBitmapEx, aBitmapEx2, nBlinkTime, 0, 0, 0, 0 );
/*
- (UINT16)(aBitmapEx.GetSizePixel().Width() - 1) >> 1,
- (UINT16)(aBitmapEx.GetSizePixel().Height() - 1) >> 1,
- (UINT16)(aBitmapEx2.GetSizePixel().Width() - 1) >> 1,
- (UINT16)(aBitmapEx2.GetSizePixel().Height() - 1) >> 1);
+ (sal_uInt16)(aBitmapEx.GetSizePixel().Width() - 1) >> 1,
+ (sal_uInt16)(aBitmapEx.GetSizePixel().Height() - 1) >> 1,
+ (sal_uInt16)(aBitmapEx2.GetSizePixel().Width() - 1) >> 1,
+ (sal_uInt16)(aBitmapEx2.GetSizePixel().Height() - 1) >> 1);
*/
}
else
@@ -273,9 +273,9 @@ void AnnotationHdl::CreateB2dIAObject()
// --------------------------------------------------------------------
-BOOL AnnotationHdl::IsFocusHdl() const
+sal_Bool AnnotationHdl::IsFocusHdl() const
{
- return TRUE;
+ return sal_True;
}
// --------------------------------------------------------------------
@@ -377,7 +377,7 @@ bool AnnotationTag::KeyInput( const KeyEvent& rKEvt )
if( !mxAnnotation.is() )
return false;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_DELETE:
@@ -517,31 +517,31 @@ void AnnotationTag::CheckPossibilities()
// --------------------------------------------------------------------
-ULONG AnnotationTag::GetMarkablePointCount() const
+sal_uLong AnnotationTag::GetMarkablePointCount() const
{
return 0;
}
// --------------------------------------------------------------------
-ULONG AnnotationTag::GetMarkedPointCount() const
+sal_uLong AnnotationTag::GetMarkedPointCount() const
{
return 0;
}
// --------------------------------------------------------------------
-BOOL AnnotationTag::MarkPoint(SdrHdl& /*rHdl*/, BOOL /*bUnmark*/ )
+sal_Bool AnnotationTag::MarkPoint(SdrHdl& /*rHdl*/, sal_Bool /*bUnmark*/ )
{
- BOOL bRet=FALSE;
+ sal_Bool bRet=sal_False;
return bRet;
}
// --------------------------------------------------------------------
-BOOL AnnotationTag::MarkPoints(const Rectangle* /*pRect*/, BOOL /*bUnmark*/ )
+sal_Bool AnnotationTag::MarkPoints(const Rectangle* /*pRect*/, sal_Bool /*bUnmark*/ )
{
- BOOL bChgd=FALSE;
+ sal_Bool bChgd=sal_False;
return bChgd;
}
@@ -638,7 +638,7 @@ BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected )
const int BORDER_Y = 4; // pixels
maSize = Size( aVDev.GetTextWidth( sAuthor ) + 2*BORDER_X, aVDev.GetTextHeight() + 2*BORDER_Y );
- aVDev.SetOutputSizePixel( maSize, FALSE );
+ aVDev.SetOutputSizePixel( maSize, sal_False );
Color aBorderColor( maColor );
@@ -692,7 +692,7 @@ void AnnotationTag::OpenPopup( bool bEdit )
mpAnnotationWindow->InitControls();
mpAnnotationWindow->setAnnotation(mxAnnotation);
- USHORT nArrangeIndex = 0;
+ sal_uInt16 nArrangeIndex = 0;
Point aPopupPos( FloatingWindow::CalcFloatingPosition( mpAnnotationWindow.get(), aRect, FLOATWIN_POPUPMODE_RIGHT, nArrangeIndex ) );
Size aPopupSize( 320, 240 );
@@ -760,7 +760,7 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent*, pEvent)
if( pHdl )
{
mrView.BrkAction();
- const USHORT nDrgLog = (USHORT)pWindow->PixelToLogic(Size(DRGPIX,0)).Width();
+ const sal_uInt16 nDrgLog = (sal_uInt16)pWindow->PixelToLogic(Size(DRGPIX,0)).Width();
rtl::Reference< AnnotationTag > xTag( this );
@@ -776,7 +776,7 @@ IMPL_LINK(AnnotationTag, WindowEventHandler, VclWindowEvent*, pEvent)
}
}
}
- return TRUE;
+ return sal_True;
}
IMPL_LINK( AnnotationTag, ClosePopupHdl, void *, EMPTYARG )
diff --git a/sd/source/ui/annotations/annotationtag.hxx b/sd/source/ui/annotations/annotationtag.hxx
index e37ae2057d3f..06875cc26f47 100644..100755
--- a/sd/source/ui/annotations/annotationtag.hxx
+++ b/sd/source/ui/annotations/annotationtag.hxx
@@ -61,11 +61,11 @@ public:
virtual bool Command( const CommandEvent& rCEvt );
// callbacks from sdr view
- virtual ULONG GetMarkablePointCount() const;
- virtual ULONG GetMarkedPointCount() const;
- virtual BOOL MarkPoint(SdrHdl& rHdl, BOOL bUnmark=FALSE);
+ virtual sal_uLong GetMarkablePointCount() const;
+ virtual sal_uLong GetMarkedPointCount() const;
+ virtual sal_Bool MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark=sal_False);
virtual void CheckPossibilities();
- virtual BOOL MarkPoints(const Rectangle* pRect, BOOL bUnmark);
+ virtual sal_Bool MarkPoints(const Rectangle* pRect, sal_Bool bUnmark);
void Move( int nDX, int nDY );
bool OnMove( const KeyEvent& rKEvt );
@@ -97,7 +97,7 @@ private:
int mnIndex;
const Font& mrFont;
Size maSize;
- ULONG mnClosePopupEvent;
+ sal_uLong mnClosePopupEvent;
::Window* mpListenWindow;
Point maMouseDownPos;
};
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 55a7202b47d1..3feda9f2d4a0 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -115,11 +115,11 @@ extern OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAn
extern SfxItemPool* GetAnnotationPool();
extern com::sun::star::util::DateTime getCurrentDateTime();
-Color ColorFromAlphaColor(UINT8 aTransparency, Color &aFront, Color &aBack )
+Color ColorFromAlphaColor(sal_uInt8 aTransparency, Color &aFront, Color &aBack )
{
- return Color((UINT8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
- (UINT8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
+ return Color((sal_uInt8)(aFront.GetRed() * aTransparency/(double)255 + aBack.GetRed() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetGreen() * aTransparency/(double)255 + aBack.GetGreen() * (1-aTransparency/(double)255)),
+ (sal_uInt8)(aFront.GetBlue() * aTransparency/(double)255 + aBack.GetBlue() * (1-aTransparency/(double)255)));
}
/************ AnnotationTextWindow **********************************/
@@ -161,7 +161,7 @@ void AnnotationTextWindow::Paint( const Rectangle& rRect)
void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt )
{
const KeyCode& rKeyCode = rKeyEvt.GetKeyCode();
- USHORT nKey = rKeyCode.GetCode();
+ sal_uInt16 nKey = rKeyCode.GetCode();
if ((rKeyCode.IsMod1() && rKeyCode.IsMod2()) && ((nKey == KEY_PAGEUP) || (nKey == KEY_PAGEDOWN)))
{
@@ -212,7 +212,7 @@ void AnnotationTextWindow::MouseButtonDown( const MouseEvent& rMEvt )
GrabFocus();
if ( mpOutlinerView )
mpOutlinerView->MouseButtonDown( rMEvt );
- // todo mpOutlinerView->DocView()->GetViewFrame()->GetBindings().InvalidateAll(FALSE);
+ // todo mpOutlinerView->DocView()->GetViewFrame()->GetBindings().InvalidateAll(sal_False);
}
void AnnotationTextWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -333,7 +333,7 @@ void AnnotationWindow::InitControls()
mpOutliner = new ::Outliner(GetAnnotationPool(),OUTLINERMODE_TEXTOBJECT);
Doc()->SetCalcFieldValueHdl( mpOutliner );
- mpOutliner->SetUpdateMode( TRUE );
+ mpOutliner->SetUpdateMode( sal_True );
Rescale();
OutputDevice* pDev = Doc()->GetRefDevice();
@@ -358,16 +358,16 @@ void AnnotationWindow::InitControls()
mpVScrollbar->SetScrollHdl(LINK(this, AnnotationWindow, ScrollHdl));
mpVScrollbar->EnableDrag();
- ULONG nCntrl = mpOutliner->GetControlWord();
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
nCntrl |= EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL | EE_CNTRL_NOCOLORS;
mpOutliner->SetControlWord(nCntrl);
Engine()->SetModifyHdl( Link() );
- Engine()->EnableUndo( FALSE );
+ Engine()->EnableUndo( sal_False );
Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
- Engine()->EnableUndo( TRUE );
+ Engine()->EnableUndo( sal_True );
Engine()->SetModifyHdl( LINK( this, AnnotationWindow, ModifyHdl ) );
Invalidate();
@@ -486,7 +486,7 @@ void AnnotationWindow::SetLanguage(const SvxLanguageItem aNewItem)
Engine()->SetModifyHdl( Link() );
ESelection aOld = getView()->GetSelection();
- ESelection aNewSelection( 0, 0, (USHORT)Engine()->GetParagraphCount()-1, USHRT_MAX );
+ ESelection aNewSelection( 0, 0, (sal_uInt16)Engine()->GetParagraphCount()-1, USHRT_MAX );
getView()->SetSelection( aNewSelection );
SfxItemSet aEditAttr(getView()->GetAttribs());
aEditAttr.Put(aNewItem);
@@ -774,7 +774,7 @@ void AnnotationWindow::GetFocus()
FloatingWindow::GetFocus();
}
-void AnnotationWindow::ExecuteSlot( USHORT nSID )
+void AnnotationWindow::ExecuteSlot( sal_uInt16 nSID )
{
if( nSID == SID_COPY )
{
diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx
index 33efb1e3c2fc..752e5c967e5b 100644
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -125,7 +125,7 @@ class AnnotationWindow : public FloatingWindow
void setAnnotation( const ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation, bool bGrabFocus = false );
const ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& getAnnotation() const { return mxAnnotation; }
- void ExecuteSlot( USHORT nSID );
+ void ExecuteSlot( sal_uInt16 nSID );
ScrollBar* Scrollbar() { return mpVScrollbar;}
diff --git a/sd/source/ui/app/accel_tmpl.src b/sd/source/ui/app/accel_tmpl.src
deleted file mode 100644
index 467c5e2ae466..000000000000
--- a/sd/source/ui/app/accel_tmpl.src
+++ /dev/null
@@ -1,117 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_ACCELERATOR
-#define SD_ACCELERATOR RID_DRAW_DEFAULTACCEL
-#include "accelids.src"
-#endif
-
-#ifndef _GLOBALACC_SRC
-#include <svx/globlac.hrc>
-#endif
-
-/** For the presentation we change some accelerator keys:
- The navigator is moved from F5 to Shift-F5.
- The presentation is started for F5, F9, Control-F2. The later two are
- defined in svx/globalac.hrc.
-*/
-#define AI_SD_NAVIGATOR ACC_CODE(SID_NAVIGATOR, KEY_F5, TRUE, FALSE, FALSE )
-#define AI_PRESENTATION_F5 ACC_CODE(SID_PRESENTATION, KEY_F5, FALSE, FALSE, FALSE )
-
-Accelerator SD_ACCELERATOR
-{
- ItemList =
- {
- // Funktionstasten
- AI_ATTR_CHAR
-#if SD_ACCELERATOR != RID_GRAPHIC_DEFAULTACCEL
- AI_PRESENTATION_F5
- AI_PRESENTATION
- AI_PRESENTATION_COMPAT
-#endif
- AI_ENTER_GROUP
- AI_COPYOBJECTS
- AI_LEAVE_GROUP
- AI_ATTR_TRANSFORM
- // AI_NAVIGATOR
- AI_SD_NAVIGATOR
- AI_SPELLING
- AI_THESAURUS
- AI_BEZIER_EDIT
- AI_ATTR_TEXT_FITTOSIZE
- AI_STYLE_DESIGNER
-#if SD_ACCELERATOR != RID_GRAPHIC_DEFAULTACCEL
- AI_OUTLINEMODE
- AI_DRAWINGMODE
-#endif
- // A-Z Acceleratoren
- AI_ATTR_PARA_LINESPACE_10
- AI_ATTR_PARA_LINESPACE_20
- AI_ATTR_PARA_LINESPACE_15
- AI_SHOW_ITEMBROWSER
- AI_ATTR_PARA_ADJUST_BLOCK
- AI_ATTR_PARA_ADJUST_CENTER
- AI_ATTR_CHAR_WEIGHT
- AI_GROUP
- AI_UNGROUP
- // Weitersuchen ...
- AI_SET_SUPER_SCRIPT
- AI_ATTR_CHAR_POSTURE
- AI_COMBINE
- AI_DISMANTLE
- AI_ATTR_PARA_ADJUST_LEFT
- AI_ATTR_PARA_ADJUST_RIGHT
- AI_SET_SUB_SCRIPT
- AI_ATTR_CHAR_UNDERLINE
- AI_STYLE_CATALOG
-#if SD_ACCELERATOR != RID_PLUGINACCEL
-// Ob das wirklich richtig ist (PlugIn-Accel) sollte mal geprueft werden !!!
- // Anordnung
- AI_FRAME_TO_TOP
- AI_MOREFRONT
- AI_FRAME_TO_BOTTOM
- AI_MOREBACK
- // sonstige Acceleratoren
- AI_NEWDOC
- AI_OPENDOC
-#endif
- AI_SAVEDOC
- AI_PRINTDOC
- AI_QUITAPP
- AI_CUT
- AI_COPY
- AI_PASTE
- AI( SID_PASTE2, KEY_V, TRUE, TRUE, FALSE )
- AI_UNDO
- AI_REDO
- AI_REPEAT
- AI_DELETE
- };
-};
-
-
-
diff --git a/sd/source/ui/app/app.img b/sd/source/ui/app/app.img
deleted file mode 100644
index a435b84b8887..000000000000
--- a/sd/source/ui/app/app.img
+++ /dev/null
@@ -1,120 +0,0 @@
-File = "sc05410.bmp";Identifier = SID_HELPMENU;
-File = "sc05500.bmp";Identifier = SID_NEW_DOCUMENT;File = "sco043.bmp
-File = "sc05501.bmp";Identifier = SID_OPENDOC;File = "sco044.bmp
-File = "sc05504.bmp";Identifier = SID_PRINTDOC;File = "sco051.bmp
-File = "sc05505.bmp";Identifier = SID_SAVEDOC;File = "sco046.bmp
-File = "sc05539.bmp";Identifier = SID_TEMPLATE;
-File = "sc05561.bmp";Identifier = SID_INSERT_OBJECT;
-File = "sc05700.bmp";Identifier = SID_REDO;
-File = "sc05701.bmp";Identifier = SID_UNDO;
-File = "sc05710.bmp";Identifier = SID_CUT;File = "sco058.bmp
-File = "sc05711.bmp";Identifier = SID_COPY;File = "sco059.bmp
-File = "sc05712.bmp";Identifier = SID_PASTE;File = "sco060.bmp
-
-File = "sc10008.bmp";Identifier = SID_ATTR_CHAR_POSTURE;
-File = "sc10009.bmp";Identifier = SID_ATTR_CHAR_WEIGHT;
-File = "sc10012.bmp";Identifier = SID_ATTR_CHAR_CONTOUR;
-File = "sc10014.bmp";Identifier = SID_ATTR_CHAR_UNDERLINE;
-File = "sc10028.bmp";Identifier = SID_TEXT_ADJUST_LEFT;
-File = "sc10029.bmp";Identifier = SID_TEXT_ADJUST_RIGHT;
-File = "sc10030.bmp";Identifier = SID_TEXT_ADJUST_CENTER;
-File = "sc10031.bmp";Identifier = SID_TEXT_ADJUST_BLOCK;
-File = "sc10034.bmp";Identifier = SID_TEXT_LINESPACING_1;
-File = "sc10035.bmp";Identifier = SID_TEXT_LINESPACING_2;
-File = "sc10036.bmp";Identifier = SID_TEXT_LINESPACING_3;
-File = "sc10087.bmp";Identifier = SID_TRANSFORM;
-File = "sc10102.bmp";Identifier = SID_TOOL_LINE;File = "sco207.bmp
-File = "sc10104.bmp";Identifier = SID_TOOL_RECT;File = "sco209.bmp
-File = "sc10110.bmp";Identifier = SID_TOOL_ELLIPSE;File = "sco215.bmp
-File = "sc10113.bmp";Identifier = SID_TOOL_PIE;File = "sco220.bmp
-File = "sc10114.bmp";Identifier = SID_TOOL_ARC;File = "sco217.bmp
-File = "sc10116.bmp";Identifier = SID_TOOL_CIRCLECUT;File = "sco221.bmp
-File = "sc10117.bmp";Identifier = SID_TOOL_POLYGON;File = "sco222.bmp
-File = "sc10118.bmp";Identifier = SID_TOOL_BEZIER;File = "sco223.bmp
-File = "sc10119.bmp";Identifier = SID_BEZIER_INSERT;
-File = "sc10120.bmp";Identifier = SID_BEZIER_DELETE;
-File = "sc10121.bmp";Identifier = SID_BEZIER_MOVE;
-File = "sc10122.bmp";Identifier = SID_BEZIER_CLOSE;
-// wurde durch sc20014.bmp ersetzt:
-// File = "sc10123.bmp";Identifier = SID_BEZIER_SMOOTH;
-File = "sc10126.bmp";Identifier = SID_EDIT_POINTS;
-File = "sc10127.bmp";Identifier = SID_BEZIER_CUTLINE;
-File = "sc10129.bmp";Identifier = SID_TOOL_ROTATE;
-File = "sc10130.bmp";Identifier = SID_ALIGNMENT;
-File = "sc10131.bmp";Identifier = SID_LEFT;File = "sco231.bmp
-File = "sc10132.bmp";Identifier = SID_CENTER;File = "sco232.bmp
-File = "sc10133.bmp";Identifier = SID_RIGHT;File = "sco233.bmp
-File = "sc10134.bmp";Identifier = SID_UP;File = "sco234.bmp
-File = "sc10135.bmp";Identifier = SID_MIDDLE;File = "sco235.bmp
-File = "sc10136.bmp";Identifier = SID_DOWN;File = "sco236.bmp
-File = "sc10140.bmp";Identifier = SID_INSERTDIAGRAM;File = "sco246.bmp
-File = "sc10141.bmp";Identifier = SID_ATTR_TABLE;
-File = "sc10142.bmp";Identifier = SID_AREA;
-File = "sc10143.bmp";Identifier = SID_LINE;
-File = "sc10144.bmp";Identifier = SID_TOOL_CONTROLS;File = "sco270.bmp
-File = "sc10145.bmp";Identifier = SID_DIALOG_TESTMODE;File = "sco274.bmp
-File = "sc10146.bmp";Identifier = SID_INSERT_PUSHBUTTON;File = "sco271.bmp
-File = "sc10147.bmp";Identifier = SID_INSERT_RADIOBUTTON;File = "sco272.bmp
-File = "sc10148.bmp";Identifier = SID_INSERT_CHECKBOX;File = "sco273.bmp
-File = "sc10150.bmp";Identifier = SID_OUTLINE_UP;File = "sco290.bmp
-File = "sc10151.bmp";Identifier = SID_OUTLINE_DOWN;File = "sco291.bmp
-File = "sc10152.bmp";Identifier = SID_OUTLINE_LEFT;File = "sco292.bmp
-File = "sc10153.bmp";Identifier = SID_OUTLINE_RIGHT;File = "sco293.bmp
-File = "sc10154.bmp";Identifier = SID_OUTLINE_FORMAT;File = "sco204.bmp
-File = "sc10155.bmp";Identifier = SID_OUTLINE_TITLE;File = "sco295.bmp
-File = "sc10156.bmp";Identifier = SID_OUTLINE_BULLET;File = "sco296.bmp
-File = "sc10157.bmp";Identifier = SID_PRESENTATION;File = "sco238.bmp
-File = "sc10159.bmp";Identifier = SID_REHEARSE_TIMINGS;File = "sco239.bmp
-File = "sc10160.bmp";Identifier = SID_DIA;File = "sco240.bmp
-File = "sc10161.bmp";Identifier = SID_HIDE_SLIDE;File = "sco241.bmp
-File = "sc10162.bmp";Identifier = SID_CHOOSE_POLYGON;File = "sco242.bmp
-File = "sc10163.bmp";Identifier = SID_SHOW_BROWSER;File = "sco275.bmp
-File = "sc10188.bmp";Identifier = SID_INSERT_FIXEDTEXT;File = "sco276.bmp
-File = "sc10189.bmp";Identifier = SID_INSERT_GROUPBOX;File = "sco277.bmp
-File = "sc10191.bmp";Identifier = SID_INSERT_LISTBOX;File = "sco278.bmp
-File = "sc10192.bmp";Identifier = SID_INSERT_COMBOBOX;File = "sco279.bmp
-File = "sc10231.bmp";Identifier = SID_OUTLINE_COLLAPSE;
-File = "sc10232.bmp";Identifier = SID_OUTLINE_EXPAND_ALL;
-File = "sc10233.bmp";Identifier = SID_OUTLINE_EXPAND;
-File = "sc10240.bmp";Identifier = SID_INSERT_FRAME;
-File = "sc10241.bmp";Identifier = SID_INSERT_GRAPHIC;
-File = "sc10242.bmp";Identifier = SID_AUTOFORMAT;
-File = "sc10243.bmp";Identifier = SID_SPELLING;
-File = "sc10244.bmp";Identifier = SID_INSERT_DRAW;
-File = "sc10700.bmp";Identifier = SID_TOOL_SELECT;File = "sco200.bmp
-File = "sc10701.bmp";Identifier = SID_TOOL_ZOOM;File = "sco201.bmp
-File = "sc10702.bmp";Identifier = SID_ZOOM_PLUS;File = "sco202.bmp
-File = "sc10703.bmp";Identifier = SID_ZOOM_MINUS;File = "sco203.bmp
-File = "sc10704.bmp";Identifier = SID_ZOOM_100_PERCENT;File = "sco204.bmp
-File = "sc10705.bmp";Identifier = SID_ZOOM_PAGE;File = "sco205.bmp
-File = "sc10706.bmp";Identifier = SID_ZOOM_OBJECTS;File = "sco206.bmp
-File = "sc10724.bmp";Identifier = SID_TOOL_TEXT;File = "sco224.bmp
-
-File = "sc20000.bmp";Identifier = SID_ATTR_CHAR_COLOR;File = "charcol.bmp";
-File = "sc20001.bmp";Identifier = SID_TOOL_CONNECTOR;File = "sco298.bmp";
-
-// Controller
-File = "sc20002.bmp";Identifier = SID_TEMPLATE_APPLY;
-File = "sc20003.bmp";Identifier = SID_ATTR_LINE_STYLE;
-File = "sc20004.bmp";Identifier = SID_ATTR_LINE_WIDTH;
-File = "sc20005.bmp";Identifier = SID_ATTR_LINE_COLOR;
-File = "sc20006.bmp";Identifier = SID_ATTR_FILL_STYLE;
-File = "sc20007.bmp";Identifier = SID_DIA_EFFECT;
-File = "sc20008.bmp";Identifier = SID_DIA_SPEED;
-File = "sc20009.bmp";Identifier = SID_DIA_AUTO;
-File = "sc20010.bmp";Identifier = SID_DIA_TIME;
-File = "sc20011.bmp";Identifier = SID_ATTR_FONT;
-File = "sc20012.bmp";Identifier = SID_ATTR_FONTHEIGHT;
-
-// Bezier-Toolbar
-File = "sc20013.bmp";Identifier = SID_BEZIER_EDGE;
-File = "sc20014.bmp";Identifier = SID_BEZIER_SMOOTH;
-File = "sc20015.bmp";Identifier = SID_BEZIER_SYMMTR;
-File = "sc20016.bmp";Identifier = SID_BEZIER_CONVERT;
-
-// Standardleiste
-File = "sc20020.bmp";Identifier = SID_INSERTPAGE;
-File = "sc20094.bmp";Identifier = SID_MODIFYPAGE;
-File = "sc20170.bmp";Identifier = SID_PRESENTATION_LAYOUT;
-
-// Basic-IDE ...
diff --git a/sd/source/ui/app/makefile.mk b/sd/source/ui/app/makefile.mk
index 02d8a3a3e1f8..6a134c28b2ec 100755
--- a/sd/source/ui/app/makefile.mk
+++ b/sd/source/ui/app/makefile.mk
@@ -50,7 +50,6 @@ SRC1FILES = \
toolbox.src \
strings.src \
res_bmp.src \
- tbx_ww.src \
popup.src \
sdstring.src
diff --git a/sd/source/ui/app/menuids2_tmpl.src b/sd/source/ui/app/menuids2_tmpl.src
index de24f11c004f..cd126e895260 100755
--- a/sd/source/ui/app/menuids2_tmpl.src
+++ b/sd/source/ui/app/menuids2_tmpl.src
@@ -60,7 +60,7 @@
MenuItem\
{\
Identifier = SID_NEWDOCDIRECT ; \
- HelpID = SID_NEWDOCDIRECT ; \
+ HelpId = CMD_SID_NEWDOCDIRECT ; \
Text [ en-US ] = "~New" ; \
};
@@ -68,7 +68,7 @@
MenuItem\
{\
Identifier = SID_EXPORTDOC ; \
- HelpID = SID_EXPORTDOC ; \
+ HelpId = CMD_SID_EXPORTDOC ; \
Text [ en-US ] = "~Export..." ; \
};
@@ -76,7 +76,7 @@
MenuItem\
{\
Identifier = SID_EXPORTDOCASPDF ; \
- HelpID = SID_EXPORTDOCASPDF ; \
+ HelpId = CMD_SID_EXPORTDOCASPDF ; \
Text [ en-US ] = "Export as PDF..." ; \
};
@@ -84,7 +84,7 @@
MenuItem\
{\
Identifier = MN_SUB_SEND ; \
- HelpID = MN_SUB_SEND ; \
+ HelpID = HID_MN_SUB_SEND ; \
Command = ".uno:SendMenu" ; \
Text [ en-US ] = "Sen~d" ; \
SubMenu = Menu\
@@ -101,7 +101,7 @@
MenuItem\
{\
Identifier = SID_PAGESETUP ; \
- HelpID = SID_PAGESETUP ; \
+ HelpId = CMD_SID_PAGESETUP ; \
Text [ en-US ] = "~Page..." ; \
};
//
@@ -109,7 +109,7 @@
//
#define MN_EDIT \
Identifier = 20 ; \
- HelpID = 20 ; \
+ HelpID = "what a hack!" ; \
Command = ".uno:EditMenu"; \
Text [ en-US ] = "~Edit" ; \
@@ -117,7 +117,7 @@
MenuItem\
{\
Identifier = SID_PASTE2 ; \
- HelpID = SID_PASTE2 ; \
+ HelpId = CMD_SID_PASTE2 ; \
Text [ en-US ] = "Paste ~Special..." ; \
};
@@ -125,7 +125,7 @@
MenuItem\
{\
Identifier = SID_COPYOBJECTS ; \
- HelpID = SID_COPYOBJECTS ; \
+ HelpId = CMD_SID_COPYOBJECTS ; \
Text [ en-US ] = "Duplicat~e..." ; \
};
@@ -133,7 +133,7 @@
MenuItem\
{\
Identifier = SID_POLYGON_MORPHING ; \
- HelpID = SID_POLYGON_MORPHING ; \
+ HelpId = CMD_SID_POLYGON_MORPHING ; \
Text [ en-US ] = "Cross-fading..." ; \
};
@@ -141,7 +141,7 @@
MenuItem\
{\
Identifier = SID_MODIFY_FIELD ; \
- HelpID = SID_MODIFY_FIELD ; \
+ HelpId = CMD_SID_MODIFY_FIELD ; \
Text [ en-US ] = "F~ields..." ; \
};
@@ -149,7 +149,7 @@
MenuItem\
{\
Identifier = SID_DELETE_LAYER ; \
- HelpID = SID_DELETE_LAYER ; \
+ HelpId = CMD_SID_DELETE_LAYER ; \
Text [ en-US ] = "Delete ~Layer..." ; \
};
@@ -157,7 +157,7 @@
MenuItem\
{\
Identifier = SID_MANAGE_LINKS ; \
- HelpID = SID_MANAGE_LINKS ; \
+ HelpId = CMD_SID_MANAGE_LINKS ; \
Text [ en-US ] = "Lin~ks..." ; \
};
//
@@ -165,7 +165,7 @@
//
#define MN_VIEW \
Identifier = 23 ; \
- HelpID = 23 ; \
+ HelpID = "what a hack!" ; \
Command = ".uno:ViewMenu" ; \
Text [ en-US ] = "~View" ; \
@@ -173,7 +173,7 @@
MenuItem\
{\
Identifier = SID_TOGGLETOOLBAR ; \
- HelpID = SID_TOGGLETOOLBAR ; \
+ HelpId = CMD_SID_TOGGLETOOLBAR ; \
Text [ en-US ] = "Main ~Toolbar" ; \
};
@@ -181,7 +181,7 @@
MenuItem\
{\
Identifier = SID_TOGGLEOPTIONBAR ; \
- HelpID = SID_TOGGLEOPTIONBAR ; \
+ HelpId = CMD_SID_TOGGLEOPTIONBAR ; \
Text [ en-US ] = "Optio~n Bar" ; \
};
@@ -189,7 +189,7 @@
MenuItem\
{\
Identifier = SID_TOGGLECOMMONTASKBAR ; \
- HelpID = SID_TOGGLECOMMONTASKBAR ; \
+ HelpId = CMD_SID_TOGGLECOMMONTASKBAR ; \
Text [ en-US ] = "~Presentation" ; \
};
@@ -197,7 +197,7 @@
MenuItem\
{\
Identifier = SID_CUSTOMIZETOOLBOX ; \
- HelpID = SID_CUSTOMIZETOOLBOX ; \
+ HelpId = CMD_SID_CUSTOMIZETOOLBOX ; \
Text [ en-US ] = "Customi~ze..." ; \
};
@@ -205,7 +205,7 @@
MenuItem\
{\
Identifier = SID_RULER ; \
- HelpID = SID_RULER ; \
+ HelpId = CMD_SID_RULER ; \
Command = ".uno:ShowRuler" ; \
Text [ en-US ] = "~Rulers" ; \
};
@@ -214,7 +214,7 @@
MenuItem\
{\
Identifier = SID_NOTESMODE ; \
- HelpID = SID_NOTESMODE ; \
+ HelpId = CMD_SID_NOTESMODE ; \
Check = TRUE ; \
Text [ en-US ] = "~Notes View" ; \
};
@@ -223,7 +223,7 @@
MenuItem\
{\
Identifier = SID_HANDOUTMODE ; \
- HelpID = SID_HANDOUTMODE ; \
+ HelpId = CMD_SID_HANDOUTMODE ; \
Check = TRUE ; \
Text [ en-US ] = "~Handout View" ; \
};
@@ -232,7 +232,7 @@
MenuItem\
{\
Identifier = SID_PREVIEW_WIN ; \
- HelpID = SID_PREVIEW_WIN ; \
+ HelpId = CMD_SID_PREVIEW_WIN ; \
Text [ en-US ] = "~Preview" ; \
};
@@ -240,7 +240,7 @@
MenuItem\
{\
Identifier = SID_PAGEMODE ; \
- HelpID = SID_PAGEMODE ; \
+ HelpId = CMD_SID_PAGEMODE ; \
Check = TRUE ; \
Text [ en-US ] = "S~lide" ; \
};
@@ -249,7 +249,7 @@
MenuItem\
{\
Identifier = SID_SLIDE_MASTERPAGE ; \
- HelpID = SID_SLIDE_MASTERPAGE ; \
+ HelpId = CMD_SID_SLIDE_MASTERPAGE ; \
Check = TRUE ; \
Text [ en-US ] = "~Slide Master" ; \
};
@@ -258,7 +258,7 @@
MenuItem\
{\
Identifier = SID_TITLE_MASTERPAGE ; \
- HelpID = SID_TITLE_MASTERPAGE ; \
+ HelpId = CMD_SID_TITLE_MASTERPAGE ; \
Check = TRUE ; \
Text [ en-US ] = "~Title" ; \
};
@@ -267,7 +267,7 @@
MenuItem\
{\
Identifier = SID_NOTES_MASTERPAGE ; \
- HelpID = SID_NOTES_MASTERPAGE ; \
+ HelpId = CMD_SID_NOTES_MASTERPAGE ; \
Check = TRUE ; \
Text [ en-US ] = "~Notes" ; \
};
@@ -276,7 +276,7 @@
MenuItem\
{\
Identifier = SID_HANDOUT_MASTERPAGE ; \
- HelpID = SID_HANDOUT_MASTERPAGE ; \
+ HelpId = CMD_SID_HANDOUT_MASTERPAGE ; \
Check = TRUE ; \
Text [ en-US ] = "~Handout" ; \
};
@@ -285,7 +285,7 @@
MenuItem\
{\
Identifier = SID_LAYERMODE ; \
- HelpID = SID_LAYERMODE ; \
+ HelpId = CMD_SID_LAYERMODE ; \
Check = TRUE ; \
Text [ en-US ] = "La~yer" ; \
};
@@ -294,7 +294,7 @@
MenuItem\
{\
Identifier = SID_HEADER_AND_FOOTER ; \
- HelpID = SID_HEADER_AND_FOOTER ; \
+ HelpId = CMD_SID_HEADER_AND_FOOTER ; \
Text = "Kopf- und Fußzeile.."; \
};
@@ -302,7 +302,7 @@
MenuItem\
{\
Identifier = SID_INSERT_PAGE_NUMBER ; \
- HelpID = SID_INSERT_PAGE_NUMBER ; \
+ HelpId = CMD_SID_INSERT_PAGE_NUMBER ; \
Text = "Seitenzahl..." ; \
};
@@ -310,7 +310,7 @@
MenuItem\
{\
Identifier = SID_INSERT_DATE_TIME ; \
- HelpID = SID_INSERT_DATE_TIME ; \
+ HelpId = CMD_SID_INSERT_DATE_TIME ; \
Text = "Datum und Uhrzeit..." ; \
};
@@ -318,7 +318,7 @@
MenuItem\
{\
Identifier = MN_SUB_MASTER_LAYOUTS ; \
- HelpId = MN_SUB_MASTER_LAYOUTS; \
+ HelpId = HID_MN_SUB_MASTER_LAYOUTS; \
Text = "Masterlayouts";\
SubMenu = Menu\
{\
@@ -327,19 +327,19 @@
MenuItem\
{\
Identifier = SID_MASTER_LAYOUTS_SLIDE ; \
- HelpID = SID_MASTER_LAYOUTS_SLIDE ; \
+ HelpId = CMD_SID_MASTER_LAYOUTS_SLIDE ; \
Text = "Masterlayout..." ; \
};\
MenuItem\
{\
Identifier = SID_MASTER_LAYOUTS_NOTES ; \
- HelpID = SID_MASTER_LAYOUTS_NOTES ; \
+ HelpId = CMD_SID_MASTER_LAYOUTS_NOTES ; \
Text = "Notizenmasterlayout..." ; \
};\
MenuItem\
{\
Identifier = SID_MASTER_LAYOUTS_HANDOUTS ; \
- HelpID = SID_MASTER_LAYOUTS_HANDOUTS ; \
+ HelpId = CMD_SID_MASTER_LAYOUTS_HANDOUTS ; \
Text = "Handzettelmasterlayout..." ; \
};\
};\
@@ -351,7 +351,7 @@
MenuItem\
{\
Identifier = MN_SUB_VIEW ; \
- HelpID = MN_SUB_VIEW ; \
+ HelpID = HID_MN_SUB_VIEW ; \
Command = ".uno:WorkspaceMenu" ; \
Text [ en-US ] = "Wor~kspace" ; \
SubMenu = Menu\
@@ -371,7 +371,7 @@
MenuItem\
{\
Identifier = MN_SUB_MASTERPAGE ; \
- HelpID = MN_SUB_MASTERPAGE ; \
+ HelpID = HID_MN_SUB_MASTERPAGE ; \
Command = ".uno:MasterPageMenu" ; \
Text [ en-US ] = "~Master" ; \
SubMenu = Menu\
@@ -390,7 +390,7 @@
//
#define MN_INSERT \
Identifier = 21 ; \
- HelpID = 21 ; \
+ HelpID = "what a hack" ; \
Command = ".uno:InsertMenu" ; \
Text [ en-US ] = "~Insert" ; \
@@ -398,7 +398,7 @@
MenuItem\
{\
Identifier = SID_INSERTPAGE ; \
- HelpID = SID_INSERTPAGE ; \
+ HelpId = CMD_SID_INSERTPAGE ; \
Text [ en-US ] = "Slid~e..." ; \
};
@@ -406,7 +406,7 @@
MenuItem\
{\
Identifier = SID_INSERTPAGE ; \
- HelpID = SID_INSERTPAGE ; \
+ HelpId = CMD_SID_INSERTPAGE ; \
Text [ en-US ] = "Slid~e" ; \
};
@@ -414,7 +414,7 @@
MenuItem\
{\
Identifier = SID_DUPLICATE_PAGE ; \
- HelpID = SID_DUPLICATE_PAGE ; \
+ HelpId = CMD_SID_DUPLICATE_PAGE ; \
Text [ en-US ] = "D~uplicate Slide" ; \
};
@@ -422,7 +422,7 @@
MenuItem\
{\
Identifier = SID_EXPAND_PAGE ; \
- HelpID = SID_EXPAND_PAGE ; \
+ HelpId = CMD_SID_EXPAND_PAGE ; \
Text [ en-US ] = "E~xpand Slide" ; \
};
@@ -430,7 +430,7 @@
MenuItem\
{\
Identifier = SID_SUMMARY_PAGE ; \
- HelpID = SID_SUMMARY_PAGE ; \
+ HelpId = CMD_SID_SUMMARY_PAGE ; \
Text [ en-US ] = "Su~mmary Slide" ; \
};
@@ -438,7 +438,7 @@
MenuItem\
{\
Identifier = SID_INSERTLAYER ; \
- HelpID = SID_INSERTLAYER ; \
+ HelpId = CMD_SID_INSERTLAYER ; \
Text [ en-US ] = "~Layer..." ; \
};
@@ -446,7 +446,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_DATE_FIX ; \
- HelpID = SID_INSERT_FLD_DATE_FIX ; \
+ HelpId = CMD_SID_INSERT_FLD_DATE_FIX ; \
Text [ en-US ] = "~Date (fixed)" ; \
};
@@ -454,7 +454,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_DATE_VAR ; \
- HelpID = SID_INSERT_FLD_DATE_VAR ; \
+ HelpId = CMD_SID_INSERT_FLD_DATE_VAR ; \
Text [ en-US ] = "Dat~e (variable)" ; \
};
@@ -462,7 +462,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_TIME_FIX ; \
- HelpID = SID_INSERT_FLD_TIME_FIX ; \
+ HelpId = CMD_SID_INSERT_FLD_TIME_FIX ; \
Text [ en-US ] = "~Time (fixed)" ; \
};
@@ -470,7 +470,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_TIME_VAR ; \
- HelpID = SID_INSERT_FLD_TIME_VAR ; \
+ HelpId = CMD_SID_INSERT_FLD_TIME_VAR ; \
Text [ en-US ] = "T~ime (variable)" ; \
};
@@ -478,7 +478,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_PAGE ; \
- HelpID = SID_INSERT_FLD_PAGE ; \
+ HelpId = CMD_SID_INSERT_FLD_PAGE ; \
Text [ en-US ] = "~Page Number" ; \
};
@@ -486,7 +486,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_FILE ; \
- HelpID = SID_INSERT_FLD_FILE ; \
+ HelpId = CMD_SID_INSERT_FLD_FILE ; \
Text [ en-US ] = "~File Name" ; \
};
@@ -494,7 +494,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLD_AUTHOR ; \
- HelpID = SID_INSERT_FLD_AUTHOR ; \
+ HelpId = CMD_SID_INSERT_FLD_AUTHOR ; \
Text [ en-US ] = "~Author" ; \
};
@@ -502,7 +502,7 @@
MenuItem\
{\
Identifier = SID_TWAIN_SELECT ; \
- HelpID = SID_TWAIN_SELECT ; \
+ HelpId = CMD_SID_TWAIN_SELECT ; \
Text [ en-US ] = "~Select Source..." ; \
};
@@ -510,7 +510,7 @@
MenuItem\
{\
Identifier = SID_TWAIN_TRANSFER ; \
- HelpID = SID_TWAIN_TRANSFER ; \
+ HelpId = CMD_SID_TWAIN_TRANSFER ; \
Text [ en-US ] = "~Request..." ; \
};
@@ -518,7 +518,7 @@
MenuItem\
{\
Identifier = SID_ATTR_TABLE ; \
- HelpID = SID_ATTR_TABLE ; \
+ HelpId = CMD_SID_ATTR_TABLE ; \
Text [ en-US ] = "Sp~readsheet" ; \
};
@@ -533,7 +533,7 @@
MenuItem\
{\
Identifier = SID_INSERT_DIAGRAM ; \
- HelpID = SID_INSERT_DIAGRAM ; \
+ HelpId = CMD_SID_INSERT_DIAGRAM ; \
Text [ en-US ] = "Chart" ; \
};
@@ -541,7 +541,7 @@
MenuItem\
{\
Identifier = SID_INSERT_FLOATINGFRAME ; \
- HelpID = SID_INSERT_FLOATINGFRAME ; \
+ HelpId = CMD_SID_INSERT_FLOATINGFRAME ; \
Text [ en-US ] = "Float~ing Frame..." ; \
};
@@ -549,7 +549,7 @@
MenuItem\
{\
Identifier = SID_INSERTFILE ; \
- HelpID = SID_INSERTFILE ; \
+ HelpId = CMD_SID_INSERTFILE ; \
Text [ en-US ] = "~File..." ; \
};
@@ -557,7 +557,7 @@
MenuItem\
{\
Identifier = MN_SUB_FIELD ; \
- HelpID = MN_SUB_FIELD ; \
+ HelpID = HID_MN_SUB_FIELD ; \
Command = ".uno:FieldMenu" ; \
Text [ en-US ] = "Fiel~ds" ; \
SubMenu = Menu\
@@ -591,7 +591,7 @@
//
#define MN_FORMAT \
Identifier = 22 ; \
- HelpID = 22 ; \
+ HelpID = "what a hack!" ; \
Command = ".uno:FormatMenu" ; \
Text [ en-US ] = "F~ormat" ; \
@@ -599,7 +599,7 @@
MenuItem\
{\
Identifier = SID_TEXTATTR_DLG ; \
- HelpID = SID_TEXTATTR_DLG ; \
+ HelpId = CMD_SID_TEXTATTR_DLG ; \
Text [ en-US ] = "Te~xt..." ; \
};
@@ -607,7 +607,7 @@
MenuItem\
{\
Identifier = SID_MEASURE_DLG ; \
- HelpID = SID_MEASURE_DLG ; \
+ HelpId = CMD_SID_MEASURE_DLG ; \
Text [ en-US ] = "Dimen~sions..." ; \
};
@@ -615,7 +615,7 @@
MenuItem\
{\
Identifier = SID_CONNECTION_DLG ; \
- HelpID = SID_CONNECTION_DLG ; \
+ HelpId = CMD_SID_CONNECTION_DLG ; \
Text [ en-US ] = "~Connector..." ; \
};
@@ -623,7 +623,7 @@
MenuItem\
{\
Identifier = SID_MODIFYLAYER ; \
- HelpID = SID_MODIFYLAYER ; \
+ HelpId = CMD_SID_MODIFYLAYER ; \
Text [ en-US ] = "~Layer..." ; \
};
@@ -632,7 +632,7 @@
MenuItem\
{\
Identifier = SID_MODIFYPAGE ; \
- HelpID = SID_MODIFYPAGE ; \
+ HelpId = CMD_SID_MODIFYPAGE ; \
Text [ en-US ] = "Modify ~Layout..." ; \
};
@@ -640,7 +640,7 @@
MenuItem\
{\
Identifier = MN_SUB_TEMPLATES ; \
- HelpID = MN_SUB_TEMPLATES ; \
+ HelpID = HID_MN_SUB_TEMPLATES ; \
Command = ".uno:TemplatesMenu" ; \
Text [ en-US ] = "Styl~es" ; \
SubMenu = Menu\
@@ -658,7 +658,7 @@
//
#define MN_EXTRAS \
Identifier = ITEM_TOOLS_ID ; \
- HelpID = 25 ; \
+ HelpID = "what a hack!" ; \
Command = ".uno:ToolsMenu" ; \
Text [ en-US ] = "~Tools" ; \
@@ -667,7 +667,7 @@
//
#define MN_SLIDESHOW \
Identifier = 26 ; \
- HelpID = 26 ; \
+ HelpID = "what a hack!" ; \
Command = ".uno:SlideShowMenu" ; \
Text [ en-US ] = "~Slide Show" ; \
@@ -675,7 +675,7 @@
MenuItem\
{\
Identifier = SID_SPELL_DIALOG ; \
- HelpID = SID_SPELL_DIALOG ; \
+ HelpId = CMD_SID_SPELL_DIALOG ; \
Text [ en-US ] = "~Check..." ; \
};
@@ -683,7 +683,7 @@
MenuItem\
{\
Identifier = SID_AUTOSPELL_CHECK ; \
- HelpID = SID_AUTOSPELL_CHECK ; \
+ HelpId = CMD_SID_AUTOSPELL_CHECK ; \
Text [ en-US ] = "~AutoSpellcheck" ; \
};
@@ -691,7 +691,7 @@
MenuItem\
{\
Identifier = SID_THESAURUS ; \
- HelpID = SID_THESAURUS ; \
+ HelpId = CMD_SID_THESAURUS ; \
Text [ en-US ] = "~Thesaurus..." ; \
};
@@ -699,7 +699,7 @@
MenuItem\
{\
Identifier = SID_HYPHENATION ; \
- HelpID = SID_HYPHENATION ; \
+ HelpId = CMD_SID_HYPHENATION ; \
Text [ en-US ] = "~Hyphenation" ; \
};
@@ -707,7 +707,7 @@
MenuItem\
{\
Identifier = SID_AUTO_CORRECT_DLG ; \
- HelpID = SID_AUTO_CORRECT_DLG ; \
+ HelpId = CMD_SID_AUTO_CORRECT_DLG ; \
Text [ en-US ] = "~AutoCorrect..." ; \
};
@@ -715,7 +715,7 @@
MenuItem\
{\
Identifier = SID_PRESENTATION_DLG ; \
- HelpID = SID_PRESENTATION_DLG ; \
+ HelpId = CMD_SID_PRESENTATION_DLG ; \
Text [ en-US ] = "~Slide Show Settings..." ; \
};
@@ -723,7 +723,7 @@
MenuItem\
{\
Identifier = SID_CUSTOMSHOW_DLG ; \
- HelpID = SID_CUSTOMSHOW_DLG ; \
+ HelpId = CMD_SID_CUSTOMSHOW_DLG ; \
Text [ en-US ] = "~Custom Slide Show..." ; \
};
@@ -731,7 +731,7 @@
MenuItem\
{\
Identifier = SID_ANIMATION_OBJECTS ; \
- HelpID = SID_ANIMATION_OBJECTS ; \
+ HelpId = CMD_SID_ANIMATION_OBJECTS ; \
Text [ en-US ] = "~Animation" ; \
};
@@ -739,7 +739,7 @@
MenuItem\
{\
Identifier = SID_ANIMATION_EFFECTS ; \
- HelpID = SID_ANIMATION_EFFECTS ; \
+ HelpId = CMD_SID_ANIMATION_EFFECTS ; \
Text [ en-US ] = "~Interaction..." ; \
};
@@ -747,7 +747,7 @@
MenuItem\
{\
Identifier = MN_SUB_SPELLING ; \
- HelpID = MN_SUB_SPELLING ; \
+ HelpID = HID_MN_SUB_SPELLING ; \
Command = ".uno:SpellingMenu" ; \
Text [ en-US ] = "~Spellcheck" ; \
SubMenu = Menu\
@@ -764,7 +764,7 @@
//
#define MN_MODIFY \
Identifier = 24 ; \
- HelpID = 24 ; \
+ HelpID = "what a hack!" ; \
Command = ".uno:ModifyMenu" ; \
Text [ en-US ] = "~Modify" ; \
@@ -772,7 +772,7 @@
MenuItem\
{\
Identifier = SID_MOREFRONT ; \
- HelpID = SID_MOREFRONT ; \
+ HelpId = CMD_SID_MOREFRONT ; \
Text [ en-US ] = "Bring ~Forward" ; \
};
@@ -780,7 +780,7 @@
MenuItem\
{\
Identifier = SID_MOREBACK ; \
- HelpID = SID_MOREBACK ; \
+ HelpId = CMD_SID_MOREBACK ; \
Text [ en-US ] = "Send Back~ward" ; \
};
@@ -788,7 +788,7 @@
MenuItem\
{\
Identifier = SID_BEFORE_OBJ ; \
- HelpID = SID_BEFORE_OBJ ; \
+ HelpId = CMD_SID_BEFORE_OBJ ; \
Text [ en-US ] = "In Front of ~Object" ; \
};
@@ -796,7 +796,7 @@
MenuItem\
{\
Identifier = SID_BEHIND_OBJ ; \
- HelpID = SID_BEHIND_OBJ ; \
+ HelpId = CMD_SID_BEHIND_OBJ ; \
Text [ en-US ] = "Be~hind Object" ; \
};
@@ -804,7 +804,7 @@
MenuItem\
{\
Identifier = SID_REVERSE_ORDER ; \
- HelpID = SID_REVERSE_ORDER ; \
+ HelpId = CMD_SID_REVERSE_ORDER ; \
Text [ en-US ] = "~Reverse" ; \
};
@@ -812,7 +812,7 @@
MenuItem\
{\
Identifier = SID_BMPMASK ; \
- HelpID = SID_BMPMASK ; \
+ HelpId = CMD_SID_BMPMASK ; \
Text [ en-US ] = "~Eyedropper" ; \
};
@@ -820,7 +820,7 @@
MenuItem\
{\
Identifier = SID_GALLERY; \
- HelpID = SID_GALLERY; \
+ HelpId = CMD_SID_GALLERY; \
Text [ en-US ] = "~Gallery" ; \
};
@@ -828,7 +828,7 @@
MenuItem\
{\
Identifier = SID_OUTPUT_QUALITY_COLOR ; \
- HelpID = SID_OUTPUT_QUALITY_COLOR ; \
+ HelpId = CMD_SID_OUTPUT_QUALITY_COLOR ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Color" ; \
};
@@ -837,7 +837,7 @@
MenuItem\
{\
Identifier = SID_OUTPUT_QUALITY_GRAYSCALE ; \
- HelpID = SID_OUTPUT_QUALITY_GRAYSCALE ; \
+ HelpId = CMD_SID_OUTPUT_QUALITY_GRAYSCALE ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Grayscale" ; \
};
@@ -846,7 +846,7 @@
MenuItem\
{\
Identifier = SID_OUTPUT_QUALITY_BLACKWHITE ; \
- HelpID = SID_OUTPUT_QUALITY_BLACKWHITE ; \
+ HelpId = CMD_SID_OUTPUT_QUALITY_BLACKWHITE ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Black and White" ; \
};
@@ -855,7 +855,7 @@
MenuItem\
{\
Identifier = SID_OUTPUT_QUALITY_CONTRAST ; \
- HelpID = SID_OUTPUT_QUALITY_CONTRAST ; \
+ HelpId = CMD_SID_OUTPUT_QUALITY_CONTRAST ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~High Contrast";\
};
@@ -864,7 +864,7 @@
MenuItem\
{\
Identifier = SID_PREVIEW_QUALITY_COLOR ; \
- HelpID = SID_PREVIEW_QUALITY_COLOR ; \
+ HelpId = CMD_SID_PREVIEW_QUALITY_COLOR ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Color" ; \
};
@@ -873,7 +873,7 @@
MenuItem\
{\
Identifier = SID_PREVIEW_QUALITY_GRAYSCALE ; \
- HelpID = SID_PREVIEW_QUALITY_GRAYSCALE ; \
+ HelpId = CMD_SID_PREVIEW_QUALITY_GRAYSCALE ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Grayscale" ; \
};
@@ -882,7 +882,7 @@
MenuItem\
{\
Identifier = SID_PREVIEW_QUALITY_BLACKWHITE ; \
- HelpID = SID_PREVIEW_QUALITY_BLACKWHITE ; \
+ HelpId = CMD_SID_PREVIEW_QUALITY_BLACKWHITE ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Black and White" ; \
};
@@ -891,7 +891,7 @@
MenuItem\
{\
Identifier = SID_PREVIEW_QUALITY_CONTRAST ; \
- HelpID = SID_PREVIEW_QUALITY_CONTRAST ; \
+ HelpId = CMD_SID_PREVIEW_QUALITY_CONTRAST ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~High Contrast";\
};
@@ -900,7 +900,7 @@
MenuItem\
{\
Identifier = MN_SUB_POSITION ; \
- HelpID = MN_SUB_POSITION ; \
+ HelpID = HID_MN_SUB_POSITION ; \
Command = ".uno:ArrangeMenu" ; \
Text [ en-US ] = "~Arrange" ; \
SubMenu = Menu\
@@ -943,7 +943,7 @@
MenuItem\
{\
Identifier = MN_SUB_OUTPUT_QUALITY ; \
- HelpID = MN_SUB_OUTPUT_QUALITY ; \
+ HelpID = HID_MN_SUB_OUTPUT_QUALITY ; \
Command = ".uno:DisplayQualityMenu" ; \
SubMenu = Menu\
{\
@@ -962,7 +962,7 @@
MenuItem\
{\
Identifier = MN_SUB_PREVIEW_OUTPUT_QUALITY ; \
- HelpID = MN_SUB_PREVIEW_OUTPUT_QUALITY ; \
+ HelpID = HID_MN_SUB_PREVIEW_OUTPUT_QUALITY ; \
Command = ".uno:PreviewDisplayQualityMenu" ; \
SubMenu = Menu\
{\
diff --git a/sd/source/ui/app/menuids3_tmpl.src b/sd/source/ui/app/menuids3_tmpl.src
index 6e97f653d095..67fee7ff2bc6 100644
--- a/sd/source/ui/app/menuids3_tmpl.src
+++ b/sd/source/ui/app/menuids3_tmpl.src
@@ -32,7 +32,7 @@
MenuItem\
{\
Identifier = SID_CHANGEBEZIER ; \
- HelpID = SID_CHANGEBEZIER ; \
+ HelpId = CMD_SID_CHANGEBEZIER ; \
Text [ en-US ] = "To ~Curve" ; \
};
@@ -40,7 +40,7 @@
MenuItem\
{\
Identifier = SID_CHANGEPOLYGON ; \
- HelpID = SID_CHANGEPOLYGON ; \
+ HelpId = CMD_SID_CHANGEPOLYGON ; \
Text [ en-US ] = "To ~Polygon" ; \
};
@@ -48,7 +48,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_CONTOUR ; \
- HelpID = SID_CONVERT_TO_CONTOUR ; \
+ HelpId = CMD_SID_CONVERT_TO_CONTOUR ; \
Text [ en-US ] = "To C~ontour";\
};
@@ -56,7 +56,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_3D ; \
- HelpID = SID_CONVERT_TO_3D ; \
+ HelpId = CMD_SID_CONVERT_TO_3D ; \
Text [ en-US ] = "To 3~D" ; \
};
@@ -64,7 +64,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_BITMAP ; \
- HelpID = SID_CONVERT_TO_BITMAP ; \
+ HelpId = CMD_SID_CONVERT_TO_BITMAP ; \
Text [ en-US ] = "To ~Bitmap" ; \
};
@@ -72,7 +72,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_METAFILE ; \
- HelpID = SID_CONVERT_TO_METAFILE ; \
+ HelpId = CMD_SID_CONVERT_TO_METAFILE ; \
Text [ en-US ] = "To ~Metafile" ; \
};
@@ -80,7 +80,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_3D_LATHE_FAST ; \
- HelpID = SID_CONVERT_TO_3D_LATHE_FAST ; \
+ HelpId = CMD_SID_CONVERT_TO_3D_LATHE_FAST ; \
Text [ en-US ] = "To 3D ~Rotation Object" ; \
};
@@ -88,7 +88,7 @@
MenuItem\
{\
Identifier = SID_VERTICAL ; \
- HelpID = SID_VERTICAL ; \
+ HelpId = CMD_SID_VERTICAL ; \
Text [ en-US ] = "~Vertically" ; \
};
@@ -96,7 +96,7 @@
MenuItem\
{\
Identifier = SID_HORIZONTAL ; \
- HelpID = SID_HORIZONTAL ; \
+ HelpId = CMD_SID_HORIZONTAL ; \
Text [ en-US ] = "~Horizontally" ; \
};
@@ -104,7 +104,7 @@
MenuItem\
{\
Identifier = SID_3D_WIN ; \
- HelpID = SID_3D_WIN ; \
+ HelpId = CMD_SID_3D_WIN ; \
Text [ en-US ] = "~3D Effects" ; \
};
@@ -112,7 +112,7 @@
MenuItem\
{\
Identifier = SID_PRESENTATION_LAYOUT ; \
- HelpID = SID_PRESENTATION_LAYOUT ; \
+ HelpId = CMD_SID_PRESENTATION_LAYOUT ; \
Text [ en-US ] = "~Slide Design" ; \
};
@@ -120,7 +120,7 @@
MenuItem\
{\
Identifier = SID_SLIDE_TRANSITIONS_PANEL ; \
- HelpID = SID_SLIDE_TRANSITIONS_PANEL ; \
+ HelpId = CMD_SID_SLIDE_TRANSITIONS_PANEL ; \
Text [ en-US ] = "Slide ~Transition" ; \
};
@@ -128,7 +128,7 @@
MenuItem\
{\
Identifier = SID_SHOW_SLIDE ; \
- HelpID = SID_SHOW_SLIDE ; \
+ HelpId = CMD_SID_SHOW_SLIDE ; \
Text [ en-US ] = "~Show Slide" ; \
};
@@ -136,7 +136,7 @@
MenuItem\
{\
Identifier = SID_HIDE_SLIDE ; \
- HelpID = SID_HIDE_SLIDE ; \
+ HelpId = CMD_SID_HIDE_SLIDE ; \
Text [ en-US ] = "~Hide Slide" ; \
};
@@ -144,7 +144,7 @@
MenuItem\
{\
Identifier = SID_GROUP ; \
- HelpID = SID_GROUP ; \
+ HelpId = CMD_SID_GROUP ; \
Text [ en-US ] = "~Group" ; \
};
@@ -152,7 +152,7 @@
MenuItem\
{\
Identifier = SID_UNGROUP ; \
- HelpID = SID_UNGROUP ; \
+ HelpId = CMD_SID_UNGROUP ; \
Text [ en-US ] = "~Ungroup" ; \
};
@@ -160,7 +160,7 @@
MenuItem\
{\
Identifier = SID_ENTER_GROUP ; \
- HelpID = SID_ENTER_GROUP ; \
+ HelpId = CMD_SID_ENTER_GROUP ; \
Text [ en-US ] = "~Edit Group" ; \
};
@@ -168,7 +168,7 @@
MenuItem\
{\
Identifier = SID_LEAVE_GROUP ; \
- HelpID = SID_LEAVE_GROUP ; \
+ HelpId = CMD_SID_LEAVE_GROUP ; \
Text [ en-US ] = "E~xit group" ; \
};
@@ -176,7 +176,7 @@
MenuItem\
{\
Identifier = MN_SUB_GROUP ; \
- HelpID = MN_SUB_GROUP ; \
+ HelpID = HID_MN_SUB_GROUP ; \
Command = ".uno:GroupMenu" ; \
Text [ en-US ] = "~Group" ; \
SubMenu = Menu\
diff --git a/sd/source/ui/app/menuids4_tmpl.src b/sd/source/ui/app/menuids4_tmpl.src
index 9b077db8f22f..61a43aa6d8ba 100644
--- a/sd/source/ui/app/menuids4_tmpl.src
+++ b/sd/source/ui/app/menuids4_tmpl.src
@@ -36,7 +36,7 @@
MenuItem\
{\
Identifier = MN_SUB_GRAPHIC ; \
- HelpID = MN_SUB_GRAPHIC ; \
+ HelpID = HID_MN_SUB_GRAPHIC ; \
Text [ en-US ] = "~Graphics" ; \
SubMenu = Menu\
{\
diff --git a/sd/source/ui/app/menuids_tmpl.src b/sd/source/ui/app/menuids_tmpl.src
index e51d31c5c354..aa00ce1505bb 100644
--- a/sd/source/ui/app/menuids_tmpl.src
+++ b/sd/source/ui/app/menuids_tmpl.src
@@ -27,6 +27,8 @@
#include <svx/dialogs.hrc>
#include "app.hrc"
#include "res_bmp.hrc"
+#include "helpids.h"
+
#define SEPARATOR MenuItem { Separator = TRUE; };
// DUMMY ist eine ID wo ein SubMenu folgt
// (muss jeweils immer erhoeht werden!)
@@ -37,7 +39,7 @@
MenuItem\
{\
Identifier = SID_DISTRIBUTE_DLG ; \
- HelpID = SID_DISTRIBUTE_DLG ; \
+ HelpId = CMD_SID_DISTRIBUTE_DLG ; \
Text [ en-US ] = "~Distribution..." ; \
};
@@ -45,7 +47,7 @@
MenuItem\
{\
Identifier = SID_DRAWINGMODE ; \
- HelpID = SID_DRAWINGMODE ; \
+ HelpId = CMD_SID_DRAWINGMODE ; \
Check = TRUE ; \
Text [ en-US ] = "~Drawing View" ; \
};
@@ -54,7 +56,7 @@
MenuItem\
{\
Identifier = SID_OUTLINEMODE ; \
- HelpID = SID_OUTLINEMODE ; \
+ HelpId = CMD_SID_OUTLINEMODE ; \
Check = TRUE ; \
Text [ en-US ] = "~Outline View" ; \
};
@@ -63,7 +65,7 @@
MenuItem\
{\
Identifier = SID_DIAMODE ; \
- HelpID = SID_DIAMODE ; \
+ HelpId = CMD_SID_DIAMODE ; \
Check = TRUE ; \
Text [ en-US ] = "~Slide Sorter" ; \
};
@@ -72,7 +74,7 @@
MenuItem\
{\
Identifier = SID_PRESENTATION ; \
- HelpID = SID_PRESENTATION ; \
+ HelpId = CMD_SID_PRESENTATION ; \
Text [ en-US ] = "Slide Sho~w" ; \
};
@@ -80,7 +82,7 @@
MenuItem\
{\
Identifier = SID_CAPTUREPOINT ; \
- HelpID = SID_CAPTUREPOINT ; \
+ HelpId = CMD_SID_CAPTUREPOINT ; \
Text [ en-US ] = "~Insert Snap Point/Line..." ; \
};
@@ -88,7 +90,7 @@
MenuItem\
{\
Identifier = SID_SET_SNAPITEM ; \
- HelpID = SID_SET_SNAPITEM ; \
+ HelpId = CMD_SID_SET_SNAPITEM ; \
Text [ en-US ] = "~Edit..." ; \
};
@@ -96,7 +98,7 @@
MenuItem\
{\
Identifier = SID_DELETE_SNAPITEM ; \
- HelpID = SID_DELETE_SNAPITEM ; \
+ HelpId = CMD_SID_DELETE_SNAPITEM ; \
Text [ en-US ] = "~Delete" ; \
};
@@ -105,7 +107,7 @@
MenuItem\
{\
Identifier = SID_MODIFYPAGE ; \
- HelpID = SID_MODIFYPAGE ; \
+ HelpId = CMD_SID_MODIFYPAGE ; \
Text [ en-US ] = "Slide ~Layout" ; \
};
@@ -113,7 +115,7 @@
MenuItem\
{\
Identifier = SID_PAGESETUP ; \
- HelpID = SID_PAGESETUP ; \
+ HelpId = CMD_SID_PAGESETUP ; \
Text [ en-US ] = "~Page Setup..." ; \
};
@@ -122,7 +124,7 @@
MenuItem\
{\
Identifier = SID_INSERTPAGE ; \
- HelpID = SID_INSERTPAGE ; \
+ HelpId = CMD_SID_INSERTPAGE ; \
Text [ en-US ] = "~New Slide" ; \
};
@@ -130,7 +132,7 @@
MenuItem\
{\
Identifier = SID_INSERT_MASTER_PAGE ; \
- HelpID = SID_INSERT_MASTER_PAGE ; \
+ HelpId = CMD_SID_INSERT_MASTER_PAGE ; \
Text [ en-US ] = "~New Master" ; \
};
@@ -138,28 +140,28 @@
MenuItem\
{\
Identifier = SID_INSERTPAGE ; \
- HelpID = SID_INSERTPAGE ; \
+ HelpId = CMD_SID_INSERTPAGE ; \
Text [ en-US ] = "~New Page" ; \
};
#define MN_SELECT_BACKGROUND \
MenuItem\
{\
Identifier = SID_SELECT_BACKGROUND ; \
- HelpID = SID_SELECT_BACKGROUND ; \
+ HelpId = CMD_SID_SELECT_BACKGROUND ; \
Text [ en-US ] = "Set Background Picture for Slide ..." ; \
};
#define MN_DISPLAY_MASTER_BACKGROUND \
MenuItem\
{\
Identifier = SID_DISPLAY_MASTER_BACKGROUND ; \
- HelpID = SID_DISPLAY_MASTER_BACKGROUND ; \
+ HelpId = CMD_SID_DISPLAY_MASTER_BACKGROUND ; \
Text [ en-US ] = "Display Background of Master" ; \
};
#define MN_DISPLAY_MASTER_OBJECTS \
MenuItem\
{\
Identifier = SID_DISPLAY_MASTER_OBJECTS ; \
- HelpID = SID_DISPLAY_MASTER_OBJECTS ; \
+ HelpId = CMD_SID_DISPLAY_MASTER_OBJECTS ; \
Text [ en-US ] = "Display Objects from Master" ; \
};
@@ -214,7 +216,7 @@
MenuItem\
{\
Identifier = SID_RENAMELAYER ; \
- HelpID = SID_RENAMELAYER ; \
+ HelpId = CMD_SID_RENAMELAYER ; \
Text [ en-US ] = "~Rename Layer..." ; \
};
@@ -222,7 +224,7 @@
MenuItem\
{\
Identifier = SID_DELETE_PAGE ; \
- HelpID = SID_DELETE_PAGE ; \
+ HelpId = CMD_SID_DELETE_PAGE ; \
Text [ en-US ] = "D~elete Slide" ; \
};
@@ -230,7 +232,7 @@
MenuItem\
{\
Identifier = SID_DELETE_MASTER_PAGE ; \
- HelpID = SID_DELETE_MASTER_PAGE ; \
+ HelpId = CMD_SID_DELETE_MASTER_PAGE ; \
Text [ en-US ] = "D~elete Master" ; \
};
@@ -240,7 +242,7 @@
MenuItem\
{\
Identifier = SID_DELETE_PAGE ; \
- HelpID = SID_DELETE_PAGE ; \
+ HelpId = CMD_SID_DELETE_PAGE ; \
Text [ en-US ] = "D~elete Page" ; \
};
@@ -248,7 +250,7 @@
MenuItem\
{\
Identifier = SID_RENAMEPAGE ; \
- HelpID = SID_RENAMEPAGE ; \
+ HelpId = CMD_SID_RENAMEPAGE ; \
Text [ en-US ] = "~Rename Slide" ; \
};
@@ -256,7 +258,7 @@
MenuItem\
{\
Identifier = SID_RENAME_MASTER_PAGE ; \
- HelpID = SID_RENAME_MASTER_PAGE ; \
+ HelpId = CMD_SID_RENAME_MASTER_PAGE ; \
Text [ en-US ] = "~Rename Master" ; \
};
@@ -264,7 +266,7 @@
MenuItem\
{\
Identifier = SID_RENAMEPAGE ; \
- HelpID = SID_RENAMEPAGE ; \
+ HelpId = CMD_SID_RENAMEPAGE ; \
Text [ en-US ] = "~Rename Page" ; \
};
@@ -273,7 +275,7 @@
MenuItem\
{\
Identifier = SID_ATTRIBUTES_LINE ; \
- HelpID = SID_ATTRIBUTES_LINE ; \
+ HelpId = CMD_SID_ATTRIBUTES_LINE ; \
Text [ en-US ] = "L~ine..." ; \
};
@@ -281,7 +283,7 @@
MenuItem\
{\
Identifier = SID_ATTRIBUTES_AREA ; \
- HelpID = SID_ATTRIBUTES_AREA ; \
+ HelpId = CMD_SID_ATTRIBUTES_AREA ; \
Text [ en-US ] = "~Area..." ; \
};
@@ -289,7 +291,7 @@
MenuItem\
{\
Identifier = SID_TEXTATTR_DLG ; \
- HelpID = SID_TEXTATTR_DLG ; \
+ HelpId = CMD_SID_TEXTATTR_DLG ; \
Text [ en-US ] = "~Text..." ; \
};
@@ -305,7 +307,7 @@
MenuItem\
{\
Identifier = SID_CONNECTION_DLG ; \
- HelpID = SID_CONNECTION_DLG ; \
+ HelpId = CMD_SID_CONNECTION_DLG ; \
Text [ en-US ] = "~Connector..." ; \
};
@@ -313,7 +315,7 @@
MenuItem\
{\
Identifier = SID_CONNECTION_NEW_ROUTING ; \
- HelpID = SID_CONNECTION_NEW_ROUTING ; \
+ HelpId = CMD_SID_CONNECTION_NEW_ROUTING ; \
Text [ en-US ] = "Reset ~Routing" ; \
};
@@ -321,7 +323,7 @@
MenuItem\
{\
Identifier = SID_MEASURE_DLG ; \
- HelpID = SID_MEASURE_DLG ; \
+ HelpId = CMD_SID_MEASURE_DLG ; \
Text [ en-US ] = "Dimen~sions..." ; \
};
@@ -329,7 +331,7 @@
MenuItem\
{\
Identifier = SID_ATTR_TRANSFORM ; \
- HelpID = SID_ATTR_TRANSFORM ; \
+ HelpId = CMD_SID_ATTR_TRANSFORM ; \
Text [ en-US ] = "Position and Si~ze..." ; \
};
@@ -337,7 +339,7 @@
MenuItem\
{\
Identifier = SID_BEZIER_EDIT ; \
- HelpID = SID_BEZIER_EDIT ; \
+ HelpId = CMD_SID_BEZIER_EDIT ; \
Text [ en-US ] = "Edit ~Points" ; \
};
@@ -346,7 +348,7 @@
MenuItem\
{\
Identifier = SID_POSITION ; \
- HelpID = SID_POSITION ; \
+ HelpId = CMD_SID_POSITION ; \
Command = ".uno:ObjectPosition"; \
Text [ en-US ] = "Arra~nge" ; \
SubMenu = Menu\
@@ -356,25 +358,25 @@
MenuItem\
{\
Identifier = SID_FRAME_TO_TOP ; \
- HelpID = SID_FRAME_TO_TOP ; \
+ HelpId = CMD_SID_FRAME_TO_TOP ; \
Text [ en-US ] = "~Bring to Front" ; \
};\
MenuItem\
{\
Identifier = SID_MOREFRONT ; \
- HelpID = SID_MOREFRONT ; \
+ HelpId = CMD_SID_MOREFRONT ; \
Text [ en-US ] = "Bring ~Forward" ; \
};\
MenuItem\
{\
Identifier = SID_MOREBACK ; \
- HelpID = SID_MOREBACK ; \
+ HelpId = CMD_SID_MOREBACK ; \
Text [ en-US ] = "Send Back~ward" ; \
};\
MenuItem\
{\
Identifier = SID_FRAME_TO_BOTTOM ; \
- HelpID = SID_FRAME_TO_BOTTOM ; \
+ HelpId = CMD_SID_FRAME_TO_BOTTOM ; \
Text [ en-US ] = "~Send to Back" ; \
};\
MenuItem\
@@ -384,13 +386,13 @@
MenuItem\
{\
Identifier = SID_BEFORE_OBJ ; \
- HelpID = SID_BEFORE_OBJ ; \
+ HelpId = CMD_SID_BEFORE_OBJ ; \
Text [ en-US ] = "In Front of ~Object" ; \
};\
MenuItem\
{\
Identifier = SID_BEHIND_OBJ ; \
- HelpID = SID_BEHIND_OBJ ; \
+ HelpId = CMD_SID_BEHIND_OBJ ; \
Text [ en-US ] = "Be~hind Object" ; \
};\
MenuItem\
@@ -400,7 +402,7 @@
MenuItem\
{\
Identifier = SID_REVERSE_ORDER ; \
- HelpID = SID_REVERSE_ORDER ; \
+ HelpId = CMD_SID_REVERSE_ORDER ; \
Text [ en-US ] = "~Reverse" ; \
};\
};\
@@ -412,7 +414,7 @@
MenuItem\
{\
Identifier = SID_CHAR_DLG ; \
- HelpID = SID_CHAR_DLG ; \
+ HelpId = CMD_SID_CHAR_DLG ; \
Text [ en-US ] = "C~haracter..." ; \
};
@@ -420,7 +422,7 @@
MN_CHAR \
MenuItem {\
Identifier = SID_PARA_DLG;\
- HelpID = SID_PARA_DLG;\
+ HelpId = CMD_SID_PARA_DLG;\
Text [ en-US ] = "P~aragraph...";\
};
@@ -428,13 +430,13 @@
MenuItem\
{\
Identifier = SID_ATTR_CHAR_FONT ; \
- HelpID = SID_ATTR_CHAR_FONT ; \
+ HelpId = CMD_SID_ATTR_CHAR_FONT ; \
Text [ en-US ] = "~Font" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_FONTHEIGHT ; \
- HelpID = SID_ATTR_CHAR_FONTHEIGHT ; \
+ HelpId = CMD_SID_ATTR_CHAR_FONTHEIGHT ; \
Text [ en-US ] = "~Size" ; \
};\
MenuItem\
@@ -449,43 +451,43 @@
MenuItem\
{\
Identifier = SID_ATTR_CHAR_WEIGHT ; \
- HelpID = SID_ATTR_CHAR_WEIGHT ; \
+ HelpId = CMD_SID_ATTR_CHAR_WEIGHT ; \
Text [ en-US ] = "Bold" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_POSTURE ; \
- HelpID = SID_ATTR_CHAR_POSTURE ; \
+ HelpId = CMD_SID_ATTR_CHAR_POSTURE ; \
Text [ en-US ] = "Italic" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_OVERLINE ; \
- HelpID = SID_ATTR_CHAR_OVERLINE ; \
+ HelpId = CMD_SID_ATTR_CHAR_OVERLINE ; \
Text [ en-US ] = "Overline" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_UNDERLINE ; \
- HelpID = SID_ATTR_CHAR_UNDERLINE ; \
+ HelpId = CMD_SID_ATTR_CHAR_UNDERLINE ; \
Text [ en-US ] = "Underline" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_STRIKEOUT ; \
- HelpID = SID_ATTR_CHAR_STRIKEOUT ; \
+ HelpId = CMD_SID_ATTR_CHAR_STRIKEOUT ; \
Text [ en-US ] = "Strikethrough" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_SHADOWED ; \
- HelpID = SID_ATTR_CHAR_SHADOWED ; \
+ HelpId = CMD_SID_ATTR_CHAR_SHADOWED ; \
Text [ en-US ] = "Shadow" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_CHAR_CONTOUR ; \
- HelpID = SID_ATTR_CHAR_CONTOUR ; \
+ HelpId = CMD_SID_ATTR_CHAR_CONTOUR ; \
Text [ en-US ] = "~Contour" ; \
};\
};\
@@ -505,21 +507,21 @@
MenuItem\
{\
Identifier = SID_ATTR_PARA_LINESPACE_10 ; \
- HelpID = SID_ATTR_PARA_LINESPACE_10 ; \
+ HelpId = CMD_SID_ATTR_PARA_LINESPACE_10 ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Single Line Spacing" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_PARA_LINESPACE_15 ; \
- HelpID = SID_ATTR_PARA_LINESPACE_15 ; \
+ HelpId = CMD_SID_ATTR_PARA_LINESPACE_15 ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "1.5 Lines" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_PARA_LINESPACE_20 ; \
- HelpID = SID_ATTR_PARA_LINESPACE_20 ; \
+ HelpId = CMD_SID_ATTR_PARA_LINESPACE_20 ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Double" ; \
};\
@@ -531,7 +533,7 @@
MenuItem\
{\
Identifier = SID_CHARMAP ; \
- HelpID = SID_CHARMAP ; \
+ HelpId = CMD_SID_CHARMAP ; \
Text [ en-US ] = "S~pecial Character..." ; \
};
@@ -549,28 +551,28 @@
MenuItem\
{\
Identifier = SID_ATTR_PARA_ADJUST_LEFT ; \
- HelpID = SID_ATTR_PARA_ADJUST_LEFT ; \
+ HelpId = CMD_SID_ATTR_PARA_ADJUST_LEFT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Left" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_PARA_ADJUST_RIGHT ; \
- HelpID = SID_ATTR_PARA_ADJUST_RIGHT ; \
+ HelpId = CMD_SID_ATTR_PARA_ADJUST_RIGHT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Right" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_PARA_ADJUST_CENTER ; \
- HelpID = SID_ATTR_PARA_ADJUST_CENTER ; \
+ HelpId = CMD_SID_ATTR_PARA_ADJUST_CENTER ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "~Centered" ; \
};\
MenuItem\
{\
Identifier = SID_ATTR_PARA_ADJUST_BLOCK ; \
- HelpID = SID_ATTR_PARA_ADJUST_BLOCK ; \
+ HelpId = CMD_SID_ATTR_PARA_ADJUST_BLOCK ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Justified" ; \
};\
@@ -584,7 +586,7 @@
{\
Identifier = SID_OBJECT_ALIGN ; \
Command = ".uno:AlignObjetMenu" ; \
- HelpID = SID_OBJECT_ALIGN ; \
+ HelpId = CMD_SID_OBJECT_ALIGN ; \
Text [ en-US ] = "Al~ignment" ; \
SubMenu = Menu\
{\
@@ -593,38 +595,38 @@
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN_LEFT ; \
- HelpID = SID_OBJECT_ALIGN_LEFT ; \
+ HelpId = CMD_SID_OBJECT_ALIGN_LEFT ; \
Text [ en-US ] = "~Left" ; \
};\
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN_CENTER ; \
- HelpID = SID_OBJECT_ALIGN_CENTER ; \
+ HelpId = CMD_SID_OBJECT_ALIGN_CENTER ; \
Text [ en-US ] = "~Centered" ; \
};\
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN_RIGHT ; \
- HelpID = SID_OBJECT_ALIGN_RIGHT ; \
+ HelpId = CMD_SID_OBJECT_ALIGN_RIGHT ; \
Text [ en-US ] = "~Right" ; \
};\
SEPARATOR\
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN_UP ; \
- HelpID = SID_OBJECT_ALIGN_UP ; \
+ HelpId = CMD_SID_OBJECT_ALIGN_UP ; \
Text [ en-US ] = "~Top" ; \
};\
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN_MIDDLE ; \
- HelpID = SID_OBJECT_ALIGN_MIDDLE ; \
+ HelpId = CMD_SID_OBJECT_ALIGN_MIDDLE ; \
Text [ en-US ] = "C~enter" ; \
};\
MenuItem\
{\
Identifier = SID_OBJECT_ALIGN_DOWN ; \
- HelpID = SID_OBJECT_ALIGN_DOWN ; \
+ HelpId = CMD_SID_OBJECT_ALIGN_DOWN ; \
Text [ en-US ] = "~Bottom" ; \
};\
};\
@@ -636,7 +638,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_CLOSE ; \
- HelpID = SID_OBJECT_CLOSE ; \
+ HelpId = CMD_SID_OBJECT_CLOSE ; \
Text [ en-US ] = "Close ~Object" ; \
};
@@ -644,71 +646,71 @@
MenuItem\
{\
Identifier = SID_BEZIER_EDIT ; \
- HelpID = SID_BEZIER_EDIT ; \
+ HelpId = CMD_SID_BEZIER_EDIT ; \
Text [ en-US ] = "Edit ~Points" ; \
};\
SEPARATOR\
MenuItem\
{\
Identifier = SID_BEZIER_MOVE ; \
- HelpID = SID_BEZIER_MOVE ; \
+ HelpId = CMD_SID_BEZIER_MOVE ; \
Text [ en-US ] = "~Move Points" ; \
};\
MenuItem\
{\
Identifier = SID_BEZIER_INSERT ; \
- HelpID = SID_BEZIER_INSERT ; \
+ HelpId = CMD_SID_BEZIER_INSERT ; \
Text [ en-US ] = "Insert ~Points" ; \
};\
MenuItem\
{\
Identifier = SID_BEZIER_DELETE ; \
- HelpID = SID_BEZIER_DELETE ; \
+ HelpId = CMD_SID_BEZIER_DELETE ; \
Text [ en-US ] = "~Delete Points" ; \
};\
SEPARATOR\
MenuItem\
{\
Identifier = SID_BEZIER_CLOSE ; \
- HelpID = SID_BEZIER_CLOSE ; \
+ HelpId = CMD_SID_BEZIER_CLOSE ; \
Text [ en-US ] = "Close ~Object" ; \
};\
MenuItem\
{\
Identifier = SID_BEZIER_CUTLINE ; \
- HelpID = SID_BEZIER_CUTLINE ; \
+ HelpId = CMD_SID_BEZIER_CUTLINE ; \
Text [ en-US ] = "~Split Curve" ; \
};\
MenuItem\
{\
Identifier = SID_BEZIER_CONVERT ; \
- HelpID = SID_BEZIER_CONVERT ; \
+ HelpId = CMD_SID_BEZIER_CONVERT ; \
Text [ en-US ] = "Con~vert to Curve" ; \
};\
SEPARATOR\
MenuItem\
{\
Identifier = SID_BEZIER_EDGE ; \
- HelpID = SID_BEZIER_EDGE ; \
+ HelpId = CMD_SID_BEZIER_EDGE ; \
Text [ en-US ] = "~Corner" ; \
};\
MenuItem\
{\
Identifier = SID_BEZIER_SMOOTH ; \
- HelpID = SID_BEZIER_SMOOTH ; \
+ HelpId = CMD_SID_BEZIER_SMOOTH ; \
Text [ en-US ] = "Smoot~h" ; \
};\
MenuItem\
{\
Identifier = SID_BEZIER_SYMMTR ; \
- HelpID = SID_BEZIER_SYMMTR ; \
+ HelpId = CMD_SID_BEZIER_SYMMTR ; \
Text [ en-US ] = "S~ymmetric" ; \
};\
SEPARATOR\
MenuItem\
{\
Identifier = SID_BEZIER_ELIMINATE_POINTS ; \
- HelpID = SID_BEZIER_ELIMINATE_POINTS ; \
+ HelpId = CMD_SID_BEZIER_ELIMINATE_POINTS ; \
Text [ en-US ] = "~Reduce Points" ; \
};
@@ -717,7 +719,7 @@
MenuItem\
{\
Identifier = SID_GROUP ; \
- HelpID = SID_GROUP ; \
+ HelpId = CMD_SID_GROUP ; \
Text [ en-US ] = "~Group" ; \
};
@@ -725,7 +727,7 @@
MenuItem\
{\
Identifier = SID_UNGROUP ; \
- HelpID = SID_UNGROUP ; \
+ HelpId = CMD_SID_UNGROUP ; \
Text [ en-US ] = "~Ungroup" ; \
};
@@ -733,7 +735,7 @@
MenuItem\
{\
Identifier = SID_COMBINE ; \
- HelpID = SID_COMBINE ; \
+ HelpId = CMD_SID_COMBINE ; \
Text [ en-US ] = "Comb~ine" ; \
};
@@ -741,7 +743,7 @@
MenuItem\
{\
Identifier = SID_DISMANTLE ; \
- HelpID = SID_DISMANTLE ; \
+ HelpId = CMD_SID_DISMANTLE ; \
Text [ en-US ] = "~Split" ; \
};
@@ -749,7 +751,7 @@
MenuItem\
{\
Identifier = SID_ENTER_GROUP ; \
- HelpID = SID_ENTER_GROUP ; \
+ HelpId = CMD_SID_ENTER_GROUP ; \
Text [ en-US ] = "~Enter Group" ; \
};
@@ -757,7 +759,7 @@
MenuItem\
{\
Identifier = SID_LEAVE_GROUP ; \
- HelpID = SID_LEAVE_GROUP ; \
+ HelpId = CMD_SID_LEAVE_GROUP ; \
Text [ en-US ] = "E~xit Group" ; \
};
@@ -765,7 +767,7 @@
MenuItem\
{\
Identifier = SID_NAME_GROUP ; \
- HelpID = SID_NAME_GROUP ; \
+ HelpId = CMD_SID_NAME_GROUP ; \
Text [ en-US ] = "Name..." ; \
};
@@ -774,7 +776,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_TITLE_DESCRIPTION; \
- HelpID = SID_OBJECT_TITLE_DESCRIPTION; \
+ HelpId = CMD_SID_OBJECT_TITLE_DESCRIPTION; \
Text [ en-US ] = "Description..." ; \
};
@@ -783,7 +785,7 @@
MenuItem\
{\
Identifier = SID_REHEARSE_TIMINGS ; \
- HelpID = SID_REHEARSE_TIMINGS ; \
+ HelpId = CMD_SID_REHEARSE_TIMINGS ; \
Text [ en-US ] = "~Rehearse Timings" ; \
};
@@ -791,7 +793,7 @@
MenuItem\
{\
Identifier = SID_CUSTOM_ANIMATION_PANEL ; \
- HelpID = SID_CUSTOM_ANIMATION_PANEL ; \
+ HelpId = CMD_SID_CUSTOM_ANIMATION_PANEL ; \
Text [ en-US ] = "Custom Animation..." ; \
};
@@ -799,7 +801,7 @@
MenuItem\
{\
Identifier = SID_ANIMATION_EFFECTS ; \
- HelpID = SID_ANIMATION_EFFECTS ; \
+ HelpId = CMD_SID_ANIMATION_EFFECTS ; \
Text [ en-US ] = "Int~eraction..." ; \
};
@@ -807,7 +809,7 @@
MenuItem\
{\
Identifier = SID_PRESENTATIONOBJECT ; \
- HelpID = SID_PRESENTATIONOBJECT ; \
+ HelpId = CMD_SID_PRESENTATIONOBJECT ; \
Text [ en-US ] = "Presentation ~Object..." ; \
};
@@ -816,7 +818,7 @@
MenuItem\
{\
Identifier = SID_DELETE ; \
- HelpID = SID_DELETE ; \
+ HelpId = CMD_SID_DELETE ; \
Text [ en-US ] = "~Delete" ; \
};
@@ -825,7 +827,7 @@
MenuItem\
{\
Identifier = SID_SET_DEFAULT ; \
- HelpID = SID_SET_DEFAULT ; \
+ HelpId = CMD_SID_SET_DEFAULT ; \
Text [ en-US ] = "~Default" ; \
};
@@ -833,7 +835,7 @@
MenuItem\
{\
Identifier = SID_FONTWORK ; \
- HelpID = SID_FONTWORK ; \
+ HelpId = CMD_SID_FONTWORK ; \
Text [ en-US ] = "F~ontwork" ; \
};
@@ -841,7 +843,7 @@
MenuItem\
{\
Identifier = SID_OBJECT ; \
- HelpID = SID_OBJECT ; \
+ HelpId = CMD_SID_OBJECT ; \
Text [ en-US ] = "~OLE Object" ; \
};
@@ -849,7 +851,7 @@
MenuItem\
{\
Identifier = SID_ORIGINAL_SIZE ; \
- HelpID = SID_ORIGINAL_SIZE ; \
+ HelpId = CMD_SID_ORIGINAL_SIZE ; \
Text [ en-US ] = "~Original Size" ; \
};
@@ -857,7 +859,7 @@
MenuItem\
{\
Identifier = SID_SAVEGRAPHIC ; \
- HelpID = SID_SAVEGRAPHIC ; \
+ HelpId = CMD_SID_SAVEGRAPHIC ; \
Text [ en-US ] = "Save as Picture..." ; \
};
@@ -865,7 +867,7 @@
MenuItem\
{\
Identifier = SID_ATTR_GRAF_CROP ; \
- HelpID = SID_ATTR_GRAF_CROP ; \
+ HelpId = CMD_SID_ATTR_GRAF_CROP ; \
Text [ en-US ] = "Crop Picture..." ; \
};
@@ -874,7 +876,7 @@
{\
Identifier = SID_NAVIGATOR ; \
Command = ".uno:Navigator" ; \
- HelpID = SID_NAVIGATOR ; \
+ HelpId = CMD_SID_NAVIGATOR ; \
Text [ en-US ] = "Na~vigator" ; \
};
@@ -882,7 +884,7 @@
MenuItem\
{\
Identifier = SID_GLUE_INSERT_POINT ; \
- HelpID = SID_GLUE_INSERT_POINT ; \
+ HelpId = CMD_SID_GLUE_INSERT_POINT ; \
Text [ en-US ] = "Insert ~Point" ; \
};
@@ -890,7 +892,7 @@
MenuItem\
{\
Identifier = SID_GLUE_ESCDIR_LEFT ; \
- HelpID = SID_GLUE_ESCDIR_LEFT ; \
+ HelpId = CMD_SID_GLUE_ESCDIR_LEFT ; \
Text [ en-US ] = "~Left" ; \
};
@@ -898,7 +900,7 @@
MenuItem\
{\
Identifier = SID_GLUE_ESCDIR_TOP ; \
- HelpID = SID_GLUE_ESCDIR_TOP ; \
+ HelpId = CMD_SID_GLUE_ESCDIR_TOP ; \
Text [ en-US ] = "~Top" ; \
};
@@ -906,7 +908,7 @@
MenuItem\
{\
Identifier = SID_GLUE_ESCDIR_RIGHT ; \
- HelpID = SID_GLUE_ESCDIR_RIGHT ; \
+ HelpId = CMD_SID_GLUE_ESCDIR_RIGHT ; \
Text [ en-US ] = "~Right" ; \
};
@@ -914,7 +916,7 @@
MenuItem\
{\
Identifier = SID_GLUE_ESCDIR_BOTTOM ; \
- HelpID = SID_GLUE_ESCDIR_BOTTOM ; \
+ HelpId = CMD_SID_GLUE_ESCDIR_BOTTOM ; \
Text [ en-US ] = "~Bottom" ; \
};
@@ -922,7 +924,7 @@
MenuItem\
{\
Identifier = SID_GLUE_PERCENT ; \
- HelpID = SID_GLUE_PERCENT ; \
+ HelpId = CMD_SID_GLUE_PERCENT ; \
Text [ en-US ] = "~Adapt Position to Object" ; \
};
@@ -930,7 +932,7 @@
MenuItem\
{\
Identifier = SID_GLUE_HORZALIGN_LEFT ; \
- HelpID = SID_GLUE_HORZALIGN_LEFT ; \
+ HelpId = CMD_SID_GLUE_HORZALIGN_LEFT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Fixed ~Horizontal Left" ; \
};
@@ -939,7 +941,7 @@
MenuItem\
{\
Identifier = SID_GLUE_HORZALIGN_CENTER ; \
- HelpID = SID_GLUE_HORZALIGN_CENTER ; \
+ HelpId = CMD_SID_GLUE_HORZALIGN_CENTER ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Fixed Horizontal ~Center" ; \
};
@@ -948,7 +950,7 @@
MenuItem\
{\
Identifier = SID_GLUE_HORZALIGN_RIGHT ; \
- HelpID = SID_GLUE_HORZALIGN_RIGHT ; \
+ HelpId = CMD_SID_GLUE_HORZALIGN_RIGHT ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Fixed Hori~zontal Right" ; \
};
@@ -957,7 +959,7 @@
MenuItem\
{\
Identifier = SID_GLUE_VERTALIGN_TOP ; \
- HelpID = SID_GLUE_VERTALIGN_TOP ; \
+ HelpId = CMD_SID_GLUE_VERTALIGN_TOP ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Fixed ~Vertical Top" ; \
};
@@ -966,7 +968,7 @@
MenuItem\
{\
Identifier = SID_GLUE_VERTALIGN_CENTER ; \
- HelpID = SID_GLUE_VERTALIGN_CENTER ; \
+ HelpId = CMD_SID_GLUE_VERTALIGN_CENTER ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Fixed V~ertical Center" ; \
};
@@ -975,7 +977,7 @@
MenuItem\
{\
Identifier = SID_GLUE_VERTALIGN_BOTTOM ; \
- HelpID = SID_GLUE_VERTALIGN_BOTTOM ; \
+ HelpId = CMD_SID_GLUE_VERTALIGN_BOTTOM ; \
RadioCheck = TRUE ; \
Text [ en-US ] = "Fixed Ver~tical Bottom" ; \
};
@@ -984,7 +986,7 @@
MenuItem\
{\
Identifier = SID_GRID_VISIBLE ; \
- HelpID = SID_GRID_VISIBLE ; \
+ HelpId = CMD_SID_GRID_VISIBLE ; \
Text [ en-US ] = "~Visible Grid" ; \
};
@@ -992,7 +994,7 @@
MenuItem\
{\
Identifier = SID_GRID_USE ; \
- HelpID = SID_GRID_USE; \
+ HelpId = CMD_SID_GRID_USE; \
Text [ en-US ] = "Snap to Grid"; \
};
@@ -1000,7 +1002,7 @@
MenuItem\
{\
Identifier = SID_GRID_FRONT ; \
- HelpID = SID_GRID_FRONT ; \
+ HelpId = CMD_SID_GRID_FRONT ; \
Text [ en-US ] = "Grid to ~Front" ; \
};
@@ -1025,7 +1027,7 @@
MenuItem\
{\
Identifier = SID_HELPLINES_VISIBLE ; \
- HelpID = SID_HELPLINES_VISIBLE ; \
+ HelpId = CMD_SID_HELPLINES_VISIBLE ; \
Text [ en-US ] = "~Snap Lines Visible" ; \
};
@@ -1033,7 +1035,7 @@
MenuItem\
{\
Identifier = SID_HELPLINES_USE ; \
- HelpID = SID_HELPLINES_USE ; \
+ HelpId = CMD_SID_HELPLINES_USE ; \
Text [ en-US ] = "Snap to Snap Lines"; \
};
@@ -1041,7 +1043,7 @@
MenuItem\
{\
Identifier = SID_HELPLINES_FRONT ; \
- HelpID = SID_HELPLINES_FRONT ; \
+ HelpId = CMD_SID_HELPLINES_FRONT ; \
Text [ en-US ] = "Snap Lines to Front" ; \
};
@@ -1066,7 +1068,7 @@
MenuItem\
{\
Identifier = SID_SHOW_BROWSER ; \
- HelpID = SID_SHOW_BROWSER ; \
+ HelpId = CMD_SID_SHOW_BROWSER ; \
Text [ en-US ] = "Propert~ies..." ; \
};
@@ -1074,7 +1076,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_1BIT_THRESHOLD ; \
- HelpID = SID_CONVERT_TO_1BIT_THRESHOLD ; \
+ HelpId = CMD_SID_CONVERT_TO_1BIT_THRESHOLD ; \
Text [ en-US ] = "1Bit ~Threshold" ; \
};
@@ -1082,7 +1084,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_1BIT_MATRIX ; \
- HelpID = SID_CONVERT_TO_1BIT_MATRIX ; \
+ HelpId = CMD_SID_CONVERT_TO_1BIT_MATRIX ; \
Text [ en-US ] = "1 Bit ~Dithering" ; \
};
@@ -1090,7 +1092,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_4BIT_GRAYS ; \
- HelpID = SID_CONVERT_TO_4BIT_GRAYS ; \
+ HelpId = CMD_SID_CONVERT_TO_4BIT_GRAYS ; \
Text [ en-US ] = "4 Bit G~rayscales" ; \
};
@@ -1098,7 +1100,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_4BIT_COLORS ; \
- HelpID = SID_CONVERT_TO_4BIT_COLORS ; \
+ HelpId = CMD_SID_CONVERT_TO_4BIT_COLORS ; \
Text [ en-US ] = "4 Bit ~Color Palette" ; \
};
@@ -1106,7 +1108,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_8BIT_GRAYS ; \
- HelpID = SID_CONVERT_TO_8BIT_GRAYS ; \
+ HelpId = CMD_SID_CONVERT_TO_8BIT_GRAYS ; \
Text [ en-US ] = "8 Bit Gr~ayscales" ; \
};
@@ -1114,7 +1116,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_8BIT_COLORS ; \
- HelpID = SID_CONVERT_TO_8BIT_COLORS ; \
+ HelpId = CMD_SID_CONVERT_TO_8BIT_COLORS ; \
Text [ en-US ] = "8 Bit C~olor Palette" ; \
};
@@ -1122,7 +1124,7 @@
MenuItem\
{\
Identifier = SID_CONVERT_TO_24BIT ; \
- HelpID = SID_CONVERT_TO_24BIT ; \
+ HelpId = CMD_SID_CONVERT_TO_24BIT ; \
Text [ en-US ] = "24 Bit ~True Colors" ; \
};
@@ -1152,7 +1154,7 @@
{\
Identifier = SID_CONVERT ; \
Command = ".uno:ConvertMenu" ; \
- HelpID = SID_CONVERT ; \
+ HelpId = HID_MN_SUB_CONVERT ; \
Text [ en-US ] = "Con~vert" ; \
SubMenu = Menu\
{\
@@ -1173,7 +1175,7 @@
MenuItem\
{\
Identifier = SID_MIRROR ; \
- HelpID = SID_MIRROR ; \
+ HelpId = HID_MN_SUB_MIRROR ; \
Command = ".uno:MirrorMenu" ; \
Text [ en-US ] = "~Flip" ; \
SubMenu = Menu\
@@ -1190,7 +1192,7 @@
MenuItem\
{\
Identifier = SID_OBJECT_ROTATE ; \
- HelpID = SID_OBJECT_ROTATE ; \
+ HelpId = CMD_SID_OBJECT_ROTATE ; \
Text [ en-US ] = "~Rotate";\
};
@@ -1198,7 +1200,7 @@
MenuItem\
{\
Identifier = SID_CONNECT ; \
- HelpID = SID_CONNECT ; \
+ HelpId = CMD_SID_CONNECT ; \
Text [ en-US ] = "C~onnect" ; \
};
@@ -1206,7 +1208,7 @@
MenuItem\
{\
Identifier = SID_BREAK ; \
- HelpID = SID_BREAK ; \
+ HelpId = CMD_SID_BREAK ; \
Text [ en-US ] = "~Break" ; \
};
@@ -1214,7 +1216,7 @@
MenuItem\
{\
Identifier = SID_STYLE_EDIT ; \
- HelpID = SID_STYLE_EDIT ; \
+ HelpId = CMD_SID_STYLE_EDIT ; \
Text [ en-US ] = "Edit Style..." ; \
};
@@ -1222,7 +1224,7 @@
MenuItem\
{\
Identifier = SID_EDIT_HYPERLINK ; \
- HelpID = SID_EDIT_HYPERLINK ; \
+ HelpId = CMD_SID_EDIT_HYPERLINK ; \
Text [ en-US ] = "H~yperlink..." ; \
};
@@ -1230,7 +1232,7 @@
MenuItem\
{\
Identifier = SID_BEZIER_EDIT ; \
- HelpID = SID_BEZIER_EDIT ; \
+ HelpId = CMD_SID_BEZIER_EDIT ; \
Text [ en-US ] = "Poi~nts";\
};
@@ -1238,7 +1240,7 @@
MenuItem\
{\
Identifier = SID_GLUE_EDITMODE ; \
- HelpID = SID_GLUE_EDITMODE ; \
+ HelpId = CMD_SID_GLUE_EDITMODE ; \
Text [ en-US ] = "~Glue Points";\
};
@@ -1255,25 +1257,25 @@
MenuItem \
{\
Identifier = SID_INSERTLAYER ; \
- HelpID = SID_INSERTLAYER ; \
+ HelpId = CMD_SID_INSERTLAYER ; \
Text [ en-US ] = "~Insert";\
};\
MenuItem \
{\
Identifier = SID_MODIFYLAYER ; \
- HelpID = SID_MODIFYLAYER ; \
+ HelpId = CMD_SID_MODIFYLAYER ; \
Text [ en-US ] = "~Modify";\
};\
MenuItem \
{\
Identifier = SID_DELETE_LAYER ; \
- HelpID = SID_DELETE_LAYER ; \
+ HelpId = CMD_SID_DELETE_LAYER ; \
Text [ en-US ] = "Delete";\
};\
MenuItem \
{\
Identifier = SID_RENAMELAYER ; \
- HelpID = SID_RENAMELAYER ; \
+ HelpId = CMD_SID_RENAMELAYER ; \
Text [ en-US ] = "~Rename";\
}; \
};\
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 8dfb8f76500a..3f215daf96fa 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -45,6 +45,16 @@ using namespace ::com::sun::star::uno;
#define B2U(_def_aStr) (OUString::createFromAscii(_def_aStr))
+template< class T > T getSafeValue( const Any& rAny )
+{
+ T value = T();
+ bool bOk = (rAny >>= value);
+
+ DBG_ASSERT( bOk, "SdOptionsItem, wrong type from configuration!" );
+ (void)bOk;
+
+ return value;
+}
// -----------------
// - SdOptionsItem -
@@ -99,7 +109,7 @@ void SdOptionsItem::SetModified()
// - SdOptionsGeneric -
// --------------------
-SdOptionsGeneric::SdOptionsGeneric( USHORT nConfigId, const OUString& rSubTree ) :
+SdOptionsGeneric::SdOptionsGeneric( sal_uInt16 nConfigId, const OUString& rSubTree ) :
maSubTree ( rSubTree ),
mpCfgItem ( NULL ),
mnConfigId ( nConfigId ),
@@ -125,12 +135,12 @@ void SdOptionsGeneric::Init() const
{
const Any* pValues = aValues.getConstArray();
- pThis->EnableModify( FALSE );
+ pThis->EnableModify( sal_False );
pThis->mbInit = pThis->ReadData( pValues );
- pThis->EnableModify( TRUE );
+ pThis->EnableModify( sal_True );
}
else
- pThis->mbInit = TRUE;
+ pThis->mbInit = sal_True;
}
}
@@ -164,7 +174,7 @@ void SdOptionsGeneric::Commit( SdOptionsItem& rCfgItem ) const
Sequence< OUString > SdOptionsGeneric::GetPropertyNames() const
{
- ULONG nCount;
+ sal_uLong nCount;
const char** ppPropNames;
GetPropNameArray( ppPropNames, nCount );
@@ -172,7 +182,7 @@ Sequence< OUString > SdOptionsGeneric::GetPropertyNames() const
Sequence< OUString > aNames( nCount );
OUString* pNames = aNames.getArray();
- for( ULONG i = 0; i < nCount; i++ )
+ for( sal_uLong i = 0; i < nCount; i++ )
pNames[ i ] = OUString::createFromAscii( ppPropNames[ i ] );
return aNames;
@@ -202,26 +212,26 @@ bool SdOptionsGeneric::isMetricSystem()
|*
\************************************************************************/
-SdOptionsLayout::SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsLayout::SdOptionsLayout( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, bUseConfig ?
( ( SDCFG_DRAW == nConfigId ) ?
B2U( "Office.Draw/Layout" ) :
B2U( "Office.Impress/Layout" ) ) :
OUString() ),
- bRuler( TRUE ),
- bMoveOutline( TRUE ),
- bDragStripes( FALSE ),
- bHandlesBezier( FALSE ),
- bHelplines( TRUE ),
- nMetric((UINT16)(isMetricSystem() ? FUNIT_CM : FUNIT_INCH)),
+ bRuler( sal_True ),
+ bMoveOutline( sal_True ),
+ bDragStripes( sal_False ),
+ bHandlesBezier( sal_False ),
+ bHelplines( sal_True ),
+ nMetric((sal_uInt16)(isMetricSystem() ? FUNIT_CM : FUNIT_INCH)),
nDefTab( 1250 )
{
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
+sal_Bool SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
{
return( IsRulerVisible() == rOpt.IsRulerVisible() &&
IsMoveOutline() == rOpt.IsMoveOutline() &&
@@ -234,7 +244,7 @@ BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
// -----------------------------------------------------------------------------
-void SdOptionsLayout::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsLayout::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNamesMetric[] =
{
@@ -268,22 +278,22 @@ void SdOptionsLayout::GetPropNameArray( const char**& ppNames, ULONG& rCount ) c
// -----------------------------------------------------------------------------
-BOOL SdOptionsLayout::ReadData( const Any* pValues )
+sal_Bool SdOptionsLayout::ReadData( const Any* pValues )
{
if( pValues[0].hasValue() ) SetRulerVisible( *(sal_Bool*) pValues[ 0 ].getValue() );
if( pValues[1].hasValue() ) SetHandlesBezier( *(sal_Bool*) pValues[ 1 ].getValue() );
if( pValues[2].hasValue() ) SetMoveOutline( *(sal_Bool*) pValues[ 2 ].getValue() );
if( pValues[3].hasValue() ) SetDragStripes( *(sal_Bool*) pValues[ 3 ].getValue() );
if( pValues[4].hasValue() ) SetHelplines( *(sal_Bool*) pValues[ 4 ].getValue() );
- if( pValues[5].hasValue() ) SetMetric( (UINT16) *(sal_Int32*) pValues[ 5 ].getValue() );
- if( pValues[6].hasValue() ) SetDefTab( (UINT16) *(sal_Int32*) pValues[ 6 ].getValue() );
+ if( pValues[5].hasValue() ) SetMetric( (sal_uInt16) *(sal_Int32*) pValues[ 5 ].getValue() );
+ if( pValues[6].hasValue() ) SetDefTab( (sal_uInt16) *(sal_Int32*) pValues[ 6 ].getValue() );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsLayout::WriteData( Any* pValues ) const
+sal_Bool SdOptionsLayout::WriteData( Any* pValues ) const
{
pValues[ 0 ] <<= IsRulerVisible();
pValues[ 1 ] <<= IsHandlesBezier();
@@ -293,7 +303,7 @@ BOOL SdOptionsLayout::WriteData( Any* pValues ) const
pValues[ 5 ] <<= (sal_Int32) GetMetric();
pValues[ 6 ] <<= (sal_Int32) GetDefTab();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -302,17 +312,17 @@ BOOL SdOptionsLayout::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsLayoutItem::SdOptionsLayoutItem( USHORT _nWhich )
+SdOptionsLayoutItem::SdOptionsLayoutItem( sal_uInt16 _nWhich )
: SfxPoolItem ( _nWhich )
-, maOptionsLayout ( 0, FALSE )
+, maOptionsLayout ( 0, sal_False )
{
}
// ----------------------------------------------------------------------
-SdOptionsLayoutItem::SdOptionsLayoutItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
+SdOptionsLayoutItem::SdOptionsLayoutItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
: SfxPoolItem ( _nWhich )
-, maOptionsLayout ( 0, FALSE )
+, maOptionsLayout ( 0, sal_False )
{
if( pOpts )
{
@@ -377,26 +387,26 @@ void SdOptionsLayoutItem::SetOptions( SdOptions* pOpts ) const
|*
\************************************************************************/
-SdOptionsContents::SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsContents::SdOptionsContents( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, bUseConfig ?
( ( SDCFG_DRAW == nConfigId ) ?
B2U( "Office.Draw/Content" ) :
B2U( "Office.Impress/Content" ) ) :
OUString() )
{
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsContents::operator==(const SdOptionsContents&) const
+sal_Bool SdOptionsContents::operator==(const SdOptionsContents&) const
{
return true;
}
// -----------------------------------------------------------------------------
-void SdOptionsContents::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsContents::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNames[] =
{
@@ -412,22 +422,22 @@ void SdOptionsContents::GetPropNameArray( const char**& ppNames, ULONG& rCount )
// -----------------------------------------------------------------------------
-BOOL SdOptionsContents::ReadData(const Any*)
+sal_Bool SdOptionsContents::ReadData(const Any*)
{
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsContents::WriteData( Any* pValues ) const
+sal_Bool SdOptionsContents::WriteData( Any* pValues ) const
{
//#i80528# no draft anymore
- pValues[ 0 ] <<= (BOOL)false;
- pValues[ 1 ] <<= (BOOL)false;
- pValues[ 2 ] <<= (BOOL)false;
- pValues[ 3 ] <<= (BOOL)false;
+ pValues[ 0 ] <<= (sal_Bool)false;
+ pValues[ 1 ] <<= (sal_Bool)false;
+ pValues[ 2 ] <<= (sal_Bool)false;
+ pValues[ 3 ] <<= (sal_Bool)false;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -436,9 +446,9 @@ BOOL SdOptionsContents::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsContentsItem::SdOptionsContentsItem(USHORT _nWhich, SdOptions*, ::sd::FrameView*)
+SdOptionsContentsItem::SdOptionsContentsItem(sal_uInt16 _nWhich, SdOptions*, ::sd::FrameView*)
: SfxPoolItem ( _nWhich )
-, maOptionsContents ( 0, FALSE )
+, maOptionsContents ( 0, sal_False )
{
}
@@ -470,7 +480,7 @@ void SdOptionsContentsItem::SetOptions(SdOptions*) const
|*
\************************************************************************/
-SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsMisc::SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, bUseConfig ?
( ( SDCFG_DRAW == nConfigId ) ?
B2U( "Office.Draw/Misc" ) :
@@ -478,38 +488,41 @@ SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) :
OUString() ),
nDefaultObjectSizeWidth(8000),
nDefaultObjectSizeHeight(5000),
- bStartWithTemplate( TRUE ),
- bMarkedHitMovesAlways( TRUE ),
- bMoveOnlyDragging( FALSE ),
- bCrookNoContortion( FALSE ),
+ bStartWithTemplate( sal_True ),
+ bMarkedHitMovesAlways( sal_True ),
+ bMoveOnlyDragging( sal_False ),
+ bCrookNoContortion( sal_False ),
bQuickEdit( GetConfigId() != SDCFG_DRAW ),
- bMasterPageCache( TRUE ),
- bDragWithCopy( FALSE ),
- bPickThrough( TRUE ),
- bBigHandles( FALSE ),
- bDoubleClickTextEdit( TRUE ),
- bClickChangeRotation( FALSE ),
- bStartWithActualPage( FALSE ),
- bSolidDragging( TRUE ),
- bSolidMarkHdl( TRUE ),
- bSummationOfParagraphs( FALSE ),
- bShowUndoDeleteWarning( TRUE ),
- bSlideshowRespectZOrder( TRUE ),
- bShowComments( TRUE ),
- bPreviewNewEffects( TRUE ),
- bPreviewChangedEffects( FALSE ),
- bPreviewTransitions( TRUE ),
+ bMasterPageCache( sal_True ),
+ bDragWithCopy( sal_False ),
+ bPickThrough( sal_True ),
+ bBigHandles( sal_False ),
+ bDoubleClickTextEdit( sal_True ),
+ bClickChangeRotation( sal_False ),
+ bStartWithActualPage( sal_False ),
+ bSolidDragging( sal_True ),
+ bSolidMarkHdl( sal_True ),
+ bSummationOfParagraphs( sal_False ),
+ bShowUndoDeleteWarning( sal_True ),
+ bSlideshowRespectZOrder( sal_True ),
+ bShowComments( sal_True ),
+ bPreviewNewEffects( sal_True ),
+ bPreviewChangedEffects( sal_False ),
+ bPreviewTransitions( sal_True ),
mnDisplay( 0 ),
+ mnPenColor( 0xff0000 ),
+ mnPenWidth( 150.0 ),
+
// The default for 6.1-and-above documents is to use printer-independent
// formatting.
mnPrinterIndependentLayout (1)
{
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
+sal_Bool SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
{
return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
IsMarkedHitMovesAlways() == rOpt.IsMarkedHitMovesAlways() &&
@@ -536,13 +549,15 @@ BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
IsPreviewChangedEffects() == rOpt.IsPreviewChangedEffects() &&
IsPreviewTransitions() == rOpt.IsPreviewTransitions() &&
GetDisplay() == rOpt.GetDisplay() &&
- IsShowComments() == rOpt.IsShowComments()
+ IsShowComments() == rOpt.IsShowComments() &&
+ GetPresentationPenColor() == rOpt.GetPresentationPenColor() &&
+ GetPresentationPenWidth() == rOpt.GetPresentationPenWidth()
);
}
// -----------------------------------------------------------------------------
-void SdOptionsMisc::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsMisc::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNames[] =
{
@@ -576,16 +591,19 @@ void SdOptionsMisc::GetPropNameArray( const char**& ppNames, ULONG& rCount ) con
"PreviewChangedEffects",
"PreviewTransitions",
- "Display"
+ "Display",
+
+ "PenColor",
+ "PenWidth"
};
- rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 25 : 16 );
+ rCount = ( ( GetConfigId() == SDCFG_IMPRESS ) ? 27 : 16 );
ppNames = aPropNames;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsMisc::ReadData( const Any* pValues )
+sal_Bool SdOptionsMisc::ReadData( const Any* pValues )
{
if( pValues[0].hasValue() ) SetMarkedHitMovesAlways( *(sal_Bool*) pValues[ 0 ].getValue() );
if( pValues[1].hasValue() ) SetCrookNoContortion( *(sal_Bool*) pValues[ 1 ].getValue() );
@@ -631,14 +649,20 @@ BOOL SdOptionsMisc::ReadData( const Any* pValues )
if( pValues[24].hasValue() )
SetDisplay(*(sal_Int32*) pValues[ 24 ].getValue());
+
+ if( pValues[25].hasValue() )
+ SetPresentationPenColor( getSafeValue< sal_Int32 >( pValues[ 25 ] ) );
+
+ if( pValues[26].hasValue() )
+ SetPresentationPenWidth( getSafeValue< double >( pValues[ 26 ] ) );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsMisc::WriteData( Any* pValues ) const
+sal_Bool SdOptionsMisc::WriteData( Any* pValues ) const
{
pValues[ 0 ] <<= IsMarkedHitMovesAlways();
pValues[ 1 ] <<= IsCrookNoContortion();
@@ -672,9 +696,12 @@ BOOL SdOptionsMisc::WriteData( Any* pValues ) const
pValues[ 23 ] <<= IsPreviewTransitions();
pValues[ 24 ] <<= GetDisplay();
+
+ pValues[ 25 ] <<= GetPresentationPenColor();
+ pValues[ 26 ] <<= GetPresentationPenWidth();
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -683,17 +710,17 @@ BOOL SdOptionsMisc::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich )
+SdOptionsMiscItem::SdOptionsMiscItem( sal_uInt16 _nWhich )
: SfxPoolItem ( _nWhich )
-, maOptionsMisc ( 0, FALSE )
+, maOptionsMisc ( 0, sal_False )
{
}
// ----------------------------------------------------------------------
-SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
+SdOptionsMiscItem::SdOptionsMiscItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
: SfxPoolItem ( _nWhich )
-, maOptionsMisc ( 0, FALSE )
+, maOptionsMisc ( 0, sal_False )
{
if( pOpts )
{
@@ -711,6 +738,9 @@ SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich, SdOptions* pOpts, ::sd::Fr
maOptionsMisc.SetDisplay(pOpts->GetDisplay());
maOptionsMisc.SetShowComments( pOpts->IsShowComments() );
+
+ maOptionsMisc.SetPresentationPenColor(pOpts->GetPresentationPenColor() );
+ maOptionsMisc.SetPresentationPenWidth(pOpts->GetPresentationPenWidth() );
}
if( pView )
@@ -724,8 +754,8 @@ SdOptionsMiscItem::SdOptionsMiscItem( USHORT _nWhich, SdOptions* pOpts, ::sd::Fr
maOptionsMisc.SetMasterPagePaintCaching( pView->IsMasterPagePaintCaching() );
maOptionsMisc.SetDragWithCopy( pView->IsDragWithCopy() );
- maOptionsMisc.SetPickThrough( (BOOL)pView->GetModel()->IsPickThroughTransparentTextFrames() );
- maOptionsMisc.SetBigHandles( (BOOL)pView->IsBigHandles() );
+ maOptionsMisc.SetPickThrough( (sal_Bool)pView->GetModel()->IsPickThroughTransparentTextFrames() );
+ maOptionsMisc.SetBigHandles( (sal_Bool)pView->IsBigHandles() );
maOptionsMisc.SetDoubleClickTextEdit( pView->IsDoubleClickTextEdit() );
maOptionsMisc.SetClickChangeRotation( pView->IsClickChangeRotation() );
maOptionsMisc.SetSolidDragging( pView->IsSolidDragging() );
@@ -797,6 +827,9 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const
pOpts->SetPreviewTransitions( maOptionsMisc.IsPreviewTransitions() );
pOpts->SetDisplay( maOptionsMisc.GetDisplay() );
+
+ pOpts->SetPresentationPenColor( maOptionsMisc.GetPresentationPenColor() );
+ pOpts->SetPresentationPenWidth( maOptionsMisc.GetPresentationPenWidth() );
}
}
@@ -806,30 +839,30 @@ void SdOptionsMiscItem::SetOptions( SdOptions* pOpts ) const
|*
\************************************************************************/
-SdOptionsSnap::SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsSnap::SdOptionsSnap( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, bUseConfig ?
( ( SDCFG_DRAW == nConfigId ) ?
B2U( "Office.Draw/Snap" ) :
B2U( "Office.Impress/Snap" ) ) :
OUString() ),
- bSnapHelplines( TRUE ),
- bSnapBorder( TRUE ),
- bSnapFrame( FALSE ),
- bSnapPoints( FALSE ),
- bOrtho( FALSE ),
- bBigOrtho( TRUE ),
- bRotate( FALSE ),
+ bSnapHelplines( sal_True ),
+ bSnapBorder( sal_True ),
+ bSnapFrame( sal_False ),
+ bSnapPoints( sal_False ),
+ bOrtho( sal_False ),
+ bBigOrtho( sal_True ),
+ bRotate( sal_False ),
nSnapArea( 5 ),
nAngle( 1500 ),
nBezAngle( 1500 )
{
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
+sal_Bool SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
{
return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
IsSnapBorder() == rOpt.IsSnapBorder() &&
@@ -845,7 +878,7 @@ BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
// -----------------------------------------------------------------------------
-void SdOptionsSnap::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsSnap::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNames[] =
{
@@ -867,7 +900,7 @@ void SdOptionsSnap::GetPropNameArray( const char**& ppNames, ULONG& rCount ) con
// -----------------------------------------------------------------------------
-BOOL SdOptionsSnap::ReadData( const Any* pValues )
+sal_Bool SdOptionsSnap::ReadData( const Any* pValues )
{
if( pValues[0].hasValue() ) SetSnapHelplines( *(sal_Bool*) pValues[ 0 ].getValue() );
if( pValues[1].hasValue() ) SetSnapBorder( *(sal_Bool*)pValues[ 1 ].getValue() );
@@ -876,16 +909,16 @@ BOOL SdOptionsSnap::ReadData( const Any* pValues )
if( pValues[4].hasValue() ) SetOrtho( *(sal_Bool*) pValues[ 4 ].getValue() );
if( pValues[5].hasValue() ) SetBigOrtho( *(sal_Bool*) pValues[ 5 ].getValue() );
if( pValues[6].hasValue() ) SetRotate( *(sal_Bool*) pValues[ 6 ].getValue() );
- if( pValues[7].hasValue() ) SetSnapArea( (INT16) *(sal_Int32*) pValues[ 7 ].getValue() );
- if( pValues[8].hasValue() ) SetAngle( (INT16) *(sal_Int32*) pValues[ 8 ].getValue() );
- if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( (INT16) *(sal_Int32*) pValues[ 9 ].getValue() );
+ if( pValues[7].hasValue() ) SetSnapArea( (sal_Int16) *(sal_Int32*) pValues[ 7 ].getValue() );
+ if( pValues[8].hasValue() ) SetAngle( (sal_Int16) *(sal_Int32*) pValues[ 8 ].getValue() );
+ if( pValues[9].hasValue() ) SetEliminatePolyPointLimitAngle( (sal_Int16) *(sal_Int32*) pValues[ 9 ].getValue() );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsSnap::WriteData( Any* pValues ) const
+sal_Bool SdOptionsSnap::WriteData( Any* pValues ) const
{
pValues[ 0 ] <<= IsSnapHelplines();
pValues[ 1 ] <<= IsSnapBorder();
@@ -898,7 +931,7 @@ BOOL SdOptionsSnap::WriteData( Any* pValues ) const
pValues[ 8 ] <<= (sal_Int32) GetAngle();
pValues[ 9 ] <<= (sal_Int32) GetEliminatePolyPointLimitAngle();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -907,17 +940,17 @@ BOOL SdOptionsSnap::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsSnapItem::SdOptionsSnapItem( USHORT _nWhich )
+SdOptionsSnapItem::SdOptionsSnapItem( sal_uInt16 _nWhich )
: SfxPoolItem ( _nWhich )
-, maOptionsSnap ( 0, FALSE )
+, maOptionsSnap ( 0, sal_False )
{
}
// ----------------------------------------------------------------------
-SdOptionsSnapItem::SdOptionsSnapItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
+SdOptionsSnapItem::SdOptionsSnapItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd::FrameView* pView )
: SfxPoolItem ( _nWhich )
-, maOptionsSnap ( 0, FALSE )
+, maOptionsSnap ( 0, sal_False )
{
if( pView )
{
@@ -929,8 +962,8 @@ SdOptionsSnapItem::SdOptionsSnapItem( USHORT _nWhich, SdOptions* pOpts, ::sd::Fr
maOptionsSnap.SetBigOrtho( pView->IsBigOrtho() );
maOptionsSnap.SetRotate( pView->IsAngleSnapEnabled() );
maOptionsSnap.SetSnapArea( pView->GetSnapMagneticPixel() );
- maOptionsSnap.SetAngle( (INT16) pView->GetSnapAngle() );
- maOptionsSnap.SetEliminatePolyPointLimitAngle( (INT16) pView->GetEliminatePolyPointLimitAngle() );
+ maOptionsSnap.SetAngle( (sal_Int16) pView->GetSnapAngle() );
+ maOptionsSnap.SetEliminatePolyPointLimitAngle( (sal_Int16) pView->GetEliminatePolyPointLimitAngle() );
}
else if( pOpts )
{
@@ -989,7 +1022,7 @@ void SdOptionsSnapItem::SetOptions( SdOptions* pOpts ) const
|*
\************************************************************************/
-SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsZoom::SdOptionsZoom( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, ( bUseConfig && ( SDCFG_DRAW == nConfigId ) ) ?
B2U( "Office.Draw/Zoom" ) :
OUString() ),
@@ -997,14 +1030,14 @@ SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) :
nY( 1 )
{
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
+sal_Bool SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
{
- INT32 nX1, nX2, nY1, nY2;
+ sal_Int32 nX1, nX2, nY1, nY2;
GetScale( nX1, nY1 );
rOpt.GetScale( nX2, nY2 );
@@ -1015,7 +1048,7 @@ BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
// -----------------------------------------------------------------------------
-void SdOptionsZoom::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsZoom::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNames[] =
{
@@ -1029,30 +1062,30 @@ void SdOptionsZoom::GetPropNameArray( const char**& ppNames, ULONG& rCount ) con
// -----------------------------------------------------------------------------
-BOOL SdOptionsZoom::ReadData( const Any* pValues )
+sal_Bool SdOptionsZoom::ReadData( const Any* pValues )
{
- INT32 x = 1, y = 1;
+ sal_Int32 x = 1, y = 1;
if( pValues[0].hasValue() ) x = ( *(sal_Int32*) pValues[ 0 ].getValue() );
if( pValues[1].hasValue() ) y = ( *(sal_Int32*) pValues[ 1 ].getValue() );
SetScale( x, y );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsZoom::WriteData( Any* pValues ) const
+sal_Bool SdOptionsZoom::WriteData( Any* pValues ) const
{
- INT32 x, y;
+ sal_Int32 x, y;
GetScale( x, y );
pValues[ 0 ] <<= (sal_Int32) x;
pValues[ 1 ] <<= (sal_Int32) y;
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1061,16 +1094,16 @@ BOOL SdOptionsZoom::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsGrid::SdOptionsGrid( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsGrid::SdOptionsGrid( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, bUseConfig ?
( ( SDCFG_DRAW == nConfigId ) ?
B2U( "Office.Draw/Grid" ) :
B2U( "Office.Impress/Grid" ) ) :
OUString() )
{
- EnableModify( FALSE );
+ EnableModify( sal_False );
SetDefaults();
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
@@ -1083,7 +1116,7 @@ SdOptionsGrid::~SdOptionsGrid()
void SdOptionsGrid::SetDefaults()
{
- const UINT32 nVal = 1000;
+ const sal_uInt32 nVal = 1000;
SetFldDivisionX( nVal );
SetFldDivisionY( nVal );
@@ -1091,15 +1124,15 @@ void SdOptionsGrid::SetDefaults()
SetFldDrawY( nVal );
SetFldSnapX( nVal );
SetFldSnapY( nVal );
- SetUseGridSnap( FALSE );
- SetSynchronize( TRUE );
- SetGridVisible( FALSE );
- SetEqualGrid( TRUE );
+ SetUseGridSnap( sal_False );
+ SetSynchronize( sal_True );
+ SetGridVisible( sal_False );
+ SetEqualGrid( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsGrid::operator==( const SdOptionsGrid& rOpt ) const
+sal_Bool SdOptionsGrid::operator==( const SdOptionsGrid& rOpt ) const
{
return( GetFldDrawX() == rOpt.GetFldDrawX() &&
GetFldDivisionX() == rOpt.GetFldDivisionX() &&
@@ -1115,7 +1148,7 @@ BOOL SdOptionsGrid::operator==( const SdOptionsGrid& rOpt ) const
// -----------------------------------------------------------------------------
-void SdOptionsGrid::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsGrid::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aPropNamesMetric[] =
{
@@ -1155,20 +1188,20 @@ void SdOptionsGrid::GetPropNameArray( const char**& ppNames, ULONG& rCount ) con
// -----------------------------------------------------------------------------
-BOOL SdOptionsGrid::ReadData( const Any* pValues )
+sal_Bool SdOptionsGrid::ReadData( const Any* pValues )
{
if( pValues[0].hasValue() ) SetFldDrawX( *(sal_Int32*) pValues[ 0 ].getValue() );
if( pValues[1].hasValue() ) SetFldDrawY( *(sal_Int32*) pValues[ 1 ].getValue() );
if( pValues[2].hasValue() )
{
- const UINT32 nDivX = FRound( *(double*) pValues[ 2 ].getValue() );
+ const sal_uInt32 nDivX = FRound( *(double*) pValues[ 2 ].getValue() );
SetFldDivisionX( SvxOptionsGrid::GetFldDrawX() / ( nDivX + 1 ) );
}
if( pValues[3].hasValue() )
{
- const UINT32 nDivY = FRound( *(double*) pValues[ 3 ].getValue() );
+ const sal_uInt32 nDivY = FRound( *(double*) pValues[ 3 ].getValue() );
SetFldDivisionY( SvxOptionsGrid::GetFldDrawY() / ( nDivY + 1 ) );
}
@@ -1179,12 +1212,12 @@ BOOL SdOptionsGrid::ReadData( const Any* pValues )
if( pValues[8].hasValue() ) SetGridVisible( *(sal_Bool*) pValues[ 8 ].getValue() );
if( pValues[9].hasValue() ) SetEqualGrid( *(sal_Bool*) pValues[ 9 ].getValue() );
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsGrid::WriteData( Any* pValues ) const
+sal_Bool SdOptionsGrid::WriteData( Any* pValues ) const
{
pValues[ 0 ] <<= (sal_Int32) GetFldDrawX();
pValues[ 1 ] <<= (sal_Int32) GetFldDrawY();
@@ -1197,7 +1230,7 @@ BOOL SdOptionsGrid::WriteData( Any* pValues ) const
pValues[ 8 ] <<= IsGridVisible();
pValues[ 9 ] <<= IsEqualGrid();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1206,7 +1239,7 @@ BOOL SdOptionsGrid::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) :
+SdOptionsGridItem::SdOptionsGridItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) :
SvxGridItem( _nWhich )
{
SetSynchronize( pOpts->IsSynchronize() );
@@ -1258,40 +1291,40 @@ void SdOptionsGridItem::SetOptions( SdOptions* pOpts ) const
|*
\************************************************************************/
-SdOptionsPrint::SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ) :
+SdOptionsPrint::SdOptionsPrint( sal_uInt16 nConfigId, sal_Bool bUseConfig ) :
SdOptionsGeneric( nConfigId, bUseConfig ?
( ( SDCFG_DRAW == nConfigId ) ?
B2U( "Office.Draw/Print" ) :
B2U( "Office.Impress/Print" ) ) :
OUString() ),
- bDraw( TRUE ),
- bNotes( FALSE ),
- bHandout( FALSE ),
- bOutline( FALSE ),
- bDate( FALSE ),
- bTime( FALSE ),
- bPagename( FALSE ),
- bHiddenPages( TRUE ),
- bPagesize( FALSE ),
- bPagetile( FALSE ),
- bWarningPrinter( TRUE ),
- bWarningSize( FALSE ),
- bWarningOrientation( FALSE ),
- bBooklet( FALSE ),
- bFront( TRUE ),
- bBack( TRUE ),
- bCutPage( FALSE ),
- bPaperbin( FALSE ),
- mbHandoutHorizontal( TRUE ),
+ bDraw( sal_True ),
+ bNotes( sal_False ),
+ bHandout( sal_False ),
+ bOutline( sal_False ),
+ bDate( sal_False ),
+ bTime( sal_False ),
+ bPagename( sal_False ),
+ bHiddenPages( sal_True ),
+ bPagesize( sal_False ),
+ bPagetile( sal_False ),
+ bWarningPrinter( sal_True ),
+ bWarningSize( sal_False ),
+ bWarningOrientation( sal_False ),
+ bBooklet( sal_False ),
+ bFront( sal_True ),
+ bBack( sal_True ),
+ bCutPage( sal_False ),
+ bPaperbin( sal_False ),
+ mbHandoutHorizontal( sal_True ),
mnHandoutPages( 6 ),
nQuality( 0 )
{
- EnableModify( TRUE );
+ EnableModify( sal_True );
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
+sal_Bool SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
{
return( IsDraw() == rOpt.IsDraw() &&
IsNotes() == rOpt.IsNotes() &&
@@ -1318,7 +1351,7 @@ BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
// -----------------------------------------------------------------------------
-void SdOptionsPrint::GetPropNameArray( const char**& ppNames, ULONG& rCount ) const
+void SdOptionsPrint::GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const
{
static const char* aDrawPropNames[] =
{
@@ -1378,7 +1411,7 @@ void SdOptionsPrint::GetPropNameArray( const char**& ppNames, ULONG& rCount ) co
// -----------------------------------------------------------------------------
-BOOL SdOptionsPrint::ReadData( const Any* pValues )
+sal_Bool SdOptionsPrint::ReadData( const Any* pValues )
{
if( pValues[0].hasValue() ) SetDate( *(sal_Bool*) pValues[ 0 ].getValue() );
if( pValues[1].hasValue() ) SetTime( *(sal_Bool*) pValues[ 1 ].getValue() );
@@ -1390,7 +1423,7 @@ BOOL SdOptionsPrint::ReadData( const Any* pValues )
if( pValues[7].hasValue() ) SetFrontPage( *(sal_Bool*) pValues[ 7 ].getValue() );
if( pValues[8].hasValue() ) SetBackPage( *(sal_Bool*) pValues[ 8 ].getValue() );
if( pValues[9].hasValue() ) SetPaperbin( *(sal_Bool*) pValues[ 9 ].getValue() );
- if( pValues[10].hasValue() ) SetOutputQuality( (UINT16) *(sal_Int32*) pValues[ 10 ].getValue() );
+ if( pValues[10].hasValue() ) SetOutputQuality( (sal_uInt16) *(sal_Int32*) pValues[ 10 ].getValue() );
if( pValues[11].hasValue() ) SetDraw( *(sal_Bool*) pValues[ 11 ].getValue() );
// just for impress
@@ -1400,15 +1433,15 @@ BOOL SdOptionsPrint::ReadData( const Any* pValues )
if( pValues[13].hasValue() ) SetHandout( *(sal_Bool*) pValues[ 13 ].getValue() );
if( pValues[14].hasValue() ) SetOutline( *(sal_Bool*) pValues[ 14 ].getValue() );
if( pValues[15].hasValue() ) SetHandoutHorizontal( *(sal_Bool*) pValues[15].getValue() );
- if( pValues[16].hasValue() ) SetHandoutPages( (UINT16)*(sal_Int32*) pValues[16].getValue() );
+ if( pValues[16].hasValue() ) SetHandoutPages( (sal_uInt16)*(sal_Int32*) pValues[16].getValue() );
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL SdOptionsPrint::WriteData( Any* pValues ) const
+sal_Bool SdOptionsPrint::WriteData( Any* pValues ) const
{
pValues[ 0 ] <<= IsDate();
pValues[ 1 ] <<= IsTime();
@@ -1433,7 +1466,7 @@ BOOL SdOptionsPrint::WriteData( Any* pValues ) const
pValues[ 16 ] <<= GetHandoutPages();
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1442,17 +1475,17 @@ BOOL SdOptionsPrint::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsPrintItem::SdOptionsPrintItem( USHORT _nWhich )
+SdOptionsPrintItem::SdOptionsPrintItem( sal_uInt16 _nWhich )
: SfxPoolItem ( _nWhich )
-, maOptionsPrint ( 0, FALSE )
+, maOptionsPrint ( 0, sal_False )
{
}
// ----------------------------------------------------------------------
-SdOptionsPrintItem::SdOptionsPrintItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* )
+SdOptionsPrintItem::SdOptionsPrintItem( sal_uInt16 _nWhich, SdOptions* pOpts, ::sd::FrameView* )
: SfxPoolItem ( _nWhich )
-, maOptionsPrint ( 0, FALSE )
+, maOptionsPrint ( 0, sal_False )
{
if( pOpts )
{
@@ -1528,14 +1561,14 @@ void SdOptionsPrintItem::SetOptions( SdOptions* pOpts ) const
|*
\************************************************************************/
-SdOptions::SdOptions( USHORT nConfigId ) :
- SdOptionsLayout( nConfigId, TRUE ),
- SdOptionsContents( nConfigId, TRUE ),
- SdOptionsMisc( nConfigId, TRUE ),
- SdOptionsSnap( nConfigId, TRUE ),
- SdOptionsZoom( nConfigId, TRUE ),
- SdOptionsGrid( nConfigId, TRUE ),
- SdOptionsPrint( nConfigId, TRUE )
+SdOptions::SdOptions( sal_uInt16 nConfigId ) :
+ SdOptionsLayout( nConfigId, sal_True ),
+ SdOptionsContents( nConfigId, sal_True ),
+ SdOptionsMisc( nConfigId, sal_True ),
+ SdOptionsSnap( nConfigId, sal_True ),
+ SdOptionsZoom( nConfigId, sal_True ),
+ SdOptionsGrid( nConfigId, sal_True ),
+ SdOptionsPrint( nConfigId, sal_True )
{
}
@@ -1547,7 +1580,7 @@ SdOptions::~SdOptions()
// ----------------------------------------------------------------------
-void SdOptions::StoreConfig( ULONG nOptionsRange )
+void SdOptions::StoreConfig( sal_uLong nOptionsRange )
{
if( nOptionsRange & SD_OPTIONS_LAYOUT )
SdOptionsLayout::Store();
diff --git a/sd/source/ui/app/popup.src b/sd/source/ui/app/popup.src
index fda886d5e891..563a83ffb89d 100644
--- a/sd/source/ui/app/popup.src
+++ b/sd/source/ui/app/popup.src
@@ -35,6 +35,7 @@
#ifndef _GLOBLMN_HRC
#include <svx/globlmn.hrc>
#endif
+#include "helpids.h"
#define DEFINE_SLOTID_FOR_NUMBER_BULLETS SID_OUTLINE_BULLET
@@ -82,7 +83,7 @@ Menu RID_DRAW_TABLEOBJ_INSIDE_POPUP
MenuItem
{
Identifier = SID_FORMAT_TABLE_DLG;
- HelpID = SID_FORMAT_TABLE_DLG;
+ HelpId = CMD_SID_FORMAT_TABLE_DLG;
Text [ en-US ] = "~Table...";
};
MenuItem
@@ -97,32 +98,32 @@ Menu RID_DRAW_TABLEOBJ_INSIDE_POPUP
MenuItem
{
Identifier = SID_TABLE_MERGE_CELLS;
- HelpID = SID_TABLE_MERGE_CELLS;
+ HelpId = CMD_SID_TABLE_MERGE_CELLS;
Text [ en-US ] = "~Merge";
};
MenuItem
{
Identifier = SID_TABLE_SPLIT_CELLS;
- HelpID = SID_TABLE_SPLIT_CELLS;
+ HelpId = CMD_SID_TABLE_SPLIT_CELLS;
Text [ en-US ] = "~Split...";
};
SEPARATOR
MenuItem
{
Identifier = SID_TABLE_VERT_NONE;
- HelpID = SID_TABLE_VERT_NONE;
+ HelpId = CMD_SID_TABLE_VERT_NONE;
Text [ en-US ] = "~Top";
};
MenuItem
{
Identifier = SID_TABLE_VERT_CENTER;
- HelpID = SID_TABLE_VERT_CENTER;
+ HelpId = CMD_SID_TABLE_VERT_CENTER;
Text [ en-US ] = "C~enter";
};
MenuItem
{
Identifier = SID_TABLE_VERT_BOTTOM;
- HelpID = SID_TABLE_VERT_BOTTOM;
+ HelpId = CMD_SID_TABLE_VERT_BOTTOM;
Text [ en-US ] = "~Bottom";
};
};
@@ -140,26 +141,26 @@ Menu RID_DRAW_TABLEOBJ_INSIDE_POPUP
MenuItem
{
Identifier = SID_TABLE_DISTRIBUTE_ROWS;
- HelpID = SID_TABLE_DISTRIBUTE_ROWS;
+ HelpId = CMD_SID_TABLE_DISTRIBUTE_ROWS;
Text [ en-US ] = "Space ~Equally";
};
SEPARATOR
MenuItem
{
Identifier = SID_TABLE_SELECT_ROW;
- HelpID = SID_TABLE_SELECT_ROW;
+ HelpId = CMD_SID_TABLE_SELECT_ROW;
Text [ en-US ] = "~Select";
};
MenuItem
{
Identifier = SID_TABLE_INSERT_ROW_DLG;
- HelpID = SID_TABLE_INSERT_ROW_DLG;
+ HelpId = CMD_SID_TABLE_INSERT_ROW_DLG;
Text [ en-US ] = "~Insert...";
};
MenuItem
{
Identifier = SID_TABLE_DELETE_ROW;
- HelpID = SID_TABLE_DELETE_ROW;
+ HelpId = CMD_SID_TABLE_DELETE_ROW;
Text [ en-US ] = "~Delete";
};
};
@@ -177,26 +178,26 @@ Menu RID_DRAW_TABLEOBJ_INSIDE_POPUP
MenuItem
{
Identifier = SID_TABLE_DISTRIBUTE_COLUMNS;
- HelpID = SID_TABLE_DISTRIBUTE_COLUMNS;
+ HelpId = CMD_SID_TABLE_DISTRIBUTE_COLUMNS;
Text [ en-US ] = "Space ~Equally";
};
SEPARATOR
MenuItem
{
Identifier = SID_TABLE_SELECT_COL;
- HelpID = SID_TABLE_SELECT_COL;
+ HelpId = CMD_SID_TABLE_SELECT_COL;
Text [ en-US ] = "~Select";
};
MenuItem
{
Identifier = SID_TABLE_INSERT_COL_DLG;
- HelpID = SID_TABLE_INSERT_COL_DLG;
+ HelpId = CMD_SID_TABLE_INSERT_COL_DLG;
Text [ en-US ] = "~Insert...";
};
MenuItem
{
Identifier = SID_TABLE_DELETE_COL;
- HelpID = SID_TABLE_DELETE_COL;
+ HelpId = CMD_SID_TABLE_DELETE_COL;
Text [ en-US ] = "~Delete";
};
};
@@ -428,19 +429,19 @@ Menu RID_LAYERTAB_POPUP
MenuItem
{
Identifier = SID_INSERTLAYER ;
- HelpID = SID_INSERTLAYER ;
+ HelpId = CMD_SID_INSERTLAYER ;
Text [ en-US ] = "~Insert Layer..." ;
};
MenuItem
{
Identifier = SID_MODIFYLAYER ;
- HelpID = SID_MODIFYLAYER ;
+ HelpId = CMD_SID_MODIFYLAYER ;
Text [ en-US ] = "Modify La~yer..." ;
};
MenuItem
{
Identifier = SID_DELETE_LAYER ;
- HelpID = SID_DELETE_LAYER ;
+ HelpId = CMD_SID_DELETE_LAYER ;
Text [ en-US ] = "Delete ~Layer..." ;
};
MN_RENAME_LAYER
@@ -454,13 +455,13 @@ Menu RID_TASKPANE_MASTERPAGESSELECTOR_POPUP
MenuItem
{
Identifier = SID_TP_APPLY_TO_ALL_SLIDES;
- HelpID = SID_TP_APPLY_TO_ALL_SLIDES;
+ HelpId = CMD_SID_TP_APPLY_TO_ALL_SLIDES;
Text [ en-US ] = "~Apply to All Slides";
};
MenuItem
{
Identifier = SID_TP_APPLY_TO_SELECTED_SLIDES;
- HelpID = SID_TP_APPLY_TO_SELECTED_SLIDES;
+ HelpId = CMD_SID_TP_APPLY_TO_SELECTED_SLIDES;
Text [ en-US ] = "Apply to ~Selected Slides";
};
@@ -469,13 +470,13 @@ Menu RID_TASKPANE_MASTERPAGESSELECTOR_POPUP
MenuItem
{
Identifier = SID_TP_SHOW_LARGE_PREVIEW;
- HelpID = SID_TP_SHOW_LARGE_PREVIEW;
+ HelpId = CMD_SID_TP_SHOW_LARGE_PREVIEW;
Text[ en-US ] = "Show ~Large Preview";
};
MenuItem
{
Identifier = SID_TP_SHOW_SMALL_PREVIEW;
- HelpID = SID_TP_SHOW_SMALL_PREVIEW;
+ HelpId = CMD_SID_TP_SHOW_SMALL_PREVIEW;
Text[ en-US ] = "Show S~mall Preview";
};
};
@@ -488,13 +489,13 @@ Menu RID_TASKPANE_CURRENT_MASTERPAGESSELECTOR_POPUP
MenuItem
{
Identifier = SID_TP_APPLY_TO_ALL_SLIDES;
- HelpID = SID_TP_APPLY_TO_ALL_SLIDES;
+ HelpId = CMD_SID_TP_APPLY_TO_ALL_SLIDES;
Text [ en-US ] = "~Apply to All Slides";
};
MenuItem
{
Identifier = SID_TP_APPLY_TO_SELECTED_SLIDES;
- HelpID = SID_TP_APPLY_TO_SELECTED_SLIDES;
+ HelpId = CMD_SID_TP_APPLY_TO_SELECTED_SLIDES;
Text [ en-US ] = "Apply to ~Selected Slides";
};
@@ -504,7 +505,7 @@ Menu RID_TASKPANE_CURRENT_MASTERPAGESSELECTOR_POPUP
MenuItem
{
Identifier = SID_TP_EDIT_MASTER;
- HelpID = SID_TP_EDIT_MASTER;
+ HelpId = CMD_SID_TP_EDIT_MASTER;
Text[ en-US ] = "~Edit Master...";
};
@@ -515,13 +516,13 @@ Menu RID_TASKPANE_CURRENT_MASTERPAGESSELECTOR_POPUP
MenuItem
{
Identifier = SID_TP_SHOW_LARGE_PREVIEW;
- HelpID = SID_TP_SHOW_LARGE_PREVIEW;
+ HelpId = CMD_SID_TP_SHOW_LARGE_PREVIEW;
Text[ en-US ] = "Show ~Large Preview";
};
MenuItem
{
Identifier = SID_TP_SHOW_SMALL_PREVIEW;
- HelpID = SID_TP_SHOW_SMALL_PREVIEW;
+ HelpId = CMD_SID_TP_SHOW_SMALL_PREVIEW;
Text[ en-US ] = "Show S~mall Preview";
};
};
@@ -534,7 +535,7 @@ Menu RID_TASKPANE_LAYOUTMENU_POPUP
MenuItem
{
Identifier = SID_TP_APPLY_TO_SELECTED_SLIDES;
- HelpID = SID_TP_APPLY_TO_SELECTED_SLIDES;
+ HelpId = CMD_SID_TP_APPLY_TO_SELECTED_SLIDES;
Text [ en-US ] = "Apply to ~Selected Slides";
};
@@ -543,7 +544,7 @@ Menu RID_TASKPANE_LAYOUTMENU_POPUP
MenuItem
{
Identifier = SID_INSERTPAGE_LAYOUT_MENU;
- HelpID = SID_INSERTPAGE_LAYOUT_MENU;
+ HelpId = CMD_SID_INSERTPAGE_LAYOUT_MENU;
Text [ en-US ] = "~Insert Slide";
};
};
diff --git a/sd/source/ui/app/popup2_tmpl.src b/sd/source/ui/app/popup2_tmpl.src
index 46efadeb031d..24250f4ef384 100644
--- a/sd/source/ui/app/popup2_tmpl.src
+++ b/sd/source/ui/app/popup2_tmpl.src
@@ -776,7 +776,7 @@
MenuItem
{
Identifier = SID_FORMAT_TABLE_DLG;
- HelpID = SID_FORMAT_TABLE_DLG;
+ HelpId = CMD_SID_FORMAT_TABLE_DLG;
Text [ en-US ] = "~Table...";
};
MenuItem
@@ -791,32 +791,32 @@
MenuItem
{
Identifier = SID_TABLE_MERGE_CELLS;
- HelpID = SID_TABLE_MERGE_CELLS;
+ HelpId = CMD_SID_TABLE_MERGE_CELLS;
Text [ en-US ] = "~Merge";
};
MenuItem
{
Identifier = SID_TABLE_SPLIT_CELLS;
- HelpID = SID_TABLE_SPLIT_CELLS;
+ HelpId = CMD_SID_TABLE_SPLIT_CELLS;
Text [ en-US ] = "~Split...";
};
SEPARATOR
MenuItem
{
Identifier = SID_TABLE_VERT_NONE;
- HelpID = SID_TABLE_VERT_NONE;
+ HelpId = CMD_SID_TABLE_VERT_NONE;
Text [ en-US ] = "~Top";
};
MenuItem
{
Identifier = SID_TABLE_VERT_CENTER;
- HelpID = SID_TABLE_VERT_CENTER;
+ HelpId = CMD_SID_TABLE_VERT_CENTER;
Text [ en-US ] = "C~enter";
};
MenuItem
{
Identifier = SID_TABLE_VERT_BOTTOM;
- HelpID = SID_TABLE_VERT_BOTTOM;
+ HelpId = CMD_SID_TABLE_VERT_BOTTOM;
Text [ en-US ] = "~Bottom";
};
};
@@ -834,26 +834,26 @@
MenuItem
{
Identifier = SID_TABLE_DISTRIBUTE_ROWS;
- HelpID = SID_TABLE_DISTRIBUTE_ROWS;
+ HelpId = CMD_SID_TABLE_DISTRIBUTE_ROWS;
Text [ en-US ] = "Space ~Equally";
};
SEPARATOR
MenuItem
{
Identifier = SID_TABLE_SELECT_ROW;
- HelpID = SID_TABLE_SELECT_ROW;
+ HelpId = CMD_SID_TABLE_SELECT_ROW;
Text [ en-US ] = "~Select";
};
MenuItem
{
Identifier = SID_TABLE_INSERT_ROW_DLG;
- HelpID = SID_TABLE_INSERT_ROW_DLG;
+ HelpId = CMD_SID_TABLE_INSERT_ROW_DLG;
Text [ en-US ] = "~Insert...";
};
MenuItem
{
Identifier = SID_TABLE_DELETE_ROW;
- HelpID = SID_TABLE_DELETE_ROW;
+ HelpId = CMD_SID_TABLE_DELETE_ROW;
Text [ en-US ] = "~Delete";
};
};
@@ -871,26 +871,26 @@
MenuItem
{
Identifier = SID_TABLE_DISTRIBUTE_COLUMNS;
- HelpID = SID_TABLE_DISTRIBUTE_COLUMNS;
+ HelpId = CMD_SID_TABLE_DISTRIBUTE_COLUMNS;
Text [ en-US ] = "Space ~Equally";
};
SEPARATOR
MenuItem
{
Identifier = SID_TABLE_SELECT_COL;
- HelpID = SID_TABLE_SELECT_COL;
+ HelpId = CMD_SID_TABLE_SELECT_COL;
Text [ en-US ] = "~Select";
};
MenuItem
{
Identifier = SID_TABLE_INSERT_COL_DLG;
- HelpID = SID_TABLE_INSERT_COL_DLG;
+ HelpId = CMD_SID_TABLE_INSERT_COL_DLG;
Text [ en-US ] = "~Insert...";
};
MenuItem
{
Identifier = SID_TABLE_DELETE_COL;
- HelpID = SID_TABLE_DELETE_COL;
+ HelpId = CMD_SID_TABLE_DELETE_COL;
Text [ en-US ] = "~Delete";
};
};
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index de1c80b0457e..29d7678f372c 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -86,7 +86,7 @@ SFX_IMPL_INTERFACE(SdModule, SfxModule, SdResId(STR_APPLICATIONOBJECTBAR))
\************************************************************************/
SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
-: SfxModule( SfxApplication::CreateResManager("sd"), FALSE,
+: SfxModule( SfxApplication::CreateResManager("sd"), sal_False,
pFact1, pFact2, NULL ),
pTransferClip(NULL),
pTransferDrag(NULL),
@@ -95,7 +95,7 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
pDrawOptions(NULL),
pSearchItem(NULL),
pNumberFormatter( NULL ),
- bWaterCan(FALSE),
+ bWaterCan(sal_False),
mpResourceContainer(new ::sd::SdGlobalResourceContainer())
{
SetName( UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "StarDraw" ) ) ); // Nicht uebersetzen!
@@ -157,46 +157,6 @@ SdModule::~SdModule()
/*************************************************************************
|*
-|* Statusbar erzeugen
-|*
-\************************************************************************/
-
-#define AUTOSIZE_WIDTH 180
-#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s))
-
-void SdModule::FillStatusBar(StatusBar& rStatusBar)
-{
- // Hinweis
- rStatusBar.InsertItem( SID_CONTEXT, TEXT_WIDTH( String().Fill( 30, 'x' ) ), // vorher 52
- SIB_IN | SIB_LEFT | SIB_AUTOSIZE );
-
- // Groesse und Position
- rStatusBar.InsertItem( SID_ATTR_SIZE, SvxPosSizeStatusBarControl::GetDefItemWidth(rStatusBar), // vorher 42
- SIB_IN | SIB_USERDRAW );
-
- // Massstab
- rStatusBar.InsertItem( SID_ATTR_ZOOM, SvxZoomStatusBarControl::GetDefItemWidth(rStatusBar), SIB_IN | SIB_CENTER );
-
- // Dokument geaendert
- rStatusBar.InsertItem( SID_DOC_MODIFIED, SvxModifyControl::GetDefItemWidth(rStatusBar) );
-
- // signatures
- rStatusBar.InsertItem( SID_SIGNATURE, XmlSecStatusBarControl::GetDefItemWidth( rStatusBar ), SIB_USERDRAW );
- rStatusBar.SetHelpId(SID_SIGNATURE, SID_SIGNATURE);
-
- // Seite
- rStatusBar.InsertItem( SID_STATUS_PAGE, TEXT_WIDTH( String().Fill( 24, 'X' ) ),
- SIB_IN | SIB_LEFT );
-
- // Praesentationslayout
- rStatusBar.InsertItem( SID_STATUS_LAYOUT, TEXT_WIDTH( String().Fill( 10, 'X' ) ),
- SIB_IN | SIB_LEFT | SIB_AUTOSIZE );
-}
-
-
-
-/*************************************************************************
-|*
|* get notifications
|*
\************************************************************************/
@@ -237,7 +197,7 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
}
if( pOptions )
{
- UINT16 nMetric = pOptions->GetMetric();
+ sal_uInt16 nMetric = pOptions->GetMetric();
::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
SdDrawDocument* pDoc = NULL;
@@ -279,7 +239,7 @@ SvStorageStreamRef SdModule::GetOptionStream( const String& rOptionName,
SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READWRITE );
if( pStm )
- xOptionStorage = new SvStorage( pStm, TRUE );
+ xOptionStorage = new SvStorage( pStm, sal_True );
}
if( DOCUMENT_TYPE_DRAW == eType )
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index ec448db5f87d..d6934a1f609c 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -115,7 +115,7 @@ private:
void SdModule::Execute(SfxRequest& rReq)
{
const SfxItemSet* pSet = rReq.GetArgs();
- ULONG nSlotId = rReq.GetSlot();
+ sal_uLong nSlotId = rReq.GetSlot();
switch ( nSlotId )
{
@@ -130,9 +130,9 @@ void SdModule::Execute(SfxRequest& rReq)
// automatische Rechtschreibpruefung
const SfxPoolItem* pItem;
if( pSet && SFX_ITEM_SET == pSet->GetItemState(
- SID_AUTOSPELL_CHECK, FALSE, &pItem ) )
+ SID_AUTOSPELL_CHECK, sal_False, &pItem ) )
{
- BOOL bOnlineSpelling = ( (const SfxBoolItem*) pItem )->GetValue();
+ sal_Bool bOnlineSpelling = ( (const SfxBoolItem*) pItem )->GetValue();
// am Dokument sichern:
::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
if( pDocSh )
@@ -147,7 +147,7 @@ void SdModule::Execute(SfxRequest& rReq)
case SID_ATTR_METRIC:
{
const SfxPoolItem* pItem;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_METRIC, TRUE, &pItem ) )
+ if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_ATTR_METRIC, sal_True, &pItem ) )
{
FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue();
switch( eUnit )
@@ -166,7 +166,7 @@ void SdModule::Execute(SfxRequest& rReq)
PutItem( *pItem );
SdOptions* pOptions = GetSdOptions( eDocType );
if(pOptions)
- pOptions->SetMetric( (UINT16)eUnit );
+ pOptions->SetMetric( (sal_uInt16)eUnit );
rReq.Done();
}
}
@@ -186,9 +186,9 @@ void SdModule::Execute(SfxRequest& rReq)
const SfxPoolItem* pItem;
if( pSet &&
(
- SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, FALSE, &pItem ) ||
- SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, FALSE, &pItem ) ||
- SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, FALSE, &pItem )
+ SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_LANGUAGE, sal_False, &pItem ) ||
+ SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, sal_False, &pItem ) ||
+ SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, sal_False, &pItem )
)
)
{
@@ -230,7 +230,7 @@ void SdModule::Execute(SfxRequest& rReq)
case SID_OPENHYPERLINK:
case SID_OPENDOC:
{
- BOOL bIntercept = FALSE;
+ sal_Bool bIntercept = sal_False;
::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
if (pDocShell)
{
@@ -244,7 +244,7 @@ void SdModule::Execute(SfxRequest& rReq)
// from a shape interaction.
if (rReq.GetArgs() == NULL)
{
- bIntercept = TRUE;
+ bIntercept = sal_True;
}
}
}
@@ -258,7 +258,7 @@ void SdModule::Execute(SfxRequest& rReq)
{
ErrorBox(NULL, WB_OK, String(SdResId(STR_CANT_PERFORM_IN_LIVEMODE))).Execute();
- SFX_REQUEST_ARG( rReq, pLinkItem, SfxLinkItem, SID_DONELINK, FALSE );
+ SFX_REQUEST_ARG( rReq, pLinkItem, SfxLinkItem, SID_DONELINK, sal_False );
if( pLinkItem )
pLinkItem->GetValue().Call( 0 );
}
@@ -290,7 +290,7 @@ void SdModule::OutlineToImpress (SfxRequest& rRequest)
SfxObjectShellLock xDocShell;
::sd::DrawDocShell* pDocSh;
xDocShell = pDocSh = new ::sd::DrawDocShell(
- SFX_CREATE_MODE_STANDARD, FALSE);
+ SFX_CREATE_MODE_STANDARD, sal_False);
if(pDocSh)
{
pDocSh->DoInitNew(NULL);
@@ -301,7 +301,7 @@ void SdModule::OutlineToImpress (SfxRequest& rRequest)
pDoc->StopWorkStartupDelay();
}
- SFX_REQUEST_ARG( rRequest, pFrmItem, SfxFrameItem, SID_DOCFRAME, FALSE);
+ SFX_REQUEST_ARG( rRequest, pFrmItem, SfxFrameItem, SID_DOCFRAME, sal_False);
SfxViewFrame::LoadDocumentIntoFrame( *pDocSh, pFrmItem, ::sd::OUTLINE_FACTORY_ID );
::sd::ViewShell* pViewSh = pDocSh->GetViewShell();
@@ -509,7 +509,7 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume
// The summary page, if it exists, is the last page.
SdPage* pSummaryPage = pDocument->GetSdPage (
- (USHORT)nPageCount-1, PK_STANDARD);
+ (sal_uInt16)nPageCount-1, PK_STANDARD);
OSL_ASSERT (pSummaryPage!=NULL);
// Take the change mode of the template page as indication of the
@@ -534,9 +534,9 @@ SfxFrame* SdModule::CreateFromTemplate( const String& rTemplatePath, const Refer
SfxObjectShellLock xDocShell;
SfxItemSet* pSet = new SfxAllItemSet( SFX_APP()->GetPool() );
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
- ULONG lErr = SFX_APP()->LoadTemplate( xDocShell, rTemplatePath, TRUE, pSet );
+ sal_uLong lErr = SFX_APP()->LoadTemplate( xDocShell, rTemplatePath, sal_True, pSet );
SfxObjectShell* pDocShell = xDocShell;
@@ -561,7 +561,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
if ( SvtModuleOptions().IsImpress() )
{
Reference< XFrame > xTargetFrame;
- SFX_REQUEST_ARG( rReq, pFrmItem, SfxUnoFrameItem, SID_FILLFRAME, FALSE);
+ SFX_REQUEST_ARG( rReq, pFrmItem, SfxUnoFrameItem, SID_FILLFRAME, sal_False);
if ( pFrmItem )
xTargetFrame = pFrmItem->GetFrame();
@@ -604,9 +604,9 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
const sal_Bool bIsDocEmpty = pPilotDlg->IsDocEmpty();
// So that you can open the document without AutoLayout-Dialog
- pOpt->SetStartWithTemplate(FALSE);
+ pOpt->SetStartWithTemplate(sal_False);
if(bNewDocDirect && !pPilotDlg->GetStartWithFlag())
- bStartWithTemplate = FALSE;
+ bStartWithTemplate = sal_False;
if( pPilotDlg->GetStartType() == ST_OPEN )
{
@@ -657,7 +657,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
}
catch (::com::sun::star::uno::Exception &e)
{
- DBG_ASSERT (FALSE, "caught IllegalArgumentException while loading document from Impress autopilot");
+ DBG_ASSERT (sal_False, "caught IllegalArgumentException while loading document from Impress autopilot");
}
}
}
@@ -718,7 +718,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
if((aDocPath.Len() == 0) && pViewFrame && pViewFrame->GetDispatcher())
{
SfxBoolItem aIsChangedItem(SID_MODIFYPAGE, !bIsDocEmpty);
- SfxUInt32Item eAutoLayout( ID_VAL_WHATLAYOUT, (UINT32) AUTOLAYOUT_TITLE );
+ SfxUInt32Item eAutoLayout( ID_VAL_WHATLAYOUT, (sal_uInt32) AUTOLAYOUT_TITLE );
pViewFrame->GetDispatcher()->Execute(SID_MODIFYPAGE,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aIsChangedItem, &eAutoLayout, 0L);
}
@@ -737,7 +737,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
pDoc->SetChanged(!bIsDocEmpty);
- pDocShell->SetUseUserData(TRUE);
+ pDocShell->SetUseUserData(sal_True);
// clear UNDO stack after autopilot
pDocShell->ClearUndoBuffer();
@@ -771,7 +771,7 @@ SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference<
SfxObjectShellLock xDocShell;
::sd::DrawDocShell* pNewDocSh;
- xDocShell = pNewDocSh = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD,FALSE,eDocType);
+ xDocShell = pNewDocSh = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD,sal_False,eDocType);
if(pNewDocSh)
{
pNewDocSh->DoInitNew(NULL);
@@ -801,23 +801,23 @@ void SdModule::ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewF
// settings for the Outputmedium
Size aNewSize;
- UINT32 nLeft = 0;
- UINT32 nRight = 0;
- UINT32 nLower = 0;
- UINT32 nUpper = 0;
+ sal_uInt32 nLeft = 0;
+ sal_uInt32 nRight = 0;
+ sal_uInt32 nLower = 0;
+ sal_uInt32 nUpper = 0;
switch(eMedium)
{
case OUTPUT_PAGE:
case OUTPUT_OVERHEAD:
{
- SfxPrinter* pPrinter = pDocShell->GetPrinter(TRUE);
+ SfxPrinter* pPrinter = pDocShell->GetPrinter(sal_True);
if( pPrinter && pPrinter->IsValid())
{
// Der Printer gibt leider kein exaktes
// Format (z.B. A4) zurueck
Size aSize(pPrinter->GetPaperSize());
- Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, MAP_100TH_MM, TRUE);
+ Paper ePaper = SvxPaperInfo::GetSvxPaper( aSize, MAP_100TH_MM, sal_True);
if (ePaper != PAPER_USER)
{
@@ -879,9 +879,9 @@ void SdModule::ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewF
break;
}
- BOOL bScaleAll = TRUE;
- USHORT nPageCnt = pDoc->GetMasterSdPageCount(PK_STANDARD);
- USHORT i;
+ sal_Bool bScaleAll = sal_True;
+ sal_uInt16 nPageCnt = pDoc->GetMasterSdPageCount(PK_STANDARD);
+ sal_uInt16 i;
SdPage* pPage;
// master pages first
@@ -929,7 +929,7 @@ void SdModule::ChangeMedium( ::sd::DrawDocShell* pDocShell, SfxViewFrame* pViewF
}
SdPage* pHandoutPage = pDoc->GetSdPage(0, PK_HANDOUT);
- pHandoutPage->CreateTitleAndLayout(TRUE);
+ pHandoutPage->CreateTitleAndLayout(sal_True);
if( (eMedium != OUTPUT_ORIGINAL) && pViewFrame && pViewFrame->GetDispatcher())
{
@@ -1028,8 +1028,8 @@ void OutlineToImpressFinalizer::operator() (bool)
// Call UpdatePreview once for every slide to resync the
// document with the outliner of the OutlineViewShell.
- USHORT nPageCount (mrDocument.GetSdPageCount(PK_STANDARD));
- for (USHORT nIndex=0; nIndex<nPageCount; nIndex++)
+ sal_uInt16 nPageCount (mrDocument.GetSdPageCount(PK_STANDARD));
+ for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++)
{
SdPage* pPage = mrDocument.GetSdPage(nIndex, PK_STANDARD);
// Make the page the actual page so that the
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index bfb49147dcdb..f86e15ac622b 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -113,7 +113,7 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo
int nPgNum = 0;
Outliner* pOutl = pSdView->GetOutliner();
long nPos = pInfo->GetPara();
- ULONG nParaPos = 0;
+ sal_uLong nParaPos = 0;
for( Paragraph* pPara = pOutl->GetParagraph( 0 ); pPara && nPos >= 0; pPara = pOutl->GetParagraph( ++nParaPos ), nPos-- )
{
@@ -121,7 +121,7 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo
nPgNum++;
}
- pPage = pViewSh->GetDoc()->GetSdPage( (USHORT)nPgNum, PK_STANDARD );
+ pPage = pViewSh->GetDoc()->GetSdPage( (sal_uInt16)nPgNum, PK_STANDARD );
}
else
{
@@ -260,7 +260,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
{
nPgNum = (pPage->GetPageNum() - 1) / 2 + 1;
}
- aRepresentation = pDoc->CreatePageNumValue((USHORT)nPgNum);
+ aRepresentation = pDoc->CreatePageNumValue((sal_uInt16)nPgNum);
}
else
{
@@ -288,7 +288,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
bool bMasterView;
SdPage* pPage = GetCurrentPage( pViewSh, pInfo, bMasterView );
- USHORT nPageCount = 0;
+ sal_uInt16 nPageCount = 0;
if( !bMasterView )
{
@@ -298,7 +298,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
}
else if( pDoc )
{
- nPageCount = (USHORT)pDoc->GetSdPageCount(PK_STANDARD);
+ nPageCount = (sal_uInt16)pDoc->GetSdPageCount(PK_STANDARD);
}
}
@@ -420,7 +420,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
|* virt. Methoden fuer Optionendialog
|*
\************************************************************************/
-SfxItemSet* SdModule::CreateItemSet( USHORT nSlot )
+SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot )
{
::sd::FrameView* pFrameView = NULL;
::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
@@ -473,7 +473,7 @@ SfxItemSet* SdModule::CreateItemSet( USHORT nSlot )
// TP_OPTIONS_LAYOUT:
pRet->Put( SdOptionsLayoutItem( ATTR_OPTIONS_LAYOUT, pOptions, pFrameView ) );
- UINT16 nDefTab = 0;
+ sal_uInt16 nDefTab = 0;
if( pFrameView)
nDefTab = pDoc->GetDefaultTabulator();
else
@@ -489,7 +489,7 @@ SfxItemSet* SdModule::CreateItemSet( USHORT nSlot )
if( nMetric == (FieldUnit)0xffff )
nMetric = GetFieldUnit();
- pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, (UINT16)nMetric ) );
+ pRet->Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nMetric ) );
// TP_OPTIONS_CONTENTS:
pRet->Put( SdOptionsContentsItem( ATTR_OPTIONS_CONTENTS, pOptions, pFrameView ) );
@@ -500,7 +500,7 @@ SfxItemSet* SdModule::CreateItemSet( USHORT nSlot )
{
aSdOptionsMiscItem.GetOptionsMisc().SetSummationOfParagraphs( pDoc->IsSummationOfParagraphs() );
aSdOptionsMiscItem.GetOptionsMisc().SetPrinterIndependentLayout (
- (USHORT)pDoc->GetPrinterIndependentLayout());
+ (sal_uInt16)pDoc->GetPrinterIndependentLayout());
}
pRet->Put( aSdOptionsMiscItem );
@@ -509,10 +509,10 @@ SfxItemSet* SdModule::CreateItemSet( USHORT nSlot )
pRet->Put( SdOptionsSnapItem( ATTR_OPTIONS_SNAP, pOptions, pFrameView ) );
// TP_SCALE:
- UINT32 nW = 10L;
- UINT32 nH = 10L;
- INT32 nX;
- INT32 nY;
+ sal_uInt32 nW = 10L;
+ sal_uInt32 nH = 10L;
+ sal_Int32 nX;
+ sal_Int32 nY;
if( pDocSh )
{
SdrPage* pPage = (SdrPage*) pDoc->GetSdPage(0, PK_STANDARD);
@@ -547,12 +547,12 @@ SfxItemSet* SdModule::CreateItemSet( USHORT nSlot )
return pRet;
}
-void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
+void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
{
const SfxPoolItem* pItem = NULL;
- BOOL bNewDefTab = FALSE;
- BOOL bNewPrintOptions = FALSE;
- BOOL bMiscOptions = FALSE;
+ sal_Bool bNewDefTab = sal_False;
+ sal_Bool bNewPrintOptions = sal_False;
+ sal_Bool bMiscOptions = sal_False;
::sd::FrameView* pFrameView = NULL;
::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
@@ -580,7 +580,7 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
SdOptions* pOptions = GetSdOptions(eDocType);
// Raster
if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_GRID_OPTIONS ,
- FALSE, (const SfxPoolItem**) &pItem ))
+ sal_False, (const SfxPoolItem**) &pItem ))
{
const SdOptionsGridItem* pGridItem = (SdOptionsGridItem*) pItem;
pGridItem->SetOptions( pOptions );
@@ -589,35 +589,35 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
// Layout
const SdOptionsLayoutItem* pLayoutItem = NULL;
if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_LAYOUT,
- FALSE, (const SfxPoolItem**) &pLayoutItem ))
+ sal_False, (const SfxPoolItem**) &pLayoutItem ))
{
pLayoutItem->SetOptions( pOptions );
}
// Metric
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC, sal_False, &pItem ) )
{
if( pDoc && eDocType == pDoc->GetDocumentType() )
PutItem( *pItem );
pOptions->SetMetric( ( (SfxUInt16Item*) pItem )->GetValue() );
}
- UINT16 nDefTab = pOptions->GetDefTab();
+ sal_uInt16 nDefTab = pOptions->GetDefTab();
// Default-Tabulator
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_DEFTABSTOP, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_DEFTABSTOP, sal_False, &pItem ) )
{
nDefTab = ( (SfxUInt16Item*) pItem )->GetValue();
pOptions->SetDefTab( nDefTab );
- bNewDefTab = TRUE;
+ bNewDefTab = sal_True;
}
// Massstab
- if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_X, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_X, sal_False, &pItem ) )
{
- INT32 nX = ( (SfxInt32Item*) pItem )->GetValue();
- if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_Y, FALSE, &pItem ) )
+ sal_Int32 nX = ( (SfxInt32Item*) pItem )->GetValue();
+ if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SCALE_Y, sal_False, &pItem ) )
{
- INT32 nY = ( (SfxInt32Item*) pItem )->GetValue();
+ sal_Int32 nY = ( (SfxInt32Item*) pItem )->GetValue();
pOptions->SetScale( nX, nY );
// Apply to document only if doc type match
@@ -633,7 +633,7 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
// Contents (Inhalte)
const SdOptionsContentsItem* pContentsItem = NULL;
if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_CONTENTS,
- FALSE, (const SfxPoolItem**) &pContentsItem ))
+ sal_False, (const SfxPoolItem**) &pContentsItem ))
{
pContentsItem->SetOptions( pOptions );
}
@@ -641,16 +641,16 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
// Misc (Sonstiges)
const SdOptionsMiscItem* pMiscItem = NULL;
if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_MISC,
- FALSE, (const SfxPoolItem**) &pMiscItem ))
+ sal_False, (const SfxPoolItem**) &pMiscItem ))
{
pMiscItem->SetOptions( pOptions );
- bMiscOptions = TRUE;
+ bMiscOptions = sal_True;
}
// Fangen/Einrasten
const SdOptionsSnapItem* pSnapItem = NULL;
if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_SNAP,
- FALSE, (const SfxPoolItem**) &pSnapItem ))
+ sal_False, (const SfxPoolItem**) &pSnapItem ))
{
pSnapItem->SetOptions( pOptions );
}
@@ -664,14 +664,14 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
// Drucken
const SdOptionsPrintItem* pPrintItem = NULL;
if( SFX_ITEM_SET == rSet.GetItemState( ATTR_OPTIONS_PRINT,
- FALSE, (const SfxPoolItem**) &pPrintItem ))
+ sal_False, (const SfxPoolItem**) &pPrintItem ))
{
pPrintItem->SetOptions( pOptions );
// PrintOptionsSet setzen
SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT, pOptions );
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
nFlags = (aPrintItem.GetOptionsPrint().IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) |
(aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0);
@@ -681,7 +681,7 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
aPrintSet.Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.GetOptionsPrint().IsWarningPrinter() ) );
aPrintSet.Put( aFlagItem );
- bNewPrintOptions = TRUE;
+ bNewPrintOptions = sal_True;
}
// Nur, wenn auch der Dokumenttyp uebereinstimmt...
@@ -689,7 +689,7 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
{
if( bNewPrintOptions )
{
- pDocSh->GetPrinter(TRUE)->SetOptions( aPrintSet );
+ pDocSh->GetPrinter(sal_True)->SetOptions( aPrintSet );
}
// Am Model den DefTab setzen
@@ -698,11 +698,11 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
SdDrawDocument* pDocument = pDocSh->GetDoc();
pDocument->SetDefaultTabulator( nDefTab );
- ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE );
+ ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
pOutl->SetDefTab( nDefTab );
- ::sd::Outliner* pInternalOutl = pDocument->GetInternalOutliner( FALSE );
+ ::sd::Outliner* pInternalOutl = pDocument->GetInternalOutliner( sal_False );
if( pInternalOutl )
pInternalOutl->SetDefTab( nDefTab );
}
@@ -713,16 +713,16 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
sal_uInt32 nCntrl;
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
nCntrl = rOutl.GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
rOutl.SetControlWord( nCntrl | nSum );
- ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE );
+ ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
{
nCntrl = pOutl->GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
pOutl->SetControlWord( nCntrl | nSum );
}
- pOutl = pDocument->GetInternalOutliner( FALSE );
+ pOutl = pDocument->GetInternalOutliner( sal_False );
if( pOutl )
{
nCntrl = pOutl->GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
@@ -759,10 +759,10 @@ void SdModule::ApplyItemSet( USHORT nSlot, const SfxItemSet& rSet )
}
if( pViewShell && pViewShell->GetViewFrame() )
- pViewShell->GetViewFrame()->GetBindings().InvalidateAll( TRUE );
+ pViewShell->GetViewFrame()->GetBindings().InvalidateAll( sal_True );
}
-SfxTabPage* SdModule::CreateTabPage( USHORT nId, Window* pParent, const SfxItemSet& rSet )
+SfxTabPage* SdModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet )
{
SfxTabPage* pRet = NULL;
SfxAllItemSet aSet(*(rSet.GetPool()));
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index 4b549de49301..dcdeeeeb484d 100644..100755
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -77,8 +77,8 @@ SdFieldPopup::~SdFieldPopup()
void SdFieldPopup::Fill( LanguageType eLanguage )
{
- USHORT nID = 1;
- USHORT nStyle = MIB_RADIOCHECK | MIB_AUTOCHECK;
+ sal_uInt16 nID = 1;
+ sal_uInt16 nStyle = MIB_RADIOCHECK | MIB_AUTOCHECK;
InsertItem( nID++, String( SdResId( STR_FIX ) ), nStyle );
InsertItem( nID++, String( SdResId( STR_VAR ) ), nStyle );
InsertSeparator();
@@ -113,7 +113,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
aDateField.SetFormat( SVXDATEFORMAT_F ); // Dienstag, 13.Februar 1996
InsertItem( nID++, aDateField.GetFormatted( *pNumberFormatter, eLanguage ), nStyle );
- CheckItem( (USHORT) ( pDateField->GetFormat() ) + 1 ); // - 2 + 3 !
+ CheckItem( (sal_uInt16) ( pDateField->GetFormat() ) + 1 ); // - 2 + 3 !
}
else if( pField->ISA( SvxExtTimeField ) )
{
@@ -147,7 +147,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
//SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM
//SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM
- CheckItem( (USHORT) ( pTimeField->GetFormat() ) + 1 ); // - 2 + 3 !
+ CheckItem( (sal_uInt16) ( pTimeField->GetFormat() ) + 1 ); // - 2 + 3 !
}
else if( pField->ISA( SvxExtFileField ) )
{
@@ -164,7 +164,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
InsertItem( nID++, String( SdResId( STR_FILEFORMAT_PATH ) ), nStyle );
InsertItem( nID++, String( SdResId( STR_FILEFORMAT_NAME ) ), nStyle );
- CheckItem( (USHORT) ( pFileField->GetFormat() ) + 3 );
+ CheckItem( (sal_uInt16) ( pFileField->GetFormat() ) + 3 );
}
else if( pField->ISA( SvxAuthorField ) )
{
@@ -176,12 +176,12 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
else
CheckItem( 2 );
- for( USHORT i = 0; i < 4; i++ )
+ for( sal_uInt16 i = 0; i < 4; i++ )
{
aAuthorField.SetFormat( (SvxAuthorFormat) i );
InsertItem( nID++, aAuthorField.GetFormatted(), nStyle );
}
- CheckItem( (USHORT) ( pAuthorField->GetFormat() ) + 3 );
+ CheckItem( (sal_uInt16) ( pAuthorField->GetFormat() ) + 3 );
}
}
@@ -195,14 +195,14 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
SvxFieldData* SdFieldPopup::GetField()
{
SvxFieldData* pNewField = NULL;
- USHORT nCount = GetItemCount();
+ sal_uInt16 nCount = GetItemCount();
if( pField->ISA( SvxDateField ) )
{
const SvxDateField* pDateField = (const SvxDateField*) pField;
SvxDateType eType;
SvxDateFormat eFormat;
- USHORT i;
+ sal_uInt16 i;
if( IsItemChecked( 1 ) )
eType = SVXDATETYPE_FIX;
@@ -235,7 +235,7 @@ SvxFieldData* SdFieldPopup::GetField()
const SvxExtTimeField* pTimeField = (const SvxExtTimeField*) pField;
SvxTimeType eType;
SvxTimeFormat eFormat;
- USHORT i;
+ sal_uInt16 i;
if( IsItemChecked( 1 ) )
eType = SVXTIMETYPE_FIX;
@@ -269,7 +269,7 @@ SvxFieldData* SdFieldPopup::GetField()
const SvxExtFileField* pFileField = (const SvxExtFileField*) pField;
SvxFileType eType;
SvxFileFormat eFormat;
- USHORT i;
+ sal_uInt16 i;
if( IsItemChecked( 1 ) )
eType = SVXFILETYPE_FIX;
@@ -309,7 +309,7 @@ SvxFieldData* SdFieldPopup::GetField()
const SvxAuthorField* pAuthorField = (const SvxAuthorField*) pField;
SvxAuthorType eType;
SvxAuthorFormat eFormat;
- USHORT i;
+ sal_uInt16 i;
if( IsItemChecked( 1 ) )
eType = SVXAUTHORTYPE_FIX;
diff --git a/sd/source/ui/app/sdresid.cxx b/sd/source/ui/app/sdresid.cxx
index 7b8f773167da..ec6fdbfb1d0b 100644..100755
--- a/sd/source/ui/app/sdresid.cxx
+++ b/sd/source/ui/app/sdresid.cxx
@@ -39,7 +39,7 @@
|*
\************************************************************************/
-SdResId::SdResId(USHORT nId) :
+SdResId::SdResId(sal_uInt16 nId) :
ResId(nId, *SD_MOD()->GetResMgr())
{
}
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 51df36a4e132..f40a6694a10e 100644..100755
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -99,7 +99,7 @@ using namespace ::com::sun::star::datatransfer::clipboard;
// - SdTransferable -
// ------------------
-SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView, BOOL bInitOnGetData )
+SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView, sal_Bool bInitOnGetData )
: mpPageDocShell( NULL )
, mpOLEDataHelper( NULL )
, mpObjDesc( NULL )
@@ -112,12 +112,12 @@ SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView,
, mpBookmark( NULL )
, mpGraphic( NULL )
, mpImageMap( NULL )
-, mbInternalMove( FALSE )
-, mbOwnDocument( FALSE )
-, mbOwnView( FALSE )
+, mbInternalMove( sal_False )
+, mbOwnDocument( sal_False )
+, mbOwnView( sal_False )
, mbLateInit( bInitOnGetData )
-, mbPageTransferable( FALSE )
-, mbPageTransferablePersistent( FALSE )
+, mbPageTransferable( sal_False )
+, mbPageTransferablePersistent( sal_False )
, mbIsUnoObj( false )
{
if( mpSourceDoc )
@@ -208,7 +208,7 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
{
mpGraphic = new Graphic( static_cast< SdrGrafObj* >( pObj )->GetTransformedGraphic() );
}
- else if( pObj->IsUnoObj() && FmFormInventor == pObj->GetObjInventor() && ( pObj->GetObjIdentifier() == (UINT16) OBJ_FM_BUTTON ) )
+ else if( pObj->IsUnoObj() && FmFormInventor == pObj->GetObjInventor() && ( pObj->GetObjIdentifier() == (sal_uInt16) OBJ_FM_BUTTON ) )
{
SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( pObj );
@@ -275,7 +275,7 @@ void SdTransferable::CreateData()
{
if( mpSdDrawDocument && !mpSdViewIntern )
{
- mbOwnView = TRUE;
+ mbOwnView = sal_True;
SdPage* pPage = mpSdDrawDocument->GetSdPage(0, PK_STANDARD);
@@ -309,7 +309,7 @@ void SdTransferable::CreateData()
if( !maDocShellRef.Is() )
{
OSL_FAIL( "SdTransferable::CreateData(), failed to create a model with persist, clipboard operation will fail for OLE objects!" );
- mbOwnDocument = TRUE;
+ mbOwnDocument = sal_True;
}
// Groesse der Source-Seite uebernehmen
@@ -343,7 +343,7 @@ void SdTransferable::CreateData()
Point aOrigin( ( maVisArea = mpSdViewIntern->GetAllMarkedRect() ).TopLeft() );
Size aVector( -aOrigin.X(), -aOrigin.Y() );
- for( ULONG nObj = 0, nObjCount = pPage->GetObjCount(); nObj < nObjCount; nObj++ )
+ for( sal_uLong nObj = 0, nObjCount = pPage->GetObjCount(); nObj < nObjCount; nObj++ )
{
SdrObject* pObj = pPage->GetObj( nObj );
pObj->NbcMove( aVector );
@@ -359,9 +359,9 @@ void SdTransferable::CreateData()
// -----------------------------------------------------------------------------
-BOOL lcl_HasOnlyControls( SdrModel* pModel )
+sal_Bool lcl_HasOnlyControls( SdrModel* pModel )
{
- BOOL bOnlyControls = FALSE; // default if there are no objects
+ sal_Bool bOnlyControls = sal_False; // default if there are no objects
if ( pModel )
{
@@ -372,12 +372,12 @@ BOOL lcl_HasOnlyControls( SdrModel* pModel )
SdrObject* pObj = aIter.Next();
if ( pObj )
{
- bOnlyControls = TRUE; // only set if there are any objects at all
+ bOnlyControls = sal_True; // only set if there are any objects at all
while ( pObj )
{
if (!pObj->ISA(SdrUnoObj))
{
- bOnlyControls = FALSE;
+ bOnlyControls = sal_False;
break;
}
pObj = aIter.Next();
@@ -487,7 +487,7 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
}
else if( mpOLEDataHelper && mpOLEDataHelper->HasFormat( rFlavor ) )
{
- ULONG nOldSwapMode = 0;
+ sal_uLong nOldSwapMode = 0;
if( mpSdDrawDocumentIntern )
{
@@ -542,12 +542,12 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
else if( nFormat == FORMAT_GDIMETAFILE )
{
if( mpSdViewIntern )
- bOK = SetGDIMetaFile( mpSdViewIntern->GetAllMarkedMetaFile( TRUE ), rFlavor );
+ bOK = SetGDIMetaFile( mpSdViewIntern->GetAllMarkedMetaFile( sal_True ), rFlavor );
}
else if( nFormat == FORMAT_BITMAP )
{
if( mpSdViewIntern )
- bOK = SetBitmap( mpSdViewIntern->GetAllMarkedBitmap( TRUE ), rFlavor );
+ bOK = SetBitmap( mpSdViewIntern->GetAllMarkedBitmap( sal_True ), rFlavor );
}
else if( ( nFormat == FORMAT_STRING ) && mpBookmark )
{
@@ -567,7 +567,7 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
}
else if( nFormat == SOT_FORMATSTR_ID_EMBED_SOURCE )
{
- ULONG nOldSwapMode = 0;
+ sal_uLong nOldSwapMode = 0;
if( mpSdDrawDocumentIntern )
{
@@ -580,9 +580,9 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor )
maDocShellRef = new ::sd::DrawDocShell(
mpSdDrawDocumentIntern,
SFX_CREATE_MODE_EMBEDDED,
- TRUE,
+ sal_True,
mpSdDrawDocumentIntern->GetDocumentType());
- mbOwnDocument = FALSE;
+ mbOwnDocument = sal_False;
maDocShellRef->DoInitNew( NULL );
}
@@ -609,7 +609,7 @@ sal_Bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject
{
try
{
- static const BOOL bDontBurnInStyleSheet = ( getenv( "AVOID_BURN_IN_FOR_GALLERY_THEME" ) != NULL );
+ static const sal_Bool bDontBurnInStyleSheet = ( getenv( "AVOID_BURN_IN_FOR_GALLERY_THEME" ) != NULL );
SdDrawDocument* pDoc = (SdDrawDocument*) pObject;
if ( !bDontBurnInStyleSheet )
pDoc->BurnInStyleSheetAttributes();
@@ -630,7 +630,7 @@ sal_Bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject
catch( Exception& )
{
OSL_FAIL( "sd::SdTransferable::WriteObject(), exception catched!" );
- bRet = FALSE;
+ bRet = sal_False;
}
}
break;
@@ -650,7 +650,7 @@ sal_Bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject
pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, sal_False );
// mba: no relative ULRs for clipboard!
SfxMedium aMedium( xWorkStore, String() );
- bRet = pEmbObj->DoSaveObjectAs( aMedium, FALSE );
+ bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False );
pEmbObj->DoSaveCompleted();
uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY );
@@ -665,7 +665,7 @@ sal_Bool SdTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pObject
delete pSrcStm;
}
- bRet = TRUE;
+ bRet = sal_True;
rxOStm->Commit();
}
catch ( Exception& )
@@ -714,7 +714,7 @@ void SdTransferable::SetObjectDescriptor( const TransferableObjectDescriptor& rO
// -----------------------------------------------------------------------------
-void SdTransferable::SetPageBookmarks( const List& rPageBookmarks, BOOL bPersistent )
+void SdTransferable::SetPageBookmarks( const List& rPageBookmarks, sal_Bool bPersistent )
{
if( mpSourceDoc )
{
@@ -731,13 +731,13 @@ void SdTransferable::SetPageBookmarks( const List& rPageBookmarks, BOOL bPersist
if( bPersistent )
{
mpSdDrawDocument->CreateFirstPages(mpSourceDoc);
- mpSdDrawDocument->InsertBookmarkAsPage( const_cast< List* >( &rPageBookmarks ), NULL, FALSE, TRUE, 1, TRUE, mpSourceDoc->GetDocSh(), TRUE, TRUE, FALSE );
+ mpSdDrawDocument->InsertBookmarkAsPage( const_cast< List* >( &rPageBookmarks ), NULL, sal_False, sal_True, 1, sal_True, mpSourceDoc->GetDocSh(), sal_True, sal_True, sal_False );
}
else
{
mpPageDocShell = mpSourceDoc->GetDocSh();
- for( ULONG i = 0; i < rPageBookmarks.Count(); i++ )
+ for( sal_uLong i = 0; i < rPageBookmarks.Count(); i++ )
maPageBookmarks.Insert( new String( *static_cast< String* >( rPageBookmarks.GetObject( i ) ) ), LIST_APPEND );
}
@@ -751,9 +751,9 @@ void SdTransferable::SetPageBookmarks( const List& rPageBookmarks, BOOL bPersist
}
}
- // set flags for page transferable; if ( mbPageTransferablePersistent == FALSE ),
+ // set flags for page transferable; if ( mbPageTransferablePersistent == sal_False ),
// don't offer any formats => it's just for internal puposes
- mbPageTransferable = TRUE;
+ mbPageTransferable = sal_True;
mbPageTransferablePersistent = bPersistent;
}
}
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index bb1199fdd352..3b6b2e4d5670 100755
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -26,6 +26,8 @@
************************************************************************/
#include "strings.hrc"
#include "glob.hrc"
+#include "helpids.h"
+
String STR_DRAW_TOOLBOX
{
Text [ en-US ] = "Drawings Toolbar" ;
@@ -440,7 +442,7 @@ ModalDialog RID_UNDO_DELETE_WARNING
Moveable = TRUE;
Closeable = TRUE;
- HelpID = RID_UNDO_DELETE_WARNING;
+ HelpID = HID_UNDO_DELETE_WARNING;
FixedImage IMG_UNDO_DELETE_WARNING
{
@@ -456,6 +458,7 @@ ModalDialog RID_UNDO_DELETE_WARNING
};
CheckBox CB_UNDO_DELETE_DISABLE
{
+ HelpID = "sd:CheckBox:RID_UNDO_DELETE_WARNING:CB_UNDO_DELETE_DISABLE";
Pos = MAP_APPFONT( 39, (4 * 12) + 9 );
Size = MAP_APPFONT( 175, 12 );
Text [ en-US ] = "~Do not show this warning again";
@@ -781,7 +784,7 @@ String STR_PUBLISH_OUTLINE
};
String STR_EYEDROPPER
{
- Text [ en-US ] = "Eyedropper" ;
+ Text [ en-US ] = "Color Replacer" ;
};
String STR_UNDO_MORPHING
{
@@ -1231,10 +1234,17 @@ String STR_SET_BACKGROUND_PICTURE
{
Text [ en-US ] = "Set Background Picture for Slide ..." ;
};
+
+String STR_ACC_DIALOG_DESC
+{
+ Text [ en-US ] = "Select a template from which to import page designs." ;
+};
+
String RID_ANNOTATIONS_START
{
Text [ en-US ] = "Comments";
};
+
String STR_RESET_LAYOUT
{
Text[ en-US ] = "Reset Slide Layout";
diff --git a/sd/source/ui/app/tbx_ww.src b/sd/source/ui/app/tbx_ww.src
deleted file mode 100644
index f4b6e7b78602..000000000000
--- a/sd/source/ui/app/tbx_ww.src
+++ /dev/null
@@ -1,1123 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <svx/svxids.hrc>
-#include <svx/globlmn.hrc>
-#include "app.hrc"
-#include "res_bmp.hrc"
-#include "helpids.h"
-
-FloatingWindow RID_ALIGNMENT
-{
- HelpId = HID_SD_FW_ALIGNMENT ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Alignment" ;
- ToolBox RID_ALIGNMENT_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- ITEM_FORMAT_OBJECT_ALIGN_LEFT
- };
- ToolBoxItem
- {
- ITEM_FORMAT_OBJECT_ALIGN_CENTER
- };
- ToolBoxItem
- {
- ITEM_FORMAT_OBJECT_ALIGN_RIGHT
- };
- ToolBoxItem
- {
- ITEM_FORMAT_OBJECT_ALIGN_UP
- };
- ToolBoxItem
- {
- ITEM_FORMAT_OBJECT_ALIGN_MIDDLE
- };
- ToolBoxItem
- {
- ITEM_FORMAT_OBJECT_ALIGN_DOWN
- };
- };
- };
-};
-FloatingWindow RID_ZOOM
-{
- HelpId = HID_SD_FW_ZOOM ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Zoom" ;
- ToolBox RID_ZOOM_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ZOOM_OUT ;
- HelpID = SID_ZOOM_OUT ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_IN ;
- HelpID = SID_ZOOM_IN ;
- };
- ToolBoxItem
- {
- Identifier = SID_SIZE_REAL ;
- HelpID = SID_SIZE_REAL ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_PREV ;
- HelpID = SID_ZOOM_PREV ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_NEXT ;
- HelpID = SID_ZOOM_NEXT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = SID_SIZE_PAGE ;
- HelpID = SID_SIZE_PAGE ;
- };
- ToolBoxItem
- {
- Identifier = SID_SIZE_PAGE_WIDTH ;
- HelpID = SID_SIZE_PAGE_WIDTH ;
- };
- ToolBoxItem
- {
- Identifier = SID_SIZE_ALL ;
- HelpID = SID_SIZE_ALL ;
- };
- ToolBoxItem
- {
- Identifier = SID_SIZE_OPTIMAL ;
- HelpID = SID_SIZE_OPTIMAL ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_PANNING ;
- HelpID = SID_ZOOM_PANNING ;
- };
- };
- };
-};
-FloatingWindow RID_CHOOSE_MODE
-{
- HelpId = HID_SD_FW_CHOOSE_MODE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Effects" ;
- ToolBox RID_CHOOSE_MODE_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- ITEM_TOOLBAR_OBJECT_ROTATE
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_OBJECT_MIRROR ;
- HelpID = SID_OBJECT_MIRROR ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONVERT_TO_3D_LATHE ;
- HelpID = SID_CONVERT_TO_3D_LATHE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_OBJECT_CROOK_ROTATE ;
- HelpID = SID_OBJECT_CROOK_ROTATE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_OBJECT_CROOK_SLANT ;
- HelpID = SID_OBJECT_CROOK_SLANT ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_OBJECT_SHEAR ;
- HelpID = SID_OBJECT_SHEAR ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_OBJECT_TRANSPARENCE ;
- HelpID = SID_OBJECT_TRANSPARENCE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_OBJECT_GRADIENT ;
- HelpID = SID_OBJECT_GRADIENT ;
- };
- };
- };
-};
-FloatingWindow RID_TEXT
-{
- HelpId = HID_SD_FW_TEXT ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- ToolBox RID_TEXT_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_ATTR_CHAR ;
- HelpID = SID_ATTR_CHAR ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_TEXT_FITTOSIZE ;
- HelpID = SID_TEXT_FITTOSIZE ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW_CAPTION ;
- HelpId = SID_DRAW_CAPTION ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW_FONTWORK ;
- HelpId = SID_DRAW_FONTWORK ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_ATTR_CHAR_VERTICAL ;
- HelpID = SID_ATTR_CHAR_VERTICAL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_TEXT_FITTOSIZE_VERTICAL ;
- HelpID = SID_TEXT_FITTOSIZE_VERTICAL ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW_CAPTION_VERTICAL ;
- HelpId = SID_DRAW_CAPTION_VERTICAL ;
- };
- ToolBoxItem
- {
- Identifier = SID_DRAW_FONTWORK_VERTICAL ;
- HelpId = SID_DRAW_FONTWORK_VERTICAL ;
- };
- };
- };
- Text [ en-US ] = "Text" ;
-};
-FloatingWindow RID_RECTANGLES
-{
- HelpId = HID_SD_FW_RECTANGLES ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Rectangles" ;
- ToolBox RID_RECTANGLES_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_RECT ;
- HelpID = SID_DRAW_RECT ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_SQUARE ;
- HelpID = SID_DRAW_SQUARE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_RECT_ROUND ;
- HelpID = SID_DRAW_RECT_ROUND ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_SQUARE_ROUND ;
- HelpID = SID_DRAW_SQUARE_ROUND ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_RECT_NOFILL ;
- HelpID = SID_DRAW_RECT_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_SQUARE_NOFILL ;
- HelpID = SID_DRAW_SQUARE_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_RECT_ROUND_NOFILL ;
- HelpID = SID_DRAW_RECT_ROUND_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_SQUARE_ROUND_NOFILL ;
- HelpID = SID_DRAW_SQUARE_ROUND_NOFILL ;
- };
- };
- };
-};
-FloatingWindow RID_ELLIPSES
-{
- HelpId = HID_SD_FW_ELLIPSES ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Ellipses" ;
- ToolBox RID_ELLIPSES_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_ELLIPSE ;
- HelpID = SID_DRAW_ELLIPSE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLE ;
- HelpID = SID_DRAW_CIRCLE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_PIE ;
- HelpID = SID_DRAW_PIE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLEPIE ;
- HelpID = SID_DRAW_CIRCLEPIE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_ELLIPSECUT ;
- HelpID = SID_DRAW_ELLIPSECUT ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLECUT ;
- HelpID = SID_DRAW_CIRCLECUT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_ELLIPSE_NOFILL ;
- HelpID = SID_DRAW_ELLIPSE_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLE_NOFILL ;
- HelpID = SID_DRAW_CIRCLE_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_PIE_NOFILL ;
- HelpID = SID_DRAW_PIE_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLEPIE_NOFILL ;
- HelpID = SID_DRAW_CIRCLEPIE_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_ELLIPSECUT_NOFILL ;
- HelpID = SID_DRAW_ELLIPSECUT_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLECUT_NOFILL ;
- HelpID = SID_DRAW_CIRCLECUT_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_ARC ;
- HelpID = SID_DRAW_ARC ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_CIRCLEARC ;
- HelpID = SID_DRAW_CIRCLEARC ;
- };
- };
- };
-};
-FloatingWindow RID_LINES
-{
- HelpId = HID_SD_FW_LINES ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Curves" ;
- ToolBox RID_LINES_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- HelpID = 1 ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_BEZIER_FILL ;
- HelpID = SID_DRAW_BEZIER_FILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_POLYGON ;
- HelpID = SID_DRAW_POLYGON ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_XPOLYGON ;
- HelpID = SID_DRAW_XPOLYGON ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_FREELINE ;
- HelpID = SID_DRAW_FREELINE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_BEZIER_NOFILL ;
- HelpID = SID_DRAW_BEZIER_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_POLYGON_NOFILL ;
- HelpID = SID_DRAW_POLYGON_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_XPOLYGON_NOFILL ;
- HelpID = SID_DRAW_XPOLYGON_NOFILL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_DRAW_FREELINE_NOFILL ;
- HelpID = SID_DRAW_FREELINE_NOFILL ;
- };
- };
- };
-};
-FloatingWindow RID_ARROWS
-{
- HelpId = HID_SD_FW_ARROWS ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Lines" ;
- ToolBox RID_ARROWS_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 3 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_LINE ;
- HelpID = SID_DRAW_LINE ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_ARROW_END ;
- HelpID = SID_LINE_ARROW_END ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_ARROW_CIRCLE ;
- HelpID = SID_LINE_ARROW_CIRCLE ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_ARROW_SQUARE ;
- HelpID = SID_LINE_ARROW_SQUARE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_XLINE ;
- HelpID = SID_DRAW_XLINE ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_ARROW_START ;
- HelpID = SID_LINE_ARROW_START ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_CIRCLE_ARROW ;
- HelpID = SID_LINE_CIRCLE_ARROW ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_SQUARE_ARROW ;
- HelpID = SID_LINE_SQUARE_ARROW ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_DRAW_MEASURELINE ;
- HelpID = SID_DRAW_MEASURELINE ;
- };
- ToolBoxItem
- {
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- Identifier = SID_LINE_ARROWS ;
- HelpID = SID_LINE_ARROWS ;
- };
- };
- };
-};
-FloatingWindow RID_3D_OBJECTS
-{
- HelpId = HID_SD_FW_3D_OBJECTS ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "3D Objects" ;
- ToolBox RID_3D_OBJECTS_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- HelpID = 1 ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_CUBE ;
- HelpID = SID_3D_CUBE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_SPHERE ;
- HelpID = SID_3D_SPHERE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_CYLINDER ;
- HelpID = SID_3D_CYLINDER ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_CONE ;
- HelpID = SID_3D_CONE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_PYRAMID ;
- HelpID = SID_3D_PYRAMID ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_TORUS ;
- HelpID = SID_3D_TORUS ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_SHELL ;
- HelpID = SID_3D_SHELL ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Identifier = SID_3D_HALF_SPHERE ;
- HelpID = SID_3D_HALF_SPHERE ;
- };
- };
- };
-};
-FloatingWindow RID_CONNECTORS
-{
- HelpId = HID_SD_FW_CONNECTORS ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Connectors" ;
- ToolBox RID_CONNECTORS_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 4 ;
- ItemList =
- {
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_TOOL_CONNECTOR ;
- HelpID = SID_TOOL_CONNECTOR ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_ARROW_START ;
- HelpID = SID_CONNECTOR_ARROW_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_ARROW_END ;
- HelpID = SID_CONNECTOR_ARROW_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_ARROWS ;
- HelpID = SID_CONNECTOR_ARROWS ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CIRCLE_START ;
- HelpID = SID_CONNECTOR_CIRCLE_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CIRCLE_END ;
- HelpID = SID_CONNECTOR_CIRCLE_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CIRCLES ;
- HelpID = SID_CONNECTOR_CIRCLES ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES ;
- HelpID = SID_CONNECTOR_LINES ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES_ARROW_START ;
- HelpID = SID_CONNECTOR_LINES_ARROW_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES_ARROW_END ;
- HelpID = SID_CONNECTOR_LINES_ARROW_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES_ARROWS ;
- HelpID = SID_CONNECTOR_LINES_ARROWS ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES_CIRCLE_START ;
- HelpID = SID_CONNECTOR_LINES_CIRCLE_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES_CIRCLE_END ;
- HelpID = SID_CONNECTOR_LINES_CIRCLE_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINES_CIRCLES ;
- HelpID = SID_CONNECTOR_LINES_CIRCLES ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE ;
- HelpID = SID_CONNECTOR_LINE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE_ARROW_START ;
- HelpID = SID_CONNECTOR_LINE_ARROW_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE_ARROW_END ;
- HelpID = SID_CONNECTOR_LINE_ARROW_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE_ARROWS ;
- HelpID = SID_CONNECTOR_LINE_ARROWS ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE_CIRCLE_START ;
- HelpID = SID_CONNECTOR_LINE_CIRCLE_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE_CIRCLE_END ;
- HelpID = SID_CONNECTOR_LINE_CIRCLE_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_LINE_CIRCLES ;
- HelpID = SID_CONNECTOR_LINE_CIRCLES ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE ;
- HelpID = SID_CONNECTOR_CURVE ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE_ARROW_START ;
- HelpID = SID_CONNECTOR_CURVE_ARROW_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE_ARROW_END ;
- HelpID = SID_CONNECTOR_CURVE_ARROW_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE_ARROWS ;
- HelpID = SID_CONNECTOR_CURVE_ARROWS ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE_CIRCLE_START ;
- HelpID = SID_CONNECTOR_CURVE_CIRCLE_START ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE_CIRCLE_END ;
- HelpID = SID_CONNECTOR_CURVE_CIRCLE_END ;
- };
- ToolBoxItem
- {
- RadioCheck = TRUE ;
- Checkable = TRUE ;
- Identifier = SID_CONNECTOR_CURVE_CIRCLES ;
- HelpID = SID_CONNECTOR_CURVE_CIRCLES ;
- };
- };
- };
-};
-FloatingWindow RID_INSERT
-{
- HelpId = HID_SD_FW_INSERT ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Insert" ;
- ToolBox RID_INSERT_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- HelpID = 1 ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_INSERT_DIAGRAM ;
- HelpID = SID_INSERT_DIAGRAM;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_MATH ;
- HelpID = SID_INSERT_MATH ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_FLOATINGFRAME ;
- HelpID = SID_INSERT_FLOATINGFRAME ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_OBJECT ;
- HelpID = SID_INSERT_OBJECT ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_PLUGIN ;
- HelpID = SID_INSERT_PLUGIN ;
- };
-#ifdef SOLAR_JAVA
- ToolBoxItem
- {
- Identifier = SID_INSERT_APPLET ;
- HelpID = SID_INSERT_APPLET ;
- };
-#endif
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_TABLE ;
- HelpID = SID_ATTR_TABLE ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERTFILE ;
- HelpID = SID_INSERTFILE ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERTPAGE ;
- HelpID = SID_INSERTPAGE ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_GRAPHIC ;
- HelpID = SID_INSERT_GRAPHIC ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_SOUND ;
- HelpID = SID_INSERT_SOUND ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_VIDEO ;
- HelpID = SID_INSERT_VIDEO ;
- };
- ToolBoxItem
- {
- Identifier = SID_INSERT_AVMEDIA ;
- HelpID = SID_INSERT_AVMEDIA ;
- };
- };
- };
-};
-FloatingWindow RID_POSITION
-{
- HelpId = HID_SD_FW_POSITION ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Hide = TRUE ;
- SVLook = TRUE ;
- Text [ en-US ] = "Arrange" ;
- ToolBox RID_POSITION_TBX
- {
- SVLook = TRUE ;
- MenuStrings = TRUE ;
- LineCount = 2 ;
- ItemList =
- {
- ToolBoxItem
- {
- ITEM_FORMAT_FRAME_TO_TOP
- };
- ToolBoxItem
- {
- Identifier = SID_MOREFRONT ;
- HelpID = SID_MOREFRONT ;
- };
- ToolBoxItem
- {
- Identifier = SID_MOREBACK ;
- HelpID = SID_MOREBACK ;
- };
- ToolBoxItem
- {
- ITEM_FORMAT_FRAME_TO_BOTTOM
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_BREAK ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEFORE_OBJ ;
- HelpID = SID_BEFORE_OBJ ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEHIND_OBJ ;
- HelpID = SID_BEHIND_OBJ ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SPACE ;
- };
- ToolBoxItem
- {
- Identifier = SID_REVERSE_ORDER ;
- HelpID = SID_REVERSE_ORDER ;
- };
- };
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index 9a7e9d4e8877..8bc14f34794c 100644..100755
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -59,7 +59,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SdTbxControl, TbxImageItem )
|*
\************************************************************************/
-SdTbxControl::SdTbxControl( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+SdTbxControl::SdTbxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
rTbx.SetItemBits( nId, TIB_DROPDOWN | rTbx.GetItemBits( nId ) );
@@ -146,7 +146,7 @@ SfxPopupWindow* SdTbxControl::CreatePopupWindow()
/*-------------------------------------------------------------------------*/
-void SdTbxControl::StateChanged( USHORT nSId,
+void SdTbxControl::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pState )
{
SfxToolBoxControl::StateChanged( nSId, eState, pState );
@@ -159,11 +159,11 @@ void SdTbxControl::StateChanged( USHORT nSId,
if( pItem )
{
ToolBox& rTbx = GetToolBox();
- USHORT nImage = pItem->GetValue();
+ sal_uInt16 nImage = pItem->GetValue();
if( nImage == 0 )
{
if( rTbx.IsItemChecked( nSId ) )
- rTbx.CheckItem( nSId, FALSE );
+ rTbx.CheckItem( nSId, sal_False );
}
else
{
@@ -187,28 +187,28 @@ void SdTbxControl::StateChanged( USHORT nSId,
{
if( nSId != SID_OBJECT_CHOOSE_MODE &&
rTbx.IsItemChecked( SID_OBJECT_CHOOSE_MODE ) )
- rTbx.CheckItem( SID_OBJECT_CHOOSE_MODE, FALSE );
+ rTbx.CheckItem( SID_OBJECT_CHOOSE_MODE, sal_False );
if( nSId != SID_DRAWTBX_TEXT &&
rTbx.IsItemChecked( SID_DRAWTBX_TEXT ) )
- rTbx.CheckItem( SID_DRAWTBX_TEXT, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_TEXT, sal_False );
if( nSId != SID_DRAWTBX_RECTANGLES &&
rTbx.IsItemChecked( SID_DRAWTBX_RECTANGLES ) )
- rTbx.CheckItem( SID_DRAWTBX_RECTANGLES, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_RECTANGLES, sal_False );
if( nSId != SID_DRAWTBX_ELLIPSES &&
rTbx.IsItemChecked( SID_DRAWTBX_ELLIPSES ) )
- rTbx.CheckItem( SID_DRAWTBX_ELLIPSES, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_ELLIPSES, sal_False );
if( nSId != SID_DRAWTBX_LINES &&
rTbx.IsItemChecked( SID_DRAWTBX_LINES ) )
- rTbx.CheckItem( SID_DRAWTBX_LINES, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_LINES, sal_False );
if( nSId != SID_DRAWTBX_ARROWS &&
rTbx.IsItemChecked( SID_DRAWTBX_ARROWS ) )
- rTbx.CheckItem( SID_DRAWTBX_ARROWS, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_ARROWS, sal_False );
if( nSId != SID_DRAWTBX_3D_OBJECTS &&
rTbx.IsItemChecked( SID_DRAWTBX_3D_OBJECTS ) )
- rTbx.CheckItem( SID_DRAWTBX_3D_OBJECTS, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_3D_OBJECTS, sal_False );
if( nSId != SID_DRAWTBX_CONNECTORS &&
rTbx.IsItemChecked( SID_DRAWTBX_CONNECTORS ) )
- rTbx.CheckItem( SID_DRAWTBX_CONNECTORS, FALSE );
+ rTbx.CheckItem( SID_DRAWTBX_CONNECTORS, sal_False );
}
}
}
@@ -218,7 +218,7 @@ void SdTbxControl::StateChanged( USHORT nSId,
/*-------------------------------------------------------------------------*/
-BOOL SdTbxControl::IsCheckable( USHORT nSId )
+sal_Bool SdTbxControl::IsCheckable( sal_uInt16 nSId )
{
switch( nSId )
{
@@ -324,9 +324,9 @@ BOOL SdTbxControl::IsCheckable( USHORT nSId )
case SID_CONNECTOR_LINES_CIRCLE_END:
case SID_CONNECTOR_LINES_CIRCLES:
- return( TRUE );
+ return( sal_True );
}
- return( FALSE );
+ return( sal_False );
}
diff --git a/sd/source/ui/app/tmplctrl.cxx b/sd/source/ui/app/tmplctrl.cxx
index 427b639ba56f..dc171d76aa63 100644..100755
--- a/sd/source/ui/app/tmplctrl.cxx
+++ b/sd/source/ui/app/tmplctrl.cxx
@@ -53,10 +53,10 @@ class TemplatePopup_Impl : public PopupMenu
public:
TemplatePopup_Impl();
- USHORT GetCurId() const { return nCurId; }
+ sal_uInt16 GetCurId() const { return nCurId; }
private:
- USHORT nCurId;
+ sal_uInt16 nCurId;
virtual void Select();
};
@@ -78,8 +78,8 @@ void TemplatePopup_Impl::Select()
// class SdTemplateControl ------------------------------------------
-SdTemplateControl::SdTemplateControl( USHORT _nSlotId,
- USHORT _nId,
+SdTemplateControl::SdTemplateControl( sal_uInt16 _nSlotId,
+ sal_uInt16 _nId,
StatusBar& rStb ) :
SfxStatusBarControl( _nSlotId, _nId, rStb )
{
@@ -94,7 +94,7 @@ SdTemplateControl::~SdTemplateControl()
// -----------------------------------------------------------------------
void SdTemplateControl::StateChanged(
- USHORT /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
+ sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState )
{
if( eState != SFX_ITEM_AVAILABLE || pState->ISA( SfxVoidItem ) )
GetStatusBar().SetItemText( GetId(), String() );
@@ -131,10 +131,10 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt )
CaptureMouse();
TemplatePopup_Impl aPop;
{
- const USHORT nMasterCount = pDoc->GetMasterSdPageCount(PK_STANDARD);
+ const sal_uInt16 nMasterCount = pDoc->GetMasterSdPageCount(PK_STANDARD);
- USHORT nCount = 0;
- for( USHORT nPage = 0; nPage < nMasterCount; ++nPage )
+ sal_uInt16 nCount = 0;
+ for( sal_uInt16 nPage = 0; nPage < nMasterCount; ++nPage )
{
SdPage* pMaster = pDoc->GetMasterSdPage(nPage, PK_STANDARD);
if( pMaster )
@@ -142,7 +142,7 @@ void SdTemplateControl::Command( const CommandEvent& rCEvt )
}
aPop.Execute( &GetStatusBar(), rCEvt.GetMousePosPixel());
- USHORT nCurrId = aPop.GetCurId()-1;
+ sal_uInt16 nCurrId = aPop.GetCurId()-1;
if( nCurrId < nMasterCount )
{
SdPage* pMaster = pDoc->GetMasterSdPage(nCurrId, PK_STANDARD);
diff --git a/sd/source/ui/app/toolbox.src b/sd/source/ui/app/toolbox.src
index a3446a2c58b4..0f3b3c69aeef 100644
--- a/sd/source/ui/app/toolbox.src
+++ b/sd/source/ui/app/toolbox.src
@@ -27,758 +27,23 @@
#include "app.hrc"
#include "cfgids.hxx"
-#include "helpids.h"
#include <svx/svxids.hrc>
- // Werkzeugleiste (Impress)
- // Objektleiste (Impress)
- // Optionsleiste (Impress)
-#include "toolbox2_tmpl.src"
- // Werkzeugleiste (Draw (Graphic))
- // Objektleiste (Draw (Graphic))
- // Optionsleiste (Draw (Graphic))
-#undef SD_TOOLBOX
-#define SD_TOOLBOX RID_GRAPHIC_TOOLBOX
-#include "toolbox2_tmpl.src"
-
-ToolBox RID_SLIDE_TOOLBOX
-{
- HelpId = HID_SD_SLIDE_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_LEFT ;
- ItemList =
- {
- ToolBoxItem
- {
- Checkable = TRUE ;
- Identifier = SID_OBJECT_SELECT ;
- HelpID = SID_OBJECT_SELECT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ZOOM_TOOLBOX ;
- HelpID = SID_ZOOM_TOOLBOX ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRESENTATION ;
- HelpID = SID_PRESENTATION ;
- };
- TBI_ZOOM_IN
- TBI_ZOOM_OUT
- };
-};
-ToolBox RID_OUTLINE_TOOLBOX
-{
- HelpId = HID_SD_OUTLINE_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_LEFT ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_ZOOM_TOOLBOX ;
- HelpID = SID_ZOOM_TOOLBOX ;
- DropDown = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_OUTLINE_COLLAPSE_ALL ;
- HelpID = SID_OUTLINE_COLLAPSE_ALL ;
- };
- ToolBoxItem
- {
- Identifier = SID_OUTLINE_EXPAND_ALL ;
- HelpID = SID_OUTLINE_EXPAND_ALL ;
- };
- ToolBoxItem
- {
- Identifier = SID_OUTLINE_COLLAPSE ;
- HelpID = SID_OUTLINE_COLLAPSE ;
- };
- ToolBoxItem
- {
- Identifier = SID_OUTLINE_EXPAND ;
- HelpID = SID_OUTLINE_EXPAND ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_OUTLINE_FORMAT ;
- HelpID = SID_OUTLINE_FORMAT ;
- };
- ToolBoxItem
- {
- Identifier = SID_COLORVIEW ;
- HelpID = SID_COLORVIEW ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRESENTATION ;
- HelpID = SID_PRESENTATION ;
- };
- TBI_ZOOM_IN
- TBI_ZOOM_OUT
- };
-};
-ToolBox RID_DRAW_COMMONTASK_TOOLBOX
-{
- HelpId = HID_SD_DRAW_COMMONTASK_TOOLBOX ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_INSERTPAGE ;
- HelpID = SID_INSERTPAGE ;
- };
- ToolBoxItem
- {
- Identifier = SID_MODIFYPAGE ;
- HelpID = SID_MODIFYPAGE ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRESENTATION_LAYOUT ;
- HelpID = SID_PRESENTATION_LAYOUT ;
- };
- ToolBoxItem
- {
- Identifier = SID_DUPLICATE_PAGE ;
- HelpID = SID_DUPLICATE_PAGE ;
- };
- ToolBoxItem
- {
- Identifier = SID_EXPAND_PAGE ;
- HelpID = SID_EXPAND_PAGE ;
- };
- };
-};
-ToolBox RID_BEZIER_TOOLBOX
-{
- HelpId = HID_SD_BEZIER_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- ItemList =
- {
- ToolBoxItem
- {
- ITEM_FORMAT_BEZIER_EDIT
- AutoCheck = TRUE ;
- Checkable = TRUE ;
- RadioCheck = TRUE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_MOVE ;
- HelpID = SID_BEZIER_MOVE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_INSERT ;
- HelpID = SID_BEZIER_INSERT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_DELETE ;
- HelpID = SID_BEZIER_DELETE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CUTLINE ;
- HelpID = SID_BEZIER_CUTLINE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CONVERT ;
- HelpID = SID_BEZIER_CONVERT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_EDGE ;
- HelpID = SID_BEZIER_EDGE ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_SMOOTH ;
- HelpID = SID_BEZIER_SMOOTH ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_SYMMTR ;
- HelpID = SID_BEZIER_SYMMTR ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_CLOSE ;
- HelpID = SID_BEZIER_CLOSE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_BEZIER_ELIMINATE_POINTS ;
- HelpID = SID_BEZIER_ELIMINATE_POINTS ;
- };
- };
-};
-ToolBox RID_GLUEPOINTS_TOOLBOX
-{
- HelpId = HID_SD_GLUEPOINTS_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_GLUE_INSERT_POINT ;
- HelpID = SID_GLUE_INSERT_POINT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_ESCDIR_LEFT ;
- HelpID = SID_GLUE_ESCDIR_LEFT ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_ESCDIR_TOP ;
- HelpID = SID_GLUE_ESCDIR_TOP ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_ESCDIR_RIGHT ;
- HelpID = SID_GLUE_ESCDIR_RIGHT ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_ESCDIR_BOTTOM ;
- HelpID = SID_GLUE_ESCDIR_BOTTOM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_PERCENT ;
- HelpID = SID_GLUE_PERCENT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_HORZALIGN_LEFT ;
- HelpID = SID_GLUE_HORZALIGN_LEFT ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_HORZALIGN_CENTER ;
- HelpID = SID_GLUE_HORZALIGN_CENTER ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_HORZALIGN_RIGHT ;
- HelpID = SID_GLUE_HORZALIGN_RIGHT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_VERTALIGN_TOP ;
- HelpID = SID_GLUE_VERTALIGN_TOP ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_VERTALIGN_CENTER ;
- HelpID = SID_GLUE_VERTALIGN_CENTER ;
- };
- ToolBoxItem
- {
- Identifier = SID_GLUE_VERTALIGN_BOTTOM ;
- HelpID = SID_GLUE_VERTALIGN_BOTTOM ;
- };
- };
-};
-ToolBox RID_SLIDE_OBJ_TOOLBOX
-{
- HelpId = HID_SD_SLIDE_OBJ_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_REHEARSE_TIMINGS ;
- HelpID = SID_REHEARSE_TIMINGS ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_HIDE_SLIDE ;
- HelpID = SID_HIDE_SLIDE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_PAGES_PER_ROW ;
- HelpID = SID_PAGES_PER_ROW ;
- };
- };
-};
-ToolBox RID_DRAW_GRAF_TOOLBOX
-{
- HelpId = HID_SD_DRAW_GRAF_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_GRFFILTER;
- HelpID = SID_GRFFILTER;
- DropDown = TRUE ;
- Checkable = FALSE ;
- RadioCheck = FALSE ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_MODE;
- HelpID = SID_ATTR_GRAF_MODE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_RED;
- HelpID = SID_ATTR_GRAF_RED;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GREEN;
- HelpID = SID_ATTR_GRAF_GREEN;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_BLUE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_LUMINANCE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CONTRAST;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_GAMMA;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_TRANSPARENCE;
- HelpID = SID_ATTR_GRAF_BLUE;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- // #i25616#
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_LINE;
- HelpID = SID_ATTRIBUTES_LINE;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTRIBUTES_AREA;
- HelpID = SID_ATTRIBUTES_AREA;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_FILL_SHADOW;
- HelpID = SID_ATTR_FILL_SHADOW;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
-
- ToolBoxItem
- {
- Identifier = SID_ATTR_GRAF_CROP;
- HelpID = SID_ATTR_GRAF_CROP;
- };
- };
-};
String RID_DRAW_VIEWER_TOOLBOX
{
Text [ en-US ] = "Function Bar (viewing mode)" ;
};
-ToolBox RID_DRAW_VIEWER_TOOLBOX
-{
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_SAVEASDOC ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_EDITDOC ;
- };
- ToolBoxItem
- {
- Identifier = SID_MAIL_SENDDOC ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DIRECTEXPORTDOCASPDF ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRINTDOCDIRECT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_COPY ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_SEARCH_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_NAVIGATOR ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_ZOOM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRESENTATION;
- };
- };
- Scroll = TRUE ;
-};
-
String RID_GRAPHIC_VIEWER_TOOLBOX
{
Text [ en-US ] = "Function Bar (viewing mode)" ;
};
-ToolBox RID_GRAPHIC_VIEWER_TOOLBOX
-{
- Border = TRUE ;
- SVLook = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- HideWhenDeactivate = TRUE ;
- LineSpacing = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Hide = TRUE ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_SAVEASDOC ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_EDITDOC ;
- };
- ToolBoxItem
- {
- Identifier = SID_MAIL_SENDDOC ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_DIRECTEXPORTDOCASPDF ;
- };
- ToolBoxItem
- {
- Identifier = SID_PRINTDOCDIRECT ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_COPY ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_SEARCH_DLG ;
- };
- ToolBoxItem
- {
- Identifier = SID_NAVIGATOR ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- ToolBoxItem
- {
- Identifier = SID_ATTR_ZOOM ;
- };
- ToolBoxItem
- {
- Type = TOOLBOXITEM_SEPARATOR ;
- };
- };
- Scroll = TRUE ;
-};
-
-ToolBox RID_DRAW_MEDIA_TOOLBOX
-{
- HelpId = HID_SD_DRAW_MEDIA_TOOLBOX ;
- LineSpacing = TRUE ;
- Dockable = TRUE ;
- Moveable = TRUE ;
- Sizeable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Scroll = TRUE ;
- HideWhenDeactivate = TRUE ;
- Border = TRUE ;
- SVLook = TRUE ;
- Customize = TRUE ;
- MenuStrings = TRUE ;
- Size = MAP_APPFONT ( 0 , 0 ) ;
- Align = BOXALIGN_TOP ;
- ItemList =
- {
- ToolBoxItem
- {
- Identifier = SID_AVMEDIA_TOOLBOX;
- HelpID = SID_AVMEDIA_TOOLBOX;
- };
- };
-};
String RID_DRAW_MEDIA_TOOLBOX
{
Text [ en-US ] = "Media Playback" ;
};
+
String RID_DRAW_TABLE_TOOLBOX
{
TEXT [ de ] = "Tabelle" ;
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 569b91fc7b47..01a7390afe63 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -102,8 +102,8 @@ private:
struct snewfoil_value_info
{
- USHORT mnBmpResId;
- USHORT mnStrResId;
+ sal_uInt16 mnBmpResId;
+ sal_uInt16 mnStrResId;
WritingMode meWritingMode;
AutoLayout maAutoLayout;
};
@@ -162,7 +162,7 @@ static void fillLayoutValueSet( ValueSet* pValue, snewfoil_value_info* pInfo )
String aText( SdResId( pInfo->mnStrResId ) );
BitmapEx aBmp( SdResId( pInfo->mnBmpResId ) );
- pValue->InsertItem( static_cast<USHORT>(pInfo->maAutoLayout)+1, aBmp, aText );
+ pValue->InsertItem( static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, aBmp, aText );
aLayoutItemSize.Width() = std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() );
aLayoutItemSize.Height() = std::max( aLayoutItemSize.Height(), aBmp.GetSizePixel().Height() );
@@ -238,7 +238,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
mpLayoutSet2->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
mpLayoutSet2->SetColCount( 4 );
- mpLayoutSet2->EnableFullItemMode( FALSE );
+ mpLayoutSet2->EnableFullItemMode( sal_False );
mpLayoutSet2->SetColor( GetControlBackground() );
fillLayoutValueSet( mpLayoutSet2, &v_standard[0] );
@@ -264,7 +264,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DuplicatePage" ) );
else
sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Undo" ) );
- aSlotImage = ::GetImage( mxFrame, sSlotStr, FALSE );
+ aSlotImage = ::GetImage( mxFrame, sSlotStr, sal_False );
String sSlotTitle;
if( bInsertPage )
diff --git a/sd/source/ui/dlg/AnimationChildWindow.cxx b/sd/source/ui/dlg/AnimationChildWindow.cxx
index fda2cf2355cf..17463d901f61 100644..100755
--- a/sd/source/ui/dlg/AnimationChildWindow.cxx
+++ b/sd/source/ui/dlg/AnimationChildWindow.cxx
@@ -50,7 +50,7 @@ SFX_IMPL_DOCKINGWINDOW(AnimationChildWindow, SID_ANIMATION_OBJECTS)
AnimationChildWindow::AnimationChildWindow(
::Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo )
: SfxChildWindow( _pParent, nId )
@@ -76,7 +76,7 @@ AnimationChildWindow::AnimationChildWindow(
pAnimWin->aFltWinSize = pWindow->GetSizePixel();
*/
- SetHideNotDelete( TRUE );
+ SetHideNotDelete( sal_True );
}
} // end of namespace sd
diff --git a/sd/source/ui/dlg/LayerDialogChildWindow.cxx b/sd/source/ui/dlg/LayerDialogChildWindow.cxx
index 7a309a0a828b..a20d7aba1906 100644..100755
--- a/sd/source/ui/dlg/LayerDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/LayerDialogChildWindow.cxx
@@ -54,7 +54,7 @@ namespace sd {
LayerDialogChildWindow::LayerDialogChildWindow (
::Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: SfxChildWindow (_pParent, nId)
diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx
index 408b76555112..ca2970b3ec10 100644
--- a/sd/source/ui/dlg/LayerDialogContent.cxx
+++ b/sd/source/ui/dlg/LayerDialogContent.cxx
@@ -87,7 +87,7 @@ LayerDialogContent::~LayerDialogContent (void)
-BOOL LayerDialogContent::Close (void)
+sal_Bool LayerDialogContent::Close (void)
{
return SfxDockingWindow::Close();
}
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 7a72024a71fb..374d42a1a683 100644..100755
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -105,26 +105,26 @@ void LayerTabBar::Select()
void LayerTabBar::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bSetPageID=FALSE;
+ sal_Bool bSetPageID=sal_False;
if (rMEvt.IsLeft() && !rMEvt.IsMod1() && !rMEvt.IsMod2())
{
Point aPosPixel = rMEvt.GetPosPixel();
- USHORT aLayerId = GetPageId( PixelToLogic(aPosPixel) );
+ sal_uInt16 aLayerId = GetPageId( PixelToLogic(aPosPixel) );
if (aLayerId == 0)
{
SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
pDispatcher->Execute(SID_INSERTLAYER, SFX_CALLMODE_SYNCHRON);
- bSetPageID=TRUE;
+ bSetPageID=sal_True;
}
else if (rMEvt.IsShift())
{
// Toggle zw. Layer sichtbar / unsichtbar
String aName(GetPageText(aLayerId));
SdrPageView* pPV = pDrViewSh->GetView()->GetSdrPageView();
- BOOL bVisible = pPV->IsLayerVisible(aName);
+ sal_Bool bVisible = pPV->IsLayerVisible(aName);
pPV->SetLayerVisible(aName, !bVisible);
pDrViewSh->ResetActualLayer();
}
@@ -161,9 +161,9 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
if( !pDrViewSh->GetDocSh()->IsReadOnly() )
{
- USHORT nPageId = SDRPAGE_NOTFOUND;
+ sal_uInt16 nPageId = SDRPAGE_NOTFOUND;
Point aPos( PixelToLogic( rEvt.maPosPixel ) );
- USHORT nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( aPos ) ), FALSE );
+ sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( aPos ) ), sal_False );
nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, nPageId, nLayerId );
@@ -181,8 +181,8 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
- USHORT nPageId = SDRPAGE_NOTFOUND;
- USHORT nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ), FALSE );
+ sal_uInt16 nPageId = SDRPAGE_NOTFOUND;
+ sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc()->GetLayerAdmin().GetLayerID( GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ), sal_False );
sal_Int8 nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, nPageId, nLayerId );
EndSwitchPage();
@@ -202,7 +202,7 @@ void LayerTabBar::Command(const CommandEvent& rCEvt)
long LayerTabBar::StartRenaming()
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
String aLayerName = GetPageText( GetEditPageId() );
String aLayoutLayer ( SdResId(STR_LAYER_LAYOUT) );
String aControlsLayer ( SdResId(STR_LAYER_CONTROLS) );
@@ -215,7 +215,7 @@ long LayerTabBar::StartRenaming()
aLayerName == aBackgroundLayer || aLayerName == aBackgroundObjLayer )
{
// Diese Namen duerfen nicht veraendert werden
- bOK = FALSE;
+ bOK = sal_False;
}
else
{
@@ -232,7 +232,7 @@ long LayerTabBar::StartRenaming()
long LayerTabBar::AllowRenaming()
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
// Ueberpruefung auf schon vorhandene Namen
::sd::View* pView = pDrViewSh->GetView();
@@ -242,13 +242,13 @@ long LayerTabBar::AllowRenaming()
String aNewName( GetEditText() );
if ( aNewName.Len() == 0 ||
- (rLayerAdmin.GetLayer( aNewName, FALSE ) && aLayerName != aNewName) )
+ (rLayerAdmin.GetLayer( aNewName, sal_False ) && aLayerName != aNewName) )
{
// Name ist schon vorhanden
WarningBox aWarningBox( &pDrViewSh->GetViewFrame()->GetWindow(), WinBits( WB_OK ),
String(SdResId( STR_WARN_NAME_DUPLICATE ) ) );
aWarningBox.Execute();
- bOK = FALSE;
+ bOK = sal_False;
}
if (bOK)
@@ -264,7 +264,7 @@ long LayerTabBar::AllowRenaming()
aNewName == aBackgroundLayer || aNewName == aBackgroundObjLayer )
{
// Diese Namen duerfen nicht vergeben werden
- bOK = FALSE;
+ bOK = sal_False;
}
}
@@ -281,7 +281,7 @@ void LayerTabBar::EndRenaming()
SdDrawDocument* pDoc = pView->GetDoc();
String aLayerName = pView->GetActiveLayer();
SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
- SdrLayer* pLayer = rLayerAdmin.GetLayer(aLayerName, FALSE);
+ SdrLayer* pLayer = rLayerAdmin.GetLayer(aLayerName, sal_False);
if (pLayer)
{
@@ -290,7 +290,7 @@ void LayerTabBar::EndRenaming()
DBG_ASSERT( pDrView, "Rename layer undo action is only working with a SdDrawView" );
if( pDrView )
{
- SfxUndoManager* pManager = pDoc->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = pDoc->GetDocSh()->GetUndoManager();
SdLayerModifyUndoAction* pAction = new SdLayerModifyUndoAction(
pDoc,
pLayer,
@@ -315,7 +315,7 @@ void LayerTabBar::EndRenaming()
// schon bekannt sein muss.
pView->SetActiveLayer(aNewName);
pLayer->SetName(aNewName);
- pDoc->SetChanged(TRUE);
+ pDoc->SetChanged(sal_True);
}
}
}
diff --git a/sd/source/ui/dlg/NavigatorChildWindow.cxx b/sd/source/ui/dlg/NavigatorChildWindow.cxx
index 8ab4fe4ef1a1..75419b1eaec2 100644..100755
--- a/sd/source/ui/dlg/NavigatorChildWindow.cxx
+++ b/sd/source/ui/dlg/NavigatorChildWindow.cxx
@@ -41,7 +41,7 @@ SFX_IMPL_CHILDWINDOWCONTEXT(NavigatorChildWindow, SID_NAVIGATOR)
NavigatorChildWindow::NavigatorChildWindow (
::Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* )
: SfxChildWindowContext( nId )
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index 2b84bfe34a95..7b3188639d55 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -63,11 +63,11 @@ SFX_IMPL_DOCKINGWINDOW( ToolPanelChildWindow, SID_TASKPANE)
PaneChildWindow::PaneChildWindow (
::Window* pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const USHORT nDockWinTitleResId,
- const USHORT nTitleBarResId,
+ const sal_uInt16 nDockWinTitleResId,
+ const sal_uInt16 nTitleBarResId,
SfxChildAlignment eAlignment)
: SfxChildWindow (pParentWindow, nId)
{
@@ -79,7 +79,7 @@ PaneChildWindow::PaneChildWindow (
String( SdResId( nTitleBarResId ) ) );
eChildAlignment = eAlignment;
static_cast<SfxDockingWindow*>(pWindow)->Initialize(pInfo);
- SetHideNotDelete(TRUE);
+ SetHideNotDelete(sal_True);
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame());
if (pBase != NULL)
@@ -111,7 +111,7 @@ PaneChildWindow::~PaneChildWindow (void)
LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
::Window* pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: PaneChildWindow(
@@ -132,7 +132,7 @@ LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
::Window* pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: PaneChildWindow(
@@ -153,7 +153,7 @@ LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
//= ToolPanelChildWindow
//======================================================================================================================
//----------------------------------------------------------------------------------------------------------------------
-ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, USHORT i_nId, SfxBindings* i_pBindings,
+ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, sal_uInt16 i_nId, SfxBindings* i_pBindings,
SfxChildWinInfo* i_pChildWindowInfo )
:PaneChildWindow( i_pParentWindow, i_nId, i_pBindings, i_pChildWindowInfo,
FLT_TOOL_PANEL_DOCKING_WINDOW, STR_RIGHT_PANE_TITLE, SFX_ALIGN_RIGHT )
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index 3187781f775d..5e88a2c76d8e 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -32,12 +32,16 @@
#include "PaneDockingWindow.hxx"
#include "Window.hxx"
#include "ViewShellBase.hxx"
+#include "framework/FrameworkHelper.hxx"
#include "sdresid.hxx"
#include "res_bmp.hrc"
#include <sfx2/dispatch.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/taskpanelist.hxx>
-#include "framework/FrameworkHelper.hxx"
+#include <vcl/splitwin.hxx>
+#include <vcl/svapp.hxx>
+#include <tools/wintypes.hxx>
+#include <boost/bind.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -62,6 +66,11 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
{
switch (nType)
{
+ case STATE_CHANGE_INITSHOW:
+ Resize();
+ GetContentWindow().SetStyle(GetContentWindow().GetStyle() | WB_DIALOGCONTROL);
+ break;
+
case STATE_CHANGE_VISIBLE:
// The visibility of the docking window has changed. Tell the
// ConfigurationController so that it can activate or deactivate
@@ -79,6 +88,63 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
SfxDockingWindow::StateChanged (nType);
}
+void PaneDockingWindow::MouseButtonDown (const MouseEvent& rEvent)
+{
+ if (rEvent.GetButtons() == MOUSE_LEFT)
+ {
+ // For some strange reason we have to set the WB_DIALOGCONTROL at
+ // the content window in order to have it pass focus to its content
+ // window. Without setting this flag here that works only on views
+ // that have not been taken from the cash and relocated to this pane
+ // docking window.
+ GetContentWindow().SetStyle(GetContentWindow().GetStyle() | WB_DIALOGCONTROL);
+ GetContentWindow().GrabFocus();
+ }
+ SfxDockingWindow::MouseButtonDown(rEvent);
+}
+
+
+
+
+
+
+
+
+void PaneDockingWindow::SetValidSizeRange (const Range aValidSizeRange)
+{
+ SplitWindow* pSplitWindow = dynamic_cast<SplitWindow*>(GetParent());
+ if (pSplitWindow != NULL)
+ {
+ const sal_uInt16 nId (pSplitWindow->GetItemId(static_cast< ::Window*>(this)));
+ const sal_uInt16 nSetId (pSplitWindow->GetSet(nId));
+ // Because the PaneDockingWindow paints its own decoration, we have
+ // to compensate the valid size range for that.
+ const SvBorder aBorder (GetDecorationBorder());
+ sal_Int32 nCompensation (pSplitWindow->IsHorizontal()
+ ? mnTitleBarHeight + aBorder.Top() + aBorder.Bottom()
+ : aBorder.Left() + aBorder.Right());
+ pSplitWindow->SetItemSizeRange(
+ nSetId,
+ Range(
+ aValidSizeRange.Min() + nCompensation,
+ aValidSizeRange.Max() + nCompensation));
+ }
+}
+
+
+
+
+PaneDockingWindow::Orientation PaneDockingWindow::GetOrientation (void) const
+{
+ SplitWindow* pSplitWindow = dynamic_cast<SplitWindow*>(GetParent());
+ if (pSplitWindow == NULL)
+ return UnknownOrientation;
+ else if (pSplitWindow->IsHorizontal())
+ return HorizontalOrientation;
+ else
+ return VerticalOrientation;
+}
+
} // end of namespace ::sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/PaneDockingWindow.src b/sd/source/ui/dlg/PaneDockingWindow.src
index 23b0d19ac79b..a0def1c18ec7 100755..100644
--- a/sd/source/ui/dlg/PaneDockingWindow.src
+++ b/sd/source/ui/dlg/PaneDockingWindow.src
@@ -29,7 +29,7 @@
DockingWindow FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW
{
- // HelpID = SID_EFFECT_WIN ;
+ HelpID = "sd:DockingWindow:FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW";
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
@@ -45,7 +45,7 @@ DockingWindow FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW
DockingWindow FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
{
- // HelpID = SID_EFFECT_WIN ;
+ HelpID = "sd:DockingWindow:FLT_LEFT_PANE_DRAW_DOCKING_WINDOW";
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
@@ -61,7 +61,7 @@ DockingWindow FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
DockingWindow FLT_TOOL_PANEL_DOCKING_WINDOW
{
- // HelpID = SID_EFFECT_WIN ;
+ HelpID = "sd:DockingWindow:FLT_TOOL_PANEL_DOCKING_WINDOW";
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 890554efef6e..8022672beb64 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -52,7 +52,7 @@ namespace sd {
SpellDialogChildWindow::SpellDialogChildWindow (
::Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: ::svx::SpellDialogChildWindow (_pParent, nId, pBindings, pInfo),
@@ -111,7 +111,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
// check.
if (aResult.size() == 0)
{
- SfxBoolItem aItem (SID_SPELL_DIALOG, FALSE);
+ SfxBoolItem aItem (SID_SPELL_DIALOG, sal_False);
GetBindings().GetDispatcher()->Execute(
SID_SPELL_DIALOG,
SFX_CALLMODE_ASYNCHRON,
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index a59c07d90de7..241a079584a7 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -155,35 +155,34 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings,
aNumFldBitmap ( this, SdResId( NUM_FLD_BITMAP ) ),
aTimeField ( this, SdResId( TIME_FIELD ) ),
aLbLoopCount ( this, SdResId( LB_LOOP_COUNT ) ),
-
+ aGrpBitmap ( this, SdResId( GRP_BITMAP ) ),
aBtnGetOneObject ( this, SdResId( BTN_GET_ONE_OBJECT ) ),
aBtnGetAllObjects ( this, SdResId( BTN_GET_ALL_OBJECTS ) ),
aBtnRemoveBitmap ( this, SdResId( BTN_REMOVE_BITMAP ) ),
aBtnRemoveAll ( this, SdResId( BTN_REMOVE_ALL ) ),
aFtCount ( this, SdResId( FT_COUNT ) ),
aFiCount ( this, SdResId( FI_COUNT ) ),
- aGrpBitmap ( this, SdResId( GRP_BITMAP ) ),
-
+ aGrpAnimation ( this, SdResId( GRP_ANIMATION_GROUP ) ),
aRbtGroup ( this, SdResId( RBT_GROUP ) ),
aRbtBitmap ( this, SdResId( RBT_BITMAP ) ),
aFtAdjustment ( this, SdResId( FT_ADJUSTMENT ) ),
aLbAdjustment ( this, SdResId( LB_ADJUSTMENT ) ),
aBtnCreateGroup ( this, SdResId( BTN_CREATE_GROUP ) ),
- aGrpAnimation ( this, SdResId( GRP_ANIMATION_GROUP ) ),
pWin ( pParent ),
pBitmapEx ( NULL ),
- bMovie ( FALSE ),
- bAllObjects ( FALSE ),
+ bMovie ( sal_False ),
+ bAllObjects ( sal_False ),
pBindings ( pInBindings )
{
+ aCtlDisplay.SetAccessibleName(String (SdResId(STR_DISPLAY)));
FreeResource();
// neues Dokument mit Seite erzeugen
pMyDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, NULL);
- SdPage* pPage = (SdPage*) pMyDoc->AllocPage(FALSE);
+ SdPage* pPage = (SdPage*) pMyDoc->AllocPage(sal_False);
pMyDoc->InsertPage(pPage);
pControllerItem = new AnimationControllerItem( SID_ANIMATOR_STATE, this, pBindings );
@@ -219,13 +218,18 @@ AnimationWindow::AnimationWindow( SfxBindings* pInBindings,
// der Animator ist leer; es kann keine Animationsgruppe erstellt werden
aBtnCreateGroup.Disable();
+
+ aBtnGetOneObject.SetAccessibleRelationMemberOf( &aGrpBitmap );
+ aBtnGetAllObjects.SetAccessibleRelationMemberOf( &aGrpBitmap );
+ aBtnRemoveBitmap.SetAccessibleRelationMemberOf( &aGrpBitmap );
+ aBtnRemoveAll.SetAccessibleRelationMemberOf( &aGrpBitmap );
}
// -----------------------------------------------------------------------
AnimationWindow::~AnimationWindow()
{
- ULONG i, nCount;
+ sal_uLong i, nCount;
delete pControllerItem;
@@ -258,7 +262,7 @@ IMPL_LINK( AnimationWindow, ClickFirstHdl, void *, EMPTYARG )
IMPL_LINK( AnimationWindow, ClickStopHdl, void *, EMPTYARG )
{
- bMovie = FALSE;
+ bMovie = sal_False;
return( 0L );
}
@@ -268,22 +272,22 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
{
ScopeLockGuard aGuard( maPlayLock );
- bMovie = TRUE;
- BOOL bDisableCtrls = FALSE;
- ULONG nCount = aBmpExList.Count();
- BOOL bReverse = p == &aBtnReverse;
+ bMovie = sal_True;
+ sal_Bool bDisableCtrls = sal_False;
+ sal_uLong nCount = aBmpExList.Count();
+ sal_Bool bReverse = p == &aBtnReverse;
// Kann spaeter schwer ermittelt werden
- BOOL bRbtGroupEnabled = aRbtGroup.IsEnabled();
- BOOL bBtnGetAllObjectsEnabled = aBtnGetAllObjects.IsEnabled();
- BOOL bBtnGetOneObjectEnabled = aBtnGetOneObject.IsEnabled();
+ sal_Bool bRbtGroupEnabled = aRbtGroup.IsEnabled();
+ sal_Bool bBtnGetAllObjectsEnabled = aBtnGetAllObjects.IsEnabled();
+ sal_Bool bBtnGetOneObjectEnabled = aBtnGetOneObject.IsEnabled();
// Gesamtzeit ermitteln
Time aTime( 0 );
long nFullTime;
if( aRbtBitmap.IsChecked() )
{
- for( ULONG i = 0; i < nCount; i++ )
+ for( sal_uLong i = 0; i < nCount; i++ )
aTime += *static_cast< Time* >( aTimeList.GetObject( i ) );
nFullTime = aTime.GetMSFromTime();
}
@@ -297,16 +301,16 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
SfxProgress* pProgress = NULL;
if( nFullTime >= 1000 )
{
- bDisableCtrls = TRUE;
+ bDisableCtrls = sal_True;
aBtnStop.Enable();
aBtnStop.Update();
String aStr( RTL_CONSTASCII_USTRINGPARAM( "Animator:" ) ); // Hier sollte man sich noch etwas gescheites ausdenken!
pProgress = new SfxProgress( NULL, aStr, nFullTime );
}
- ULONG nTmpTime = 0;
+ sal_uLong nTmpTime = 0;
long i = 0;
- BOOL bCount = i < (long) nCount;
+ sal_Bool bCount = i < (long) nCount;
if( bReverse )
{
i = nCount - 1;
@@ -326,7 +330,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
DBG_ASSERT( pTime, "Keine Zeit gefunden!" );
aTimeField.SetTime( *pTime );
- ULONG nTime = pTime->GetMSFromTime();
+ sal_uLong nTime = pTime->GetMSFromTime();
WaitInEffect( nTime, nTmpTime, pProgress );
nTmpTime += nTime;
@@ -361,7 +365,7 @@ IMPL_LINK( AnimationWindow, ClickPlayHdl, void *, p )
}
// Um die Controls wieder zu enablen
- bMovie = FALSE;
+ bMovie = sal_False;
if (nCount > 0)
UpdateControl(i);
@@ -396,12 +400,12 @@ IMPL_LINK( AnimationWindow, ClickRbtHdl, void *, p )
if( !pBitmapEx || p == &aRbtGroup || aRbtGroup.IsChecked() )
{
aTimeField.SetText( String() );
- aTimeField.Enable( FALSE );
- aLbLoopCount.Enable( FALSE );
+ aTimeField.Enable( sal_False );
+ aLbLoopCount.Enable( sal_False );
}
else if( p == &aRbtBitmap || aRbtBitmap.IsChecked() )
{
- ULONG n = static_cast<ULONG>(aNumFldBitmap.GetValue());
+ sal_uLong n = static_cast<sal_uLong>(aNumFldBitmap.GetValue());
if( n > 0 )
{
Time* pTime = static_cast< Time* >( aTimeList.GetObject( n - 1 ) );
@@ -422,7 +426,7 @@ IMPL_LINK( AnimationWindow, ClickGetObjectHdl, void *, pBtn )
bAllObjects = pBtn == &aBtnGetAllObjects;
// Code jetzt in AddObj()
- SfxBoolItem aItem( SID_ANIMATOR_ADD, TRUE );
+ SfxBoolItem aItem( SID_ANIMATOR_ADD, sal_True );
GetBindings().GetDispatcher()->Execute(
SID_ANIMATOR_ADD, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -438,7 +442,7 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn )
if( pBtn == &aBtnRemoveBitmap )
{
- ULONG nPos = aBmpExList.GetCurPos();
+ sal_uLong nPos = aBmpExList.GetCurPos();
pBitmapEx = static_cast< BitmapEx* >( aBmpExList.GetCurObject() );
if( pBitmapEx )
{
@@ -526,7 +530,7 @@ IMPL_LINK( AnimationWindow, ClickRemoveBitmapHdl, void *, pBtn )
IMPL_LINK( AnimationWindow, ClickCreateGroupHdl, void *, EMPTYARG )
{
// Code jetzt in CreatePresObj()
- SfxBoolItem aItem( SID_ANIMATOR_CREATE, TRUE );
+ SfxBoolItem aItem( SID_ANIMATOR_CREATE, sal_True );
GetBindings().GetDispatcher()->Execute(
SID_ANIMATOR_CREATE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -537,7 +541,7 @@ IMPL_LINK( AnimationWindow, ClickCreateGroupHdl, void *, EMPTYARG )
IMPL_LINK( AnimationWindow, ModifyBitmapHdl, void *, EMPTYARG )
{
- ULONG nBmp = static_cast<ULONG>(aNumFldBitmap.GetValue());
+ sal_uLong nBmp = static_cast<sal_uLong>(aNumFldBitmap.GetValue());
if( nBmp > aBmpExList.Count() )
nBmp = aBmpExList.Count();
@@ -556,7 +560,7 @@ IMPL_LINK( AnimationWindow, ModifyBitmapHdl, void *, EMPTYARG )
IMPL_LINK( AnimationWindow, ModifyTimeHdl, void *, EMPTYARG )
{
- ULONG nPos = static_cast<ULONG>(aNumFldBitmap.GetValue() - 1);
+ sal_uLong nPos = static_cast<sal_uLong>(aNumFldBitmap.GetValue() - 1);
Time* pTime = static_cast< Time* >( aTimeList.GetObject( nPos ) );
DBG_ASSERT( pTime, "Zeit nicht gefunden!" );
@@ -568,7 +572,7 @@ IMPL_LINK( AnimationWindow, ModifyTimeHdl, void *, EMPTYARG )
// -----------------------------------------------------------------------
-void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
+void AnimationWindow::UpdateControl( sal_uLong nListPos, sal_Bool bDisableCtrls )
{
String aString;
@@ -577,7 +581,7 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
BitmapEx aBmp( *pBitmapEx );
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD);
- SdrObject* pObject = (SdrObject*) pPage->GetObj( (ULONG) nListPos );
+ SdrObject* pObject = (SdrObject*) pPage->GetObj( (sal_uLong) nListPos );
if( pObject )
{
VirtualDevice aVD;
@@ -629,15 +633,15 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
else
{
// Wenn kein Objekt in der Liste ist
- aBtnFirst.Enable( FALSE );
- aBtnReverse.Enable( FALSE );
- aBtnPlay.Enable( FALSE );
- aBtnLast.Enable( FALSE );
- aNumFldBitmap.Enable( FALSE );
- aTimeField.Enable( FALSE );
- aLbLoopCount.Enable( FALSE );
- aBtnRemoveBitmap.Enable( FALSE );
- aBtnRemoveAll.Enable( FALSE );
+ aBtnFirst.Enable( sal_False );
+ aBtnReverse.Enable( sal_False );
+ aBtnPlay.Enable( sal_False );
+ aBtnLast.Enable( sal_False );
+ aNumFldBitmap.Enable( sal_False );
+ aTimeField.Enable( sal_False );
+ aLbLoopCount.Enable( sal_False );
+ aBtnRemoveBitmap.Enable( sal_False );
+ aBtnRemoveAll.Enable( sal_False );
//aFtAdjustment.Enable();
//aLbAdjustment.Enable();
@@ -645,13 +649,13 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
if( bMovie && bDisableCtrls )
{
- aBtnGetOneObject.Enable( FALSE );
- aBtnGetAllObjects.Enable( FALSE );
- aRbtGroup.Enable( FALSE );
- aRbtBitmap.Enable( FALSE );
- aBtnCreateGroup.Enable( FALSE );
- aFtAdjustment.Enable( FALSE );
- aLbAdjustment.Enable( FALSE );
+ aBtnGetOneObject.Enable( sal_False );
+ aBtnGetAllObjects.Enable( sal_False );
+ aRbtGroup.Enable( sal_False );
+ aRbtBitmap.Enable( sal_False );
+ aBtnCreateGroup.Enable( sal_False );
+ aFtAdjustment.Enable( sal_False );
+ aLbAdjustment.Enable( sal_False );
}
else
{
@@ -661,8 +665,8 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
aRbtBitmap.Enable();
aBtnCreateGroup.Enable(aBmpExList.Count() != 0);
- aFtAdjustment.Enable( TRUE );
- aLbAdjustment.Enable( TRUE );
+ aFtAdjustment.Enable( sal_True );
+ aLbAdjustment.Enable( sal_True );
}
ClickRbtHdl( NULL );
@@ -682,7 +686,7 @@ void AnimationWindow::ResetAttrs()
// -----------------------------------------------------------------------
-void AnimationWindow::WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
+void AnimationWindow::WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime,
SfxProgress* pProgress ) const
{
clock_t aEnd = Time::GetSystemTicks() + nMilliSeconds;
@@ -706,13 +710,13 @@ void AnimationWindow::WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
Fraction AnimationWindow::GetScale()
{
Fraction aFrac;
- ULONG nPos = aBmpExList.GetCurPos();
- ULONG nCount = aBmpExList.Count();
+ sal_uLong nPos = aBmpExList.GetCurPos();
+ sal_uLong nCount = aBmpExList.Count();
if( nCount > 0 )
{
aBmpSize.Width() = 0;
aBmpSize.Height() = 0;
- for( ULONG i = 0; i < nCount; i++ )
+ for( sal_uLong i = 0; i < nCount; i++ )
{
pBitmapEx = static_cast< BitmapEx* >( aBmpExList.GetObject( i ) );
Size aTempSize( pBitmapEx->GetBitmap().GetSizePixel() );
@@ -833,22 +837,22 @@ void AnimationWindow::Resize()
// -----------------------------------------------------------------------
-BOOL AnimationWindow::Close()
+sal_Bool AnimationWindow::Close()
{
if( maPlayLock.isLocked() )
{
- return FALSE;
+ return sal_False;
}
else
{
- SfxBoolItem aItem( SID_ANIMATION_OBJECTS, FALSE );
+ SfxBoolItem aItem( SID_ANIMATION_OBJECTS, sal_False );
GetBindings().GetDispatcher()->Execute(
SID_ANIMATION_OBJECTS, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
SfxDockingWindow::Close();
- return TRUE;
+ return sal_True;
}
}
@@ -870,30 +874,30 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Objekt(e) clonen und den/die Clone(s) in die Liste stellen
const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD);
- ULONG nCloneCount = pPage->GetObjCount();
+ sal_uLong nCloneCount = pPage->GetObjCount();
if (nMarkCount > 0)
{
// Wenn es sich um EIN Animationsobjekt oder ein Gruppenobjekt
// handelt, das 'einzeln uebernommen' wurde,
// werden die einzelnen Objekte eingefuegt
- BOOL bAnimObj = FALSE;
+ sal_Bool bAnimObj = sal_False;
if( nMarkCount == 1 )
{
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObject = pMark->GetMarkedSdrObj();
SdAnimationInfo* pAnimInfo = rView.GetDoc()->GetAnimationInfo( pObject );
- UINT32 nInv = pObject->GetObjInventor();
- UINT16 nId = pObject->GetObjIdentifier();
+ sal_uInt32 nInv = pObject->GetObjInventor();
+ sal_uInt16 nId = pObject->GetObjIdentifier();
// Animated Bitmap (GIF)
if( nInv == SdrInventor && nId == OBJ_GRAF && ( (SdrGrafObj*) pObject )->IsAnimated() )
{
const SdrGrafObj* pGrafObj = (SdrGrafObj*) pObject;
Graphic aGraphic( pGrafObj->GetTransformedGraphic() );
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if( aGraphic.IsAnimated() )
nCount = aGraphic.GetAnimation().Count();
@@ -902,7 +906,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
{
const Animation aAnimation( aGraphic.GetAnimation() );
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
const AnimationBitmap& rAnimBmp = aAnimation.Get( i );
@@ -930,8 +934,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
}
// Nachdem ein animated GIF uebernommen wurde, kann auch nur ein solches erstellt werden
aRbtBitmap.Check();
- aRbtGroup.Enable( FALSE );
- bAnimObj = TRUE;
+ aRbtGroup.Enable( sal_False );
+ bAnimObj = sal_True;
}
}
else if( bAllObjects || ( pAnimInfo && pAnimInfo->mbIsMovie ) )
@@ -939,9 +943,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Mehrere Objekte
SdrObjList* pObjList = ((SdrObjGroup*)pObject)->GetSubList();
- for( USHORT nObject = 0; nObject < pObjList->GetObjCount(); nObject++ )
+ for( sal_uInt16 nObject = 0; nObject < pObjList->GetObjCount(); nObject++ )
{
- SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( (ULONG) nObject );
+ SdrObject* pSnapShot = (SdrObject*) pObjList->GetObj( (sal_uLong) nObject );
pBitmapEx = new BitmapEx( SdrExchangeView::GetObjGraphic( pSnapShot->GetModel(), pSnapShot ).GetBitmapEx() );
aBmpExList.Insert( pBitmapEx, aBmpExList.GetCurPos() + 1 );
@@ -956,7 +960,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Weiterschalten der BitmapListe
aBmpExList.Next();
}
- bAnimObj = TRUE;
+ bAnimObj = sal_True;
}
}
// Auch ein einzelnes animiertes Objekt
@@ -985,7 +989,7 @@ void AnimationWindow::AddObj (::sd::View& rView )
// Objekte einzeln uebernehmen
if( bAllObjects )
{
- for( ULONG nObject= 0; nObject < nMarkCount; nObject++ )
+ for( sal_uLong nObject= 0; nObject < nMarkCount; nObject++ )
{
// Clone
SdrObject* pObject = rMarkList.GetMark( nObject )->GetMarkedSdrObj();
@@ -1001,14 +1005,14 @@ void AnimationWindow::AddObj (::sd::View& rView )
aBmpExList.Next();
}
- bAnimObj = TRUE; // damit nicht nochmal weitergeschaltet wird
+ bAnimObj = sal_True; // damit nicht nochmal weitergeschaltet wird
}
else
{
SdrObjGroup* pCloneGroup = new SdrObjGroup;
SdrObjList* pObjList = pCloneGroup->GetSubList();
- for (ULONG nObject= 0; nObject < nMarkCount; nObject++)
+ for (sal_uLong nObject= 0; nObject < nMarkCount; nObject++)
pObjList->InsertObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj()->Clone(), LIST_APPEND);
pPage->InsertObject(pCloneGroup, aBmpExList.GetCurPos() + 1);
@@ -1045,9 +1049,9 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
Size aTemp( pOutWin->GetOutputSizePixel() );
const Point aWindowCenter( pOutWin->PixelToLogic( Point( aTemp.Width() >> 1, aTemp.Height() >> 1 ) ) );
const OutputDevice* pDefDev = Application::GetDefaultDevice();
- const ULONG nCount = aBmpExList.Count();
+ const sal_uLong nCount = aBmpExList.Count();
BitmapAdjustment eBA = (BitmapAdjustment) aLbAdjustment.GetSelectEntryPos();
- ULONG i;
+ sal_uLong i;
// Groesste Bitmap ermitteln
for( i = 0; i < nCount; i++ )
@@ -1134,7 +1138,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// LoopCount (Anzahl der Durchlaeufe) ermitteln
AnimationBitmap aAnimBmp;
long nLoopCount = 0L;
- USHORT nPos = aLbLoopCount.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbLoopCount.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbLoopCount.GetEntryCount() - 1 ) // unendlich
nLoopCount = (long) aLbLoopCount.GetSelectEntry().ToInt32();
@@ -1144,7 +1148,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
aAnimBmp.aSizePix = aBitmapSize;
aAnimBmp.nWait = nTime;
aAnimBmp.eDisposal = DISPOSE_BACK;
- aAnimBmp.bUserInput = FALSE;
+ aAnimBmp.bUserInput = sal_False;
aAnimation.Insert( aAnimBmp );
aAnimation.SetDisplaySizePixel( aMaxSizePix );
@@ -1242,8 +1246,8 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pGroup,true);
pInfo->meEffect = presentation::AnimationEffect_NONE;
pInfo->meSpeed = presentation::AnimationSpeed_MEDIUM;
- pInfo->mbActive = TRUE;
- pInfo->mbIsMovie = TRUE;
+ pInfo->mbActive = sal_True;
+ pInfo->mbIsMovie = sal_True;
pInfo->maBlueScreen = COL_WHITE;
rView.InsertObjectAtView( pGroup, *pPV, SDRINSERT_SETDEFLAYER);
@@ -1269,7 +1273,7 @@ void AnimationWindow::DataChanged( const DataChangedEvent& rDCEvt )
\************************************************************************/
AnimationControllerItem::AnimationControllerItem(
- USHORT _nId,
+ sal_uInt16 _nId,
AnimationWindow* pAnimWin,
SfxBindings* _pBindings)
: SfxControllerItem( _nId, *_pBindings ),
@@ -1279,14 +1283,14 @@ AnimationControllerItem::AnimationControllerItem(
// -----------------------------------------------------------------------
-void AnimationControllerItem::StateChanged( USHORT nSId,
+void AnimationControllerItem::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pItem )
{
if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_ANIMATOR_STATE )
{
const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem );
DBG_ASSERT( pStateItem, "SfxUInt16Item erwartet");
- UINT16 nState = pStateItem->GetValue();
+ sal_uInt16 nState = pStateItem->GetValue();
pAnimationWin->aBtnGetOneObject.Enable( nState & 1 );
pAnimationWin->aBtnGetAllObjects.Enable( nState & 2 );
diff --git a/sd/source/ui/dlg/animobjs.src b/sd/source/ui/dlg/animobjs.src
index 0bfc08fd97e6..75e2e74f8858 100644..100755
--- a/sd/source/ui/dlg/animobjs.src
+++ b/sd/source/ui/dlg/animobjs.src
@@ -28,6 +28,8 @@
#include "res_bmp.hrc"
#include "app.hrc"
#include "animobjs.hrc"
+#include "helpids.h"
+
#define BUTTON_WIDTH 16
#define BUTTON_HEIGHT 14
#define BUTTON_SIZE MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT );
@@ -36,7 +38,7 @@
#define MIN_BUTTON_SIZE MAP_APPFONT( MIN_BUTTON_WIDTH, MIN_BUTTON_HEIGHT );
DockingWindow FLT_WIN_ANIMATION
{
- HelpID = SID_ANIMATION_OBJECTS ;
+ HelpID = CMD_SID_ANIMATION_OBJECTS ;
Border = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
@@ -57,6 +59,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_FIRST
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_FIRST";
Pos = MAP_APPFONT ( 6 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_WINDSTART ;
@@ -64,6 +67,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_REVERSE
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_REVERSE";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_REVERSEPLAY ;
@@ -71,6 +75,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_STOP
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_STOP";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH * 2 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_STOP ;
@@ -79,6 +84,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_PLAY
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_PLAY";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH * 3 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_PLAY ;
@@ -86,6 +92,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_LAST
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_LAST";
Pos = MAP_APPFONT ( 6 + MIN_BUTTON_WIDTH * 4 , 100 ) ;
Size = MIN_BUTTON_SIZE
Symbol = IMAGEBUTTON_WINDEND ;
@@ -93,6 +100,7 @@ DockingWindow FLT_WIN_ANIMATION
};
NumericField NUM_FLD_BITMAP
{
+ HelpID = "sd:NumericField:FLT_WIN_ANIMATION:NUM_FLD_BITMAP";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 + 3 + MIN_BUTTON_WIDTH * 5 , 100 ) ;
Size = MAP_APPFONT ( MIN_BUTTON_WIDTH * 2 , 12 ) ;
@@ -109,6 +117,7 @@ DockingWindow FLT_WIN_ANIMATION
};
TimeField TIME_FIELD
{
+ HelpID = "sd:TimeField:FLT_WIN_ANIMATION:TIME_FIELD";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 + 6 + MIN_BUTTON_WIDTH * 7 , 100 ) ;
Size = MAP_APPFONT ( MIN_BUTTON_WIDTH * 2 + 3 , 12 ) ;
@@ -131,6 +140,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ListBox LB_LOOP_COUNT
{
+ HelpID = "sd:ListBox:FLT_WIN_ANIMATION:LB_LOOP_COUNT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 + 12 + MIN_BUTTON_WIDTH * 9 , 100 ) ;
Size = MAP_APPFONT ( MIN_BUTTON_WIDTH * 2 + 3 , 100 ) ;
@@ -162,6 +172,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_GET_ONE_OBJECT
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_GET_ONE_OBJECT";
Pos = MAP_APPFONT ( 12 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
@@ -177,6 +188,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_GET_ALL_OBJECTS
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_GET_ALL_OBJECTS";
Pos = MAP_APPFONT ( 31 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
@@ -192,6 +204,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_REMOVE_BITMAP
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_REMOVE_BITMAP";
Pos = MAP_APPFONT ( 60 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
@@ -207,6 +220,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ImageButton BTN_REMOVE_ALL
{
+ HelpID = "sd:ImageButton:FLT_WIN_ANIMATION:BTN_REMOVE_ALL";
Pos = MAP_APPFONT ( 79 , 132 ) ;
Size = MAP_APPFONT ( 16 , 14 ) ;
ButtonImage = Image
@@ -242,12 +256,14 @@ DockingWindow FLT_WIN_ANIMATION
};
RadioButton RBT_GROUP
{
+ HelpID = "sd:RadioButton:FLT_WIN_ANIMATION:RBT_GROUP";
Pos = MAP_APPFONT ( 12 , 167 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
Text [ en-US ] = "Group object" ;
};
RadioButton RBT_BITMAP
{
+ HelpID = "sd:RadioButton:FLT_WIN_ANIMATION:RBT_BITMAP";
Pos = MAP_APPFONT ( 12 , 181 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
Text [ en-US ] = "Bitmap object" ;
@@ -262,6 +278,7 @@ DockingWindow FLT_WIN_ANIMATION
};
ListBox LB_ADJUSTMENT
{
+ HelpID = "sd:ListBox:FLT_WIN_ANIMATION:LB_ADJUSTMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 196 ) ;
Size = MAP_APPFONT ( 72 , 100 ) ;
@@ -284,6 +301,7 @@ DockingWindow FLT_WIN_ANIMATION
};
PushButton BTN_CREATE_GROUP
{
+ HelpID = "sd:PushButton:FLT_WIN_ANIMATION:BTN_CREATE_GROUP";
Pos = MAP_APPFONT ( 107 , 216 ) ;
Size = MAP_APPFONT ( 41 , 14 ) ;
TabStop = TRUE ;
@@ -295,6 +313,10 @@ DockingWindow FLT_WIN_ANIMATION
Size = MAP_APPFONT ( 147 , 8 ) ;
Text [ en-US ] = "Animation group" ;
};
+ String STR_DISPLAY
+ {
+ Text [ en-US ] = "Preview";
+ };
};
diff --git a/sd/source/ui/dlg/assclass.cxx b/sd/source/ui/dlg/assclass.cxx
index a299d39aba0e..a299d39aba0e 100644..100755
--- a/sd/source/ui/dlg/assclass.cxx
+++ b/sd/source/ui/dlg/assclass.cxx
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index c69bf134c047..6d3bf4c0ed0c 100644..100755
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -61,8 +61,8 @@ BreakDlg::BreakDlg(
::Window* pWindow,
DrawView* _pDrView,
DrawDocShell* pShell,
- ULONG nSumActionCount,
- ULONG nObjCount )
+ sal_uLong nSumActionCount,
+ sal_uLong nObjCount )
: SfxModalDialog ( pWindow, SdResId( DLG_BREAK ) ),
aFtObjInfo ( this, SdResId( FT_OBJ_INFO ) ),
aFtActInfo ( this, SdResId( FT_ACT_INFO ) ),
@@ -83,7 +83,7 @@ BreakDlg::BreakDlg(
pProgrInfo->Init( nSumActionCount*3, nObjCount );
pDrView = _pDrView;
- bCancel = FALSE;
+ bCancel = sal_False;
FreeResource();
}
@@ -100,7 +100,7 @@ BreakDlg::~BreakDlg()
// Control-Handler fuer den Abbruch Button
IMPL_LINK( BreakDlg, CancelButtonHdl, void *, EMPTYARG )
{
- bCancel = TRUE;
+ bCancel = sal_True;
aBtnCancel.Disable();
return( 0L );
}
@@ -181,7 +181,7 @@ short BreakDlg::Execute()
IMPL_LINK( BreakDlg, InitialUpdate, Timer*, EMPTYARG )
{
pDrView->DoImportMarkedMtf(pProgrInfo);
- EndDialog(TRUE);
+ EndDialog(sal_True);
return 0L;
}
diff --git a/sd/source/ui/dlg/brkdlg.src b/sd/source/ui/dlg/brkdlg.src
index bf9b2d29c651..a574ab9714ca 100644
--- a/sd/source/ui/dlg/brkdlg.src
+++ b/sd/source/ui/dlg/brkdlg.src
@@ -28,6 +28,7 @@
#include "brkdlg.hrc"
ModalDialog DLG_BREAK
{
+ HelpID = "sd:ModalDialog:DLG_BREAK";
OutputSize = TRUE;
SVLook = TRUE;
Pos = MAP_APPFONT( 84, 34 );
diff --git a/sd/source/ui/dlg/celltempl.cxx b/sd/source/ui/dlg/celltempl.cxx
index 574615781aaa..195b59d46019 100644..100755
--- a/sd/source/ui/dlg/celltempl.cxx
+++ b/sd/source/ui/dlg/celltempl.cxx
@@ -57,7 +57,7 @@
\************************************************************************/
SdPresCellTemplateDlg::SdPresCellTemplateDlg( SdrModel* pModel, Window* pParent, SfxStyleSheetBase& rStyleBase )
-: SfxStyleDialog( pParent, SdResId(TAB_CELL_TEMPLATE), rStyleBase, FALSE )
+: SfxStyleDialog( pParent, SdResId(TAB_CELL_TEMPLATE), rStyleBase, sal_False )
, mpColorTab( pModel->GetColorTable() )
, mpGradientList( pModel->GetGradientList() )
, mpHatchingList( pModel->GetHatchList() )
@@ -79,7 +79,7 @@ SdPresCellTemplateDlg::~SdPresCellTemplateDlg()
// -----------------------------------------------------------------------
-void SdPresCellTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SdPresCellTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
switch( nId )
{
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index 9043bd00ae00..427ec463a5bc 100644..100755
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -73,23 +73,23 @@ CopyDlg::CopyDlg(
maFtCopies ( this, SdResId( FT_COPIES ) ),
maNumFldCopies ( this, SdResId( NUM_FLD_COPIES ) ),
maBtnSetViewData ( this, SdResId( BTN_SET_VIEWDATA ) ),
+ maGrpMovement ( this, SdResId( GRP_MOVEMENT ) ),
maFtMoveX ( this, SdResId( FT_MOVE_X ) ),
maMtrFldMoveX ( this, SdResId( MTR_FLD_MOVE_X ) ),
maFtMoveY ( this, SdResId( FT_MOVE_Y ) ),
maMtrFldMoveY ( this, SdResId( MTR_FLD_MOVE_Y ) ),
maFtAngle ( this, SdResId( FT_ANGLE ) ),
maMtrFldAngle ( this, SdResId( MTR_FLD_ANGLE ) ),
- maGrpMovement ( this, SdResId( GRP_MOVEMENT ) ),
+ maGrpEnlargement ( this, SdResId( GRP_ENLARGEMENT ) ),
maFtWidth ( this, SdResId( FT_WIDTH ) ),
maMtrFldWidth ( this, SdResId( MTR_FLD_WIDTH ) ),
maFtHeight ( this, SdResId( FT_HEIGHT ) ),
maMtrFldHeight ( this, SdResId( MTR_FLD_HEIGHT ) ),
- maGrpEnlargement ( this, SdResId( GRP_ENLARGEMENT ) ),
+ maGrpColor ( this, SdResId( GRP_COLOR ) ),
maFtStartColor ( this, SdResId( FT_START_COLOR ) ),
maLbStartColor ( this, SdResId( LB_START_COLOR ) ),
maFtEndColor ( this, SdResId( FT_END_COLOR ) ),
maLbEndColor ( this, SdResId( LB_END_COLOR ) ),
- maGrpColor ( this, SdResId( GRP_COLOR ) ),
maBtnOK ( this, SdResId( BTN_OK ) ),
maBtnCancel ( this, SdResId( BTN_CANCEL ) ),
maBtnHelp ( this, SdResId( BTN_HELP ) ),
@@ -116,10 +116,10 @@ CopyDlg::CopyDlg(
FieldUnit eFUnit( SfxModule::GetCurrentFieldUnit() );
- SetFieldUnit( maMtrFldMoveX, eFUnit, TRUE );
- SetFieldUnit( maMtrFldMoveY, eFUnit, TRUE );
- SetFieldUnit( maMtrFldWidth, eFUnit, TRUE );
- SetFieldUnit( maMtrFldHeight, eFUnit, TRUE );
+ SetFieldUnit( maMtrFldMoveX, eFUnit, sal_True );
+ SetFieldUnit( maMtrFldMoveY, eFUnit, sal_True );
+ SetFieldUnit( maMtrFldWidth, eFUnit, sal_True );
+ SetFieldUnit( maMtrFldHeight, eFUnit, sal_True );
Reset(0L);
}
@@ -171,37 +171,37 @@ IMPL_LINK( CopyDlg, Reset, void*, EMPTYARG )
if( aStr.GetTokenCount( TOKEN ) < 8 )
{
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_NUMBER, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_NUMBER, sal_True, &pPoolItem ) )
maNumFldCopies.SetValue( ( ( const SfxUInt16Item* ) pPoolItem )->GetValue() );
else
maNumFldCopies.SetValue( 1L );
long nMoveX = 500L;
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, sal_True, &pPoolItem ) )
nMoveX = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() );
SetMetricValue( maMtrFldMoveX, Fraction(nMoveX) / maUIScale, SFX_MAPUNIT_100TH_MM);
long nMoveY = 500L;
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, sal_True, &pPoolItem ) )
nMoveY = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() );
SetMetricValue( maMtrFldMoveY, Fraction(nMoveY) / maUIScale, SFX_MAPUNIT_100TH_MM);
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, sal_True, &pPoolItem ) )
maMtrFldAngle.SetValue( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() );
else
maMtrFldAngle.SetValue( 0L );
long nWidth = 0L;
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, sal_True, &pPoolItem ) )
nWidth = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() );
SetMetricValue( maMtrFldWidth, Fraction(nWidth) / maUIScale, SFX_MAPUNIT_100TH_MM);
long nHeight = 0L;
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, sal_True, &pPoolItem ) )
nHeight = ( ( ( const SfxInt32Item* ) pPoolItem )->GetValue() );
SetMetricValue( maMtrFldHeight, Fraction(nHeight) / maUIScale, SFX_MAPUNIT_100TH_MM);
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, sal_True, &pPoolItem ) )
{
Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue();
maLbStartColor.SelectEntry( aColor );
@@ -259,10 +259,10 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
long nHeight = Fraction( GetCoreValue( maMtrFldHeight, SFX_MAPUNIT_100TH_MM) ) * maUIScale;
long nWidth = Fraction( GetCoreValue( maMtrFldWidth, SFX_MAPUNIT_100TH_MM) ) * maUIScale;
- rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, (UINT16) maNumFldCopies.GetValue() ) );
+ rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, (sal_uInt16) maNumFldCopies.GetValue() ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_X, nMoveX ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_Y, nMoveY ) );
- rOutAttrs.Put( SfxInt32Item( ATTR_COPY_ANGLE, static_cast<INT32>(maMtrFldAngle.GetValue()) ) );
+ rOutAttrs.Put( SfxInt32Item( ATTR_COPY_ANGLE, static_cast<sal_Int32>(maMtrFldAngle.GetValue()) ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_WIDTH, nWidth ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_HEIGHT, nHeight ) );
@@ -288,7 +288,7 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
IMPL_LINK( CopyDlg, SelectColorHdl, void *, EMPTYARG )
{
- USHORT nPos = maLbStartColor.GetSelectEntryPos();
+ sal_uInt16 nPos = maLbStartColor.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND &&
!maLbEndColor.IsEnabled() )
@@ -315,7 +315,7 @@ IMPL_LINK( CopyDlg, SetViewData, void*, EMPTYARG )
// Farb-Attribut setzen
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, sal_True, &pPoolItem ) )
{
Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue();
maLbStartColor.SelectEntry( aColor );
@@ -343,7 +343,7 @@ IMPL_LINK( CopyDlg, SetDefault, void*, EMPTYARG )
// Farb-Attribut setzen
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, sal_True, &pPoolItem ) )
{
Color aColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue();
maLbStartColor.SelectEntry( aColor );
diff --git a/sd/source/ui/dlg/copydlg.src b/sd/source/ui/dlg/copydlg.src
index 920be5e8df70..2cb99b4dfd75 100644
--- a/sd/source/ui/dlg/copydlg.src
+++ b/sd/source/ui/dlg/copydlg.src
@@ -28,9 +28,11 @@
#include "app.hrc"
#include "res_bmp.hrc"
#include "copydlg.hrc"
+#include "helpids.h"
+
ModalDialog DLG_COPY
{
- HelpID = SID_COPYOBJECTS ;
+ HelpID = CMD_SID_COPYOBJECTS ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 204 , 177 ) ;
@@ -63,6 +65,7 @@ ModalDialog DLG_COPY
};
NumericField NUM_FLD_COPIES
{
+ HelpID = "sd:NumericField:DLG_COPY:NUM_FLD_COPIES";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 7 ) ;
Size = MAP_APPFONT ( 35 , 12 ) ;
@@ -78,6 +81,7 @@ ModalDialog DLG_COPY
};
ImageButton BTN_SET_VIEWDATA
{
+ HelpID = "sd:ImageButton:DLG_COPY:BTN_SET_VIEWDATA";
Pos = MAP_APPFONT ( 122 , 6 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
ButtonImage = Image
@@ -90,6 +94,7 @@ ModalDialog DLG_COPY
};
PushButton BTN_SET_DEFAULT
{
+ HelpID = "sd:PushButton:DLG_COPY:BTN_SET_DEFAULT";
Pos = MAP_APPFONT ( 148 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -97,6 +102,7 @@ ModalDialog DLG_COPY
};
MetricField MTR_FLD_ANGLE
{
+ HelpID = "sd:MetricField:DLG_COPY:MTR_FLD_ANGLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 69 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
@@ -124,6 +130,7 @@ ModalDialog DLG_COPY
};
MetricField MTR_FLD_MOVE_X
{
+ HelpID = "sd:MetricField:DLG_COPY:MTR_FLD_MOVE_X";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 37 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
@@ -141,6 +148,7 @@ ModalDialog DLG_COPY
};
MetricField MTR_FLD_MOVE_Y
{
+ HelpID = "sd:MetricField:DLG_COPY:MTR_FLD_MOVE_Y";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 53 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
@@ -158,6 +166,7 @@ ModalDialog DLG_COPY
};
MetricField MTR_FLD_WIDTH
{
+ HelpID = "sd:MetricField:DLG_COPY:MTR_FLD_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 98 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
@@ -175,6 +184,7 @@ ModalDialog DLG_COPY
};
MetricField MTR_FLD_HEIGHT
{
+ HelpID = "sd:MetricField:DLG_COPY:MTR_FLD_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 114 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
@@ -228,6 +238,7 @@ ModalDialog DLG_COPY
};
ListBox LB_START_COLOR
{
+ HelpID = "sd:ListBox:DLG_COPY:LB_START_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 143 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
@@ -243,6 +254,7 @@ ModalDialog DLG_COPY
};
ListBox LB_END_COLOR
{
+ HelpID = "sd:ListBox:DLG_COPY:LB_END_COLOR";
Border = TRUE ;
Pos = MAP_APPFONT ( 76 , 159 ) ;
Size = MAP_APPFONT ( 60 , 90 ) ;
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 48fe8772aa9e..57eb4214dc76 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -71,7 +71,7 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow,
rDoc ( rDrawDoc ),
pCustomShowList ( NULL ),
pCustomShow ( NULL ),
- bModified ( FALSE )
+ bModified ( sal_False )
{
FreeResource();
@@ -97,7 +97,7 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow,
{
aLbCustomShows.InsertEntry( pCustomShow->GetName() );
}
- aLbCustomShows.SelectEntryPos( (USHORT)nPosToSelect );
+ aLbCustomShows.SelectEntryPos( (sal_uInt16)nPosToSelect );
pCustomShowList->Seek( nPosToSelect );
}
@@ -118,9 +118,9 @@ SdCustomShowDlg::~SdCustomShowDlg()
\************************************************************************/
void SdCustomShowDlg::CheckState()
{
- USHORT nPos = aLbCustomShows.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
- BOOL bEnable = nPos != LISTBOX_ENTRY_NOTFOUND;
+ sal_Bool bEnable = nPos != LISTBOX_ENTRY_NOTFOUND;
aBtnEdit.Enable( bEnable );
aBtnRemove.Enable( bEnable );
aBtnCopy.Enable( bEnable );
@@ -146,7 +146,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
if( pCustomShow )
{
if( !pCustomShowList )
- pCustomShowList = rDoc.GetCustomShowList( TRUE );
+ pCustomShowList = rDoc.GetCustomShowList( sal_True );
pCustomShowList->Insert( pCustomShow, LIST_APPEND );
pCustomShowList->Last();
@@ -155,7 +155,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
}
if( aDlg.IsModified() )
- bModified = TRUE;
+ bModified = sal_True;
}
else if( pCustomShow )
DELETEZ( pCustomShow );
@@ -163,7 +163,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
// CustomShow bearbeiten
else if( p == &aBtnEdit )
{
- USHORT nPos = aLbCustomShows.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
DBG_ASSERT( pCustomShowList, "pCustomShowList existiert nicht" );
@@ -181,34 +181,34 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
aLbCustomShows.SelectEntryPos( nPos );
}
if( aDlg.IsModified() )
- bModified = TRUE;
+ bModified = sal_True;
}
}
}
// CustomShow loeschen
else if( p == &aBtnRemove )
{
- USHORT nPos = aLbCustomShows.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
delete (SdCustomShow*) pCustomShowList->Remove( nPos );
aLbCustomShows.RemoveEntry( nPos );
aLbCustomShows.SelectEntryPos( nPos == 0 ? nPos : nPos - 1 );
- bModified = TRUE;
+ bModified = sal_True;
}
}
// CustomShow kopieren
else if( p == &aBtnCopy )
{
- USHORT nPos = aLbCustomShows.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
SdCustomShow* pShow = new SdCustomShow( *(SdCustomShow*) pCustomShowList->GetObject( nPos ) );
String aStr( pShow->GetName() );
String aStrCopy( SdResId( STR_COPY_CUSTOMSHOW ) );
- USHORT nStrPos = aStr.Search( aStrCopy );
- USHORT nNum = 1;
+ sal_uInt16 nStrPos = aStr.Search( aStrCopy );
+ sal_uInt16 nNum = 1;
if( nStrPos == STRING_NOTFOUND )
{
aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " (" ) );
@@ -217,7 +217,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
aStr.Append( sal_Unicode(')') );
nStrPos = aStr.Search( aStrCopy );
}
- nStrPos = nStrPos + (USHORT)aStrCopy.Len();
+ nStrPos = nStrPos + (sal_uInt16)aStrCopy.Len();
// Um nicht ins Nirvana zu greifen (--> Endlosschleife)
if( nStrPos >= aStr.Len() )
{
@@ -226,17 +226,17 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
}
// Name ueberpruefen...
- BOOL bDifferent = FALSE;
+ sal_Bool bDifferent = sal_False;
//long nPosToSelect = pCustomShowList->GetCurPos();
while( !bDifferent )
{
- bDifferent = TRUE;
+ bDifferent = sal_True;
for( pCustomShow = (SdCustomShow*) pCustomShowList->First();
pCustomShow != NULL && bDifferent;
pCustomShow = (SdCustomShow*) pCustomShowList->Next() )
{
if( aStr == pCustomShow->GetName() )
- bDifferent = FALSE;
+ bDifferent = sal_False;
}
if( !bDifferent )
{
@@ -258,20 +258,20 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
aLbCustomShows.SelectEntry( pShow->GetName() );
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( p == &aLbCustomShows )
{
- USHORT nPos = aLbCustomShows.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
pCustomShowList->Seek( nPos );
- bModified = TRUE;
+ bModified = sal_True;
}
else if( p == &aCbxUseCustomShow )
{
- bModified = TRUE;
+ bModified = sal_True;
}
CheckState();
@@ -292,7 +292,7 @@ IMPL_LINK( SdCustomShowDlg, StartShowHdl, Button *, EMPTYARG )
/*************************************************************************
|* CheckState
\************************************************************************/
-BOOL SdCustomShowDlg::IsCustomShow() const
+sal_Bool SdCustomShowDlg::IsCustomShow() const
{
return( aCbxUseCustomShow.IsEnabled() && aCbxUseCustomShow.IsChecked() );
}
@@ -327,7 +327,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow,
rDoc ( rDrawDoc ),
rpCustomShow ( rpCS ),
- bModified ( FALSE )
+ bModified ( sal_False )
{
FreeResource();
@@ -346,7 +346,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow,
nPage < rDoc.GetSdPageCount( PK_STANDARD );
nPage++ )
{
- pPage = rDoc.GetSdPage( (USHORT) nPage, PK_STANDARD );
+ pPage = rDoc.GetSdPage( (sal_uInt16) nPage, PK_STANDARD );
String aStr( pPage->GetName() );
aLbPages.InsertEntry( aStr );
}
@@ -377,7 +377,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow,
aLbCustomPages.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE );
aLbCustomPages.SetHighlightRange();
- aBtnOK.Enable( FALSE );
+ aBtnOK.Enable( sal_False );
CheckState();
}
@@ -395,10 +395,10 @@ SdDefineCustomShowDlg::~SdDefineCustomShowDlg()
\************************************************************************/
void SdDefineCustomShowDlg::CheckState()
{
- BOOL bPages = aLbPages.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
- //BOOL bCSPages = aLbCustomPages.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
- BOOL bCSPages = aLbCustomPages.FirstSelected() != NULL;
- BOOL bCount = aLbCustomPages.GetEntryCount() > 0;
+ sal_Bool bPages = aLbPages.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
+ //sal_Bool bCSPages = aLbCustomPages.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
+ sal_Bool bCSPages = aLbCustomPages.FirstSelected() != NULL;
+ sal_Bool bCount = aLbCustomPages.GetEntryCount() > 0;
aBtnOK.Enable( bCount );
aBtnAdd.Enable( bPages );
@@ -412,50 +412,50 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p )
{
if( p == &aBtnAdd )
{
- USHORT nCount = aLbPages.GetSelectEntryCount();
+ sal_uInt16 nCount = aLbPages.GetSelectEntryCount();
if( nCount > 0 )
{
- ULONG nPosCP = LIST_APPEND;
+ sal_uLong nPosCP = LIST_APPEND;
SvLBoxEntry* pEntry = aLbCustomPages.FirstSelected();
if( pEntry )
nPosCP = aLbCustomPages.GetModel()->GetAbsPos( pEntry ) + 1L;
- for( USHORT i = 0; i < nCount; i++ )
+ for( sal_uInt16 i = 0; i < nCount; i++ )
{
String aStr = aLbPages.GetSelectEntry( i );
pEntry = aLbCustomPages.InsertEntry( aStr,
- 0, FALSE, nPosCP );
+ 0, sal_False, nPosCP );
aLbCustomPages.Select( pEntry );
- SdPage* pPage = rDoc.GetSdPage( (USHORT) aLbPages.
+ SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) aLbPages.
GetSelectEntryPos( i ), PK_STANDARD );
pEntry->SetUserData( pPage );
if( nPosCP != LIST_APPEND )
nPosCP++;
}
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( p == &aBtnRemove )
{
- //USHORT nPos = aLbCustomPages.GetSelectEntryPos();
+ //sal_uInt16 nPos = aLbCustomPages.GetSelectEntryPos();
SvLBoxEntry* pEntry = aLbCustomPages.FirstSelected();
if( pEntry )
{
- ULONG nPos = aLbCustomPages.GetModel()->GetAbsPos( pEntry );
+ sal_uLong nPos = aLbCustomPages.GetModel()->GetAbsPos( pEntry );
//rpCustomShow->Remove( nPos );
//aLbCustomPages.RemoveEntry( nPos );
aLbCustomPages.GetModel()->Remove( aLbCustomPages.GetModel()->GetEntryAtAbsPos( nPos ) );
- bModified = TRUE;
+ bModified = sal_True;
}
}
else if( p == &aEdtName )
{
//rpCustomShow->SetName( aEdtName.GetText() );
- bModified = TRUE;
+ bModified = sal_True;
}
CheckState();
@@ -470,7 +470,7 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p )
\************************************************************************/
void SdDefineCustomShowDlg::CheckCustomShow()
{
- BOOL bDifferent = FALSE;
+ sal_Bool bDifferent = sal_False;
SdPage* pPage = NULL;
SvLBoxEntry* pEntry = NULL;
@@ -478,7 +478,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
if( rpCustomShow->Count() != aLbCustomPages.GetEntryCount() )
{
rpCustomShow->Clear();
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
// Seiten-Pointer vergleichen
@@ -491,7 +491,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
if( pPage != pEntry->GetUserData() )
{
rpCustomShow->Clear();
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
}
}
@@ -506,7 +506,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
pPage = (SdPage*) pEntry->GetUserData();
rpCustomShow->Insert( pPage, LIST_APPEND );
}
- bModified = TRUE;
+ bModified = sal_True;
}
// Name vergleichen und ggfs. setzen
@@ -514,7 +514,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
if( rpCustomShow->GetName() != aStr )
{
rpCustomShow->SetName( aStr );
- bModified = TRUE;
+ bModified = sal_True;
}
}
@@ -524,7 +524,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
IMPL_LINK( SdDefineCustomShowDlg, OKHdl, Button *, EMPTYARG )
{
// Name ueberpruefen...
- BOOL bDifferent = TRUE;
+ sal_Bool bDifferent = sal_True;
List* pCustomShowList = rDoc.GetCustomShowList();
if( pCustomShowList )
{
@@ -537,7 +537,7 @@ IMPL_LINK( SdDefineCustomShowDlg, OKHdl, Button *, EMPTYARG )
pCustomShow = (SdCustomShow*) pCustomShowList->Next() )
{
if( aName == pCustomShow->GetName() && aName != aOldName )
- bDifferent = FALSE;
+ bDifferent = sal_False;
}
pCustomShowList->Seek( nPosToSelect );
}
diff --git a/sd/source/ui/dlg/custsdlg.src b/sd/source/ui/dlg/custsdlg.src
index c8c49e9c0d48..275a47b38397 100644..100755
--- a/sd/source/ui/dlg/custsdlg.src
+++ b/sd/source/ui/dlg/custsdlg.src
@@ -32,7 +32,7 @@
#define DIFF_Y 17
ModalDialog DLG_CUSTOMSHOW
{
- HelpID = SID_CUSTOMSHOW_DLG ;
+ HelpID = CMD_SID_CUSTOMSHOW_DLG ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 175 + DIFF , 114 + DIFF_Y ) ;
@@ -40,6 +40,7 @@ ModalDialog DLG_CUSTOMSHOW
Closeable = TRUE ;
PushButton BTN_NEW
{
+ HelpID = "sd:PushButton:DLG_CUSTOMSHOW:BTN_NEW";
Pos = MAP_APPFONT ( 120 + DIFF , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -47,6 +48,7 @@ ModalDialog DLG_CUSTOMSHOW
};
PushButton BTN_EDIT
{
+ HelpID = "sd:PushButton:DLG_CUSTOMSHOW:BTN_EDIT";
Pos = MAP_APPFONT ( 120 + DIFF , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -54,6 +56,7 @@ ModalDialog DLG_CUSTOMSHOW
};
PushButton BTN_REMOVE
{
+ HelpID = "sd:PushButton:DLG_CUSTOMSHOW:BTN_REMOVE";
Pos = MAP_APPFONT ( 120 + DIFF , 40 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -61,6 +64,7 @@ ModalDialog DLG_CUSTOMSHOW
};
PushButton BTN_COPY
{
+ HelpID = "sd:PushButton:DLG_CUSTOMSHOW:BTN_COPY";
Pos = MAP_APPFONT ( 120 + DIFF , 57 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -74,6 +78,7 @@ ModalDialog DLG_CUSTOMSHOW
};
PushButton BTN_STARTSHOW
{
+ HelpID = "sd:PushButton:DLG_CUSTOMSHOW:BTN_STARTSHOW";
Pos = MAP_APPFONT ( 120 + DIFF , 94 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -89,13 +94,18 @@ ModalDialog DLG_CUSTOMSHOW
};
ListBox LB_CUSTOMSHOWS
{
+ HelpID = "sd:ListBox:DLG_CUSTOMSHOW:LB_CUSTOMSHOWS";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 102 + DIFF , 86 + DIFF_Y ) ;
TabStop = TRUE ;
+ //IAccessibility2 Implementation 2009-----
+ QuickHelpText [ en-US ] = "Custom Screen Show" ;
+ //-----IAccessibility2 Implementation 2009
};
CheckBox CBX_USE_CUSTOMSHOW
{
+ HelpID = "sd:CheckBox:DLG_CUSTOMSHOW:CBX_USE_CUSTOMSHOW";
Pos = MAP_APPFONT ( 6 , 96 + DIFF_Y ) ;
Size = MAP_APPFONT ( 112 + DIFF , 12 ) ;
TabStop = TRUE ;
@@ -138,6 +148,7 @@ ModalDialog DLG_DEFINE_CUSTOMSHOW
};
Edit EDT_NAME
{
+ HelpID = "sd:Edit:DLG_DEFINE_CUSTOMSHOW:EDT_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 38 , 6 ) ;
Size = MAP_APPFONT ( 141 , 12 ) ;
@@ -145,6 +156,7 @@ ModalDialog DLG_DEFINE_CUSTOMSHOW
};
MultiListBox LB_PAGES
{
+ HelpID = "sd:MultiListBox:DLG_DEFINE_CUSTOMSHOW:LB_PAGES";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 35 ) ;
Size = MAP_APPFONT ( 75 , 75 ) ;
@@ -153,6 +165,7 @@ ModalDialog DLG_DEFINE_CUSTOMSHOW
};
PushButton BTN_ADD
{
+ HelpID = "sd:PushButton:DLG_DEFINE_CUSTOMSHOW:BTN_ADD";
Pos = MAP_APPFONT ( 84 , 67 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Text = "~>>" ;
@@ -168,6 +181,7 @@ ModalDialog DLG_DEFINE_CUSTOMSHOW
};
PushButton BTN_REMOVE
{
+ HelpID = "sd:PushButton:DLG_DEFINE_CUSTOMSHOW:BTN_REMOVE";
Pos = MAP_APPFONT ( 84 , 95 ) ;
Size = MAP_APPFONT ( 14 , 14 ) ;
Text = "~<<" ;
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx
index 43452672cbd3..9549af88162c 100644..100755
--- a/sd/source/ui/dlg/diactrl.cxx
+++ b/sd/source/ui/dlg/diactrl.cxx
@@ -108,7 +108,7 @@ void SdPagesField::UpdatePagesField( const SfxUInt16Item* pItem )
void SdPagesField::Modify()
{
- SfxUInt16Item aItem( SID_PAGES_PER_ROW, (UINT16) GetValue() );
+ SfxUInt16Item aItem( SID_PAGES_PER_ROW, (sal_uInt16) GetValue() );
::uno::Any a;
::uno::Sequence< ::beans::PropertyValue > aArgs( 1 );
@@ -130,7 +130,7 @@ void SdPagesField::Modify()
|*
\************************************************************************/
-SdTbxCtlDiaPages::SdTbxCtlDiaPages( USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+SdTbxCtlDiaPages::SdTbxCtlDiaPages( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
@@ -143,7 +143,7 @@ SdTbxCtlDiaPages::~SdTbxCtlDiaPages()
//========================================================================
-void SdTbxCtlDiaPages::StateChanged( USHORT,
+void SdTbxCtlDiaPages::StateChanged( sal_uInt16,
SfxItemState eState, const SfxPoolItem* pState )
{
SdPagesField* pFld = (SdPagesField*) GetToolBox().GetItemWindow( GetId() );
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 5f39c74d59f1..c720f1c806d8 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -50,7 +50,7 @@
#include <svl/undo.hxx>
#include "DrawDocShell.hxx"
#include <vcl/gdimtf.hxx>
-#include <vcl/wintypes.hxx>
+#include <tools/wintypes.hxx>
#include "docprev.hxx"
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
@@ -101,7 +101,7 @@ void InterpolateFixedBitmap( FixedBitmap * pBitmap )
// ====================================================================
// ====================================================================
-UINT32 PageHelpIds[] =
+const char* PageHelpIds[] =
{
HID_SD_AUTOPILOT_PAGE1,
HID_SD_AUTOPILOT_PAGE2,
@@ -150,7 +150,7 @@ private:
class AssistentDlgImpl : public SfxListener
{
public:
- AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink, BOOL bAutoPilot );
+ AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink, sal_Bool bAutoPilot );
~AssistentDlgImpl();
/// Local mutex used to serialize concurrent method calls.
@@ -165,10 +165,10 @@ public:
files and insert them into a listbox.
*/
void ScanDocmenu (void);
- /** Flag that is set to TRUE after the recently used files have been
+ /** Flag that is set to sal_True after the recently used files have been
scanned.
*/
- BOOL mbRecentDocumentsReady;
+ sal_Bool mbRecentDocumentsReady;
/** When the list of templates has not been scanned already this is done
when this method is called. That includes requesting the whole list
@@ -190,16 +190,16 @@ public:
*/
void TemplateScanDone (std::vector<TemplateDir*>& rTemplateFolders);
- /** Flag that is set to TRUE after the impress templates have been
+ /** Flag that is set to sal_True after the impress templates have been
scanned.
*/
- BOOL mbTemplatesReady;
+ sal_Bool mbTemplatesReady;
/** Flag used to prevent nested or concurrent calls to the
<member>UpdatePreview</memember> method. A <TRUE/> value indicates
that a preview update is currently active.
*/
- BOOL mbPreviewUpdating;
+ sal_Bool mbPreviewUpdating;
::Window* mpWindow;
@@ -229,7 +229,7 @@ public:
TemplateDir* mpLayoutRegion;
// preview
- BOOL mbUserDataDirty;
+ sal_Bool mbUserDataDirty;
Timer maPrevTimer;
Timer maEffectPrevTimer;
Timer maUpdatePageListTimer;
@@ -239,19 +239,19 @@ public:
::std::auto_ptr<WindowUpdater> mpWindowUpdater;
- BOOL mbPreview;
- USHORT mnShowPage;
- BOOL mbDocPreview;
+ sal_Bool mbPreview;
+ sal_uInt16 mnShowPage;
+ sal_Bool mbDocPreview;
- ULONG mnTemplate;
+ sal_uLong mnTemplate;
String maPageListFile;
- void UpdatePreview( BOOL bDocPreview );
+ void UpdatePreview( sal_Bool bDocPreview );
void UpdatePageList();
void UpdateUserData();
- BOOL IsOwnFormat( const String& rPath );
+ sal_Bool IsOwnFormat( const String& rPath );
// dlg status
void EndDialog( long nResult = 0 );
@@ -362,15 +362,15 @@ public:
// ====================================================================
-AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink, BOOL bAutoPilot ) :
+AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink, sal_Bool bAutoPilot ) :
mpTemplateRegion(NULL),
mpLayoutRegion(NULL),
- mbUserDataDirty(FALSE),
+ mbUserDataDirty(sal_False),
xDocShell (NULL),
mpWindowUpdater (new WindowUpdater()),
- mbPreview(TRUE),
+ mbPreview(sal_True),
mnShowPage(0),
- mbDocPreview(FALSE),
+ mbDocPreview(sal_False),
maAssistentFunc(5),
maPreviewFlag(pWindow,SdResId(CB_PREVIEW)),
maStartWithFlag(pWindow,SdResId(CB_STARTWITH)),
@@ -384,9 +384,9 @@ AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink,
maOpenStr(SdResId(STR_OPEN))
{
maPageListFile += sal_Unicode('?'),
- mbRecentDocumentsReady = FALSE;
- mbTemplatesReady = FALSE;
- mbPreviewUpdating = FALSE;
+ mbRecentDocumentsReady = sal_False;
+ mbTemplatesReady = sal_False;
+ mbPreviewUpdating = sal_False;
mpWindow = pWindow;
@@ -445,8 +445,8 @@ AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink,
mpPage1OpenPB->SetModeImage(
GetUiIconForCommand(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Open")))
);
- mpPage1OpenPB->EnableImageDisplay(TRUE);
- mpPage1OpenPB->EnableTextDisplay(TRUE);
+ mpPage1OpenPB->EnableImageDisplay(sal_True);
+ mpPage1OpenPB->EnableTextDisplay(sal_True);
mpPage1OpenPB->SetImageAlign(IMAGEALIGN_LEFT);
mpPage1OpenPB->SetStyle(mpPage1OpenPB->GetStyle() | WB_CENTER);
}
@@ -625,7 +625,7 @@ AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink,
mpWindowUpdater->RegisterWindow (&maPreview);
- UpdatePreview( TRUE );
+ UpdatePreview( sal_True );
//check wether we should start with a template document initialy and preselect it
const ::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) );
@@ -844,10 +844,10 @@ void AssistentDlgImpl::ScanDocmenu (void)
}
}
}
- mbRecentDocumentsReady = TRUE;
+ mbRecentDocumentsReady = sal_True;
try
{
- UpdatePreview(TRUE);
+ UpdatePreview(sal_True);
}
catch (uno::RuntimeException& )
{
@@ -867,7 +867,7 @@ void AssistentDlgImpl::ProvideTemplates (void)
try
{
- UpdatePreview(TRUE);
+ UpdatePreview(sal_True);
}
catch (uno::RuntimeException& e)
{
@@ -909,7 +909,7 @@ void AssistentDlgImpl::TemplateScanDone (
mpPage1RegionLB->InsertEntry (pDir->msRegion);
}
- mpPage1RegionLB->SelectEntryPos ((USHORT)nFirstEntry);
+ mpPage1RegionLB->SelectEntryPos ((sal_uInt16)nFirstEntry);
mpPage1RegionLB->Update();
SelectTemplateRegion (mpPage1RegionLB->GetSelectEntry());
@@ -934,12 +934,12 @@ void AssistentDlgImpl::TemplateScanDone (
mpPage2RegionLB->InsertEntry (pDir->msRegion);
}
- mpPage2RegionLB->SelectEntryPos ((USHORT)nFirstEntry);
+ mpPage2RegionLB->SelectEntryPos ((sal_uInt16)nFirstEntry);
mpPage2RegionLB->Update();
SelectLayoutRegion (mpPage2RegionLB->GetSelectEntry());
// Make the changes visible.
- mbTemplatesReady = TRUE;
+ mbTemplatesReady = sal_True;
if (mpWindow)
UpdatePage();
}
@@ -985,7 +985,7 @@ String AssistentDlgImpl::GetDocFileName()
if(mpWindow)
{
aTitle = mpWindow->GetText();
- USHORT nPos = aTitle.Search(sal_Unicode('('));
+ sal_uInt16 nPos = aTitle.Search(sal_Unicode('('));
if(nPos != STRING_NOTFOUND)
aTitle.Erase( nPos-1 );
}
@@ -993,9 +993,9 @@ String AssistentDlgImpl::GetDocFileName()
String aDocFile;
if( GetStartType() == ST_TEMPLATE )
{
- const USHORT nEntry = mpPage1TemplateLB->GetSelectEntryPos();
+ const sal_uInt16 nEntry = mpPage1TemplateLB->GetSelectEntryPos();
TemplateEntry* pEntry = NULL;
- if(nEntry != (USHORT)-1)
+ if(nEntry != (sal_uInt16)-1)
pEntry = mpTemplateRegion->maEntries[nEntry];
if(pEntry)
@@ -1009,8 +1009,8 @@ String AssistentDlgImpl::GetDocFileName()
}
else if( GetStartType() == ST_OPEN )
{
- const USHORT nEntry = mpPage1OpenLB->GetSelectEntryPos();
- if(nEntry != (USHORT)-1 )
+ const sal_uInt16 nEntry = mpPage1OpenLB->GetSelectEntryPos();
+ if(nEntry != (sal_uInt16)-1 )
aDocFile = *maOpenFilesList[nEntry];
}
@@ -1023,9 +1023,9 @@ String AssistentDlgImpl::GetDocFileName()
String AssistentDlgImpl::GetLayoutFileName()
{
String aFile;
- const USHORT nEntry = mpPage2LayoutLB->GetSelectEntryPos();
+ const sal_uInt16 nEntry = mpPage2LayoutLB->GetSelectEntryPos();
TemplateEntry* pEntry = NULL;
- if(nEntry != (USHORT)-1 && nEntry > 0)
+ if(nEntry != (sal_uInt16)-1 && nEntry > 0)
pEntry = mpLayoutRegion->maEntries[nEntry-1];
if(pEntry)
@@ -1036,7 +1036,7 @@ String AssistentDlgImpl::GetLayoutFileName()
SfxObjectShellLock AssistentDlgImpl::GetDocument()
{
- UpdatePreview(FALSE); // aber komplett laden
+ UpdatePreview(sal_False); // aber komplett laden
UpdatePageList();
SfxObjectShell* pShell = xDocShell;
@@ -1045,9 +1045,9 @@ SfxObjectShellLock AssistentDlgImpl::GetDocument()
if(pDoc)
{
- const USHORT nPageCount = pDoc->GetSdPageCount(PK_STANDARD);
- BOOL bKiosk = mpPage3PresTypeKioskRB->IsChecked();
- UINT32 nNewTime = (UINT32)mpPage3PresTimeTMF->GetTime().GetMSFromTime() / 1000;
+ const sal_uInt16 nPageCount = pDoc->GetSdPageCount(PK_STANDARD);
+ sal_Bool bKiosk = mpPage3PresTypeKioskRB->IsChecked();
+ sal_uInt32 nNewTime = (sal_uInt32)mpPage3PresTimeTMF->GetTime().GetMSFromTime() / 1000;
if(bKiosk)
{
PresentationSettings& rSettings = pDoc->getPresentationSettings();
@@ -1056,8 +1056,8 @@ SfxObjectShellLock AssistentDlgImpl::GetDocument()
rSettings.mbShowPauseLogo = mpPage3LogoCB->IsChecked();
}
- USHORT nPgAbsNum = 0;
- USHORT nPgRelNum = 0;
+ sal_uInt16 nPgAbsNum = 0;
+ sal_uInt16 nPgRelNum = 0;
while( nPgAbsNum < nPageCount )
{
SdPage* pPage = pDoc->GetSdPage( nPgRelNum, PK_STANDARD );
@@ -1107,10 +1107,12 @@ void AssistentDlgImpl::ChangePage()
maNextPageButton.Enable(!maAssistentFunc.IsLastPage());
maLastPageButton.Enable(!maAssistentFunc.IsFirstPage());
- USHORT nPage = (USHORT)maAssistentFunc.GetCurrentPage();
+ sal_uInt16 nPage = (sal_uInt16)maAssistentFunc.GetCurrentPage();
if( mpWindow )
+ {
mpWindow->SetHelpId( PageHelpIds[nPage-1]);
+ }
UpdatePage();
@@ -1124,7 +1126,7 @@ void AssistentDlgImpl::ChangePage()
void AssistentDlgImpl::UpdatePage()
{
- USHORT nPage = (USHORT)maAssistentFunc.GetCurrentPage();
+ sal_uInt16 nPage = (sal_uInt16)maAssistentFunc.GetCurrentPage();
switch(nPage)
{
@@ -1132,7 +1134,7 @@ void AssistentDlgImpl::UpdatePage()
{
// Elemente auf der ersten Seite abhaengig vom Starttype Zeigen
SetStartType( GetStartType() );
- mpPage1TemplateRB->Enable(TRUE /*mbTemplatesReady*/);
+ mpPage1TemplateRB->Enable(sal_True /*mbTemplatesReady*/);
break;
}
@@ -1143,11 +1145,11 @@ void AssistentDlgImpl::UpdatePage()
if( GetStartType() != ST_EMPTY )
{
- mpPage2Medium5RB->Enable( TRUE );
+ mpPage2Medium5RB->Enable( sal_True );
}
else
{
- mpPage2Medium5RB->Enable( FALSE );
+ mpPage2Medium5RB->Enable( sal_False );
if(mpPage2Medium5RB->IsChecked())
mpPage2Medium1RB->Check();
}
@@ -1168,7 +1170,7 @@ void AssistentDlgImpl::UpdatePage()
if(GetStartType() != ST_TEMPLATE)
maNextPageButton.Enable(false);
- BOOL bKiosk = mpPage3PresTypeKioskRB->IsChecked();
+ sal_Bool bKiosk = mpPage3PresTypeKioskRB->IsChecked();
mpPage3PresTimeFT->Enable(bKiosk);
mpPage3BreakFT->Enable(bKiosk);
mpPage3PresTimeTMF->Enable(bKiosk);
@@ -1239,7 +1241,7 @@ IMPL_LINK( AssistentDlgImpl, PreviewFlagHdl, CheckBox *, EMPTYARG )
if( maPreviewFlag.IsChecked() != mbPreview )
{
mbPreview = maPreviewFlag.IsChecked();
- UpdatePreview(TRUE);
+ UpdatePreview(sal_True);
}
return 0;
}
@@ -1268,11 +1270,11 @@ IMPL_LINK( AssistentDlgImpl, SelectFileHdl, ListBox *, EMPTYARG )
IMPL_LINK( AssistentDlgImpl, PageSelectHdl, Control *, EMPTYARG )
{
- USHORT nPage = mpPage5PageListCT->GetSelectedPage();
+ sal_uInt16 nPage = mpPage5PageListCT->GetSelectedPage();
if( mnShowPage != nPage )
{
mnShowPage = nPage;
- UpdatePreview(FALSE);
+ UpdatePreview(sal_False);
}
return 0;
@@ -1286,7 +1288,7 @@ IMPL_LINK( AssistentDlgImpl, UpdatePageListHdl, void *, EMPTYARG )
IMPL_LINK( AssistentDlgImpl, UpdatePreviewHdl, void *, EMPTYARG )
{
- UpdatePreview( TRUE );
+ UpdatePreview( sal_True );
return 0;
}
@@ -1343,7 +1345,7 @@ IMPL_LINK( AssistentDlgImpl, PresTypeHdl, RadioButton*, EMPTYARG )
maNextPageButton.Enable(false);
}
- BOOL bKiosk = mpPage3PresTypeKioskRB->IsChecked();
+ sal_Bool bKiosk = mpPage3PresTypeKioskRB->IsChecked();
mpPage3PresTimeFT->Enable(bKiosk);
mpPage3BreakFT->Enable(bKiosk);
mpPage3PresTimeTMF->Enable(bKiosk);
@@ -1354,7 +1356,7 @@ IMPL_LINK( AssistentDlgImpl, PresTypeHdl, RadioButton*, EMPTYARG )
IMPL_LINK( AssistentDlgImpl, UpdateUserDataHdl, Edit*, EMPTYARG )
{
- mbUserDataDirty = TRUE;
+ mbUserDataDirty = sal_True;
String aTopic = mpPage4AskTopicEDT->GetText();
String aName = mpPage4AskNameEDT->GetText();
String aInfo = mpPage4AskInfoEDT->GetText();
@@ -1427,7 +1429,7 @@ void AssistentDlgImpl::UpdateUserData()
if(pPage && ( aTopic.Len() != 0 || aName.Len() != 0 || aInfo.Len() != 0 ) )
{
if( pPage->GetAutoLayout() == AUTOLAYOUT_NONE )
- pPage->SetAutoLayout(AUTOLAYOUT_TITLE, TRUE);
+ pPage->SetAutoLayout(AUTOLAYOUT_TITLE, sal_True);
SdrTextObj* pObj;
String aEmptyString;
@@ -1438,8 +1440,8 @@ void AssistentDlgImpl::UpdateUserData()
if( pObj )
{
pPage->SetObjText( pObj, NULL, PRESOBJ_TITLE, aTopic );
- pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ), TRUE );
- pObj->SetEmptyPresObj(FALSE);
+ pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ), sal_True );
+ pObj->SetEmptyPresObj(sal_False);
}
}
@@ -1455,8 +1457,8 @@ void AssistentDlgImpl::UpdateUserData()
if( pObj )
{
pPage->SetObjText( pObj, NULL, PRESOBJ_OUTLINE, aStrTmp );
- pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE ), TRUE );
- pObj->SetEmptyPresObj(FALSE);
+ pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE ), sal_True );
+ pObj->SetEmptyPresObj(sal_False);
}
else
{
@@ -1464,20 +1466,20 @@ void AssistentDlgImpl::UpdateUserData()
if( pObj )
{
pPage->SetObjText( pObj, NULL, PRESOBJ_TEXT, aStrTmp );
- pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT ), TRUE );
- pObj->SetEmptyPresObj(FALSE);
+ pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT ), sal_True );
+ pObj->SetEmptyPresObj(sal_False);
}
}
}
}
- mbUserDataDirty = FALSE;
+ mbUserDataDirty = sal_False;
}
void AssistentDlgImpl::UpdatePageList()
{
if(mbDocPreview || !mbPreview)
- UpdatePreview(FALSE);
+ UpdatePreview(sal_False);
else if(maPageListFile == maDocFile)
return;
@@ -1493,20 +1495,20 @@ void AssistentDlgImpl::UpdatePageList()
mpPage5PageListCT->Fill(pDoc);
}
-void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
+void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
{
// Guard against multiple concurrent execution to this method caused either
// by calls from different threads or recursion.
::osl::MutexGuard aGuard (maMutex);
if (mbPreviewUpdating)
return;
- mbPreviewUpdating = TRUE;
+ mbPreviewUpdating = sal_True;
if(!mbPreview && bDocPreview)
{
maPreview.Invalidate();
maPreview.SetObjectShell(0);
- mbPreviewUpdating = FALSE;
+ mbPreviewUpdating = sal_False;
return;
}
@@ -1515,8 +1517,8 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
String aEmptyStr;
SfxApplication *pSfxApp = SFX_APP();
- ULONG lErr;
- BOOL bChangeMaster = aLayoutFile.Len() != 0;
+ sal_uLong lErr;
+ sal_Bool bChangeMaster = aLayoutFile.Len() != 0;
if( aDocFile.Len() == 0 )
{
@@ -1526,15 +1528,15 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
CloseDocShell();
DrawDocShell* pNewDocSh;
- xDocShell = pNewDocSh = new DrawDocShell(SFX_CREATE_MODE_STANDARD, FALSE);
+ xDocShell = pNewDocSh = new DrawDocShell(SFX_CREATE_MODE_STANDARD, sal_False);
pNewDocSh->DoInitNew(NULL);
SdDrawDocument* pDoc = pNewDocSh->GetDoc();
pDoc->CreateFirstPages();
pDoc->StopWorkStartupDelay();
- mbDocPreview = FALSE;
+ mbDocPreview = sal_False;
maDocFile = aDocFile;
- mbUserDataDirty = TRUE;
+ mbUserDataDirty = sal_True;
}
else
bChangeMaster = (aLayoutFile.Len() != 0) && (maLayoutFile != aLayoutFile);
@@ -1545,13 +1547,13 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
{
SfxObjectShell* pShell = xDocShell;
DrawDocShell* pDocShell = PTR_CAST(DrawDocShell,pShell);
- SfxUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():NULL;
+ ::svl::IUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():NULL;
if(pUndoMgr)
pUndoMgr->Undo();
- mbUserDataDirty = TRUE;
+ mbUserDataDirty = sal_True;
}
else
- bChangeMaster = FALSE;
+ bChangeMaster = sal_False;
}
else
{
@@ -1565,11 +1567,11 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
SfxItemSet* pSet = new SfxAllItemSet( pSfxApp->GetPool() );
if(IsOwnFormat(aDocFile))
{
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
if(bDocPreview)
- pSet->Put( SfxBoolItem( SID_PREVIEW, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
RestorePassword( pSet, aDocFile );
- if( (lErr = pSfxApp->LoadTemplate( xDocShell, aDocFile, TRUE, pSet )) != 0 )
+ if( (lErr = pSfxApp->LoadTemplate( xDocShell, aDocFile, sal_True, pSet )) != 0 )
ErrorHandler::HandleError(lErr);
else
SavePassword( xDocShell, aDocFile );
@@ -1582,7 +1584,7 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aDocFile ));
aReq.AppendItem( SfxStringItem( SID_REFERER, aEmptyStr ) );
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, aTargetStr ) );
- aReq.AppendItem( SfxBoolItem( SID_HIDDEN, TRUE ) );
+ aReq.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
aReq.AppendItem( SfxBoolItem( SID_PREVIEW, bDocPreview ) );
const SfxViewFrameItem* pRet = PTR_CAST( SfxViewFrameItem, SFX_APP()->ExecuteSlot( aReq ) );
@@ -1597,7 +1599,7 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
mnShowPage = 0;
mbDocPreview = bDocPreview;
maDocFile = aDocFile;
- mbUserDataDirty = TRUE;
+ mbUserDataDirty = sal_True;
}
if(bChangeMaster && (aLayoutFile != maDocFile))
@@ -1612,11 +1614,11 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
if(IsOwnFormat(aLayoutFile))
{
- pSet->Put( SfxBoolItem( SID_TEMPLATE, TRUE ) );
- pSet->Put( SfxBoolItem( SID_PREVIEW, TRUE ) );
+ pSet->Put( SfxBoolItem( SID_TEMPLATE, sal_True ) );
+ pSet->Put( SfxBoolItem( SID_PREVIEW, sal_True ) );
RestorePassword( pSet, aLayoutFile );
- if( (lErr = pSfxApp->LoadTemplate( xLayoutDocShell, aLayoutFile, TRUE, pSet )) != 0 )
+ if( (lErr = pSfxApp->LoadTemplate( xLayoutDocShell, aLayoutFile, sal_True, pSet )) != 0 )
ErrorHandler::HandleError(lErr);
SavePassword( xLayoutDocShell, aLayoutFile );
}
@@ -1634,14 +1636,14 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
if( pDoc && pLayoutDoc )
{
- pDoc->SetMasterPage(0, aEmptyStr, pLayoutDoc, TRUE, FALSE );
+ pDoc->SetMasterPage(0, aEmptyStr, pLayoutDoc, sal_True, sal_False );
}
else
{
OSL_FAIL("sd::AssistentDlgImpl::UpdatePreview(), no document for preview?");
}
- mbUserDataDirty = TRUE;
+ mbUserDataDirty = sal_True;
}
maLayoutFile = aLayoutFile;
@@ -1655,7 +1657,7 @@ void AssistentDlgImpl::UpdatePreview( BOOL bDocPreview )
maPreview.SetObjectShell( xDocShell, mnShowPage );
}
- mbPreviewUpdating = FALSE;
+ mbPreviewUpdating = sal_False;
}
void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const String& rPath )
@@ -1667,7 +1669,7 @@ void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const String& rPat
{
SfxItemSet * pSet = pMedium->GetItemSet();
const SfxPoolItem *pItem = 0;
- if( pSet->GetItemState(SID_PASSWORD, TRUE, &pItem) == SFX_ITEM_SET )
+ if( pSet->GetItemState(SID_PASSWORD, sal_True, &pItem) == SFX_ITEM_SET )
{
//TODO/MBA: testing
String aPass( ((const SfxStringItem*)pItem)->GetValue());
@@ -1724,7 +1726,7 @@ void AssistentDlgImpl::DeletePassords()
maPasswordList.clear();
}
-BOOL AssistentDlgImpl::IsOwnFormat( const String& rPath )
+sal_Bool AssistentDlgImpl::IsOwnFormat( const String& rPath )
{
INetURLObject aURL( rPath );
String aExt( aURL.GetFileExtension() );
@@ -1856,7 +1858,7 @@ Image AssistentDlgImpl::GetUiIconForCommand (const ::rtl::OUString& sCommandURL)
//////////////////////////////////////////////
-AssistentDlg::AssistentDlg(Window* pParent, BOOL bAutoPilot) :
+AssistentDlg::AssistentDlg(Window* pParent, sal_Bool bAutoPilot) :
ModalDialog(pParent,SdResId(DLG_ASS))
{
Link aFinishLink = LINK(this,AssistentDlg, FinishHdl);
@@ -1890,7 +1892,7 @@ IMPL_LINK( AssistentDlg, FinishHdl, OKButton *, EMPTYARG )
INetURLObject aURL;
aURL.SetSmartURL(aFileToOpen);
mpImpl->maOpenFilesList.push_back (new String (aURL.GetMainURL( INetURLObject::NO_DECODE )));
- USHORT nNewPos = mpImpl->mpPage1OpenLB->InsertEntry(aURL.getName());
+ sal_uInt16 nNewPos = mpImpl->mpPage1OpenLB->InsertEntry(aURL.getName());
mpImpl->mpPage1OpenLB->SelectEntryPos(nNewPos);
}
}
@@ -1927,7 +1929,7 @@ OutputType AssistentDlg::GetOutputMedium() const
return OUTPUT_ORIGINAL;
}
-BOOL AssistentDlg::IsSummary() const
+sal_Bool AssistentDlg::IsSummary() const
{
return mpImpl->mpPage5SummaryCB->IsChecked();
}
@@ -1942,12 +1944,12 @@ String AssistentDlg::GetDocPath() const
return mpImpl->GetDocFileName();
}
-BOOL AssistentDlg::GetStartWithFlag() const
+sal_Bool AssistentDlg::GetStartWithFlag() const
{
return !mpImpl->maStartWithFlag.IsChecked();
}
-BOOL AssistentDlg::IsDocEmpty() const
+sal_Bool AssistentDlg::IsDocEmpty() const
{
return mpImpl->GetDocFileName().Len() == 0 &&
mpImpl->GetLayoutFileName().Len() == 0;
diff --git a/sd/source/ui/dlg/dlgass.src b/sd/source/ui/dlg/dlgass.src
index b4c146eb0df2..6427b9bff297 100644
--- a/sd/source/ui/dlg/dlgass.src
+++ b/sd/source/ui/dlg/dlgass.src
@@ -48,6 +48,7 @@ ModalDialog DLG_ASS
CheckBox CB_PREVIEW
{
+ HelpID = "sd:CheckBox:DLG_ASS:CB_PREVIEW";
Pos = MAP_APPFONT ( 144 , 140 );
Size = MAP_APPFONT ( 122 , 10 );
TabStop = TRUE;
@@ -56,6 +57,7 @@ ModalDialog DLG_ASS
CheckBox CB_STARTWITH
{
+ HelpID = "sd:CheckBox:DLG_ASS:CB_STARTWITH";
Pos = MAP_APPFONT ( 144 , 154 );
Size = MAP_APPFONT ( 122 , 10 );
TabStop = TRUE;
@@ -84,6 +86,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE1_EMPTY
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE1_EMPTY";
Pos = MAP_APPFONT ( 12 , 48 );
Size = MAP_APPFONT ( 130 , 10 );
TabStop = TRUE;
@@ -92,6 +95,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE1_TEMPLATE
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE1_TEMPLATE";
Pos = MAP_APPFONT ( 12 , 62 );
Size = MAP_APPFONT ( 130 , 10 );
Text [ en-US ] = "~From template";
@@ -99,6 +103,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE1_OPEN
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE1_OPEN";
Pos = MAP_APPFONT ( 12 , 76 );
Size = MAP_APPFONT ( 130 , 10 );
Text [ en-US ] = "O~pen existing presentation";
@@ -106,6 +111,7 @@ ModalDialog DLG_ASS
PushButton PB_PAGE1_OPEN
{
+ HelpID = "sd:PushButton:DLG_ASS:PB_PAGE1_OPEN";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 18 , 89 ) ;
Size = MAP_APPFONT ( 50 , 18 ) ;
@@ -171,6 +177,7 @@ ModalDialog DLG_ASS
ListBox LB_PAGE2_LAYOUT
{
+ HelpID = "sd:ListBox:DLG_ASS:LB_PAGE2_LAYOUT";
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 64 ) ;
Size = MAP_APPFONT ( 120 , 40 ) ;
@@ -186,6 +193,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE2_MEDIUM5
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE2_MEDIUM5";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 12 , 121 );
Size = MAP_APPFONT ( 59 , 10 );
@@ -194,6 +202,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE2_MEDIUM1
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE2_MEDIUM1";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 75 , 121 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
@@ -202,6 +211,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE2_MEDIUM2
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE2_MEDIUM2";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 75 , 135 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
@@ -211,6 +221,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE2_MEDIUM3
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE2_MEDIUM3";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 12 , 135 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
@@ -220,6 +231,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE2_MEDIUM4
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE2_MEDIUM4";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 12 , 149 ) ;
Size = MAP_APPFONT ( 59 , 10 ) ;
@@ -256,6 +268,7 @@ ModalDialog DLG_ASS
ListBox LB_PAGE3_EFFECT
{
+ HelpID = "sd:ListBox:DLG_ASS:LB_PAGE3_EFFECT";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 72 , 48 );
Size = MAP_APPFONT ( 60 , 12 );
@@ -274,6 +287,7 @@ ModalDialog DLG_ASS
ListBox LB_PAGE3_SPEED
{
+ HelpID = "sd:ListBox:DLG_ASS:LB_PAGE3_SPEED";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 72 , 64 );
Size = MAP_APPFONT ( 60 , 12 );
@@ -292,6 +306,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE3_LIVE
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE3_LIVE";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 12 , 94 );
Size = MAP_APPFONT ( 120 , 10 );
@@ -300,6 +315,7 @@ ModalDialog DLG_ASS
RadioButton RB_PAGE3_KIOSK
{
+ HelpID = "sd:RadioButton:DLG_ASS:RB_PAGE3_KIOSK";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 12 , 108 );
Size = MAP_APPFONT ( 120 , 10 );
@@ -316,6 +332,7 @@ ModalDialog DLG_ASS
TimeField TMF_PAGE3_TIME
{
+ HelpID = "sd:TimeField:DLG_ASS:TMF_PAGE3_TIME";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 77 , 122 ) ;
Size = MAP_APPFONT ( 55 , 12 ) ;
@@ -349,6 +366,7 @@ ModalDialog DLG_ASS
TimeField TMF_PAGE3_BREAK
{
+ HelpID = "sd:TimeField:DLG_ASS:TMF_PAGE3_BREAK";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 77 , 138 ) ;
Size = MAP_APPFONT ( 55 , 12 ) ;
@@ -374,6 +392,7 @@ ModalDialog DLG_ASS
CheckBox CB_PAGE3_LOGO
{
+ HelpID = "sd:CheckBox:DLG_ASS:CB_PAGE3_LOGO";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 21 , 154 );
Size = MAP_APPFONT ( 111 , 10 );
@@ -410,6 +429,7 @@ ModalDialog DLG_ASS
};
Edit EDT_PAGE4_ASKNAME
{
+ HelpID = "sd:Edit:DLG_ASS:EDT_PAGE4_ASKNAME";
OutputSize = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 59 ) ;
@@ -425,6 +445,7 @@ ModalDialog DLG_ASS
};
Edit EDT_PAGE4_ASKTOPIC
{
+ HelpID = "sd:Edit:DLG_ASS:EDT_PAGE4_ASKTOPIC";
OutputSize = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 88 ) ;
@@ -440,6 +461,7 @@ ModalDialog DLG_ASS
};
MultiLineEdit EDT_PAGE4_ASKINFORMATION
{
+ HelpID = "sd:MultiLineEdit:DLG_ASS:EDT_PAGE4_ASKINFORMATION";
OutputSize = TRUE ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , 117 ) ;
@@ -479,6 +501,7 @@ ModalDialog DLG_ASS
CheckBox CB_PAGE5_SUMMARY
{
+ HelpID = "sd:CheckBox:DLG_ASS:CB_PAGE5_SUMMARY";
OutputSize = TRUE;
Pos = MAP_APPFONT ( 6 , 154 );
Size = MAP_APPFONT ( 132 , 10 );
@@ -505,6 +528,7 @@ ModalDialog DLG_ASS
PushButton BUT_LAST
{
+ HelpID = "sd:PushButton:DLG_ASS:BUT_LAST";
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 112 , 170 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
@@ -514,6 +538,7 @@ ModalDialog DLG_ASS
PushButton BUT_NEXT
{
+ HelpID = "sd:PushButton:DLG_ASS:BUT_NEXT";
DefButton = TRUE ;
OutputSize = TRUE ;
Pos = MAP_APPFONT ( 165 , 170 ) ;
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index 7242a6a06d76..493ef074b4c1 100644
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -50,10 +50,10 @@ SdPageListControl::SdPageListControl(
: SvTreeListBox(pParent, rResId)
{
// Tree-ListBox mit Linien versehen
- SetWindowBits( WinBits( WB_TABSTOP | WB_BORDER | WB_HASLINES |
+ SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
WB_HASBUTTONS | WB_HASLINESATROOT |
WB_HSCROLL |
- WB_HASBUTTONSATROOT ) );
+ WB_HASBUTTONSATROOT );
SetNodeDefaultImages ();
m_pCheckButton = new SvLBoxButtonData(this);
@@ -117,8 +117,8 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
{
Outliner* pOutliner = pDoc->GetInternalOutliner();
- USHORT nPage = 0;
- const USHORT nMaxPages = pDoc->GetPageCount();
+ sal_uInt16 nPage = 0;
+ const sal_uInt16 nMaxPages = pDoc->GetPageCount();
while( nPage < nMaxPages )
{
SdPage* pPage = (SdPage*) pDoc->GetPage( nPage );
@@ -131,8 +131,8 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
if(!pTO)
{
// Ermittelt das SdrTextObject mit dem Layout Text dieser Seite
- const ULONG nObjectCount = pPage->GetObjCount();
- for (ULONG nObject = 0; nObject < nObjectCount; nObject++)
+ const sal_uLong nObjectCount = pPage->GetObjCount();
+ for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++)
{
SdrObject* pObject = pPage->GetObj(nObject);
if (pObject->GetObjInventor() == SdrInventor && pObject->GetObjIdentifier() == OBJ_OUTLINETEXT)
@@ -151,14 +151,14 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
pOutliner->Clear();
pOutliner->SetText( *pOPO );
- ULONG nCount = pOutliner->GetParagraphCount();
+ sal_uLong nCount = pOutliner->GetParagraphCount();
Paragraph* pPara = NULL;
- for (ULONG nPara = 0; nPara < nCount; nPara++)
+ for (sal_uLong nPara = 0; nPara < nCount; nPara++)
{
pPara = pOutliner->GetParagraph(nPara);
- if(pPara && pOutliner->GetDepth( (USHORT) nPara ) == 0 )
+ if(pPara && pOutliner->GetDepth( (sal_uInt16) nPara ) == 0 )
{
String aParaText = pOutliner->GetText(pPara);
if(aParaText.Len() != 0)
@@ -174,10 +174,10 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
pOutliner->Clear();
}
-USHORT SdPageListControl::GetSelectedPage()
+sal_uInt16 SdPageListControl::GetSelectedPage()
{
SvLBoxEntry* pSelEntry = GetCurEntry();
- USHORT nPage = 0;
+ sal_uInt16 nPage = 0;
if ( pSelEntry )
{
@@ -197,10 +197,10 @@ USHORT SdPageListControl::GetSelectedPage()
return nPage;
}
-BOOL SdPageListControl::IsPageChecked( USHORT nPage )
+sal_Bool SdPageListControl::IsPageChecked( sal_uInt16 nPage )
{
SvLBoxEntry* pEntry = GetModel()->GetEntry(nPage);
- return pEntry?(BOOL)(GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED): FALSE;
+ return pEntry?(sal_Bool)(GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED): sal_False;
}
void SdPageListControl::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx
index d0663bcbdf07..3eeb40144ee8 100644
--- a/sd/source/ui/dlg/dlgassim.hxx
+++ b/sd/source/ui/dlg/dlgassim.hxx
@@ -48,8 +48,8 @@ public:
void Fill( SdDrawDocument* pDoc );
void Clear();
- USHORT GetSelectedPage();
- BOOL IsPageChecked( USHORT nPage );
+ sal_uInt16 GetSelectedPage();
+ sal_Bool IsPageChecked( sal_uInt16 nPage );
DECL_LINK( CheckButtonClickHdl, SvLBoxButtonData * );
diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx
index e7d378ab6d85..5194e9ba1794 100644..100755
--- a/sd/source/ui/dlg/dlgchar.cxx
+++ b/sd/source/ui/dlg/dlgchar.cxx
@@ -65,7 +65,7 @@ SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr,
// -----------------------------------------------------------------------
-void SdCharDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx
index ff57ee26cf7e..1e9d6c52e1fe 100644
--- a/sd/source/ui/dlg/dlgctrls.cxx
+++ b/sd/source/ui/dlg/dlgctrls.cxx
@@ -85,14 +85,14 @@ void FadeEffectLB::Fill()
/*
void FadeEffectLB::SelectEffect( presentation::FadeEffect eFE )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for( long i = 0, nCount = sizeof( aEffects ) / sizeof( FadeEffectPair ); ( i < nCount ) && !bFound; i++ )
{
if( aEffects[ i ].meFE == eFE )
{
- SelectEntryPos( (USHORT) i );
- bFound = TRUE;
+ SelectEntryPos( (sal_uInt16) i );
+ bFound = sal_True;
}
}
}
@@ -102,7 +102,7 @@ void FadeEffectLB::SelectEffect( presentation::FadeEffect eFE )
void FadeEffectLB::applySelected( SdPage* pSlide ) const
{
- const USHORT nPos = GetSelectEntryPos();
+ const sal_uInt16 nPos = GetSelectEntryPos();
if( pSlide && (nPos < mpImpl->maPresets.size() ) )
{
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index bde2ccce6f71..e586925d43d5 100644..100755
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -62,9 +62,9 @@
SdModifyFieldDlg::SdModifyFieldDlg( Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet ) :
ModalDialog ( pWindow, SdResId( DLG_FIELD_MODIFY ) ),
+ aGrpType ( this, SdResId( GRP_TYPE ) ),
aRbtFix ( this, SdResId( RBT_FIX ) ),
aRbtVar ( this, SdResId( RBT_VAR ) ),
- aGrpType ( this, SdResId( GRP_TYPE ) ),
maFtLanguage( this, SdResId( FT_LANGUAGE ) ),
maLbLanguage( this, SdResId( LB_LANGUAGE ) ),
aFtFormat ( this, SdResId( FT_FORMAT ) ),
@@ -214,7 +214,7 @@ void SdModifyFieldDlg::FillFormatList()
aDateField.SetFormat( SVXDATEFORMAT_F ); // Dienstag, 13.Februar 1996
aLbFormat.InsertEntry( aDateField.GetFormatted( *pNumberFormatter, eLangType ) );
- aLbFormat.SelectEntryPos( (USHORT) ( pDateField->GetFormat() - 2 ) );
+ aLbFormat.SelectEntryPos( (sal_uInt16) ( pDateField->GetFormat() - 2 ) );
}
else if( pField->ISA( SvxExtTimeField ) )
{
@@ -242,7 +242,7 @@ void SdModifyFieldDlg::FillFormatList()
//SVXTIMEFORMAT_AM_HMS, // 01:49:38 PM
//SVXTIMEFORMAT_AM_HMSH // 01:49:38.78 PM
- aLbFormat.SelectEntryPos( (USHORT) ( pTimeField->GetFormat() - 2 ) );
+ aLbFormat.SelectEntryPos( (sal_uInt16) ( pTimeField->GetFormat() - 2 ) );
}
else if( pField->ISA( SvxExtFileField ) )
{
@@ -254,20 +254,20 @@ void SdModifyFieldDlg::FillFormatList()
aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_PATH ) ) );
aLbFormat.InsertEntry( String( SdResId( STR_FILEFORMAT_NAME ) ) );
- aLbFormat.SelectEntryPos( (USHORT) ( pFileField->GetFormat() ) );
+ aLbFormat.SelectEntryPos( (sal_uInt16) ( pFileField->GetFormat() ) );
}
else if( pField->ISA( SvxAuthorField ) )
{
const SvxAuthorField* pAuthorField = (const SvxAuthorField*) pField;
SvxAuthorField aAuthorField( *pAuthorField );
- for( USHORT i = 0; i < 4; i++ )
+ for( sal_uInt16 i = 0; i < 4; i++ )
{
aAuthorField.SetFormat( (SvxAuthorFormat) i );
aLbFormat.InsertEntry( aAuthorField.GetFormatted() );
}
- aLbFormat.SelectEntryPos( (USHORT) ( pAuthorField->GetFormat() ) );
+ aLbFormat.SelectEntryPos( (sal_uInt16) ( pAuthorField->GetFormat() ) );
}
@@ -322,7 +322,7 @@ void SdModifyFieldDlg::FillControls()
aRbtVar.SaveValue();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET == maInputSet.GetItemState(EE_CHAR_LANGUAGE, sal_True, &pItem ) )
maLbLanguage.SelectLanguage( static_cast<const SvxLanguageItem*>(pItem)->GetLanguage() );
maLbLanguage.SaveValue();
diff --git a/sd/source/ui/dlg/dlgfield.src b/sd/source/ui/dlg/dlgfield.src
index 5abcd9e8b9b7..cbd1ba56f7cd 100644
--- a/sd/source/ui/dlg/dlgfield.src
+++ b/sd/source/ui/dlg/dlgfield.src
@@ -28,6 +28,7 @@
#include "dlgfield.hrc"
ModalDialog DLG_FIELD_MODIFY
{
+ HelpID = "sd:ModalDialog:DLG_FIELD_MODIFY";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 138 , 154 ) ;
@@ -41,6 +42,7 @@ ModalDialog DLG_FIELD_MODIFY
};
RadioButton RBT_FIX
{
+ HelpID = "sd:RadioButton:DLG_FIELD_MODIFY:RBT_FIX";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 64 , 10 ) ;
TabStop = TRUE ;
@@ -48,6 +50,7 @@ ModalDialog DLG_FIELD_MODIFY
};
RadioButton RBT_VAR
{
+ HelpID = "sd:RadioButton:DLG_FIELD_MODIFY:RBT_VAR";
Pos = MAP_APPFONT ( 12 , 25 ) ;
Size = MAP_APPFONT ( 64 , 10 ) ;
TabStop = TRUE ;
@@ -62,6 +65,7 @@ ModalDialog DLG_FIELD_MODIFY
ListBox LB_LANGUAGE
{
+ HelpID = "sd:ListBox:DLG_FIELD_MODIFY:LB_LANGUAGE";
Border = TRUE ;
Pos = MAP_APPFONT ( 52 , 65 ) ;
Size = MAP_APPFONT ( 80 , 70 ) ;
@@ -71,6 +75,7 @@ ModalDialog DLG_FIELD_MODIFY
ListBox LB_FORMAT
{
+ HelpID = "sd:ListBox:DLG_FIELD_MODIFY:LB_FORMAT";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 94 ) ;
Size = MAP_APPFONT ( 126 , 54 ) ;
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 2e8cc80dfd7b..142073422fed 100644..100755
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -74,7 +74,7 @@ OutlineBulletDlg::OutlineBulletDlg(
::sd::View* pView )
: SfxTabDialog ( pParent, SdResId(TAB_OUTLINEBULLET) ),
aInputSet ( *pAttr ),
- bTitle ( FALSE ),
+ bTitle ( sal_False ),
pSdView ( pView )
{
FreeResource();
@@ -85,14 +85,14 @@ OutlineBulletDlg::OutlineBulletDlg(
pOutputSet = new SfxItemSet( *pAttr );
pOutputSet->ClearItem();
- BOOL bOutliner = FALSE;
+ sal_Bool bOutliner = sal_False;
// Sonderbehandlung wenn eine Title Objekt selektiert wurde
if( pView )
{
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
- const ULONG nCount = rMarkList.GetMarkCount();
- for(ULONG nNum = 0; nNum < nCount; nNum++)
+ const sal_uLong nCount = rMarkList.GetMarkCount();
+ for(sal_uLong nNum = 0; nNum < nCount; nNum++)
{
SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj();
if( pObj->GetObjInventor() == SdrInventor )
@@ -101,10 +101,10 @@ OutlineBulletDlg::OutlineBulletDlg(
switch(pObj->GetObjIdentifier())
{
case OBJ_TITLETEXT:
- bTitle = TRUE;
+ bTitle = sal_True;
break;
case OBJ_OUTLINETEXT:
- bOutliner = TRUE;
+ bOutliner = sal_True;
break;
}
}
@@ -121,7 +121,7 @@ OutlineBulletDlg::OutlineBulletDlg(
aStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " 1" ) );
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
if( pFirstStyleSheet )
- pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, FALSE, (const SfxPoolItem**)&pItem);
+ pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, sal_False, (const SfxPoolItem**)&pItem);
}
if( pItem == NULL )
@@ -133,7 +133,7 @@ OutlineBulletDlg::OutlineBulletDlg(
}
/* debug
- if( SFX_ITEM_SET == aInputSet.GetItemState(EE_PARA_NUMBULLET, FALSE, &pItem ))
+ if( SFX_ITEM_SET == aInputSet.GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem ))
{
SvxNumRule& rItem = *((SvxNumBulletItem*)pItem)->GetNumRule();
for( int i = 0; i < 9; i++ )
@@ -143,14 +143,14 @@ OutlineBulletDlg::OutlineBulletDlg(
}
*/
- if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET,TRUE) == SFX_ITEM_ON )
+ if(bTitle && aInputSet.GetItemState(EE_PARA_NUMBULLET,sal_True) == SFX_ITEM_ON )
{
- SvxNumBulletItem* pItem = (SvxNumBulletItem*)aInputSet.GetItem(EE_PARA_NUMBULLET,TRUE);
+ SvxNumBulletItem* pItem = (SvxNumBulletItem*)aInputSet.GetItem(EE_PARA_NUMBULLET,sal_True);
SvxNumRule* pRule = pItem->GetNumRule();
if(pRule)
{
SvxNumRule aNewRule( *pRule );
- aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, TRUE );
+ aNewRule.SetFeatureFlag( NUM_NO_NUMBERS, sal_True );
SvxNumBulletItem aNewItem( aNewRule, EE_PARA_NUMBULLET );
aInputSet.Put(aNewItem);
@@ -176,7 +176,7 @@ OutlineBulletDlg::~OutlineBulletDlg()
delete pOutputSet;
}
-void OutlineBulletDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void OutlineBulletDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
switch ( nId )
{
@@ -186,7 +186,7 @@ void OutlineBulletDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
{
FieldUnit eMetric = pSdView->GetDoc()->GetUIUnit();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(USHORT)eMetric));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric));
rPage.PageCreated(aSet);
}
}
@@ -197,7 +197,7 @@ void OutlineBulletDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
{
FieldUnit eMetric = pSdView->GetDoc()->GetUIUnit();
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(USHORT)eMetric));
+ aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric));
rPage.PageCreated(aSet);
}
}
@@ -211,7 +211,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
pOutputSet->Put( aSet );
const SfxPoolItem *pItem = NULL;
- if( SFX_ITEM_SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), FALSE, &pItem ))
+ if( SFX_ITEM_SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), sal_False, &pItem ))
{
SdBulletMapper::MapFontsInNumRule( *((SvxNumBulletItem*)pItem)->GetNumRule(), *pOutputSet );
@@ -225,12 +225,12 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
SdBulletMapper::PostMapNumBulletForDialog( *pOutputSet );
*/
- if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET,TRUE) == SFX_ITEM_ON )
+ if(bTitle && pOutputSet->GetItemState(EE_PARA_NUMBULLET,sal_True) == SFX_ITEM_ON )
{
- SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)pOutputSet->GetItem(EE_PARA_NUMBULLET,TRUE);
+ SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)pOutputSet->GetItem(EE_PARA_NUMBULLET,sal_True);
SvxNumRule* pRule = pBulletItem->GetNumRule();
if(pRule)
- pRule->SetFeatureFlag( NUM_NO_NUMBERS, FALSE );
+ pRule->SetFeatureFlag( NUM_NO_NUMBERS, sal_False );
}
return pOutputSet;
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index 68ea6c328a32..f09c6ea21db5 100644..100755
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -52,7 +52,7 @@
|*
\************************************************************************/
-SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, BOOL bAreaPage ) :
+SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, sal_Bool bAreaPage ) :
SfxTabDialog ( pParent, SdResId( TAB_PAGE ), pAttr ),
mrOutAttrs ( *pAttr ),
mpDocShell ( pDocSh )
@@ -87,15 +87,15 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet*
|*
\************************************************************************/
-void SdPageDlg::PageCreated(USHORT nId, SfxTabPage& rPage)
+void SdPageDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch(nId)
{
case RID_SVXPAGE_PAGE:
- aSet.Put (SfxAllEnumItem((const USHORT)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION));
- aSet.Put (SfxAllEnumItem((const USHORT)SID_PAPER_START, PAPER_A0));
- aSet.Put (SfxAllEnumItem((const USHORT)SID_PAPER_END, PAPER_E));
+ aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_ENUM_PAGE_MODE, SVX_PAGE_MODE_PRESENTATION));
+ aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_PAPER_START, PAPER_A0));
+ aSet.Put (SfxAllEnumItem((const sal_uInt16)SID_PAPER_END, PAPER_E));
rPage.PageCreated(aSet);
break;
case RID_SVXPAGE_AREA:
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index f454c64ca780..7f5807551f63 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -82,8 +82,8 @@ SdSnapLineDlg::SdSnapLineDlg(
aBtnDelete.SetClickHdl(LINK(this, SdSnapLineDlg, ClickHdl));
- SetFieldUnit( aMtrFldX, eUIUnit, TRUE );
- SetFieldUnit( aMtrFldY, eUIUnit, TRUE );
+ SetFieldUnit( aMtrFldX, eUIUnit, sal_True );
+ SetFieldUnit( aMtrFldY, eUIUnit, sal_True );
// WorkArea holen
Rectangle aWorkArea = pView->GetWorkArea();
@@ -146,9 +146,9 @@ SdSnapLineDlg::SdSnapLineDlg(
IMPL_LINK( SdSnapLineDlg, ClickHdl, Button *, pBtn )
{
- if ( pBtn == &aRbPoint ) SetInputFields(TRUE, TRUE);
- else if ( pBtn == &aRbHorz ) SetInputFields(FALSE, TRUE);
- else if ( pBtn == &aRbVert ) SetInputFields(TRUE, FALSE);
+ if ( pBtn == &aRbPoint ) SetInputFields(sal_True, sal_True);
+ else if ( pBtn == &aRbHorz ) SetInputFields(sal_False, sal_True);
+ else if ( pBtn == &aRbVert ) SetInputFields(sal_True, sal_False);
else if ( pBtn == &aBtnDelete ) EndDialog(RET_SNAP_DELETE);
return 0;
@@ -171,7 +171,7 @@ void SdSnapLineDlg::GetAttr(SfxItemSet& rOutAttrs)
nXValue = Fraction( GetCoreValue( aMtrFldX, SFX_MAPUNIT_100TH_MM) ) * aUIScale;
nYValue = Fraction( GetCoreValue( aMtrFldY, SFX_MAPUNIT_100TH_MM) ) * aUIScale;
- rOutAttrs.Put(SfxAllEnumItem(ATTR_SNAPLINE_KIND, (USHORT)eKind));
+ rOutAttrs.Put(SfxAllEnumItem(ATTR_SNAPLINE_KIND, (sal_uInt16)eKind));
rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_X, nXValue));
rOutAttrs.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, nYValue));
}
@@ -196,7 +196,7 @@ void SdSnapLineDlg::HideRadioGroup()
|*
\************************************************************************/
-void SdSnapLineDlg::SetInputFields(BOOL bEnableX, BOOL bEnableY)
+void SdSnapLineDlg::SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY)
{
if ( bEnableX )
{
diff --git a/sd/source/ui/dlg/dlgsnap.src b/sd/source/ui/dlg/dlgsnap.src
index bd69737f9a1c..45938c433092 100644
--- a/sd/source/ui/dlg/dlgsnap.src
+++ b/sd/source/ui/dlg/dlgsnap.src
@@ -28,9 +28,11 @@
#include "app.hrc"
#include "res_bmp.hrc"
#include "dlgsnap.hrc"
+#include "helpids.h"
+
ModalDialog DLG_SNAPLINE
{
- HelpID = SID_CAPTUREPOINT ;
+ HelpID = CMD_SID_CAPTUREPOINT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 140 , 125 ) ;
@@ -57,6 +59,7 @@ ModalDialog DLG_SNAPLINE
};
PushButton BTN_DELETE
{
+ HelpID = "sd:PushButton:DLG_SNAPLINE:BTN_DELETE";
Pos = MAP_APPFONT ( 88 , 63 ) ;
Size = MAP_APPFONT ( 46 , 14 ) ;
Text [ en-US ] = "~Delete" ;
@@ -76,6 +79,7 @@ ModalDialog DLG_SNAPLINE
};
MetricField MTR_FLD_X
{
+ HelpID = "sd:MetricField:DLG_SNAPLINE:MTR_FLD_X";
Border = TRUE ;
Pos = MAP_APPFONT ( 22 , 14 ) ;
Size = MAP_APPFONT ( 54 , 12 ) ;
@@ -99,6 +103,7 @@ ModalDialog DLG_SNAPLINE
};
MetricField MTR_FLD_Y
{
+ HelpID = "sd:MetricField:DLG_SNAPLINE:MTR_FLD_Y";
Border = TRUE ;
Pos = MAP_APPFONT ( 22 , 30 ) ;
Size = MAP_APPFONT ( 54 , 12 ) ;
@@ -122,6 +127,7 @@ ModalDialog DLG_SNAPLINE
};
ImageRadioButton RB_POINT
{
+ HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_POINT";
Pos = MAP_APPFONT ( 12 , 61 ) ;
Size = MAP_APPFONT ( 64 , 16 ) ;
Text [ en-US ] = "~Point" ;
@@ -134,6 +140,7 @@ ModalDialog DLG_SNAPLINE
};
ImageRadioButton RB_VERTICAL
{
+ HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_VERTICAL";
Pos = MAP_APPFONT ( 12 , 81 ) ;
Size = MAP_APPFONT ( 64 , 16 ) ;
Text [ en-US ] = "~Vertical" ;
@@ -146,6 +153,7 @@ ModalDialog DLG_SNAPLINE
};
ImageRadioButton RB_HORIZONTAL
{
+ HelpID = "sd:ImageRadioButton:DLG_SNAPLINE:RB_HORIZONTAL";
Pos = MAP_APPFONT ( 12 , 101 ) ;
Size = MAP_APPFONT ( 65 , 16 ) ;
Text [ en-US ] = "Hori~zontal" ;
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index f444f6f27b7a..0da01ad2ac54 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -73,7 +73,7 @@ void SdDocPreviewWin::SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage
}
SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId )
-: Control(pParent, rResId), pMetaFile( 0 ), bInEffect(FALSE), mpObj(NULL), mnShowPage(0)
+: Control(pParent, rResId), pMetaFile( 0 ), bInEffect(sal_False), mpObj(NULL), mnShowPage(0)
{
SetBorderStyle( WINDOW_BORDER_MONO );
svtools::ColorConfig aColorConfig;
@@ -106,13 +106,13 @@ void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rP
if (dRatio>dRatioPreV)
{
- rSize=Size(nWidth, (USHORT)(nWidth/dRatio));
- rPoint=Point( 0, (USHORT)((nHeight-rSize.Height())/2));
+ rSize=Size(nWidth, (sal_uInt16)(nWidth/dRatio));
+ rPoint=Point( 0, (sal_uInt16)((nHeight-rSize.Height())/2));
}
else
{
- rSize=Size((USHORT)(nHeight*dRatio), nHeight);
- rPoint=Point((USHORT)((nWidth-rSize.Width())/2),0);
+ rSize=Size((sal_uInt16)(nHeight*dRatio), nHeight);
+ rPoint=Point((sal_uInt16)((nWidth-rSize.Width())/2),0);
}
}
@@ -239,7 +239,7 @@ void SdDocPreviewWin::updateViewSettings()
aVDev.SetMapMode( aMap );
// Disable output, as we only want to record a metafile
- aVDev.EnableOutput( FALSE );
+ aVDev.EnableOutput( sal_False );
pMtf->Record( &aVDev );
@@ -248,8 +248,8 @@ void SdDocPreviewWin::updateViewSettings()
const Size aSize( pPage->GetSize() );
- pView->SetBordVisible( FALSE );
- pView->SetPageVisible( FALSE );
+ pView->SetBordVisible( sal_False );
+ pView->SetPageVisible( sal_False );
pView->ShowSdrPage( pPage );
const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index a5170f33842b..a27ce2178f2c 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -75,9 +75,9 @@ private:
css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess;
css::uno::Reference< css::media::XPlayer > mxPlayer;
- ULONG mnPlaySoundEvent;
- BOOL mbUsableSelection;
- BOOL mbLabelPlaying;
+ sal_uLong mnPlaySoundEvent;
+ sal_Bool mbUsableSelection;
+ sal_Bool mbLabelPlaying;
void CheckSelectionState();
@@ -140,7 +140,7 @@ IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG )
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
String( SdResId( STR_PLAY ) ) );
- mbLabelPlaying = FALSE;
+ mbLabelPlaying = sal_False;
}
catch( css::lang::IllegalArgumentException )
{
@@ -174,7 +174,7 @@ IMPL_LINK( SdFileDialog_Imp, PlayMusicHdl, void *, EMPTYARG )
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
String( SdResId( STR_STOP ) ) );
- mbLabelPlaying = TRUE;
+ mbLabelPlaying = sal_True;
}
catch( css::lang::IllegalArgumentException )
{
@@ -210,7 +210,7 @@ IMPL_LINK( SdFileDialog_Imp, IsMusicStoppedHdl, void *, EMPTYARG )
{
mxControlAccess->setLabel( css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY,
String( SdResId( STR_PLAY ) ) );
- mbLabelPlaying = FALSE;
+ mbLabelPlaying = sal_False;
}
catch( css::lang::IllegalArgumentException )
{
@@ -233,9 +233,9 @@ void SdFileDialog_Imp::CheckSelectionState()
try
{
if( !aCurrFilter.Len() || ( aCurrFilter == String( SdResId( STR_EXPORT_HTML_NAME ) ) ) )
- mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, FALSE );
+ mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_False );
else
- mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, TRUE );
+ mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_True );
}
catch( css::lang::IllegalArgumentException )
{
@@ -252,7 +252,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType,
FileDialogHelper( nDialogType, 0 ),
mnPlaySoundEvent( 0 ),
mbUsableSelection( bUsableSelection ),
- mbLabelPlaying(FALSE)
+ mbLabelPlaying(sal_False)
{
maUpdateTimer.SetTimeoutHdl(LINK(this, SdFileDialog_Imp, IsMusicStoppedHdl));
@@ -282,7 +282,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType,
{
try
{
- mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, FALSE );
+ mxControlAccess->enableControl( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, sal_False );
}
catch( css::lang::IllegalArgumentException )
{
diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx
index e5f837431edc..e4e62cc8be13 100644..100755
--- a/sd/source/ui/dlg/gluectrl.cxx
+++ b/sd/source/ui/dlg/gluectrl.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star::frame;
// z.Z. werden von Joe nur die u.a. Moeglichkeiten unterstuetzt
#define ESCDIR_COUNT 5
-static UINT16 aEscDirArray[] =
+static sal_uInt16 aEscDirArray[] =
{
SDRESC_SMART,
SDRESC_LEFT,
@@ -108,7 +108,7 @@ GlueEscDirLB::~GlueEscDirLB()
void GlueEscDirLB::Select()
{
- UINT16 nPos = GetSelectEntryPos();
+ sal_uInt16 nPos = GetSelectEntryPos();
SfxUInt16Item aItem( SID_GLUE_ESCDIR, aEscDirArray[ nPos ] );
if ( m_xFrame.is() )
@@ -159,7 +159,7 @@ void GlueEscDirLB::Fill()
\************************************************************************/
SdTbxCtlGlueEscDir::SdTbxCtlGlueEscDir(
- USHORT nSlotId, USHORT nId, ToolBox& rTbx ) :
+ sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
SfxToolBoxControl( nSlotId, nId, rTbx )
{
}
@@ -170,7 +170,7 @@ SdTbxCtlGlueEscDir::SdTbxCtlGlueEscDir(
|*
\************************************************************************/
-void SdTbxCtlGlueEscDir::StateChanged( USHORT nSId,
+void SdTbxCtlGlueEscDir::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pState )
{
if( eState == SFX_ITEM_AVAILABLE )
@@ -188,7 +188,7 @@ void SdTbxCtlGlueEscDir::StateChanged( USHORT nSId,
}
else
{
- UINT16 nEscDir = ( (const SfxUInt16Item*) pState )->GetValue();
+ sal_uInt16 nEscDir = ( (const SfxUInt16Item*) pState )->GetValue();
pGlueEscDirLB->SelectEntryPos( GetEscDirPos( nEscDir ) );
}
}
@@ -220,9 +220,9 @@ Window* SdTbxCtlGlueEscDir::CreateItemWindow( Window *pParent )
|*
\************************************************************************/
-UINT16 SdTbxCtlGlueEscDir::GetEscDirPos( UINT16 nEscDir )
+sal_uInt16 SdTbxCtlGlueEscDir::GetEscDirPos( sal_uInt16 nEscDir )
{
- for( UINT16 i = 0; i < ESCDIR_COUNT; i++ )
+ for( sal_uInt16 i = 0; i < ESCDIR_COUNT; i++ )
{
if( aEscDirArray[ i ] == nEscDir )
return( i );
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 1e888d137e6f..37663bcee34b 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -187,7 +187,7 @@ public:
~HeaderFooterTabPage();
static SfxTabPage* Create( ::Window*, const SfxItemSet& );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
void init( const HeaderFooterSettings& rSettings, bool bNotOnTitle, bool bHasApply );
void getData( HeaderFooterSettings& rSettings, bool& rNotOnTitle );
@@ -288,7 +288,7 @@ HeaderFooterDialog::~HeaderFooterDialog()
IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
- const USHORT nId = pTabCtrl->GetCurPageId();
+ const sal_uInt16 nId = pTabCtrl->GetCurPageId();
TabPage* pTabPage = pTabCtrl->GetTabPage( nId );
pTabPage->Show();
@@ -299,14 +299,14 @@ IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl )
IMPL_LINK( HeaderFooterDialog, DeactivatePageHdl, TabControl *, EMPTYARG )
{
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
short HeaderFooterDialog::Execute()
{
- USHORT nRet = TabDialog::Execute();
+ sal_uInt16 nRet = TabDialog::Execute();
if( nRet )
mpViewShell->GetDocSh()->SetModified();
return nRet;
@@ -361,7 +361,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
int nPage;
for( nPage = 0; nPage < nPageCount; nPage++ )
{
- SdPage* pPage = mpDoc->GetSdPage( (USHORT)nPage, PK_STANDARD );
+ SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PK_STANDARD );
change( pUndoGroup, pPage, aNewSettings );
}
}
@@ -402,7 +402,7 @@ void HeaderFooterDialog::apply( bool bToAll, bool bForceSlides )
int nPage;
for( nPage = 0; nPage < nPageCount; nPage++ )
{
- SdPage* pPage = mpDoc->GetSdPage( (USHORT)nPage, PK_NOTES );
+ SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PK_NOTES );
change( pUndoGroup, pPage, aNewSettings );
}
@@ -539,6 +539,19 @@ HeaderFooterTabPage::HeaderFooterTabPage( HeaderFooterDialog* pDialog, ::Window*
FillFormatList(SVXDATEFORMAT_A);
+ maTBHeader.SetAccessibleRelationMemberOf(&maCBHeader);
+ maRBDateTimeFixed.SetAccessibleRelationMemberOf(&maCBDateTime);
+ maRBDateTimeAutomatic.SetAccessibleRelationMemberOf(&maCBDateTime);
+ maTBDateTimeFixed.SetAccessibleName(maRBDateTimeFixed.GetText());
+ maTBDateTimeFixed.SetAccessibleRelationMemberOf(&maCBDateTime);
+ maTBDateTimeFixed.SetAccessibleRelationLabeledBy(&maRBDateTimeFixed);
+ maCBDateTimeFormat.SetAccessibleRelationMemberOf(&maCBDateTime);
+ maCBDateTimeFormat.SetAccessibleName(maRBDateTimeAutomatic.GetText());
+ maCBDateTimeFormat.SetAccessibleRelationLabeledBy(&maRBDateTimeAutomatic);
+ maCBDateTimeLanguage.SetAccessibleRelationMemberOf(&maCBDateTime);
+ maTBFooter.SetAccessibleRelationMemberOf(&maCBFooter);
+ maCBSlideNumber.SetAccessibleRelationMemberOf(&maFLIncludeOnPage);
+ maCBFooter.SetAccessibleRelationMemberOf(&maFLIncludeOnPage);
}
// -----------------------------------------------------------------------
@@ -571,7 +584,7 @@ void HeaderFooterTabPage::FillFormatList( int eFormat )
for( nFormat = 0; nFormat < nDateTimeFormatsCount; nFormat++ )
{
String aStr( SvxDateTimeField::GetFormatted( aDate, aTime, nDateTimeFormats[nFormat], *(SD_MOD()->GetNumberFormatter()), eLanguage ) );
- USHORT nEntry = maCBDateTimeFormat.InsertEntry( aStr );
+ sal_uInt16 nEntry = maCBDateTimeFormat.InsertEntry( aStr );
maCBDateTimeFormat.SetEntryData( nEntry, (void*)(sal_IntPtr)nDateTimeFormats[nFormat] );
if( nDateTimeFormats[nFormat] == eFormat )
{
@@ -603,7 +616,7 @@ void HeaderFooterTabPage::init( const HeaderFooterSettings& rSettings, bool bNot
maCBDateTimeLanguage.SelectLanguage( meOldLanguage );
- USHORT nPos;
+ sal_uInt16 nPos;
for( nPos = 0; nPos < maCBDateTimeFormat.GetEntryCount(); nPos++ )
{
int nFormat = (int)(sal_IntPtr)maCBDateTimeFormat.GetEntryData( nPos );
@@ -706,8 +719,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
// if set, set it on all notes master pages
if( bSet )
{
- USHORT nPageCount = mpDoc->GetMasterSdPageCount( PK_NOTES );
- USHORT nPage;
+ sal_uInt16 nPageCount = mpDoc->GetMasterSdPageCount( PK_NOTES );
+ sal_uInt16 nPage;
for( nPage = 0; nPage < nPageCount; nPage++ )
{
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( nPage, PK_NOTES ) );
@@ -721,8 +734,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
{
// get the language from the first master page
// or set it to all master pages
- USHORT nPageCount = bSet ? mpDoc->GetMasterSdPageCount( PK_NOTES ) : 1;
- USHORT nPage;
+ sal_uInt16 nPageCount = bSet ? mpDoc->GetMasterSdPageCount( PK_NOTES ) : 1;
+ sal_uInt16 nPage;
for( nPage = 0; nPage < nPageCount; nPage++ )
{
GetOrSetDateTimeLanguage( rLanguage, bSet, mpDoc->GetMasterSdPage( nPage, PK_STANDARD ) );
@@ -741,7 +754,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
{
Outliner* pOutl = mpDoc->GetInternalOutliner();
pOutl->Init( OUTLINERMODE_TEXTOBJECT );
- USHORT nOutlMode = pOutl->GetMode();
+ sal_uInt16 nOutlMode = pOutl->GetMode();
EditEngine* pEdit = const_cast< EditEngine* >(&pOutl->GetEditEngine());
@@ -752,12 +765,12 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
EFieldInfo aFieldInfo;
aFieldInfo.pFieldItem = NULL;
- USHORT nParaCount = pEdit->GetParagraphCount();
- USHORT nPara;
+ sal_uInt16 nParaCount = pEdit->GetParagraphCount();
+ sal_uInt16 nPara;
for( nPara = 0; (nPara < nParaCount) && (aFieldInfo.pFieldItem == NULL); nPara++ )
{
- USHORT nFieldCount = pEdit->GetFieldCount( nPara );
- USHORT nField;
+ sal_uInt16 nFieldCount = pEdit->GetFieldCount( nPara );
+ sal_uInt16 nField;
for( nField = 0; (nField < nFieldCount) && (aFieldInfo.pFieldItem == NULL); nField++ )
{
aFieldInfo = pEdit->GetFieldInfo( nPara, nField );
diff --git a/sd/source/ui/dlg/headerfooterdlg.src b/sd/source/ui/dlg/headerfooterdlg.src
index df42ff9b7551..6dccc1cf2b6a 100644
--- a/sd/source/ui/dlg/headerfooterdlg.src
+++ b/sd/source/ui/dlg/headerfooterdlg.src
@@ -103,6 +103,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
CheckBox CB_HEADER
{
+ HelpID = "sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_HEADER";
Pos = MAP_APPFONT ( C1, Y1 );
Size = MAP_APPFONT ( W1 - C1, RSC_CD_CHECKBOX_HEIGHT );
TabStop = TRUE ;
@@ -119,6 +120,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
Edit TB_HEADER_FIXED
{
+ HelpID = "sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_HEADER_FIXED";
Pos = MAP_APPFONT ( C4, Y1 + SPACE_Y + RSC_CD_CHECKBOX_HEIGHT );
Size = MAP_APPFONT ( W3, RSC_CD_TEXTBOX_HEIGHT );
TabStop = TRUE ;
@@ -135,6 +137,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
CheckBox CB_DATETIME
{
+ HelpID = "sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME";
Pos = MAP_APPFONT ( C1, Y2 + SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT );
Size = MAP_APPFONT ( W1 - C1, RSC_CD_CHECKBOX_HEIGHT );
TabStop = TRUE ;
@@ -143,6 +146,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
RadioButton RB_DATETIME_FIXED
{
+ HelpID = "sd:RadioButton:RID_SD_TABPAGE_HEADERFOOTER:RB_DATETIME_FIXED";
Pos = MAP_APPFONT ( C2, Y2 + 2 * SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_CD_CHECKBOX_HEIGHT + 1 );
Size = MAP_APPFONT ( W2, RSC_CD_RADIOBUTTON_HEIGHT );
TabStop = TRUE ;
@@ -151,6 +155,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
Edit TB_DATETIME_FIXED
{
+ HelpID = "sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_DATETIME_FIXED";
Pos = MAP_APPFONT ( C4, Y2 + 2 * SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_CD_CHECKBOX_HEIGHT );
Size = MAP_APPFONT ( W3, RSC_CD_TEXTBOX_HEIGHT );
TabStop = TRUE ;
@@ -159,6 +164,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
RadioButton RB_DATETIME_AUTOMATIC
{
+ HelpID = "sd:RadioButton:RID_SD_TABPAGE_HEADERFOOTER:RB_DATETIME_AUTOMATIC";
Pos = MAP_APPFONT ( C2, Y2 + 3 * SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_CD_CHECKBOX_HEIGHT + RSC_CD_TEXTBOX_HEIGHT );
Size = MAP_APPFONT ( 80, RSC_CD_RADIOBUTTON_HEIGHT );
TabStop = TRUE ;
@@ -167,6 +173,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
ListBox CB_DATETIME_FORMAT
{
+ HelpID = "sd:ListBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME_FORMAT";
Pos = MAP_APPFONT ( C3, Y2 + 4 * SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_CD_CHECKBOX_HEIGHT + RSC_CD_TEXTBOX_HEIGHT + RSC_CD_RADIOBUTTON_HEIGHT );
Size = MAP_APPFONT ( W4, 80 );
TabStop = TRUE ;
@@ -183,6 +190,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
ListBox CB_DATETIME_LANGUAGE
{
+ HelpID = "sd:ListBox:RID_SD_TABPAGE_HEADERFOOTER:CB_DATETIME_LANGUAGE";
Pos = MAP_APPFONT ( C3 + W4 + SPACE_X, Y2 + 4 * SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_CD_CHECKBOX_HEIGHT + RSC_CD_TEXTBOX_HEIGHT + RSC_CD_RADIOBUTTON_HEIGHT );
Size = MAP_APPFONT ( W4, 80 );
TabStop = TRUE ;
@@ -199,6 +207,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
CheckBox CB_FOOTER
{
+ HelpID = "sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_FOOTER";
Pos = MAP_APPFONT ( C1, Y3 + SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT );
Size = MAP_APPFONT ( W1 - C1, RSC_CD_CHECKBOX_HEIGHT );
TabStop = TRUE ;
@@ -215,6 +224,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
Edit TB_FOOTER_FIXED
{
+ HelpID = "sd:Edit:RID_SD_TABPAGE_HEADERFOOTER:TB_FOOTER_FIXED";
Pos = MAP_APPFONT ( C4, Y3 + 2 * SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT + RSC_CD_CHECKBOX_HEIGHT );
Size = MAP_APPFONT ( W3, RSC_CD_TEXTBOX_HEIGHT );
TabStop = TRUE ;
@@ -231,6 +241,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
CheckBox CB_SLIDENUMBER
{
+ HelpID = "sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_SLIDENUMBER";
Pos = MAP_APPFONT ( C1, Y4 + SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT );
Size = MAP_APPFONT ( W1 - C1, RSC_CD_CHECKBOX_HEIGHT );
TabStop = TRUE ;
@@ -247,6 +258,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
CheckBox CB_NOTONTITLE
{
+ HelpID = "sd:CheckBox:RID_SD_TABPAGE_HEADERFOOTER:CB_NOTONTITLE";
Pos = MAP_APPFONT ( RSC_SP_TBPG_INNERBORDER_LEFT, Y5 + SPACE_Y + RSC_CD_FIXEDLINE_HEIGHT );
Size = MAP_APPFONT ( W1 - RSC_SP_TBPG_INNERBORDER_LEFT, RSC_CD_CHECKBOX_HEIGHT );
TabStop = TRUE ;
@@ -255,6 +267,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
PushButton BT_APPLYTOALL
{
+ HelpID = "sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLYTOALL";
Pos = MAP_APPFONT ( TAB_WIDTH - 7 * SPACE_X - PUSHBUTTON_WIDTH, RSC_SP_TBPG_INNERBORDER_TOP );
Size = MAP_APPFONT ( PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
TabStop = TRUE ;
@@ -263,6 +276,7 @@ TabPage RID_SD_TABPAGE_HEADERFOOTER
PushButton BT_APPLY
{
+ HelpID = "sd:PushButton:RID_SD_TABPAGE_HEADERFOOTER:BT_APPLY";
Pos = MAP_APPFONT ( TAB_WIDTH - 7 * SPACE_X - PUSHBUTTON_WIDTH, RSC_SP_TBPG_INNERBORDER_TOP + RSC_CD_PUSHBUTTON_HEIGHT + SPACE_Y );
Size = MAP_APPFONT ( PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
TabStop = TRUE ;
diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx
index a6b080598eff..2fadfdaa826d 100644..100755
--- a/sd/source/ui/dlg/ins_paste.cxx
+++ b/sd/source/ui/dlg/ins_paste.cxx
@@ -50,7 +50,7 @@ SdInsertPasteDlg::SdInsertPasteDlg( Window* pWindow ) :
aBtnHelp( this, SdResId( BTN_HELP ) )
{
FreeResource();
- aRbAfter.Check( TRUE );
+ aRbAfter.Check( sal_True );
}
// -----------------------------------------------------------------------------
@@ -61,7 +61,7 @@ SdInsertPasteDlg::~SdInsertPasteDlg()
// -----------------------------------------------------------------------------
-BOOL SdInsertPasteDlg::IsInsertBefore() const
+sal_Bool SdInsertPasteDlg::IsInsertBefore() const
{
return( aRbBefore.IsChecked() );
}
diff --git a/sd/source/ui/dlg/ins_paste.src b/sd/source/ui/dlg/ins_paste.src
index 0b066f096f87..0668e26f1993 100644
--- a/sd/source/ui/dlg/ins_paste.src
+++ b/sd/source/ui/dlg/ins_paste.src
@@ -29,6 +29,7 @@
ModalDialog DLG_INSERT_PASTE
{
+ HelpID = "sd:ModalDialog:DLG_INSERT_PASTE";
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 148 , 90 ) ;
@@ -61,6 +62,7 @@ ModalDialog DLG_INSERT_PASTE
};
RadioButton RB_BEFORE
{
+ HelpID = "sd:RadioButton:DLG_INSERT_PASTE:RB_BEFORE";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 80, 10 ) ;
Text [ en-US ] = "~Before" ;
@@ -68,6 +70,7 @@ ModalDialog DLG_INSERT_PASTE
};
RadioButton RB_AFTER
{
+ HelpID = "sd:RadioButton:DLG_INSERT_PASTE:RB_AFTER";
Pos = MAP_APPFONT ( 12, 27 ) ;
Size = MAP_APPFONT ( 80, 10 ) ;
Text [ en-US ] = "A~fter" ;
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index 5aeb12f6834e..0b38e670225e 100644
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -114,7 +114,7 @@ void SdInsertPagesObjsDlg::Reset()
aLbTree.InsertEntry( rName, aImgText, aImgText );
}
- aCbxMasters.Check( TRUE );
+ aCbxMasters.Check( sal_True );
}
/*************************************************************************
@@ -125,7 +125,7 @@ void SdInsertPagesObjsDlg::Reset()
|*
\************************************************************************/
-List* SdInsertPagesObjsDlg::GetList( USHORT nType )
+List* SdInsertPagesObjsDlg::GetList( sal_uInt16 nType )
{
// Bei Draw-Dokumenten muss bei der Selektion des Dokumentes NULL
// zurueckgegeben werden
@@ -150,7 +150,7 @@ List* SdInsertPagesObjsDlg::GetList( USHORT nType )
|*
\************************************************************************/
-BOOL SdInsertPagesObjsDlg::IsLink()
+sal_Bool SdInsertPagesObjsDlg::IsLink()
{
return( aCbxLink.IsChecked() );
}
@@ -161,7 +161,7 @@ BOOL SdInsertPagesObjsDlg::IsLink()
|*
\************************************************************************/
-BOOL SdInsertPagesObjsDlg::IsRemoveUnnessesaryMasterPages() const
+sal_Bool SdInsertPagesObjsDlg::IsRemoveUnnessesaryMasterPages() const
{
return( aCbxMasters.IsChecked() );
}
diff --git a/sd/source/ui/dlg/inspagob.src b/sd/source/ui/dlg/inspagob.src
index 79bac5cb8cfc..8f0444752114 100644
--- a/sd/source/ui/dlg/inspagob.src
+++ b/sd/source/ui/dlg/inspagob.src
@@ -30,7 +30,7 @@
ModalDialog DLG_INSERT_PAGES_OBJS
{
- HelpID = DLG_INSERT_PAGES_OBJS ;
+ HelpID = HID_DLG_INSERT_PAGES_OBJS ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 200 , 128 ) ;
@@ -65,6 +65,7 @@ ModalDialog DLG_INSERT_PAGES_OBJS
};
CheckBox CBX_LINK
{
+ HelpID = "sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_LINK";
Pos = MAP_APPFONT ( 6 , 100 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
TabStop = TRUE ;
@@ -72,6 +73,7 @@ ModalDialog DLG_INSERT_PAGES_OBJS
};
CheckBox CBX_CHECK_MASTERS
{
+ HelpID = "sd:CheckBox:DLG_INSERT_PAGES_OBJS:CBX_CHECK_MASTERS";
Pos = MAP_APPFONT ( 6 , 114 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
TabStop = TRUE ;
diff --git a/sd/source/ui/dlg/layeroptionsdlg.src b/sd/source/ui/dlg/layeroptionsdlg.src
index cd50a810d3fd..ee6a4c6c19d1 100644
--- a/sd/source/ui/dlg/layeroptionsdlg.src
+++ b/sd/source/ui/dlg/layeroptionsdlg.src
@@ -27,10 +27,11 @@
#include "app.hrc"
#include "layeroptionsdlg.hrc"
+#include "helpids.h"
ModalDialog DLG_INSERT_LAYER
{
- HelpID = SID_INSERTLAYER ;
+ HelpID = CMD_SID_INSERTLAYER ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 200 , 172 ) ;
@@ -46,6 +47,7 @@ ModalDialog DLG_INSERT_LAYER
Edit EDT_NAME
{
+ HelpID = "sd:Edit:DLG_INSERT_LAYER:EDT_NAME";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 188 , 12 ) ;
@@ -61,6 +63,7 @@ ModalDialog DLG_INSERT_LAYER
Edit EDT_TITLE
{
+ HelpID = "sd:Edit:DLG_INSERT_LAYER:EDT_TITLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 43 ) ;
Size = MAP_APPFONT ( 188 , 12 ) ;
@@ -76,6 +79,7 @@ ModalDialog DLG_INSERT_LAYER
MultiLineEdit EDT_DESCRIPTION
{
+ HelpID = "sd:MultiLineEdit:DLG_INSERT_LAYER:EDT_DESCRIPTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 69 ) ;
Size = MAP_APPFONT ( 188 , 34 ) ;
@@ -86,6 +90,7 @@ ModalDialog DLG_INSERT_LAYER
CheckBox CBX_VISIBLE
{
+ HelpID = "sd:CheckBox:DLG_INSERT_LAYER:CBX_VISIBLE";
Pos = MAP_APPFONT ( 6 , 106 ) ;
Size = MAP_APPFONT ( 188 , 10 ) ;
Text [ en-US ] = "~Visible" ;
@@ -94,6 +99,7 @@ ModalDialog DLG_INSERT_LAYER
CheckBox CBX_PRINTABLE
{
+ HelpID = "sd:CheckBox:DLG_INSERT_LAYER:CBX_PRINTABLE";
Pos = MAP_APPFONT ( 6 , 119 ) ;
Size = MAP_APPFONT ( 188 , 10 ) ;
Text [ en-US ] = "~Printable" ;
@@ -102,6 +108,7 @@ ModalDialog DLG_INSERT_LAYER
CheckBox CBX_LOCKED
{
+ HelpID = "sd:CheckBox:DLG_INSERT_LAYER:CBX_LOCKED";
Pos = MAP_APPFONT ( 6 , 132 ) ;
Size = MAP_APPFONT ( 188 , 10 ) ;
Text [ en-US ] = "~Locked" ;
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index be9588ca3302..4b7ee911957a 100644..100755
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -73,7 +73,7 @@ MasterLayoutDialog::MasterLayoutDialog( Window* pParent, SdDrawDocument* pDoc, S
case PK_STANDARD:
{
// aTitle = String( SdResId( STR_MASTER_LAYOUT_TITLE ) );
- maCBHeader.Enable( FALSE );
+ maCBHeader.Enable( sal_False );
String aSlideNumberStr( SdResId( STR_SLIDE_NUMBER ) );
maCBPageNumber.SetText( aSlideNumberStr );
break;
@@ -167,7 +167,7 @@ void MasterLayoutDialog::remove( PresObjKind eKind )
if( bUndo )
mpDoc->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoDeleteObject(*pObject));
SdrObjList* pOL =pObject->GetObjList();
- UINT32 nOrdNum=pObject->GetOrdNumDirect();
+ sal_uInt32 nOrdNum=pObject->GetOrdNumDirect();
pOL->RemoveObject(nOrdNum);
if( !bUndo )
diff --git a/sd/source/ui/dlg/masterlayoutdlg.src b/sd/source/ui/dlg/masterlayoutdlg.src
index 1e862b63cec6..71cf192b5fd4 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.src
+++ b/sd/source/ui/dlg/masterlayoutdlg.src
@@ -31,6 +31,7 @@
ModalDialog RID_SD_DLG_MASTER_LAYOUT
{
+ HelpID = "sd:ModalDialog:RID_SD_DLG_MASTER_LAYOUT";
Size = MAP_APPFONT( 89 , 92 );
OutputSize = TRUE;
SVLook = TRUE;
@@ -46,6 +47,7 @@ ModalDialog RID_SD_DLG_MASTER_LAYOUT
CheckBox CB_HEADER
{
+ HelpID = "sd:CheckBox:RID_SD_DLG_MASTER_LAYOUT:CB_HEADER";
Pos = MAP_APPFONT( 6, 16 );
Size = MAP_APPFONT( 134 , 10 );
TabStop = TRUE;
@@ -55,6 +57,7 @@ ModalDialog RID_SD_DLG_MASTER_LAYOUT
CheckBox CB_DATE
{
+ HelpID = "sd:CheckBox:RID_SD_DLG_MASTER_LAYOUT:CB_DATE";
Pos = MAP_APPFONT( 6, 29 );
Size = MAP_APPFONT( 134 , 10 );
TabStop = TRUE;
@@ -64,6 +67,7 @@ ModalDialog RID_SD_DLG_MASTER_LAYOUT
CheckBox CB_FOOTER
{
+ HelpID = "sd:CheckBox:RID_SD_DLG_MASTER_LAYOUT:CB_FOOTER";
Pos = MAP_APPFONT( 6, 42 );
Size = MAP_APPFONT( 134 , 10 );
TabStop = TRUE;
@@ -73,6 +77,7 @@ ModalDialog RID_SD_DLG_MASTER_LAYOUT
CheckBox CB_PAGE_NUMBER
{
+ HelpID = "sd:CheckBox:RID_SD_DLG_MASTER_LAYOUT:CB_PAGE_NUMBER";
Pos = MAP_APPFONT( 6, 55 );
Size = MAP_APPFONT( 134 , 10 );
TabStop = TRUE;
diff --git a/sd/source/ui/dlg/morphdlg.cxx b/sd/source/ui/dlg/morphdlg.cxx
index 1e3a1c8c9205..bf618ce7671a 100644..100755
--- a/sd/source/ui/dlg/morphdlg.cxx
+++ b/sd/source/ui/dlg/morphdlg.cxx
@@ -98,8 +98,8 @@ void MorphDlg::LoadSettings()
SvStorageStreamRef xIStm( SD_MOD()->GetOptionStream( UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( SD_OPTION_MORPHING ) ),
SD_OPTION_LOAD ) );
- UINT16 nSteps;
- BOOL bOrient, bAttrib;
+ sal_uInt16 nSteps;
+ sal_Bool bOrient, bAttrib;
if( xIStm.Is() )
{
@@ -110,7 +110,7 @@ void MorphDlg::LoadSettings()
else
{
nSteps = 16;
- bOrient = bAttrib = TRUE;
+ bOrient = bAttrib = sal_True;
}
aMtfSteps.SetValue( nSteps );
@@ -130,7 +130,7 @@ void MorphDlg::SaveSettings() const
{
SdIOCompat aCompat( *xOStm, STREAM_WRITE, 1 );
- *xOStm << (UINT16) aMtfSteps.GetValue()
+ *xOStm << (sal_uInt16) aMtfSteps.GetValue()
<< aCbxOrientation.IsChecked()
<< aCbxAttributes.IsChecked();
}
diff --git a/sd/source/ui/dlg/morphdlg.src b/sd/source/ui/dlg/morphdlg.src
index 8cd77428aba3..24ccb096199c 100644
--- a/sd/source/ui/dlg/morphdlg.src
+++ b/sd/source/ui/dlg/morphdlg.src
@@ -27,6 +27,8 @@
#include "app.hrc"
#include "morphdlg.hrc"
+#include "helpids.h"
+
/******************************************************************************
|*
|*
@@ -34,7 +36,8 @@
\******************************************************************************/
ModalDialog DLG_MORPH
{
- HelpID = SID_POLYGON_MORPHING ;
+ HelpID = CMD_SID_POLYGON_MORPHING ;
+ HelpID = ".uno:Morphing" ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 196 , 68 ) ;
@@ -73,6 +76,7 @@ ModalDialog DLG_MORPH
};
MetricField MTF_STEPS
{
+ HelpID = "sd:MetricField:DLG_MORPH:MTF_STEPS";
Border = TRUE ;
Pos = MAP_APPFONT ( 56 , 14 ) ;
Size = MAP_APPFONT ( 30 , 12 ) ;
@@ -86,6 +90,7 @@ ModalDialog DLG_MORPH
};
CheckBox CBX_ATTRIBUTES
{
+ HelpID = "sd:CheckBox:DLG_MORPH:CBX_ATTRIBUTES";
Pos = MAP_APPFONT ( 12 , 29 ) ;
Size = MAP_APPFONT ( 121 , 12 ) ;
TabStop = TRUE ;
@@ -93,6 +98,7 @@ ModalDialog DLG_MORPH
};
CheckBox CBX_ORIENTATION
{
+ HelpID = "sd:CheckBox:DLG_MORPH:CBX_ORIENTATION";
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 121 , 12 ) ;
TabStop = TRUE ;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 2c6ba75c9af7..5f461a5885f0 100644..100755
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -45,6 +45,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/dockwin.hxx>
+#include <sfx2/sfxresid.hxx>
#include "pres.hxx"
#include "navigatr.hxx"
@@ -82,7 +83,7 @@ SdNavigatorWin::SdNavigatorWin(
, maTlbObjects( this, SdResId( TLB_OBJECTS ) )
, maLbDocs ( this, SdResId( LB_DOCS ) )
, mpChildWinContext( pChWinCtxt )
-, mbDocImported ( FALSE )
+, mbDocImported ( sal_False )
// Bei Aenderung des DragTypes: SelectionMode der TLB anpassen!
, meDragType ( NAVIGATOR_DRAGTYPE_EMBEDDED )
, mpBindings ( pInBindings )
@@ -92,6 +93,8 @@ SdNavigatorWin::SdNavigatorWin(
FreeResource();
+ maTlbObjects.SetAccessibleName(String(SdResId(STR_OBJECTS_TREE)));
+
mpNavigatorCtrlItem = new SdNavigatorControllerItem( SID_NAVIGATOR_STATE, this, mpBindings );
mpPageNameCtrlItem = new SdPageNameControllerItem( SID_NAVIGATOR_PAGENAME, this, mpBindings );
mpDocList = new List();
@@ -141,7 +144,7 @@ SdNavigatorWin::SdNavigatorWin(
((SfxDockingWindow*)GetParent())->SetMinOutputSizePixel( maMinSize );
// InitTlb; Wird ueber Slot initiiert
- SfxBoolItem aItem( SID_NAVIGATOR_INIT, TRUE );
+ SfxBoolItem aItem( SID_NAVIGATOR_INIT, sal_True );
mpBindings->GetDispatcher()->Execute(
SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -157,7 +160,7 @@ SdNavigatorWin::~SdNavigatorWin()
// Liste der DocInfos loeschen
long nCount = mpDocList->Count();
while( nCount-- )
- delete (NavDocInfo*) mpDocList->Remove( (ULONG)0 );
+ delete (NavDocInfo*) mpDocList->Remove( (sal_uLong)0 );
delete mpDocList;
}
@@ -183,7 +186,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
// Disable the shape filter drop down menu when there is a running slide
// show.
if (pViewShell!=NULL && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ))
- maToolbox.EnableItem(TBI_SHAPE_FILTER, FALSE);
+ maToolbox.EnableItem(TBI_SHAPE_FILTER, sal_False);
else
maToolbox.EnableItem(TBI_SHAPE_FILTER);
@@ -191,7 +194,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
{
String aDocName = pDocShell->GetMedium()->GetName();
maTlbObjects.Clear();
- maTlbObjects.Fill( pDoc, (BOOL) FALSE, aDocName ); // Nur normale Seiten
+ maTlbObjects.Fill( pDoc, (sal_Bool) sal_False, aDocName ); // Nur normale Seiten
RefreshDocumentLB();
maLbDocs.SelectEntry( aDocShName );
@@ -211,7 +214,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
SfxViewFrame* pViewFrame = ( ( pViewShell && pViewShell->GetViewFrame() ) ? pViewShell->GetViewFrame() : SfxViewFrame::Current() );
if( pViewFrame )
- pViewFrame->GetBindings().Invalidate(SID_NAVIGATOR_PAGENAME, TRUE, TRUE);
+ pViewFrame->GetBindings().Invalidate(SID_NAVIGATOR_PAGENAME, sal_True, sal_True);
}
/*************************************************************************
@@ -238,8 +241,8 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
IMPL_LINK( SdNavigatorWin, SelectToolboxHdl, void *, EMPTYARG )
{
- USHORT nId = maToolbox.GetCurItemId();
- USHORT nSId = 0;
+ sal_uInt16 nId = maToolbox.GetCurItemId();
+ sal_uInt16 nSId = 0;
PageJump ePage = PAGE_NONE;
switch( nId )
@@ -253,7 +256,7 @@ IMPL_LINK( SdNavigatorWin, SelectToolboxHdl, void *, EMPTYARG )
if( nSId > 0 )
{
- SfxBoolItem aItem( nSId, TRUE );
+ SfxBoolItem aItem( nSId, sal_True );
mpBindings->GetDispatcher()->Execute(
nSId, SFX_CALLMODE_SLOT |SFX_CALLMODE_RECORD, &aItem, 0L );
}
@@ -276,7 +279,7 @@ IMPL_LINK( SdNavigatorWin, SelectToolboxHdl, void *, EMPTYARG )
if( ePage != PAGE_NONE )
{
- SfxUInt16Item aItem( SID_NAVIGATOR_PAGE, (UINT16)ePage );
+ SfxUInt16Item aItem( SID_NAVIGATOR_PAGE, (sal_uInt16)ePage );
mpBindings->GetDispatcher()->Execute(
SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L );
}
@@ -298,7 +301,7 @@ IMPL_LINK( SdNavigatorWin, ClickToolboxHdl, ToolBox*, EMPTYARG )
IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox )
{
- USHORT nId = maToolbox.GetCurItemId();
+ sal_uInt16 nId = maToolbox.GetCurItemId();
switch( nId )
{
@@ -308,16 +311,24 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox )
// gespeichert ist oder nicht
PopupMenu *pMenu = new PopupMenu;
- for( USHORT nID = NAVIGATOR_DRAGTYPE_URL;
+ static const char* aHIDs[] =
+ {
+ HID_SD_NAVIGATOR_MENU1,
+ HID_SD_NAVIGATOR_MENU2,
+ HID_SD_NAVIGATOR_MENU3,
+ 0
+ };
+
+ for( sal_uInt16 nID = NAVIGATOR_DRAGTYPE_URL;
nID < NAVIGATOR_DRAGTYPE_COUNT;
nID++ )
{
- USHORT nRId = GetDragTypeSdResId( (NavigatorDragType)nID );
+ sal_uInt16 nRId = GetDragTypeSdResId( (NavigatorDragType)nID );
if( nRId > 0 )
{
+ DBG_ASSERT(aHIDs[nID-NAVIGATOR_DRAGTYPE_URL],"HelpId not added!");
pMenu->InsertItem( nID, String( SdResId( nRId ) ) );
- pMenu->SetHelpId( nID, HID_SD_NAVIGATOR_MENU1 +
- nID - NAVIGATOR_DRAGTYPE_URL );
+ pMenu->SetHelpId( nID, aHIDs[nID - NAVIGATOR_DRAGTYPE_URL] );
}
}
@@ -325,18 +336,17 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox )
if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects.IsLinkableSelected() )
{
- pMenu->EnableItem( NAVIGATOR_DRAGTYPE_LINK, FALSE );
- pMenu->EnableItem( NAVIGATOR_DRAGTYPE_URL, FALSE );
+ pMenu->EnableItem( NAVIGATOR_DRAGTYPE_LINK, sal_False );
+ pMenu->EnableItem( NAVIGATOR_DRAGTYPE_URL, sal_False );
meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED;
}
- pMenu->CheckItem( (UINT16)meDragType );
+ pMenu->CheckItem( (sal_uInt16)meDragType );
pMenu->SetSelectHdl( LINK( this, SdNavigatorWin, MenuSelectHdl ) );
pMenu->Execute( this, maToolbox.GetItemRect( nId ), POPUPMENU_EXECUTE_DOWN );
pBox->EndSelection();
delete pMenu;
- //pBox->Invalidate();
}
break;
@@ -409,7 +419,7 @@ IMPL_LINK( SdNavigatorWin, SelectDocumentHdl, void *, EMPTYARG )
{
String aStrLb = maLbDocs.GetSelectEntry();
long nPos = maLbDocs.GetSelectEntryPos();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
::sd::DrawDocShell* pDocShell = NULL;
NavDocInfo* pInfo = GetDocInfo();
@@ -423,7 +433,7 @@ IMPL_LINK( SdNavigatorWin, SelectDocumentHdl, void *, EMPTYARG )
{
pDocShell = pInfo->mpDocShell;
- bFound = TRUE;
+ bFound = sal_True;
}
if( bFound )
@@ -435,7 +445,7 @@ IMPL_LINK( SdNavigatorWin, SelectDocumentHdl, void *, EMPTYARG )
::sd::DrawDocShell* pNCDocShell = pNonConstDoc->GetDocSh();
String aDocName = pNCDocShell->GetMedium()->GetName();
maTlbObjects.Clear();
- maTlbObjects.Fill( pDoc, (BOOL) FALSE, aDocName ); // Nur normale Seiten
+ maTlbObjects.Fill( pDoc, (sal_Bool) sal_False, aDocName ); // Nur normale Seiten
}
}
@@ -458,7 +468,7 @@ IMPL_LINK( SdNavigatorWin, SelectDocumentHdl, void *, EMPTYARG )
IMPL_LINK( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu )
{
- USHORT nMenuId;
+ sal_uInt16 nMenuId;
if( pMenu )
nMenuId = pMenu->GetCurItemId();
else
@@ -476,7 +486,7 @@ IMPL_LINK( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu )
{
// Fix, um Endlosschleife zu unterbinden
if( maTlbObjects.GetSelectionCount() > 1 )
- maTlbObjects.SelectAll( FALSE );
+ maTlbObjects.SelectAll( sal_False );
maTlbObjects.SetSelectionMode( SINGLE_SELECTION );
}
@@ -495,7 +505,7 @@ IMPL_LINK( SdNavigatorWin, ShapeFilterCallback, Menu *, pMenu )
if (pMenu != NULL)
{
bool bShowAllShapes (maTlbObjects.GetShowAllShapes());
- USHORT nMenuId (pMenu->GetCurItemId());
+ sal_uInt16 nMenuId (pMenu->GetCurItemId());
switch (nMenuId)
{
case nShowNamedShapesFilter:
@@ -577,10 +587,10 @@ void SdNavigatorWin::Resize()
// -----------------------------------------------------------------------
-BOOL SdNavigatorWin::InsertFile(const String& rFileName)
+sal_Bool SdNavigatorWin::InsertFile(const String& rFileName)
{
INetURLObject aURL( rFileName );
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
{
@@ -609,9 +619,9 @@ BOOL SdNavigatorWin::InsertFile(const String& rFileName)
if (aFileName != maDropFileName)
{
- SfxMedium aMed(aFileName, (STREAM_READ | STREAM_SHARE_DENYNONE), FALSE);
+ SfxMedium aMed(aFileName, (STREAM_READ | STREAM_SHARE_DENYNONE), sal_False);
SfxFilterMatcher aMatch( String::CreateFromAscii("simpress") );
- aMed.UseInteractionHandler( TRUE );
+ aMed.UseInteractionHandler( sal_True );
nErr = aMatch.GuessFilter(aMed, &pFilter);
}
@@ -621,7 +631,7 @@ BOOL SdNavigatorWin::InsertFile(const String& rFileName)
// ersteinmal nachgeschaut, ob es einen Storage enthaelt
SfxMedium* pMedium = new SfxMedium( aFileName,
STREAM_READ | STREAM_NOCREATE,
- TRUE); // Download
+ sal_True); // Download
if (pMedium->IsStorage())
{
@@ -638,20 +648,20 @@ BOOL SdNavigatorWin::InsertFile(const String& rFileName)
if( !maTlbObjects.IsEqualToDoc( pDropDoc ) )
{
// Nur normale Seiten
- maTlbObjects.Fill(pDropDoc, (BOOL) FALSE, maDropFileName);
+ maTlbObjects.Fill(pDropDoc, (sal_Bool) sal_False, maDropFileName);
RefreshDocumentLB( &maDropFileName );
}
}
}
else
{
- bReturn = FALSE;
+ bReturn = sal_False;
delete pMedium;
}
}
else
{
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
@@ -662,7 +672,7 @@ BOOL SdNavigatorWin::InsertFile(const String& rFileName)
void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if( pDocName )
{
@@ -670,7 +680,7 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
maLbDocs.RemoveEntry( 0 );
maLbDocs.InsertEntry( *pDocName, 0 );
- mbDocImported = TRUE;
+ mbDocImported = sal_True;
}
else
{
@@ -687,14 +697,14 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
// Liste der DocInfos loeschen
long nCount = mpDocList->Count();
while( nCount-- )
- delete (NavDocInfo*) mpDocList->Remove( (ULONG)0 );
+ delete (NavDocInfo*) mpDocList->Remove( (sal_uLong)0 );
if( mbDocImported )
maLbDocs.InsertEntry( aStr, 0 );
::sd::DrawDocShell* pCurrentDocShell =
PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
- SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst(0, FALSE);
+ SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst(0, sal_False);
while( pSfxDocShell )
{
::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, pSfxDocShell );
@@ -707,7 +717,7 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
if( aStr.Len() )
pInfo->SetName();
else
- pInfo->SetName( FALSE );
+ pInfo->SetName( sal_False );
// z.Z. wird wieder der Name der Shell genommen (also ohne Pfad)
// da Koose es als Fehler ansieht, wenn er Pfad in URL-Notation
// angezeigt wird!
@@ -718,11 +728,11 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
if( pDocShell == pCurrentDocShell )
pInfo->SetActive();
else
- pInfo->SetActive( FALSE );
+ pInfo->SetActive( sal_False );
mpDocList->Insert( pInfo, LIST_APPEND );
}
- pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, 0 , FALSE );
+ pSfxDocShell = SfxObjectShell::GetNext( *pSfxDocShell, 0 , sal_False );
}
}
maLbDocs.SelectEntryPos( nPos );
@@ -730,7 +740,7 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
//------------------------------------------------------------------------
-USHORT SdNavigatorWin::GetDragTypeSdResId( NavigatorDragType eDT, BOOL bImage )
+sal_uInt16 SdNavigatorWin::GetDragTypeSdResId( NavigatorDragType eDT, sal_Bool bImage )
{
switch( eDT )
{
@@ -776,7 +786,7 @@ NavDocInfo* SdNavigatorWin::GetDocInfo()
long SdNavigatorWin::Notify(NotifyEvent& rNEvt)
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
- long nOK = FALSE;
+ long nOK = sal_False;
if( pKEvt )
{
@@ -785,7 +795,7 @@ long SdNavigatorWin::Notify(NotifyEvent& rNEvt)
if( SdPageObjsTLB::IsInDrag() )
{
// during drag'n'drop we just stop the drag but do not close the navigator
- nOK = TRUE;
+ nOK = sal_True;
}
else
{
@@ -797,7 +807,7 @@ long SdNavigatorWin::Notify(NotifyEvent& rNEvt)
// deletion of the navigator window. Calling the
// parents Notify after this is unsafe. Therefore we
// return now.
- return TRUE;
+ return sal_True;
}
}
}
@@ -818,14 +828,14 @@ long SdNavigatorWin::Notify(NotifyEvent& rNEvt)
void SdNavigatorWin::KeyInput( const KeyEvent& rKEvt )
{
- long nOK = FALSE;
+ long nOK = sal_False;
if (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE)
{
if( SdPageObjsTLB::IsInDrag() )
{
// during drag'n'drop we just stop the drag but do not close the navigator
- nOK = TRUE;
+ nOK = sal_True;
}
else
{
@@ -853,7 +863,7 @@ void SdNavigatorWin::DataChanged( const DataChangedEvent& rDCEvt )
void SdNavigatorWin::SetDragImage()
{
- maToolbox.SetItemImage( TBI_DRAGTYPE, maToolbox.GetImageList().GetImage( GetDragTypeSdResId( meDragType, TRUE ) ) );
+ maToolbox.SetItemImage( TBI_DRAGTYPE, maToolbox.GetImageList().GetImage( GetDragTypeSdResId( meDragType, sal_True ) ) );
}
void SdNavigatorWin::ApplyImageList()
@@ -873,7 +883,7 @@ void SdNavigatorWin::ApplyImageList()
|*
\************************************************************************/
-SdNavigatorControllerItem::SdNavigatorControllerItem( USHORT _nId,
+SdNavigatorControllerItem::SdNavigatorControllerItem( sal_uInt16 _nId,
SdNavigatorWin* pNavWin,
SfxBindings* _pBindings) :
SfxControllerItem( _nId, *_pBindings ),
@@ -883,14 +893,14 @@ SdNavigatorControllerItem::SdNavigatorControllerItem( USHORT _nId,
// -----------------------------------------------------------------------
-void SdNavigatorControllerItem::StateChanged( USHORT nSId,
+void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pItem )
{
if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_NAVIGATOR_STATE )
{
const SfxUInt32Item* pStateItem = PTR_CAST( SfxUInt32Item, pItem );
DBG_ASSERT( pStateItem, "SfxUInt16Item erwartet");
- UINT32 nState = pStateItem->GetValue();
+ sal_uInt32 nState = pStateItem->GetValue();
// Stift
if( nState & NAVBTN_PEN_ENABLED &&
@@ -898,13 +908,13 @@ void SdNavigatorControllerItem::StateChanged( USHORT nSId,
pNavigatorWin->maToolbox.EnableItem( TBI_PEN );
if( nState & NAVBTN_PEN_DISABLED &&
pNavigatorWin->maToolbox.IsItemEnabled( TBI_PEN ) )
- pNavigatorWin->maToolbox.EnableItem( TBI_PEN, FALSE );
+ pNavigatorWin->maToolbox.EnableItem( TBI_PEN, sal_False );
if( nState & NAVBTN_PEN_CHECKED &&
!pNavigatorWin->maToolbox.IsItemChecked( TBI_PEN ) )
pNavigatorWin->maToolbox.CheckItem( TBI_PEN );
if( nState & NAVBTN_PEN_UNCHECKED &&
pNavigatorWin->maToolbox.IsItemChecked( TBI_PEN ) )
- pNavigatorWin->maToolbox.CheckItem( TBI_PEN, FALSE );
+ pNavigatorWin->maToolbox.CheckItem( TBI_PEN, sal_False );
// Nur wenn Doc in LB das Aktive ist
NavDocInfo* pInfo = pNavigatorWin->GetDocInfo();
@@ -916,7 +926,7 @@ void SdNavigatorControllerItem::StateChanged( USHORT nSId,
pNavigatorWin->maToolbox.EnableItem( TBI_FIRST );
if( nState & NAVBTN_FIRST_DISABLED &&
pNavigatorWin->maToolbox.IsItemEnabled( TBI_FIRST ) )
- pNavigatorWin->maToolbox.EnableItem( TBI_FIRST, FALSE );
+ pNavigatorWin->maToolbox.EnableItem( TBI_FIRST, sal_False );
// Prev
if( nState & NAVBTN_PREV_ENABLED &&
@@ -924,7 +934,7 @@ void SdNavigatorControllerItem::StateChanged( USHORT nSId,
pNavigatorWin->maToolbox.EnableItem( TBI_PREVIOUS );
if( nState & NAVBTN_PREV_DISABLED &&
pNavigatorWin->maToolbox.IsItemEnabled( TBI_PREVIOUS ) )
- pNavigatorWin->maToolbox.EnableItem( TBI_PREVIOUS, FALSE );
+ pNavigatorWin->maToolbox.EnableItem( TBI_PREVIOUS, sal_False );
// Last
if( nState & NAVBTN_LAST_ENABLED &&
@@ -932,7 +942,7 @@ void SdNavigatorControllerItem::StateChanged( USHORT nSId,
pNavigatorWin->maToolbox.EnableItem( TBI_LAST );
if( nState & NAVBTN_LAST_DISABLED &&
pNavigatorWin->maToolbox.IsItemEnabled( TBI_LAST ) )
- pNavigatorWin->maToolbox.EnableItem( TBI_LAST, FALSE );
+ pNavigatorWin->maToolbox.EnableItem( TBI_LAST, sal_False );
// Next
if( nState & NAVBTN_NEXT_ENABLED &&
@@ -940,12 +950,12 @@ void SdNavigatorControllerItem::StateChanged( USHORT nSId,
pNavigatorWin->maToolbox.EnableItem( TBI_NEXT );
if( nState & NAVBTN_NEXT_DISABLED &&
pNavigatorWin->maToolbox.IsItemEnabled( TBI_NEXT ) )
- pNavigatorWin->maToolbox.EnableItem( TBI_NEXT, FALSE );
+ pNavigatorWin->maToolbox.EnableItem( TBI_NEXT, sal_False );
if( nState & NAVTLB_UPDATE )
{
// InitTlb; Wird ueber Slot initiiert
- SfxBoolItem aItem( SID_NAVIGATOR_INIT, TRUE );
+ SfxBoolItem aItem( SID_NAVIGATOR_INIT, sal_True );
GetBindings().GetDispatcher()->Execute(
SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
}
@@ -959,7 +969,7 @@ void SdNavigatorControllerItem::StateChanged( USHORT nSId,
|*
\************************************************************************/
-SdPageNameControllerItem::SdPageNameControllerItem( USHORT _nId,
+SdPageNameControllerItem::SdPageNameControllerItem( sal_uInt16 _nId,
SdNavigatorWin* pNavWin,
SfxBindings* _pBindings) :
SfxControllerItem( _nId, *_pBindings ),
@@ -969,7 +979,7 @@ SdPageNameControllerItem::SdPageNameControllerItem( USHORT _nId,
// -----------------------------------------------------------------------
-void SdPageNameControllerItem::StateChanged( USHORT nSId,
+void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
SfxItemState eState, const SfxPoolItem* pItem )
{
if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_NAVIGATOR_PAGENAME )
@@ -987,7 +997,7 @@ void SdPageNameControllerItem::StateChanged( USHORT nSId,
if( pNavigatorWin->maTlbObjects.GetSelectionMode() == MULTIPLE_SELECTION )
{
// Weil sonst immer dazuselektiert wird
- pNavigatorWin->maTlbObjects.SelectAll( FALSE );
+ pNavigatorWin->maTlbObjects.SelectAll( sal_False );
}
pNavigatorWin->maTlbObjects.SelectEntry( aPageName );
}
diff --git a/sd/source/ui/dlg/navigatr.src b/sd/source/ui/dlg/navigatr.src
index 9b7d8377ca92..c7df880018ce 100644..100755
--- a/sd/source/ui/dlg/navigatr.src
+++ b/sd/source/ui/dlg/navigatr.src
@@ -149,3 +149,8 @@ Window FLT_NAVIGATOR
NAVIGATR_IDLIST
};
};
+
+String STR_OBJECTS_TREE
+{
+ Text [ en-US ] = "Page Tree";
+};
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 9726bb10bd0a..75b21600b07b 100644..100755
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -57,9 +57,9 @@ public:
~SdParagraphNumTabPage();
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet );
- static USHORT* GetRanges();
+ static sal_uInt16* GetRanges();
- virtual BOOL FillItemSet( SfxItemSet& rSet );
+ virtual sal_Bool FillItemSet( SfxItemSet& rSet );
virtual void Reset( const SfxItemSet& rSet );
private:
@@ -93,9 +93,9 @@ SfxTabPage* SdParagraphNumTabPage::Create(Window *pParent, const SfxItemSet & rA
return new SdParagraphNumTabPage( pParent, rAttrSet );
}
-USHORT* SdParagraphNumTabPage::GetRanges()
+sal_uInt16* SdParagraphNumTabPage::GetRanges()
{
- static USHORT aRange[] =
+ static sal_uInt16 aRange[] =
{
ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END,
0
@@ -104,15 +104,15 @@ USHORT* SdParagraphNumTabPage::GetRanges()
return aRange;
}
-BOOL SdParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
+sal_Bool SdParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
if(maNewStartCB.GetState() != maNewStartCB.GetSavedValue() ||
maNewStartNumberCB.GetState() != maNewStartNumberCB.GetSavedValue()||
maNewStartNF.GetText() != maNewStartNF.GetSavedValue())
{
mbModified = true;
- BOOL bNewStartChecked = STATE_CHECK == maNewStartCB.GetState();
- BOOL bNumberNewStartChecked = STATE_CHECK == maNewStartNumberCB.GetState();
+ sal_Bool bNewStartChecked = STATE_CHECK == maNewStartCB.GetState();
+ sal_Bool bNumberNewStartChecked = STATE_CHECK == maNewStartNumberCB.GetState();
rSet.Put(SfxBoolItem(ATTR_NUMBER_NEWSTART, bNewStartChecked));
const sal_Int16 nStartAt = (sal_Int16)maNewStartNF.GetValue();
@@ -129,7 +129,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
{
const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(ATTR_NUMBER_NEWSTART);
maNewStartCB.SetState( rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK );
- maNewStartCB.EnableTriState(FALSE);
+ maNewStartCB.EnableTriState(sal_False);
}
else
{
@@ -147,7 +147,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
nNewStart = 1;
maNewStartNF.SetValue(nNewStart);
- maNewStartNumberCB.EnableTriState(FALSE);
+ maNewStartNumberCB.EnableTriState(sal_False);
}
else
{
@@ -156,12 +156,12 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet )
ImplNewStartHdl(&maNewStartCB);
maNewStartNF.SaveValue();
maNewStartNumberCB.SaveValue();
- mbModified = FALSE;
+ mbModified = sal_False;
}
IMPL_LINK( SdParagraphNumTabPage, ImplNewStartHdl, CheckBox*, EMPTYARG )
{
- BOOL bEnable = maNewStartCB.IsChecked();
+ sal_Bool bEnable = maNewStartCB.IsChecked();
maNewStartNumberCB.Enable(bEnable);
maNewStartNF.Enable(bEnable && maNewStartNumberCB.IsChecked());
return 0;
@@ -183,7 +183,7 @@ SdParagraphDlg::SdParagraphDlg( Window* pParent, const SfxItemSet* pAttr )
AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
- static const BOOL bShowParaNumbering = ( getenv( "SD_SHOW_NUMBERING_PAGE" ) != NULL );
+ static const sal_Bool bShowParaNumbering = ( getenv( "SD_SHOW_NUMBERING_PAGE" ) != NULL );
if( bShowParaNumbering )
AddTabPage( RID_TABPAGE_PARA_NUMBERING, SdParagraphNumTabPage::Create, SdParagraphNumTabPage::GetRanges );
else
diff --git a/sd/source/ui/dlg/paragr.src b/sd/source/ui/dlg/paragr.src
index 041a4524a705..99a9d4f4c17f 100644
--- a/sd/source/ui/dlg/paragr.src
+++ b/sd/source/ui/dlg/paragr.src
@@ -27,6 +27,7 @@
#include <svx/dialogs.hrc>
#include "glob.hrc"
+#include "helpids.h"
#include "paragr.hrc"
TabDialog TAB_PARAGRAPH
@@ -105,13 +106,14 @@ TabDialog TAB_PARAGRAPH
TabPage RID_TABPAGE_PARA_NUMBERING
{
- HelpId = RID_TABPAGE_PARA_NUMBERING ;
+ HelpId = HID_TABPAGE_PARA_NUMBERING ;
Hide = TRUE ;
Text = "Numbering" ;
Size = MAP_APPFONT ( 260 , 185 ) ;
TriStateBox CB_NEW_START
{
+ HelpID = "sd:TriStateBox:RID_TABPAGE_PARA_NUMBERING:CB_NEW_START";
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -119,6 +121,7 @@ TabPage RID_TABPAGE_PARA_NUMBERING
};
TriStateBox CB_NUMBER_NEW_START
{
+ HelpID = "sd:TriStateBox:RID_TABPAGE_PARA_NUMBERING:CB_NUMBER_NEW_START";
Pos = MAP_APPFONT ( 15 , 21 ) ;
Size = MAP_APPFONT ( 103 , 10 ) ;
Disable = TRUE ;
@@ -126,6 +129,7 @@ TabPage RID_TABPAGE_PARA_NUMBERING
};
NumericField NF_NEW_START
{
+ HelpID = "sd:NumericField:RID_TABPAGE_PARA_NUMBERING:NF_NEW_START";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 20 ) ;
Size = MAP_APPFONT ( 26 , 12 ) ;
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index ee842e2326c6..192e57c21b91 100644..100755
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -112,9 +112,15 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
aTmfPause.SetModifyHdl( LINK( this, SdStartPresentationDlg, ChangePauseHdl ) );
aTmfPause.SetFormat( TIMEF_SEC );
+ aLbDias.SetAccessibleRelationLabeledBy( &aRbtAtDia );
+ aLbDias.SetAccessibleName(aRbtAtDia.GetText());
+ aLbCustomshow.SetAccessibleRelationLabeledBy( &aRbtCustomshow );
+ aTmfPause.SetAccessibleRelationLabeledBy( &aRbtAuto );
+ aTmfPause.SetAccessibleName(aRbtAuto.GetText());
+
// Listbox mit Seitennamen fuellen
rPageNames.First();
- for( UINT16 i = 0;
+ for( sal_uInt16 i = 0;
i < rPageNames.Count();
i++ )
{
@@ -124,7 +130,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
if( pCustomShowList )
{
- USHORT nPosToSelect = (USHORT) pCustomShowList->GetCurPos();
+ sal_uInt16 nPosToSelect = (sal_uInt16) pCustomShowList->GetCurPos();
SdCustomShow* pCustomShow;
// Listbox mit CustomShows fuellen
for( pCustomShow = (SdCustomShow*) pCustomShowList->First();
@@ -155,8 +161,8 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
aCbxChangePage.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_CHANGE_PAGE ) ).GetValue() );
aCbxAlwaysOnTop.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ALWAYS_ON_TOP ) ).GetValue() );
- const BOOL bEndless = ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ENDLESS ) ).GetValue();
- const BOOL bWindow = !( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue();
+ const sal_Bool bEndless = ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ENDLESS ) ).GetValue();
+ const sal_Bool bWindow = !( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue();
const long nPause = ( ( const SfxUInt32Item& ) rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue();
aTmfPause.SetTime( Time( 0, 0, nPause ) );
@@ -168,11 +174,11 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
aCbxAutoLogo.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_SHOW_PAUSELOGO ) ).GetValue() );
if( bWindow )
- aRbtWindow.Check( TRUE );
+ aRbtWindow.Check( sal_True );
else if( bEndless )
- aRbtAuto.Check( TRUE );
+ aRbtAuto.Check( sal_True );
else
- aRbtStandard.Check( TRUE );
+ aRbtStandard.Check( sal_True );
InitMonitorSettings();
@@ -233,7 +239,7 @@ void SdStartPresentationDlg::InitMonitorSettings()
else
nSelected--;
- maLBMonitor.SelectEntryPos( (USHORT)nSelected );
+ maLBMonitor.SelectEntryPos( (sal_uInt16)nSelected );
}
}
catch( Exception& )
@@ -261,7 +267,7 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
rAttr.Put( SfxUInt32Item ( ATTR_PRESENT_PAUSE_TIMEOUT, aTmfPause.GetTime().GetMSFromTime() / 1000 ) );
rAttr.Put( SfxBoolItem ( ATTR_PRESENT_SHOW_PAUSELOGO, aCbxAutoLogo.IsChecked() ) );
- USHORT nPos = maLBMonitor.GetSelectEntryPos();
+ sal_uInt16 nPos = maLBMonitor.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
rAttr.Put( SfxInt32Item ( ATTR_PRESENT_DISPLAY, nPos + 1 ) );
@@ -299,8 +305,8 @@ IMPL_LINK( SdStartPresentationDlg, ClickWindowPresentationHdl, void *, EMPTYARG
if( bWindow )
{
- aCbxAlwaysOnTop.Enable( FALSE );
- aCbxAlwaysOnTop.Check( FALSE );
+ aCbxAlwaysOnTop.Enable( sal_False );
+ aCbxAlwaysOnTop.Check( sal_False );
}
else
aCbxAlwaysOnTop.Enable();
diff --git a/sd/source/ui/dlg/present.src b/sd/source/ui/dlg/present.src
index b04914f08f94..b53facb8d1e2 100644
--- a/sd/source/ui/dlg/present.src
+++ b/sd/source/ui/dlg/present.src
@@ -33,7 +33,7 @@
ModalDialog DLG_START_PRESENTATION
{
- HelpID = SID_PRESENTATION ;
+ HelpID = CMD_SID_PRESENTATION ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 256, 205 ) ;
@@ -68,6 +68,7 @@ ModalDialog DLG_START_PRESENTATION
};
RadioButton RBT_ALL
{
+ HelpID = "sd:RadioButton:DLG_START_PRESENTATION:RBT_ALL";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 80 , 12 ) ;
Text [ en-US ] = "All ~slides" ;
@@ -75,6 +76,7 @@ ModalDialog DLG_START_PRESENTATION
};
RadioButton RBT_AT_DIA
{
+ HelpID = "sd:RadioButton:DLG_START_PRESENTATION:RBT_AT_DIA";
Pos = MAP_APPFONT ( 12 , 26 ) ;
Size = MAP_APPFONT ( 60 , 12 ) ;
Text [ en-US ] = "~From:" ;
@@ -82,6 +84,7 @@ ModalDialog DLG_START_PRESENTATION
};
ListBox LB_DIAS
{
+ HelpID = "sd:ListBox:DLG_START_PRESENTATION:LB_DIAS";
Border = TRUE ;
Pos = MAP_APPFONT ( 82, 24 ) ;
Size = MAP_APPFONT ( 111, 80 ) ;
@@ -91,6 +94,7 @@ ModalDialog DLG_START_PRESENTATION
};
RadioButton RBT_CUSTOMSHOW
{
+ HelpID = "sd:RadioButton:DLG_START_PRESENTATION:RBT_CUSTOMSHOW";
Pos = MAP_APPFONT ( 12 , 38 ) ;
Size = MAP_APPFONT ( 130 , 12 ) ;
TabStop = TRUE ;
@@ -98,6 +102,7 @@ ModalDialog DLG_START_PRESENTATION
};
ListBox LB_CUSTOMSHOW
{
+ HelpID = "sd:ListBox:DLG_START_PRESENTATION:LB_CUSTOMSHOW";
Border = TRUE ;
Pos = MAP_APPFONT ( 32, 53 ) ;
Size = MAP_APPFONT ( 161, 80 ) ;
@@ -113,6 +118,7 @@ ModalDialog DLG_START_PRESENTATION
};
RadioButton RBT_STANDARD
{
+ HelpID = "sd:RadioButton:DLG_START_PRESENTATION:RBT_STANDARD";
Pos = MAP_APPFONT ( 12, 84 ) ;
Size = MAP_APPFONT ( 81, 12 ) ;
Text [ en-US ] = "~Default" ;
@@ -120,6 +126,7 @@ ModalDialog DLG_START_PRESENTATION
};
RadioButton RBT_WINDOW
{
+ HelpID = "sd:RadioButton:DLG_START_PRESENTATION:RBT_WINDOW";
Pos = MAP_APPFONT ( 12 , 96 ) ;
Size = MAP_APPFONT ( 81 , 12 ) ;
Text [ en-US ] = "~Window" ;
@@ -127,6 +134,7 @@ ModalDialog DLG_START_PRESENTATION
};
RadioButton RBT_AUTO
{
+ HelpID = "sd:RadioButton:DLG_START_PRESENTATION:RBT_AUTO";
Pos = MAP_APPFONT ( 12 , 108 ) ;
Size = MAP_APPFONT ( 81 , 12 ) ;
Text [ en-US ] = "A~uto" ;
@@ -142,6 +150,7 @@ ModalDialog DLG_START_PRESENTATION
*/
TimeField TMF_PAUSE
{
+ HelpID = "sd:TimeField:DLG_START_PRESENTATION:TMF_PAUSE";
Pos = MAP_APPFONT ( 32, 120 ) ;
Size = MAP_APPFONT ( 50, 12 ) ;
Border = TRUE ;
@@ -166,6 +175,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_AUTOLOGO
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_AUTOLOGO";
Pos = MAP_APPFONT ( 32 , 138 ) ;
Size = MAP_APPFONT ( 61 , 12 ) ;
TabStop = TRUE ;
@@ -180,6 +190,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_MANUEL
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_MANUEL";
Pos = MAP_APPFONT ( 108 , 84 ) ;
Size = MAP_APPFONT ( 139 , 12 ) ;
TabStop = TRUE ;
@@ -187,6 +198,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_MOUSEPOINTER
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_MOUSEPOINTER";
Pos = MAP_APPFONT ( 108, 96 ) ;
Size = MAP_APPFONT ( 139, 12 ) ;
Text [ en-US ] = "Mouse pointer ~visible" ;
@@ -194,6 +206,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_PEN
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_PEN";
Pos = MAP_APPFONT ( 108, 108 ) ;
Size = MAP_APPFONT ( 139, 12 ) ;
Text [ en-US ] = "Mouse pointer as ~pen" ;
@@ -201,6 +214,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_NAVIGATOR
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_NAVIGATOR";
Pos = MAP_APPFONT ( 108, 120 ) ;
Size = MAP_APPFONT ( 139, 12 ) ;
TabStop = TRUE ;
@@ -208,6 +222,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_ANIMATION_ALLOWED
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_ANIMATION_ALLOWED";
Pos = MAP_APPFONT ( 108, 132 ) ;
Size = MAP_APPFONT ( 139, 12 ) ;
TabStop = TRUE ;
@@ -215,6 +230,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_CHANGE_PAGE
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_CHANGE_PAGE";
Pos = MAP_APPFONT ( 108, 144 ) ;
Size = MAP_APPFONT ( 139, 12 ) ;
TabStop = TRUE ;
@@ -222,6 +238,7 @@ ModalDialog DLG_START_PRESENTATION
};
CheckBox CBX_ALWAYS_ON_TOP
{
+ HelpID = "sd:CheckBox:DLG_START_PRESENTATION:CBX_ALWAYS_ON_TOP";
Pos = MAP_APPFONT ( 108, 156 ) ;
Size = MAP_APPFONT ( 145, 12 ) ;
TabStop = TRUE ;
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index dfff80251764..112eb6e3c68e 100644..100755
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -84,8 +84,8 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
if( IS_OUTLINE(ePO))
{
// Leider sind die Itemsets unserer Stylesheets nicht discret..
- const USHORT* pPtr = pOrgSet->GetRanges();
- USHORT p1, p2;
+ const sal_uInt16* pPtr = pOrgSet->GetRanges();
+ sal_uInt16 p1, p2;
while( *pPtr )
{
p1 = pPtr[0];
@@ -115,14 +115,14 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
// Fals in diesem Stylesheet kein Bullet Item ist, holen wir uns
// das aus dem 'Outline 1' Stylesheet.
- if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, FALSE, &pItem ))
+ if( SFX_ITEM_SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem ))
{
String aStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE)));
aStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " 1" ) );
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
if(pFirstStyleSheet)
- if( SFX_ITEM_SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, FALSE, &pItem) )
+ if( SFX_ITEM_SET == pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, sal_False, &pItem) )
aInputSet.Put( *pItem );
}
@@ -255,7 +255,7 @@ SdPresLayoutTemplateDlg::~SdPresLayoutTemplateDlg()
// -----------------------------------------------------------------------
-void SdPresLayoutTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{ SfxAllItemSet aSet(*(aInputSet.GetPool()));
switch( nId )
{
@@ -324,7 +324,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
pOutSet->Put( *SfxTabDialog::GetOutputItemSet() );
const SvxNumBulletItem *pSvxNumBulletItem = NULL;
- if( SFX_ITEM_SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, FALSE, (const SfxPoolItem**)&pSvxNumBulletItem ))
+ if( SFX_ITEM_SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, sal_False, (const SfxPoolItem**)&pSvxNumBulletItem ))
SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
return pOutSet;
}
@@ -334,7 +334,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
-USHORT SdPresLayoutTemplateDlg::GetOutlineLevel() const
+sal_uInt16 SdPresLayoutTemplateDlg::GetOutlineLevel() const
{
switch( ePO )
{
@@ -348,7 +348,7 @@ USHORT SdPresLayoutTemplateDlg::GetOutlineLevel() const
case PO_OUTLINE_8: return 7;
case PO_OUTLINE_9: return 8;
default:
- DBG_ASSERT( FALSE, "Falscher Po! [CL]");
+ DBG_ASSERT( sal_False, "Falscher Po! [CL]");
}
return 0;
}
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index 4ecd148a66a8..e48be95d161f 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -100,6 +100,9 @@ SdPrintOptions::SdPrintOptions( Window* pParent, const SfxItemSet& rInAttrs ) :
#ifndef QUARTZ
SetDrawMode();
#endif
+
+ aCbxFront.SetAccessibleRelationLabeledBy( &aRbtBooklet );
+ aCbxBack.SetAccessibleRelationLabeledBy( &aRbtBooklet );
}
// -----------------------------------------------------------------------
@@ -110,7 +113,7 @@ SdPrintOptions::~SdPrintOptions()
// -----------------------------------------------------------------------
-BOOL SdPrintOptions::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdPrintOptions::FillItemSet( SfxItemSet& rAttrs )
{
if( aCbxDraw.GetSavedValue() != aCbxDraw.IsChecked() ||
aCbxNotes.GetSavedValue() != aCbxNotes.IsChecked() ||
@@ -147,7 +150,7 @@ BOOL SdPrintOptions::FillItemSet( SfxItemSet& rAttrs )
aOptions.GetOptionsPrint().SetBackPage( aCbxBack.IsChecked() );
aOptions.GetOptionsPrint().SetPaperbin( aCbxPaperbin.IsChecked() );
- UINT16 nQuality = 0; // Standard, also Color
+ sal_uInt16 nQuality = 0; // Standard, also Color
if( aRbtGrayscale.IsChecked() )
nQuality = 1;
if( aRbtBlackWhite.IsChecked() )
@@ -156,9 +159,9 @@ BOOL SdPrintOptions::FillItemSet( SfxItemSet& rAttrs )
rAttrs.Put( aOptions );
- return( TRUE );
+ return( sal_True );
}
- return( FALSE );
+ return( sal_False );
}
// -----------------------------------------------------------------------
@@ -166,7 +169,7 @@ BOOL SdPrintOptions::FillItemSet( SfxItemSet& rAttrs )
void SdPrintOptions::Reset( const SfxItemSet& rAttrs )
{
const SdOptionsPrintItem* pPrintOpts = NULL;
- if( SFX_ITEM_SET == rAttrs.GetItemState( ATTR_OPTIONS_PRINT, FALSE,
+ if( SFX_ITEM_SET == rAttrs.GetItemState( ATTR_OPTIONS_PRINT, sal_False,
(const SfxPoolItem**) &pPrintOpts ) )
{
aCbxDraw.Check( pPrintOpts->GetOptionsPrint().IsDraw() );
@@ -191,7 +194,7 @@ void SdPrintOptions::Reset( const SfxItemSet& rAttrs )
aRbtDefault.Check();
}
- UINT16 nQuality = pPrintOpts->GetOptionsPrint().GetOutputQuality();
+ sal_uInt16 nQuality = pPrintOpts->GetOptionsPrint().GetOutputQuality();
if( nQuality == 0 )
aRbtColor.Check();
else if( nQuality == 1 )
@@ -298,7 +301,7 @@ void SdPrintOptions::PageCreated (SfxAllItemSet
SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_SDMODE_FLAG,sal_False);
if (pFlagItem)
{
- UINT32 nFlags=pFlagItem->GetValue();
+ sal_uInt32 nFlags=pFlagItem->GetValue();
if ( ( nFlags & SD_DRAW_MODE ) == SD_DRAW_MODE )
SetDrawMode();
}
diff --git a/sd/source/ui/dlg/prntopts.src b/sd/source/ui/dlg/prntopts.src
index dd2ed2e3f63b..7a4f88068e87 100644
--- a/sd/source/ui/dlg/prntopts.src
+++ b/sd/source/ui/dlg/prntopts.src
@@ -42,6 +42,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_DRAW
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_DRAW";
TabStop = TRUE ;
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -49,6 +50,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_NOTES
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_NOTES";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -56,6 +58,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_HANDOUTS
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_HANDOUTS";
Pos = MAP_APPFONT ( 12 , 42 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -63,6 +66,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_OUTLINE
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_OUTLINE";
Pos = MAP_APPFONT ( 12 , 56 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
TabStop = TRUE ;
@@ -82,6 +86,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_COLOR
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_COLOR";
Pos = MAP_APPFONT ( 136 , 14 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Default" ;
@@ -89,6 +94,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_GRAYSCALE
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_GRAYSCALE";
Pos = MAP_APPFONT ( 136 , 28 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Gra~yscale" ;
@@ -96,6 +102,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_BLACKWHITE
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_BLACKWHITE";
Pos = MAP_APPFONT ( 136 , 42 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Black & ~white" ;
@@ -109,6 +116,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_PAGENAME
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_PAGENAME";
Pos = MAP_APPFONT ( 12 , 83 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "~Page name" ;
@@ -116,6 +124,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_DATE
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_DATE";
Pos = MAP_APPFONT ( 12 , 97 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "D~ate" ;
@@ -123,6 +132,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_TIME
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_TIME";
Pos = MAP_APPFONT ( 12 , 111 ) ;
Size = MAP_APPFONT ( 90 , 10 ) ;
Text [ en-US ] = "Ti~me" ;
@@ -130,6 +140,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_HIDDEN_PAGES
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_HIDDEN_PAGES";
Pos = MAP_APPFONT ( 12 , 125 ) ;
// 120 , 14
Size = MAP_APPFONT ( 90 , 10 ) ;
@@ -150,6 +161,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_DEFAULT
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_DEFAULT";
Pos = MAP_APPFONT ( 136 , 83 ) ;
Size = MAP_APPFONT ( 110 , 10 ) ;
TabStop = TRUE ;
@@ -157,6 +169,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_PAGESIZE
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_PAGESIZE";
Pos = MAP_APPFONT ( 136 , 97 ) ;
Size = MAP_APPFONT ( 110 , 10 ) ;
Text [ en-US ] = "~Fit to page" ;
@@ -164,6 +177,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_PAGETILE
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_PAGETILE";
Pos = MAP_APPFONT ( 136 , 111 ) ;
Size = MAP_APPFONT ( 110 , 10 ) ;
TabStop = TRUE ;
@@ -171,6 +185,7 @@ TabPage TP_PRINT_OPTIONS
};
RadioButton RBT_BOOKLET
{
+ HelpID = "sd:RadioButton:TP_PRINT_OPTIONS:RBT_BOOKLET";
Pos = MAP_APPFONT ( 136, 125 ) ;
Size = MAP_APPFONT ( 110 , 10 ) ;
TabStop = TRUE ;
@@ -178,6 +193,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_FRONT
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_FRONT";
Pos = MAP_APPFONT ( 145 , 139 ) ;
Size = MAP_APPFONT ( 53 , 10 ) ;
TabStop = TRUE ;
@@ -185,6 +201,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_BACK
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_BACK";
Pos = MAP_APPFONT ( 202 , 139 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
TabStop = TRUE ;
@@ -192,6 +209,7 @@ TabPage TP_PRINT_OPTIONS
};
CheckBox CBX_PAPERBIN
{
+ HelpID = "sd:CheckBox:TP_PRINT_OPTIONS:CBX_PAPERBIN";
Pos = MAP_APPFONT ( 136 , 153 ) ;
Size = MAP_APPFONT ( 118 , 30 ) ;
Text [ en-US ] = "Paper tray from printer s~ettings" ;
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 2e9c230658f6..bb1930c43b2a 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -91,18 +91,18 @@ void AbstractCopyDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
// AbstractCopyDlg_Impl end
//AbstractSdCustomShowDlg_Impl begin
-BOOL AbstractSdCustomShowDlg_Impl::IsModified() const
+sal_Bool AbstractSdCustomShowDlg_Impl::IsModified() const
{
return pDlg->IsModified();
}
-BOOL AbstractSdCustomShowDlg_Impl::IsCustomShow() const
+sal_Bool AbstractSdCustomShowDlg_Impl::IsCustomShow() const
{
return pDlg->IsCustomShow();
}
// AbstractSdCustomShowDlg_Impl end
// AbstractTabDialog_Impl begin
-void AbstractTabDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -110,7 +110,7 @@ const SfxItemSet* AbstractTabDialog_Impl::GetOutputItemSet() const
{
return pDlg->GetOutputItemSet();
}
-const USHORT* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -132,7 +132,7 @@ String AbstractTabDialog_Impl::GetText() const
// --------------------------------------------------------------------
// AbstractBulletDialog_Impl begin
-void AbstractBulletDialog_Impl::SetCurPageId( USHORT nId )
+void AbstractBulletDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetCurPageId( nId );
}
@@ -140,7 +140,7 @@ const SfxItemSet* AbstractBulletDialog_Impl::GetOutputItemSet() const
{
return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetOutputItemSet();
}
-const USHORT* AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* AbstractBulletDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetInputRanges( pItem );
}
@@ -161,7 +161,7 @@ String AbstractBulletDialog_Impl::GetText() const
// --------------------------------------------------------------------
-void SdPresLayoutTemplateDlg_Impl::SetCurPageId( USHORT nId )
+void SdPresLayoutTemplateDlg_Impl::SetCurPageId( sal_uInt16 nId )
{
pDlg->SetCurPageId( nId );
}
@@ -171,7 +171,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-const USHORT* SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
+const sal_uInt16* SdPresLayoutTemplateDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return pDlg->GetInputRanges( pItem );
}
@@ -202,7 +202,7 @@ OutputType AbstractAssistentDlg_Impl::GetOutputMedium() const
{
return pDlg->GetOutputMedium();
}
-BOOL AbstractAssistentDlg_Impl::IsSummary() const
+sal_Bool AbstractAssistentDlg_Impl::IsSummary() const
{
return pDlg->IsSummary();
}
@@ -214,11 +214,11 @@ String AbstractAssistentDlg_Impl::GetDocPath() const
{
return pDlg->GetDocPath();
}
-BOOL AbstractAssistentDlg_Impl::GetStartWithFlag() const
+sal_Bool AbstractAssistentDlg_Impl::GetStartWithFlag() const
{
return pDlg->GetStartWithFlag();
}
-BOOL AbstractAssistentDlg_Impl::IsDocEmpty() const
+sal_Bool AbstractAssistentDlg_Impl::IsDocEmpty() const
{
return pDlg->IsDocEmpty();
}
@@ -252,7 +252,7 @@ void AbstractSdSnapLineDlg_Impl::HideDeleteBtn()
{
pDlg->HideDeleteBtn();
}
-void AbstractSdSnapLineDlg_Impl::SetInputFields(BOOL bEnableX, BOOL bEnableY)
+void AbstractSdSnapLineDlg_Impl::SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY)
{
pDlg->SetInputFields(bEnableX, bEnableY);
}
@@ -267,14 +267,14 @@ void AbstractSdInsertLayerDlg_Impl::GetAttr( SfxItemSet& rOutAttrs )
{
pDlg->GetAttr( rOutAttrs );
}
-void AbstractSdInsertLayerDlg_Impl::SetHelpId( ULONG nHelpId )
+void AbstractSdInsertLayerDlg_Impl::SetHelpId( const rtl::OString& rHelpId )
{
- pDlg->SetHelpId( nHelpId );
+ pDlg->SetHelpId( rHelpId );
}
// AbstractSdInsertLayerDlg_Impl end
//AbstractSdInsertPasteDlg_Impl begin
-BOOL AbstractSdInsertPasteDlg_Impl::IsInsertBefore() const
+sal_Bool AbstractSdInsertPasteDlg_Impl::IsInsertBefore() const
{
return pDlg->IsInsertBefore();
}
@@ -285,15 +285,15 @@ BOOL AbstractSdInsertPasteDlg_Impl::IsInsertBefore() const
{
return (::Window*)pDlg;
}
-List* AbstractSdInsertPagesObjsDlg_Impl::GetList( USHORT nType )
+List* AbstractSdInsertPagesObjsDlg_Impl::GetList( sal_uInt16 nType )
{
return pDlg->GetList( nType );
}
-BOOL AbstractSdInsertPagesObjsDlg_Impl::IsLink()
+sal_Bool AbstractSdInsertPagesObjsDlg_Impl::IsLink()
{
return pDlg->IsLink();
}
-BOOL AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnessesaryMasterPages() const
+sal_Bool AbstractSdInsertPagesObjsDlg_Impl::IsRemoveUnnessesaryMasterPages() const
{
return pDlg->IsRemoveUnnessesaryMasterPages();
}
@@ -304,15 +304,15 @@ void AbstractMorphDlg_Impl::SaveSettings() const
{
pDlg->SaveSettings();
}
-USHORT AbstractMorphDlg_Impl::GetFadeSteps() const
+sal_uInt16 AbstractMorphDlg_Impl::GetFadeSteps() const
{
return pDlg->GetFadeSteps();
}
-BOOL AbstractMorphDlg_Impl::IsAttributeFade() const
+sal_Bool AbstractMorphDlg_Impl::IsAttributeFade() const
{
return pDlg->IsAttributeFade();
}
-BOOL AbstractMorphDlg_Impl::IsOrientationFade() const
+sal_Bool AbstractMorphDlg_Impl::IsOrientationFade() const
{
return pDlg->IsOrientationFade();
}
@@ -386,8 +386,8 @@ VclAbstractDialog * SdAbstractDialogFactory_Impl::CreateBreakDlg(
::Window* pWindow,
::sd::DrawView* pDrView,
::sd::DrawDocShell* pShell,
- ULONG nSumActionCount,
- ULONG nObjCount ) //add for BreakDlg
+ sal_uLong nSumActionCount,
+ sal_uLong nObjCount ) //add for BreakDlg
{
return new VclAbstractDialog_Impl( new ::sd::BreakDlg( pWindow, pDrView, pShell, nSumActionCount, nObjCount ) );
}
@@ -416,14 +416,14 @@ SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabCharDialog( ::W
}
-SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, BOOL bAreaPage )
+SfxAbstractTabDialog * SdAbstractDialogFactory_Impl::CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage )
{
return new AbstractTabDialog_Impl( new SdPageDlg( pDocShell, pParent, pAttr, bAreaPage ) );
}
// add for SdCharDlg end
//add for AssistentDlg begin
-AbstractAssistentDlg * SdAbstractDialogFactory_Impl::CreateAssistentDlg( ::Window* pParent, BOOL bAutoPilot)
+AbstractAssistentDlg * SdAbstractDialogFactory_Impl::CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot)
{
return new AbstractAssistentDlg_Impl( new AssistentDlg( pParent, bAutoPilot ) );
}
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 551ef6317ed9..5ff7effcbc33 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -78,8 +78,8 @@ class SdCustomShowDlg;
class AbstractSdCustomShowDlg_Impl : public AbstractSdCustomShowDlg
{
DECL_ABSTDLG_BASE(AbstractSdCustomShowDlg_Impl,SdCustomShowDlg)
- virtual BOOL IsModified() const ;
- virtual BOOL IsCustomShow() const ;
+ virtual sal_Bool IsModified() const ;
+ virtual sal_Bool IsCustomShow() const ;
};
//add for SdCharDlg begin
@@ -87,9 +87,9 @@ class SfxTabDialog;
class AbstractTabDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractTabDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -103,9 +103,9 @@ class SfxTabDialog;
class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( AbstractBulletDialog_Impl,SfxTabDialog )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -117,9 +117,9 @@ class SdPresLayoutTemplateDlg;
class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
{
DECL_ABSTDLG_BASE( SdPresLayoutTemplateDlg_Impl,SdPresLayoutTemplateDlg )
- virtual void SetCurPageId( USHORT nId );
+ virtual void SetCurPageId( sal_uInt16 nId );
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual const USHORT* GetInputRanges( const SfxItemPool& pItem );
+ virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
virtual void SetText( const XubString& rStr );
@@ -133,11 +133,11 @@ class AbstractAssistentDlg_Impl : public AbstractAssistentDlg
DECL_ABSTDLG_BASE(AbstractAssistentDlg_Impl,AssistentDlg)
virtual SfxObjectShellLock GetDocument();
virtual OutputType GetOutputMedium() const;
- virtual BOOL IsSummary() const;
+ virtual sal_Bool IsSummary() const;
virtual StartType GetStartType() const;
virtual String GetDocPath() const;
- virtual BOOL GetStartWithFlag() const;
- virtual BOOL IsDocEmpty() const;
+ virtual sal_Bool GetStartWithFlag() const;
+ virtual sal_Bool IsDocEmpty() const;
virtual String GetPassword();
};
@@ -158,7 +158,7 @@ class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
virtual void GetAttr(SfxItemSet& rOutAttrs);
virtual void HideRadioGroup();
virtual void HideDeleteBtn();
- virtual void SetInputFields(BOOL bEnableX, BOOL bEnableY);
+ virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY);
//from class Window
virtual void SetText( const XubString& rStr );
};
@@ -170,7 +170,7 @@ class AbstractSdInsertLayerDlg_Impl : public AbstractSdInsertLayerDlg
DECL_ABSTDLG_BASE(AbstractSdInsertLayerDlg_Impl,SdInsertLayerDlg)
virtual void GetAttr( SfxItemSet& rOutAttrs ) ;
//from class Window
- virtual void SetHelpId( ULONG nHelpId ) ;
+ virtual void SetHelpId( const rtl::OString& rHelpId ) ;
};
// add for SdInsertPasteDlg
@@ -178,7 +178,7 @@ class SdInsertPasteDlg;
class AbstractSdInsertPasteDlg_Impl : public AbstractSdInsertPasteDlg
{
DECL_ABSTDLG_BASE(AbstractSdInsertPasteDlg_Impl,SdInsertPasteDlg)
- virtual BOOL IsInsertBefore() const;
+ virtual sal_Bool IsInsertBefore() const;
};
// add for SdInsertPagesObjsDlg
@@ -187,9 +187,9 @@ class AbstractSdInsertPagesObjsDlg_Impl : public AbstractSdInsertPagesObjsDlg
{
DECL_ABSTDLG_BASE(AbstractSdInsertPagesObjsDlg_Impl,SdInsertPagesObjsDlg)
virtual ::Window * GetWindow(); //this method is added for return a Window type pointer
- virtual List* GetList( USHORT nType );
- virtual BOOL IsLink();
- virtual BOOL IsRemoveUnnessesaryMasterPages() const;
+ virtual List* GetList( sal_uInt16 nType );
+ virtual sal_Bool IsLink();
+ virtual sal_Bool IsRemoveUnnessesaryMasterPages() const;
};
// add for MorphDlg
@@ -197,9 +197,9 @@ class AbstractMorphDlg_Impl : public AbstractMorphDlg
{
DECL_ABSTDLG_BASE(AbstractMorphDlg_Impl,::sd::MorphDlg)
virtual void SaveSettings() const;
- virtual USHORT GetFadeSteps() const;
- virtual BOOL IsAttributeFade() const ;
- virtual BOOL IsOrientationFade() const ;
+ virtual sal_uInt16 GetFadeSteps() const;
+ virtual sal_Bool IsAttributeFade() const ;
+ virtual sal_Bool IsOrientationFade() const ;
};
// add for SdStartPresentationDlg
@@ -259,12 +259,12 @@ class SdAbstractDialogFactory_Impl : public SdAbstractDialogFactory
{
public:
- virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, ULONG nSumActionCount, ULONG nObjCount );
+ virtual VclAbstractDialog* CreateBreakDlg(::Window* pWindow, ::sd::DrawView* pDrView, ::sd::DrawDocShell* pShell, sal_uLong nSumActionCount, sal_uLong nObjCount );
virtual AbstractCopyDlg* CreateCopyDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, XColorTable* pColTab, ::sd::View* pView );
virtual AbstractSdCustomShowDlg* CreateSdCustomShowDlg( ::Window* pWindow, SdDrawDocument& rDrawDoc );
virtual SfxAbstractTabDialog* CreateSdTabCharDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell );
- virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, BOOL bAreaPage = TRUE );
- virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, BOOL bAutoPilot);
+ virtual SfxAbstractTabDialog* CreateSdTabPageDialog( ::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, sal_Bool bAreaPage = sal_True );
+ virtual AbstractAssistentDlg* CreateAssistentDlg( ::Window* pParent, sal_Bool bAutoPilot);
virtual AbstractSdModifyFieldDlg* CreateSdModifyFieldDlg( ::Window* pWindow, const SvxFieldData* pInField, const SfxItemSet& rSet );
virtual AbstractSdSnapLineDlg* CreateSdSnapLineDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( ::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, String aStr );
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index f7730286787a..f02c915c5339 100644..100755
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -116,17 +116,17 @@ void SdPresLayoutDlg::Reset()
long nName;
// MasterPage austauschen
- if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, FALSE, &pPoolItem ) == SFX_ITEM_SET )
+ if( mrOutAttrs.GetItemState( ATTR_PRESLAYOUT_MASTER_PAGE, sal_False, &pPoolItem ) == SFX_ITEM_SET )
{
- BOOL bMasterPage = ( (const SfxBoolItem*) pPoolItem)->GetValue();
+ sal_Bool bMasterPage = ( (const SfxBoolItem*) pPoolItem)->GetValue();
maCbxMasterPage.Enable( !bMasterPage );
maCbxMasterPage.Check( bMasterPage );
}
// Nicht verwendete MasterPages entfernen
- maCbxCheckMasters.Check(FALSE);
+ maCbxCheckMasters.Check(sal_False);
- if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, TRUE, &pPoolItem) == SFX_ITEM_SET)
+ if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, sal_True, &pPoolItem) == SFX_ITEM_SET)
maName = ((const SfxStringItem*)pPoolItem)->GetValue();
else
maName.Erase();
@@ -141,7 +141,7 @@ void SdPresLayoutDlg::Reset()
}
DBG_ASSERT(nName < mnLayoutCount, "Layout nicht gefunden");
- maVS.SelectItem((USHORT)nName + 1); // Inizes des ValueSets beginnen bei 1
+ maVS.SelectItem((sal_uInt16)nName + 1); // Inizes des ValueSets beginnen bei 1
}
@@ -154,7 +154,7 @@ void SdPresLayoutDlg::Reset()
void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
{
short nId = maVS.GetSelectItemId();
- BOOL bLoad = nId > mnLayoutCount;
+ sal_Bool bLoad = nId > mnLayoutCount;
rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad ) );
String aLayoutName;
@@ -195,9 +195,9 @@ void SdPresLayoutDlg::FillValueSet()
SdDrawDocument* pDoc = mpDocSh->GetDoc();
- USHORT nCount = pDoc->GetMasterPageCount();
+ sal_uInt16 nCount = pDoc->GetMasterPageCount();
- for (USHORT nLayout = 0; nLayout < nCount; nLayout++)
+ for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++)
{
SdPage* pMaster = (SdPage*)pDoc->GetMasterPage(nLayout);
if (pMaster->GetPageKind() == PK_STANDARD)
@@ -207,7 +207,7 @@ void SdPresLayoutDlg::FillValueSet()
mpLayoutNames->Insert(new String(aLayoutName), LIST_APPEND);
Bitmap aBitmap(mpDocSh->GetPagePreviewBitmap(pMaster, 90));
- maVS.InsertItem((USHORT)mpLayoutNames->Count(), aBitmap, aLayoutName);
+ maVS.InsertItem((sal_uInt16)mpLayoutNames->Count(), aBitmap, aLayoutName);
}
}
@@ -244,12 +244,12 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
return 0;
}
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
// Inserted update to force repaint
Update();
String aFile;
- BOOL bCancel = FALSE;
+ sal_Bool bCancel = sal_False;
switch (nResult)
{
@@ -268,14 +268,14 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
break;
default:
- bCancel = TRUE;
+ bCancel = sal_True;
}
delete pDlg;
if( !bCancel )
{
// Pruefen, ob Vorlage schon vorhanden
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
String* pName = (String*)mpLayoutNames->First();
String aCompareStr( maName );
if( maName.Len() == 0 )
@@ -285,9 +285,9 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
{
if( aCompareStr == *pName )
{
- bExists = TRUE;
+ bExists = sal_True;
// Vorlage selektieren
- USHORT nId = (USHORT) mpLayoutNames->GetCurPos() + 1;
+ sal_uInt16 nId = (sal_uInt16) mpLayoutNames->GetCurPos() + 1;
maVS.SelectItem( nId );
}
pName = (String*)mpLayoutNames->Next();
@@ -306,9 +306,9 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
{
::sd::DrawDocShell* pTemplDocSh= pTemplDoc->GetDocSh();
- USHORT nCount = pTemplDoc->GetMasterPageCount();
+ sal_uInt16 nCount = pTemplDoc->GetMasterPageCount();
- for (USHORT nLayout = 0; nLayout < nCount; nLayout++)
+ for (sal_uInt16 nLayout = 0; nLayout < nCount; nLayout++)
{
SdPage* pMaster = (SdPage*) pTemplDoc->GetMasterPage(nLayout);
if (pMaster->GetPageKind() == PK_STANDARD)
@@ -318,13 +318,13 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
mpLayoutNames->Insert(new String(aLayoutName), LIST_APPEND);
Bitmap aBitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster, 90));
- maVS.InsertItem((USHORT)mpLayoutNames->Count(), aBitmap, aLayoutName);
+ maVS.InsertItem((sal_uInt16)mpLayoutNames->Count(), aBitmap, aLayoutName);
}
}
}
else
{
- bCancel = TRUE;
+ bCancel = sal_True;
}
pDoc->CloseBookmarkDoc();
@@ -333,14 +333,14 @@ IMPL_LINK(SdPresLayoutDlg, ClickLoadHdl, void *, EMPTYARG)
{
// leeres Layout
mpLayoutNames->Insert( new String( maStrNone ), LIST_APPEND );
- maVS.InsertItem( (USHORT) mpLayoutNames->Count(),
+ maVS.InsertItem( (sal_uInt16) mpLayoutNames->Count(),
Bitmap( SdResId( BMP_FOIL_NONE ) ), maStrNone );
}
if (!bCancel)
{
// Vorlage selektieren
- maVS.SelectItem( (USHORT) mpLayoutNames->Count() );
+ maVS.SelectItem( (sal_uInt16) mpLayoutNames->Count() );
}
}
}
diff --git a/sd/source/ui/dlg/sdpreslt.src b/sd/source/ui/dlg/sdpreslt.src
index cc0d63f98443..8ec56c9a320b 100644
--- a/sd/source/ui/dlg/sdpreslt.src
+++ b/sd/source/ui/dlg/sdpreslt.src
@@ -27,9 +27,11 @@
#include "app.hrc"
#include "sdpreslt.hrc"
+#include "sdcommands.h"
+
ModalDialog DLG_PRESLT
{
- HelpID = SID_PRESENTATION_LAYOUT ;
+ HelpID = CMD_SID_PRESENTATION_LAYOUT ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 212 , 185 ) ;
@@ -63,6 +65,7 @@ ModalDialog DLG_PRESLT
};
CheckBox CBX_MASTER_PAGE
{
+ HelpID = "sd:CheckBox:DLG_PRESLT:CBX_MASTER_PAGE";
Pos = MAP_APPFONT ( 6 , 158 ) ;
Size = MAP_APPFONT ( 120 , 12 ) ;
TabStop = TRUE ;
@@ -70,6 +73,7 @@ ModalDialog DLG_PRESLT
};
CheckBox CBX_CHECK_MASTERS
{
+ HelpID = "sd:CheckBox:DLG_PRESLT:CBX_CHECK_MASTERS";
Pos = MAP_APPFONT ( 6 , 170 ) ;
Size = MAP_APPFONT ( 140 , 12 ) ;
TabStop = TRUE ;
@@ -77,6 +81,7 @@ ModalDialog DLG_PRESLT
};
PushButton BTN_LOAD
{
+ HelpID = "sd:PushButton:DLG_PRESLT:BTN_LOAD";
Pos = MAP_APPFONT ( 156 , 155 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 8240449a2c82..891a3cdbccc3 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -75,9 +75,9 @@ public:
};
-BOOL SD_DLLPRIVATE SdPageObjsTLB::bIsInDrag = FALSE;
+sal_Bool SD_DLLPRIVATE SdPageObjsTLB::bIsInDrag = sal_False;
-BOOL SdPageObjsTLB::IsInDrag()
+sal_Bool SdPageObjsTLB::IsInDrag()
{
return bIsInDrag;
}
@@ -94,7 +94,7 @@ SdPageObjsTLB::SdPageObjsTransferable::SdPageObjsTransferable(
::sd::DrawDocShell& rDocShell,
NavigatorDragType eDragType,
const ::com::sun::star::uno::Any& rTreeListBoxData )
- : SdTransferable(rDocShell.GetDoc(), NULL, TRUE),
+ : SdTransferable(rDocShell.GetDoc(), NULL, sal_True),
mrParent( rParent ),
maBookmark( rBookmark ),
mrDocShell( rDocShell ),
@@ -123,7 +123,7 @@ void SdPageObjsTLB::SdPageObjsTransferable::AddSupportedFormats()
sal_Bool SdPageObjsTLB::SdPageObjsTransferable::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor )
{
- ULONG nFormatId = SotExchange::GetFormat( rFlavor );
+ sal_uLong nFormatId = SotExchange::GetFormat( rFlavor );
switch (nFormatId)
{
case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK:
@@ -240,17 +240,18 @@ SdPageObjsTLB::SdPageObjsTLB( Window* pParentWin, const SdResId& rSdResId )
, mpOwnMedium ( NULL )
, maImgOle ( BitmapEx( SdResId( BMP_OLE ) ) )
, maImgGraphic ( BitmapEx( SdResId( BMP_GRAPHIC ) ) )
-, mbLinkableSelected ( FALSE )
+, mbLinkableSelected ( sal_False )
, mpDropNavWin ( NULL )
, mbShowAllShapes ( false )
, mbShowAllPages ( false )
{
// Tree-ListBox mit Linien versehen
- SetWindowBits( WinBits( WB_TABSTOP | WB_BORDER | WB_HASLINES |
- WB_HASBUTTONS | // WB_HASLINESATROOT |
- WB_HSCROLL |
- WB_HASBUTTONSATROOT ) );
+ SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
+ WB_HASBUTTONS | // WB_HASLINESATROOT |
+ WB_HSCROLL |
+ WB_HASBUTTONSATROOT |
+ WB_QUICK_SEARCH /* i31275 */ );
SetNodeBitmaps( Bitmap( SdResId( BMP_EXPAND ) ),
Bitmap( SdResId( BMP_COLLAPSE ) ) );
@@ -312,9 +313,9 @@ String SdPageObjsTLB::GetObjectName(
|*
\************************************************************************/
-BOOL SdPageObjsTLB::SelectEntry( const String& rName )
+sal_Bool SdPageObjsTLB::SelectEntry( const String& rName )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if( rName.Len() )
{
@@ -326,7 +327,7 @@ BOOL SdPageObjsTLB::SelectEntry( const String& rName )
aTmp = GetEntryText( pEntry );
if( aTmp == rName )
{
- bFound = TRUE;
+ bFound = sal_True;
SetCurEntry( pEntry );
}
}
@@ -340,10 +341,10 @@ BOOL SdPageObjsTLB::SelectEntry( const String& rName )
|*
\************************************************************************/
-BOOL SdPageObjsTLB::HasSelectedChilds( const String& rName )
+sal_Bool SdPageObjsTLB::HasSelectedChilds( const String& rName )
{
- BOOL bFound = FALSE;
- BOOL bChilds = FALSE;
+ sal_Bool bFound = sal_False;
+ sal_Bool bChilds = sal_False;
if( rName.Len() )
{
@@ -355,11 +356,11 @@ BOOL SdPageObjsTLB::HasSelectedChilds( const String& rName )
aTmp = GetEntryText( pEntry );
if( aTmp == rName )
{
- bFound = TRUE;
- BOOL bExpanded = IsExpanded( pEntry );
+ bFound = sal_True;
+ sal_Bool bExpanded = IsExpanded( pEntry );
long nCount = GetChildSelectionCount( pEntry );
if( bExpanded && nCount > 0 )
- bChilds = TRUE;
+ bChilds = sal_True;
}
}
}
@@ -373,7 +374,7 @@ BOOL SdPageObjsTLB::HasSelectedChilds( const String& rName )
|*
\************************************************************************/
-void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages,
+void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, sal_Bool bAllPages,
const String& rDocName)
{
String aSelection;
@@ -385,7 +386,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages,
mpDoc = pInDoc;
maDocName = rDocName;
- mbShowAllPages = (bAllPages == TRUE);
+ mbShowAllPages = (bAllPages == sal_True);
mpMedium = NULL;
SdPage* pPage = NULL;
@@ -393,8 +394,8 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages,
IconProvider aIconProvider;
// first insert all pages including objects
- USHORT nPage = 0;
- const USHORT nMaxPages = mpDoc->GetPageCount();
+ sal_uInt16 nPage = 0;
+ const sal_uInt16 nMaxPages = mpDoc->GetPageCount();
while( nPage < nMaxPages )
{
@@ -402,7 +403,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages,
if( (mbShowAllPages || pPage->GetPageKind() == PK_STANDARD)
&& !(pPage->GetPageKind()==PK_HANDOUT) ) //#94954# never list the normal handout page ( handout-masterpage is used instead )
{
- BOOL bPageExluded = pPage->IsExcluded();
+ sal_Bool bPageExluded = pPage->IsExcluded();
bool bPageBelongsToShow = PageBelongsToCurrentShow (pPage);
bPageExluded |= !bPageBelongsToShow;
@@ -416,7 +417,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, BOOL bAllPages,
if( mbShowAllPages )
{
nPage = 0;
- const USHORT nMaxMasterPages = mpDoc->GetMasterPageCount();
+ const sal_uInt16 nMaxMasterPages = mpDoc->GetMasterPageCount();
while( nPage < nMaxMasterPages )
{
@@ -479,7 +480,7 @@ void SdPageObjsTLB::AddShapeList (
aIcon,
aIcon,
pParentEntry,
- FALSE,
+ sal_False,
LIST_APPEND,
pUserData);
@@ -487,7 +488,7 @@ void SdPageObjsTLB::AddShapeList (
rList,
!rList.HasObjectNavigationOrder() /* use navigation order, if available */,
IM_FLAT,
- FALSE /*not reverse*/);
+ sal_False /*not reverse*/);
while( aIter.IsMore() )
{
@@ -506,7 +507,7 @@ void SdPageObjsTLB::AddShapeList (
maImgOle,
maImgOle,
pEntry,
- FALSE,
+ sal_False,
LIST_APPEND,
pObj
);
@@ -518,7 +519,7 @@ void SdPageObjsTLB::AddShapeList (
maImgGraphic,
maImgGraphic,
pEntry,
- FALSE,
+ sal_False,
LIST_APPEND,
pObj
);
@@ -541,7 +542,7 @@ void SdPageObjsTLB::AddShapeList (
rIconProvider.maImgObjects,
rIconProvider.maImgObjects,
pEntry,
- FALSE,
+ sal_False,
LIST_APPEND,
pObj
);
@@ -597,13 +598,13 @@ bool SdPageObjsTLB::GetShowAllShapes (void) const
|*
\************************************************************************/
-BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
+sal_Bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
{
if( pInDoc )
mpDoc = pInDoc;
if( !mpDoc )
- return( FALSE );
+ return( sal_False );
SdrObject* pObj = NULL;
SdPage* pPage = NULL;
@@ -611,8 +612,8 @@ BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
String aName;
// Alle Pages incl. Objekte vergleichen
- USHORT nPage = 0;
- const USHORT nMaxPages = mpDoc->GetPageCount();
+ sal_uInt16 nPage = 0;
+ const sal_uInt16 nMaxPages = mpDoc->GetPageCount();
while( nPage < nMaxPages )
{
@@ -620,11 +621,11 @@ BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
if( pPage->GetPageKind() == PK_STANDARD )
{
if( !pEntry )
- return( FALSE );
+ return( sal_False );
aName = GetEntryText( pEntry );
if( pPage->GetName() != aName )
- return( FALSE );
+ return( sal_False );
pEntry = Next( pEntry );
@@ -642,12 +643,12 @@ BOOL SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
if( aObjectName.Len() )
{
if( !pEntry )
- return( FALSE );
+ return( sal_False );
aName = GetEntryText( pEntry );
if( aObjectName != aName )
- return( FALSE );
+ return( sal_False );
pEntry = Next( pEntry );
}
@@ -679,14 +680,14 @@ String SdPageObjsTLB::GetSelectEntry()
|*
\************************************************************************/
-List* SdPageObjsTLB::GetSelectEntryList( USHORT nDepth )
+List* SdPageObjsTLB::GetSelectEntryList( sal_uInt16 nDepth )
{
List* pList = NULL;
SvLBoxEntry* pEntry = FirstSelected();
while( pEntry )
{
- USHORT nListDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nListDepth = GetModel()->GetDepth( pEntry );
if( nListDepth == nDepth )
{
if( !pList )
@@ -724,8 +725,8 @@ void SdPageObjsTLB::RequestingChilds( SvLBoxEntry* pFileEntry )
// document name already inserted
// only insert all "normal" ? slides with objects
- USHORT nPage = 0;
- const USHORT nMaxPages = mpBookmarkDoc->GetPageCount();
+ sal_uInt16 nPage = 0;
+ const sal_uInt16 nMaxPages = mpBookmarkDoc->GetPageCount();
while( nPage < nMaxPages )
{
@@ -736,7 +737,7 @@ void SdPageObjsTLB::RequestingChilds( SvLBoxEntry* pFileEntry )
aImgPage,
aImgPage,
pFileEntry,
- FALSE,
+ sal_False,
LIST_APPEND,
reinterpret_cast< void* >( 1 ) );
@@ -812,7 +813,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
if( pMed )
{
// in this mode the document is also owned and controlled by this instance
- mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, TRUE);
+ mxBookmarkDocShRef = new ::sd::DrawDocShell(SFX_CREATE_MODE_STANDARD, sal_True);
if (mxBookmarkDocShRef->DoLoad(pMed))
mpBookmarkDoc = mxBookmarkDocShRef->GetDoc();
else
@@ -837,7 +838,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
/*************************************************************************
|*
-|* Bookmark-Dokument schlieáen und loeschen
+|* Bookmark-Dokument schlie�en und loeschen
|*
\************************************************************************/
@@ -875,12 +876,12 @@ void SdPageObjsTLB::SelectHdl()
{
SvLBoxEntry* pEntry = FirstSelected();
- mbLinkableSelected = TRUE;
+ mbLinkableSelected = sal_True;
while( pEntry && mbLinkableSelected )
{
if( NULL == pEntry->GetUserData() )
- mbLinkableSelected = FALSE;
+ mbLinkableSelected = sal_False;
pEntry = NextSelected( pEntry );
}
@@ -941,26 +942,26 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
// Select all entries and disable them as drop targets.
SetSelectionMode(MULTIPLE_SELECTION);
- SetCursor(NULL, FALSE);
- SelectAll(TRUE, FALSE);
- EnableSelectionAsDropTarget(FALSE, TRUE);
+ SetCursor(NULL, sal_False);
+ SelectAll(sal_True, sal_False);
+ EnableSelectionAsDropTarget(sal_False, sal_True);
// Enable only the entries as drop targets that are children of the
// page under the mouse.
SvLBoxEntry* pParent = GetRootLevelParent(pEntry);
if (pParent != NULL)
{
- SelectAll(FALSE, FALSE);
- Select(pParent, TRUE);
+ SelectAll(sal_False, sal_False);
+ Select(pParent, sal_True);
// for (SvLBoxEntry*pChild=FirstChild(pParent); pChild!=NULL; pChild=NextSibling(pChild))
- // Select(pChild, TRUE);
- EnableSelectionAsDropTarget(TRUE, TRUE);//FALSE);
+ // Select(pChild, sal_True);
+ EnableSelectionAsDropTarget(sal_True, sal_True);//sal_False);
}
// Set selection back to the entry under the mouse.
- SelectAll(FALSE,FALSE);
+ SelectAll(sal_False,sal_False);
SetSelectionMode(SINGLE_SELECTION);
- Select(pEntry, TRUE);
+ Select(pEntry, sal_True);
// Aus dem ExecuteDrag heraus kann der Navigator geloescht werden
// (beim Umschalten auf einen anderen Dokument-Typ), das wuerde aber
@@ -999,7 +1000,7 @@ void SdPageObjsTLB::DoDrag()
SvTreeListBox::ReleaseMouse();
- bIsInDrag = TRUE;
+ bIsInDrag = sal_True;
SvLBoxDDInfo aDDInfo;
memset(&aDDInfo,0,sizeof(SvLBoxDDInfo));
@@ -1078,7 +1079,7 @@ void SdPageObjsTLB::OnDragFinished( sal_uInt8 )
}
mpDropNavWin = NULL;
- bIsInDrag = FALSE;
+ bIsInDrag = sal_False;
}
/*************************************************************************
@@ -1100,7 +1101,7 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent)
SvLBoxEntry* pEntry = GetDropTarget(rEvent.maPosPixel);
if (rEvent.mbLeaving || !CheckDragAndDropMode( this, rEvent.mnAction ))
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
}
else if( !nDragDropMode )
{
@@ -1113,16 +1114,16 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent)
// Draw emphasis.
if (pEntry != pTargetEntry || !(nImpFlags & SVLBOX_TARGEMPH_VIS))
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pTargetEntry = pEntry;
- ImplShowTargetEmphasis( pTargetEntry, TRUE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_True );
}
}
}
// Hide emphasis when there is no valid drop action.
if (nResult == DND_ACTION_NONE)
- ImplShowTargetEmphasis(pTargetEntry, FALSE);
+ ImplShowTargetEmphasis(pTargetEntry, sal_False);
return nResult;
}
@@ -1142,7 +1143,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt )
if( !bIsInDrag )
{
SdNavigatorWin* pNavWin = NULL;
- USHORT nId = SID_NAVIGATOR;
+ sal_uInt16 nId = SID_NAVIGATOR;
if( mpFrame->HasChildWindow( nId ) )
pNavWin = (SdNavigatorWin*)( mpFrame->GetChildWindow( nId )->GetContextWindow( SD_MOD() ) );
@@ -1200,7 +1201,7 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
List* pShowList = const_cast<SdDrawDocument*>(mpDoc)->GetCustomShowList();
if (pShowList != NULL)
{
- ULONG nCurrentShowIndex = pShowList->GetCurPos();
+ sal_uLong nCurrentShowIndex = pShowList->GetCurPos();
void* pObject = pShowList->GetObject(nCurrentShowIndex);
pCustomShow = static_cast<SdCustomShow*>(pObject);
}
@@ -1209,8 +1210,8 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
if (pCustomShow != NULL)
{
bBelongsToShow = false;
- ULONG nPageCount = pCustomShow->Count();
- for (USHORT i=0; i<nPageCount && !bBelongsToShow; i++)
+ sal_uLong nPageCount = pCustomShow->Count();
+ for (sal_uInt16 i=0; i<nPageCount && !bBelongsToShow; i++)
if (pPage == static_cast<SdPage*>(pCustomShow->GetObject (i)))
bBelongsToShow = true;
}
@@ -1222,11 +1223,11 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
-BOOL SdPageObjsTLB::NotifyMoving(
+sal_Bool SdPageObjsTLB::NotifyMoving(
SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos)
+ sal_uLong& rNewChildPos)
{
SvLBoxEntry* pDestination = pTarget;
while (GetParent(pDestination) != NULL && GetParent(GetParent(pDestination)) != NULL)
@@ -1255,7 +1256,7 @@ BOOL SdPageObjsTLB::NotifyMoving(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
else if (GetParent(pDestination) == NULL)
{
@@ -1269,10 +1270,10 @@ BOOL SdPageObjsTLB::NotifyMoving(
rNewChildPos += nCurEntrySelPos;
nCurEntrySelPos++;
}
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
@@ -1379,7 +1380,7 @@ void SdPageObjsTLB::AddShapeToTransferable (
aObjectDescriptor.maDisplayName = pDocShell->GetMedium()->GetURLObject().GetURLNoPass();
else
aObjectDescriptor.maDisplayName = String();
- aObjectDescriptor.mbCanLink = FALSE;
+ aObjectDescriptor.mbCanLink = sal_False;
rTransferable.SetStartPos(aDragPos);
rTransferable.SetObjectDescriptor( aObjectDescriptor );
diff --git a/sd/source/ui/dlg/tabtempl.cxx b/sd/source/ui/dlg/tabtempl.cxx
index 972b0840f47e..fc8333658ba1 100644..100755
--- a/sd/source/ui/dlg/tabtempl.cxx
+++ b/sd/source/ui/dlg/tabtempl.cxx
@@ -71,7 +71,7 @@ SdTabTemplateDlg::SdTabTemplateDlg( Window* pParent,
SfxStyleSheetBase& rStyleBase,
SdrModel* pModel,
SdrView* pView ) :
- SfxStyleDialog ( pParent, SdResId( TAB_TEMPLATE ), rStyleBase, FALSE ),
+ SfxStyleDialog ( pParent, SdResId( TAB_TEMPLATE ), rStyleBase, sal_False ),
rDocShell ( *pDocShell ),
pSdrView ( pView ),
pColorTab ( pModel->GetColorTable() ),
@@ -122,7 +122,7 @@ SdTabTemplateDlg::~SdTabTemplateDlg()
// -----------------------------------------------------------------------
-void SdTabTemplateDlg::PageCreated( USHORT nId, SfxTabPage &rPage )
+void SdTabTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
switch( nId )
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 2b6df6cee5db..1187be030f1f 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/embed/VerbAttributes.hpp>
#include "sdattr.hxx"
-
+#include <sfx2/sfxresid.hxx>
#include <vcl/waitobj.hxx>
#include <osl/file.hxx>
@@ -141,8 +141,11 @@ SdTPAction::SdTPAction( Window* pWindow, const SfxItemSet& rInAttrs ) :
rOutAttrs ( rInAttrs ),
mpView ( NULL ),
mpDoc ( NULL ),
- bTreeUpdated ( FALSE )
+ bTreeUpdated ( sal_False )
{
+ aEdtSound.SetAccessibleName(String(SdResId(STR_PATHNAME)));
+ aBtnSeek.SetAccessibleRelationMemberOf( &aFlSeparator );
+
FreeResource();
aBtnSearch.SetClickHdl( LINK( this, SdTPAction, ClickSearchHdl ) );
@@ -202,7 +205,7 @@ void SdTPAction::Construct()
// OLE-Actionlistbox auffuellen
SdrOle2Obj* pOleObj = NULL;
SdrGrafObj* pGrafObj = NULL;
- BOOL bOLEAction = FALSE;
+ sal_Bool bOLEAction = sal_False;
if ( mpView->AreObjectsMarked() )
{
@@ -214,8 +217,8 @@ void SdTPAction::Construct()
SdrMark* pMark = rMarkList.GetMark(0);
pObj = pMark->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
{
@@ -228,13 +231,13 @@ void SdTPAction::Construct()
// // VCXControl ?
// else if( pObj->IsA( TYPE( VCSbxDrawObject ) ) )
// {
-// bDisableAll = TRUE;
+// bDisableAll = sal_True;
// }
}
}
if( pGrafObj )
{
- bOLEAction = TRUE;
+ bOLEAction = sal_True;
aVerbVector.push_back( 0 );
aLbOLEAction.InsertEntry( MnemonicGenerator::EraseAllMnemonicChars( String( SdResId( STR_EDIT_OBJ ) ) ) );
@@ -244,7 +247,7 @@ void SdTPAction::Construct()
uno::Reference < embed::XEmbeddedObject > xObj = pOleObj->GetObjRef();
if ( xObj.is() )
{
- bOLEAction = TRUE;
+ bOLEAction = sal_True;
uno::Sequence < embed::VerbDescriptor > aVerbs;
try
{
@@ -270,24 +273,24 @@ void SdTPAction::Construct()
}
pCurrentActions = new List;
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_NONE, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_PREVPAGE, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_NEXTPAGE, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_FIRSTPAGE, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_LASTPAGE, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_BOOKMARK, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_DOCUMENT, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_SOUND, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_NONE, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_PREVPAGE, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_NEXTPAGE, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_FIRSTPAGE, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_LASTPAGE, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_BOOKMARK, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_DOCUMENT, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_SOUND, LIST_APPEND);
if( bOLEAction && aLbOLEAction.GetEntryCount() )
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_VERB, LIST_APPEND );
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_PROGRAM, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_MACRO, LIST_APPEND);
- pCurrentActions->Insert((void*)(ULONG)presentation::ClickAction_STOPPRESENTATION, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_VERB, LIST_APPEND );
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_PROGRAM, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_MACRO, LIST_APPEND);
+ pCurrentActions->Insert((void*)(sal_uIntPtr)presentation::ClickAction_STOPPRESENTATION, LIST_APPEND);
// Action-Listbox fuellen
- for (ULONG nAction = 0; nAction < pCurrentActions->Count(); nAction++)
+ for (sal_uLong nAction = 0; nAction < pCurrentActions->Count(); nAction++)
{
- USHORT nRId = GetClickActionSdResId((presentation::ClickAction)(ULONG)pCurrentActions->GetObject(nAction));
+ sal_uInt16 nRId = GetClickActionSdResId((presentation::ClickAction)(sal_uLong)pCurrentActions->GetObject(nAction));
aLbAction.InsertEntry( String( SdResId( nRId ) ) );
}
@@ -295,9 +298,9 @@ void SdTPAction::Construct()
// -----------------------------------------------------------------------
-BOOL SdTPAction::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTPAction::FillItemSet( SfxItemSet& rAttrs )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
presentation::ClickAction eCA = presentation::ClickAction_NONE;
if( aLbAction.GetSelectEntryCount() )
@@ -305,13 +308,13 @@ BOOL SdTPAction::FillItemSet( SfxItemSet& rAttrs )
if( aLbAction.GetSavedValue() != aLbAction.GetSelectEntryPos() )
{
- rAttrs.Put( SfxAllEnumItem( ATTR_ACTION, (USHORT)eCA ) );
- bModified = TRUE;
+ rAttrs.Put( SfxAllEnumItem( ATTR_ACTION, (sal_uInt16)eCA ) );
+ bModified = sal_True;
}
else
rAttrs.InvalidateItem( ATTR_ACTION );
- String aFileName = GetEditText( TRUE );
+ String aFileName = GetEditText( sal_True );
if( aFileName.Len() == 0 )
rAttrs.InvalidateItem( ATTR_ACTION_FILENAME );
else
@@ -327,7 +330,7 @@ BOOL SdTPAction::FillItemSet( SfxItemSet& rAttrs )
INetURLObject::DECODE_UNAMBIGUOUS );
rAttrs.Put( SfxStringItem( ATTR_ACTION_FILENAME, aFileName ) );
- bModified = TRUE;
+ bModified = sal_True;
}
else
{
@@ -367,7 +370,7 @@ void SdTPAction::Reset( const SfxItemSet& rAttrs )
case presentation::ClickAction_BOOKMARK:
{
if( !aLbTree.SelectEntry( aFileName ) )
- aLbTree.SelectAll( FALSE );
+ aLbTree.SelectAll( sal_False );
}
break;
@@ -418,8 +421,8 @@ void SdTPAction::UpdateTree()
if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
{
//aLbTree.Clear();
- aLbTree.Fill( mpDoc, TRUE, mpDoc->GetDocSh()->GetMedium()->GetName() );
- bTreeUpdated = TRUE;
+ aLbTree.Fill( mpDoc, sal_True, mpDoc->GetDocSh()->GetMedium()->GetName() );
+ bTreeUpdated = sal_True;
}
}
@@ -429,11 +432,11 @@ void SdTPAction::OpenFileDialog()
{
// Soundpreview nur fuer Interaktionen mit Sound
presentation::ClickAction eCA = GetActualClickAction();
- BOOL bSound = ( eCA == presentation::ClickAction_SOUND );
- BOOL bPage = ( eCA == presentation::ClickAction_BOOKMARK );
- BOOL bDocument = ( eCA == presentation::ClickAction_DOCUMENT ||
+ sal_Bool bSound = ( eCA == presentation::ClickAction_SOUND );
+ sal_Bool bPage = ( eCA == presentation::ClickAction_BOOKMARK );
+ sal_Bool bDocument = ( eCA == presentation::ClickAction_DOCUMENT ||
eCA == presentation::ClickAction_PROGRAM );
- BOOL bMacro = ( eCA == presentation::ClickAction_MACRO );
+ sal_Bool bMacro = ( eCA == presentation::ClickAction_MACRO );
if( bPage )
{
@@ -488,7 +491,7 @@ void SdTPAction::OpenFileDialog()
// filter makes the (Windows system) open file dialog follow
// links on the desktop to directories.
aFileDialog.AddFilter (
- String (SdResId (STR_SFX_FILTERNAME_ALL)),
+ String (SfxResId (STR_SFX_FILTERNAME_ALL)),
String (RTL_CONSTASCII_USTRINGPARAM("*.*")));
@@ -708,7 +711,7 @@ IMPL_LINK( SdTPAction, CheckFileHdl, void *, EMPTYARG )
// Ueberpruefen, ob es eine gueltige Draw-Datei ist
SfxMedium aMedium( aFile,
STREAM_READ | STREAM_NOCREATE,
- TRUE ); // Download
+ sal_True ); // Download
if( aMedium.IsStorage() )
{
@@ -730,7 +733,7 @@ IMPL_LINK( SdTPAction, CheckFileHdl, void *, EMPTYARG )
aLastFile = aFile;
aLbTreeDocument.Clear();
- aLbTreeDocument.Fill( pBookmarkDoc, TRUE, aFile );
+ aLbTreeDocument.Fill( pBookmarkDoc, sal_True, aFile );
mpDoc->CloseBookmarkDoc();
aLbTreeDocument.Show();
}
@@ -753,10 +756,10 @@ IMPL_LINK( SdTPAction, CheckFileHdl, void *, EMPTYARG )
presentation::ClickAction SdTPAction::GetActualClickAction()
{
presentation::ClickAction eCA = presentation::ClickAction_NONE;
- USHORT nPos = aLbAction.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbAction.GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
- eCA = (presentation::ClickAction)(ULONG)pCurrentActions->GetObject((ULONG)nPos);
+ eCA = (presentation::ClickAction)(sal_uLong)pCurrentActions->GetObject((sal_uLong)nPos);
return( eCA );
}
@@ -764,7 +767,7 @@ presentation::ClickAction SdTPAction::GetActualClickAction()
void SdTPAction::SetActualClickAction( presentation::ClickAction eCA )
{
- USHORT nPos = (USHORT)pCurrentActions->GetPos((void*)(ULONG)eCA);
+ sal_uInt16 nPos = (sal_uInt16)pCurrentActions->GetPos((void*)(sal_uLong)eCA);
DBG_ASSERT(nPos != 0xffff, "unbekannte Interaktion");
aLbAction.SelectEntryPos(nPos);
}
@@ -834,7 +837,7 @@ void SdTPAction::SetEditText( String const & rStr )
//------------------------------------------------------------------------
-String SdTPAction::GetEditText( BOOL bFullDocDestination )
+String SdTPAction::GetEditText( sal_Bool bFullDocDestination )
{
String aStr;
presentation::ClickAction eCA = GetActualClickAction();
@@ -846,7 +849,7 @@ String SdTPAction::GetEditText( BOOL bFullDocDestination )
break;
case presentation::ClickAction_VERB:
{
- const USHORT nPos = aLbOLEAction.GetSelectEntryPos();
+ const sal_uInt16 nPos = aLbOLEAction.GetSelectEntryPos();
if( nPos < aVerbVector.size() )
aStr = UniString::CreateFromInt32( aVerbVector[ nPos ] );
return aStr;
@@ -901,7 +904,7 @@ String SdTPAction::GetEditText( BOOL bFullDocDestination )
//------------------------------------------------------------------------
-USHORT SdTPAction::GetClickActionSdResId( presentation::ClickAction eCA )
+sal_uInt16 SdTPAction::GetClickActionSdResId( presentation::ClickAction eCA )
{
switch( eCA )
{
diff --git a/sd/source/ui/dlg/tpaction.src b/sd/source/ui/dlg/tpaction.src
index fa951644c580..79cd333c9300 100644..100755
--- a/sd/source/ui/dlg/tpaction.src
+++ b/sd/source/ui/dlg/tpaction.src
@@ -32,7 +32,7 @@
TabPage TP_ANIMATION
{
- HelpID = SID_ANIMATION_EFFECTS ;
+ HelpID = CMD_SID_ANIMATION_EFFECTS ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( 260 , 164 ) ;
Hide = TRUE;
@@ -48,6 +48,7 @@ TabPage TP_ANIMATION
};
ListBox LB_ACTION
{
+ HelpID = "sd:ListBox:TP_ANIMATION:LB_ACTION";
Border = TRUE ;
Pos = MAP_APPFONT ( MA_ACTIONLB_LEFT , MA_ACTIONLB_TOP ) ;
Size = MAP_APPFONT ( 150 - RSC_SP_GRP_INNERBORDER_RIGHT , 79 ) ;
@@ -66,6 +67,7 @@ TabPage TP_ANIMATION
Edit EDT_SOUND
{
+ HelpID = "sd:Edit:TP_ANIMATION:EDT_SOUND";
Border = TRUE ;
Pos = MAP_APPFONT ( RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + RSC_SP_CHK_TEXTINDENT , MA_Y4 + RSC_CD_CHECKBOX_HEIGHT + 1 ) ;
Size = MAP_APPFONT ( 247 - 65 - 10 - (RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT + RSC_SP_CHK_TEXTINDENT) , 12 ) ;
@@ -77,6 +79,7 @@ TabPage TP_ANIMATION
// schiedlich heissen, da sie eben auch eine unterschiedliche Bedeutung haben
PushButton BTN_SEARCH
{
+ HelpID = "sd:PushButton:TP_ANIMATION:BTN_SEARCH";
Pos = MAP_APPFONT ( 247 - 65, MA_Y4 + RSC_CD_CHECKBOX_HEIGHT ) ;
Size = MAP_APPFONT ( 65 , 14 ) ;
TabStop = TRUE ;
@@ -112,6 +115,7 @@ TabPage TP_ANIMATION
};
ListBox LB_OLE_ACTION
{
+ HelpID = "sd:ListBox:TP_ANIMATION:LB_OLE_ACTION";
Border = TRUE ;
Pos = MAP_APPFONT ( MA_ACTIONLB_LEFT, MA_Y0 + 3 ) ;
Size = MAP_APPFONT ( 150 - RSC_SP_GRP_INNERBORDER_RIGHT , 77 ) ;
@@ -126,6 +130,7 @@ TabPage TP_ANIMATION
};
Edit EDT_BOOKMARK
{
+ HelpID = "sd:Edit:TP_ANIMATION:EDT_BOOKMARK";
Border = TRUE ;
Pos = MAP_APPFONT ( RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT , MA_Y4 + RSC_CD_CHECKBOX_HEIGHT + 1 ) ;
Size = MAP_APPFONT ( 247 - 65 - 10 - (RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT) , 12 ) ;
@@ -134,6 +139,7 @@ TabPage TP_ANIMATION
};
Edit EDT_DOCUMENT
{
+ HelpID = "sd:Edit:TP_ANIMATION:EDT_DOCUMENT";
Border = TRUE ;
Pos = MAP_APPFONT ( RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT , MA_Y4 + RSC_CD_CHECKBOX_HEIGHT + 1 ) ;
Size = MAP_APPFONT ( 247 - 65 - 10 - (RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT) , 12 ) ;
@@ -142,6 +148,7 @@ TabPage TP_ANIMATION
};
Edit EDT_PROGRAM
{
+ HelpID = "sd:Edit:TP_ANIMATION:EDT_PROGRAM";
Border = TRUE ;
Pos = MAP_APPFONT ( RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT , MA_Y4 + RSC_CD_CHECKBOX_HEIGHT + 1 ) ;
Size = MAP_APPFONT ( 247 - 65 - 10 - (RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT) , 12 ) ;
@@ -150,6 +157,7 @@ TabPage TP_ANIMATION
};
Edit EDT_MACRO
{
+ HelpID = "sd:Edit:TP_ANIMATION:EDT_MACRO";
Border = TRUE ;
Pos = MAP_APPFONT ( RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT , MA_Y4 + RSC_CD_CHECKBOX_HEIGHT + 1 ) ;
Size = MAP_APPFONT ( 247 - 65 - 10 - (RSC_SP_DLG_INNERBORDER_LEFT + RSC_SP_FLGR_INNERBORDER_LEFT) , 12 ) ;
@@ -158,13 +166,17 @@ TabPage TP_ANIMATION
};
PushButton BTN_SEEK
{
+ HelpID = "sd:PushButton:TP_ANIMATION:BTN_SEEK";
Pos = MAP_APPFONT ( 247 - 65, MA_Y4 + RSC_CD_CHECKBOX_HEIGHT ) ;
Size = MAP_APPFONT ( 65 , 14 ) ;
TabStop = TRUE ;
Hide = TRUE ;
Text [ en-US ] = "~Find" ;
};
-
+ String STR_PATHNAME
+ {
+ Text [ en-US ] = "Path Name";
+ };
Text [ en-US ] = "Interaction";
};
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 6127329e82fd..8f1c4135e3a2 100644..100755
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -97,7 +97,7 @@ SdTpOptionsSnap::~SdTpOptionsSnap()
// -----------------------------------------------------------------------
-BOOL SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
{
SvxGridTabPage::FillItemSet(rAttrs);
SdOptionsSnapItem* pOptsItem = NULL;
@@ -110,16 +110,16 @@ BOOL SdTpOptionsSnap::FillItemSet( SfxItemSet& rAttrs )
aOptsItem.GetOptionsSnap().SetOrtho( aCbxOrtho.IsChecked() );
aOptsItem.GetOptionsSnap().SetBigOrtho( aCbxBigOrtho.IsChecked() );
aOptsItem.GetOptionsSnap().SetRotate( aCbxRotate.IsChecked() );
- aOptsItem.GetOptionsSnap().SetSnapArea( (INT16) aMtrFldSnapArea.GetValue() );
- aOptsItem.GetOptionsSnap().SetAngle( (INT16) aMtrFldAngle.GetValue() );
- aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( (INT16) aMtrFldBezAngle.GetValue() );
+ aOptsItem.GetOptionsSnap().SetSnapArea( (sal_Int16) aMtrFldSnapArea.GetValue() );
+ aOptsItem.GetOptionsSnap().SetAngle( (sal_Int16) aMtrFldAngle.GetValue() );
+ aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle( (sal_Int16) aMtrFldBezAngle.GetValue() );
if( pOptsItem == NULL || !(aOptsItem == *pOptsItem) )
rAttrs.Put( aOptsItem );
// Evtl. vorhandenes GridItem wird geholt, um nicht versehentlich
// irgendwelche Standardwerte einzustellen
- return( TRUE );
+ return( sal_True );
}
// -----------------------------------------------------------------------
@@ -178,9 +178,9 @@ SdTpOptionsContents::~SdTpOptionsContents()
// -----------------------------------------------------------------------
-BOOL SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if( aCbxRuler.GetSavedValue() != aCbxRuler.IsChecked() ||
aCbxMoveOutline.GetSavedValue() != aCbxMoveOutline.IsChecked() ||
@@ -195,7 +195,7 @@ BOOL SdTpOptionsContents::FillItemSet( SfxItemSet& rAttrs )
aOptsItem.GetOptionsLayout().SetHandlesBezier( aCbxHandlesBezier.IsChecked() );
rAttrs.Put( aOptsItem );
- bModified = TRUE;
+ bModified = sal_True;
}
return( bModified );
}
@@ -283,7 +283,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
// Metrik einstellen
FieldUnit eFUnit;
- USHORT nWhich = GetWhich( SID_ATTR_METRIC );
+ sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
if ( rInAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
{
const SfxUInt16Item& rItem = (SfxUInt16Item&)rInAttrs.Get( nWhich );
@@ -296,13 +296,13 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
// ListBox mit Metriken f"ullen
SvxStringArray aMetricArr( RID_SVXSTR_FIELDUNIT_TABLE );
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < aMetricArr.Count(); ++i )
{
String sMetric = aMetricArr.GetStringByPos( i );
long nFieldUnit = aMetricArr.GetValue( i );
- USHORT nPos = aLbMetric.InsertEntry( sMetric );
+ sal_uInt16 nPos = aLbMetric.InsertEntry( sMetric );
aLbMetric.SetEntryData( nPos, (void*)nFieldUnit );
}
aLbMetric.SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) );
@@ -328,7 +328,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
// Fuellen der CB
- USHORT aTable[ TABLE_COUNT ] =
+ sal_uInt16 aTable[ TABLE_COUNT ] =
{ 1, 2, 4, 5, 8, 10, 16, 20, 30, 40, 50, 100 };
for( i = 0; i < TABLE_COUNT; i++ )
@@ -351,7 +351,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
// Metrik ggfs. aendern (da TabPage im Dialog liegt,
// wo die Metrik eingestellt werden kann
const SfxPoolItem* pAttr = NULL;
- if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , FALSE,
+ if( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_METRIC , sal_False,
(const SfxPoolItem**)&pAttr ))
{
const SfxUInt16Item* pItem = (SfxUInt16Item*) pAttr;
@@ -362,11 +362,11 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
{
// Metriken einstellen
sal_Int64 nVal = aMtrFldOriginalWidth.Denormalize( aMtrFldOriginalWidth.GetValue( FUNIT_TWIP ) );
- SetFieldUnit( aMtrFldOriginalWidth, eFUnit, TRUE );
+ SetFieldUnit( aMtrFldOriginalWidth, eFUnit, sal_True );
aMtrFldOriginalWidth.SetValue( aMtrFldOriginalWidth.Normalize( nVal ), FUNIT_TWIP );
nVal = aMtrFldOriginalHeight.Denormalize( aMtrFldOriginalHeight.GetValue( FUNIT_TWIP ) );
- SetFieldUnit( aMtrFldOriginalHeight, eFUnit, TRUE );
+ SetFieldUnit( aMtrFldOriginalHeight, eFUnit, sal_True );
aMtrFldOriginalHeight.SetValue( aMtrFldOriginalHeight.Normalize( nVal ), FUNIT_TWIP );
@@ -392,7 +392,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
{
// Parsercheck
- INT32 nX, nY;
+ sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
{
if( pActiveSet )
@@ -413,9 +413,9 @@ int SdTpOptionsMisc::DeactivatePage( SfxItemSet* pActiveSet )
// -----------------------------------------------------------------------
-BOOL SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
+sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if( aCbxStartWithTemplate.GetSavedValue() != aCbxStartWithTemplate.IsChecked() ||
aCbxMarkedHitMovesAlways.GetSavedValue()!= aCbxMarkedHitMovesAlways.IsChecked() ||
@@ -445,36 +445,36 @@ BOOL SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
: ::com::sun::star::document::PrinterIndependentLayout::ENABLED);
rAttrs.Put( aOptsItem );
- bModified = TRUE;
+ bModified = sal_True;
}
// Metrik
- const USHORT nMPos = aLbMetric.GetSelectEntryPos();
+ const sal_uInt16 nMPos = aLbMetric.GetSelectEntryPos();
if ( nMPos != aLbMetric.GetSavedValue() )
{
- USHORT nFieldUnit = (USHORT)(long)aLbMetric.GetEntryData( nMPos );
+ sal_uInt16 nFieldUnit = (sal_uInt16)(long)aLbMetric.GetEntryData( nMPos );
rAttrs.Put( SfxUInt16Item( GetWhich( SID_ATTR_METRIC ),
- (UINT16)nFieldUnit ) );
- bModified |= TRUE;
+ (sal_uInt16)nFieldUnit ) );
+ bModified |= sal_True;
}
// Tabulatorabstand
if( aMtrFldTabstop.GetText() != aMtrFldTabstop.GetSavedValue() )
{
- USHORT nWh = GetWhich( SID_ATTR_DEFTABSTOP );
+ sal_uInt16 nWh = GetWhich( SID_ATTR_DEFTABSTOP );
SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWh );
- SfxUInt16Item aDef( nWh,(USHORT)GetCoreValue( aMtrFldTabstop, eUnit ) );
+ SfxUInt16Item aDef( nWh,(sal_uInt16)GetCoreValue( aMtrFldTabstop, eUnit ) );
rAttrs.Put( aDef );
- bModified |= TRUE;
+ bModified |= sal_True;
}
- INT32 nX, nY;
+ sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
{
rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_X, nX ) );
rAttrs.Put( SfxInt32Item( ATTR_OPTIONS_SCALE_Y, nY ) );
- bModified = TRUE;
+ bModified = sal_True;
}
return( bModified );
@@ -510,7 +510,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aCbxUsePrinterMetrics.SaveValue();
// Metrik
- USHORT nWhich = GetWhich( SID_ATTR_METRIC );
+ sal_uInt16 nWhich = GetWhich( SID_ATTR_METRIC );
aLbMetric.SetNoSelection();
if ( rAttrs.GetItemState( nWhich ) >= SFX_ITEM_AVAILABLE )
@@ -518,7 +518,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich );
long nFieldUnit = (long)rItem.GetValue();
- for ( USHORT i = 0; i < aLbMetric.GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < aLbMetric.GetEntryCount(); ++i )
{
if ( (long)aLbMetric.GetEntryData( i ) == nFieldUnit )
{
@@ -539,9 +539,9 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs )
aLbMetric.SaveValue();
aMtrFldTabstop.SaveValue();
//Scale
- INT32 nX = ( (const SfxInt32Item&) rAttrs.
+ sal_Int32 nX = ( (const SfxInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_X ) ).GetValue();
- INT32 nY = ( (const SfxInt32Item&) rAttrs.
+ sal_Int32 nY = ( (const SfxInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_Y ) ).GetValue();
nWidth = ( (const SfxUInt32Item&) rAttrs.
Get( ATTR_OPTIONS_SCALE_WIDTH ) ).GetValue();
@@ -575,7 +575,7 @@ SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow,
IMPL_LINK( SdTpOptionsMisc, SelectMetricHdl_Impl, ListBox *, EMPTYARG )
{
- USHORT nPos = aLbMetric.GetSelectEntryPos();
+ sal_uInt16 nPos = aLbMetric.GetSelectEntryPos();
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -688,11 +688,11 @@ void SdTpOptionsMisc::SetDrawMode()
IMPL_LINK( SdTpOptionsMisc, ModifyScaleHdl, void *, EMPTYARG )
{
// Originalgroesse berechnen
- INT32 nX, nY;
+ sal_Int32 nX, nY;
if( SetScale( aCbScale.GetText(), nX, nY ) )
{
- INT32 nW = nWidth * nY / nX;
- INT32 nH = nHeight * nY / nX;
+ sal_Int32 nW = nWidth * nY / nX;
+ sal_Int32 nH = nHeight * nY / nX;
SetMetricValue( aMtrFldOriginalWidth, nW, ePoolUnit );
SetMetricValue( aMtrFldOriginalHeight, nH, ePoolUnit );
@@ -742,7 +742,7 @@ IMPL_LINK( SdTpOptionsMisc, ModifyOriginalScaleHdl, void *, EMPTYARG )
// -----------------------------------------------------------------------
-String SdTpOptionsMisc::GetScale( INT32 nX, INT32 nY )
+String SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
{
String aScale( UniString::CreateFromInt32( nX ) );
aScale.Append( TOKEN );
@@ -753,28 +753,28 @@ String SdTpOptionsMisc::GetScale( INT32 nX, INT32 nY )
// -----------------------------------------------------------------------
-BOOL SdTpOptionsMisc::SetScale( const String& aScale, INT32& rX, INT32& rY )
+sal_Bool SdTpOptionsMisc::SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY )
{
if( aScale.GetTokenCount( TOKEN ) != 2 )
- return( FALSE );
+ return( sal_False );
ByteString aTmp( aScale.GetToken( 0, TOKEN ), RTL_TEXTENCODING_ASCII_US );
if( !aTmp.IsNumericAscii() )
- return( FALSE );
+ return( sal_False );
rX = (long) aTmp.ToInt32();
if( rX == 0 )
- return( FALSE );
+ return( sal_False );
aTmp = ByteString( aScale.GetToken( 1, TOKEN ), RTL_TEXTENCODING_ASCII_US );
if( !aTmp.IsNumericAscii() )
- return( FALSE );
+ return( sal_False );
rY = (long) aTmp.ToInt32();
if( rY == 0 )
- return( FALSE );
+ return( sal_False );
- return( TRUE );
+ return( sal_True );
}
@@ -841,7 +841,7 @@ void SdTpOptionsMisc::PageCreated (SfxAllItemSet aSet)
SFX_ITEMSET_ARG (&aSet,pFlagItem,SfxUInt32Item,SID_SDMODE_FLAG,sal_False);
if (pFlagItem)
{
- UINT32 nFlags=pFlagItem->GetValue();
+ sal_uInt32 nFlags=pFlagItem->GetValue();
if ( ( nFlags & SD_DRAW_MODE ) == SD_DRAW_MODE )
SetDrawMode();
if ( ( nFlags & SD_IMPRESS_MODE ) == SD_IMPRESS_MODE )
diff --git a/sd/source/ui/dlg/tpoption.src b/sd/source/ui/dlg/tpoption.src
index b5d30789412e..67c8f40341e6 100644
--- a/sd/source/ui/dlg/tpoption.src
+++ b/sd/source/ui/dlg/tpoption.src
@@ -45,6 +45,7 @@ TabPage TP_OPTIONS_CONTENTS
};
CheckBox CBX_RULER
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_RULER";
Pos = MAP_APPFONT ( 12 , 83 - 69 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -52,6 +53,7 @@ TabPage TP_OPTIONS_CONTENTS
};
CheckBox CBX_HELPLINES
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_HELPLINES";
Pos = MAP_APPFONT ( 12 , 97 - 69 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -59,6 +61,7 @@ TabPage TP_OPTIONS_CONTENTS
};
CheckBox CBX_HANDLES_BEZIER
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_HANDLES_BEZIER";
Pos = MAP_APPFONT ( 12 , 111 - 69 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -66,6 +69,7 @@ TabPage TP_OPTIONS_CONTENTS
};
CheckBox CBX_MOVE_OUTLINE
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_CONTENTS:CBX_MOVE_OUTLINE";
Pos = MAP_APPFONT ( 12 , 125 - 69 ) ;
Size = MAP_APPFONT ( 160 , 10 ) ;
TabStop = TRUE ;
@@ -87,6 +91,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_QUICKEDIT
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_QUICKEDIT";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
@@ -94,6 +99,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_PICKTHROUGH
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_PICKTHROUGH";
Pos = MAP_APPFONT ( 12 , 27 ) ;
Size = MAP_APPFONT ( 116 , 10 ) ;
TabStop = TRUE ;
@@ -107,6 +113,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_START_WITH_TEMPLATE
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_TEMPLATE";
Pos = MAP_APPFONT ( 12 , 53 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -120,6 +127,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_MASTERPAGE_CACHE
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_MASTERPAGE_CACHE";
Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -127,6 +135,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_COPY
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_COPY";
Pos = MAP_APPFONT ( 12 , 93 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -134,6 +143,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_MARKED_HIT_MOVES_ALWAYS
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_MARKED_HIT_MOVES_ALWAYS";
Pos = MAP_APPFONT ( 12 , 106 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -141,6 +151,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_CROOK_NO_CONTORTION
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_CROOK_NO_CONTORTION";
Pos = MAP_APPFONT ( 12 , 119 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -155,6 +166,7 @@ TabPage TP_OPTIONS_MISC
};
ListBox LB_METRIC
{
+ HelpID = "sd:ListBox:TP_OPTIONS_MISC:LB_METRIC";
Border = TRUE ;
Pos = MAP_APPFONT ( 75 , 117 ) ;
Size = MAP_APPFONT ( 50 , 50 ) ;
@@ -169,6 +181,7 @@ TabPage TP_OPTIONS_MISC
};
MetricField MTR_FLD_TABSTOP
{
+ HelpID = "sd:MetricField:TP_OPTIONS_MISC:MTR_FLD_TABSTOP";
Border = TRUE ;
Pos = MAP_APPFONT ( 206 , 117 ) ;
Size = MAP_APPFONT ( 45 , 12 ) ;
@@ -192,6 +205,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CBX_START_WITH_ACTUAL_PAGE
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CBX_START_WITH_ACTUAL_PAGE";
Pos = MAP_APPFONT ( 12 , 145 ) ;
Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
@@ -205,6 +219,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CB_USE_PRINTER_METRICS
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CB_USE_PRINTER_METRICS";
// This checkbox and the following one will change places when this
// one is wired in into the dialog. At the moment exists only for
// translation to work on.
@@ -214,6 +229,7 @@ TabPage TP_OPTIONS_MISC
};
CheckBox CB_MERGE_PARA_DIST
{
+ HelpID = "sd:CheckBox:TP_OPTIONS_MISC:CB_MERGE_PARA_DIST";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 242, 10 ) ;
Text [ en-US ] = "Add ~spacing between paragraphs and tables (in current document)";
@@ -248,6 +264,7 @@ TabPage TP_OPTIONS_MISC
};
ComboBox CB_SCALE
{
+ HelpID = "sd:ComboBox:TP_OPTIONS_MISC:CB_SCALE";
Hide = TRUE;
Pos = MAP_APPFONT ( 72 , 147 ) ;
Size = MAP_APPFONT ( 30 , 70 ) ;
@@ -269,6 +286,7 @@ TabPage TP_OPTIONS_MISC
};
MetricField MTR_FLD_ORIGINAL_WIDTH
{
+ HelpID = "sd:MetricField:TP_OPTIONS_MISC:MTR_FLD_ORIGINAL_WIDTH";
Hide = TRUE;
Border = TRUE ;
Pos = MAP_APPFONT ( 206 , 147 ) ;
@@ -300,6 +318,7 @@ TabPage TP_OPTIONS_MISC
};
MetricField MTR_FLD_ORIGINAL_HEIGHT
{
+ HelpID = "sd:MetricField:TP_OPTIONS_MISC:MTR_FLD_ORIGINAL_HEIGHT";
Hide = TRUE;
Border = TRUE ;
Pos = MAP_APPFONT ( 206 , 163 ) ;
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index edd2b0e63712..4e066fbd364d 100644..100755
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -76,7 +76,7 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
// Layoutnamen und Separator loeschen
String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR ) );
- USHORT nPos = aName.Search(aSep);
+ sal_uInt16 nPos = aName.Search(aSep);
if( nPos != STRING_NOTFOUND )
aName.Erase(0, nPos + aSep.Len());
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 9018faf3994d..e05a9d393b49 100644..100755
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -44,9 +44,6 @@
#include "vectdlg.hxx"
#include "vectdlg.hrc"
#include <tools/config.hxx>
-#ifndef _SV_OCTREE_HXX //autogen
- #include <vcl/octree.hxx>
-#endif
#include <vcl/bmpacc.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/metaact.hxx>
@@ -167,7 +164,7 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale )
else
rScale = Fraction( 1, 1 );
- aNew.ReduceColors( (USHORT) aNmLayers.GetValue(), BMP_REDUCE_SIMPLE );
+ aNew.ReduceColors( (sal_uInt16) aNmLayers.GetValue(), BMP_REDUCE_SIMPLE );
return aNew;
}
@@ -176,7 +173,7 @@ Bitmap SdVectorizeDlg::GetPreparedBitmap( Bitmap& rBmp, Fraction& rScale )
void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf )
{
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
aPrgs.SetValue( 0 );
Fraction aScale;
@@ -185,7 +182,7 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf )
if( !!aTmp )
{
const Link aPrgsHdl( LINK( this, SdVectorizeDlg, ProgressHdl ) );
- aTmp.Vectorize( rMtf, (BYTE) aMtReduce.GetValue(), BMP_VECTORIZE_OUTER | BMP_VECTORIZE_REDUCE_EDGES, &aPrgsHdl );
+ aTmp.Vectorize( rMtf, (sal_uInt8) aMtReduce.GetValue(), BMP_VECTORIZE_OUTER | BMP_VECTORIZE_REDUCE_EDGES, &aPrgsHdl );
if( aCbFillHoles.IsChecked() )
{
@@ -232,7 +229,7 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf )
aTmp.ReleaseAccess( pRAcc );
- for( ULONG n = 0UL, nCount = rMtf.GetActionCount(); n < nCount; n++ )
+ for( sal_uLong n = 0UL, nCount = rMtf.GetActionCount(); n < nCount; n++ )
aNewMtf.AddAction( rMtf.GetAction( n )->Clone() );
aMap.SetScaleX( aMap.GetScaleX() * aScale );
@@ -244,7 +241,7 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf )
}
aPrgs.SetValue( 0 );
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
}
// -----------------------------------------------------------------------------
@@ -252,7 +249,7 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf )
void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf,
long nPosX, long nPosY, long nWidth, long nHeight )
{
- ULONG nSumR = 0UL, nSumG = 0UL, nSumB = 0UL;
+ sal_uLong nSumR = 0UL, nSumG = 0UL, nSumB = 0UL;
const long nRight = nPosX + nWidth - 1L;
const long nBottom = nPosY + nHeight - 1L;
const double fMult = 1.0 / ( nWidth * nHeight );
@@ -269,9 +266,9 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf,
}
}
- const Color aColor( (BYTE) FRound( nSumR * fMult ),
- (BYTE) FRound( nSumG * fMult ),
- (BYTE) FRound( nSumB * fMult ) );
+ const Color aColor( (sal_uInt8) FRound( nSumR * fMult ),
+ (sal_uInt8) FRound( nSumG * fMult ),
+ (sal_uInt8) FRound( nSumB * fMult ) );
Rectangle aRect( Point( nPosX, nPosY ), Size( nWidth + 1, nHeight + 1 ) );
const Size& rMaxSize = rMtf.GetPrefSize();
@@ -284,8 +281,8 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf,
if( aRect.Bottom() > ( rMaxSize.Height() - 1L ) )
aRect.Bottom() = rMaxSize.Height() - 1L;
- rMtf.AddAction( new MetaLineColorAction( aColor, TRUE ) );
- rMtf.AddAction( new MetaFillColorAction( aColor, TRUE ) );
+ rMtf.AddAction( new MetaLineColorAction( aColor, sal_True ) );
+ rMtf.AddAction( new MetaFillColorAction( aColor, sal_True ) );
rMtf.AddAction( new MetaRectAction( aRect ) );
}
@@ -293,7 +290,7 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf,
IMPL_LINK( SdVectorizeDlg, ProgressHdl, void*, pData )
{
- aPrgs.SetValue( (USHORT)(ULONG) pData );
+ aPrgs.SetValue( (sal_uInt16)(sal_uLong) pData );
return 0L;
}
@@ -357,10 +354,10 @@ void SdVectorizeDlg::LoadSettings()
UniString::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( SD_OPTION_VECTORIZE ) ),
SD_OPTION_LOAD ) );
- UINT16 nLayers;
- UINT16 nReduce;
- UINT16 nFillHoles;
- BOOL bFillHoles;
+ sal_uInt16 nLayers;
+ sal_uInt16 nReduce;
+ sal_uInt16 nFillHoles;
+ sal_Bool bFillHoles;
if( xIStm.Is() )
{
@@ -372,7 +369,7 @@ void SdVectorizeDlg::LoadSettings()
nLayers = 8;
nReduce = 0;
nFillHoles = 32;
- bFillHoles = FALSE;
+ bFillHoles = sal_False;
}
aNmLayers.SetValue( nLayers );
@@ -395,8 +392,8 @@ void SdVectorizeDlg::SaveSettings() const
if( xOStm.Is() )
{
SdIOCompat aCompat( *xOStm, STREAM_WRITE, 1 );
- *xOStm << (UINT16) aNmLayers.GetValue() << (UINT16) aMtReduce.GetValue();
- *xOStm << (UINT16) aMtFillHoles.GetValue() << aCbFillHoles.IsChecked();
+ *xOStm << (sal_uInt16) aNmLayers.GetValue() << (sal_uInt16) aMtReduce.GetValue();
+ *xOStm << (sal_uInt16) aMtFillHoles.GetValue() << aCbFillHoles.IsChecked();
}
}
diff --git a/sd/source/ui/dlg/vectdlg.src b/sd/source/ui/dlg/vectdlg.src
index 7dda10a9c9fa..49390105ceff 100644..100755
--- a/sd/source/ui/dlg/vectdlg.src
+++ b/sd/source/ui/dlg/vectdlg.src
@@ -28,10 +28,11 @@
#include "app.hrc"
#include "vectdlg.hrc"
+#include "helpids.h"
ModalDialog DLG_VECTORIZE
{
- HelpID = SID_VECTORIZE;
+ HelpID = HID_VECTORIZE_DLG;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 200, 237 ) ;
@@ -64,6 +65,7 @@ ModalDialog DLG_VECTORIZE
PushButton BTN_PREVIEW
{
+ HelpID = "sd:PushButton:DLG_VECTORIZE:BTN_PREVIEW";
Pos = MAP_APPFONT ( 144 , 63 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
@@ -86,6 +88,7 @@ ModalDialog DLG_VECTORIZE
NumericField NM_LAYERS
{
+ HelpID = "sd:NumericField:DLG_VECTORIZE:NM_LAYERS";
Border = TRUE ;
Pos = MAP_APPFONT ( 92 , 14 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -109,6 +112,7 @@ ModalDialog DLG_VECTORIZE
MetricField MT_REDUCE
{
+ HelpID = "sd:MetricField:DLG_VECTORIZE:MT_REDUCE";
Border = TRUE ;
Pos = MAP_APPFONT ( 92 , 29 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -127,6 +131,7 @@ ModalDialog DLG_VECTORIZE
CheckBox CB_FILLHOLES
{
+ HelpID = "sd:CheckBox:DLG_VECTORIZE:CB_FILLHOLES";
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 79 , 12 ) ;
TabStop = TRUE ;
@@ -142,6 +147,7 @@ ModalDialog DLG_VECTORIZE
MetricField MT_FILLHOLES
{
+ HelpID = "sd:MetricField:DLG_VECTORIZE:MT_FILLHOLES";
Border = TRUE ;
Pos = MAP_APPFONT ( 92 , 59 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
@@ -170,6 +176,7 @@ ModalDialog DLG_VECTORIZE
Border = TRUE ;
Pos = MAP_APPFONT ( 6, 98 ) ;
Size = MAP_APPFONT ( 92, 100 ) ;
+ Text [ en-US ] = "Source picture" ;
};
FixedText FT_VECTORIZED
@@ -184,6 +191,7 @@ ModalDialog DLG_VECTORIZE
Border = TRUE ;
Pos = MAP_APPFONT ( 101, 98 ) ;
Size = MAP_APPFONT ( 93, 100 ) ;
+ Text [ en-US ] = "Vectorized image" ;
};
FixedText GRP_PRGS
@@ -199,6 +207,7 @@ ModalDialog DLG_VECTORIZE
SVLook = TRUE ;
Pos = MAP_APPFONT ( 6, 215 ) ;
Size = MAP_APPFONT ( 188, 10 ) ;
+ Text [ en-US ] = "Progress" ;
};
};
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index fdc7cae539c7..47340e07ba7c 100644..100755
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -60,7 +60,7 @@ namespace sd {
|*
\************************************************************************/
-void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect)
+void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
{
if (nAspect == ASPECT_THUMBNAIL)
{
@@ -71,11 +71,11 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect)
ClientView* pView = new ClientView(this, pOut, NULL);
- pView->SetHlplVisible(FALSE);
- pView->SetGridVisible(FALSE);
- pView->SetBordVisible(FALSE);
- pView->SetPageVisible(FALSE);
- pView->SetGlueVisible(FALSE);
+ pView->SetHlplVisible(sal_False);
+ pView->SetGridVisible(sal_False);
+ pView->SetBordVisible(sal_False);
+ pView->SetPageVisible(sal_False);
+ pView->SetGlueVisible(sal_False);
SdPage* pSelectedPage = NULL;
@@ -85,7 +85,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect)
FrameView* pFrameView = (FrameView*)pFrameViewList->GetObject(0);
if( pFrameView && pFrameView->GetPageKind() == PK_STANDARD )
{
- USHORT nSelectedPage = pFrameView->GetSelectedPage();
+ sal_uInt16 nSelectedPage = pFrameView->GetSelectedPage();
pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PK_STANDARD);
}
}
@@ -93,9 +93,9 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect)
if( NULL == pSelectedPage )
{
SdPage* pPage = NULL;
- USHORT nPageCnt = (USHORT) mpDoc->GetSdPageCount(PK_STANDARD);
+ sal_uInt16 nPageCnt = (sal_uInt16) mpDoc->GetSdPageCount(PK_STANDARD);
- for (USHORT i = 0; i < nPageCnt; i++)
+ for (sal_uInt16 i = 0; i < nPageCnt; i++)
{
pPage = mpDoc->GetSdPage(i, PK_STANDARD);
@@ -138,7 +138,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, USHORT nAspect)
}
-Rectangle DrawDocShell::GetVisArea(USHORT nAspect) const
+Rectangle DrawDocShell::GetVisArea(sal_uInt16 nAspect) const
{
Rectangle aVisArea;
@@ -225,7 +225,7 @@ Size DrawDocShell::GetFirstPageSize()
|*
\************************************************************************/
-Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel)
+Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel)
{
MapMode aMapMode( MAP_100TH_MM );
const Size aSize( pPage->GetSize() );
@@ -235,7 +235,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel)
aVDev.SetMapMode( aMapMode );
const Size aPixSize( aVDev.LogicToPixel( aSize ) );
- const ULONG nMaxEdgePix = Max( aPixSize.Width(), aPixSize.Height() );
+ const sal_uLong nMaxEdgePix = Max( aPixSize.Width(), aPixSize.Height() );
Fraction aFrac( nMaxEdgePixel, nMaxEdgePix );
aMapMode.SetScaleX( aFrac );
@@ -318,12 +318,12 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel)
/*************************************************************************
|*
|* Pruefen, ob die Seite vorhanden ist und dann den Anwender zwingen einen
-|* noch nicht vorhandenen Namen einzugeben. Wird FALSE zurueckgegeben,
+|* noch nicht vorhandenen Namen einzugeben. Wird sal_False zurueckgegeben,
|* wurde die Aktion vom Anwender abgebrochen.
|*
\************************************************************************/
-BOOL DrawDocShell::CheckPageName (::Window* pWin, String& rName )
+sal_Bool DrawDocShell::CheckPageName (::Window* pWin, String& rName )
{
const String aStrForDlg( rName );
bool bIsNameValid = IsNewPageNameValid( rName, true );
@@ -353,7 +353,7 @@ BOOL DrawDocShell::CheckPageName (::Window* pWin, String& rName )
}
}
- return ( bIsNameValid ? TRUE : FALSE );
+ return ( bIsNameValid ? sal_True : sal_False );
}
bool DrawDocShell::IsNewPageNameValid( String & rInOutPageName, bool bResetStringIfStandardName /* = false */ )
@@ -446,8 +446,8 @@ bool DrawDocShell::IsNewPageNameValid( String & rInOutPageName, bool bResetStrin
{
if( rInOutPageName.Len() > 0 )
{
- BOOL bOutDummy;
- USHORT nExistingPageNum = mpDoc->GetPageByName( rInOutPageName, bOutDummy );
+ sal_Bool bOutDummy;
+ sal_uInt16 nExistingPageNum = mpDoc->GetPageByName( rInOutPageName, bOutDummy );
bCanUseNewName = ( nExistingPageNum == SDRPAGE_NOTFOUND );
}
else
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 9e3f13ffc878..b587e4f97a48 100644..100755
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -72,9 +72,9 @@ using namespace ::com::sun::star::uno;
namespace sd {
-#define POOL_BUFFER_SIZE (USHORT)32768
-#define BASIC_BUFFER_SIZE (USHORT)8192
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define POOL_BUFFER_SIZE (sal_uInt16)32768
+#define BASIC_BUFFER_SIZE (sal_uInt16)8192
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
/*************************************************************************
|*
@@ -199,7 +199,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
case SID_VERSION:
{
- const ULONG nOldSwapMode = mpDoc->GetSwapGraphicsMode();
+ const sal_uLong nOldSwapMode = mpDoc->GetSwapGraphicsMode();
mpDoc->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_TEMP );
ExecuteSlot( rReq, SfxObjectShell::GetStaticInterface() );
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index cb2514648d13..ec5988eb28e8 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -98,7 +98,7 @@ namespace sd {
|*
\************************************************************************/
-SfxPrinter* DrawDocShell::GetPrinter(BOOL bCreate)
+SfxPrinter* DrawDocShell::GetPrinter(sal_Bool bCreate)
{
if (bCreate && !mpPrinter)
{
@@ -112,7 +112,7 @@ SfxPrinter* DrawDocShell::GetPrinter(BOOL bCreate)
SdOptionsPrintItem aPrintItem( ATTR_OPTIONS_PRINT,
SD_MOD()->GetSdOptions(mpDoc->GetDocumentType()));
SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
- USHORT nFlags = 0;
+ sal_uInt16 nFlags = 0;
nFlags = (aPrintItem.GetOptionsPrint().IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) |
(aPrintItem.GetOptionsPrint().IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0);
@@ -123,12 +123,12 @@ SfxPrinter* DrawDocShell::GetPrinter(BOOL bCreate)
pSet->Put( aFlagItem );
mpPrinter = new SfxPrinter(pSet);
- mbOwnPrinter = TRUE;
+ mbOwnPrinter = sal_True;
// Ausgabequalitaet setzen
- UINT16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
+ sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
- ULONG nMode = DRAWMODE_DEFAULT;
+ sal_uLong nMode = DRAWMODE_DEFAULT;
if( nQuality == 1 )
nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT;
@@ -166,7 +166,7 @@ void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter)
}
mpPrinter = pNewPrinter;
- mbOwnPrinter = TRUE;
+ mbOwnPrinter = sal_True;
if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED )
UpdateFontList();
UpdateRefDevice();
@@ -177,17 +177,17 @@ void DrawDocShell::UpdateFontList()
delete mpFontList;
OutputDevice* pRefDevice = NULL;
if ( mpDoc->GetPrinterIndependentLayout() == ::com::sun::star::document::PrinterIndependentLayout::DISABLED )
- pRefDevice = GetPrinter(TRUE);
+ pRefDevice = GetPrinter(sal_True);
else
pRefDevice = SD_MOD()->GetVirtualRefDevice();
- mpFontList = new FontList( pRefDevice, NULL, FALSE );
+ mpFontList = new FontList( pRefDevice, NULL, sal_False );
SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
}
Printer* DrawDocShell::GetDocumentPrinter()
{
- return GetPrinter(FALSE);
+ return GetPrinter(sal_False);
}
void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter)
@@ -211,7 +211,7 @@ void DrawDocShell::OnDocumentPrinterChanged(Printer* pNewPrinter)
SetPrinter((SfxPrinter*) pNewPrinter);
// Printer gehoert dem Container
- mbOwnPrinter = FALSE;
+ mbOwnPrinter = sal_False;
}
}
@@ -242,12 +242,12 @@ void DrawDocShell::UpdateRefDevice()
}
mpDoc->SetRefDevice( pRefDevice );
- ::sd::Outliner* pOutl = mpDoc->GetOutliner( FALSE );
+ ::sd::Outliner* pOutl = mpDoc->GetOutliner( sal_False );
if( pOutl )
pOutl->SetRefDevice( pRefDevice );
- ::sd::Outliner* pInternalOutl = mpDoc->GetInternalOutliner( FALSE );
+ ::sd::Outliner* pInternalOutl = mpDoc->GetInternalOutliner( sal_False );
if( pInternalOutl )
pInternalOutl->SetRefDevice( pRefDevice );
@@ -260,9 +260,9 @@ void DrawDocShell::UpdateRefDevice()
|*
\************************************************************************/
-BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
+sal_Bool DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
bRet = SfxObjectShell::InitNew( xStorage );
@@ -285,11 +285,11 @@ BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::
|*
\************************************************************************/
-BOOL DrawDocShell::Load( SfxMedium& rMedium )
+sal_Bool DrawDocShell::Load( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
bool bStartPresentation = false;
ErrCode nError = ERRCODE_NONE;
@@ -300,7 +300,7 @@ BOOL DrawDocShell::Load( SfxMedium& rMedium )
{
if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
{
- mpDoc->SetStarDrawPreviewMode( TRUE );
+ mpDoc->SetStarDrawPreviewMode( sal_True );
}
if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
@@ -367,7 +367,7 @@ BOOL DrawDocShell::Load( SfxMedium& rMedium )
|*
\************************************************************************/
-BOOL DrawDocShell::LoadFrom( SfxMedium& rMedium )
+sal_Bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
@@ -375,7 +375,7 @@ BOOL DrawDocShell::LoadFrom( SfxMedium& rMedium )
if( mpViewShell )
pWait = new WaitObject( (Window*) mpViewShell->GetActiveWindow() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
mpDoc->NewOrLoadCompleted( NEW_DOC );
mpDoc->CreateFirstPages();
@@ -437,22 +437,22 @@ sal_Bool DrawDocShell::ImportFrom( SfxMedium &rMedium )
|*
\************************************************************************/
-BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium )
+sal_Bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
const String aFilterName( rMedium.GetFilter()->GetFilterName() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
bool bStartPresentation = false;
- SetWaitCursor( TRUE );
+ SetWaitCursor( sal_True );
SfxItemSet* pSet = rMedium.GetItemSet();
if( pSet )
{
if( ( SFX_ITEM_SET == pSet->GetItemState(SID_PREVIEW ) ) && ( (SfxBoolItem&) ( pSet->Get( SID_PREVIEW ) ) ).GetValue() )
{
- mpDoc->SetStarDrawPreviewMode( TRUE );
+ mpDoc->SetStarDrawPreviewMode( sal_True );
}
if( SFX_ITEM_SET == pSet->GetItemState(SID_DOC_STARTPRESENTATION)&&
@@ -511,7 +511,7 @@ BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium )
if( pMediumSet )
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, 5 ) );
}
- SetWaitCursor( FALSE );
+ SetWaitCursor( sal_False );
// tell SFX to change viewshell when in preview mode
if( IsPreview() || bStartPresentation )
@@ -530,7 +530,7 @@ BOOL DrawDocShell::ConvertFrom( SfxMedium& rMedium )
|*
\************************************************************************/
-BOOL DrawDocShell::Save()
+sal_Bool DrawDocShell::Save()
{
mpDoc->StopWorkStartupDelay();
@@ -538,7 +538,7 @@ BOOL DrawDocShell::Save()
if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
SfxObjectShell::SetVisArea( Rectangle() );
- BOOL bRet = SfxObjectShell::Save();
+ sal_Bool bRet = SfxObjectShell::Save();
if( bRet )
{
@@ -557,7 +557,7 @@ BOOL DrawDocShell::Save()
|*
\************************************************************************/
-BOOL DrawDocShell::SaveAs( SfxMedium& rMedium )
+sal_Bool DrawDocShell::SaveAs( SfxMedium& rMedium )
{
mpDoc->StopWorkStartupDelay();
@@ -565,8 +565,8 @@ BOOL DrawDocShell::SaveAs( SfxMedium& rMedium )
if( GetCreateMode() == SFX_CREATE_MODE_STANDARD )
SfxObjectShell::SetVisArea( Rectangle() );
- UINT32 nVBWarning = ERRCODE_NONE;
- BOOL bRet = SfxObjectShell::SaveAs( rMedium );
+ sal_uInt32 nVBWarning = ERRCODE_NONE;
+ sal_Bool bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
{
@@ -587,9 +587,9 @@ BOOL DrawDocShell::SaveAs( SfxMedium& rMedium )
|*
\************************************************************************/
-BOOL DrawDocShell::ConvertTo( SfxMedium& rMedium )
+sal_Bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( mpDoc->GetPageCount() )
{
@@ -629,7 +629,7 @@ BOOL DrawDocShell::ConvertTo( SfxMedium& rMedium )
if( pFilter )
{
- const ULONG nOldSwapMode = mpDoc->GetSwapGraphicsMode();
+ const sal_uLong nOldSwapMode = mpDoc->GetSwapGraphicsMode();
mpDoc->SetSwapGraphicsMode( SDR_SWAPGRAPHICSMODE_TEMP );
@@ -651,13 +651,13 @@ BOOL DrawDocShell::ConvertTo( SfxMedium& rMedium )
|*
\************************************************************************/
-BOOL DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
+sal_Bool DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( SfxObjectShell::SaveCompleted(xStorage) )
{
- mpDoc->NbcSetChanged( FALSE );
+ mpDoc->NbcSetChanged( sal_False );
if( mpViewShell )
{
@@ -676,14 +676,14 @@ BOOL DrawDocShell::SaveCompleted( const ::com::sun::star::uno::Reference< ::com:
}
}
- bRet = TRUE;
+ bRet = sal_True;
SfxViewFrame* pFrame = ( mpViewShell && mpViewShell->GetViewFrame() ) ?
mpViewShell->GetViewFrame() :
SfxViewFrame::Current();
if( pFrame )
- pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, TRUE, FALSE );
+ pFrame->GetBindings().Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False );
}
return bRet;
}
@@ -716,17 +716,17 @@ SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool()
|*
\************************************************************************/
-BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
+sal_Bool DrawDocShell::GotoBookmark(const String& rBookmark)
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if (mpViewShell && mpViewShell->ISA(DrawViewShell))
{
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(mpViewShell);
ViewShellBase& rBase (mpViewShell->GetViewShellBase());
- BOOL bIsMasterPage = sal_False;
- USHORT nPageNumber = SDRPAGE_NOTFOUND;
+ sal_Bool bIsMasterPage = sal_False;
+ sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND;
SdrObject* pObj = NULL;
rtl::OUString sBookmark( rBookmark );
@@ -782,7 +782,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
{
// Jump to the bookmarked page. This is done in three steps.
- bFound = TRUE;
+ bFound = sal_True;
SdPage* pPage;
if (bIsMasterPage)
pPage = (SdPage*) mpDoc->GetMasterPage(nPageNumber);
@@ -794,7 +794,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
PageKind eNewPageKind = pPage->GetPageKind();
if( (eNewPageKind != PK_STANDARD) && (mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) )
- return FALSE;
+ return sal_False;
if (eNewPageKind != pDrawViewShell->GetPageKind())
{
@@ -847,14 +847,14 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
if (eNewEditMode != pDrawViewShell->GetEditMode())
{
// EditMode setzen
- pDrawViewShell->ChangeEditMode(eNewEditMode, FALSE);
+ pDrawViewShell->ChangeEditMode(eNewEditMode, sal_False);
}
// Make the bookmarked page the current page. This is done
// by using the API because this takes care of all the
// little things to be done. Especially writing the view
// data to the frame view.
- USHORT nSdPgNum = (nPageNumber - 1) / 2;
+ sal_uInt16 nSdPgNum = (nPageNumber - 1) / 2;
Reference<drawing::XDrawView> xController (rBase.GetController(), UNO_QUERY);
if (xController.is())
{
@@ -877,7 +877,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
pDrawViewShell->GetView()->UnmarkAll();
pDrawViewShell->GetView()->MarkObj(
pObj,
- pDrawViewShell->GetView()->GetSdrPageView(), FALSE);
+ pDrawViewShell->GetView()->GetSdrPageView(), sal_False);
}
}
}
@@ -886,7 +886,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
? pDrawViewShell->GetViewFrame()
: SfxViewFrame::Current() )->GetBindings();
- rBindings.Invalidate(SID_NAVIGATOR_STATE, TRUE, FALSE);
+ rBindings.Invalidate(SID_NAVIGATOR_STATE, sal_True, sal_False);
rBindings.Invalidate(SID_NAVIGATOR_PAGENAME);
}
@@ -900,7 +900,7 @@ BOOL DrawDocShell::GotoBookmark(const String& rBookmark)
\************************************************************************/
#include <tools/urlobj.hxx>
-BOOL DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
+sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
{
const SfxFilter* pFilter = rMedium.GetFilter();
@@ -917,7 +917,7 @@ BOOL DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
String aLayoutName;
SfxStringItem* pLayoutItem;
- if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, FALSE, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET )
+ if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, sal_False, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET )
{
aLayoutName = pLayoutItem->GetValue();
}
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index feabb89f8f13..754122112f2c 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -96,9 +96,9 @@ SFX_IMPL_INTERFACE(DrawDocShell, SfxObjectShell, SdResId(0))
namespace sd {
-#define POOL_BUFFER_SIZE (USHORT)32768
-#define BASIC_BUFFER_SIZE (USHORT)8192
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define POOL_BUFFER_SIZE (sal_uInt16)32768
+#define BASIC_BUFFER_SIZE (sal_uInt16)8192
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
GraphicFilter* GetGrfFilter();
@@ -124,7 +124,7 @@ SFX_IMPL_OBJECTFACTORY(
void DrawDocShell::Construct( bool bClipboard )
{
- mbInDestruction = FALSE;
+ mbInDestruction = sal_False;
SetSlotFilter(); // setzt Filter zurueck
mbOwnDocument = mpDoc == 0;
@@ -151,7 +151,7 @@ void DrawDocShell::Construct( bool bClipboard )
\************************************************************************/
DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
- BOOL bDataObject,
+ sal_Bool bDataObject,
DocumentType eDocumentType) :
SfxObjectShell( eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode),
mpDoc(NULL),
@@ -162,7 +162,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
meDocType(eDocumentType),
mpFilterSIDs(0),
mbSdDataObj(bDataObject),
- mbOwnPrinter(FALSE),
+ mbOwnPrinter(sal_False),
mbNewDocument( sal_True )
{
Construct( eMode == SFX_CREATE_MODE_INTERNAL );
@@ -174,7 +174,7 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
|*
\************************************************************************/
-DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObject, DocumentType eDocumentType ) :
+DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, sal_Bool bDataObject, DocumentType eDocumentType ) :
SfxObjectShell( nModelCreationFlags ),
mpDoc(NULL),
mpUndoManager(NULL),
@@ -184,10 +184,10 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObje
meDocType(eDocumentType),
mpFilterSIDs(0),
mbSdDataObj(bDataObject),
- mbOwnPrinter(FALSE),
+ mbOwnPrinter(sal_False),
mbNewDocument( sal_True )
{
- Construct( FALSE );
+ Construct( sal_False );
}
/*************************************************************************
@@ -197,7 +197,7 @@ DrawDocShell::DrawDocShell( const sal_uInt64 nModelCreationFlags, BOOL bDataObje
\************************************************************************/
DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
- BOOL bDataObject,
+ sal_Bool bDataObject,
DocumentType eDocumentType) :
SfxObjectShell(eMode == SFX_CREATE_MODE_INTERNAL ? SFX_CREATE_MODE_EMBEDDED : eMode),
mpDoc(pDoc),
@@ -208,7 +208,7 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
meDocType(eDocumentType),
mpFilterSIDs(0),
mbSdDataObj(bDataObject),
- mbOwnPrinter(FALSE),
+ mbOwnPrinter(sal_False),
mbNewDocument( sal_True )
{
Construct( eMode == SFX_CREATE_MODE_INTERNAL );
@@ -228,7 +228,7 @@ DrawDocShell::~DrawDocShell()
// may be usefull in other places as well.
Broadcast(SfxSimpleHint(SFX_HINT_DYING));
- mbInDestruction = TRUE;
+ mbInDestruction = sal_True;
SetDocShellFunction(0);
@@ -245,7 +245,7 @@ DrawDocShell::~DrawDocShell()
delete mpDoc;
// damit der Navigator das Verschwinden des Dokuments mitbekommt
- SfxBoolItem aItem(SID_NAVIGATOR_INIT, TRUE);
+ SfxBoolItem aItem(SID_NAVIGATOR_INIT, sal_True);
SfxViewFrame* pFrame = mpViewShell ? mpViewShell->GetFrame() : GetFrame();
if( !pFrame )
@@ -266,11 +266,11 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
- USHORT nSlotId = SfxItemPool::IsWhich(nWhich)
+ sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
? GetPool().GetSlotId(nWhich)
: nWhich;
@@ -284,7 +284,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
case SID_CLOSEDOC:
{
- BOOL bDisabled = FALSE;
+ sal_Bool bDisabled = sal_False;
if (bDisabled)
{
rSet.DisableItem(SID_CLOSEDOC);
@@ -298,7 +298,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
case SID_SEARCH_OPTIONS:
{
- UINT16 nOpt = SEARCH_OPTIONS_SEARCH |
+ sal_uInt16 nOpt = SEARCH_OPTIONS_SEARCH |
SEARCH_OPTIONS_WHOLE_WORDS |
SEARCH_OPTIONS_BACKWARDS |
SEARCH_OPTIONS_REG_EXP |
@@ -347,7 +347,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet)
}
}
-void DrawDocShell::InPlaceActivate( BOOL bActive )
+void DrawDocShell::InPlaceActivate( sal_Bool bActive )
{
if( !bActive )
{
@@ -427,7 +427,7 @@ void DrawDocShell::InPlaceActivate( BOOL bActive )
|*
\************************************************************************/
-void DrawDocShell::Activate( BOOL bMDI)
+void DrawDocShell::Activate( sal_Bool bMDI)
{
if (bMDI)
{
@@ -442,7 +442,7 @@ void DrawDocShell::Activate( BOOL bMDI)
|*
\************************************************************************/
-void DrawDocShell::Deactivate( BOOL )
+void DrawDocShell::Deactivate( sal_Bool )
{
}
@@ -452,7 +452,7 @@ void DrawDocShell::Deactivate( BOOL )
|*
\************************************************************************/
-SfxUndoManager* DrawDocShell::GetUndoManager()
+::svl::IUndoManager* DrawDocShell::GetUndoManager()
{
return mpUndoManager;
}
@@ -510,14 +510,14 @@ void DrawDocShell::ApplySlotFilter() const
pDispatcher->SetSlotFilter();
if( pDispatcher->GetBindings() )
- pDispatcher->GetBindings()->InvalidateAll( TRUE );
+ pDispatcher->GetBindings()->InvalidateAll( sal_True );
}
pTestViewShell = SfxViewShell::GetNext( *pTestViewShell );
}
}
-void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ )
+void DrawDocShell::SetModified( sal_Bool bSet /* = sal_True */ )
{
SfxObjectShell::SetModified( bSet );
@@ -584,7 +584,7 @@ void DrawDocShell::ClearUndoBuffer()
pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, this, false);
}
- SfxUndoManager* pUndoManager = GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = GetUndoManager();
if(pUndoManager && pUndoManager->GetUndoActionCount())
pUndoManager->Clear();
}
diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx
index f03570c3ed7d..fceb4b27500d 100644..100755
--- a/sd/source/ui/docshell/grdocsh.cxx
+++ b/sd/source/ui/docshell/grdocsh.cxx
@@ -63,7 +63,7 @@ SFX_IMPL_INTERFACE(GraphicDocShell, SfxObjectShell, SdResId(0))
SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), SFXOBJECTSHELL_STD_NORMAL, "sdraw" )
GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode,
- BOOL bDataObject,
+ sal_Bool bDataObject,
DocumentType eDocType) :
DrawDocShell(eMode, bDataObject, eDocType)
{
@@ -71,7 +71,7 @@ GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode,
}
GraphicDocShell::GraphicDocShell(const sal_uInt64 nModelCreationFlags,
- BOOL bDataObject,
+ sal_Bool bDataObject,
DocumentType eDocType) :
DrawDocShell(nModelCreationFlags, bDataObject, eDocType)
{
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
index 8f83f86128c3..573330b753b0 100644..100755
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
@@ -198,9 +198,10 @@ void ChangeRequestQueueProcessor::ProcessOneEvent (void)
// its state.
if (mpConfigurationUpdater.get() != NULL)
{
+#ifdef VERBOSE
ConfigurationTracer::TraceConfiguration (
mxConfiguration, "updating to configuration");
-
+#endif
mpConfigurationUpdater->RequestUpdate(mxConfiguration);
}
}
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx
index abbadd3dcc31..4c53c054f736 100644..100755
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx
@@ -81,7 +81,7 @@ public:
void AddRequest (const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XConfigurationChangeRequest>& rxRequest);
- /** Returns </TRUE> when the queue is empty.
+ /** Returns </sal_True> when the queue is empty.
*/
bool IsEmpty (void) const;
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx
index e8cfecd8d1f6..e8cfecd8d1f6 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
index 509ebbd9b429..64ff5380ca7a 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
@@ -116,15 +116,15 @@ private:
css::uno::Reference<
css::drawing::framework::XConfiguration> mxRequestedConfiguration;
- /** This flag is set to </TRUE> when an update of the current
+ /** This flag is set to </sal_True> when an update of the current
configurtion was requested (because the last request in the queue
was processed) but could not be exected because the
ConfigurationController was locked. A call to UpdateConfiguration()
- resets the flag to </FALSE>.
+ resets the flag to </sal_False>.
*/
bool mbUpdatePending;
- /** This flag is set to </TRUE> while the UpdateConfiguration() method
+ /** This flag is set to </sal_True> while the UpdateConfiguration() method
is running. It is used to prevent reentrance problems with this
method.
*/
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index 224280341995..c2f05428e836 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -508,7 +508,7 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
if (mpViewShellBase != NULL)
{
// Create the corresponding shell and determine the id of the child window.
- USHORT nChildWindowId = 0;
+ sal_uInt16 nChildWindowId = 0;
::std::auto_ptr<SfxShell> pShell;
switch (rDescriptor.mePaneId)
{
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 6b577ba3009e..8aafc5d1ca86 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -229,7 +229,7 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource (
// When the requested view is not in the cache then create a new view.
if (pDescriptor.get() == NULL)
{
- pDescriptor = CreateView(rxViewId, *pFrame, *pWindow, xPane, pFrameView);
+ pDescriptor = CreateView(rxViewId, *pFrame, *pWindow, xPane, pFrameView, bIsCenterPane);
}
if (pDescriptor.get() != NULL)
@@ -353,7 +353,8 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
SfxViewFrame& rFrame,
::Window& rWindow,
const Reference<XPane>& rxPane,
- FrameView* pFrameView)
+ FrameView* pFrameView,
+ const bool bIsCenterPane)
{
::boost::shared_ptr<ViewDescriptor> pDescriptor (new ViewDescriptor());
@@ -361,13 +362,12 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
rxViewId,
rFrame,
rWindow,
- pFrameView);
+ pFrameView,
+ bIsCenterPane);
pDescriptor->mxViewId = rxViewId;
if (pDescriptor->mpViewShell.get() != NULL)
{
- const bool bIsCenterPane (
- rxViewId->isBoundToURL(FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT));
pDescriptor->mpViewShell->Init(bIsCenterPane);
mpBase->GetViewShellManager()->ActivateViewShell(pDescriptor->mpViewShell.get());
@@ -388,7 +388,8 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
const Reference<XResourceId>& rxViewId,
SfxViewFrame& rFrame,
::Window& rWindow,
- FrameView* pFrameView)
+ FrameView* pFrameView,
+ const bool bIsCenterPane)
{
::boost::shared_ptr<ViewShell> pViewShell;
const OUString& rsViewURL (rxViewId->getResourceURL());
@@ -464,7 +465,8 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
&rFrame,
*mpBase,
&rWindow,
- pFrameView);
+ pFrameView,
+ bIsCenterPane);
}
return pViewShell;
@@ -607,7 +609,7 @@ void BasicViewFactory::ActivateCenterView (
// have to request a resize now.
rpDescriptor->mpViewShell->UIFeatureChanged();
if (mpBase->GetDocShell()->IsInPlaceActive())
- mpBase->GetViewFrame()->Resize(TRUE);
+ mpBase->GetViewFrame()->Resize(sal_True);
mpBase->GetDrawController().SetSubController(
rpDescriptor->mpViewShell->CreateSubController());
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx
index f7ab37c5a4fb..38d18f16930d 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx
@@ -130,13 +130,15 @@ private:
SfxViewFrame& rFrame,
::Window& rWindow,
const css::uno::Reference<css::drawing::framework::XPane>& rxPane,
- FrameView* pFrameView);
+ FrameView* pFrameView,
+ const bool bIsCenterView);
::boost::shared_ptr<ViewShell> CreateViewShell (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
SfxViewFrame& rFrame,
::Window& rWindow,
- FrameView* pFrameView);
+ FrameView* pFrameView,
+ const bool bIsCenterView);
void ActivateCenterView (
const ::boost::shared_ptr<ViewDescriptor>& rpDescriptor);
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index fc0be98867e0..a0337d739c4a 100644
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -46,7 +46,7 @@ namespace sd { namespace framework {
ChildWindowPane::ChildWindowPane (
const Reference<XResourceId>& rxPaneId,
- USHORT nChildWindowId,
+ sal_uInt16 nChildWindowId,
ViewShellBase& rViewShellBase,
::std::auto_ptr<SfxShell> pShell)
: ChildWindowPaneInterfaceBase(rxPaneId,(::Window*)NULL),
@@ -68,7 +68,7 @@ ChildWindowPane::ChildWindowPane (
{
// The ViewShellBase has already been activated. Make
// the child window visible as soon as possible.
- pViewFrame->SetChildWindow(mnChildWindowId, TRUE);
+ pViewFrame->SetChildWindow(mnChildWindowId, sal_True);
OSL_TRACE("ChildWindowPane:activating now");
}
else
@@ -90,7 +90,7 @@ ChildWindowPane::ChildWindowPane (
// The ViewShellBase has not yet been activated. Hide the
// window and wait a little before it is made visible. See
// comments in the GetWindow() method for an explanation.
- pViewFrame->SetChildWindow(mnChildWindowId, FALSE);
+ pViewFrame->SetChildWindow(mnChildWindowId, sal_False);
OSL_TRACE("ChildWindowPane:base not active");
}
}
@@ -112,7 +112,7 @@ void ChildWindowPane::Hide (void)
if (pViewFrame != NULL)
if (pViewFrame->KnowsChildWindow(mnChildWindowId))
if (pViewFrame->HasChildWindow(mnChildWindowId))
- pViewFrame->SetChildWindow(mnChildWindowId, FALSE);
+ pViewFrame->SetChildWindow(mnChildWindowId, sal_False);
// Release the window because when the child window is shown again it
// may use a different window.
@@ -168,7 +168,7 @@ void SAL_CALL ChildWindowPane::disposing (void)
if ( ! pViewFrame->KnowsChildWindow(mnChildWindowId))
break;
- pViewFrame->SetChildWindow(mnChildWindowId, TRUE);
+ pViewFrame->SetChildWindow(mnChildWindowId, sal_True);
SfxChildWindow* pChildWindow = pViewFrame->GetChildWindow(mnChildWindowId);
if (pChildWindow == NULL)
if (pViewFrame->HasChildWindow(mnChildWindowId))
@@ -176,7 +176,7 @@ void SAL_CALL ChildWindowPane::disposing (void)
// The child window is not yet visible. Ask the view frame
// to show it and try again to get access to the child
// window.
- pViewFrame->ShowChildWindow(mnChildWindowId, TRUE);
+ pViewFrame->ShowChildWindow(mnChildWindowId, sal_True);
pChildWindow = pViewFrame->GetChildWindow(mnChildWindowId);
}
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.hxx b/sd/source/ui/framework/factories/ChildWindowPane.hxx
index ecfcfd87e079..714d84ae10dd 100644..100755
--- a/sd/source/ui/framework/factories/ChildWindowPane.hxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.hxx
@@ -67,7 +67,7 @@ public:
ChildWindowPane (
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XResourceId>& rxPaneId,
- USHORT nChildWindowId,
+ sal_uInt16 nChildWindowId,
ViewShellBase& rViewShellBase,
::std::auto_ptr<SfxShell> pShell);
virtual ~ChildWindowPane (void) throw();
@@ -106,7 +106,7 @@ public:
private:
::com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId> mxPaneId;
- USHORT mnChildWindowId;
+ sal_uInt16 mnChildWindowId;
ViewShellBase& mrViewShellBase;
::std::auto_ptr<SfxShell> mpShell;
diff --git a/sd/source/ui/framework/factories/FrameWindowPane.hxx b/sd/source/ui/framework/factories/FrameWindowPane.hxx
index 5afcb4373d94..5afcb4373d94 100644..100755
--- a/sd/source/ui/framework/factories/FrameWindowPane.hxx
+++ b/sd/source/ui/framework/factories/FrameWindowPane.hxx
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index fa7e3fbf7f9c..0ec6b98a91dd 100644..100755
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -74,7 +74,7 @@ FullScreenPane::FullScreenPane (
return;
// Create a new top-leve window that is displayed full screen.
- mpWorkWindow->ShowFullScreenMode(TRUE, nScreenNumber);
+ mpWorkWindow->ShowFullScreenMode(sal_True, nScreenNumber);
// For debugging (non-fullscreen) use mpWorkWindow->SetScreenNumber(nScreenNumber);
mpWorkWindow->SetMenuBarMode(MENUBAR_MODE_HIDE);
mpWorkWindow->SetBorderStyle(WINDOW_BORDER_REMOVEBORDER);
@@ -179,7 +179,7 @@ Reference<accessibility::XAccessible> SAL_CALL FullScreenPane::getAccessible (vo
ThrowIfDisposed();
if (mpWorkWindow != NULL)
- return mpWorkWindow->GetAccessible(FALSE);
+ return mpWorkWindow->GetAccessible(sal_False);
else
return NULL;
}
diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx
index aef8527a0429..8d7ae216f527 100644..100755
--- a/sd/source/ui/framework/factories/Pane.cxx
+++ b/sd/source/ui/framework/factories/Pane.cxx
@@ -150,7 +150,7 @@ Reference<accessibility::XAccessible> SAL_CALL Pane::getAccessible (void)
ThrowIfDisposed();
::Window* pWindow = GetWindow();
if (pWindow != NULL)
- return pWindow->GetAccessible(FALSE);
+ return pWindow->GetAccessible(sal_False);
else
return NULL;
}
diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx b/sd/source/ui/framework/module/ShellStackGuard.hxx
index 7df5c499f216..7df5c499f216 100644..100755
--- a/sd/source/ui/framework/module/ShellStackGuard.hxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.hxx
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index a8430040af09..f51f9dbbe900 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -567,12 +567,27 @@ Reference<XResourceId> FrameworkHelper::RequestView (
void FrameworkHelper::RequestTaskPanel (
- const OUString& rsTaskPanelURL)
+ const OUString& rsTaskPanelURL,
+ const bool bEnsureTaskPaneIsVisible)
{
try
{
if (mxConfigurationController.is())
{
+ // Check the existence of the task pane.
+ if ( ! bEnsureTaskPaneIsVisible)
+ {
+ Reference<XConfiguration> xConfiguration (
+ mxConfigurationController->getCurrentConfiguration());
+ if (xConfiguration.is())
+ if ( ! xConfiguration->hasResource(
+ CreateResourceId(msTaskPaneURL, msRightPaneURL)))
+ {
+ // Task pane does is not active. Do not force it.
+ return;
+ }
+ }
+
// Create the resource id from URLs for the pane, the task pane
// view, and the task panel.
mxConfigurationController->requestResourceActivation(
@@ -641,10 +656,10 @@ ViewShell::ShellType FrameworkHelper::GetViewId (const rtl::OUString& rsViewURL)
void FrameworkHelper::HandleModeChangeSlot (
- ULONG nSlotId,
+ sal_uLong nSlotId,
SfxRequest& rRequest)
{
- BOOL bIsActive = TRUE;
+ sal_Bool bIsActive = sal_True;
if ( ! mxConfigurationController.is())
return;
@@ -663,8 +678,8 @@ void FrameworkHelper::HandleModeChangeSlot (
SFX_REQUEST_ARG (rRequest,
pIsActive,
SfxBoolItem,
- (USHORT)nSlotId,
- FALSE);
+ (sal_uInt16)nSlotId,
+ sal_False);
bIsActive = pIsActive->GetValue ();
}
}
diff --git a/sd/source/ui/func/bulmaper.cxx b/sd/source/ui/func/bulmaper.cxx
index 7eeaa63cb38a..de4c7968fbe3 100644..100755
--- a/sd/source/ui/func/bulmaper.cxx
+++ b/sd/source/ui/func/bulmaper.cxx
@@ -62,8 +62,8 @@
void SdBulletMapper::MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet& rSet )
{
- const USHORT nCount = aNumRule.GetLevelCount();
- for( USHORT nLevel = 0; nLevel < nCount; nLevel++ )
+ const sal_uInt16 nCount = aNumRule.GetLevelCount();
+ for( sal_uInt16 nLevel = 0; nLevel < nCount; nLevel++ )
{
const SvxNumberFormat& rSrcLevel = aNumRule.GetLevel(nLevel);
SvxNumberFormat aNewLevel( rSrcLevel );
@@ -97,22 +97,22 @@ void SdBulletMapper::MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet&
Font aMyFont;
const SvxFontItem& rFItem =
- (SvxFontItem&)rSet.Get(GetWhich( (USHORT)nFontID ));
+ (SvxFontItem&)rSet.Get(GetWhich( (sal_uInt16)nFontID ));
aMyFont.SetFamily(rFItem.GetFamily());
aMyFont.SetName(rFItem.GetFamilyName());
aMyFont.SetCharSet(rFItem.GetCharSet());
aMyFont.SetPitch(rFItem.GetPitch());
const SvxFontHeightItem& rFHItem =
- (SvxFontHeightItem&)rSet.Get(GetWhich( (USHORT)nFontHeightID ));
+ (SvxFontHeightItem&)rSet.Get(GetWhich( (sal_uInt16)nFontHeightID ));
aMyFont.SetSize(Size(0, rFHItem.GetHeight()));
const SvxWeightItem& rWItem =
- (SvxWeightItem&)rSet.Get(GetWhich( (USHORT)nWeightID ));
+ (SvxWeightItem&)rSet.Get(GetWhich( (sal_uInt16)nWeightID ));
aMyFont.SetWeight(rWItem.GetWeight());
const SvxPostureItem& rPItem =
- (SvxPostureItem&)rSet.Get(GetWhich( (USHORT)nPostureID ));
+ (SvxPostureItem&)rSet.Get(GetWhich( (sal_uInt16)nPostureID ));
aMyFont.SetItalic(rPItem.GetPosture());
const SvxUnderlineItem& rUItem = (SvxUnderlineItem&)rSet.Get(GetWhich(SID_ATTR_CHAR_UNDERLINE));
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index cdfb1364dd8a..e01efa652e6a 100644..100755
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -90,7 +90,7 @@ void FuArea::DoExecute( SfxRequest& rReq )
}
// Attribute wurden geaendert, Listboxes in Objectbars muessen aktualisiert werden
- static USHORT SidArray[] = {
+ static sal_uInt16 SidArray[] = {
SID_ATTR_FILL_STYLE,
SID_ATTR_FILL_COLOR,
SID_ATTR_FILL_GRADIENT,
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 37161bca901e..3ccb81334dbc 100644..100755
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -139,19 +139,19 @@ void FuBullet::InsertFormattingMark( sal_Unicode cMark )
{
// prevent flickering
pOV->HideCursor();
- pOL->SetUpdateMode(FALSE);
+ pOL->SetUpdateMode(sal_False);
// remove old selected text
pOV->InsertText( aEmptyStr );
// prepare undo
- SfxUndoManager& rUndoMgr = pOL->GetUndoManager();
+ ::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager();
rUndoMgr.EnterListAction(String(SdResId(STR_UNDO_INSERT_SPECCHAR)),
aEmptyStr );
// insert given text
String aStr( cMark );
- pOV->InsertText( cMark, TRUE);
+ pOV->InsertText( cMark, sal_True);
ESelection aSel = pOV->GetSelection();
aSel.nStartPara = aSel.nEndPara;
@@ -161,7 +161,7 @@ void FuBullet::InsertFormattingMark( sal_Unicode cMark )
rUndoMgr.LeaveListAction();
// restart repainting
- pOL->SetUpdateMode(TRUE);
+ pOL->SetUpdateMode(sal_True);
pOV->ShowCursor();
}
}
@@ -171,7 +171,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
const SfxPoolItem* pItem = 0;
if( pArgs )
- pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_CHARMAP), FALSE, &pItem);
+ pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
String aChars, aFontName;
Font aFont;
@@ -179,7 +179,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
{
aChars = ((const SfxStringItem*)pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
- pArgs->GetItemState( mpDoc->GetPool().GetWhich(SID_ATTR_SPECIALCHAR), FALSE, &pFtItem);
+ pArgs->GetItemState( mpDoc->GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
@@ -199,7 +199,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
if (!aChars.Len() )
{
SfxAllItemSet aSet( mpDoc->GetPool() );
- aSet.Put( SfxBoolItem( FN_PARAM_1, FALSE ) );
+ aSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
SfxItemSet aFontAttr( mpDoc->GetPool() );
mpView->GetAttributes( aFontAttr );
@@ -217,11 +217,11 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
// Wenn Zeichen selektiert ist kann es angezeigt werden
// pDLg->SetFont( );
// pDlg->SetChar( );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, FALSE );
- SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFItem, SvxFontItem, SID_ATTR_CHAR_FONT, FALSE );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pCItem, SfxStringItem, SID_CHARMAP, sal_False );
+ SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False );
if ( pFItem )
{
aFont.SetName( pFItem->GetFamilyName() );
@@ -263,7 +263,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
{
// nicht flackern
pOV->HideCursor();
- pOL->SetUpdateMode(FALSE);
+ pOL->SetUpdateMode(sal_False);
// alte Attributierung merken;
// dazu vorher selektierten Bereich loeschen, denn der muss eh weg
@@ -275,10 +275,10 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
SfxItemSet aOldSet( mpDoc->GetPool(), EE_CHAR_FONTINFO, EE_CHAR_FONTINFO, 0 );
aOldSet.Put( pOV->GetAttribs() );
- SfxUndoManager& rUndoMgr = pOL->GetUndoManager();
+ ::svl::IUndoManager& rUndoMgr = pOL->GetUndoManager();
rUndoMgr.EnterListAction(String(SdResId(STR_UNDO_INSERT_SPECCHAR)),
aEmptyStr );
- pOV->InsertText(aChars, TRUE);
+ pOV->InsertText(aChars, sal_True);
// attributieren (Font setzen)
SfxItemSet aSet(pOL->GetEmptyItemSet());
@@ -302,7 +302,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
rUndoMgr.LeaveListAction();
// ab jetzt wieder anzeigen
- pOL->SetUpdateMode(TRUE);
+ pOL->SetUpdateMode(sal_True);
pOV->ShowCursor();
}
}
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 9c3d1855303a..3840bd5fa492 100644..100755
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -86,13 +86,13 @@ void FuChar::DoExecute( SfxRequest& rReq )
SfxItemSet aNewAttr( mpViewShell->GetPool(),
EE_ITEMS_START, EE_ITEMS_END );
- aNewAttr.Put( aEditAttr, FALSE );
+ aNewAttr.Put( aEditAttr, sal_False );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdTabCharDialog( NULL, &aNewAttr, mpDoc->GetDocSh() ) : 0;
if( pDlg )
{
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
if( nResult == RET_OK )
{
@@ -111,7 +111,7 @@ void FuChar::DoExecute( SfxRequest& rReq )
mpView->SetAttributes(*pArgs);
// invalidieren der Slots, die in der DrTxtObjBar auftauchen
- static USHORT SidArray[] = {
+ static sal_uInt16 SidArray[] = {
SID_ATTR_CHAR_FONT,
SID_ATTR_CHAR_POSTURE,
SID_ATTR_CHAR_WEIGHT,
@@ -127,9 +127,9 @@ void FuChar::DoExecute( SfxRequest& rReq )
if( mpDoc->GetOnlineSpell() )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, FALSE, &pItem ) ||
- SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, FALSE, &pItem ) ||
- SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE, sal_False, &pItem ) ||
+ SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CJK, sal_False, &pItem ) ||
+ SFX_ITEM_SET == pArgs->GetItemState(EE_CHAR_LANGUAGE_CTL, sal_False, &pItem ) )
{
mpDoc->StopOnlineSpelling();
mpDoc->StartOnlineSpelling();
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx
index 649621ba8b2b..7f956f23e00e 100644..100755
--- a/sd/source/ui/func/fucon3d.cxx
+++ b/sd/source/ui/func/fucon3d.cxx
@@ -130,7 +130,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
case SID_3D_SHELL:
{
- XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0, 900, FALSE);
+ XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0, 900, sal_False);
aXPoly.Scale(5.0, 5.0);
::basegfx::B2DPolygon aB2DPolygon(aXPoly.getB2DPolygon());
@@ -142,13 +142,13 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
// Dies ist ein offenes Objekt, muss daher defaultmaessig
// doppelseitig behandelt werden
- p3DObj->SetMergedItem(Svx3DDoubleSidedItem(TRUE));
+ p3DObj->SetMergedItem(Svx3DDoubleSidedItem(sal_True));
break;
}
case SID_3D_HALF_SPHERE:
{
- XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0, 900, FALSE);
+ XPolygon aXPoly(Point (0, 1250), 2500, 2500, 0, 900, sal_False);
aXPoly.Scale(5.0, 5.0);
aXPoly.Insert(0, Point (2400*5, 1250*5), XPOLY_NORMAL);
@@ -321,16 +321,16 @@ void FuConstruct3dObject::ImpPrepareBasic3DShape(E3dCompoundObject* p3DObj, E3dS
pScene->SetMergedItemSetAndBroadcast(aAttr);
}
-BOOL FuConstruct3dObject::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstruct3dObject::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !mpView->IsAction() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpWindow->CaptureMouse();
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
E3dCompoundObject* p3DObj = NULL;
@@ -365,7 +365,7 @@ BOOL FuConstruct3dObject::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct3dObject::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstruct3dObject::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -376,15 +376,15 @@ BOOL FuConstruct3dObject::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct3dObject::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstruct3dObject::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ( mpView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpView->EndCreateObj(SDRCREATE_FORCEEND);
- bReturn = TRUE;
+ bReturn = sal_True;
}
bReturn = FuConstruct::MouseButtonUp(rMEvt) || bReturn;
@@ -399,12 +399,12 @@ BOOL FuConstruct3dObject::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstruct3dObject::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstruct3dObject::KeyInput(const KeyEvent& rKEvt)
{
return( FuConstruct::KeyInput(rKEvt) );
}
@@ -451,7 +451,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const
// copied code from E3dView::InitScene
double fCamZ(aVolume.getMaxZ() + ((fW + fH) / 4.0));
Camera3D aCam(pScene->GetCamera());
- aCam.SetAutoAdjustProjection(FALSE);
+ aCam.SetAutoAdjustProjection(sal_False);
aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH);
::basegfx::B3DPoint aLookAt;
double fDefaultCamPosZ = mpView->GetDefaultCamPosZ();
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index 7f2d1a03f57b..7810ae9dcb33 100644..100755
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -95,12 +95,12 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
if (pArgs)
{
- SFX_REQUEST_ARG (rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X, FALSE);
- SFX_REQUEST_ARG (rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y, FALSE);
- SFX_REQUEST_ARG (rReq, pAxisX, SfxUInt32Item, ID_VAL_AXIS_X, FALSE);
- SFX_REQUEST_ARG (rReq, pAxisY, SfxUInt32Item, ID_VAL_AXIS_Y, FALSE);
- SFX_REQUEST_ARG (rReq, pPhiStart, SfxUInt32Item, ID_VAL_ANGLESTART, FALSE);
- SFX_REQUEST_ARG (rReq, pPhiEnd, SfxUInt32Item, ID_VAL_ANGLEEND, FALSE);
+ SFX_REQUEST_ARG (rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y, sal_False);
+ SFX_REQUEST_ARG (rReq, pAxisX, SfxUInt32Item, ID_VAL_AXIS_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pAxisY, SfxUInt32Item, ID_VAL_AXIS_Y, sal_False);
+ SFX_REQUEST_ARG (rReq, pPhiStart, SfxUInt32Item, ID_VAL_ANGLESTART, sal_False);
+ SFX_REQUEST_ARG (rReq, pPhiEnd, SfxUInt32Item, ID_VAL_ANGLEEND, sal_False);
Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2,
pCenterY->GetValue () - pAxisY->GetValue () / 2,
@@ -125,15 +125,15 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL FuConstructArc::MouseButtonDown( const MouseEvent& rMEvt )
+sal_Bool FuConstructArc::MouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bReturn = FuConstruct::MouseButtonDown( rMEvt );
+ sal_Bool bReturn = FuConstruct::MouseButtonDown( rMEvt );
if ( rMEvt.IsLeft() && !mpView->IsAction() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpWindow->CaptureMouse();
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aPnt, (OutputDevice*) NULL, nDrgLog);
SdrObject* pObj = mpView->GetCreateObj();
@@ -146,7 +146,7 @@ BOOL FuConstructArc::MouseButtonDown( const MouseEvent& rMEvt )
pObj->SetMergedItemSet(aAttr);
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -157,7 +157,7 @@ BOOL FuConstructArc::MouseButtonDown( const MouseEvent& rMEvt )
|*
\************************************************************************/
-BOOL FuConstructArc::MouseMove( const MouseEvent& rMEvt )
+sal_Bool FuConstructArc::MouseMove( const MouseEvent& rMEvt )
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -168,26 +168,26 @@ BOOL FuConstructArc::MouseMove( const MouseEvent& rMEvt )
|*
\************************************************************************/
-BOOL FuConstructArc::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool FuConstructArc::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bReturn = FALSE;
- BOOL bCreated = FALSE;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bCreated = sal_False;
if ( mpView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- ULONG nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount();
+ sal_uLong nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount();
if (mpView->EndCreateObj(SDRCREATE_NEXTPOINT) )
{
if (nCount != mpView->GetSdrPageView()->GetObjList()->GetObjCount())
{
- bCreated = TRUE;
+ bCreated = sal_True;
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
bReturn = FuConstruct::MouseButtonUp (rMEvt) || bReturn;
@@ -202,14 +202,14 @@ BOOL FuConstructArc::MouseButtonUp( const MouseEvent& rMEvt )
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstructArc::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstructArc::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -257,7 +257,7 @@ void FuConstructArc::Activate()
break;
}
- mpView->SetCurrentObj((UINT16)aObjKind);
+ mpView->SetCurrentObj((sal_uInt16)aObjKind);
FuConstruct::Activate();
}
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index 2b046c4de795..4b8d24c63792 100644..100755
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -99,7 +99,7 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq )
if( pArgs )
{
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, sal_True, &pPoolItem ) )
maTargets = ( ( const SfxUnoAnyItem* ) pPoolItem )->GetValue();
}
}
@@ -110,9 +110,9 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
@@ -130,11 +130,11 @@ BOOL FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt)
{
// Texteingabe hier nicht zulassen
aVEvt.eEvent = SDREVENT_BEGDRAGOBJ;
- mpView->EnableExtendedMouseEventDispatcher(FALSE);
+ mpView->EnableExtendedMouseEventDispatcher(sal_False);
}
else
{
- mpView->EnableExtendedMouseEventDispatcher(TRUE);
+ mpView->EnableExtendedMouseEventDispatcher(sal_True);
}
if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT)
@@ -167,9 +167,9 @@ BOOL FuConstructBezierPolygon::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstructBezierPolygon::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstructBezierPolygon::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuConstruct::MouseMove(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseMove(rMEvt);
return(bReturn);
}
@@ -179,15 +179,15 @@ BOOL FuConstructBezierPolygon::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
+sal_Bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
{
- BOOL bReturn = FALSE;
- BOOL bCreated = FALSE;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bCreated = sal_False;
SdrViewEvent aVEvt;
mpView->PickAnything(rMEvt, SDRMOUSEBUTTONUP, aVEvt);
- ULONG nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount();
+ sal_uLong nCount = mpView->GetSdrPageView()->GetObjList()->GetObjCount();
if (mpView->IsInsObjPoint())
{
@@ -200,15 +200,15 @@ BOOL FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
if (aVEvt.eEvent == SDREVENT_ENDCREATE)
{
- bReturn = TRUE;
+ bReturn = sal_True;
if (nCount == (mpView->GetSdrPageView()->GetObjList()->GetObjCount() - 1))
{
- bCreated = TRUE;
+ bCreated = sal_True;
}
// Trick, um FuDraw::DoubleClick nicht auszuloesen
- bMBDown = FALSE;
+ bMBDown = sal_False;
}
@@ -261,14 +261,14 @@ BOOL FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstructBezierPolygon::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstructBezierPolygon::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -281,7 +281,7 @@ BOOL FuConstructBezierPolygon::KeyInput(const KeyEvent& rKEvt)
void FuConstructBezierPolygon::Activate()
{
- mpView->EnableExtendedMouseEventDispatcher(TRUE);
+ mpView->EnableExtendedMouseEventDispatcher(sal_True);
SdrObjKind eKind;
@@ -332,7 +332,7 @@ void FuConstructBezierPolygon::Activate()
break;
}
- mpView->SetCurrentObj((UINT16)eKind);
+ mpView->SetCurrentObj((sal_uInt16)eKind);
FuConstruct::Activate();
}
@@ -345,7 +345,7 @@ void FuConstructBezierPolygon::Activate()
void FuConstructBezierPolygon::Deactivate()
{
- mpView->EnableExtendedMouseEventDispatcher(FALSE);
+ mpView->EnableExtendedMouseEventDispatcher(sal_False);
FuConstruct::Deactivate();
}
@@ -374,7 +374,7 @@ void FuConstructBezierPolygon::SelectionHasChanged()
|*
\************************************************************************/
-void FuConstructBezierPolygon::SetEditMode(USHORT nMode)
+void FuConstructBezierPolygon::SetEditMode(sal_uInt16 nMode)
{
nEditMode = nMode;
ForcePointer();
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index 56df5e65e9be..5a36179eab84 100644..100755
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -131,16 +131,16 @@ void FuConstructCustomShape::DoExecute( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL FuConstructCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstructCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !mpView->IsAction() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpWindow->CaptureMouse();
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aPnt, (OutputDevice*) NULL, nDrgLog);
@@ -170,7 +170,7 @@ BOOL FuConstructCustomShape::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstructCustomShape::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstructCustomShape::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -181,7 +181,7 @@ BOOL FuConstructCustomShape::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstructCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstructCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
{
sal_Bool bReturn(sal_False);
@@ -205,14 +205,14 @@ BOOL FuConstructCustomShape::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstructCustomShape::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstructCustomShape::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index d8b0b23abd89..85cd8cc5945a 100644..100755
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -120,10 +120,10 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
{
case SID_DRAW_ELLIPSE :
{
- SFX_REQUEST_ARG (rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X, FALSE);
- SFX_REQUEST_ARG (rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y, FALSE);
- SFX_REQUEST_ARG (rReq, pAxisX, SfxUInt32Item, ID_VAL_AXIS_X, FALSE);
- SFX_REQUEST_ARG (rReq, pAxisY, SfxUInt32Item, ID_VAL_AXIS_Y, FALSE);
+ SFX_REQUEST_ARG (rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y, sal_False);
+ SFX_REQUEST_ARG (rReq, pAxisX, SfxUInt32Item, ID_VAL_AXIS_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pAxisY, SfxUInt32Item, ID_VAL_AXIS_Y, sal_False);
Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2,
pCenterY->GetValue () - pAxisY->GetValue () / 2,
@@ -138,10 +138,10 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
case SID_DRAW_RECT :
{
- SFX_REQUEST_ARG (rReq, pMouseStartX, SfxUInt32Item, ID_VAL_MOUSESTART_X, FALSE);
- SFX_REQUEST_ARG (rReq, pMouseStartY, SfxUInt32Item, ID_VAL_MOUSESTART_Y, FALSE);
- SFX_REQUEST_ARG (rReq, pMouseEndX, SfxUInt32Item, ID_VAL_MOUSEEND_X, FALSE);
- SFX_REQUEST_ARG (rReq, pMouseEndY, SfxUInt32Item, ID_VAL_MOUSEEND_Y, FALSE);
+ SFX_REQUEST_ARG (rReq, pMouseStartX, SfxUInt32Item, ID_VAL_MOUSESTART_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pMouseStartY, SfxUInt32Item, ID_VAL_MOUSESTART_Y, sal_False);
+ SFX_REQUEST_ARG (rReq, pMouseEndX, SfxUInt32Item, ID_VAL_MOUSEEND_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pMouseEndY, SfxUInt32Item, ID_VAL_MOUSEEND_Y, sal_False);
Rectangle aNewRectangle (pMouseStartX->GetValue (),
pMouseStartY->GetValue (),
@@ -202,16 +202,16 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL FuConstructRectangle::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstructRectangle::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !mpView->IsAction() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpWindow->CaptureMouse();
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
if (mpView->GetCurrentObjIdentifier() == OBJ_CAPTION)
{
@@ -235,7 +235,7 @@ BOOL FuConstructRectangle::MouseButtonDown(const MouseEvent& rMEvt)
pObj->SetMergedItemSet(aAttr);
if( nSlotId == SID_DRAW_CAPTION_VERTICAL )
- ( (SdrTextObj*) pObj)->SetVerticalWriting( TRUE );
+ ( (SdrTextObj*) pObj)->SetVerticalWriting( sal_True );
}
}
return bReturn;
@@ -247,7 +247,7 @@ BOOL FuConstructRectangle::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstructRectangle::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstructRectangle::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -258,7 +258,7 @@ BOOL FuConstructRectangle::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstructRectangle::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstructRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
sal_Bool bReturn(sal_False);
@@ -272,7 +272,7 @@ BOOL FuConstructRectangle::MouseButtonUp(const MouseEvent& rMEvt)
{
SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
String aStr(SdResId(STR_LAYER_MEASURELINES));
- pObj->SetLayer(rAdmin.GetLayerID(aStr, FALSE));
+ pObj->SetLayer(rAdmin.GetLayerID(aStr, sal_False));
}
// init text position when vertica caption object is created
@@ -308,14 +308,14 @@ BOOL FuConstructRectangle::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstructRectangle::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstructRectangle::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
@@ -421,7 +421,7 @@ void FuConstructRectangle::Activate()
break;
}
- mpView->SetCurrentObj((UINT16)aObjKind);
+ mpView->SetCurrentObj((sal_uInt16)aObjKind);
FuConstruct::Activate();
}
@@ -470,7 +470,7 @@ void FuConstructRectangle::Deactivate()
nSlotId == SID_LINE_ARROW_SQUARE ||
nSlotId == SID_LINE_SQUARE_ARROW )
{
- mpView->SetGlueVisible( FALSE );
+ mpView->SetGlueVisible( sal_False );
}
FuConstruct::Deactivate();
}
@@ -541,8 +541,8 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
Size aSize(pObj->GetLogicRect().GetSize());
rAttr.Put( SdrTextMinFrameHeightItem( aSize.Height() ) );
rAttr.Put( SdrTextMinFrameWidthItem( aSize.Width() ) );
- rAttr.Put( SdrTextAutoGrowHeightItem( TRUE ) );
- rAttr.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ rAttr.Put( SdrTextAutoGrowHeightItem( sal_True ) );
+ rAttr.Put( SdrTextAutoGrowWidthItem( sal_True ) );
// Support full with for vertical caption objects, too
if(SID_DRAW_CAPTION == nSlotId)
@@ -570,12 +570,12 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
if (pSheet)
{
- pObj->SetStyleSheet(pSheet, FALSE);
+ pObj->SetStyleSheet(pSheet, sal_False);
}
SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
String aStr(SdResId(STR_LAYER_MEASURELINES));
- pObj->SetLayer(rAdmin.GetLayerID(aStr, FALSE));
+ pObj->SetLayer(rAdmin.GetLayerID(aStr, sal_False));
}
else if (nSlotId == OBJ_CUSTOMSHAPE )
{
@@ -956,8 +956,8 @@ SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const
{
if(pObj->ISA(SdrEdgeObj))
{
- ((SdrEdgeObj*)pObj)->SetTailPoint(FALSE, aStart);
- ((SdrEdgeObj*)pObj)->SetTailPoint(TRUE, aEnd);
+ ((SdrEdgeObj*)pObj)->SetTailPoint(sal_False, aStart);
+ ((SdrEdgeObj*)pObj)->SetTailPoint(sal_True, aEnd);
}
else
{
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index a89e4b28f653..e67d3bf0ad69 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -69,7 +69,7 @@ FuConstruct::FuConstruct (
SdDrawDocument* pDoc,
SfxRequest& rReq)
: FuDraw(pViewSh, pWin, pView, pDoc, rReq),
- bSelectionChanged(FALSE)
+ bSelectionChanged(sal_False)
{
}
@@ -84,23 +84,23 @@ void FuConstruct::DoExecute( SfxRequest& rReq )
|*
\************************************************************************/
-BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
- bMBDown = TRUE;
- bSelectionChanged = FALSE;
+ bMBDown = sal_True;
+ bSelectionChanged = sal_False;
if ( mpView->IsAction() )
{
- return TRUE;
+ return sal_True;
}
- bFirstMouseMove = TRUE;
+ bFirstMouseMove = sal_True;
aDragTimer.Start();
aMDPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
- USHORT nHitLog = USHORT (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
+ sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
if (rMEvt.IsLeft() && mpView->IsExtendedMouseEventDispatcherEnabled())
{
@@ -110,14 +110,14 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
if ( pHdl != NULL || mpView->IsMarkedHit(aMDPos, nHitLog) )
{
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( mpView->AreObjectsMarked() )
{
mpView->UnmarkAll();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
@@ -130,14 +130,14 @@ BOOL FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseMove(const MouseEvent& rMEvt)
{
FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive() )
{
if( bFirstMouseMove )
- bFirstMouseMove = FALSE;
+ bFirstMouseMove = sal_False;
else
aDragTimer.Stop();
}
@@ -151,7 +151,7 @@ BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
mpView->MovAction(aPnt);
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -160,14 +160,14 @@ BOOL FuConstruct::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = TRUE;
+ sal_Bool bReturn = sal_True;
if (aDragTimer.IsActive() )
{
aDragTimer.Stop();
- bIsInDragMode = FALSE;
+ bIsInDragMode = sal_False;
}
FuDraw::MouseButtonUp(rMEvt);
@@ -177,11 +177,11 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
if ( mpView && mpView->IsDragObj() )
{
FrameView* pFrameView = mpViewShell->GetFrameView();
- BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
+ sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
if (bDragWithCopy)
{
- bDragWithCopy = !mpView->IsPresObjSelected(FALSE, TRUE);
+ bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
}
mpView->SetDragWithCopy(bDragWithCopy);
@@ -193,19 +193,19 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
}
else
{
- bReturn = FALSE;
+ bReturn = sal_False;
}
if ( mpView && !mpView->IsAction() )
{
mpWindow->ReleaseMouse();
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
if ( !mpView->AreObjectsMarked() )
{
SdrObject* pObj;
SdrPageView* pPV;
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
if (!mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV))
{
@@ -223,7 +223,7 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
* Toggle zw. Selektion und Rotation
**************************************************************/
SdrObject* pSingleObj = NULL;
- ULONG nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
if (nMarkCount==1)
{
@@ -243,14 +243,14 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
}
}
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if (nClicks == 2 && rMEvt.IsLeft() && bMBDown &&
!rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsShift() )
{
DoubleClick(rMEvt);
}
- bMBDown = FALSE;
+ bMBDown = sal_False;
return bReturn;
}
@@ -259,14 +259,14 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstruct::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstruct::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ( !bReturn )
bReturn = FuDraw::KeyInput(rKEvt);
@@ -309,40 +309,74 @@ void FuConstruct::SetStyleSheet(SfxItemSet& rAttr, SdrObject* pObj)
sal_Bool bUseFillStyle, bUseNoFillStyle;
bUseFillStyle = bUseNoFillStyle = sal_False;
- if (nSlotId == SID_DRAW_RECT || // Rechteck
- nSlotId == SID_DRAW_RECT_ROUND || // Rechteck, rund
- nSlotId == SID_DRAW_SQUARE || // Quadrat
- nSlotId == SID_DRAW_SQUARE_ROUND || // Quadrat, rund
- nSlotId == SID_DRAW_ELLIPSE || // Ellipse
- nSlotId == SID_DRAW_PIE || // Ellipsensegment
- nSlotId == SID_DRAW_ELLIPSECUT || // Ellipsenabschnitt
- nSlotId == SID_DRAW_CIRCLE || // Kreis
- nSlotId == SID_DRAW_CIRCLEPIE || // Kreissegment
- nSlotId == SID_DRAW_CIRCLECUT || // Ellipsenabschnitt
- nSlotId == SID_DRAW_POLYGON || // Polygon
- nSlotId == SID_DRAW_XPOLYGON || // 45ø-Polygon
- nSlotId == SID_DRAW_FREELINE || // Freihandlinie
- nSlotId == SID_DRAW_BEZIER_FILL) // Bezier
+ switch( nSlotId )
+ {
+ case SID_DRAW_RECT:
+ case SID_DRAW_RECT_ROUND:
+ case SID_DRAW_SQUARE:
+ case SID_DRAW_SQUARE_ROUND:
+ case SID_DRAW_ELLIPSE:
+ case SID_DRAW_PIE:
+ case SID_DRAW_ELLIPSECUT:
+ case SID_DRAW_CIRCLE:
+ case SID_DRAW_CIRCLEPIE:
+ case SID_DRAW_CIRCLECUT:
+ case SID_DRAW_POLYGON:
+ case SID_DRAW_XPOLYGON:
+ case SID_DRAW_FREELINE:
+ case SID_DRAW_BEZIER_FILL:
{
bUseFillStyle = sal_True;
+ break;
}
- else if
- (nSlotId == SID_DRAW_RECT_NOFILL || // Rechteck
- nSlotId == SID_DRAW_RECT_ROUND_NOFILL || // Rechteck, rund
- nSlotId == SID_DRAW_SQUARE_NOFILL || // Quadrat
- nSlotId == SID_DRAW_SQUARE_ROUND_NOFILL || // Quadrat, rund
- nSlotId == SID_DRAW_ELLIPSE_NOFILL || // Ellipse
- nSlotId == SID_DRAW_PIE_NOFILL || // Ellipsensegment
- nSlotId == SID_DRAW_ELLIPSECUT_NOFILL || // Ellipsenabschnitt
- nSlotId == SID_DRAW_CIRCLE_NOFILL || // Kreis
- nSlotId == SID_DRAW_CIRCLEPIE_NOFILL || // Kreissegment
- nSlotId == SID_DRAW_CIRCLECUT_NOFILL || // Ellipsenabschnitt
- nSlotId == SID_DRAW_POLYGON_NOFILL || // Polygon
- nSlotId == SID_DRAW_XPOLYGON_NOFILL || // 45ø-Polygon
- nSlotId == SID_DRAW_FREELINE_NOFILL || // Freihandlinie
- nSlotId == SID_DRAW_BEZIER_NOFILL) // Bezier
+ case SID_DRAW_RECT_NOFILL:
+ case SID_DRAW_RECT_ROUND_NOFILL:
+ case SID_DRAW_SQUARE_NOFILL:
+ case SID_DRAW_SQUARE_ROUND_NOFILL:
+ case SID_DRAW_ELLIPSE_NOFILL:
+ case SID_DRAW_PIE_NOFILL:
+ case SID_DRAW_ELLIPSECUT_NOFILL:
+ case SID_DRAW_CIRCLE_NOFILL:
+ case SID_DRAW_CIRCLEPIE_NOFILL:
+ case SID_DRAW_CIRCLECUT_NOFILL:
+ case SID_DRAW_POLYGON_NOFILL:
+ case SID_DRAW_XPOLYGON_NOFILL:
+ case SID_DRAW_FREELINE_NOFILL:
+ case SID_DRAW_LINE:
+ case SID_DRAW_XLINE:
+ case SID_CONNECTOR_ARROW_START:
+ case SID_CONNECTOR_ARROW_END:
+ case SID_CONNECTOR_ARROWS:
+ case SID_CONNECTOR_CIRCLE_START:
+ case SID_CONNECTOR_CIRCLE_END:
+ case SID_CONNECTOR_CIRCLES:
+ case SID_CONNECTOR_LINE:
+ case SID_CONNECTOR_LINE_ARROW_START:
+ case SID_CONNECTOR_LINE_ARROW_END:
+ case SID_CONNECTOR_LINE_ARROWS:
+ case SID_CONNECTOR_LINE_CIRCLE_START:
+ case SID_CONNECTOR_LINE_CIRCLE_END:
+ case SID_CONNECTOR_LINE_CIRCLES:
+ case SID_CONNECTOR_CURVE:
+ case SID_CONNECTOR_CURVE_ARROW_START:
+ case SID_CONNECTOR_CURVE_ARROW_END:
+ case SID_CONNECTOR_CURVE_ARROWS:
+ case SID_CONNECTOR_CURVE_CIRCLE_START:
+ case SID_CONNECTOR_CURVE_CIRCLE_END:
+ case SID_CONNECTOR_CURVE_CIRCLES:
+ case SID_CONNECTOR_LINES:
+ case SID_CONNECTOR_LINES_ARROW_START:
+ case SID_CONNECTOR_LINES_ARROW_END:
+ case SID_CONNECTOR_LINES_ARROWS:
+ case SID_CONNECTOR_LINES_CIRCLE_START:
+ case SID_CONNECTOR_LINES_CIRCLE_END:
+ case SID_CONNECTOR_LINES_CIRCLES:
+ case SID_DRAW_BEZIER_NOFILL:
+ case SID_LINE_ARROW_END:
{
bUseNoFillStyle = sal_True;
+ break;
+ }
}
SetStyleSheet( rAttr, pObj, bUseFillStyle, bUseNoFillStyle );
}
@@ -359,7 +393,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
***********************************************/
String aName( pPage->GetLayoutName() );
String aSep = UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ) );
- USHORT n = aName.Search(aSep);
+ sal_uInt16 n = aName.Search(aSep);
n = n + aSep.Len();
aName.Erase(n);
aName.Append( String ( SdResId( STR_LAYOUT_BACKGROUNDOBJECTS ) ) );
@@ -370,7 +404,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
if (pSheet)
{
// applying style sheet for background objects
- pObj->SetStyleSheet(pSheet, FALSE);
+ pObj->SetStyleSheet(pSheet, sal_False);
SfxItemSet& rSet = pSheet->GetItemSet();
const XFillStyleItem& rFillStyle = (const XFillStyleItem&)rSet.Get(XATTR_FILLSTYLE);
if ( bForceFillStyle )
@@ -399,7 +433,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
DBG_ASSERT(pSheet, "Objektvorlage nicht gefunden");
if (pSheet)
{
- pObj->SetStyleSheet(pSheet, FALSE);
+ pObj->SetStyleSheet(pSheet, sal_False);
SfxItemSet aAttr(*mpView->GetDefaultAttr().Clone());
aAttr.Put(pSheet->GetItemSet().Get(XATTR_FILLSTYLE));
pObj->SetMergedItemSet(aAttr);
diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index f8aa53af34db..c98d8deb4ea2 100644..100755
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -88,8 +88,8 @@ void FuConstructUnoControl::DoExecute( SfxRequest& rReq )
{
FuConstruct::DoExecute( rReq );
- SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, FALSE );
- SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, FALSE );
+ SFX_REQUEST_ARG( rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR, sal_False );
+ SFX_REQUEST_ARG( rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER, sal_False );
if( pInventorItem )
nInventor = pInventorItem->GetValue();
if( pIdentifierItem )
@@ -105,17 +105,17 @@ void FuConstructUnoControl::DoExecute( SfxRequest& rReq )
|* MouseButtonDown-event
|*
\************************************************************************/
-BOOL FuConstructUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuConstructUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuConstruct::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuConstruct::MouseButtonDown(rMEvt);
if ( rMEvt.IsLeft() && !mpView->IsAction() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpWindow->CaptureMouse();
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aPnt, (OutputDevice*) NULL, nDrgLog);
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
}
@@ -125,7 +125,7 @@ BOOL FuConstructUnoControl::MouseButtonDown(const MouseEvent& rMEvt)
|* MouseMove-event
|*
\************************************************************************/
-BOOL FuConstructUnoControl::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuConstructUnoControl::MouseMove(const MouseEvent& rMEvt)
{
return FuConstruct::MouseMove(rMEvt);
}
@@ -135,15 +135,15 @@ BOOL FuConstructUnoControl::MouseMove(const MouseEvent& rMEvt)
|* MouseButtonUp-event
|*
\************************************************************************/
-BOOL FuConstructUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuConstructUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if ( mpView->IsCreateObj() && rMEvt.IsLeft() )
{
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
mpView->EndCreateObj(SDRCREATE_FORCEEND);
- bReturn = TRUE;
+ bReturn = sal_True;
}
bReturn = (FuConstruct::MouseButtonUp(rMEvt) || bReturn);
@@ -158,13 +158,13 @@ BOOL FuConstructUnoControl::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuConstructUnoControl::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuConstructUnoControl::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FuConstruct::KeyInput(rKEvt);
+ sal_Bool bReturn = FuConstruct::KeyInput(rKEvt);
return(bReturn);
}
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 858081dad195..ee83ece60cc9 100644..100755
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -101,12 +101,12 @@ void FuCopy::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( aAttr );
const SfxPoolItem* pPoolItem = NULL;
- if( SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLSTYLE, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLSTYLE, sal_True, &pPoolItem ) )
{
XFillStyle eStyle = ( ( const XFillStyleItem* ) pPoolItem )->GetValue();
if( eStyle == XFILL_SOLID &&
- SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLCOLOR, TRUE, &pPoolItem ) )
+ SFX_ITEM_SET == aAttr.GetItemState( XATTR_FILLCOLOR, sal_True, &pPoolItem ) )
{
const XFillColorItem* pItem = ( const XFillColorItem* ) pPoolItem;
XColorItem aXColorItem( ATTR_COPY_START_COLOR, pItem->GetName(),
@@ -122,7 +122,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
AbstractCopyDlg* pDlg = pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorTable(), mpView );
if( pDlg )
{
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
switch( nResult )
{
@@ -145,50 +145,50 @@ void FuCopy::DoExecute( SfxRequest& rReq )
}
Rectangle aRect;
- INT32 lWidth = 0, lHeight = 0, lSizeX = 0L, lSizeY = 0L, lAngle = 0L;
- UINT16 nNumber = 0;
+ sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0L, lSizeY = 0L, lAngle = 0L;
+ sal_uInt16 nNumber = 0;
Color aStartColor, aEndColor;
- BOOL bColor = FALSE;
+ sal_Bool bColor = sal_False;
const SfxPoolItem* pPoolItem = NULL;
// Anzahl
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_NUMBER, sal_True, &pPoolItem ) )
nNumber = ( ( const SfxUInt16Item* ) pPoolItem )->GetValue();
// Verschiebung
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_X, sal_True, &pPoolItem ) )
lSizeX = ( ( const SfxInt32Item* ) pPoolItem )->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_MOVE_Y, sal_True, &pPoolItem ) )
lSizeY = ( ( const SfxInt32Item* ) pPoolItem )->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_ANGLE, sal_True, &pPoolItem ) )
lAngle = ( ( const SfxInt32Item* )pPoolItem )->GetValue();
// Verrgroesserung / Verkleinerung
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_WIDTH, sal_True, &pPoolItem ) )
lWidth = ( ( const SfxInt32Item* ) pPoolItem )->GetValue();
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_HEIGHT, sal_True, &pPoolItem ) )
lHeight = ( ( const SfxInt32Item* ) pPoolItem )->GetValue();
// Startfarbe / Endfarbe
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_START_COLOR, sal_True, &pPoolItem ) )
{
aStartColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue();
- bColor = TRUE;
+ bColor = sal_True;
}
- if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( ATTR_COPY_END_COLOR, sal_True, &pPoolItem ) )
{
aEndColor = ( ( const XColorItem* ) pPoolItem )->GetColorValue();
if( aStartColor == aEndColor )
- bColor = FALSE;
+ bColor = sal_False;
}
else
- bColor = FALSE;
+ bColor = sal_False;
// Handles wegnehmen
//HMHmpView->HideMarkHdl();
SfxProgress* pProgress = NULL;
- BOOL bWaiting = FALSE;
+ sal_Bool bWaiting = sal_False;
if( nNumber > 1 )
{
@@ -197,12 +197,12 @@ void FuCopy::DoExecute( SfxRequest& rReq )
aStr.Append( String( SdResId( STR_UNDO_COPYOBJECTS ) ) );
pProgress = new SfxProgress( mpDocSh, aStr, nNumber );
- mpDocSh->SetWaitCursor( TRUE );
- bWaiting = TRUE;
+ mpDocSh->SetWaitCursor( sal_True );
+ bWaiting = sal_True;
}
const SdrMarkList aMarkList( mpView->GetMarkedObjectList() );
- const ULONG nMarkCount = aMarkList.GetMarkCount();
+ const sal_uLong nMarkCount = aMarkList.GetMarkCount();
SdrObject* pObj = NULL;
// Anzahl moeglicher Kopien berechnen
@@ -211,16 +211,16 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( lWidth < 0L )
{
long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth;
- nNumber = (UINT16) Min( nTmp, (long)nNumber );
+ nNumber = (sal_uInt16) Min( nTmp, (long)nNumber );
}
if( lHeight < 0L )
{
long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight;
- nNumber = (UINT16) Min( nTmp, (long)nNumber );
+ nNumber = (sal_uInt16) Min( nTmp, (long)nNumber );
}
- for( USHORT i = 1; i <= nNumber; i++ )
+ for( sal_uInt16 i = 1; i <= nNumber; i++ )
{
if( pProgress )
pProgress->SetState( i );
@@ -240,7 +240,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
// get newly selected objects
SdrMarkList aCopyMarkList( mpView->GetMarkedObjectList() );
- ULONG j, nCopyMarkCount = aMarkList.GetMarkCount();
+ sal_uLong j, nCopyMarkCount = aMarkList.GetMarkCount();
// set protection flags at marked copies to null
for( j = 0; j < nCopyMarkCount; j++ )
@@ -249,8 +249,8 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( pObj )
{
- pObj->SetMoveProtect( FALSE );
- pObj->SetResizeProtect( FALSE );
+ pObj->SetMoveProtect( sal_False );
+ pObj->SetResizeProtect( sal_False );
}
}
@@ -288,9 +288,9 @@ void FuCopy::DoExecute( SfxRequest& rReq )
{
// Koennte man sicher noch optimieren, wuerde aber u.U.
// zu Rundungsfehlern fuehren
- BYTE nRed = aStartColor.GetRed() + (BYTE) ( ( (long) aEndColor.GetRed() - (long) aStartColor.GetRed() ) * (long) i / (long) nNumber );
- BYTE nGreen = aStartColor.GetGreen() + (BYTE) ( ( (long) aEndColor.GetGreen() - (long) aStartColor.GetGreen() ) * (long) i / (long) nNumber );
- BYTE nBlue = aStartColor.GetBlue() + (BYTE) ( ( (long) aEndColor.GetBlue() - (long) aStartColor.GetBlue() ) * (long) i / (long) nNumber );
+ sal_uInt8 nRed = aStartColor.GetRed() + (sal_uInt8) ( ( (long) aEndColor.GetRed() - (long) aStartColor.GetRed() ) * (long) i / (long) nNumber );
+ sal_uInt8 nGreen = aStartColor.GetGreen() + (sal_uInt8) ( ( (long) aEndColor.GetGreen() - (long) aStartColor.GetGreen() ) * (long) i / (long) nNumber );
+ sal_uInt8 nBlue = aStartColor.GetBlue() + (sal_uInt8) ( ( (long) aEndColor.GetBlue() - (long) aStartColor.GetBlue() ) * (long) i / (long) nNumber );
Color aNewColor( nRed, nGreen, nBlue );
SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L );
aNewSet.Put( XFillStyleItem( XFILL_SOLID ) );
@@ -303,10 +303,10 @@ void FuCopy::DoExecute( SfxRequest& rReq )
delete pProgress;
if ( bWaiting )
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
// Handles zeigen
- mpView->AdjustMarkHdl(); //HMH TRUE );
+ mpView->AdjustMarkHdl(); //HMH sal_True );
//HMHpView->ShowMarkHdl();
mpView->EndUndo();
diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx
index 3000aaa8553c..d3333725e60e 100644..100755
--- a/sd/source/ui/func/fucushow.cxx
+++ b/sd/source/ui/func/fucushow.cxx
@@ -78,10 +78,10 @@ void FuCustomShowDlg::DoExecute( SfxRequest& )
AbstractSdCustomShowDlg* pDlg = pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0;
if( pDlg )
{
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
if( pDlg->IsModified() )
{
- mpDoc->SetChanged( TRUE );
+ mpDoc->SetChanged( sal_True );
sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
rSettings.mbCustomShow = pDlg->IsCustomShow();
}
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 3401b8d15134..b073a4820fda 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -92,9 +92,9 @@ TYPEINIT1( FuDraw, FuPoor );
FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
SdDrawDocument* pDoc, SfxRequest& rReq) :
FuPoor(pViewSh, pWin, pView, pDoc, rReq),
- bMBDown(FALSE),
- bDragHelpLine(FALSE),
- bPermanent(FALSE)
+ bMBDown(sal_False),
+ bDragHelpLine(sal_False),
+ bPermanent(sal_False)
{
}
@@ -115,14 +115,14 @@ FuDraw::~FuDraw()
|*
\************************************************************************/
-BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
- bDragHelpLine = FALSE;
+ bDragHelpLine = sal_False;
aMDPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
@@ -130,9 +130,9 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
{
FrameView* pFrameView = mpViewShell->GetFrameView();
- bool bOrtho = FALSE;
+ bool bOrtho = sal_False;
- BOOL bRestricted = TRUE;
+ sal_Bool bRestricted = sal_True;
if (mpView->IsDragObj())
{
@@ -142,7 +142,7 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl()))
{
// Move
- bRestricted = FALSE;
+ bRestricted = sal_False;
}
}
@@ -159,46 +159,46 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
}
if (!mpView->IsSnapEnabled())
- mpView->SetSnapEnabled(TRUE);
- BOOL bCntrl = rMEvt.IsMod1();
+ mpView->SetSnapEnabled(sal_True);
+ sal_Bool bSnapModPressed = rMEvt.IsMod1();
- BOOL bGridSnap = pFrameView->IsGridSnap();
- bGridSnap = (bCntrl != bGridSnap);
+ sal_Bool bGridSnap = pFrameView->IsGridSnap();
+ bGridSnap = (bSnapModPressed != bGridSnap);
if (mpView->IsGridSnap() != bGridSnap)
mpView->SetGridSnap(bGridSnap);
- BOOL bBordSnap = pFrameView->IsBordSnap();
- bBordSnap = (bCntrl != bBordSnap);
+ sal_Bool bBordSnap = pFrameView->IsBordSnap();
+ bBordSnap = (bSnapModPressed != bBordSnap);
if (mpView->IsBordSnap() != bBordSnap)
mpView->SetBordSnap(bBordSnap);
- BOOL bHlplSnap = pFrameView->IsHlplSnap();
- bHlplSnap = (bCntrl != bHlplSnap);
+ sal_Bool bHlplSnap = pFrameView->IsHlplSnap();
+ bHlplSnap = (bSnapModPressed != bHlplSnap);
if (mpView->IsHlplSnap() != bHlplSnap)
mpView->SetHlplSnap(bHlplSnap);
- BOOL bOFrmSnap = pFrameView->IsOFrmSnap();
- bOFrmSnap = (bCntrl != bOFrmSnap);
+ sal_Bool bOFrmSnap = pFrameView->IsOFrmSnap();
+ bOFrmSnap = (bSnapModPressed != bOFrmSnap);
if (mpView->IsOFrmSnap() != bOFrmSnap)
mpView->SetOFrmSnap(bOFrmSnap);
- BOOL bOPntSnap = pFrameView->IsOPntSnap();
- bOPntSnap = (bCntrl != bOPntSnap);
+ sal_Bool bOPntSnap = pFrameView->IsOPntSnap();
+ bOPntSnap = (bSnapModPressed != bOPntSnap);
if (mpView->IsOPntSnap() != bOPntSnap)
mpView->SetOPntSnap(bOPntSnap);
- BOOL bOConSnap = pFrameView->IsOConSnap();
- bOConSnap = (bCntrl != bOConSnap);
+ sal_Bool bOConSnap = pFrameView->IsOConSnap();
+ bOConSnap = (bSnapModPressed != bOConSnap);
if (mpView->IsOConSnap() != bOConSnap)
mpView->SetOConSnap(bOConSnap);
- BOOL bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled();
+ sal_Bool bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled();
if (mpView->IsAngleSnapEnabled() != bAngleSnap)
mpView->SetAngleSnapEnabled(bAngleSnap);
@@ -206,7 +206,7 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
if (mpView->IsOrtho() != bOrtho)
mpView->SetOrtho(bOrtho);
- BOOL bCenter = rMEvt.IsMod2();
+ sal_Bool bCenter = rMEvt.IsMod2();
if ( mpView->IsCreate1stPointAsCenter() != bCenter ||
mpView->IsResizeAtCenter() != bCenter )
@@ -216,22 +216,22 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
}
SdrPageView* pPV = 0;
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
// look only for HelpLines when they are visible (!)
- BOOL bHelpLine(FALSE);
+ sal_Bool bHelpLine(sal_False);
if(mpView->IsHlplVisible())
bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow, nHelpLine, pPV);
- BOOL bHitHdl = (mpView->PickHandle(aMDPos) != NULL);
+ sal_Bool bHitHdl = (mpView->PickHandle(aMDPos) != NULL);
if ( bHelpLine
&& !mpView->IsCreateObj()
- && ((mpView->GetEditMode() == SDREDITMODE_EDIT && !bHitHdl) || (rMEvt.IsShift() && bCntrl)) )
+ && ((mpView->GetEditMode() == SDREDITMODE_EDIT && !bHitHdl) || (rMEvt.IsShift() && bSnapModPressed)) )
{
mpWindow->CaptureMouse();
mpView->BegDragHelpLine(nHelpLine, pPV);
bDragHelpLine = mpView->IsDragHelpLine();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
ForcePointer(&rMEvt);
@@ -245,14 +245,14 @@ BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseMove(const MouseEvent& rMEvt)
{
FrameView* pFrameView = mpViewShell->GetFrameView();
Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
- bool bOrtho = FALSE;
+ bool bOrtho = sal_False;
- BOOL bRestricted = TRUE;
+ sal_Bool bRestricted = sal_True;
if (mpView->IsDragObj())
{
@@ -262,7 +262,7 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl()))
{
// Move
- bRestricted = FALSE;
+ bRestricted = sal_False;
}
}
@@ -280,46 +280,46 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
bOrtho = rMEvt.IsShift() != pFrameView->IsOrtho();
}
- BOOL bCntrl = rMEvt.IsMod1();
+ sal_Bool bSnapModPressed = rMEvt.IsMod2();
mpView->SetDragWithCopy(rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
- BOOL bGridSnap = pFrameView->IsGridSnap();
- bGridSnap = (bCntrl != bGridSnap);
+ sal_Bool bGridSnap = pFrameView->IsGridSnap();
+ bGridSnap = (bSnapModPressed != bGridSnap);
if (mpView->IsGridSnap() != bGridSnap)
mpView->SetGridSnap(bGridSnap);
- BOOL bBordSnap = pFrameView->IsBordSnap();
- bBordSnap = (bCntrl != bBordSnap);
+ sal_Bool bBordSnap = pFrameView->IsBordSnap();
+ bBordSnap = (bSnapModPressed != bBordSnap);
if (mpView->IsBordSnap() != bBordSnap)
mpView->SetBordSnap(bBordSnap);
- BOOL bHlplSnap = pFrameView->IsHlplSnap();
- bHlplSnap = (bCntrl != bHlplSnap);
+ sal_Bool bHlplSnap = pFrameView->IsHlplSnap();
+ bHlplSnap = (bSnapModPressed != bHlplSnap);
if (mpView->IsHlplSnap() != bHlplSnap)
mpView->SetHlplSnap(bHlplSnap);
- BOOL bOFrmSnap = pFrameView->IsOFrmSnap();
- bOFrmSnap = (bCntrl != bOFrmSnap);
+ sal_Bool bOFrmSnap = pFrameView->IsOFrmSnap();
+ bOFrmSnap = (bSnapModPressed != bOFrmSnap);
if (mpView->IsOFrmSnap() != bOFrmSnap)
mpView->SetOFrmSnap(bOFrmSnap);
- BOOL bOPntSnap = pFrameView->IsOPntSnap();
- bOPntSnap = (bCntrl != bOPntSnap);
+ sal_Bool bOPntSnap = pFrameView->IsOPntSnap();
+ bOPntSnap = (bSnapModPressed != bOPntSnap);
if (mpView->IsOPntSnap() != bOPntSnap)
mpView->SetOPntSnap(bOPntSnap);
- BOOL bOConSnap = pFrameView->IsOConSnap();
- bOConSnap = (bCntrl != bOConSnap);
+ sal_Bool bOConSnap = pFrameView->IsOConSnap();
+ bOConSnap = (bSnapModPressed != bOConSnap);
if (mpView->IsOConSnap() != bOConSnap)
mpView->SetOConSnap(bOConSnap);
- BOOL bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled();
+ sal_Bool bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled();
if (mpView->IsAngleSnapEnabled() != bAngleSnap)
mpView->SetAngleSnapEnabled(bAngleSnap);
@@ -327,7 +327,7 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
if (mpView->IsOrtho() != bOrtho)
mpView->SetOrtho(bOrtho);
- BOOL bCenter = rMEvt.IsMod2();
+ sal_Bool bCenter = rMEvt.IsMod2();
if ( mpView->IsCreate1stPointAsCenter() != bCenter ||
mpView->IsResizeAtCenter() != bCenter )
@@ -340,7 +340,7 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
mpView->MovDragHelpLine(aPos);
}
- BOOL bReturn = mpView->MouseMove(rMEvt, mpWindow);
+ sal_Bool bReturn = mpView->MouseMove(rMEvt, mpWindow);
if (mpView->IsAction())
{
@@ -360,7 +360,7 @@ BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
{
if ( mpView->IsDragHelpLine() )
mpView->EndDragHelpLine();
@@ -378,9 +378,9 @@ BOOL FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
FrameView* pFrameView = mpViewShell->GetFrameView();
mpView->SetOrtho( pFrameView->IsOrtho() );
mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
- mpView->SetSnapEnabled(TRUE);
- mpView->SetCreate1stPointAsCenter(FALSE);
- mpView->SetResizeAtCenter(FALSE);
+ mpView->SetSnapEnabled(sal_True);
+ mpView->SetCreate1stPointAsCenter(sal_False);
+ mpView->SetResizeAtCenter(sal_False);
mpView->SetDragWithCopy(pFrameView->IsDragWithCopy());
mpView->SetGridSnap(pFrameView->IsGridSnap());
mpView->SetBordSnap(pFrameView->IsBordSnap());
@@ -389,24 +389,24 @@ BOOL FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
mpView->SetOPntSnap(pFrameView->IsOPntSnap());
mpView->SetOConSnap(pFrameView->IsOConSnap());
- bIsInDragMode = FALSE;
+ bIsInDragMode = sal_False;
ForcePointer(&rMEvt);
FuPoor::MouseButtonUp(rMEvt);
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
|* Process keyboard-events
|*
-|* When processing a KeyEvent the returnvalue is TRUE, otherwise FALSE.
+|* When processing a KeyEvent the returnvalue is sal_True, otherwise sal_False.
|*
\************************************************************************/
-BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuDraw::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -421,7 +421,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
if (!mpDocSh->IsReadOnly())
{
- if ( mpView && mpView->IsPresObjSelected(FALSE, TRUE, FALSE, TRUE) )
+ if ( mpView && mpView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
InfoBox(mpWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
}
@@ -447,7 +447,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
mpView->DeleteMarked();
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
break;
@@ -478,7 +478,7 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
if(mpView->AreObjectsMarked())
mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -491,12 +491,12 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// mark last object
mpView->UnmarkAllObj();
- mpView->MarkNextObj(FALSE);
+ mpView->MarkNextObj(sal_False);
if(mpView->AreObjectsMarked())
mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -509,12 +509,12 @@ BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
{
// mark first object
mpView->UnmarkAllObj();
- mpView->MarkNextObj(TRUE);
+ mpView->MarkNextObj(sal_True);
if(mpView->AreObjectsMarked())
mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -588,9 +588,9 @@ void FuDraw::Deactivate()
void FuDraw::ForcePointer(const MouseEvent* pMEvt)
{
Point aPnt;
- USHORT nModifier = 0;
- BOOL bLeftDown = FALSE;
- BOOL bDefPointer = TRUE;
+ sal_uInt16 nModifier = 0;
+ sal_Bool bLeftDown = sal_False;
+ sal_Bool bDefPointer = sal_True;
if (pMEvt)
{
@@ -610,7 +610,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
/******************************************************************
* Giesskannenmodus
******************************************************************/
- bDefPointer = FALSE;
+ bDefPointer = sal_False;
mpWindow->SetPointer(Pointer(POINTER_FILL));
}
}
@@ -623,7 +623,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
/******************************************************************
* Giesskannenmodus
******************************************************************/
- bDefPointer = FALSE;
+ bDefPointer = sal_False;
mpWindow->SetPointer(Pointer(POINTER_FILL));
}
else if (!pHdl &&
@@ -636,7 +636,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if (pMask && pMask->IsEyedropping())
{
- bDefPointer = FALSE;
+ bDefPointer = sal_False;
mpWindow->SetPointer(Pointer(POINTER_REFHAND));
}
}
@@ -664,7 +664,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if ((pObject->ISA(E3dObject)) && (rMarkList.GetMarkCount() == 1))
{
mpWindow->SetPointer(Pointer(POINTER_ROTATE));
- bDefPointer = FALSE; // Otherwise it'll be calles Joes routine and the mousepointer will reconfigurate again
+ bDefPointer = sal_False; // Otherwise it'll be calles Joes routine and the mousepointer will reconfigurate again
}
}
@@ -679,7 +679,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
}
else if (eHit == SDRHIT_TEXTEDITOBJ && this->ISA(FuSelection))
{
- UINT16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
if ( nSdrObjKind != OBJ_TEXT &&
nSdrObjKind != OBJ_TITLETEXT &&
@@ -687,7 +687,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
aVEvt.pObj->IsEmptyPresObj() )
{
pObj = NULL;
- bDefPointer = FALSE;
+ bDefPointer = sal_False;
mpWindow->SetPointer(Pointer(POINTER_ARROW));
}
}
@@ -720,22 +720,22 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
|*
\************************************************************************/
-BOOL FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
+sal_Bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
- BOOL bAnimationInfo = (!mpDocSh->ISA(GraphicDocShell) &&
- mpDoc->GetAnimationInfo(pObj)) ? TRUE:FALSE;
+ sal_Bool bAnimationInfo = (!mpDocSh->ISA(GraphicDocShell) &&
+ mpDoc->GetAnimationInfo(pObj)) ? sal_True:sal_False;
- BOOL bImageMapInfo = FALSE;
+ sal_Bool bImageMapInfo = sal_False;
if (!bAnimationInfo)
- bImageMapInfo = mpDoc->GetIMapInfo(pObj) ? TRUE:FALSE;
+ bImageMapInfo = mpDoc->GetIMapInfo(pObj) ? sal_True:sal_False;
if (bAnimationInfo || bImageMapInfo)
{
const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
- USHORT nHitLog(USHORT (mpWindow->PixelToLogic(Size(HITPIX,0)).Width()));
+ sal_uInt16 nHitLog(sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width()));
long n2HitLog(nHitLog * 2);
Point aHitPosR(rPos);
Point aHitPosL(rPos);
@@ -786,7 +786,7 @@ BOOL FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
pInfo->meTextEffect != presentation::AnimationEffect_NONE )))))
{
// Animations-Objekt
- bSet = TRUE;
+ bSet = sal_True;
mpWindow->SetPointer(Pointer(POINTER_REFHAND));
}
}
@@ -796,7 +796,7 @@ BOOL FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
/******************************************************
* ImageMap
******************************************************/
- bSet = TRUE;
+ bSet = sal_True;
mpWindow->SetPointer(Pointer(POINTER_REFHAND));
}
}
@@ -815,7 +815,7 @@ BOOL FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
void FuDraw::DoubleClick(const MouseEvent& rMEvt)
{
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
if ( mpView->AreObjectsMarked() )
{
@@ -826,8 +826,8 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
{
@@ -861,7 +861,7 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
{
// hit group -> select subobject
mpView->UnMarkAll();
- mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), TRUE);
+ mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), sal_True);
}
}
}
@@ -875,9 +875,9 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDraw::RequestHelp(const HelpEvent& rHEvt)
+sal_Bool FuDraw::RequestHelp(const HelpEvent& rHEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled())
{
@@ -924,9 +924,9 @@ BOOL FuDraw::RequestHelp(const HelpEvent& rHEvt)
|*
\************************************************************************/
-BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewEvent& rVEvt)
+sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewEvent& rVEvt)
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
String aHelpText;
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(rPosPixel)));
@@ -1065,7 +1065,7 @@ BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewE
if (aHelpText.Len())
{
- bSet = TRUE;
+ bSet = sal_True;
Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect());
Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()),
mpWindow->OutputToScreenPixel(aLogicPix.BottomRight()));
diff --git a/sd/source/ui/func/fudspord.cxx b/sd/source/ui/func/fudspord.cxx
index d06777942e69..5ca4c327a242 100644..100755
--- a/sd/source/ui/func/fudspord.cxx
+++ b/sd/source/ui/func/fudspord.cxx
@@ -92,12 +92,12 @@ FunctionReference FuDisplayOrder::Create( ViewShell* pViewSh, ::sd::Window* pWin
|*
\************************************************************************/
-BOOL FuDisplayOrder::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuDisplayOrder::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -106,7 +106,7 @@ BOOL FuDisplayOrder::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDisplayOrder::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuDisplayOrder::MouseMove(const MouseEvent& rMEvt)
{
SdrObject* pPickObj;
SdrPageView* pPV;
@@ -132,7 +132,7 @@ BOOL FuDisplayOrder::MouseMove(const MouseEvent& rMEvt)
implClearOverlay();
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -141,7 +141,7 @@ BOOL FuDisplayOrder::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuDisplayOrder::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuDisplayOrder::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
@@ -163,7 +163,7 @@ BOOL FuDisplayOrder::MouseButtonUp(const MouseEvent& rMEvt)
mpViewShell->Cancel();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index 24fb5dfd2e9b..a6d9981040eb 100644..100755
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -79,7 +79,7 @@ FunctionReference FuEditGluePoints::Create( ViewShell* pViewSh, ::sd::Window* pW
void FuEditGluePoints::DoExecute( SfxRequest& rReq )
{
FuDraw::DoExecute( rReq );
- mpView->SetInsGluePointMode(FALSE);
+ mpView->SetInsGluePointMode(sal_False);
mpViewShell->GetViewShellBase().GetToolBarManager()->AddToolBar(
ToolBarManager::TBG_FUNCTION,
ToolBarManager::msGluePointsToolBar);
@@ -95,7 +95,7 @@ FuEditGluePoints::~FuEditGluePoints()
{
mpView->BrkAction();
mpView->UnmarkAllGluePoints();
- mpView->SetInsGluePointMode(FALSE);
+ mpView->SetInsGluePointMode(sal_False);
}
/*************************************************************************
@@ -104,25 +104,25 @@ FuEditGluePoints::~FuEditGluePoints()
|*
\************************************************************************/
-BOOL FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
{
mpView->SetActualWin( mpWindow );
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
if (mpView->IsAction())
{
if (rMEvt.IsRight())
mpView->BckAction();
- return TRUE;
+ return sal_True;
}
if (rMEvt.IsLeft())
{
- bReturn = TRUE;
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ bReturn = sal_True;
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpWindow->CaptureMouse();
SdrViewEvent aVEvt;
@@ -197,7 +197,7 @@ BOOL FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
mpView->UnmarkAllObj();
}
- BOOL bMarked = FALSE;
+ sal_Bool bMarked = sal_False;
if (!rMEvt.IsMod1())
{
@@ -248,7 +248,7 @@ BOOL FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
{
mpView->SetActualWin( mpWindow );
@@ -264,7 +264,7 @@ BOOL FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
ForcePointer(&rMEvt);
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -273,21 +273,21 @@ BOOL FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt)
{
mpView->SetActualWin( mpWindow );
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (mpView->IsAction())
{
- bReturn = TRUE;
+ bReturn = sal_True;
mpView->EndAction();
}
FuDraw::MouseButtonUp(rMEvt);
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
if (Abs(aMDPos.X() - aPos.X()) < nDrgLog &&
@@ -313,16 +313,16 @@ BOOL FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
{
mpView->SetActualWin( mpWindow );
- BOOL bReturn = FuDraw::KeyInput(rKEvt);
+ sal_Bool bReturn = FuDraw::KeyInput(rKEvt);
return bReturn;
}
@@ -333,7 +333,7 @@ BOOL FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
|*
\************************************************************************/
-BOOL FuEditGluePoints::Command(const CommandEvent& rCEvt)
+sal_Bool FuEditGluePoints::Command(const CommandEvent& rCEvt)
{
mpView->SetActualWin( mpWindow );
return FuPoor::Command( rCEvt );
@@ -359,7 +359,7 @@ void FuEditGluePoints::Activate()
void FuEditGluePoints::Deactivate()
{
- mpView->SetGluePointEditMode( FALSE );
+ mpView->SetGluePointEditMode( sal_False );
FuDraw::Deactivate();
}
@@ -411,44 +411,44 @@ void FuEditGluePoints::ReceiveRequest(SfxRequest& rReq)
{
const SfxItemSet* pSet = rReq.GetArgs();
const SfxPoolItem& rItem = pSet->Get(SID_GLUE_PERCENT);
- BOOL bPercent = ((const SfxBoolItem&) rItem).GetValue();
+ sal_Bool bPercent = ((const SfxBoolItem&) rItem).GetValue();
mpView->SetMarkedGluePointsPercent(bPercent);
}
break;
case SID_GLUE_HORZALIGN_CENTER:
{
- mpView->SetMarkedGluePointsAlign(FALSE, SDRHORZALIGN_CENTER);
+ mpView->SetMarkedGluePointsAlign(sal_False, SDRHORZALIGN_CENTER);
}
break;
case SID_GLUE_HORZALIGN_LEFT:
{
- mpView->SetMarkedGluePointsAlign(FALSE, SDRHORZALIGN_LEFT);
+ mpView->SetMarkedGluePointsAlign(sal_False, SDRHORZALIGN_LEFT);
}
break;
case SID_GLUE_HORZALIGN_RIGHT:
{
- mpView->SetMarkedGluePointsAlign(FALSE, SDRHORZALIGN_RIGHT);
+ mpView->SetMarkedGluePointsAlign(sal_False, SDRHORZALIGN_RIGHT);
}
break;
case SID_GLUE_VERTALIGN_CENTER:
{
- mpView->SetMarkedGluePointsAlign(TRUE, SDRVERTALIGN_CENTER);
+ mpView->SetMarkedGluePointsAlign(sal_True, SDRVERTALIGN_CENTER);
}
break;
case SID_GLUE_VERTALIGN_TOP:
{
- mpView->SetMarkedGluePointsAlign(TRUE, SDRVERTALIGN_TOP);
+ mpView->SetMarkedGluePointsAlign(sal_True, SDRVERTALIGN_TOP);
}
break;
case SID_GLUE_VERTALIGN_BOTTOM:
{
- mpView->SetMarkedGluePointsAlign(TRUE, SDRVERTALIGN_BOTTOM);
+ mpView->SetMarkedGluePointsAlign(sal_True, SDRVERTALIGN_BOTTOM);
}
break;
}
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index fe428393be74..3184bcc7f9ce 100644..100755
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -85,10 +85,13 @@ FunctionReference FuExpandPage::Create( ViewShell* pViewSh, ::sd::Window* pWin,
void FuExpandPage::DoExecute( SfxRequest& )
{
+ if ( mpView && mpView->IsTextEdit() )
+ mpView->SdrEndTextEdit();
+
// Selektierte Seite finden (nur Standard-Seiten)
SdPage* pActualPage = NULL;
- USHORT i = 0;
- USHORT nCount = mpDoc->GetSdPageCount(PK_STANDARD);
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = mpDoc->GetSdPageCount(PK_STANDARD);
while (!pActualPage && i < nCount)
{
@@ -104,8 +107,8 @@ void FuExpandPage::DoExecute( SfxRequest& )
{
::sd::Outliner* pOutl =
new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT );
- pOutl->SetUpdateMode(FALSE);
- pOutl->EnableUndo(FALSE);
+ pOutl->SetUpdateMode(sal_False);
+ pOutl->EnableUndo(sal_False);
if (mpDocSh)
pOutl->SetRefDevice( SD_MOD()->GetRefDevice( *mpDocSh ) );
@@ -114,7 +117,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
pOutl->SetStyleSheetPool((SfxStyleSheetPool*) mpDoc->GetStyleSheetPool());
SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
- USHORT nActualPageNum = pActualPage->GetPageNum();
+ sal_uInt16 nActualPageNum = pActualPage->GetPageNum();
SdPage* pActualNotesPage = (SdPage*) mpDoc->GetPage(nActualPageNum + 1);
SdrTextObj* pActualOutline = (SdrTextObj*) pActualPage->GetPresObj(PRESOBJ_OUTLINE);
@@ -131,25 +134,25 @@ void FuExpandPage::DoExecute( SfxRequest& )
// Harte Absatz- und Zeichenattribute entfernen
SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- ULONG nParaCount1 = pOutl->GetParagraphCount();
+ sal_uLong nParaCount1 = pOutl->GetParagraphCount();
- for (USHORT nPara = 0; nPara < nParaCount1; nPara++)
+ for (sal_uInt16 nPara = 0; nPara < nParaCount1; nPara++)
{
pOutl->QuickRemoveCharAttribs(nPara);
pOutl->SetParaAttribs(nPara, aEmptyEEAttr);
}
- USHORT nPos = 2;
+ sal_uInt16 nPos = 2;
Paragraph* pPara = pOutl->GetParagraph( 0 );
while (pPara)
{
- ULONG nParaPos = pOutl->GetAbsPos( pPara );
- sal_Int16 nDepth = pOutl->GetDepth( (USHORT) nParaPos );
+ sal_uLong nParaPos = pOutl->GetAbsPos( pPara );
+ sal_Int16 nDepth = pOutl->GetDepth( (sal_uInt16) nParaPos );
if ( nDepth == 0 )
{
// Seite mit Titel & Gliederung!
- SdPage* pPage = (SdPage*) mpDoc->AllocPage(FALSE);
+ SdPage* pPage = (SdPage*) mpDoc->AllocPage(sal_False);
pPage->SetSize(pActualPage->GetSize() );
pPage->SetBorder(pActualPage->GetLftBorder(),
pActualPage->GetUppBorder(),
@@ -167,11 +170,11 @@ void FuExpandPage::DoExecute( SfxRequest& )
// MasterPage der aktuellen Seite verwenden
pPage->TRG_SetMasterPage(pActualPage->TRG_GetMasterPage());
pPage->SetLayoutName(pActualPage->GetLayoutName());
- pPage->SetAutoLayout(AUTOLAYOUT_ENUM, TRUE);
+ pPage->SetAutoLayout(AUTOLAYOUT_ENUM, sal_True);
pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
// Notiz-Seite
- SdPage* pNotesPage = (SdPage*) mpDoc->AllocPage(FALSE);
+ SdPage* pNotesPage = (SdPage*) mpDoc->AllocPage(sal_False);
pNotesPage->SetSize(pActualNotesPage->GetSize());
pNotesPage->SetBorder(pActualNotesPage->GetLftBorder(),
pActualNotesPage->GetUppBorder(),
@@ -190,13 +193,13 @@ void FuExpandPage::DoExecute( SfxRequest& )
// MasterPage der aktuellen Seite verwenden
pNotesPage->TRG_SetMasterPage(pActualNotesPage->TRG_GetMasterPage());
pNotesPage->SetLayoutName(pActualNotesPage->GetLayoutName());
- pNotesPage->SetAutoLayout(pActualNotesPage->GetAutoLayout(), TRUE);
+ pNotesPage->SetAutoLayout(pActualNotesPage->GetAutoLayout(), sal_True);
pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
// Title-Textobjekt erstellen
SdrTextObj* pTextObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_TITLE);
- OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( (USHORT) nParaPos, 1);
+ OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( (sal_uInt16) nParaPos, 1);
pOutlinerParaObject->SetOutlinerMode(OUTLINERMODE_TITLEOBJECT);
if( pOutlinerParaObject->GetDepth(0) != -1 )
@@ -215,12 +218,12 @@ void FuExpandPage::DoExecute( SfxRequest& )
pTextObj->SetOutlinerParaObject(pOutlinerParaObject);
- pTextObj->SetEmptyPresObj(FALSE);
+ pTextObj->SetEmptyPresObj(sal_False);
SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
- pTextObj->NbcSetStyleSheet(pSheet, FALSE);
+ pTextObj->NbcSetStyleSheet(pSheet, sal_False);
- ULONG nChildCount = pOutl->GetChildCount(pPara);
+ sal_uLong nChildCount = pOutl->GetChildCount(pPara);
if (nChildCount > 0)
{
@@ -228,18 +231,18 @@ void FuExpandPage::DoExecute( SfxRequest& )
SdrTextObj* pOutlineObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_OUTLINE);
pPara = pOutl->GetParagraph( ++nParaPos );
- OutlinerParaObject* pOPO = pOutl->CreateParaObject( (USHORT) nParaPos, (USHORT) nChildCount);
+ OutlinerParaObject* pOPO = pOutl->CreateParaObject( (sal_uInt16) nParaPos, (sal_uInt16) nChildCount);
SdrOutliner* pTempOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpDoc );
pTempOutl->SetText( *pOPO );
- ULONG nParaCount2 = pTempOutl->GetParagraphCount();
- ULONG nPara;
+ sal_uLong nParaCount2 = pTempOutl->GetParagraphCount();
+ sal_uLong nPara;
for( nPara = 0; nPara < nParaCount2; nPara++ )
{
pTempOutl->SetDepth (
pTempOutl->GetParagraph( nPara ),
- pTempOutl->GetDepth((USHORT) nPara ) - 1);
+ pTempOutl->GetDepth((sal_uInt16) nPara ) - 1);
}
delete pOPO;
@@ -247,9 +250,9 @@ void FuExpandPage::DoExecute( SfxRequest& )
delete pTempOutl;
pOutlineObj->SetOutlinerParaObject( pOPO );
- pOutlineObj->SetEmptyPresObj(FALSE);
+ pOutlineObj->SetEmptyPresObj(sal_False);
- // Harte Attribute entfernen (Flag auf TRUE)
+ // Harte Attribute entfernen (Flag auf sal_True)
SfxItemSet aAttr(mpDoc->GetPool());
aAttr.Put(XLineStyleItem(XLINE_NONE));
aAttr.Put(XFillStyleItem(XFILL_NONE));
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx
index ce189dd459ab..77908a5335e8 100644..100755
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -104,7 +104,7 @@ static void unmarkimpl( SdrView* pView )
pView->UnMarkAll();
}
-BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
{
if(mpView&&mpWindow)
{
@@ -115,7 +115,7 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
{
SdrObject* pPickObj=0;
SdrPageView* pPV=0;
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pPickObj, pPV, SDRSEARCH_PICKMARKABLE);
if( (pPickObj != 0) && !pPickObj->IsEmptyPresObj() )
@@ -151,18 +151,18 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
if( aVEvt.pObj )
{
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- BOOL bToggle = FALSE;
- mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE);
- return TRUE;
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_Bool bToggle = sal_False;
+ mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, sal_False);
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if( mpWindow && mpView )
{
if ( mpView->IsTextEdit() )
@@ -172,10 +172,10 @@ BOOL FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
}
else
{
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
SdrObject* pObj=0;
SdrPageView* pPV=0;
- BOOL bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE);
+ sal_Bool bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE);
if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) )
mpWindow->SetPointer(Pointer(POINTER_FILL));
@@ -186,7 +186,7 @@ BOOL FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
return bReturn;
}
-BOOL FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt)
{
if( mpItemSet.get() && mpView && mpView->AreObjectsMarked() )
{
@@ -208,19 +208,19 @@ BOOL FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt)
mpViewShell->GetViewFrame()->GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
if( mbPermanent )
- return TRUE;
+ return sal_True;
}
implcancel();
- return TRUE;
+ return sal_True;
}
-BOOL FuFormatPaintBrush::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuFormatPaintBrush::KeyInput(const KeyEvent& rKEvt)
{
if( (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE) && mpViewShell )
{
implcancel();
- return TRUE;
+ return sal_True;
}
return FuPoor::KeyInput(rKEvt);
}
@@ -230,8 +230,8 @@ void FuFormatPaintBrush::Activate()
mbOldIsQuickTextEditMode = mpViewShell->GetFrameView()->IsQuickEdit();
if( !mbOldIsQuickTextEditMode )
{
- mpViewShell->GetFrameView()->SetQuickEdit(TRUE);
- mpView->SetQuickTextEditMode(TRUE);
+ mpViewShell->GetFrameView()->SetQuickEdit(sal_True);
+ mpView->SetQuickTextEditMode(sal_True);
}
}
@@ -239,12 +239,12 @@ void FuFormatPaintBrush::Deactivate()
{
if( !mbOldIsQuickTextEditMode )
{
- mpViewShell->GetFrameView()->SetQuickEdit(FALSE);
- mpView->SetQuickTextEditMode(FALSE);
+ mpViewShell->GetFrameView()->SetQuickEdit(sal_False);
+ mpView->SetQuickTextEditMode(sal_False);
}
}
-bool FuFormatPaintBrush::HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const
+bool FuFormatPaintBrush::HasContentForThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const
{
if( mpItemSet.get() == 0 )
return false;
@@ -264,7 +264,7 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphForma
{
String sLabel( mpViewShell->GetViewShellBase().RetrieveLabelFromCommand( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormatPaintbrush" ) ) ) );
mpDoc->BegUndo( sLabel );
- mpDoc->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,FALSE,TRUE));
+ mpDoc->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoAttrObject(*pObj,sal_False,sal_True));
}
mpView->ApplyFormatPaintBrush( *mpItemSet.get(), bNoCharacterFormats, bNoParagraphFormats );
@@ -279,7 +279,7 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphForma
/* static */ void FuFormatPaintBrush::GetMenuState( DrawViewShell& rDrawViewShell, SfxItemSet &rSet )
{
const SdrMarkList& rMarkList = rDrawViewShell.GetDrawView()->GetMarkedObjectList();
- const ULONG nMarkCount = rMarkList.GetMarkCount();
+ const sal_uLong nMarkCount = rMarkList.GetMarkCount();
if( nMarkCount == 1 )
{
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index f6751059a28c..7af85364efad 100644..100755
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -80,16 +80,16 @@ FuHangulHanjaConversion::FuHangulHanjaConversion (
SfxRequest& rReq )
: FuPoor(pViewSh, pWin, pView, pDocument, rReq),
pSdOutliner(NULL),
- bOwnOutliner(FALSE)
+ bOwnOutliner(sal_False)
{
if ( mpViewShell->ISA(DrawViewShell) )
{
- bOwnOutliner = TRUE;
+ bOwnOutliner = sal_True;
pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
}
else if ( mpViewShell->ISA(OutlineViewShell) )
{
- bOwnOutliner = FALSE;
+ bOwnOutliner = sal_False;
pSdOutliner = mpDoc->GetOutliner();
}
@@ -126,8 +126,8 @@ FunctionReference FuHangulHanjaConversion::Create( ViewShell* pViewSh, ::sd::Win
|*
\************************************************************************/
-void FuHangulHanjaConversion::StartConversion( INT16 nSourceLanguage, INT16 nTargetLanguage,
- const Font *pTargetFont, INT32 nOptions, BOOL bIsInteractive )
+void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+ const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive )
{
String aString( SdResId(STR_UNDO_HANGULHANJACONVERSION) );
@@ -143,7 +143,7 @@ void FuHangulHanjaConversion::StartConversion( INT16 nSourceLanguage, INT16 nTar
{
pSdOutliner->EndConversion();
- bOwnOutliner = TRUE;
+ bOwnOutliner = sal_True;
pSdOutliner = new Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
pSdOutliner->BeginConversion();
}
@@ -152,7 +152,7 @@ void FuHangulHanjaConversion::StartConversion( INT16 nSourceLanguage, INT16 nTar
pSdOutliner->EndConversion();
delete pSdOutliner;
- bOwnOutliner = FALSE;
+ bOwnOutliner = sal_False;
pSdOutliner = mpDoc->GetOutliner();
pSdOutliner->BeginConversion();
}
@@ -180,7 +180,7 @@ void FuHangulHanjaConversion::StartConversion( INT16 nSourceLanguage, INT16 nTar
}
-void FuHangulHanjaConversion::ConvertStyles( INT16 nTargetLanguage, const Font *pTargetFont )
+void FuHangulHanjaConversion::ConvertStyles( sal_Int16 nTargetLanguage, const Font *pTargetFont )
{
if( !mpDoc )
return;
@@ -196,11 +196,11 @@ void FuHangulHanjaConversion::ConvertStyles( INT16 nTargetLanguage, const Font *
const bool bHasParent = pStyle->GetParent().Len() != 0;
- if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, FALSE ) == SFX_ITEM_SET )
+ if( !bHasParent || rSet.GetItemState( EE_CHAR_LANGUAGE_CJK, sal_False ) == SFX_ITEM_SET )
rSet.Put( SvxLanguageItem( nTargetLanguage, EE_CHAR_LANGUAGE_CJK ) );
if( pTargetFont &&
- ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, FALSE ) == SFX_ITEM_SET ) )
+ ( !bHasParent || rSet.GetItemState( EE_CHAR_FONTINFO_CJK, sal_False ) == SFX_ITEM_SET ) )
{
// set new font attribute
SvxFontItem aFontItem( (SvxFontItem&) rSet.Get( EE_CHAR_FONTINFO_CJK ) );
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index a46fbbee3e4d..757858364555 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -43,7 +43,7 @@
#include <tools/urlobj.hxx>
#include <svl/urihelper.hxx>
-
+#include <sfx2/msgpool.hxx>
#include <svtools/sores.hxx>
#include <svtools/insdlg.hxx>
#include <sfx2/request.hxx>
@@ -169,7 +169,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
}
else
{
- SdGRFFilter::HandleGraphicFilterError( (USHORT)nError, GraphicFilter::GetGraphicFilter()->GetLastError().nStreamError );
+ SdGRFFilter::HandleGraphicFilterError( (sal_uInt16)nError, GraphicFilter::GetGraphicFilter()->GetLastError().nStreamError );
}
}
}
@@ -204,7 +204,7 @@ FunctionReference FuInsertClipboard::Create( ViewShell* pViewSh, ::sd::Window* p
void FuInsertClipboard::DoExecute( SfxRequest& )
{
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( mpWindow ) );
- ULONG nFormatId;
+ sal_uLong nFormatId;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() );
@@ -233,7 +233,7 @@ void FuInsertClipboard::DoExecute( SfxRequest& )
if( !mpView->InsertData( aDataHelper,
mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ),
- nAction, FALSE, nFormatId ) &&
+ nAction, sal_False, nFormatId ) &&
( mpViewShell && mpViewShell->ISA( DrawViewShell ) ) )
{
DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>(mpViewShell);
@@ -374,7 +374,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
bool bRet = true;
if( pPickObj )
- mpView->ReplaceObjectAtView(pPickObj, *pPV, pOleObj, TRUE );
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pOleObj, sal_True );
else
bRet = mpView->InsertObjectAtView(pOleObj, *pPV, SDRINSERT_SETDEFLAYER);
@@ -422,7 +422,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
* Objekt einfuegen
**********************************************************************/
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
- BOOL bCreateNew = FALSE;
+ sal_Bool bCreateNew = sal_False;
uno::Reference < embed::XEmbeddedObject > xObj;
uno::Reference < embed::XStorage > xStorage = comphelper::OStorageHelper::GetTemporaryStorage();
SvObjectServerList aServerLst;
@@ -457,12 +457,11 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// intentionally no break!
}
case SID_INSERT_PLUGIN :
- case SID_INSERT_APPLET :
case SID_INSERT_FLOATINGFRAME :
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractInsertObjectDialog* pDlg =
- pFact->CreateInsertObjectDialog( mpViewShell->GetActiveWindow(), nSlotId,
+ pFact->CreateInsertObjectDialog( mpViewShell->GetActiveWindow(), SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommandString(),
xStorage, &aServerLst );
if ( pDlg )
{
@@ -531,9 +530,9 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
{
//TODO/LATER: needs status for RESIZEONPRINTERCHANGE
//if( SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xObj->getStatus( nAspect ) )
- // aIPObj->OnDocumentPrinterChanged( mpDocSh->GetPrinter(FALSE) );
+ // aIPObj->OnDocumentPrinterChanged( mpDocSh->GetPrinter(sal_False) );
- BOOL bInsertNewObject = TRUE;
+ sal_Bool bInsertNewObject = sal_True;
Size aSize;
MapUnit aMapUnit = MAP_100TH_MM;
@@ -588,8 +587,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
/**************************************************
* Das leere OLE-Objekt bekommt ein neues IPObj
**************************************************/
- bInsertNewObject = FALSE;
- pObj->SetEmptyPresObj(FALSE);
+ bInsertNewObject = sal_False;
+ pObj->SetEmptyPresObj(sal_False);
( (SdrOle2Obj*) pObj)->SetOutlinerParaObject(NULL);
( (SdrOle2Obj*) pObj)->SetObjRef(xObj);
( (SdrOle2Obj*) pObj)->SetPersistName(aName);
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index a090f74f85bc..13f8420b52e9 100644..100755
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -85,9 +85,9 @@ namespace sd {
TYPEINIT1( FuInsertFile, FuPoor );
-#define POOL_BUFFER_SIZE (USHORT)32768
-#define BASIC_BUFFER_SIZE (USHORT)8192
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define POOL_BUFFER_SIZE (sal_uInt16)32768
+#define BASIC_BUFFER_SIZE (sal_uInt16)8192
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
/*************************************************************************
|*
@@ -258,8 +258,8 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
}
else
{
- SFX_REQUEST_ARG (rReq, pFileName, SfxStringItem, ID_VAL_DUMMY0, FALSE);
- SFX_REQUEST_ARG (rReq, pFilterName, SfxStringItem, ID_VAL_DUMMY1, FALSE);
+ SFX_REQUEST_ARG (rReq, pFileName, SfxStringItem, ID_VAL_DUMMY0, sal_False);
+ SFX_REQUEST_ARG (rReq, pFilterName, SfxStringItem, ID_VAL_DUMMY1, sal_False);
aFile = pFileName->GetValue ();
@@ -267,15 +267,15 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
aFilterName = pFilterName->GetValue ();
}
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
- SfxMedium* pMedium = new SfxMedium( aFile, STREAM_READ | STREAM_NOCREATE, FALSE );
+ SfxMedium* pMedium = new SfxMedium( aFile, STREAM_READ | STREAM_NOCREATE, sal_False );
const SfxFilter* pFilter = NULL;
SFX_APP()->GetFilterMatcher().GuessFilter( *pMedium, &pFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE );
- BOOL bDrawMode = mpViewShell && mpViewShell->ISA(DrawViewShell);
- BOOL bInserted = FALSE;
+ sal_Bool bDrawMode = mpViewShell && mpViewShell->ISA(DrawViewShell);
+ sal_Bool bInserted = sal_False;
if( pFilter )
{
@@ -295,19 +295,19 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
InsSDDinOlMode( pMedium );
// don't delete Medium here, ownership of pMedium has changed in this case
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
else
{
- BOOL bFound = ( ::std::find( aFilterVector.begin(), aFilterVector.end(), pFilter->GetMimeType() ) != aFilterVector.end() );
+ sal_Bool bFound = ( ::std::find( aFilterVector.begin(), aFilterVector.end(), pFilter->GetMimeType() ) != aFilterVector.end() );
if( !bFound &&
( aFilterName.SearchAscii( "Text" ) != STRING_NOTFOUND ||
aFilterName.SearchAscii( "Rich" ) != STRING_NOTFOUND ||
aFilterName.SearchAscii( "RTF" ) != STRING_NOTFOUND ||
aFilterName.SearchAscii( "HTML" ) != STRING_NOTFOUND ) )
{
- bFound = TRUE;
+ bFound = sal_True;
}
if( bFound )
@@ -317,13 +317,13 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
else
InsTextOrRTFinOlMode(pMedium);
- bInserted = TRUE;
+ bInserted = sal_True;
delete pMedium;
}
}
}
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
if( !bInserted )
{
@@ -335,37 +335,37 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
// -----------------------------------------------------------------------------
-BOOL FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
+sal_Bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
{
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
// Liste mit Seitennamen (wenn NULL, dann alle Seiten)
List* pBookmarkList = NULL;
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
AbstractSdInsertPagesObjsDlg* pDlg = pFact ? pFact->CreateSdInsertPagesObjsDlg( NULL, mpDoc, pMedium, aFile ) : 0;
if( !pDlg )
- return FALSE;
+ return sal_False;
// Ev. wird eine QueryBox geoeffnet ("Links aktualisieren?"),
// daher wird der Dialog der aktuelle DefModalDialogParent
::Window* pDefParent = GetpApp()->GetDefDialogParent();
GetpApp()->SetDefDialogParent(pDlg->GetWindow());
- USHORT nRet = pDlg->Execute();
+ sal_uInt16 nRet = pDlg->Execute();
GetpApp()->SetDefDialogParent(pDefParent);
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
if( nRet == RET_OK )
{
// Zuerst Seiten einfuegen
pBookmarkList = pDlg->GetList( 1 ); // Seiten
- BOOL bLink = pDlg->IsLink();
- BOOL bReplace = FALSE;
+ sal_Bool bLink = pDlg->IsLink();
+ sal_Bool bReplace = sal_False;
SdPage* pPage = NULL;
::sd::View* pView = mpViewShell->GetView();
@@ -378,7 +378,7 @@ BOOL FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
pPage = static_cast<SdPage*>(pView->GetSdrPageView()->GetPage());
}
- USHORT nPos = 0xFFFF;
+ sal_uInt16 nPos = 0xFFFF;
if (pPage && !pPage->IsMasterPage())
{
@@ -392,7 +392,7 @@ BOOL FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
}
}
- BOOL bNameOK;
+ sal_Bool bNameOK;
List* pObjectBookmarkList = pDlg->GetList( 2 ); // Objekte
List* pExchangeList = NULL;
@@ -403,13 +403,13 @@ BOOL FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
// Um zu gewaehrleisten, dass alle Seitennamen eindeutig sind, werden
// die einzufuegenden geprueft und gegebenenfalls in einer Ersatzliste
// aufgenommen
- // bNameOK == FALSE -> Benutzer hat abgebrochen
+ // bNameOK == sal_False -> Benutzer hat abgebrochen
bNameOK = mpView->GetExchangeList( pExchangeList, pBookmarkList, 0 );
if( bNameOK )
bOK = mpDoc->InsertBookmarkAsPage( pBookmarkList, pExchangeList,
bLink, bReplace, nPos,
- FALSE, NULL, TRUE, TRUE, FALSE );
+ sal_False, NULL, sal_True, sal_True, sal_False );
// delete the BookmarkList
if( pBookmarkList )
@@ -489,15 +489,15 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
if( !pDlg )
return;
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
- USHORT nRet = pDlg->Execute();
- mpDocSh->SetWaitCursor( TRUE );
+ sal_uInt16 nRet = pDlg->Execute();
+ mpDocSh->SetWaitCursor( sal_True );
if( nRet == RET_OK )
{
// gewaehltes Dateiformat: Text oder RTF oder HTML (Default ist Text)
- USHORT nFormat = EE_FORMAT_TEXT;
+ sal_uInt16 nFormat = EE_FORMAT_TEXT;
if( aFilterName.SearchAscii( "Rich") != STRING_NOTFOUND )
nFormat = EE_FORMAT_RTF;
@@ -526,7 +526,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
DBG_ASSERT( pStream, "Kein InStream!" );
pStream->Seek( 0 );
- ULONG nErr = pOutliner->Read( *pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes() );
+ sal_uLong nErr = pOutliner->Read( *pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes() );
if (nErr || !pOutliner->GetEditEngine().GetText().Len())
{
@@ -559,9 +559,9 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
while ( pOutliner->GetParagraphCount() > 1 )
{
Paragraph* pPara = pOutliner->GetParagraph( 0 );
- ULONG nLen = pOutliner->GetText( pPara, 1 ).Len();
- pOutliner->QuickDelete( ESelection( 0, (USHORT) nLen, 1, 0 ) );
- pOutliner->QuickInsertLineBreak( ESelection( 0, (USHORT) nLen, 0, (USHORT) nLen ) );
+ sal_uLong nLen = pOutliner->GetText( pPara, 1 ).Len();
+ pOutliner->QuickDelete( ESelection( 0, (sal_uInt16) nLen, 1, 0 ) );
+ pOutliner->QuickInsertLineBreak( ESelection( 0, (sal_uInt16) nLen, 0, (sal_uInt16) nLen ) );
}
}
}
@@ -622,7 +622,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
{
// gewaehltes Dateiformat: Text oder RTF oder HTML (Default ist Text)
- USHORT nFormat = EE_FORMAT_TEXT;
+ sal_uInt16 nFormat = EE_FORMAT_TEXT;
if( aFilterName.SearchAscii( "Rich") != STRING_NOTFOUND )
nFormat = EE_FORMAT_RTF;
@@ -638,14 +638,14 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
{
pPara = pDocliner->GetParent(pPara);
}
- ULONG nTargetPos = pDocliner->GetAbsPos(pPara) + 1;
+ sal_uLong nTargetPos = pDocliner->GetAbsPos(pPara) + 1;
// Layout der Vorgaengerseite uebernehmen
- USHORT nPage = 0;
+ sal_uInt16 nPage = 0;
pPara = pDocliner->GetParagraph( pDocliner->GetAbsPos( pPara ) - 1 );
while (pPara)
{
- ULONG nPos = pDocliner->GetAbsPos( pPara );
+ sal_uLong nPos = pDocliner->GetAbsPos( pPara );
if ( pDocliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
nPage++;
pPara = pDocliner->GetParagraph( nPos - 1 );
@@ -672,7 +672,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
DBG_ASSERT( pStream, "Kein InStream!" );
pStream->Seek( 0 );
- ULONG nErr = pOutliner->Read(*pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes());
+ sal_uLong nErr = pOutliner->Read(*pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes());
if (nErr || !pOutliner->GetEditEngine().GetText().Len())
{
@@ -682,20 +682,20 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
}
else
{
- ULONG nParaCount = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount = pOutliner->GetParagraphCount();
// fuer Fortschrittsanzeige: Anzahl der Ebene-0-Absaetze
- USHORT nNewPages = 0;
+ sal_uInt16 nNewPages = 0;
pPara = pOutliner->GetParagraph( 0 );
while (pPara)
{
- ULONG nPos = pOutliner->GetAbsPos( pPara );
+ sal_uLong nPos = pOutliner->GetAbsPos( pPara );
if( pOutliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
nNewPages++;
pPara = pOutliner->GetParagraph( ++nPos );
}
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
SfxProgress* pProgress = new SfxProgress( mpDocSh, String( SdResId(STR_CREATE_PAGES)), nNewPages);
if( pProgress )
@@ -706,13 +706,13 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
pDocliner->GetUndoManager().EnterListAction(
String(SdResId(STR_UNDO_INSERT_FILE)), String() );
- ULONG nSourcePos = 0;
+ sal_uLong nSourcePos = 0;
SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
Paragraph* pSourcePara = pOutliner->GetParagraph( 0 );
while (pSourcePara)
{
- ULONG nPos = pOutliner->GetAbsPos( pSourcePara );
- sal_Int16 nDepth = pOutliner->GetDepth( (USHORT) nPos );
+ sal_uLong nPos = pOutliner->GetAbsPos( pSourcePara );
+ sal_Int16 nDepth = pOutliner->GetDepth( (sal_uInt16) nPos );
// den letzte Absatz nur uebernehmen, wenn er gefuellt ist
if (nSourcePos < nParaCount - 1 ||
@@ -744,7 +744,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
if( pProgress )
delete pProgress;
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
}
delete pOutliner;
@@ -752,7 +752,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
// -----------------------------------------------------------------------------
-BOOL FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium)
+sal_Bool FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium)
{
OutlineView* pOlView = static_cast<OutlineView*>(mpView);
@@ -790,10 +790,10 @@ BOOL FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium)
pOutliner->SetEndMovingHdl(aOldEndMovingHdl);
pOutliner->SetStatusEventHdl(aOldStatusEventHdl);
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------------
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index e8191a9ee5d3..ea611035074d 100644..100755
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -79,7 +79,7 @@ FunctionReference FuLine::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::
void FuLine::DoExecute( SfxRequest& rReq )
{
- BOOL bHasMarked = mpView->AreObjectsMarked();
+ sal_Bool bHasMarked = mpView->AreObjectsMarked();
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -101,7 +101,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
}
// Attribute wurden geaendert, Listboxes in Objectbars muessen aktualisiert werden
- static USHORT SidArray[] = {
+ static sal_uInt16 SidArray[] = {
SID_ATTR_LINE_STYLE,
SID_ATTR_LINE_DASH,
SID_ATTR_LINE_WIDTH,
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index a89bd4253ad7..b3086c316e21 100644..100755
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -94,10 +94,10 @@ void FuLineEnd::DoExecute( SfxRequest& )
if( aInfoRec.bCanConvToPath &&
pObj->GetObjInventor() == SdrInventor &&
pObj->GetObjIdentifier() != OBJ_GRUP )
- // bCanConvToPath ist bei Gruppenobjekten TRUE,
+ // bCanConvToPath ist bei Gruppenobjekten sal_True,
// stuerzt aber bei ConvertToPathObj() ab !
{
- pNewObj = pConvPolyObj = pObj->ConvertToPolyObj( TRUE, FALSE );
+ pNewObj = pConvPolyObj = pObj->ConvertToPolyObj( sal_True, sal_False );
if( !pNewObj || !pNewObj->ISA( SdrPathObj ) )
return; // Abbruch, zusaetzliche Sicherheit, die bei
@@ -120,18 +120,18 @@ void FuLineEnd::DoExecute( SfxRequest& )
long nCount = pLineEndList->Count();
long j = 1;
- BOOL bDifferent = FALSE;
+ sal_Bool bDifferent = sal_False;
while( !bDifferent )
{
aName = aNewName;
aName.Append( sal_Unicode(' ') );
aName.Append( UniString::CreateFromInt32( j++ ) );
- bDifferent = TRUE;
+ bDifferent = sal_True;
for( long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pLineEndList->GetLineEnd( i )->GetName() )
- bDifferent = FALSE;
+ bDifferent = sal_False;
}
}
@@ -145,12 +145,12 @@ void FuLineEnd::DoExecute( SfxRequest& )
if( pDlg->Execute() == RET_OK )
{
pDlg->GetName( aName );
- bDifferent = TRUE;
+ bDifferent = sal_True;
for( long i = 0; i < nCount && bDifferent; i++ )
{
if( aName == pLineEndList->GetLineEnd( i )->GetName() )
- bDifferent = FALSE;
+ bDifferent = sal_False;
}
if( bDifferent )
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index e15c9adf3500..256b54c236f2 100644..100755
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -100,8 +100,8 @@ void FuMorph::DoExecute( SfxRequest& )
pCloneObj2->SetOutlinerParaObject(NULL);
// Path-Objekte erzeugen
- SdrObject* pPolyObj1 = pCloneObj1->ConvertToPolyObj(FALSE, FALSE);
- SdrObject* pPolyObj2 = pCloneObj2->ConvertToPolyObj(FALSE, FALSE);
+ SdrObject* pPolyObj1 = pCloneObj1->ConvertToPolyObj(sal_False, sal_False);
+ SdrObject* pPolyObj2 = pCloneObj2->ConvertToPolyObj(sal_False, sal_False);
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
AbstractMorphDlg* pDlg = pFact ? pFact->CreateMorphDlg( static_cast< ::Window*>(mpWindow), pObj1, pObj2 ) : 0;
if(pPolyObj1 && pPolyObj2 && pDlg && (pDlg->Execute() == RET_OK))
@@ -332,7 +332,7 @@ void FuMorph::ImpAddPolys(::basegfx::B2DPolyPolygon& rSmaller, const ::basegfx::
//////////////////////////////////////////////////////////////////////////////
// create group object with morphed polygons
//
-void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
+void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, sal_Bool bAttributeFade,
const SdrObject* pObj1, const SdrObject* pObj2)
{
Color aStartFillCol;
@@ -345,11 +345,11 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
SfxItemPool* pPool = pObj1->GetObjectItemPool();
SfxItemSet aSet1( *pPool,SDRATTR_START,SDRATTR_NOTPERSIST_FIRST-1,EE_ITEMS_START,EE_ITEMS_END,0 );
SfxItemSet aSet2( aSet1 );
- BOOL bLineColor = FALSE;
- BOOL bFillColor = FALSE;
- BOOL bLineWidth = FALSE;
- BOOL bIgnoreLine = FALSE;
- BOOL bIgnoreFill = FALSE;
+ sal_Bool bLineColor = sal_False;
+ sal_Bool bFillColor = sal_False;
+ sal_Bool bLineWidth = sal_False;
+ sal_Bool bIgnoreLine = sal_False;
+ sal_Bool bIgnoreFill = sal_False;
aSet1.Put(pObj1->GetMergedItemSet());
aSet2.Put(pObj2->GetMergedItemSet());
@@ -363,7 +363,7 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
{
if ( ( eLineStyle1 != XLINE_NONE ) && ( eLineStyle2 != XLINE_NONE ) )
{
- bLineWidth = bLineColor = TRUE;
+ bLineWidth = bLineColor = sal_True;
aStartLineCol = static_cast< XLineColorItem const & >(
aSet1.Get(XATTR_LINECOLOR)).GetColorValue();
@@ -374,18 +374,18 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
nEndLineWidth = ITEMVALUE( aSet2, XATTR_LINEWIDTH, XLineWidthItem );
}
else if ( ( eLineStyle1 == XLINE_NONE ) && ( eLineStyle2 == XLINE_NONE ) )
- bIgnoreLine = TRUE;
+ bIgnoreLine = sal_True;
if ( ( eFillStyle1 == XFILL_SOLID ) && ( eFillStyle2 == XFILL_SOLID ) )
{
- bFillColor = TRUE;
+ bFillColor = sal_True;
aStartFillCol = static_cast< XFillColorItem const & >(
aSet1.Get(XATTR_FILLCOLOR)).GetColorValue();
aEndFillCol = static_cast< XFillColorItem const & >(
aSet2.Get(XATTR_FILLCOLOR)).GetColorValue();
}
else if ( ( eFillStyle1 == XFILL_NONE ) && ( eFillStyle2 == XFILL_NONE ) )
- bIgnoreFill = TRUE;
+ bIgnoreFill = sal_True;
}
if ( pPageView )
@@ -393,7 +393,7 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
SfxItemSet aSet( aSet1 );
SdrObjGroup* pObjGroup = new SdrObjGroup;
SdrObjList* pObjList = pObjGroup->GetSubList();
- const ULONG nCount = rPolyPolyList3D.Count();
+ const sal_uLong nCount = rPolyPolyList3D.Count();
const double fStep = 1. / ( nCount + 1 );
const double fDelta = nEndLineWidth - nStartLineWidth;
double fFactor = fStep;
@@ -401,7 +401,7 @@ void FuMorph::ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
aSet.Put( XLineStyleItem( XLINE_SOLID ) );
aSet.Put( XFillStyleItem( XFILL_SOLID ) );
- for ( ULONG i = 0; i < nCount; i++, fFactor += fStep )
+ for ( sal_uLong i = 0; i < nCount; i++, fFactor += fStep )
{
const ::basegfx::B2DPolyPolygon& rPolyPoly3D = *(::basegfx::B2DPolyPolygon*)rPolyPolyList3D.GetObject(i);
SdrPathObj* pNewObj = new SdrPathObj(OBJ_POLY, rPolyPoly3D);
@@ -507,7 +507,7 @@ sal_Bool FuMorph::ImpMorphPolygons(
rPolyPolyList3D.Insert(pNewPolyPoly2D, LIST_APPEND);
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index bba8f71f3274..2c1ccfd8ba6a 100644..100755
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -93,11 +93,11 @@ FunctionReference FuObjectAnimationParameters::Create( ViewShell* pViewSh, ::sd:
void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
{
- SfxUndoManager* pUndoMgr = mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = mpViewShell->GetViewFrame()->GetObjectShell()->GetUndoManager();
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
- ULONG nObject = 0;
+ sal_uLong nCount = rMarkList.GetMarkCount();
+ sal_uLong nObject = 0;
short nAnimationSet = ATTR_MISSING;
short nEffectSet = ATTR_MISSING;
@@ -121,20 +121,20 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
presentation::AnimationEffect eEffect = presentation::AnimationEffect_NONE;
presentation::AnimationEffect eTextEffect = presentation::AnimationEffect_NONE;
presentation::AnimationSpeed eSpeed = presentation::AnimationSpeed_MEDIUM;
- BOOL bActive = FALSE;
- BOOL bFadeOut = FALSE;
+ sal_Bool bActive = sal_False;
+ sal_Bool bFadeOut = sal_False;
Color aFadeColor = COL_LIGHTGRAY;
- BOOL bInvisible = FALSE;
- BOOL bSoundOn = FALSE;
+ sal_Bool bInvisible = sal_False;
+ sal_Bool bSoundOn = sal_False;
String aSound;
- BOOL bPlayFull = FALSE;
+ sal_Bool bPlayFull = sal_False;
presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
String aBookmark;
presentation::AnimationEffect eSecondEffect = presentation::AnimationEffect_NONE;
presentation::AnimationSpeed eSecondSpeed = presentation::AnimationSpeed_MEDIUM;
- BOOL bSecondSoundOn = FALSE;
- BOOL bSecondPlayFull = FALSE;
+ sal_Bool bSecondSoundOn = sal_False;
+ sal_Bool bSecondPlayFull = sal_False;
SdAnimationInfo* pInfo;
@@ -252,7 +252,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
}
else
{
- if (nAnimationSet == ATTR_SET && bActive == TRUE)
+ if (nAnimationSet == ATTR_SET && bActive == sal_True)
nAnimationSet = ATTR_MIXED;
if (nEffectSet == ATTR_SET && eEffect != presentation::AnimationEffect_NONE)
@@ -264,22 +264,22 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
if (nSpeedSet == ATTR_SET)
nSpeedSet = ATTR_MIXED;
- if (nFadeOutSet == ATTR_SET && bFadeOut == TRUE)
+ if (nFadeOutSet == ATTR_SET && bFadeOut == sal_True)
nFadeOutSet = ATTR_MIXED;
if (nFadeColorSet == ATTR_SET)
nFadeColorSet = ATTR_MIXED;
- if (nInvisibleSet == ATTR_SET && bInvisible == TRUE)
+ if (nInvisibleSet == ATTR_SET && bInvisible == sal_True)
nInvisibleSet = ATTR_MIXED;
- if (nSoundOnSet == ATTR_SET && bSoundOn == TRUE)
+ if (nSoundOnSet == ATTR_SET && bSoundOn == sal_True)
nSoundOnSet = ATTR_MIXED;
if (nSoundFileSet == ATTR_SET)
nSoundFileSet = ATTR_MIXED;
- if (nPlayFullSet == ATTR_SET && bPlayFull == TRUE)
+ if (nPlayFullSet == ATTR_SET && bPlayFull == sal_True)
nPlayFullSet = ATTR_MIXED;
if (nClickActionSet == ATTR_SET && eClickAction != presentation::ClickAction_NONE)
@@ -294,10 +294,10 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
if (nSecondSpeedSet == ATTR_SET)
nSecondSpeedSet = ATTR_MIXED;
- if (nSecondSoundOnSet == ATTR_SET && bSecondSoundOn == TRUE)
+ if (nSecondSoundOnSet == ATTR_SET && bSecondSoundOn == sal_True)
nSecondSoundOnSet = ATTR_MIXED;
- if (nSecondPlayFullSet == ATTR_SET && bSecondPlayFull == TRUE)
+ if (nSecondPlayFullSet == ATTR_SET && bSecondPlayFull == sal_True)
nSecondPlayFullSet = ATTR_MIXED;
}
}
@@ -366,24 +366,24 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
else if (nAnimationSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ANIMATION_ACTIVE);
else
- aSet.Put(SfxBoolItem(ATTR_ANIMATION_ACTIVE, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ANIMATION_ACTIVE, sal_False));
if (nEffectSet == ATTR_SET)
- aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_EFFECT, (USHORT)eEffect));
+ aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_EFFECT, (sal_uInt16)eEffect));
else if (nEffectSet == ATTR_MIXED)
aSet.InvalidateItem( ATTR_ANIMATION_EFFECT );
else
aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_EFFECT, presentation::AnimationEffect_NONE));
if (nTextEffectSet == ATTR_SET)
- aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_TEXTEFFECT, (USHORT)eTextEffect));
+ aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_TEXTEFFECT, (sal_uInt16)eTextEffect));
else if (nTextEffectSet == ATTR_MIXED)
aSet.InvalidateItem( ATTR_ANIMATION_TEXTEFFECT );
else
aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_TEXTEFFECT, presentation::AnimationEffect_NONE));
if (nSpeedSet == ATTR_SET)
- aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_SPEED, (USHORT)eSpeed));
+ aSet.Put(SfxAllEnumItem(ATTR_ANIMATION_SPEED, (sal_uInt16)eSpeed));
else
aSet.InvalidateItem(ATTR_ANIMATION_SPEED);
@@ -392,7 +392,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
else if (nFadeOutSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ANIMATION_FADEOUT);
else
- aSet.Put(SfxBoolItem(ATTR_ANIMATION_FADEOUT, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ANIMATION_FADEOUT, sal_False));
if (nFadeColorSet == ATTR_SET)
aSet.Put(SvxColorItem(aFadeColor, ATTR_ANIMATION_COLOR));
@@ -406,14 +406,14 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
else if (nInvisibleSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ANIMATION_INVISIBLE);
else
- aSet.Put(SfxBoolItem(ATTR_ANIMATION_INVISIBLE, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ANIMATION_INVISIBLE, sal_False));
if (nSoundOnSet == ATTR_SET)
aSet.Put(SfxBoolItem(ATTR_ANIMATION_SOUNDON, bSoundOn));
else if (nSoundOnSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ANIMATION_SOUNDON);
else
- aSet.Put(SfxBoolItem(ATTR_ANIMATION_SOUNDON, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ANIMATION_SOUNDON, sal_False));
if (nSoundFileSet == ATTR_SET)
aSet.Put(SfxStringItem(ATTR_ANIMATION_SOUNDFILE, aSound));
@@ -425,10 +425,10 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
else if (nPlayFullSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ANIMATION_PLAYFULL);
else
- aSet.Put(SfxBoolItem(ATTR_ANIMATION_PLAYFULL, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ANIMATION_PLAYFULL, sal_False));
if (nClickActionSet == ATTR_SET)
- aSet.Put(SfxAllEnumItem(ATTR_ACTION, (USHORT)eClickAction));
+ aSet.Put(SfxAllEnumItem(ATTR_ACTION, (sal_uInt16)eClickAction));
else if (nClickActionSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ACTION);
else
@@ -440,14 +440,14 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
aSet.InvalidateItem(ATTR_ACTION_FILENAME);
if (nSecondEffectSet == ATTR_SET)
- aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECT, (USHORT)eSecondEffect));
+ aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECT, (sal_uInt16)eSecondEffect));
else if (nSecondEffectSet == ATTR_MIXED)
aSet.InvalidateItem( ATTR_ACTION_EFFECT );
else
aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECT, presentation::AnimationEffect_NONE));
if (nSecondSpeedSet == ATTR_SET)
- aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECTSPEED, (USHORT)eSecondSpeed));
+ aSet.Put(SfxAllEnumItem(ATTR_ACTION_EFFECTSPEED, (sal_uInt16)eSecondSpeed));
else
aSet.InvalidateItem(ATTR_ACTION_EFFECTSPEED);
@@ -456,19 +456,19 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
else if (nSecondSoundOnSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ACTION_SOUNDON);
else
- aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ACTION_SOUNDON, sal_False));
if (nSecondPlayFullSet == ATTR_SET)
aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, bSecondPlayFull));
else if (nPlayFullSet == ATTR_MIXED)
aSet.InvalidateItem(ATTR_ACTION_PLAYFULL);
else
- aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, FALSE));
+ aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, sal_False));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
SfxAbstractDialog* pDlg = pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0;
- USHORT nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
+ sal_uInt16 nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
if( nResult == RET_OK )
{
@@ -701,11 +701,11 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
pInfo = mpDoc->GetAnimationInfo(pObject);
- BOOL bCreated = FALSE;
+ sal_Bool bCreated = sal_False;
if( !pInfo )
{
pInfo = SdDrawDocument::GetShapeUserData(*pObject,true);
- bCreated = TRUE;
+ bCreated = sal_True;
}
// das Pfadobjekt fuer 'an Kurve entlang'?
@@ -752,7 +752,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
pAction->SetPathObj(pInfo->mpPathObj, pPath);
pAction->SetClickAction(pInfo->meClickAction, eClickAction);
pAction->SetBookmark(pInfo->GetBookmark(), aBookmark);
- pAction->SetVerb(pInfo->mnVerb, (USHORT)pInfo->GetBookmark().ToInt32() );
+ pAction->SetVerb(pInfo->mnVerb, (sal_uInt16)pInfo->GetBookmark().ToInt32() );
pAction->SetSecondEffect(pInfo->meSecondEffect, eSecondEffect);
pAction->SetSecondSpeed(pInfo->meSecondSpeed, eSecondSpeed);
pAction->SetSecondSoundOn(pInfo->mbSecondSoundOn, bSecondSoundOn);
@@ -809,7 +809,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
pInfo->mbSecondPlayFull = bSecondPlayFull;
if (eClickAction == presentation::ClickAction_VERB)
- pInfo->mnVerb = (USHORT)aBookmark.ToInt32();
+ pInfo->mnVerb = (sal_uInt16)aBookmark.ToInt32();
}
}
// Set the Undo Group in of the Undo Manager
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index c6388e788620..8f379123dde2 100644..100755
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -83,14 +83,14 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
SfxItemSet aNewAttr( mpViewShell->GetPool(),
EE_ITEMS_START, EE_ITEMS_END );
- aNewAttr.Put( aEditAttr, FALSE );
+ aNewAttr.Put( aEditAttr, sal_False );
// Dialog hochfahren und ausfuehren
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdOutlineBulletTabDlg( NULL, &aNewAttr, mpView ) : 0;
if( pDlg )
{
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
switch( nResult )
{
diff --git a/sd/source/ui/func/fuoltext.cxx b/sd/source/ui/func/fuoltext.cxx
index f3c146184c20..ee9b4ce97c75 100644..100755
--- a/sd/source/ui/func/fuoltext.cxx
+++ b/sd/source/ui/func/fuoltext.cxx
@@ -52,7 +52,7 @@
namespace sd {
-static USHORT SidArray[] = {
+static sal_uInt16 SidArray[] = {
SID_STYLE_FAMILY2,
SID_STYLE_FAMILY3,
SID_STYLE_FAMILY5,
@@ -117,9 +117,9 @@ FunctionReference FuOutlineText::Create( ViewShell* pViewSh, ::sd::Window* pWin,
|*
\************************************************************************/
-BOOL FuOutlineText::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuOutlineText::MouseButtonDown(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
mpWindow->GrabFocus();
@@ -144,9 +144,9 @@ BOOL FuOutlineText::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuOutlineText::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuOutlineText::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
bReturn = pOutlineView->GetViewByWindow(mpWindow)->MouseMove(rMEvt);
@@ -180,9 +180,9 @@ BOOL FuOutlineText::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuOutlineText::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuOutlineText::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
bReturn = pOutlineView->GetViewByWindow(mpWindow)->MouseButtonUp(rMEvt);
@@ -200,11 +200,11 @@ BOOL FuOutlineText::MouseButtonUp(const MouseEvent& rMEvt)
if( pField && pField->ISA( SvxURLField ) )
{
- bReturn = TRUE;
+ bReturn = sal_True;
mpWindow->ReleaseMouse();
SfxStringItem aStrItem( SID_FILE_NAME, ( (SvxURLField*) pField)->GetURL() );
SfxStringItem aReferer( SID_REFERER, mpDocSh->GetMedium()->GetName() );
- SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowseItem( SID_BROWSE, sal_True );
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
if ( rMEvt.IsMod1() )
@@ -234,16 +234,16 @@ BOOL FuOutlineText::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuOutlineText::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuOutlineText::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
- USHORT nKeyGroup = rKEvt.GetKeyCode().GetGroup();
+ sal_uInt16 nKeyGroup = rKEvt.GetKeyCode().GetGroup();
if( !mpDocSh->IsReadOnly() || nKeyGroup == KEYGROUP_CURSOR )
{
mpWindow->GrabFocus();
diff --git a/sd/source/ui/func/fuoutl.cxx b/sd/source/ui/func/fuoutl.cxx
index d1d65291c4c6..b5b831cf21e0 100644
--- a/sd/source/ui/func/fuoutl.cxx
+++ b/sd/source/ui/func/fuoutl.cxx
@@ -65,9 +65,9 @@ FuOutline::FuOutline (
|*
\************************************************************************/
-BOOL FuOutline::Command(const CommandEvent& rCEvt)
+sal_Bool FuOutline::Command(const CommandEvent& rCEvt)
{
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
OutlinerView* pOlView =
static_cast<OutlineView*>(mpView)->GetViewByWindow(mpWindow);
@@ -76,7 +76,7 @@ BOOL FuOutline::Command(const CommandEvent& rCEvt)
if (pOlView)
{
pOlView->Command(rCEvt); // liefert leider keinen Returnwert
- bResult = TRUE;
+ bResult = sal_True;
}
return bResult;
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 9196c2803249..242b34ba8b9d 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -96,8 +96,8 @@ TYPEINIT1( FuPage, FuPoor );
void mergeItemSetsImpl( SfxItemSet& rTarget, const SfxItemSet& rSource )
{
- const USHORT* pPtr = rSource.GetRanges();
- USHORT p1, p2;
+ const sal_uInt16* pPtr = rSource.GetRanges();
+ sal_uInt16 p1, p2;
while( *pPtr )
{
p1 = pPtr[0];
@@ -213,7 +213,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
SvxPageItem aPageItem( SID_ATTR_PAGE );
aPageItem.SetDescName( mpPage->GetName() );
aPageItem.SetPageUsage( (SvxPageUsage) SVX_PAGE_ALL );
- aPageItem.SetLandscape( mpPage->GetOrientation() == ORIENTATION_LANDSCAPE ? TRUE: FALSE );
+ aPageItem.SetLandscape( mpPage->GetOrientation() == ORIENTATION_LANDSCAPE ? sal_True: sal_False );
aPageItem.SetNumType( mpDoc->GetPageNumType() );
aNewAttr.Put( aPageItem );
@@ -227,20 +227,20 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
aNewAttr.Put( aMaxSizeItem );
// paperbin
- SvxPaperBinItem aPaperBinItem( SID_ATTR_PAGE_PAPERBIN, (const BYTE)mpPage->GetPaperBin() );
+ SvxPaperBinItem aPaperBinItem( SID_ATTR_PAGE_PAPERBIN, (const sal_uInt8)mpPage->GetPaperBin() );
aNewAttr.Put( aPaperBinItem );
- SvxLRSpaceItem aLRSpaceItem( (USHORT)mpPage->GetLftBorder(), (USHORT)mpPage->GetRgtBorder(), 0, 0, mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE));
+ SvxLRSpaceItem aLRSpaceItem( (sal_uInt16)mpPage->GetLftBorder(), (sal_uInt16)mpPage->GetRgtBorder(), 0, 0, mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE));
aNewAttr.Put( aLRSpaceItem );
- SvxULSpaceItem aULSpaceItem( (USHORT)mpPage->GetUppBorder(), (USHORT)mpPage->GetLwrBorder(), mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE));
+ SvxULSpaceItem aULSpaceItem( (sal_uInt16)mpPage->GetUppBorder(), (sal_uInt16)mpPage->GetLwrBorder(), mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE));
aNewAttr.Put( aULSpaceItem );
// Applikation
bool bScale = mpDoc->GetDocumentType() != DOCUMENT_TYPE_DRAW;
- aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT1, bScale ? TRUE : FALSE ) );
+ aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT1, bScale ? sal_True : sal_False ) );
- BOOL bFullSize = mpPage->IsMasterPage() ?
+ sal_Bool bFullSize = mpPage->IsMasterPage() ?
mpPage->IsBackgroundFullSize() : ((SdPage&)mpPage->TRG_GetMasterPage()).IsBackgroundFullSize();
aNewAttr.Put( SfxBoolItem( SID_ATTR_PAGE_EXT2, bFullSize ) );
@@ -248,8 +248,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
///////////////////////////////////////////////////////////////////////
// Merge ItemSet for dialog
- const USHORT* pPtr = aNewAttr.GetRanges();
- USHORT p1 = pPtr[0], p2 = pPtr[1];
+ const sal_uInt16* pPtr = aNewAttr.GetRanges();
+ sal_uInt16 p1 = pPtr[0], p2 = pPtr[1];
while(pPtr[2] && (pPtr[2] - p2 == 1))
{
p2 = pPtr[3];
@@ -313,9 +313,14 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0) );
pTempSet->Put( XFillStyleItem( XFILL_BITMAP ) );
- pTempSet->Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")), XOBitmap(aGraphic) ) );
- pTempSet->Put( XFillBmpStretchItem( TRUE ));
- pTempSet->Put( XFillBmpTileItem( FALSE ));
+
+ // MigrateItemSet makes sure the XFillBitmapItem will have a unique name
+ SfxItemSet aMigrateSet( mpDoc->GetPool(), XATTR_FILLBITMAP, XATTR_FILLBITMAP );
+ aMigrateSet.Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")), XOBitmap(aGraphic) ) );
+ mpDoc->MigrateItemSet( &aMigrateSet, pTempSet.get(), NULL );
+
+ pTempSet->Put( XFillBmpStretchItem( sal_True ));
+ pTempSet->Put( XFillBmpTileItem( sal_False ));
}
}
}
@@ -336,8 +341,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
{
// if some fillstyle-items are not set in the dialog, then
// try to use the items before
- BOOL bChanges = FALSE;
- for( USHORT i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ )
+ sal_Bool bChanges = sal_False;
+ for( sal_uInt16 i=XATTR_FILL_FIRST; i<XATTR_FILL_LAST; i++ )
{
if( aMergedAttr.GetItemState( i ) != SFX_ITEM_DEFAULT )
{
@@ -345,7 +350,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
pTempSet->Put( aMergedAttr.Get( i ) );
else
if( aMergedAttr.GetItem( i ) != pTempSet->GetItem( i ) )
- bChanges = TRUE;
+ bChanges = sal_True;
}
}
@@ -353,7 +358,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
if( ( ( (XFillStyleItem*) pTempSet->GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) ||
( ( pTempSet->GetItemState( XATTR_FILLSTYLE ) == SFX_ITEM_DEFAULT ) &&
( ( (XFillStyleItem*) aMergedAttr.GetItem( XATTR_FILLSTYLE ) )->GetValue() == XFILL_NONE ) ) )
- mbPageBckgrdDeleted = TRUE;
+ mbPageBckgrdDeleted = sal_True;
bool bSetToAllPages = false;
@@ -404,14 +409,14 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
else if( bSetToAllPages )
{
String aComment(SdResId(STR_UNDO_CHANGE_PAGEFORMAT));
- SfxUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = mpDocSh->GetUndoManager();
pUndoMgr->EnterListAction(aComment, aComment);
SdUndoGroup* pUndoGroup = new SdUndoGroup(mpDoc);
pUndoGroup->SetComment(aComment);
//Set background on all master pages
- USHORT nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind);
- for (USHORT i = 0; i < nMasterPageCount; ++i)
+ sal_uInt16 nMasterPageCount = mpDoc->GetMasterSdPageCount(ePageKind);
+ for (sal_uInt16 i = 0; i < nMasterPageCount; ++i)
{
SdPage *pMasterPage = mpDoc->GetMasterSdPage(i, ePageKind);
SdStyleSheet *pStyle =
@@ -424,8 +429,8 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
}
//Remove background from all pages to reset to the master bg
- USHORT nPageCount(mpDoc->GetSdPageCount(ePageKind));
- for(USHORT i=0; i<nPageCount; ++i)
+ sal_uInt16 nPageCount(mpDoc->GetSdPageCount(ePageKind));
+ for(sal_uInt16 i=0; i<nPageCount; ++i)
{
SdPage *pPage = mpDoc->GetSdPage(i, ePageKind);
@@ -447,7 +452,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
// if background filling is set to master pages then clear from page set
if( mbMasterPage || bSetToAllPages )
{
- for( USHORT nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++ )
+ for( sal_uInt16 nWhich = XATTR_FILL_FIRST; nWhich <= XATTR_FILL_LAST; nWhich++ )
{
pTempSet->ClearItem( nWhich );
}
@@ -461,7 +466,7 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
mpDoc->SetDefaultWritingMode( nVal == FRMDIR_HORI_RIGHT_TOP ? ::com::sun::star::text::WritingMode_RL_TB : ::com::sun::star::text::WritingMode_LR_TB );
}
- mpDoc->SetChanged(TRUE);
+ mpDoc->SetChanged(sal_True);
// BackgroundFill of Masterpage: no hard attributes allowed
SdrPage& rUsedMasterPage = mpPage->IsMasterPage() ? *mpPage : mpPage->TRG_GetMasterPage();
@@ -491,16 +496,16 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
// Set new page-attributes
PageKind ePageKind = mpDrawViewShell->GetPageKind();
const SfxPoolItem* pPoolItem;
- BOOL bSetPageSizeAndBorder = FALSE;
+ sal_Bool bSetPageSizeAndBorder = sal_False;
Size aNewSize(maSize);
- INT32 nLeft = -1, nRight = -1, nUpper = -1, nLower = -1;
- BOOL bScaleAll = TRUE;
+ sal_Int32 nLeft = -1, nRight = -1, nUpper = -1, nLower = -1;
+ sal_Bool bScaleAll = sal_True;
Orientation eOrientation = mpPage->GetOrientation();
SdPage* pMasterPage = mpPage->IsMasterPage() ? mpPage : &(SdPage&)(mpPage->TRG_GetMasterPage());
- BOOL bFullSize = pMasterPage->IsBackgroundFullSize();
- USHORT nPaperBin = mpPage->GetPaperBin();
+ sal_Bool bFullSize = pMasterPage->IsBackgroundFullSize();
+ sal_uInt16 nPaperBin = mpPage->GetPaperBin();
- if( pArgs->GetItemState(SID_ATTR_PAGE, TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(SID_ATTR_PAGE, sal_True, &pPoolItem) == SFX_ITEM_SET )
{
mpDoc->SetPageNumType(((const SvxPageItem*) pPoolItem)->GetNumType());
@@ -508,71 +513,71 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT;
if( mpPage->GetOrientation() != eOrientation )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
mpDrawViewShell->ResetActualPage();
}
- if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(SID_ATTR_PAGE_SIZE, sal_True, &pPoolItem) == SFX_ITEM_SET )
{
aNewSize = ((const SvxSizeItem*) pPoolItem)->GetSize();
if( mpPage->GetSize() != aNewSize )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_LRSPACE),
- TRUE, &pPoolItem) == SFX_ITEM_SET )
+ sal_True, &pPoolItem) == SFX_ITEM_SET )
{
nLeft = ((const SvxLRSpaceItem*) pPoolItem)->GetLeft();
nRight = ((const SvxLRSpaceItem*) pPoolItem)->GetRight();
if( mpPage->GetLftBorder() != nLeft || mpPage->GetRgtBorder() != nRight )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_ULSPACE),
- TRUE, &pPoolItem) == SFX_ITEM_SET )
+ sal_True, &pPoolItem) == SFX_ITEM_SET )
{
nUpper = ((const SvxULSpaceItem*) pPoolItem)->GetUpper();
nLower = ((const SvxULSpaceItem*) pPoolItem)->GetLower();
if( mpPage->GetUppBorder() != nUpper || mpPage->GetLwrBorder() != nLower )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
- if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT1), sal_True, &pPoolItem) == SFX_ITEM_SET )
{
bScaleAll = ((const SfxBoolItem*) pPoolItem)->GetValue();
}
- if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_EXT2), sal_True, &pPoolItem) == SFX_ITEM_SET )
{
bFullSize = ((const SfxBoolItem*) pPoolItem)->GetValue();
if(pMasterPage->IsBackgroundFullSize() != bFullSize )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
// Papierschacht (PaperBin)
- if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), TRUE, &pPoolItem) == SFX_ITEM_SET )
+ if( pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_ATTR_PAGE_PAPERBIN), sal_True, &pPoolItem) == SFX_ITEM_SET )
{
nPaperBin = ((const SvxPaperBinItem*) pPoolItem)->GetValue();
if( mpPage->GetPaperBin() != nPaperBin )
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
}
if (nLeft == -1 && nUpper != -1)
{
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
nLeft = mpPage->GetLftBorder();
nRight = mpPage->GetRgtBorder();
}
else if (nLeft != -1 && nUpper == -1)
{
- bSetPageSizeAndBorder = TRUE;
+ bSetPageSizeAndBorder = sal_True;
nUpper = mpPage->GetUppBorder();
nLower = mpPage->GetLwrBorder();
}
@@ -582,8 +587,8 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
////////////////////////////////////////////////////////////////////////////////
//
- // if bMasterPage==FALSE then create a background-object for this page with the
- // properties set in the dialog before, but if mbPageBckgrdDeleted==TRUE then
+ // if bMasterPage==sal_False then create a background-object for this page with the
+ // properties set in the dialog before, but if mbPageBckgrdDeleted==sal_True then
// the background of this page was set to invisible, so it would be a mistake
// to create a new background-object for this page !
//
@@ -605,7 +610,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
if( mpBackgroundObjUndoAction )
{
// set merge flag, because a SdUndoGroupAction could have been inserted before
- mpDocSh->GetUndoManager()->AddUndoAction( mpBackgroundObjUndoAction, TRUE );
+ mpDocSh->GetUndoManager()->AddUndoAction( mpBackgroundObjUndoAction, sal_True );
mpBackgroundObjUndoAction = 0;
}
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index e18240c6ca2e..2ebb4064a79c 100644..100755
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -113,7 +113,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdParagraphTabDlg(NULL, &aNewAttr ) : 0;
if( pDlg )
{
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
switch( nResult )
{
@@ -155,7 +155,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
}
// invalidieren der Slots
- static USHORT SidArray[] = {
+ static sal_uInt16 SidArray[] = {
SID_ATTR_TABSTOP,
SID_ATTR_PARA_ADJUST_LEFT,
SID_ATTR_PARA_ADJUST_RIGHT,
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index ff53735f32e9..ff938d1c3820 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -95,11 +95,11 @@ FuPoor::FuPoor (
nSlotId( rReq.GetSlot() ),
nSlotValue(0),
pDialog(NULL),
- bIsInDragMode(FALSE),
- bNoScrollUntilInside (TRUE),
- bScrollable (FALSE),
- bDelayActive (FALSE),
- bFirstMouseMove (FALSE),
+ bIsInDragMode(sal_False),
+ bNoScrollUntilInside (sal_True),
+ bScrollable (sal_False),
+ bDelayActive (sal_False),
+ bFirstMouseMove (sal_False),
// remember MouseButton state
mnCode(0)
{
@@ -157,7 +157,7 @@ void FuPoor::Deactivate()
aScrollTimer.Stop();
aDelayToScrollTimer.Stop ();
bScrollable =
- bDelayActive = FALSE;
+ bDelayActive = sal_False;
if (pDialog)
{
@@ -195,7 +195,7 @@ void FuPoor::ForceScroll(const Point& aPixPos)
if ( bNoScrollUntilInside )
{
if ( rRect.IsInside(aPos) )
- bNoScrollUntilInside = FALSE;
+ bNoScrollUntilInside = sal_False;
}
else
{
@@ -244,16 +244,16 @@ IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuPoor::KeyInput(const KeyEvent& rKEvt)
{
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
- BOOL bReturn = FALSE;
- BOOL bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() );
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
+ sal_Bool bReturn = sal_False;
+ sal_Bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() );
switch (nCode)
{
@@ -306,7 +306,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
}
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
@@ -334,7 +334,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
}
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -362,7 +362,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
}
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -382,9 +382,9 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
if (mpViewShell->ISA(DrawViewShell))
static_cast<DrawViewShell*>(mpViewShell)
- ->SetZoomOnPage(FALSE);
+ ->SetZoomOnPage(sal_False);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -398,9 +398,9 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
if (mpViewShell->ISA(DrawViewShell))
static_cast<DrawViewShell*>(mpViewShell)
- ->SetZoomOnPage(FALSE);
+ ->SetZoomOnPage(sal_False);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -412,7 +412,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
// Zoom auf Seite
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_SIZE_PAGE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -424,7 +424,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
// Zoom auf selektierte Objekte
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_SIZE_OPTIMAL, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -437,7 +437,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
{
// Naechstes ZoomRect einstellen
mpViewShell->SetZoomRect(pZoomList->GetNextZoomRect());
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -450,7 +450,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
{
// Vorheriges ZoomRect einstellen
mpViewShell->SetZoomRect(pZoomList->GetPreviousZoomRect());
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -463,7 +463,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
{
// Sprung zu erster Seite
static_cast<DrawViewShell*>(mpViewShell)->SwitchPage(0);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -480,7 +480,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
static_cast<DrawViewShell*>(mpViewShell)
->SwitchPage(mpDoc->GetSdPageCount(
pPage->GetPageKind()) - 1);
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -501,9 +501,9 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
mpView->SdrEndTextEdit();
// Previous page.
- bReturn = TRUE;
+ bReturn = sal_True;
SdPage* pPage = static_cast<DrawViewShell*>(mpViewShell)->GetActualPage();
- USHORT nSdPage = (pPage->GetPageNum() - 1) / 2;
+ sal_uInt16 nSdPage = (pPage->GetPageNum() - 1) / 2;
if (nSdPage > 0)
{
@@ -547,9 +547,9 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
mpView->SdrEndTextEdit();
// Next page.
- bReturn = TRUE;
+ bReturn = sal_True;
SdPage* pPage = static_cast<DrawViewShell*>(mpViewShell)->GetActualPage();
- USHORT nSdPage = (pPage->GetPageNum() - 1) / 2;
+ sal_uInt16 nSdPage = (pPage->GetPageNum() - 1) / 2;
if (nSdPage < mpDoc->GetSdPageCount(pPage->GetPageKind()) - 1)
{
@@ -634,7 +634,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -809,13 +809,13 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
if(mpView->IsDragObj())
{
bool bWasNoSnap = rDragStat.IsNoSnap();
- BOOL bWasSnapEnabled = mpView->IsSnapEnabled();
+ sal_Bool bWasSnapEnabled = mpView->IsSnapEnabled();
// switch snapping off
if(!bWasNoSnap)
- ((SdrDragStat&)rDragStat).SetNoSnap(TRUE);
+ ((SdrDragStat&)rDragStat).SetNoSnap(sal_True);
if(bWasSnapEnabled)
- mpView->SetSnapEnabled(FALSE);
+ mpView->SetSnapEnabled(sal_False);
mpView->MovAction(aEndPoint);
mpView->EndDragObj();
@@ -847,7 +847,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
ScrollEnd();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
break;
@@ -888,7 +888,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
0L);
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -939,7 +939,7 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
0L);
// consumed
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -949,9 +949,9 @@ BOOL FuPoor::KeyInput(const KeyEvent& rKEvt)
return(bReturn);
}
-BOOL FuPoor::MouseMove(const MouseEvent& )
+sal_Bool FuPoor::MouseMove(const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
void FuPoor::SelectionHasChanged()
@@ -1012,14 +1012,14 @@ IMPL_LINK( FuPoor, DragHdl, Timer *, EMPTYARG )
{
if( mpView )
{
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
SdrHdl* pHdl = mpView->PickHandle(aMDPos);
if ( pHdl==NULL && mpView->IsMarkedHit(aMDPos, nHitLog)
- && !mpView->IsPresObjSelected(FALSE, TRUE) )
+ && !mpView->IsPresObjSelected(sal_False, sal_True) )
{
mpWindow->ReleaseMouse();
- bIsInDragMode = TRUE;
+ bIsInDragMode = sal_True;
mpView->StartDrag( aMDPos, mpWindow );
}
}
@@ -1032,7 +1032,7 @@ IMPL_LINK( FuPoor, DragHdl, Timer *, EMPTYARG )
|*
\************************************************************************/
-BOOL FuPoor::Command(const CommandEvent& rCEvt)
+sal_Bool FuPoor::Command(const CommandEvent& rCEvt)
{
return( mpView->Command(rCEvt,mpWindow) );
}
@@ -1046,7 +1046,7 @@ BOOL FuPoor::Command(const CommandEvent& rCEvt)
IMPL_LINK_INLINE_START( FuPoor, DelayHdl, Timer *, EMPTYARG )
{
aDelayToScrollTimer.Stop ();
- bScrollable = TRUE;
+ bScrollable = sal_True;
Point aPnt(mpWindow->GetPointerPosPixel());
@@ -1064,22 +1064,22 @@ IMPL_LINK_INLINE_END( FuPoor, DelayHdl, Timer *, pTimer )
|*
\************************************************************************/
-BOOL FuPoor::MouseButtonUp (const MouseEvent& rMEvt)
+sal_Bool FuPoor::MouseButtonUp (const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
aDelayToScrollTimer.Stop ();
return bScrollable =
- bDelayActive = FALSE;
+ bDelayActive = sal_False;
}
-BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1090,7 +1090,7 @@ BOOL FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
void FuPoor::StartDelayToScrollTimer ()
{
- bDelayActive = TRUE;
+ bDelayActive = sal_True;
aDelayToScrollTimer.Start ();
}
@@ -1100,9 +1100,9 @@ void FuPoor::StartDelayToScrollTimer ()
|*
\************************************************************************/
-BOOL FuPoor::RequestHelp(const HelpEvent& rHEvt)
+sal_Bool FuPoor::RequestHelp(const HelpEvent& rHEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
SdrPageView* pPV = mpView->GetSdrPageView();
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index 7f6011005939..35cf5d46e253 100644..100755
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -75,8 +75,8 @@ SO2_DECL_REF(SvStorage)
TYPEINIT1( FuPresentationLayout, FuPoor );
-#define POOL_BUFFER_SIZE (USHORT)32768
-#define DOCUMENT_BUFFER_SIZE (USHORT)32768
+#define POOL_BUFFER_SIZE (sal_uInt16)32768
+#define DOCUMENT_BUFFER_SIZE (sal_uInt16)32768
#define DOCUMENT_TOKEN (sal_Unicode('#'))
/*************************************************************************
@@ -113,11 +113,11 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
mpView->UnmarkAll();
}
- BOOL bError = FALSE;
+ sal_Bool bError = sal_False;
// die aktive Seite ermitteln
- USHORT nSelectedPage = SDRPAGE_NOTFOUND;
- for (USHORT nPage = 0; nPage < mpDoc->GetSdPageCount(PK_STANDARD); nPage++)
+ sal_uInt16 nSelectedPage = SDRPAGE_NOTFOUND;
+ for (sal_uInt16 nPage = 0; nPage < mpDoc->GetSdPageCount(PK_STANDARD); nPage++)
{
if (mpDoc->GetSdPage(nPage, PK_STANDARD)->IsSelected())
{
@@ -134,19 +134,19 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
// wenn wir auf einer Masterpage sind, gelten die Aenderungen fuer alle
// Seiten und Notizseiten, die das betreffende Layout benutzen
- BOOL bOnMaster = FALSE;
+ sal_Bool bOnMaster = sal_False;
if( mpViewShell && mpViewShell->ISA(DrawViewShell))
{
EditMode eEditMode =
static_cast<DrawViewShell*>(mpViewShell)->GetEditMode();
if (eEditMode == EM_MASTERPAGE)
- bOnMaster = TRUE;
+ bOnMaster = sal_True;
}
- BOOL bMasterPage = bOnMaster;
- BOOL bCheckMasters = FALSE;
+ sal_Bool bMasterPage = bOnMaster;
+ sal_Bool bCheckMasters = sal_False;
// Dialog aufrufen
- BOOL bLoad = FALSE; // tauchen neue Masterpages auf?
+ sal_Bool bLoad = sal_False; // tauchen neue Masterpages auf?
String aFile;
SfxItemSet aSet(mpDoc->GetPool(), ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END);
@@ -176,7 +176,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
AbstractSdPresLayoutDlg* pDlg = pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, mpViewShell, NULL, aSet ) : 0;
- USHORT nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
+ sal_uInt16 nResult = pDlg ? pDlg->Execute() : RET_CANCEL;
switch (nResult)
{
@@ -195,14 +195,14 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
break;
default:
- bError = TRUE;
+ bError = sal_True;
}
delete pDlg;
}
if (!bError)
{
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
// Hier werden nur Masterpages ausgewechselt, d.h. die aktuelle Seite
// bleibt aktuell. Damit beim Ein- und Ausfuegen der Masterpages nicht
@@ -212,7 +212,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
// removing a masterpage, it's possible that you are removing the
// current masterpage. So you have to call ResetActualPage !
if( mpViewShell->ISA(DrawViewShell) && !bCheckMasters )
- static_cast<DrawView*>(mpView)->BlockPageOrderChangedHint(TRUE);
+ static_cast<DrawView*>(mpView)->BlockPageOrderChangedHint(sal_True);
if (bLoad)
{
@@ -237,7 +237,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
// Blockade wieder aufheben
if (mpViewShell->ISA(DrawViewShell) && !bCheckMasters )
- static_cast<DrawView*>(mpView)->BlockPageOrderChangedHint(FALSE);
+ static_cast<DrawView*>(mpView)->BlockPageOrderChangedHint(sal_False);
/*************************************************************************
|* Falls dargestellte Masterpage sichtbar war, neu darstellen
@@ -250,7 +250,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
{
::sd::View* pView =
static_cast<DrawViewShell*>(mpViewShell)->GetView();
- USHORT nPgNum = pSelectedPage->TRG_GetMasterPage().GetPageNum();
+ sal_uInt16 nPgNum = pSelectedPage->TRG_GetMasterPage().GetPageNum();
if (static_cast<DrawViewShell*>(mpViewShell)->GetPageKind() == PK_NOTES)
nPgNum++;
@@ -274,12 +274,12 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
DrawViewShell* pDrawViewSh =
static_cast<DrawViewShell*>(mpViewShell);
EditMode eMode = pDrawViewSh->GetEditMode();
- BOOL bLayer = pDrawViewSh->IsLayerModeActive();
+ sal_Bool bLayer = pDrawViewSh->IsLayerModeActive();
pDrawViewSh->ChangeEditMode( eMode, !bLayer );
pDrawViewSh->ChangeEditMode( eMode, bLayer );
}
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
}
}
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 1e67a409fb40..fdbd0cb35b09 100644..100755
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -94,32 +94,32 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
String aLayoutName = (((SfxStringItem&)aSet.Get(SID_STATUS_LAYOUT)).GetValue());
DBG_ASSERT(aLayoutName.Len(), "Layout unbestimmt");
- BOOL bUnique = FALSE;
+ sal_Bool bUnique = sal_False;
sal_Int16 nDepth, nTmp;
OutlineView* pOlView = static_cast<OutlineView*>(pOutlineViewShell->GetView());
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( (Window*) mpWindow );
::Outliner* pOutl = pOutlinerView->GetOutliner();
List* pList = pOutlinerView->CreateSelectionList();
Paragraph* pPara = (Paragraph*)pList->First();
- nDepth = pOutl->GetDepth((USHORT)pOutl->GetAbsPos( pPara ) );
+ nDepth = pOutl->GetDepth((sal_uInt16)pOutl->GetAbsPos( pPara ) );
bool bPage = pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE );
while( pPara )
{
- nTmp = pOutl->GetDepth((USHORT) pOutl->GetAbsPos( pPara ) );
+ nTmp = pOutl->GetDepth((sal_uInt16) pOutl->GetAbsPos( pPara ) );
if( nDepth != nTmp )
{
- bUnique = FALSE;
+ bUnique = sal_False;
break;
}
if( pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE ) != bPage )
{
- bUnique = FALSE;
+ bUnique = sal_False;
break;
}
- bUnique = TRUE;
+ bUnique = sal_True;
pPara = (Paragraph*) pList->Next();
}
@@ -128,7 +128,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
{
String aStyleName = aLayoutName;
aStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ) );
- USHORT nDlgId = TAB_PRES_LAYOUT_TEMPLATE;
+ sal_uInt16 nDlgId = TAB_PRES_LAYOUT_TEMPLATE;
PresentationObjects ePO;
if( bPage )
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index ab6ac2434d0a..1475659b57b9 100644..100755
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -83,7 +83,7 @@ FunctionReference FuScale::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd:
void FuScale::DoExecute( SfxRequest& rReq )
{
- INT16 nValue;
+ sal_Int16 nValue;
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -91,9 +91,9 @@ void FuScale::DoExecute( SfxRequest& rReq )
{
SfxItemSet aNewAttr( mpDoc->GetPool(), SID_ATTR_ZOOM, SID_ATTR_ZOOM );
SvxZoomItem* pZoomItem;
- USHORT nZoomValues = SVX_ZOOM_ENABLE_ALL;
+ sal_uInt16 nZoomValues = SVX_ZOOM_ENABLE_ALL;
- nValue = (INT16) mpWindow->GetZoom();
+ nValue = (sal_Int16) mpWindow->GetZoom();
// Zoom auf Seitengroesse ?
if( mpViewShell && mpViewShell->ISA( DrawViewShell ) &&
@@ -138,8 +138,8 @@ void FuScale::DoExecute( SfxRequest& rReq )
if( pDlg )
{
- pDlg->SetLimits( (USHORT)mpWindow->GetMinZoom(), (USHORT)mpWindow->GetMaxZoom() );
- USHORT nResult = pDlg->Execute();
+ pDlg->SetLimits( (sal_uInt16)mpWindow->GetMinZoom(), (sal_uInt16)mpWindow->GetMaxZoom() );
+ sal_uInt16 nResult = pDlg->Execute();
switch( nResult )
{
case RET_CANCEL:
@@ -202,7 +202,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
}
else if(mpViewShell && (pArgs->Count () == 1))
{
- SFX_REQUEST_ARG (rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM, FALSE);
+ SFX_REQUEST_ARG (rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM, sal_False);
mpViewShell->SetZoom (pScale->GetValue ());
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArrayZoom );
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index f5e65b8a1e8a..88766bc38e2b 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -53,7 +53,7 @@ class SfxRequest;
namespace sd {
-static USHORT SidArraySpell[] = {
+static sal_uInt16 SidArraySpell[] = {
SID_DRAWINGMODE,
SID_OUTLINEMODE,
SID_DIAMODE,
@@ -77,7 +77,7 @@ FuSearch::FuSearch (
SfxRequest& rReq )
: FuPoor(pViewSh, pWin, pView, pDoc, rReq),
pSdOutliner(NULL),
- bOwnOutliner(FALSE)
+ bOwnOutliner(sal_False)
{
}
@@ -94,12 +94,12 @@ void FuSearch::DoExecute( SfxRequest& )
if ( mpViewShell->ISA(DrawViewShell) )
{
- bOwnOutliner = TRUE;
+ bOwnOutliner = sal_True;
pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
}
else if ( mpViewShell->ISA(OutlineViewShell) )
{
- bOwnOutliner = FALSE;
+ bOwnOutliner = sal_False;
pSdOutliner = mpDoc->GetOutliner();
}
@@ -145,7 +145,7 @@ void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
{
pSdOutliner->EndSpelling();
- bOwnOutliner = TRUE;
+ bOwnOutliner = sal_True;
pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
pSdOutliner->PrepareSpelling();
}
@@ -154,14 +154,14 @@ void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
pSdOutliner->EndSpelling();
delete pSdOutliner;
- bOwnOutliner = FALSE;
+ bOwnOutliner = sal_False;
pSdOutliner = mpDoc->GetOutliner();
pSdOutliner->PrepareSpelling();
}
if (pSdOutliner)
{
- BOOL bEndSpelling = pSdOutliner->StartSearchAndReplace(pSearchItem);
+ sal_Bool bEndSpelling = pSdOutliner->StartSearchAndReplace(pSearchItem);
if (bEndSpelling)
{
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index a2836ae0661a..48d81f5388fa 100644..100755
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -104,12 +104,12 @@ FuSelection::FuSelection (
SdDrawDocument* pDoc,
SfxRequest& rReq)
: FuDraw(pViewSh, pWin, pView, pDoc, rReq),
- bTempRotation(FALSE),
- bSelectionChanged(FALSE),
- bHideAndAnimate(FALSE),
+ bTempRotation(sal_False),
+ bSelectionChanged(sal_False),
+ bHideAndAnimate(sal_False),
pHdl(NULL),
- bSuppressChangesOfSelection(FALSE),
- bMirrorSide0(FALSE),
+ bSuppressChangesOfSelection(sal_False),
+ bMirrorSide0(sal_False),
nEditMode(SID_BEZIER_MOVE),
pWaterCanCandidate(NULL)
{
@@ -153,38 +153,38 @@ FuSelection::~FuSelection()
|*
\************************************************************************/
-BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
// Hack fuer #?????#
- bHideAndAnimate = FALSE;
+ bHideAndAnimate = sal_False;
pHdl = NULL;
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
- BOOL bWaterCan = SD_MOD()->GetWaterCan();
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bWaterCan = SD_MOD()->GetWaterCan();
const bool bReadOnly = mpDocSh->IsReadOnly();
// When the right mouse button is pressed then only select objects
// (and deselect others) as a preparation for showing the context
// menu.
const bool bSelectionOnly = rMEvt.IsRight();
- bMBDown = TRUE;
- bSelectionChanged = FALSE;
+ bMBDown = sal_True;
+ bSelectionChanged = sal_False;
if ( mpView->IsAction() )
{
if ( rMEvt.IsRight() )
mpView->BckAction();
- return TRUE;
+ return sal_True;
}
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
// The following code is executed for right clicks as well as for left
// clicks in order to modify the selection for the right button as a
// preparation for the context menu. The functions BegMarkObject() and
// BegDragObject(), however, are not called for right clicks because a)
- // it makes no sense and b) to have IsAction() return FALSE when called
+ // it makes no sense and b) to have IsAction() return sal_False when called
// from Command() which is a prerequisite for the context menu.
if ((rMEvt.IsLeft() || rMEvt.IsRight())
&& !mpView->IsAction()
@@ -201,7 +201,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
long nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
nAngle0 -= 27000;
nAngle0 = NormAngle360(nAngle0);
- bMirrorSide0 = BOOL (nAngle0 < 18000L);
+ bMirrorSide0 = sal_Bool (nAngle0 < 18000L);
if (!pHdl && mpView->Is3DRotationCreationActive())
{
@@ -209,23 +209,23 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
* Wenn 3D-Rotationskoerper erstellt werden sollen, jetzt
* die Erstellung beenden
******************************************************************/
- bSuppressChangesOfSelection = TRUE;
+ bSuppressChangesOfSelection = sal_True;
if(mpWindow)
mpWindow->EnterWait();
mpView->End3DCreation();
- bSuppressChangesOfSelection = FALSE;
+ bSuppressChangesOfSelection = sal_False;
mpView->ResetCreationActive();
if(mpWindow)
mpWindow->LeaveWait();
}
- BOOL bTextEdit = FALSE;
+ sal_Bool bTextEdit = sal_False;
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if ( eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) )
{
- bTextEdit = TRUE;
+ bTextEdit = sal_True;
}
if(!bTextEdit
@@ -248,24 +248,24 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
else
{
// Handle oder markiertes Objekt getroffen
- bFirstMouseMove = TRUE;
+ bFirstMouseMove = sal_True;
aDragTimer.Start();
}
if ( ! rMEvt.IsRight())
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
if (!rMEvt.IsMod2() && mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO))
{
mpView->BegMacroObj(aMDPos, nHitLog, pObj, pPV, mpWindow);
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if ( bTextEdit )
{
- UINT16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
+ sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
if (aVEvt.pObj->GetObjInventor() == SdrInventor &&
(nSdrObjKind == OBJ_TEXT ||
@@ -290,7 +290,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpWindow->ReleaseMouse();
SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
- SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowseItem( SID_BROWSE, sal_True );
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
mpWindow->ReleaseMouse();
@@ -308,7 +308,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if(!rMEvt.IsMod2()
&& mpViewShell->ISA(DrawViewShell)
@@ -348,7 +348,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
{
// New: double click on empty space/on obj on MasterPage, leave group
mpView->LeaveOneGroup();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -367,8 +367,8 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- bReturn = TRUE;
- BOOL bDeactivateOLE = FALSE;
+ bReturn = sal_True;
+ sal_Bool bDeactivateOLE = sal_False;
if ( !rMEvt.IsShift() && !rMEvt.IsMod2() )
{
@@ -379,13 +379,13 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if (pIPClient && pIPClient->IsObjectInPlaceActive())
{
// OLE-Objekt wird im nachfolgenden UnmarkAll() deaktiviert
- bDeactivateOLE = TRUE;
+ bDeactivateOLE = sal_True;
}
mpView->UnmarkAll();
}
- BOOL bMarked = FALSE;
+ sal_Bool bMarked = sal_False;
if ( !rMEvt.IsMod1() && !bDeactivateOLE)
{
@@ -395,15 +395,15 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- BOOL bToggle = FALSE;
+ sal_Bool bToggle = sal_False;
if (rMEvt.IsShift() && mpView->GetMarkedObjectList().GetMarkCount() > 1)
{
// Bei Einfachselektion kein Toggle
- bToggle = TRUE;
+ bToggle = sal_True;
}
- bMarked = mpView->MarkObj(aMDPos, nHitLog, bToggle, FALSE);
+ bMarked = mpView->MarkObj(aMDPos, nHitLog, bToggle, sal_False);
}
}
@@ -431,6 +431,12 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpView->BegMarkObj(aMDPos);
}
}
+
+ if( bMarked && bTempRotation && (nSlotId == SID_OBJECT_ROTATE) && !rMEvt.IsShift() && (rMEvt.GetClicks() != 2) )
+ {
+ nSlotId = SID_OBJECT_SELECT;
+ Activate();
+ }
}
}
}
@@ -532,7 +538,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
mpView->UnmarkAllObj();
}
- BOOL bMarked = FALSE;
+ sal_Bool bMarked = sal_False;
if (!rMEvt.IsMod1())
{
@@ -542,7 +548,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- bMarked = mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), FALSE);
+ bMarked = mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), sal_False);
}
}
@@ -591,15 +597,15 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuDraw::MouseMove(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive())
{
if(bFirstMouseMove)
{
- bFirstMouseMove = FALSE;
+ bFirstMouseMove = sal_False;
}
else
{
@@ -635,9 +641,9 @@ BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
// When the right mouse button is pressed then only select objects
// (and deselect others) as a preparation for showing the context
// menu.
@@ -646,24 +652,24 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
if (bHideAndAnimate)
{
// Animation laeuft noch -> sofort returnieren
- bHideAndAnimate = FALSE;
+ bHideAndAnimate = sal_False;
pHdl = NULL;
mpWindow->ReleaseMouse();
- return(TRUE);
+ return(sal_True);
}
if (aDragTimer.IsActive() )
{
aDragTimer.Stop();
- bIsInDragMode = FALSE;
+ bIsInDragMode = sal_False;
}
if( !mpView )
- return (FALSE);
+ return (sal_False);
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
if (mpView->IsFrameDragSingles() || !mpView->HasMarkablePoints())
{
@@ -676,11 +682,11 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* Objekt wurde verschoben
******************************************************************/
FrameView* pFrameView = mpViewShell->GetFrameView();
- BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
+ sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
if (bDragWithCopy)
{
- bDragWithCopy = !mpView->IsPresObjSelected(FALSE, TRUE);
+ bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
}
mpView->SetDragWithCopy(bDragWithCopy);
@@ -697,7 +703,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* Toggle zw. Selektion und Rotation
**************************************************************/
SdrObject* pSingleObj = NULL;
- ULONG nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
if (nMarkCount==1)
{
@@ -706,13 +712,15 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
if (nSlotId == SID_OBJECT_SELECT
&& mpView->IsRotateAllowed()
+
+ && (rMEvt.GetClicks() != 2)
&& (mpViewShell->GetFrameView()->IsClickChangeRotation()
|| (pSingleObj
&& pSingleObj->GetObjInventor()==E3dInventor))
&& ! bSelectionOnly)
{
- bTempRotation = TRUE;
+ bTempRotation = sal_True;
nSlotId = SID_OBJECT_ROTATE;
Activate();
}
@@ -726,9 +734,9 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
if (!pHdl)
{
- bSuppressChangesOfSelection = TRUE;
+ bSuppressChangesOfSelection = sal_True;
mpView->Start3DCreation();
- bSuppressChangesOfSelection = FALSE;
+ bSuppressChangesOfSelection = sal_False;
}
else if (pHdl->GetKind() != HDL_MIRX &&
pHdl->GetKind() != HDL_REF1 &&
@@ -741,15 +749,15 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
long nAngle1 = GetAngle(aPnt - mpView->GetRef1());
nAngle1 -= 27000;
nAngle1 = NormAngle360(nAngle1);
- BOOL bMirrorSide1 = BOOL (nAngle1 < 18000L);
+ sal_Bool bMirrorSide1 = sal_Bool (nAngle1 < 18000L);
if (bMirrorSide0 != bMirrorSide1)
{
- bSuppressChangesOfSelection = TRUE;
+ bSuppressChangesOfSelection = sal_True;
if(mpWindow)
mpWindow->EnterWait();
mpView->End3DCreation();
- bSuppressChangesOfSelection = FALSE;
+ bSuppressChangesOfSelection = sal_False;
nSlotId = SID_OBJECT_SELECT;
if(mpWindow)
mpWindow->LeaveWait();
@@ -799,7 +807,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoGeoObject(*pWaterCanCandidate));
mpView->AddUndo(pUndoAttr);
- pWaterCanCandidate->SetStyleSheet (pStyleSheet, FALSE);
+ pWaterCanCandidate->SetStyleSheet (pStyleSheet, sal_False);
mpView->EndUndo();
}
@@ -811,7 +819,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
// one now.
}
- USHORT nClicks = rMEvt.GetClicks();
+ sal_uInt16 nClicks = rMEvt.GetClicks();
if (nClicks == 2 && rMEvt.IsLeft() && bMBDown &&
!rMEvt.IsMod1() && !rMEvt.IsShift() )
@@ -819,13 +827,13 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
DoubleClick(rMEvt);
}
- bMBDown = FALSE;
+ bMBDown = sal_False;
ForcePointer(&rMEvt);
pHdl = NULL;
mpWindow->ReleaseMouse();
SdrObject* pSingleObj = NULL;
- ULONG nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
if (nMarkCount==1)
{
@@ -841,7 +849,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
(pSingleObj->GetObjInventor() != SdrInventor ||
pSingleObj->GetObjIdentifier() == OBJ_MEASURE) ) )
{
- bReturn = TRUE;
+ bReturn = sal_True;
ForcePointer(&rMEvt);
pHdl = NULL;
mpWindow->ReleaseMouse();
@@ -866,11 +874,11 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
else if ( mpView->IsDragObj() )
{
FrameView* pFrameView = mpViewShell->GetFrameView();
- BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
+ sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
if (bDragWithCopy)
{
- bDragWithCopy = !mpView->IsPresObjSelected(FALSE, TRUE);
+ bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
}
mpView->SetDragWithCopy(bDragWithCopy);
@@ -880,7 +888,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
mpView->EndAction();
- USHORT nDrgLog2 = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog2 = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
if (Abs(aMDPos.X() - aPos.X()) < nDrgLog2 &&
@@ -903,7 +911,7 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
{
// Gruppe betreten
- mpView->MarkObj(aPnt, nHitLog, FALSE, rMEvt.IsMod1());
+ mpView->MarkObj(aPnt, nHitLog, sal_False, rMEvt.IsMod1());
}
@@ -921,14 +929,14 @@ BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuSelection::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
switch (rKEvt.GetKeyCode().GetCode())
{
@@ -975,7 +983,7 @@ void FuSelection::Activate()
// (gemapter) Slot wird explizit auf Rotate gesetzt
if( mpViewShell->ISA(DrawViewShell) )
{
- USHORT* pSlotArray =
+ sal_uInt16* pSlotArray =
static_cast<DrawViewShell*>(mpViewShell)->GetSlotArray();
pSlotArray[ 1 ] = SID_OBJECT_ROTATE;
}
@@ -1071,7 +1079,7 @@ void FuSelection::Activate()
case SID_CONVERT_TO_3D_LATHE:
{
eMode = SDRDRAG_MIRROR;
- bSuppressChangesOfSelection = TRUE;
+ bSuppressChangesOfSelection = sal_True;
if ( mpView->GetDragMode() != eMode )
mpView->SetDragMode(eMode);
@@ -1079,7 +1087,7 @@ void FuSelection::Activate()
if (!mpView->Is3DRotationCreationActive())
mpView->Start3DCreation();
- bSuppressChangesOfSelection = FALSE;
+ bSuppressChangesOfSelection = sal_False;
}
break;
@@ -1095,7 +1103,7 @@ void FuSelection::Activate()
if (nSlotId != SID_OBJECT_ROTATE)
{
- bTempRotation = FALSE;
+ bTempRotation = sal_False;
}
FuDraw::Activate();
@@ -1123,7 +1131,7 @@ void FuSelection::Deactivate()
void FuSelection::SelectionHasChanged()
{
- bSelectionChanged = TRUE;
+ bSelectionChanged = sal_True;
FuDraw::SelectionHasChanged();
@@ -1146,17 +1154,17 @@ void FuSelection::SelectionHasChanged()
|*
\************************************************************************/
-void FuSelection::SetEditMode(USHORT nMode)
+void FuSelection::SetEditMode(sal_uInt16 nMode)
{
nEditMode = nMode;
if (nEditMode == SID_BEZIER_INSERT)
{
- mpView->SetInsObjPointMode(TRUE);
+ mpView->SetInsObjPointMode(sal_True);
}
else
{
- mpView->SetInsObjPointMode(FALSE);
+ mpView->SetInsObjPointMode(sal_False);
}
ForcePointer();
@@ -1172,11 +1180,11 @@ void FuSelection::SetEditMode(USHORT nMode)
|*
\************************************************************************/
-BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
+sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
{
- BOOL bAnimated = FALSE;
- BOOL bClosed = pObj->IsClosedObj();
- BOOL bFilled = FALSE;
+ sal_Bool bAnimated = sal_False;
+ sal_Bool bClosed = pObj->IsClosedObj();
+ sal_Bool bFilled = sal_False;
if (bClosed)
{
@@ -1189,7 +1197,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
}
const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
const long n2HitLog = nHitLog * 2;
Point aHitPosR(rPos);
Point aHitPosL(rPos);
@@ -1220,13 +1228,13 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
- SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowseItem( SID_BROWSE, sal_True );
mpWindow->ReleaseMouse();
pFrame->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
}
else if (!mpDocSh->ISA(GraphicDocShell) &&
@@ -1248,7 +1256,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->GetBookmark());
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1262,13 +1270,13 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
SfxStringItem aStrItem(SID_FILE_NAME, sBookmark);
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
- SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowseItem( SID_BROWSE, sal_True );
pFrame->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
}
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1279,7 +1287,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
&aItem, 0L);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1290,7 +1298,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
&aItem, 0L);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1301,7 +1309,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
&aItem, 0L);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1312,7 +1320,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
mpViewShell->GetViewFrame()->GetDispatcher()->
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
&aItem, 0L);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1327,7 +1335,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
{
(void)e;
}
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1335,9 +1343,9 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
{
// Verb zuweisen
mpView->UnmarkAll();
- mpView->MarkObj(pObj, mpView->GetSdrPageView(), FALSE, FALSE);
+ mpView->MarkObj(pObj, mpView->GetSdrPageView(), sal_False, sal_False);
pDrViewSh->DoVerb((sal_Int16)pInfo->mnVerb);
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1351,7 +1359,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
if( INET_PROT_FILE == aURL.GetProtocol() )
{
SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) );
- SfxBoolItem aBrowsing( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowsing( SID_BROWSE, sal_True );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (pViewFrm)
@@ -1362,7 +1370,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
0L );
}
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
break;
@@ -1383,17 +1391,17 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
*pInArgs, aRet, aOutArgsIndex, aOutArgs);
// Check the return value from the script
- BOOL bTmp = sal_False;
+ sal_Bool bTmp = sal_False;
if ( eErr == ERRCODE_NONE &&
aRet.getValueType() == getCppuBooleanType() &&
sal_True == ( aRet >>= bTmp ) &&
- bTmp == TRUE )
+ bTmp == sal_True )
{
- bAnimated = TRUE;
+ bAnimated = sal_True;
}
else
{
- bAnimated = FALSE;
+ bAnimated = sal_False;
}
}
else
@@ -1422,7 +1430,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
default:
{
- bAnimated = FALSE;
+ bAnimated = sal_False;
}
break;
}
@@ -1446,7 +1454,7 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
break;
default:
- bAnimated = FALSE;
+ bAnimated = sal_False;
break;
}
}
@@ -1484,7 +1492,7 @@ SdrObject* FuSelection::pickObject (const Point& rTestPoint)
{
SdrObject* pObject = NULL;
SdrPageView* pPageView;
- USHORT nHitLog = USHORT (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
+ sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SDRSEARCH_PICKMARKABLE);
return pObject;
}
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 4859e09f13f8..0111a9d2c9b9 100644..100755
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -90,7 +90,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
for( nPage = mpDoc->GetSdPageCount( PK_STANDARD ) - 1L; nPage >= 0L; nPage-- )
{
- pPage = mpDoc->GetSdPage( (USHORT) nPage, PK_STANDARD );
+ pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PK_STANDARD );
String* pStr = new String( pPage->GetName() );
if ( !pStr->Len() )
@@ -99,7 +99,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
(*pStr).Append( UniString::CreateFromInt32( nPage + 1 ) );
}
- aPageNameList.Insert( pStr, (ULONG) 0 );
+ aPageNameList.Insert( pStr, (sal_uLong) 0 );
// ist dies unsere (vorhandene) erste Seite?
if ( rPresPage == *pStr )
@@ -109,7 +109,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
}
List* pCustomShowList = mpDoc->GetCustomShowList(); // No Create
- BOOL bStartWithActualPage = SD_MOD()->GetSdOptions( mpDoc->GetDocumentType() )->IsStartWithActualPage();
+ sal_Bool bStartWithActualPage = SD_MOD()->GetSdOptions( mpDoc->GetDocumentType() )->IsStartWithActualPage();
/* change in behaviour, even when always start with current page is enabled, range settings are
still used
if( bStartWithActualPage )
@@ -147,7 +147,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
rtl::OUString aPage;
long nValue32;
sal_Bool bValue;
- bool bValuesChanged = FALSE;
+ bool bValuesChanged = sal_False;
pDlg->GetAttr( aDlgSet );
@@ -253,7 +253,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
// wenn sich etwas geaendert hat, setzen wir das Modified-Flag,
if ( bValuesChanged )
- mpDoc->SetChanged( TRUE );
+ mpDoc->SetChanged( sal_True );
}
delete pDlg;
// Strings aus Liste loeschen
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 015e72193d7e..8004421d7708 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -74,14 +74,14 @@ FunctionReference FuSnapLine::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::
void FuSnapLine::DoExecute( SfxRequest& rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nHelpLine = 0;
- BOOL bCreateNew = TRUE;
+ sal_uInt16 nHelpLine = 0;
+ sal_Bool bCreateNew = sal_True;
// Get index of snap line or snap point from the request.
- SFX_REQUEST_ARG (rReq, pHelpLineIndex, SfxUInt32Item, ID_VAL_INDEX, FALSE);
+ SFX_REQUEST_ARG (rReq, pHelpLineIndex, SfxUInt32Item, ID_VAL_INDEX, sal_False);
if (pHelpLineIndex != NULL)
{
- nHelpLine = static_cast<USHORT>(pHelpLineIndex->GetValue());
+ nHelpLine = static_cast<sal_uInt16>(pHelpLineIndex->GetValue());
// Reset the argument pointer to trigger the display of the dialog.
pArgs = NULL;
}
@@ -100,13 +100,13 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
// request. Determine it from the mouse position.
aLinePos = static_cast<DrawViewShell*>(mpViewShell)->GetMousePos();
- static_cast<DrawViewShell*>(mpViewShell)->SetMousePosFreezed( FALSE );
+ static_cast<DrawViewShell*>(mpViewShell)->SetMousePosFreezed( sal_False );
if ( aLinePos.X() >= 0 )
{
aLinePos = mpWindow->PixelToLogic(aLinePos);
- USHORT nHitLog = (USHORT) mpWindow->PixelToLogic(Size(HITPIX,0)).Width();
+ sal_uInt16 nHitLog = (sal_uInt16) mpWindow->PixelToLogic(Size(HITPIX,0)).Width();
bLineExist = mpView->PickHelpLine(aLinePos, nHitLog, *mpWindow, nHelpLine, pPV);
if ( bLineExist )
aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
@@ -143,23 +143,23 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
if ( rHelpLine.GetKind() == SDRHELPLINE_POINT )
{
pDlg->SetText(String(SdResId(STR_SNAPDLG_SETPOINT)));
- pDlg->SetInputFields(TRUE, TRUE);
+ pDlg->SetInputFields(sal_True, sal_True);
}
else
{
pDlg->SetText(String(SdResId(STR_SNAPDLG_SETLINE)));
if ( rHelpLine.GetKind() == SDRHELPLINE_VERTICAL )
- pDlg->SetInputFields(TRUE, FALSE);
+ pDlg->SetInputFields(sal_True, sal_False);
else
- pDlg->SetInputFields(FALSE, TRUE);
+ pDlg->SetInputFields(sal_False, sal_True);
}
- bCreateNew = FALSE;
+ bCreateNew = sal_False;
}
else
pDlg->HideDeleteBtn();
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
pDlg->GetAttr(aNewAttr);
delete pDlg;
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index ace7e51524b2..00e845d42e65 100644..100755
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -81,10 +81,10 @@ void FuSummaryPage::DoExecute( SfxRequest& )
{
::sd::Outliner* pOutl = NULL;
SdPage* pSummaryPage = NULL;
- USHORT i = 0;
- USHORT nFirstPage = SDRPAGE_NOTFOUND;
- USHORT nSelectedPages = 0;
- USHORT nCount = mpDoc->GetSdPageCount(PK_STANDARD);
+ sal_uInt16 i = 0;
+ sal_uInt16 nFirstPage = SDRPAGE_NOTFOUND;
+ sal_uInt16 nSelectedPages = 0;
+ sal_uInt16 nCount = mpDoc->GetSdPageCount(PK_STANDARD);
while (i < nCount && nSelectedPages <= 1)
{
@@ -139,7 +139,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
// Seite mit Titel & Gliederung!
- pSummaryPage = (SdPage*) mpDoc->AllocPage(FALSE);
+ pSummaryPage = (SdPage*) mpDoc->AllocPage(sal_False);
pSummaryPage->SetSize(pActualPage->GetSize() );
pSummaryPage->SetBorder(pActualPage->GetLftBorder(),
pActualPage->GetUppBorder(),
@@ -154,12 +154,12 @@ void FuSummaryPage::DoExecute( SfxRequest& )
// MasterPage der aktuellen Seite verwenden
pSummaryPage->TRG_SetMasterPage(pActualPage->TRG_GetMasterPage());
pSummaryPage->SetLayoutName(pActualPage->GetLayoutName());
- pSummaryPage->SetAutoLayout(AUTOLAYOUT_ENUM, TRUE);
+ pSummaryPage->SetAutoLayout(AUTOLAYOUT_ENUM, sal_True);
pSummaryPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
pSummaryPage->setHeaderFooterSettings(pActualPage->getHeaderFooterSettings());
// Notiz-Seite
- SdPage* pNotesPage = (SdPage*) mpDoc->AllocPage(FALSE);
+ SdPage* pNotesPage = (SdPage*) mpDoc->AllocPage(sal_False);
pNotesPage->SetSize(pActualNotesPage->GetSize());
pNotesPage->SetBorder(pActualNotesPage->GetLftBorder(),
pActualNotesPage->GetUppBorder(),
@@ -176,13 +176,13 @@ void FuSummaryPage::DoExecute( SfxRequest& )
// MasterPage der aktuellen Seite verwenden
pNotesPage->TRG_SetMasterPage(pActualNotesPage->TRG_GetMasterPage());
pNotesPage->SetLayoutName(pActualNotesPage->GetLayoutName());
- pNotesPage->SetAutoLayout(pActualNotesPage->GetAutoLayout(), TRUE);
+ pNotesPage->SetAutoLayout(pActualNotesPage->GetAutoLayout(), sal_True);
pNotesPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
pNotesPage->setHeaderFooterSettings(pActualNotesPage->getHeaderFooterSettings());
pOutl = new ::sd::Outliner( mpDoc, OUTLINERMODE_OUTLINEOBJECT );
- pOutl->SetUpdateMode(FALSE);
- pOutl->EnableUndo(FALSE);
+ pOutl->SetUpdateMode(sal_False);
+ pOutl->EnableUndo(sal_False);
if (mpDocSh)
pOutl->SetRefDevice(SD_MOD()->GetRefDevice( *mpDocSh ));
@@ -209,9 +209,9 @@ void FuSummaryPage::DoExecute( SfxRequest& )
// Harte Absatz- und Zeichenattribute entfernen
SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- ULONG nParaCount = pOutl->GetParagraphCount();
+ sal_uLong nParaCount = pOutl->GetParagraphCount();
- for (USHORT nPara = 0; nPara < nParaCount; nPara++)
+ for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
{
pOutl->SetStyleSheet( nPara, pStyle );
pOutl->QuickRemoveCharAttribs(nPara);
@@ -220,9 +220,9 @@ void FuSummaryPage::DoExecute( SfxRequest& )
}
pTextObj->SetOutlinerParaObject( pOutl->CreateParaObject() );
- pTextObj->SetEmptyPresObj(FALSE);
+ pTextObj->SetEmptyPresObj(sal_False);
- // Harte Attribute entfernen (Flag auf TRUE)
+ // Harte Attribute entfernen (Flag auf sal_True)
SfxItemSet aAttr(mpDoc->GetPool());
aAttr.Put(XLineStyleItem(XLINE_NONE));
aAttr.Put(XFillStyleItem(XFILL_NONE));
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 79d7b8e1f9aa..ed7e848dc734 100644..100755
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -55,7 +55,7 @@
#include <svx/xlndsit.hxx>
#include <svx/xlnstit.hxx>
#include <svx/xlnedit.hxx>
-
+#include "app.hrc"
#include "stlsheet.hxx"
#include "sdpage.hxx"
#include "stlpool.hxx"
@@ -115,22 +115,22 @@ FunctionReference FuTemplate::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::
void FuTemplate::DoExecute( SfxRequest& rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
// StyleSheet-Parameter holen
SfxStyleSheetBasePool* pSSPool = mpDoc->GetDocSh()->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = NULL;
const SfxPoolItem* pItem;
- USHORT nFamily = USHRT_MAX;
+ sal_uInt16 nFamily = USHRT_MAX;
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILY,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
nFamily = ( (const SfxUInt16Item &) pArgs->Get( SID_STYLE_FAMILY ) ).GetValue();
}
else
if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
String sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue();
if (sFamily.CompareToAscii("graphics") == COMPARE_EQUAL)
@@ -140,7 +140,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
String aStyleName;
- USHORT nRetMask = 0xffff;
+ sal_uInt16 nRetMask = 0xffff;
switch( nSId )
{
@@ -204,7 +204,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
// Z.Z. geht immer noch der Dialog auf, um den Namen
// der Vorlage einzugeben.
- if( mpView->AreObjectsMarked() || TRUE )
+ if( mpView->AreObjectsMarked() || sal_True )
{
SfxStyleSheetBase *p = pSSPool->Find(aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_ALL );
if(p)
@@ -227,12 +227,12 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( pStyleSheet )
{
pSSPool->Remove( pStyleSheet );
- nRetMask = TRUE;
- mpDoc->SetChanged(TRUE);
+ nRetMask = sal_True;
+ mpDoc->SetChanged(sal_True);
}
else
{
- nRetMask = FALSE;
+ nRetMask = sal_False;
}
break;
@@ -259,7 +259,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
(pOldStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE && mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW) )
{
mpView->SetStyleSheet( (SfxStyleSheet*) pStyleSheet);
- mpDoc->SetChanged(TRUE);
+ mpDoc->SetChanged(sal_True);
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
}
}
@@ -275,7 +275,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( pArgs->GetItemState( nSId ) == SFX_ITEM_SET )
{
aStyleName = ( ( (const SfxStringItem &) pArgs->Get( nSId ) ).GetValue() );
- SD_MOD()->SetWaterCan( TRUE );
+ SD_MOD()->SetWaterCan( sal_True );
pStyleSheet = pSSPool->Find( aStyleName, (SfxStyleFamily) nFamily);
}
// keine Praesentationsobjektvorlagen, die werden nur
@@ -290,11 +290,11 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
else
- SD_MOD()->SetWaterCan( FALSE );
+ SD_MOD()->SetWaterCan( sal_False );
}
else
{
- SD_MOD()->SetWaterCan( FALSE );
+ SD_MOD()->SetWaterCan( sal_False );
// Werkzeugleiste muss wieder enabled werden
mpViewShell->Invalidate();
}
@@ -317,7 +317,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
SfxAbstractTabDialog* pStdDlg = NULL;
SfxAbstractTabDialog* pPresDlg = NULL;
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- BOOL bOldDocInOtherLanguage = FALSE;
+ sal_Bool bOldDocInOtherLanguage = sal_False;
SfxItemSet aOriSet( pStyleSheet->GetItemSet() );
SfxStyleFamily eFamily = pStyleSheet->GetFamily();
@@ -329,7 +329,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
else if (eFamily == SD_STYLE_FAMILY_PSEUDO)
{
String aName(pStyleSheet->GetName());
- USHORT nDlgId = 0;
+ sal_uInt16 nDlgId = 0;
if (aName == String(SdResId(STR_PSEUDOSHEET_TITLE)))
{
@@ -368,7 +368,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
// die Nummer ermitteln; ein Leerzeichen zwischen
// Name und Nummer beachten
String aNumStr(aName.Copy(aOutlineStr.Len() + 1));
- USHORT nLevel = (USHORT)aNumStr.ToInt32();
+ sal_uInt16 nLevel = (sal_uInt16)aNumStr.ToInt32();
switch (nLevel)
{
case 1: ePO = PO_OUTLINE_1; break;
@@ -385,7 +385,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
else
{
OSL_FAIL("Vorlage aus aelterer anderssprachiger Version");
- bOldDocInOtherLanguage = TRUE;
+ bOldDocInOtherLanguage = sal_True;
}
if( !bOldDocInOtherLanguage )
@@ -397,7 +397,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
}
- USHORT nResult = RET_CANCEL;
+ sal_uInt16 nResult = RET_CANCEL;
const SfxItemSet* pOutSet = NULL;
if (pStdDlg)
{
@@ -458,7 +458,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( (ePO >= PO_OUTLINE_1) && (ePO <= PO_OUTLINE_8) )
{
- for( USHORT n = (USHORT)(ePO - PO_OUTLINE_1 + 2); n < 10; n++ )
+ for( sal_uInt16 n = (sal_uInt16)(ePO - PO_OUTLINE_1 + 2); n < 10; n++ )
{
String aName( sStyleName );
aName.Append( String::CreateFromInt32( (sal_Int32) n ));
@@ -622,16 +622,16 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( mpDoc->GetOnlineSpell() )
{
const SfxPoolItem* pTempItem;
- if( SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, FALSE, &pTempItem ) ||
- SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, FALSE, &pTempItem ) ||
- SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, FALSE, &pTempItem ) )
+ if( SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE, sal_False, &pTempItem ) ||
+ SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CJK, sal_False, &pTempItem ) ||
+ SFX_ITEM_SET == rAttr.GetItemState(EE_CHAR_LANGUAGE_CTL, sal_False, &pTempItem ) )
{
mpDoc->StopOnlineSpelling();
mpDoc->StartOnlineSpelling();
}
}
- mpDoc->SetChanged(TRUE);
+ mpDoc->SetChanged(sal_True);
}
break;
@@ -656,7 +656,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
nRetMask = pStyleSheet->GetMask();
SfxItemSet aCoreSet( mpDoc->GetPool() );
- mpView->GetAttributes( aCoreSet, TRUE );
+ mpView->GetAttributes( aCoreSet, sal_True );
// wenn das Objekt eine Vorlage hatte, wird diese Parent
// der neuen Vorlage
@@ -682,7 +682,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
( (SfxStyleSheet*) pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
- mpDoc->SetChanged(TRUE);
+ mpDoc->SetChanged(sal_True);
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
}
@@ -709,7 +709,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
mpView->SetStyleSheet( (SfxStyleSheet*) pStyleSheet);
( (SfxStyleSheet*) pStyleSheet )->Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
- mpDoc->SetChanged(TRUE);
+ mpDoc->SetChanged(sal_True);
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
}
}
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 688b93887ffe..05ae15a565a3 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -88,7 +88,7 @@ using namespace ::com::sun::star::linguistic2;
namespace sd {
-static USHORT SidArray[] = {
+static sal_uInt16 SidArray[] = {
SID_STYLE_FAMILY2, // 5542
SID_STYLE_FAMILY5, // 5545
SID_CUT, // 5710
@@ -129,7 +129,7 @@ static USHORT SidArray[] = {
TYPEINIT1( FuText, FuConstruct );
-static BOOL bTestText = 0;
+static sal_Bool bTestText = 0;
/*************************************************************************
|*
@@ -139,7 +139,7 @@ static BOOL bTestText = 0;
FuText::FuText( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
: FuConstruct(pViewSh, pWin, pView, pDoc, rReq)
-, bFirstObjCreated(FALSE)
+, bFirstObjCreated(sal_False)
, rRequest (rReq)
{
}
@@ -160,7 +160,7 @@ void FuText::disposing()
{
if(mpView)
{
- if(mpView->SdrEndTextEdit(FALSE) == SDRENDTEXTEDIT_DELETED)
+ if(mpView->SdrEndTextEdit(sal_False) == SDRENDTEXTEDIT_DELETED)
mxTextObj.reset( 0 );
// die RequestHandler der benutzten Outliner zuruecksetzen auf den
@@ -233,7 +233,7 @@ void FuText::DoExecute( SfxRequest& )
}
}
- BOOL bQuickDrag = TRUE;
+ sal_Bool bQuickDrag = sal_True;
const SfxItemSet* pArgs = rRequest.GetArgs();
@@ -243,10 +243,10 @@ void FuText::DoExecute( SfxRequest& )
&& SID_TEXTEDIT == nSlotId
&& SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT)
- && (UINT16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
+ && (sal_uInt16)((SfxUInt16Item&)pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// Selection by doubleclick -> don't allow QuickDrag
- bQuickDrag = FALSE;
+ bQuickDrag = sal_False;
}
SetInEditMode(aMEvt, bQuickDrag);
@@ -258,13 +258,13 @@ void FuText::DoExecute( SfxRequest& )
|*
\************************************************************************/
-BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
- bMBDown = TRUE;
+ bMBDown = sal_True;
- BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
- mpView->SetMarkHdlWhenTextEdit(TRUE);
+ mpView->SetMarkHdlWhenTextEdit(sal_True);
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
@@ -272,7 +272,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
// Text getroffen -> Event von SdrView auswerten lassen
if (mpView->MouseButtonDown(rMEvt, mpWindow))
- return (TRUE);
+ return (sal_True);
}
if (rMEvt.GetClicks() == 1)
@@ -306,16 +306,16 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
if (eHit == SDRHIT_TEXTEDIT)
{
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
else
{
- BOOL bMacro = FALSE;
+ sal_Bool bMacro = sal_False;
if (bMacro && mpView->PickObj(aMDPos,mpView->getHitTolLog(),pObj,pPV,SDRSEARCH_PICKMACRO))
{
// Makro
- USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
+ sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
mpView->BegMacroObj(aMDPos,nHitLog,pObj,pPV,mpWindow);
}
else
@@ -353,7 +353,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
mxTextObj.reset( static_cast<SdrTextObj*>(aVEvt.pObj) );
}
- SetInEditMode(rMEvt, TRUE);
+ SetInEditMode(rMEvt, sal_True);
}
else if (aVEvt.eEvent == SDREVENT_EXECUTEURL && !rMEvt.IsMod2())
{
@@ -363,7 +363,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
mpWindow->ReleaseMouse();
SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
- SfxBoolItem aBrowseItem( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowseItem( SID_BROWSE, sal_True );
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
mpWindow->ReleaseMouse();
@@ -421,7 +421,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
}
// Drag object
- bFirstMouseMove = TRUE;
+ bFirstMouseMove = sal_True;
aDragTimer.Start();
}
@@ -432,7 +432,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
if( (eHit == SDRHIT_HANDLE) || (eHit == SDRHIT_MARKEDOBJECT) )
{
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
}
}
@@ -447,7 +447,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
**********************************************************/
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
}
else
@@ -467,7 +467,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
else if ( rMEvt.GetClicks() == 2 && !mpView->IsTextEdit() )
{
MouseEvent aMEvt( mpWindow->GetPointerPosPixel() );
- SetInEditMode( aMEvt, FALSE );
+ SetInEditMode( aMEvt, sal_False );
}
if (!bIsInDragMode)
@@ -485,14 +485,14 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuText::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseMove(const MouseEvent& rMEvt)
{
- BOOL bReturn = FuDraw::MouseMove(rMEvt);
+ sal_Bool bReturn = FuDraw::MouseMove(rMEvt);
if (aDragTimer.IsActive() )
{
if( bFirstMouseMove )
- bFirstMouseMove = FALSE;
+ bFirstMouseMove = sal_False;
else
aDragTimer.Stop();
}
@@ -528,8 +528,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
// Hoehe bekommt (sonst wird zuviel gepainted)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
- aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_True));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
aSet.Put(SdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height()));
@@ -539,8 +539,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
{
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameWidthItem(0));
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
// Needs to be set since default is SDRTEXTHORZADJUST_BLOCK
aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT));
@@ -557,8 +557,8 @@ void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj)
// draw text object, needs to be initialized when vertical text is used
SfxItemSet aSet(mpViewShell->GetPool());
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
// Set defaults for vertical klick-n'drag text object, pool defaults are:
// SdrTextVertAdjustItem: SDRTEXTVERTADJUST_TOP
@@ -578,8 +578,8 @@ void FuText::ImpSetAttributesFitToSize(SdrTextObj* pTxtObj)
SfxItemSet aSet(mpViewShell->GetPool(), SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
}
@@ -590,8 +590,8 @@ void FuText::ImpSetAttributesFitToSizeVertical(SdrTextObj* pTxtObj)
SDRATTR_TEXT_AUTOGROWHEIGHT, SDRATTR_TEXT_AUTOGROWWIDTH);
SdrFitToSizeType eFTS = SDRTEXTFIT_PROPORTIONAL;
aSet.Put(SdrTextFitToSizeTypeItem(eFTS));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
pTxtObj->AdjustTextFrameWidthAndHeight();
}
@@ -607,8 +607,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextMaxFrameHeightItem(0));
- aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
- aSet.Put(SdrTextAutoGrowWidthItem(FALSE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_True));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
}
else if( nSlotId == SID_ATTR_CHAR_VERTICAL )
@@ -616,8 +616,8 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameWidthItem(0));
aSet.Put(SdrTextMaxFrameWidthItem(0));
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
- aSet.Put(SdrTextAutoGrowHeightItem(FALSE));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_False));
pTxtObj->SetMergedItemSet(aSet);
}
@@ -625,14 +625,14 @@ void FuText::ImpSetAttributesFitCommon(SdrTextObj* pTxtObj)
}
}
-BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (aDragTimer.IsActive())
{
aDragTimer.Stop();
- bIsInDragMode = FALSE;
+ bIsInDragMode = sal_False;
}
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
@@ -640,9 +640,9 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
if( (mpView && mpView->MouseButtonUp(rMEvt, mpWindow)) || rMEvt.GetClicks() == 2 )
- return (TRUE); // Event von der SdrView ausgewertet
+ return (sal_True); // Event von der SdrView ausgewertet
- BOOL bEmptyTextObj = FALSE;
+ sal_Bool bEmptyTextObj = sal_False;
if (mxTextObj.is())
{
@@ -652,9 +652,9 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
&& ( rMarkList.GetMark(0)->GetMarkedSdrObj() == mxTextObj.get()) )
{
if( mxTextObj.is() && !GetTextObj()->GetOutlinerParaObject() )
- bEmptyTextObj = TRUE;
+ bEmptyTextObj = sal_True;
else
- bFirstObjCreated = TRUE;
+ bFirstObjCreated = sal_True;
}
else
{
@@ -668,17 +668,28 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
* Objekt wurde verschoben
**********************************************************************/
FrameView* pFrameView = mpViewShell->GetFrameView();
- BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
+ sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
if (bDragWithCopy)
{
- bDragWithCopy = !mpView->IsPresObjSelected(FALSE, TRUE);
+ bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
}
mpView->SetDragWithCopy(bDragWithCopy);
mpView->EndDragObj( mpView->IsDragWithCopy() );
mpView->ForceMarkedToAnotherPage();
mpView->SetCurrentObj(OBJ_TEXT);
+
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+
+ if ( mpView->IsRotateAllowed() && mpViewShell->GetFrameView()->IsClickChangeRotation() && (rMEvt.GetClicks() != 2) &&
+ !rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() && !rMEvt.IsRight() &&
+ Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
+ Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
+ {
+ // toggle to rotation mode
+ mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_ROTATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
+ }
}
else if( mpView && mpView->IsCreateObj() && rMEvt.IsLeft())
{
@@ -694,7 +705,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
// vertical when there was a vertical one used last time.
OutlinerParaObject* pOPO = GetTextObj()->GetOutlinerParaObject();
SdrOutliner& rOutl = mxTextObj->GetModel()->GetDrawOutliner(GetTextObj());
- BOOL bVertical((pOPO && pOPO->IsVertical())
+ sal_Bool bVertical((pOPO && pOPO->IsVertical())
|| nSlotId == SID_ATTR_CHAR_VERTICAL
|| nSlotId == SID_TEXT_FITTOSIZE_VERTICAL);
rOutl.SetVertical(bVertical);
@@ -729,13 +740,13 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
{
ImpSetAttributesFitToSize(GetTextObj());
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
else if ( nSlotId == SID_TEXT_FITTOSIZE_VERTICAL )
{
ImpSetAttributesFitToSizeVertical(GetTextObj());
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
else
{
@@ -744,7 +755,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
// Damit die Handles und der graue Rahmen stimmen
mpView->AdjustMarkHdl();
mpView->PickHandle(aPnt);
- SetInEditMode(rMEvt, FALSE);
+ SetInEditMode(rMEvt, sal_False);
}
}
else if ( mpView && mpView->IsAction())
@@ -754,7 +765,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
ForcePointer(&rMEvt);
mpWindow->ReleaseMouse();
- USHORT nDrgLog1 = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog1 = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
if ( mpView && !mpView->AreObjectsMarked() &&
Abs(aMDPos.X() - aPnt.X()) < nDrgLog1 &&
@@ -779,13 +790,13 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
**********************************************************************/
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_CREATE);
- USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
+ sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegCreateObj(aMDPos, (OutputDevice*) NULL, nDrgLog);
- BOOL bSnapEnabled = mpView->IsSnapEnabled();
+ sal_Bool bSnapEnabled = mpView->IsSnapEnabled();
if (bSnapEnabled)
- mpView->SetSnapEnabled(FALSE);
+ mpView->SetSnapEnabled(sal_False);
aPnt.X() += nDrgLog + nDrgLog;
aPnt.Y() += nDrgLog + nDrgLog;
@@ -795,7 +806,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
if(mxTextObj.is())
{
- GetTextObj()->SetDisableAutoWidthOnDragging(TRUE);
+ GetTextObj()->SetDisableAutoWidthOnDragging(sal_True);
}
if(!mpView->EndCreateObj(SDRCREATE_FORCEEND))
@@ -811,8 +822,8 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
SfxItemSet aSet(mpViewShell->GetPool());
aSet.Put(SdrTextMinFrameHeightItem(0));
aSet.Put(SdrTextMinFrameWidthItem(0));
- aSet.Put(SdrTextAutoGrowHeightItem(TRUE));
- aSet.Put(SdrTextAutoGrowWidthItem(TRUE));
+ aSet.Put(SdrTextAutoGrowHeightItem(sal_True));
+ aSet.Put(SdrTextAutoGrowWidthItem(sal_True));
if(nSlotId == SID_ATTR_CHAR_VERTICAL)
{
@@ -880,11 +891,11 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
}
GetTextObj()->SetMergedItemSet(aSet);
- GetTextObj()->SetDisableAutoWidthOnDragging(TRUE);
- SetInEditMode(rMEvt, FALSE);
+ GetTextObj()->SetDisableAutoWidthOnDragging(sal_True);
+ SetInEditMode(rMEvt, sal_False);
}
- bFirstObjCreated = TRUE;
+ bFirstObjCreated = sal_True;
}
else
{
@@ -899,7 +910,7 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
}
}
- bMBDown = FALSE;
+ bMBDown = sal_False;
FuConstruct::MouseButtonUp(rMEvt);
return (bReturn);
}
@@ -908,18 +919,18 @@ BOOL FuText::MouseButtonUp(const MouseEvent& rMEvt)
|*
|* Tastaturereignisse bearbeiten
|*
-|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
-|* FALSE.
+|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
+|* sal_False.
|*
\************************************************************************/
-BOOL FuText::KeyInput(const KeyEvent& rKEvt)
+sal_Bool FuText::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
- mpView->SetMarkHdlWhenTextEdit(TRUE);
+ sal_Bool bReturn = sal_False;
+ mpView->SetMarkHdlWhenTextEdit(sal_True);
KeyCode nCode = rKEvt.GetKeyCode();
- BOOL bShift = nCode.IsShift();
+ sal_Bool bShift = nCode.IsShift();
if(mxTextObj.is())
{
@@ -942,14 +953,14 @@ BOOL FuText::KeyInput(const KeyEvent& rKEvt)
if ( mxTextObj.is() && mxTextObj->GetObjInventor() == SdrInventor && mxTextObj->GetObjIdentifier() == OBJ_TITLETEXT && rKEvt.GetKeyCode().GetCode() == KEY_RETURN )
{
// Titeltext-Objekt: immer "weiche" Umbrueche
- bShift = TRUE;
+ bShift = sal_True;
}
- USHORT nKey = nCode.GetCode();
+ sal_uInt16 nKey = nCode.GetCode();
KeyCode aKeyCode (nKey, bShift, nCode.IsMod1(), nCode.IsMod2(), nCode.IsMod3() );
KeyEvent aKEvt(rKEvt.GetCharCode(), aKeyCode);
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if (mpDocSh->IsReadOnly())
{
@@ -957,12 +968,12 @@ BOOL FuText::KeyInput(const KeyEvent& rKEvt)
}
if( aKeyCode.GetCode() == KEY_PAGEUP || aKeyCode.GetCode() == KEY_PAGEDOWN )
{
- bOK = FALSE; // default handling in base class
+ bOK = sal_False; // default handling in base class
}
if (bOK && mpView->KeyInput(aKEvt, mpWindow) )
{
- bReturn = TRUE;
+ bReturn = sal_True;
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
@@ -1039,7 +1050,7 @@ void FuText::Deactivate()
|*
\************************************************************************/
-void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
+void FuText::SetInEditMode(const MouseEvent& rMEvt, sal_Bool bQuickDrag)
{
SdrPageView* pPV = mpView->GetSdrPageView();
if( mxTextObj.is() && (mxTextObj->GetPage() == pPV->GetPage()) )
@@ -1051,12 +1062,12 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
else
mpView->SetEditMode(SDREDITMODE_EDIT);
- BOOL bEmptyOutliner = FALSE;
+ sal_Bool bEmptyOutliner = sal_False;
if (!GetTextObj()->GetOutlinerParaObject() && mpView->GetTextEditOutliner())
{
::Outliner* pOutl = mpView->GetTextEditOutliner();
- ULONG nParaAnz = pOutl->GetParagraphCount();
+ sal_uLong nParaAnz = pOutl->GetParagraphCount();
Paragraph* p1stPara = pOutl->GetParagraph( 0 );
if (nParaAnz==1 && p1stPara)
@@ -1064,15 +1075,15 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
// Bei nur einem Pararaph
if (pOutl->GetText(p1stPara).Len() == 0)
{
- bEmptyOutliner = TRUE;
+ bEmptyOutliner = sal_True;
}
}
}
if (GetTextObj() != mpView->GetTextEditObject() || bEmptyOutliner)
{
- UINT32 nInv = mxTextObj->GetObjInventor();
- UINT16 nSdrObjKind = mxTextObj->GetObjIdentifier();
+ sal_uInt32 nInv = mxTextObj->GetObjInventor();
+ sal_uInt16 nSdrObjKind = mxTextObj->GetObjIdentifier();
if (nInv == SdrInventor && GetTextObj()->HasTextEdit() &&
(nSdrObjKind == OBJ_TEXT ||
@@ -1090,7 +1101,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
{
OutlinerParaObject* pOPO = pTextObj->GetOutlinerParaObject();
if( ( pOPO && pOPO->IsVertical() ) || (nSlotId == SID_ATTR_CHAR_VERTICAL) || (nSlotId == SID_TEXT_FITTOSIZE_VERTICAL) )
- pOutl->SetVertical( TRUE );
+ pOutl->SetVertical( sal_True );
if( pTextObj->getTextCount() > 1 )
{
@@ -1101,7 +1112,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
if (mpView->SdrBeginTextEdit(pTextObj, pPV, mpWindow, sal_True, pOutl) && mxTextObj->GetObjInventor() == SdrInventor)
{
- bFirstObjCreated = TRUE;
+ bFirstObjCreated = sal_True;
DeleteDefaultText();
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
@@ -1158,9 +1169,9 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag)
|*
\************************************************************************/
-BOOL FuText::DeleteDefaultText()
+sal_Bool FuText::DeleteDefaultText()
{
- BOOL bDeleted = FALSE;
+ sal_Bool bDeleted = sal_False;
if ( mxTextObj.is() && mxTextObj->IsEmptyPresObj() )
{
@@ -1179,21 +1190,21 @@ BOOL FuText::DeleteDefaultText()
{
::Outliner* pOutliner = mpView->GetTextEditOutliner();
SfxStyleSheet* pSheet = pOutliner->GetStyleSheet( 0 );
- BOOL bIsUndoEnabled = pOutliner->IsUndoEnabled();
+ sal_Bool bIsUndoEnabled = pOutliner->IsUndoEnabled();
if( bIsUndoEnabled )
- pOutliner->EnableUndo(FALSE);
+ pOutliner->EnableUndo(sal_False);
pOutliner->SetText( String(), pOutliner->GetParagraph( 0 ) );
if( bIsUndoEnabled )
- pOutliner->EnableUndo(TRUE);
+ pOutliner->EnableUndo(sal_True);
if (pSheet &&
(ePresObjKind == PRESOBJ_NOTES || ePresObjKind == PRESOBJ_TEXT))
pOutliner->SetStyleSheet(0, pSheet);
- mxTextObj->SetEmptyPresObj(TRUE);
- bDeleted = TRUE;
+ mxTextObj->SetEmptyPresObj(sal_True);
+ bDeleted = sal_True;
}
}
}
@@ -1207,7 +1218,7 @@ BOOL FuText::DeleteDefaultText()
|*
\************************************************************************/
-BOOL FuText::Command(const CommandEvent& rCEvt)
+sal_Bool FuText::Command(const CommandEvent& rCEvt)
{
return( FuPoor::Command(rCEvt) );
}
@@ -1218,9 +1229,9 @@ BOOL FuText::Command(const CommandEvent& rCEvt)
|*
\************************************************************************/
-BOOL FuText::RequestHelp(const HelpEvent& rHEvt)
+sal_Bool FuText::RequestHelp(const HelpEvent& rHEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
@@ -1317,7 +1328,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
}
}
- BOOL bQuickDrag = TRUE;
+ sal_Bool bQuickDrag = sal_True;
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -1327,10 +1338,10 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
&& SID_TEXTEDIT == nSlotId
&& SFX_ITEM_SET == pArgs->GetItemState(SID_TEXTEDIT)
- && (UINT16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
+ && (sal_uInt16) ((SfxUInt16Item&) pArgs->Get(SID_TEXTEDIT)).GetValue() == 2)
{
// Anwahl per Doppelklick -> kein QuickDrag zulassen
- bQuickDrag = FALSE;
+ bQuickDrag = sal_False;
}
SetInEditMode(aMEvt, bQuickDrag);
@@ -1347,7 +1358,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
IMPL_LINK( FuText, SpellError, void *, nLang )
{
- String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(ULONG)nLang ) );
+ String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(sal_uLong)nLang ) );
ErrorHandler::HandleError(* new StringErrorInfo(
ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aError) );
return 0;
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 58f88594dbda..59d495a5d95c 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -94,7 +94,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
{
std::auto_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( NULL, mpView ) );
- const USHORT* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
+ const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
aCombSet.Put( aNewAttr );
aCombSet.Put( aSet );
diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx
index d49825760570..625fd84d2e5a 100644..100755
--- a/sd/source/ui/func/futxtatt.cxx
+++ b/sd/source/ui/func/futxtatt.cxx
@@ -79,7 +79,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAbstractTabDialog *pDlg = pFact->CreateTextTabDialog( NULL, &aNewAttr, mpView );
- USHORT nResult = pDlg->Execute();
+ sal_uInt16 nResult = pDlg->Execute();
switch( nResult )
{
diff --git a/sd/source/ui/func/fuzoom.cxx b/sd/source/ui/func/fuzoom.cxx
index b01594039423..e93210ea4a5f 100644..100755
--- a/sd/source/ui/func/fuzoom.cxx
+++ b/sd/source/ui/func/fuzoom.cxx
@@ -47,7 +47,7 @@
namespace sd {
-USHORT SidArrayZoom[] = {
+sal_uInt16 SidArrayZoom[] = {
SID_ATTR_ZOOM,
SID_ZOOM_OUT,
SID_ZOOM_IN,
@@ -68,8 +68,8 @@ FuZoom::FuZoom(
SdDrawDocument* pDoc,
SfxRequest& rReq)
: FuPoor(pViewSh, pWin, pView, pDoc, rReq),
- bVisible(FALSE),
- bStartDrag(FALSE)
+ bVisible(sal_False),
+ bStartDrag(sal_False)
{
}
@@ -86,8 +86,8 @@ FuZoom::~FuZoom()
// Hide ZoomRect
mpViewShell->DrawMarkRect(aZoomRect);
- bVisible = FALSE;
- bStartDrag = FALSE;
+ bVisible = sal_False;
+ bStartDrag = sal_False;
}
}
@@ -103,18 +103,18 @@ FunctionReference FuZoom::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::
|*
\************************************************************************/
-BOOL FuZoom::MouseButtonDown(const MouseEvent& rMEvt)
+sal_Bool FuZoom::MouseButtonDown(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
mpWindow->CaptureMouse();
- bStartDrag = TRUE;
+ bStartDrag = sal_True;
aBeginPosPix = rMEvt.GetPosPixel();
aBeginPos = mpWindow->PixelToLogic(aBeginPosPix);
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -123,7 +123,7 @@ BOOL FuZoom::MouseButtonDown(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuZoom::MouseMove(const MouseEvent& rMEvt)
+sal_Bool FuZoom::MouseMove(const MouseEvent& rMEvt)
{
if (bStartDrag)
{
@@ -166,7 +166,7 @@ BOOL FuZoom::MouseMove(const MouseEvent& rMEvt)
mpViewShell->DrawMarkRect(aZoomRect);
}
- bVisible = TRUE;
+ bVisible = sal_True;
}
return bStartDrag;
@@ -178,7 +178,7 @@ BOOL FuZoom::MouseMove(const MouseEvent& rMEvt)
|*
\************************************************************************/
-BOOL FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
+sal_Bool FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
@@ -187,7 +187,7 @@ BOOL FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
{
// Hide ZoomRect
mpViewShell->DrawMarkRect(aZoomRect);
- bVisible = FALSE;
+ bVisible = sal_False;
}
Point aPosPix = rMEvt.GetPosPixel();
@@ -196,7 +196,7 @@ BOOL FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
{
// Zoom
Size aZoomSizePixel = mpWindow->LogicToPixel(aZoomRect).GetSize();
- ULONG nTol = DRGPIX + DRGPIX;
+ sal_uLong nTol = DRGPIX + DRGPIX;
if ( aZoomSizePixel.Width() < (long) nTol && aZoomSizePixel.Height() < (long) nTol )
{
@@ -218,11 +218,11 @@ BOOL FuZoom::MouseButtonUp(const MouseEvent& rMEvt)
mpWindow->GetOutputSizePixel()));
mpViewShell->GetZoomList()->InsertZoomRect(aVisAreaWin);
- bStartDrag = FALSE;
+ bStartDrag = sal_False;
mpWindow->ReleaseMouse();
mpViewShell->Cancel();
- return TRUE;
+ return sal_True;
}
/*************************************************************************
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index 6d3550965a7c..99c3b73cfab1 100644
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -43,8 +43,8 @@ TYPEINIT1(SdUndoGroup, SdUndoAction);
SdUndoGroup::~SdUndoGroup()
{
- ULONG nLast = aCtn.Count();
- for (ULONG nAction = 0; nAction < nLast; nAction++)
+ sal_uLong nLast = aCtn.Count();
+ for (sal_uLong nAction = 0; nAction < nLast; nAction++)
{
delete (SdUndoAction*) aCtn.GetObject(nAction);
}
@@ -57,9 +57,9 @@ SdUndoGroup::~SdUndoGroup()
|*
\************************************************************************/
-BOOL SdUndoGroup::Merge( SfxUndoAction* pNextAction )
+sal_Bool SdUndoGroup::Merge( SfxUndoAction* pNextAction )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( pNextAction && pNextAction->ISA( SdUndoAction ) )
{
@@ -68,7 +68,7 @@ BOOL SdUndoGroup::Merge( SfxUndoAction* pNextAction )
if( pClone )
{
AddAction( pClone );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -86,7 +86,7 @@ void SdUndoGroup::Undo()
long nLast = aCtn.Count();
for (long nAction = nLast - 1; nAction >= 0; nAction--)
{
- ((SdUndoAction*)aCtn.GetObject((ULONG)nAction))->Undo();
+ ((SdUndoAction*)aCtn.GetObject((sal_uLong)nAction))->Undo();
}
}
@@ -99,8 +99,8 @@ void SdUndoGroup::Undo()
void SdUndoGroup::Redo()
{
- ULONG nLast = aCtn.Count();
- for (ULONG nAction = 0; nAction < nLast; nAction++)
+ sal_uLong nLast = aCtn.Count();
+ for (sal_uLong nAction = 0; nAction < nLast; nAction++)
{
((SdUndoAction*)aCtn.GetObject(nAction))->Redo();
}
diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx
index 7743bbec6f10..586c77a0c88a 100644
--- a/sd/source/ui/func/smarttag.cxx
+++ b/sd/source/ui/func/smarttag.cxx
@@ -122,30 +122,30 @@ bool SmartTag::getContext( SdrViewContext& /*rContext*/ )
// --------------------------------------------------------------------
-ULONG SmartTag::GetMarkablePointCount() const
+sal_uLong SmartTag::GetMarkablePointCount() const
{
return 0;
}
// --------------------------------------------------------------------
-ULONG SmartTag::GetMarkedPointCount() const
+sal_uLong SmartTag::GetMarkedPointCount() const
{
return 0;
}
// --------------------------------------------------------------------
-BOOL SmartTag::MarkPoint(SdrHdl& /*rHdl*/, BOOL /*bUnmark*/ )
+sal_Bool SmartTag::MarkPoint(SdrHdl& /*rHdl*/, sal_Bool /*bUnmark*/ )
{
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------------------------
-BOOL SmartTag::MarkPoints(const Rectangle* /*pRect*/, BOOL /*bUnmark*/ )
+sal_Bool SmartTag::MarkPoints(const Rectangle* /*pRect*/, sal_Bool /*bUnmark*/ )
{
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------------------------
@@ -369,14 +369,14 @@ bool SmartTagSet::getContext( SdrViewContext& rContext ) const
// support point editing
// --------------------------------------------------------------------
-BOOL SmartTagSet::HasMarkablePoints() const
+sal_Bool SmartTagSet::HasMarkablePoints() const
{
- return GetMarkablePointCount() != 0 ? TRUE : FALSE;
+ return GetMarkablePointCount() != 0 ? sal_True : sal_False;
}
// --------------------------------------------------------------------
-ULONG SmartTagSet::GetMarkablePointCount() const
+sal_uLong SmartTagSet::GetMarkablePointCount() const
{
if( mxSelectedTag.is() )
return mxSelectedTag->GetMarkablePointCount();
@@ -385,14 +385,14 @@ ULONG SmartTagSet::GetMarkablePointCount() const
// --------------------------------------------------------------------
-BOOL SmartTagSet::HasMarkedPoints() const
+sal_Bool SmartTagSet::HasMarkedPoints() const
{
- return GetMarkedPointCount() != 0 ? TRUE : FALSE;
+ return GetMarkedPointCount() != 0 ? sal_True : sal_False;
}
// --------------------------------------------------------------------
-ULONG SmartTagSet::GetMarkedPointCount() const
+sal_uLong SmartTagSet::GetMarkedPointCount() const
{
if( mxSelectedTag.is() )
return mxSelectedTag->GetMarkedPointCount();
@@ -402,7 +402,7 @@ ULONG SmartTagSet::GetMarkedPointCount() const
// --------------------------------------------------------------------
-BOOL SmartTagSet::IsPointMarkable(const SdrHdl& rHdl) const
+sal_Bool SmartTagSet::IsPointMarkable(const SdrHdl& rHdl) const
{
const SmartHdl* pSmartHdl = dynamic_cast< const SmartHdl* >( &rHdl );
@@ -411,21 +411,21 @@ BOOL SmartTagSet::IsPointMarkable(const SdrHdl& rHdl) const
// --------------------------------------------------------------------
-BOOL SmartTagSet::MarkPoint(SdrHdl& rHdl, BOOL bUnmark )
+sal_Bool SmartTagSet::MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark )
{
if( mxSelectedTag.is() )
return mxSelectedTag->MarkPoint( rHdl, bUnmark );
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------------------------
-BOOL SmartTagSet::MarkPoints(const Rectangle* pRect, BOOL bUnmark)
+sal_Bool SmartTagSet::MarkPoints(const Rectangle* pRect, sal_Bool bUnmark)
{
if( mxSelectedTag.is() )
return mxSelectedTag->MarkPoints( pRect, bUnmark );
- return FALSE;
+ return sal_False;
}
// --------------------------------------------------------------------
diff --git a/sd/source/ui/func/unprlout.cxx b/sd/source/ui/func/unprlout.cxx
index 059fc04751e2..7446be80bb7c 100644..100755
--- a/sd/source/ui/func/unprlout.cxx
+++ b/sd/source/ui/func/unprlout.cxx
@@ -54,7 +54,7 @@ SdPresentationLayoutUndoAction::SdPresentationLayoutUndoAction(
String aTheNewLayoutName,
AutoLayout eTheOldAutoLayout,
AutoLayout eTheNewAutoLayout,
- BOOL bSet,
+ sal_Bool bSet,
SdPage* pThePage):
SdUndoAction(pTheDoc)
{
@@ -77,9 +77,9 @@ SdPresentationLayoutUndoAction::SdPresentationLayoutUndoAction(
void SdPresentationLayoutUndoAction::Undo()
{
- pPage->SetPresentationLayout(aOldLayoutName, TRUE, TRUE, TRUE);
+ pPage->SetPresentationLayout(aOldLayoutName, sal_True, sal_True, sal_True);
if (bSetAutoLayout)
- pPage->SetAutoLayout(eOldAutoLayout, TRUE);
+ pPage->SetAutoLayout(eOldAutoLayout, sal_True);
}
/*************************************************************************
@@ -92,7 +92,7 @@ void SdPresentationLayoutUndoAction::Redo()
{
pPage->SetPresentationLayout(aNewLayoutName);
if (bSetAutoLayout)
- pPage->SetAutoLayout(eNewAutoLayout, TRUE);
+ pPage->SetAutoLayout(eNewAutoLayout, sal_True);
}
/*************************************************************************
diff --git a/sd/source/ui/inc/3dchld.hxx b/sd/source/ui/inc/3dchld.hxx
index 7bb61e3989c6..b85836e00f6c 100644..100755
--- a/sd/source/ui/inc/3dchld.hxx
+++ b/sd/source/ui/inc/3dchld.hxx
@@ -42,7 +42,7 @@
class Sd3DChildWindow : public SfxChildWindow
{
public:
- Sd3DChildWindow( Window*, USHORT, SfxBindings*, SfxChildWinInfo* );
+ Sd3DChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
SFX_DECL_CHILDWINDOW(Sd3DChildWindow);
};
diff --git a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
index 25932045a7c2..fdae5e97ef25 100644..100755
--- a/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
+++ b/sd/source/ui/inc/AccessibleOutlineEditSource.hxx
@@ -74,7 +74,7 @@ namespace accessibility
virtual SfxBroadcaster& GetBroadcaster() const;
// the view forwarder
- virtual BOOL IsValid() const;
+ virtual sal_Bool IsValid() const;
virtual Rectangle GetVisArea() const;
virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const;
virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const;
diff --git a/sd/source/ui/inc/AccessibleSlideView.hxx b/sd/source/ui/inc/AccessibleSlideView.hxx
index 921c64c536a3..10cdf3804eb4 100644..100755
--- a/sd/source/ui/inc/AccessibleSlideView.hxx
+++ b/sd/source/ui/inc/AccessibleSlideView.hxx
@@ -193,7 +193,7 @@ public:
void SetPageVisible( sal_uInt16 nPage, sal_Bool bVisible );
void Reset();
- void FocusHasChanged( USHORT nOldFocusPage, USHORT nNewFocusPage );
+ void FocusHasChanged( sal_uInt16 nOldFocusPage, sal_uInt16 nNewFocusPage );
private:
diff --git a/sd/source/ui/inc/AccessibleTreeNode.hxx b/sd/source/ui/inc/AccessibleTreeNode.hxx
index 7df371456c0e..cf27a99c9a98 100644..100755
--- a/sd/source/ui/inc/AccessibleTreeNode.hxx
+++ b/sd/source/ui/inc/AccessibleTreeNode.hxx
@@ -97,30 +97,6 @@ public:
const ::rtl::OUString& rsDescription,
sal_Int16 eRole);
- /** Use this variant of the constructor when the accessible parent is
- non-standard.
- @param rxParent
- The accessible parent that will be returned by
- getAccessibleParent() and that is used for computing relative
- coordinates.
- @param rNode
- The TreeNode to make accessible.
- @param rsName
- The accessible name that will be returned by getAccessibleName().
- @param rsDescription
- The accessible description that will be returned by
- getAccessibleDescription().
- @param eRole
- The role that will be returned by getAccessibleRole().
- */
- AccessibleTreeNode(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> & rxParent,
- ::sd::toolpanel::TreeNode& rNode,
- const ::rtl::OUString& rsName,
- const ::rtl::OUString& rsDescription,
- sal_Int16 eRole);
-
void FireAccessibleEvent (
short nEventId,
const ::com::sun::star::uno::Any& rOldValue,
diff --git a/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx
index 7c3fe45abc27..b81800741dbf 100644
--- a/sd/source/ui/inc/AccessibleViewForwarder.hxx
+++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx
@@ -66,7 +66,7 @@ public:
@return
Return <true/> if the view forwarder is valid and <false/> else.
*/
- virtual BOOL IsValid (void) const;
+ virtual sal_Bool IsValid (void) const;
/** Returns the area of the underlying document that is visible in the
* corresponding window.
@@ -124,7 +124,7 @@ public:
protected:
SdrPaintView* mpView;
- USHORT mnWindowId;
+ sal_uInt16 mnWindowId;
OutputDevice& mrDevice;
private:
diff --git a/sd/source/ui/inc/AnimationChildWindow.hxx b/sd/source/ui/inc/AnimationChildWindow.hxx
index 8731d6600e09..fcffc6617b7b 100644..100755
--- a/sd/source/ui/inc/AnimationChildWindow.hxx
+++ b/sd/source/ui/inc/AnimationChildWindow.hxx
@@ -43,7 +43,7 @@ class AnimationChildWindow
public:
AnimationChildWindow(
::Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo*);
diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx
index 87c9a0f7c718..dd43694aa436 100644..100755
--- a/sd/source/ui/inc/BreakDlg.hxx
+++ b/sd/source/ui/inc/BreakDlg.hxx
@@ -60,8 +60,8 @@ public:
::Window* pWindow,
DrawView* pDrView,
DrawDocShell* pShell,
- ULONG nSumActionCount,
- ULONG nObjCount);
+ sal_uLong nSumActionCount,
+ sal_uLong nObjCount);
virtual ~BreakDlg();
short Execute();
@@ -78,7 +78,7 @@ private:
CancelButton aBtnCancel;
DrawView* pDrView;
- BOOL bCancel;
+ sal_Bool bCancel;
Timer aTimer;
SvdProgressInfo *pProgrInfo;
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 28f6b04d3db9..94fd29678c08 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -50,6 +50,7 @@ class SfxPrinter;
struct SdrDocumentStreamInfo;
struct SpellCallbackInfo;
class AbstractSvxNameDialog;
+class SfxUndoManager;
namespace sd {
@@ -70,46 +71,46 @@ public:
DrawDocShell (
SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED,
- BOOL bSdDataObj=FALSE,
+ sal_Bool bSdDataObj=sal_False,
DocumentType=DOCUMENT_TYPE_IMPRESS);
DrawDocShell (
const sal_uInt64 nModelCreationFlags,
- BOOL bSdDataObj=FALSE,
+ sal_Bool bSdDataObj=sal_False,
DocumentType=DOCUMENT_TYPE_IMPRESS);
DrawDocShell (
SdDrawDocument* pDoc,
SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED,
- BOOL bSdDataObj=FALSE,
+ sal_Bool bSdDataObj=sal_False,
DocumentType=DOCUMENT_TYPE_IMPRESS);
virtual ~DrawDocShell();
void UpdateRefDevice();
- virtual void Activate( BOOL bMDI );
- virtual void Deactivate( BOOL bMDI );
- virtual BOOL InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
- virtual sal_Bool ImportFrom( SfxMedium &rMedium );
- virtual BOOL ConvertFrom( SfxMedium &rMedium );
- virtual BOOL Save();
- virtual BOOL SaveAsOwnFormat( SfxMedium& rMedium );
- virtual BOOL ConvertTo( SfxMedium &rMedium );
- virtual BOOL SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual void Activate( sal_Bool bMDI );
+ virtual void Deactivate( sal_Bool bMDI );
+ virtual sal_Bool InitNew( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
+ virtual sal_Bool ConvertFrom( SfxMedium &rMedium );
+ virtual sal_Bool Save();
+ virtual sal_Bool SaveAsOwnFormat( SfxMedium& rMedium );
+ virtual sal_Bool ConvertTo( SfxMedium &rMedium );
+ virtual sal_Bool SaveCompleted( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage );
virtual sal_Bool Load( SfxMedium &rMedium );
virtual sal_Bool LoadFrom( SfxMedium& rMedium );
virtual sal_Bool SaveAs( SfxMedium &rMedium );
- virtual Rectangle GetVisArea(USHORT nAspect) const;
- virtual void Draw(OutputDevice*, const JobSetup& rSetup, USHORT nAspect = ASPECT_CONTENT);
- virtual SfxUndoManager* GetUndoManager();
+ virtual Rectangle GetVisArea(sal_uInt16 nAspect) const;
+ virtual void Draw(OutputDevice*, const JobSetup& rSetup, sal_uInt16 nAspect = ASPECT_CONTENT);
+ virtual ::svl::IUndoManager*
+ GetUndoManager();
virtual Printer* GetDocumentPrinter();
virtual void OnDocumentPrinterChanged(Printer* pNewPrinter);
virtual SfxStyleSheetBasePool* GetStyleSheetPool();
virtual void SetOrganizerSearchMask(SfxStyleSheetBasePool* pBasePool) const;
virtual Size GetFirstPageSize();
virtual void FillClass(SvGlobalName* pClassName, sal_uInt32* pFormat, String* pAppName, String* pFullTypeName, String* pShortTypeName, sal_Int32 nFileFormat, sal_Bool bTemplate = sal_False ) const;
- virtual void SetModified( BOOL = TRUE );
+ virtual void SetModified( sal_Bool = sal_True );
using SotObject::GetInterface;
using SfxObjectShell::GetVisArea;
@@ -123,11 +124,11 @@ public:
SdDrawDocument* GetDoc();
DocumentType GetDocumentType() const { return meDocType; }
- SfxPrinter* GetPrinter(BOOL bCreate);
+ SfxPrinter* GetPrinter(sal_Bool bCreate);
void SetPrinter(SfxPrinter *pNewPrinter);
void UpdateFontList();
- BOOL IsInDestruction() const { return mbInDestruction; }
+ sal_Bool IsInDestruction() const { return mbInDestruction; }
void CancelSearching();
@@ -138,9 +139,9 @@ public:
void Disconnect(sd::ViewShell* pViewSh);
void UpdateTablePointers();
- BOOL GotoBookmark(const String& rBookmark);
+ sal_Bool GotoBookmark(const String& rBookmark);
- Bitmap GetPagePreviewBitmap(SdPage* pPage, USHORT nMaxEdgePixel);
+ Bitmap GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel);
/** checks, if the given name is a valid new name for a slide
@@ -153,17 +154,17 @@ public:
@param rName the new name that is to be set for a slide. This string
may be set to an empty string (see below).
- @return TRUE, if the new name is unique. Note that if the user entered
+ @return sal_True, if the new name is unique. Note that if the user entered
a default name of a not-yet-existing slide (e.g. 'Slide 17'),
- TRUE is returned, but rName is set to an empty string.
+ sal_True is returned, but rName is set to an empty string.
*/
- BOOL CheckPageName(::Window* pWin, String& rName );
+ sal_Bool CheckPageName(::Window* pWin, String& rName );
- void SetSlotFilter(BOOL bEnable = FALSE, USHORT nCount = 0, const USHORT* pSIDs = NULL) { mbFilterEnable = bEnable; mnFilterCount = nCount; mpFilterSIDs = pSIDs; }
+ void SetSlotFilter(sal_Bool bEnable = sal_False, sal_uInt16 nCount = 0, const sal_uInt16* pSIDs = NULL) { mbFilterEnable = bEnable; mnFilterCount = nCount; mpFilterSIDs = pSIDs; }
void ApplySlotFilter() const;
- UINT16 GetStyleFamily() const { return mnStyleFamily; }
- void SetStyleFamily( UINT16 nSF ) { mnStyleFamily = nSF; }
+ sal_uInt16 GetStyleFamily() const { return mnStyleFamily; }
+ void SetStyleFamily( sal_uInt16 nSF ) { mnStyleFamily = nSF; }
/** executes the SID_OPENDOC slot to let the framework open a document
with the given URL and this document as a referer */
@@ -217,18 +218,18 @@ protected:
FontList* mpFontList;
::sd::FunctionReference mxDocShellFunction;
DocumentType meDocType;
- UINT16 mnStyleFamily;
- const USHORT* mpFilterSIDs;
- USHORT mnFilterCount;
- BOOL mbFilterEnable;
- BOOL mbSdDataObj;
- BOOL mbInDestruction;
- BOOL mbOwnPrinter;
- BOOL mbNewDocument;
+ sal_uInt16 mnStyleFamily;
+ const sal_uInt16* mpFilterSIDs;
+ sal_uInt16 mnFilterCount;
+ sal_Bool mbFilterEnable;
+ sal_Bool mbSdDataObj;
+ sal_Bool mbInDestruction;
+ sal_Bool mbOwnPrinter;
+ sal_Bool mbNewDocument;
bool mbOwnDocument; // if true, we own mpDoc and will delete it in our d'tor
void Construct(bool bClipboard);
- virtual void InPlaceActivate( BOOL bActive );
+ virtual void InPlaceActivate( sal_Bool bActive );
};
#ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 4943da811f69..e3c42fb8e828 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -133,7 +133,7 @@ public:
void HidePage();
- virtual BOOL KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
virtual void MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin);
@@ -160,12 +160,12 @@ public:
void SelectionHasChanged();
void ModelHasChanged();
- virtual void Activate(BOOL bIsMDIActivate);
- virtual void Deactivate(BOOL IsMDIActivate);
+ virtual void Activate(sal_Bool bIsMDIActivate);
+ virtual void Deactivate(sal_Bool IsMDIActivate);
virtual void UIActivating( SfxInPlaceClient* );
virtual void UIDeactivated( SfxInPlaceClient* );
- virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
- virtual BOOL HasSelection( BOOL bText = TRUE ) const;
+ virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
+ virtual sal_Bool HasSelection( sal_Bool bText = sal_True ) const;
void ExecCtrl(SfxRequest& rReq);
void GetCtrlState(SfxItemSet& rSet);
@@ -230,13 +230,13 @@ public:
const Ruler& rRuler,
const MouseEvent& rMEvt);
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
PageKind GetPageKind() { return mePageKind; }
Point GetMousePos() { return maMousePos; }
- BOOL IsMousePosFreezed() { return mbMousePosFreezed; }
- void SetMousePosFreezed( BOOL bIn ) { mbMousePosFreezed = bIn; }
+ sal_Bool IsMousePosFreezed() { return mbMousePosFreezed; }
+ void SetMousePosFreezed( sal_Bool bIn ) { mbMousePosFreezed = bIn; }
EditMode GetEditMode() const { return meEditMode; }
virtual SdPage* GetActualPage() { return mpActualPage; }
@@ -246,20 +246,20 @@ public:
void ResetActualPage();
void ResetActualLayer();
- BOOL SwitchPage(USHORT nPage);
- BOOL IsSwitchPageAllowed() const;
+ sal_Bool SwitchPage(sal_uInt16 nPage);
+ sal_Bool IsSwitchPageAllowed() const;
- BOOL GotoBookmark(const String& rBookmark);
+ sal_Bool GotoBookmark(const String& rBookmark);
void MakeVisible(const Rectangle& rRect, ::Window& rWin);
virtual void ReadFrameViewData(FrameView* pView);
virtual void WriteFrameViewData();
virtual ErrCode DoVerb(long nVerb);
- virtual BOOL ActivateObject(SdrOle2Obj* pObj, long nVerb);
+ virtual sal_Bool ActivateObject(SdrOle2Obj* pObj, long nVerb);
- void SetZoomOnPage( BOOL bZoom = TRUE ) { mbZoomOnPage = bZoom; }
- BOOL IsZoomOnPage() { return mbZoomOnPage; }
+ void SetZoomOnPage( sal_Bool bZoom = sal_True ) { mbZoomOnPage = bZoom; }
+ sal_Bool IsZoomOnPage() { return mbZoomOnPage; }
void CheckLineTo (SfxRequest& rReq);
void FuTemp01(SfxRequest& rReq);
void FuTemp02(SfxRequest& rReq);
@@ -271,9 +271,9 @@ public:
void LockInput();
void UnlockInput();
- BOOL IsInputLocked() const { return mnLockCount > 0UL; }
+ sal_Bool IsInputLocked() const { return mnLockCount > 0UL; }
- USHORT GetCurPageId() { return( maTabControl.GetCurPageId() ); }
+ sal_uInt16 GetCurPageId() { return( maTabControl.GetCurPageId() ); }
/** Show controls of the UI or hide them, depending on the given flag.
Do not call this method directly. Call the method at ViewShellBase
@@ -285,12 +285,12 @@ public:
bool IsLayerModeActive (void) const;
- USHORT* GetSlotArray() const { return mpSlotArray; }
+ sal_uInt16* GetSlotArray() const { return mpSlotArray; }
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow, USHORT nPage, USHORT nLayer );
+ ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow, USHORT nPage, USHORT nLayer );
+ ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
@@ -354,7 +354,7 @@ public:
<p>Implemented in <code>drviews8.cxx</code>.</p>
*/
- bool RenameSlide( USHORT nPageId, const String & rName );
+ bool RenameSlide( sal_uInt16 nPageId, const String & rName );
/** modifies the given layer with the given values */
void ModifyLayer( SdrLayer* pLayer, const String& rLayerName, const String& rLayerTitle, const String& rLayerDesc, bool bIsVisible, bool bIsLocked, bool bIsPrintable );
@@ -373,18 +373,18 @@ protected:
SdPage* mpActualPage;
Rectangle maMarkRect;
Point maMousePos;
- BOOL mbMousePosFreezed;
+ sal_Bool mbMousePosFreezed;
TabControl maTabControl;
EditMode meEditMode;
PageKind mePageKind;
- BOOL mbZoomOnPage;
- BOOL mbIsRulerDrag;
- ULONG mnLockCount;
+ sal_Bool mbZoomOnPage;
+ sal_Bool mbIsRulerDrag;
+ sal_uLong mnLockCount;
Timer maCloseTimer;
- BOOL mbReadOnly;
- USHORT* mpSlotArray;
+ sal_Bool mbReadOnly;
+ sal_uInt16* mpSlotArray;
- static BOOL mbPipette;
+ static sal_Bool mbPipette;
DECL_LINK( ClipboardChanged, TransferableDataHelper* );
DECL_LINK( CloseHdl, Timer* pTimer );
@@ -395,7 +395,7 @@ protected:
void DeleteActualPage();
void DeleteActualLayer();
- virtual SvxRuler* CreateHRuler(::sd::Window* pWin, BOOL bIsFirst);
+ virtual SvxRuler* CreateHRuler(::sd::Window* pWin, sal_Bool bIsFirst);
virtual SvxRuler* CreateVRuler(::sd::Window* pWin);
virtual void UpdateHRuler();
virtual void UpdateVRuler();
@@ -404,13 +404,13 @@ protected:
virtual Size GetOptimalSizePixel() const;
void SetupPage( Size &rSize, long nLeft, long nRight, long nUpper, long nLower,
- BOOL bSize, BOOL bMargin, BOOL bScaleAll );
+ sal_Bool bSize, sal_Bool bMargin, sal_Bool bScaleAll );
- USHORT GetIdBySubId( USHORT nSId );
- void MapSlot( USHORT nSId );
- void UpdateToolboxImages( SfxItemSet &rSet, BOOL bPermanent = TRUE );
- USHORT GetMappedSlot( USHORT nSId );
- USHORT GetArrayId( USHORT nSId );
+ sal_uInt16 GetIdBySubId( sal_uInt16 nSId );
+ void MapSlot( sal_uInt16 nSId );
+ void UpdateToolboxImages( SfxItemSet &rSet, sal_Bool bPermanent = sal_True );
+ sal_uInt16 GetMappedSlot( sal_uInt16 nSId );
+ sal_uInt16 GetArrayId( sal_uInt16 nSId );
void GetMenuStateSel(SfxItemSet& rSet);
@@ -444,12 +444,13 @@ private:
virtual SdPage* CreateOrDuplicatePage (
SfxRequest& rRequest,
PageKind ePageKind,
- SdPage* pPage);
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition = -1);
::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager > mxScannerManager;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > mxScannerListener;
TransferableClipboardListener* mpClipEvtLstnr;
- BOOL mbPastePossible;
+ sal_Bool mbPastePossible;
virtual void Notify (SfxBroadcaster& rBC, const SfxHint& rHint);
@@ -484,7 +485,7 @@ private:
*/
void ShowSnapLineContextMenu (
SdrPageView& rPageView,
- const USHORT nSnapLineIndex,
+ const sal_uInt16 nSnapLineIndex,
const Point& rMouseLocation);
using ViewShell::Notify;
diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx
index 857a1486d700..058880e9da4c 100644..100755
--- a/sd/source/ui/inc/FrameView.hxx
+++ b/sd/source/ui/inc/FrameView.hxx
@@ -78,17 +78,17 @@ public:
{ maPrintableLayers = rPrintableLayers; }
const SetOfByte& GetPrintableLayers() { return maPrintableLayers; }
- void SetRuler(const BOOL bRulerOn)
+ void SetRuler(const sal_Bool bRulerOn)
{ mbRuler = bRulerOn; }
- BOOL HasRuler() const { return mbRuler; }
+ sal_Bool HasRuler() const { return mbRuler; }
- void SetNoColors(const BOOL bNoCol)
+ void SetNoColors(const sal_Bool bNoCol)
{ mbNoColors = bNoCol; }
- BOOL IsNoColors() const { return mbNoColors; }
+ sal_Bool IsNoColors() const { return mbNoColors; }
- void SetNoAttribs(const BOOL bNoAttr)
+ void SetNoAttribs(const sal_Bool bNoAttr)
{ mbNoAttribs = bNoAttr; }
- BOOL IsNoAttribs() const { return mbNoAttribs; }
+ sal_Bool IsNoAttribs() const { return mbNoAttribs; }
void SetVisArea(const Rectangle& rVisArea)
{ maVisArea = rVisArea; }
@@ -104,15 +104,15 @@ public:
/** can be used to get the page kind that was selected on last save of this document */
PageKind GetPageKindOnLoad() const { return mePageKindOnLoad; }
- SD_DLLPUBLIC void SetSelectedPage (USHORT nPage);
- USHORT GetSelectedPage () const;
+ SD_DLLPUBLIC void SetSelectedPage (sal_uInt16 nPage);
+ sal_uInt16 GetSelectedPage () const;
/** is used in FrameView::ReadUserDataSequence() only to store the
page that was selected while last saving this document */
- void SetSelectedPageOnLoad (USHORT nPage) { mnSelectedPageOnLoad = nPage; }
+ void SetSelectedPageOnLoad (sal_uInt16 nPage) { mnSelectedPageOnLoad = nPage; }
/** can be used to get the page that was selected on last save of this document */
- USHORT GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
+ sal_uInt16 GetSelectedPageOnLoad () const { return mnSelectedPageOnLoad; }
SD_DLLPUBLIC void SetViewShEditMode(EditMode eMode, PageKind eKind);
EditMode GetViewShEditMode (PageKind eKind);
@@ -127,22 +127,22 @@ public:
*/
EditMode GetViewShEditModeOnLoad (void) const;
- void SetLayerMode(BOOL bMode)
+ void SetLayerMode(sal_Bool bMode)
{ mbLayerMode = bMode; }
- BOOL IsLayerMode() const { return mbLayerMode; }
+ sal_Bool IsLayerMode() const { return mbLayerMode; }
- void SetQuickEdit(BOOL bQEdit)
+ void SetQuickEdit(sal_Bool bQEdit)
{ mbQuickEdit = bQEdit; }
- BOOL IsQuickEdit() const { return mbQuickEdit; }
+ sal_Bool IsQuickEdit() const { return mbQuickEdit; }
- void SetBigHandles( BOOL bOn = TRUE ) { mbBigHandles = bOn; }
- BOOL IsBigHandles() const { return mbBigHandles; }
+ void SetBigHandles( sal_Bool bOn = sal_True ) { mbBigHandles = bOn; }
+ sal_Bool IsBigHandles() const { return mbBigHandles; }
- void SetDoubleClickTextEdit( BOOL bOn = TRUE ) { mbDoubleClickTextEdit = bOn; }
- BOOL IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
+ void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { mbDoubleClickTextEdit = bOn; }
+ sal_Bool IsDoubleClickTextEdit() const { return mbDoubleClickTextEdit; }
- void SetClickChangeRotation( BOOL bOn = TRUE ) { mbClickChangeRotation = bOn; }
- BOOL IsClickChangeRotation() const { return mbClickChangeRotation; }
+ void SetClickChangeRotation( sal_Bool bOn = sal_True ) { mbClickChangeRotation = bOn; }
+ sal_Bool IsClickChangeRotation() const { return mbClickChangeRotation; }
/** Remember the type of the view shell that was (or soon will be)
previously associated with this frame view.
@@ -164,18 +164,18 @@ public:
ViewShell::ShellType GetViewShellTypeOnLoad (void) const;
- void SetPresentationViewShellId(USHORT nId)
+ void SetPresentationViewShellId(sal_uInt16 nId)
{ mnPresViewShellId = nId; }
- USHORT GetPresentationViewShellId() const { return mnPresViewShellId; }
+ sal_uInt16 GetPresentationViewShellId() const { return mnPresViewShellId; }
- void SetSlotId(USHORT nId) { mnSlotId = nId; }
- USHORT GetSlotId() const { return mnSlotId; }
+ void SetSlotId(sal_uInt16 nId) { mnSlotId = nId; }
+ sal_uInt16 GetSlotId() const { return mnSlotId; }
- void SetSlidesPerRow(USHORT nSlides) { mnSlidesPerRow = nSlides; }
- USHORT GetSlidesPerRow() const { return mnSlidesPerRow; }
+ void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
+ sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
- void SetDrawMode(ULONG nNewDrawMode) { mnDrawMode = nNewDrawMode; };
- ULONG GetDrawMode() const { return mnDrawMode; };
+ void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
+ sal_uLong GetDrawMode() const { return mnDrawMode; };
void SetTabCtrlPercent( double nPercent ) { mnTabCtrlPercent = nPercent; }
double GetTabCtrlPercent() const { return mnTabCtrlPercent; }
@@ -187,35 +187,35 @@ public:
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
private:
- USHORT mnRefCount;
+ sal_uInt16 mnRefCount;
VirtualDevice* mpVDev;
- BOOL mbRuler;
+ sal_Bool mbRuler;
SetOfByte maVisibleLayers;
SetOfByte maLockedLayers;
SetOfByte maPrintableLayers;
SdrHelpLineList maStandardHelpLines;
SdrHelpLineList maNotesHelpLines;
SdrHelpLineList maHandoutHelpLines;
- BOOL mbNoColors; // Gliederungsmodus
- BOOL mbNoAttribs; // Gliederungsmodus
+ sal_Bool mbNoColors; // Gliederungsmodus
+ sal_Bool mbNoAttribs; // Gliederungsmodus
Rectangle maVisArea; // Sichtbarer Bereich
PageKind mePageKind; // Seitentyp (Standard, Notizen, Handzettel)
- USHORT mnSelectedPage; // Selektierte Seite
+ sal_uInt16 mnSelectedPage; // Selektierte Seite
PageKind mePageKindOnLoad;
- USHORT mnSelectedPageOnLoad;
+ sal_uInt16 mnSelectedPageOnLoad;
EditMode meStandardEditMode; // Editmode im Zeichenmodus (Page/MasterPage)
EditMode meNotesEditMode; // Editmode im Notizen-Modus (Page/MasterPage)
EditMode meHandoutEditMode; // Editmode im Handzettel-Modus (Page/MasterPage)
EditMode meEditModeOnLoad;
- BOOL mbLayerMode; // Layer an/aus
- BOOL mbQuickEdit; // QuickEdit an/aus
- BOOL mbBigHandles; // Grosse Handles
- BOOL mbDoubleClickTextEdit; // Textmodus nach Doppelklick
- BOOL mbClickChangeRotation; // Einfachklick wechselt Selektions-/Rotationsmodus
- USHORT mnPresViewShellId; // ViewShell aus der die Pres. gestartet wurde
- USHORT mnSlotId; // SlotId, welche initial ausgefuehrt wird
- USHORT mnSlidesPerRow; // Dias pro Reihe auf dem Diatisch
- ULONG mnDrawMode; // Drawmode fuer das normale Fenster
+ sal_Bool mbLayerMode; // Layer an/aus
+ sal_Bool mbQuickEdit; // QuickEdit an/aus
+ sal_Bool mbBigHandles; // Grosse Handles
+ sal_Bool mbDoubleClickTextEdit; // Textmodus nach Doppelklick
+ sal_Bool mbClickChangeRotation; // Einfachklick wechselt Selektions-/Rotationsmodus
+ sal_uInt16 mnPresViewShellId; // ViewShell aus der die Pres. gestartet wurde
+ sal_uInt16 mnSlotId; // SlotId, welche initial ausgefuehrt wird
+ sal_uInt16 mnSlidesPerRow; // Dias pro Reihe auf dem Diatisch
+ sal_uLong mnDrawMode; // Drawmode fuer das normale Fenster
double mnTabCtrlPercent;
/** Remember whether the navigator shows all shapes (<TRUE/>) or only
the names ones (<FALSE/>). Not persistent.
diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx
index 4e36f7447862..dd65edb9e032 100644..100755
--- a/sd/source/ui/inc/GraphicDocShell.hxx
+++ b/sd/source/ui/inc/GraphicDocShell.hxx
@@ -57,12 +57,12 @@ public:
GraphicDocShell (
SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED,
- BOOL bSdDataObj=FALSE,
+ sal_Bool bSdDataObj=sal_False,
DocumentType=DOCUMENT_TYPE_DRAW);
GraphicDocShell (
const sal_uInt64 nModelCreationFlags,
- BOOL bSdDataObj=FALSE,
+ sal_Bool bSdDataObj=sal_False,
DocumentType=DOCUMENT_TYPE_DRAW);
virtual ~GraphicDocShell (void);
diff --git a/sd/source/ui/inc/GraphicObjectBar.hxx b/sd/source/ui/inc/GraphicObjectBar.hxx
index cbb3f212e6c3..83f5ac973ef2 100644..100755
--- a/sd/source/ui/inc/GraphicObjectBar.hxx
+++ b/sd/source/ui/inc/GraphicObjectBar.hxx
@@ -58,7 +58,7 @@ public:
protected:
::sd::View* mpView;
ViewShell* mpViewSh;
- USHORT nMappedSlotFilter;
+ sal_uInt16 nMappedSlotFilter;
};
diff --git a/sd/source/ui/inc/LayerDialogChildWindow.hxx b/sd/source/ui/inc/LayerDialogChildWindow.hxx
index 71c42d81a419..eef560299890 100644..100755
--- a/sd/source/ui/inc/LayerDialogChildWindow.hxx
+++ b/sd/source/ui/inc/LayerDialogChildWindow.hxx
@@ -42,7 +42,7 @@ class LayerDialogChildWindow
public:
LayerDialogChildWindow (
::Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo*);
virtual ~LayerDialogChildWindow (void);
diff --git a/sd/source/ui/inc/LayerDialogContent.hxx b/sd/source/ui/inc/LayerDialogContent.hxx
index e9910284c19d..2e05094fdde1 100644
--- a/sd/source/ui/inc/LayerDialogContent.hxx
+++ b/sd/source/ui/inc/LayerDialogContent.hxx
@@ -50,7 +50,7 @@ public:
virtual ~LayerDialogContent (void);
protected:
- virtual BOOL Close (void);
+ virtual sal_Bool Close (void);
virtual void Resize (void);
private:
diff --git a/sd/source/ui/inc/NavigatorChildWindow.hxx b/sd/source/ui/inc/NavigatorChildWindow.hxx
index 7eca616dc332..1fdc828b9bb2 100644..100755
--- a/sd/source/ui/inc/NavigatorChildWindow.hxx
+++ b/sd/source/ui/inc/NavigatorChildWindow.hxx
@@ -48,7 +48,7 @@ class NavigatorChildWindow
public:
NavigatorChildWindow (
::Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo*);
diff --git a/sd/source/ui/inc/NotesChildWindow.hxx b/sd/source/ui/inc/NotesChildWindow.hxx
index fc2f8151e2fe..8287a2af5a52 100644..100755
--- a/sd/source/ui/inc/NotesChildWindow.hxx
+++ b/sd/source/ui/inc/NotesChildWindow.hxx
@@ -44,7 +44,7 @@ class NotesChildWindow
: public SfxChildWindow
{
public:
- NotesChildWindow (::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
+ NotesChildWindow (::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
virtual ~NotesChildWindow (void);
SFX_DECL_CHILDWINDOW (NotesChildWindow);
diff --git a/sd/source/ui/inc/OutlineBulletDlg.hxx b/sd/source/ui/inc/OutlineBulletDlg.hxx
index 83e452532086..9e41e23f49c0 100644..100755
--- a/sd/source/ui/inc/OutlineBulletDlg.hxx
+++ b/sd/source/ui/inc/OutlineBulletDlg.hxx
@@ -55,14 +55,14 @@ public:
const SfxItemSet* GetOutputItemSet() const;
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
private:
using SfxTabDialog::GetOutputItemSet;
SfxItemSet aInputSet;
SfxItemSet *pOutputSet;
- BOOL bTitle;
+ sal_Bool bTitle;
::sd::View *pSdView;
};
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 919f10b9ba8f..fe9d0cfecaa8 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -122,12 +122,12 @@ public:
DECL_LINK( EndDropHdl, void * );
DECL_LINK( PaintingFirstLineHdl, PaintFirstLineInfo* );
- ULONG GetPaperWidth() const { return 2*21000; } // DIN A4 Breite
+ sal_uLong GetPaperWidth() const { return 2*21000; } // DIN A4 Breite
- BOOL PrepareClose(BOOL bUI = TRUE);
+ sal_Bool PrepareClose(sal_Bool bUI = sal_True);
- virtual BOOL GetAttributes( SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE ) const;
- virtual BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll = FALSE);
+ virtual sal_Bool GetAttributes( SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr=sal_False ) const;
+ virtual sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll = sal_False);
void FillOutliner();
void SetLinks();
@@ -141,14 +141,14 @@ public:
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND);
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
virtual sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND);
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
// Re-implement GetScriptType for this view to get correct results
@@ -166,7 +166,7 @@ public:
/** creates and inserts an empty slide for the given paragraph. */
SdPage* InsertSlideForParagraph( Paragraph* pPara );
- void UpdateParagraph( USHORT nPara );
+ void UpdateParagraph( sal_uInt16 nPara );
protected:
virtual void OnBeginPasteOrDrop( PasteOrDropInfos* pInfos );
@@ -194,10 +194,10 @@ private:
List* mpOldParaOrder;
List* mpSelectedParas;
- USHORT mnPagesToProcess; // fuer die Fortschrittsanzeige
- USHORT mnPagesProcessed;
+ sal_uInt16 mnPagesToProcess; // fuer die Fortschrittsanzeige
+ sal_uInt16 mnPagesProcessed;
- BOOL mbFirstPaint;
+ sal_Bool mbFirstPaint;
SfxProgress* mpProgress;
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 31eb6d124fe6..5ab47639437c 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -81,7 +81,7 @@ public:
*/
virtual void ArrangeGUIElements (void);
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
virtual long VirtHScrollHdl(ScrollBar* pHScroll);
virtual long VirtVScrollHdl(ScrollBar* pVHScroll);
@@ -89,18 +89,14 @@ public:
virtual void AddWindow(::sd::Window* pWin);
virtual void RemoveWindow(::sd::Window* pWin);
- virtual void Activate( BOOL IsMDIActivate );
- virtual void Deactivate( BOOL IsMDIActivate );
+ virtual void Activate( sal_Bool IsMDIActivate );
+ virtual void Deactivate( sal_Bool IsMDIActivate );
virtual SdPage* GetActualPage();
/// inherited from sd::ViewShell
virtual SdPage* getCurrentPage() const;
- /** Return a string that describes the currently selected pages.
- */
- String GetPageRangeString (void);
-
void ExecCtrl(SfxRequest &rReq);
void GetCtrlState(SfxItemSet &rSet);
void GetMenuState(SfxItemSet &rSet);
@@ -117,8 +113,8 @@ public:
virtual void SetZoom(long nZoom);
virtual void SetZoomRect(const Rectangle& rZoomRect);
- virtual String GetSelectionText( BOOL bCompleteWords = FALSE );
- virtual BOOL HasSelection( BOOL bText = TRUE ) const;
+ virtual String GetSelectionText( sal_Bool bCompleteWords = sal_False );
+ virtual sal_Bool HasSelection( sal_Bool bText = sal_True ) const;
void Execute(SfxRequest& rReq);
@@ -126,10 +122,10 @@ public:
virtual void WriteFrameViewData();
virtual void Command( const CommandEvent& rCEvt, ::sd::Window* pWin );
- virtual BOOL KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin);
- ULONG Read(SvStream& rInput, const String& rBaseURL, USHORT eFormat);
+ sal_uLong Read(SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat);
virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
@@ -150,7 +146,7 @@ public:
/** Update the preview to show the specified page.
*/
- virtual void UpdatePreview (SdPage* pPage, BOOL bInit = FALSE);
+ virtual void UpdatePreview (SdPage* pPage, sal_Bool bInit = sal_False);
virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController (void);
@@ -172,7 +168,7 @@ private:
OutlineView* pOlView;
SdPage* pLastPage; // Zur performanten Aufbereitung der Preview
TransferableClipboardListener* pClipEvtLstnr;
- BOOL bPastePossible;
+ sal_Bool bPastePossible;
bool mbInitialized;
void Construct (DrawDocShell* pDocSh);
diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx
index aecb3ed32098..aecb3ed32098 100644..100755
--- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx
+++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx
diff --git a/sd/source/ui/inc/PaneChildWindows.hxx b/sd/source/ui/inc/PaneChildWindows.hxx
index 1378d0afc3ed..262fbbc2f7a6 100644
--- a/sd/source/ui/inc/PaneChildWindows.hxx
+++ b/sd/source/ui/inc/PaneChildWindows.hxx
@@ -40,11 +40,11 @@ class PaneChildWindow
public:
PaneChildWindow (
::Window* pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const USHORT nDockWinTitleResId,
- const USHORT nTitleBarResId,
+ const sal_uInt16 nDockWinTitleResId,
+ const sal_uInt16 nTitleBarResId,
SfxChildAlignment eAlignment);
virtual ~PaneChildWindow (void);
};
@@ -56,7 +56,7 @@ class LeftPaneImpressChildWindow
: public PaneChildWindow
{
public:
- LeftPaneImpressChildWindow (::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
+ LeftPaneImpressChildWindow (::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
SFX_DECL_CHILDWINDOW(LeftPaneImpressChildWindow);
};
@@ -68,7 +68,7 @@ class LeftPaneDrawChildWindow
: public PaneChildWindow
{
public:
- LeftPaneDrawChildWindow (::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
+ LeftPaneDrawChildWindow (::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo*);
SFX_DECL_CHILDWINDOW(LeftPaneDrawChildWindow);
};
@@ -85,7 +85,7 @@ class ToolPanelChildWindow :public PaneChildWindow
public:
ToolPanelChildWindow(
::Window* i_pParentWindow,
- USHORT i_nId,
+ sal_uInt16 i_nId,
SfxBindings* i_pBindings,
SfxChildWinInfo* i_pChildWindowInfo );
diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx
index 8d9c928708e1..305373ae8f6f 100644
--- a/sd/source/ui/inc/PaneDockingWindow.hxx
+++ b/sd/source/ui/inc/PaneDockingWindow.hxx
@@ -36,6 +36,7 @@
#include <boost/shared_ptr.hpp>
class ToolBox;
+class SplitWindow;
namespace sd {
@@ -64,8 +65,25 @@ public:
const ::rtl::OUString& rsTitle);
virtual ~PaneDockingWindow (void);
-
virtual void StateChanged( StateChangedType nType );
+ virtual void MouseButtonDown (const MouseEvent& rEvent);
+ /** When docked the given range is passed to the parent SplitWindow.
+ */
+ void SetValidSizeRange (const Range aValidSizeRange);
+
+ enum Orientation { HorizontalOrientation, VerticalOrientation, UnknownOrientation };
+ /** When the PaneDockingWindow is docked and managed by a split window
+ it can derive its orientation from the orientation of the split
+ window and return either HorizontalOrientation or
+ VerticalOrientation.
+ Otherwise UnknownOrientation is returned.
+ */
+ Orientation GetOrientation (void) const;
+
+ /** The current height of the title bar.
+ */
+ sal_Int32 mnTitleBarHeight;
+
};
} // end of namespace ::sd
diff --git a/sd/source/ui/inc/PresentationViewShell.hxx b/sd/source/ui/inc/PresentationViewShell.hxx
index 4d787708a00f..ae304499b398 100644..100755
--- a/sd/source/ui/inc/PresentationViewShell.hxx
+++ b/sd/source/ui/inc/PresentationViewShell.hxx
@@ -61,13 +61,13 @@ public:
virtual void Resize (void);
protected:
- virtual SvxRuler* CreateHRuler(::sd::Window* pWin, BOOL bIsFirst);
+ virtual SvxRuler* CreateHRuler(::sd::Window* pWin, sal_Bool bIsFirst);
virtual SvxRuler* CreateVRuler(::sd::Window* pWin);
private:
Rectangle maOldVisArea;
- virtual void Activate (BOOL bIsMDIActivate);
+ virtual void Activate (sal_Bool bIsMDIActivate);
virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin);
};
diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx
index 38830c4ccdaa..db2d66b51fc5 100644..100755
--- a/sd/source/ui/inc/PreviewRenderer.hxx
+++ b/sd/source/ui/inc/PreviewRenderer.hxx
@@ -81,12 +81,16 @@ public:
ignored and the preview is rendered in normal mode. When
<TRUE/> and high contrast mode is active then the preview is
rendered in high contrast mode.
+ @param bDisplayPresentationObjects
+ When <FALSE/> then the PresObj place holders are not displayed
+ in the returned preview.
*/
Image RenderPage (
const SdPage* pPage,
const sal_Int32 nWidth,
const String& sSubstitutionText,
- const bool bObeyHighContrastMode = true);
+ const bool bObeyHighContrastMode = true,
+ const bool bDisplayPresentationObjects = true);
/** Render a page with the given pixel size.
@param pPage
@@ -102,12 +106,16 @@ public:
ignored and the preview is rendered in normal mode. When
<TRUE/> and high contrast mode is active then the preview is
rendered in high contrast mode.
+ @param bDisplayPresentationObjects
+ When <FALSE/> then the PresObj place holders are not displayed
+ in the returned preview.
*/
Image RenderPage (
const SdPage* pPage,
const Size aPreviewPixelSize,
const String& sSubstitutionText,
- const bool bObeyHighContrastMode = true);
+ const bool bObeyHighContrastMode = true,
+ const bool bDisplayPresentationObjects = true);
/** Render an image that contains the given substitution text instead of a
slide preview.
@@ -144,7 +152,9 @@ private:
const Size& rPixelSize,
const bool bObeyHighContrastMode);
void Cleanup (void);
- void PaintPage (const SdPage* pPage);
+ void PaintPage (
+ const SdPage* pPage,
+ const bool bDisplayPresentationObjects);
void PaintSubstitutionText (const String& rSubstitutionText);
void PaintFrame (void);
diff --git a/sd/source/ui/inc/Ruler.hxx b/sd/source/ui/inc/Ruler.hxx
index f278c525f22f..d86be1dec9f3 100644..100755
--- a/sd/source/ui/inc/Ruler.hxx
+++ b/sd/source/ui/inc/Ruler.hxx
@@ -54,14 +54,14 @@ public:
DrawViewShell& rViewSh,
::Window* pParent,
::sd::Window* pWin,
- USHORT nRulerFlags,
+ sal_uInt16 nRulerFlags,
SfxBindings& rBindings,
WinBits nWinStyle);
virtual ~Ruler (void);
void SetNullOffset(const Point& rOffset);
- BOOL IsHorizontal() const { return bHorz; }
+ sal_Bool IsHorizontal() const { return bHorz; }
using ::Ruler::SetNullOffset;
protected:
@@ -69,7 +69,7 @@ protected:
::sd::Window* pSdWin;
DrawViewShell* pDrViewShell;
RulerCtrlItem* pCtrlItem;
- BOOL bHorz;
+ sal_Bool bHorz;
virtual void MouseButtonDown(const MouseEvent& rMEvt);
virtual void MouseButtonUp(const MouseEvent& rMEvt);
diff --git a/sd/source/ui/inc/SlideSorter.hxx b/sd/source/ui/inc/SlideSorter.hxx
index cb0c37f0daf3..6811cf301153 100644..100755
--- a/sd/source/ui/inc/SlideSorter.hxx
+++ b/sd/source/ui/inc/SlideSorter.hxx
@@ -30,12 +30,15 @@
#define SD_SLIDESORTER_SLIDE_SORTER_HXX
#include "fupoor.hxx"
+#include "Window.hxx"
#include <com/sun/star/frame/XController.hpp>
#include <cppuhelper/weakref.hxx>
#include <sfx2/viewfrm.hxx>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
+#include <boost/current_function.hpp>
+
class ScrollBar;
class ScrollBarBox;
@@ -54,17 +57,21 @@ class SlideSorterModel;
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
+class Theme;
} } }
namespace sd { namespace slidesorter { namespace controller {
class Listener;
class SlideSorterController;
class SlotManager;
+class Properties;
} } }
-namespace sd { namespace slidesorter {
+typedef ::boost::shared_ptr<sd::Window> SharedSdWindow;
+
+namespace sd { namespace slidesorter {
/** Show previews for all the slides in a document and allow the user to
insert or delete slides and modify the order of the slides.
@@ -141,12 +148,7 @@ public:
/** Return the content window. This is a sibling and is geometrically
enclosed by the scroll bars.
*/
- ::boost::shared_ptr<sd::Window> GetContentWindow (void) const;
-
- /** Return the active window as it is returned by a view shell.
- Typically the content window.
- */
- ::sd::Window* GetActiveWindow (void) const;
+ SharedSdWindow GetContentWindow (void) const;
model::SlideSorterModel& GetModel (void) const;
@@ -190,6 +192,15 @@ public:
*/
void SetCurrentFunction (const FunctionReference& rpFunction);
+ /** Return a collection of properties that are used througout the slide
+ sorter.
+ */
+ ::boost::shared_ptr<controller::Properties> GetProperties (void) const;
+
+ /** Return the active theme wich gives access to colors and fonts.
+ */
+ ::boost::shared_ptr<view::Theme> GetTheme (void) const;
+
protected:
/** This virtual method makes it possible to create a specialization of
the slide sorter view shell that works with its own implementation
@@ -226,7 +237,8 @@ private:
::com::sun::star::uno::WeakReference<com::sun::star::frame::XController> mxControllerWeak;
ViewShell* mpViewShell;
ViewShellBase* mpViewShellBase;
- ::boost::shared_ptr<sd::Window> mpContentWindow;
+ SharedSdWindow mpContentWindow;
+ bool mbOwnesContentWindow;
::boost::shared_ptr<ScrollBar> mpHorizontalScrollBar;
::boost::shared_ptr<ScrollBar> mpVerticalScrollBar;
::boost::shared_ptr<ScrollBarBox> mpScrollBarBox;
@@ -235,6 +247,11 @@ private:
*/
bool mbLayoutPending;
+ /** Some slide sorter wide properties that are used in different
+ classes.
+ */
+ ::boost::shared_ptr<controller::Properties> mpProperties;
+ ::boost::shared_ptr<view::Theme> mpTheme;
SlideSorter (
ViewShell& rViewShell,
diff --git a/sd/source/ui/inc/SlideSorterChildWindow.hxx b/sd/source/ui/inc/SlideSorterChildWindow.hxx
index bf823c465328..a9cc77a637b1 100644..100755
--- a/sd/source/ui/inc/SlideSorterChildWindow.hxx
+++ b/sd/source/ui/inc/SlideSorterChildWindow.hxx
@@ -44,7 +44,7 @@ class SlideSorterChildWindow
public:
SlideSorterChildWindow (
::Window*,
- USHORT,
+ sal_uInt16,
SfxBindings*,
SfxChildWinInfo*);
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index a72e8ecbc9fc..f8e0bdb03e85 100644
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -58,7 +58,8 @@ public:
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
::Window* pParentWindow,
- FrameView* pFrameView);
+ FrameView* pFrameView,
+ const bool bIsCenterPane);
virtual ~SlideSorterViewShell (void);
@@ -107,9 +108,6 @@ public:
virtual void SetZoom (long int nZoom);
virtual void SetZoomRect (const Rectangle& rZoomRect);
- /// forward VCLs PrePaint window event to DrawingLayer
- virtual void PrePaint();
-
/** This is a callback method used by the active window to delegate its
Paint() call to. This view shell itself delegates it to the view.
*/
@@ -121,6 +119,8 @@ public:
*/
virtual void ArrangeGUIElements (void);
+ virtual void Activate (sal_Bool IsMDIActivate);
+
//===== Drag and Drop =====================================================
virtual void StartDrag (
@@ -132,14 +132,14 @@ public:
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND );
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND );
virtual sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND);
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
typedef ::std::vector<SdPage*> PageSelection;
@@ -193,10 +193,11 @@ protected:
/** This method is overloaded to handle a missing tool bar correctly.
This is the case when the slide sorter is not the main view shell.
*/
- virtual SfxUndoManager* ImpGetUndoManager (void) const;
+ virtual ::svl::IUndoManager* ImpGetUndoManager (void) const;
private:
::boost::shared_ptr<SlideSorter> mpSlideSorter;
+ bool mbIsArrangeGUIElementsPending;
SlideSorterViewShell (
SfxViewFrame* pFrame,
diff --git a/sd/source/ui/inc/SlideView.hxx b/sd/source/ui/inc/SlideView.hxx
index c861d7192910..af891e483039 100644
--- a/sd/source/ui/inc/SlideView.hxx
+++ b/sd/source/ui/inc/SlideView.hxx
@@ -71,35 +71,35 @@ public:
SlideViewShell* pSlideVShell);
virtual ~SlideView (void);
- void Select( USHORT nSdPageNum, BOOL bSelect );
- void SelectAllSlides( BOOL bSelect );
+ void Select( sal_uInt16 nSdPageNum, sal_Bool bSelect );
+ void SelectAllSlides( sal_Bool bSelect );
void MoveFocus( SlideViewFocusMove eMove );
- USHORT GetFocusPage() const;
- BOOL HasFocus() const;
+ sal_uInt16 GetFocusPage() const;
+ sal_Bool HasFocus() const;
- USHORT ChangePagesPerRow( USHORT nNum );
- USHORT GetPagesPerRow() const { return nPagesPerRow; }
+ sal_uInt16 ChangePagesPerRow( sal_uInt16 nNum );
+ sal_uInt16 GetPagesPerRow() const { return nPagesPerRow; }
virtual void InvalidateOneWin( ::Window& rWin );
virtual void InvalidateOneWin( ::Window& rWin, const Rectangle& rRect );
- void SetAllowInvalidate( BOOL bFlag );
- BOOL IsInvalidateAllowed() const;
+ void SetAllowInvalidate( sal_Bool bFlag );
+ sal_Bool IsInvalidateAllowed() const;
void Paint(const Rectangle& rRect, OutputDevice* pOut);
- void DrawSelectionRect(USHORT nPage);
+ void DrawSelectionRect(sal_uInt16 nPage);
- Point CalcPagePos( USHORT nPageNo ) const;
- Rectangle GetPageArea( USHORT nPageNo ) const;
- ULONG GetPageGap() const;
- Rectangle GetFadeIconArea( USHORT nPageNo ) const;
+ Point CalcPagePos( sal_uInt16 nPageNo ) const;
+ Rectangle GetPageArea( sal_uInt16 nPageNo ) const;
+ sal_uLong GetPageGap() const;
+ Rectangle GetFadeIconArea( sal_uInt16 nPageNo ) const;
SdPage* GetHitPage( const Point& rPos ) const;
SdPage* GetFadePage( const Point& rPos ) const;
SdPage* GetNearestPage( const Point& rPos ) const;
void DeleteMarked();
- void MoveMarked( USHORT nTargetPage );
+ void MoveMarked( sal_uInt16 nTargetPage );
void AddToCache( SdPage* pPage, const Bitmap& rBitmap, long nZoom );
const GraphicObject* GetFromCache( SdPage* pPage, long& rZoom, long nZoomTolerance ) const;
@@ -115,12 +115,12 @@ public:
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND );
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND );
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND );
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND );
void UpdateAllPages();
@@ -130,14 +130,14 @@ private:
SlideViewShell* pSlideViewShell;
BitmapCache* pCache;
VirtualDevice* mpVDev;
- USHORT nAllowInvalidateSmph;
- USHORT nPagesPerRow;
- USHORT nFocusPage;
- BOOL bInPaint;
- BOOL bInDelayedPaint;
+ sal_uInt16 nAllowInvalidateSmph;
+ sal_uInt16 nPagesPerRow;
+ sal_uInt16 nFocusPage;
+ sal_Bool bInPaint;
+ sal_Bool bInDelayedPaint;
DECL_LINK( PaintDelayed, Timer * );
- void CreateSlideTransferable (::Window* pWindow, BOOL bDrag);
+ void CreateSlideTransferable (::Window* pWindow, sal_Bool bDrag);
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/SlideViewShell.hxx b/sd/source/ui/inc/SlideViewShell.hxx
index 15673024ddce..c31231a3819b 100644..100755
--- a/sd/source/ui/inc/SlideViewShell.hxx
+++ b/sd/source/ui/inc/SlideViewShell.hxx
@@ -89,7 +89,7 @@ public:
virtual void AddWindow(::sd::Window* pWin) { pSlideView->AddWindowToPaintView((OutputDevice*) pWin); }
virtual void RemoveWindow(::sd::Window* pWin) { pSlideView->DeleteWindowFromPaintView((OutputDevice*) pWin); }
- virtual BOOL KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
virtual void MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin);
@@ -102,16 +102,12 @@ public:
*/
virtual SdPage* getCurrentPage() const;
- /** Return a string that describes the currently selected pages.
- */
- String GetPageRangeString (void);
-
void ExecCtrl(SfxRequest &rReq);
void GetCtrlState(SfxItemSet &rSet);
void GetMenuState(SfxItemSet &rSet);
void GetAttrState(SfxItemSet &rSet);
- void SetPagesPerRow( USHORT nPagesPerRow );
+ void SetPagesPerRow( sal_uInt16 nPagesPerRow );
void ExecStatusBar(SfxRequest& rReq);
void GetStatusBarState(SfxItemSet& rSet);
@@ -126,7 +122,7 @@ public:
virtual void SetZoom(long nZoom);
virtual void SetZoomRect(const Rectangle& rZoomRect);
- virtual BOOL HasSelection( BOOL bText = TRUE ) const;
+ virtual sal_Bool HasSelection( sal_Bool bText = sal_True ) const;
/** Draw the rectangle arround the specified slide that indicates whether
the slide is selected or not. When not selected the rectangle is
@@ -138,8 +134,8 @@ public:
@param nPage
When the page number is invalid then the call is ignored.
*/
- void DrawSelectionRect( USHORT nPage );
- void DrawFocusRect( USHORT nPage );
+ void DrawSelectionRect( sal_uInt16 nPage );
+ void DrawFocusRect( sal_uInt16 nPage );
virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
@@ -150,12 +146,12 @@ public:
void SelectionHasChanged();
void PageLayoutHasChanged();
- void FocusHasChanged( USHORT nOldFocusPage, USHORT nNewFocusPage );
- void PageVisibilityHasChanged( USHORT nPage, BOOL bVisible );
+ void FocusHasChanged( sal_uInt16 nOldFocusPage, sal_uInt16 nNewFocusPage );
+ void PageVisibilityHasChanged( sal_uInt16 nPage, sal_Bool bVisible );
/** On activation the preview is turned off.
*/
- virtual void Activate (BOOL IsMDIActivate);
+ virtual void Activate (sal_Bool IsMDIActivate);
protected:
virtual Size GetOptimalSizePixel() const;
@@ -167,12 +163,12 @@ private:
SlideView* pSlideView;
Point aDisplayPos;
Size aDisplaySize;
- USHORT nCurFocusPage;
+ sal_uInt16 nCurFocusPage;
bool bSetInitialZoomFactor;
bool bInitializeWinPos;
void Construct(SdDrawDocument* pDoc);
- void ImplDrawFocusRect( USHORT nPage, BOOL bVisible );
+ void ImplDrawFocusRect( sal_uInt16 nPage, sal_Bool bVisible );
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx
index f50391a14711..23472594df09 100644
--- a/sd/source/ui/inc/SpellDialogChildWindow.hxx
+++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx
@@ -46,7 +46,7 @@ class SpellDialogChildWindow
public:
SpellDialogChildWindow (
::Window* pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo);
virtual ~SpellDialogChildWindow (void);
diff --git a/sd/source/ui/inc/TabControl.hxx b/sd/source/ui/inc/TabControl.hxx
index 7a5bd1648e8a..081b08d231c1 100644..100755
--- a/sd/source/ui/inc/TabControl.hxx
+++ b/sd/source/ui/inc/TabControl.hxx
@@ -65,7 +65,7 @@ public:
protected:
DrawViewShell* pDrViewSh;
- BOOL bInternalMove;
+ sal_Bool bInternalMove;
// TabBar
virtual void Select();
diff --git a/sd/source/ui/inc/TemplateScanner.hxx b/sd/source/ui/inc/TemplateScanner.hxx
index 86c862a298cf..86c862a298cf 100644..100755
--- a/sd/source/ui/inc/TemplateScanner.hxx
+++ b/sd/source/ui/inc/TemplateScanner.hxx
diff --git a/sd/source/ui/inc/UpdateLockManager.hxx b/sd/source/ui/inc/UpdateLockManager.hxx
index 2f5a4df30c5f..2f5a4df30c5f 100644..100755
--- a/sd/source/ui/inc/UpdateLockManager.hxx
+++ b/sd/source/ui/inc/UpdateLockManager.hxx
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 7b7fe03f2f73..efcc6c267777 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -85,8 +85,8 @@ public:
void CompleteRedraw( OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L);
- virtual BOOL GetAttributes( SfxItemSet& rTargetSet, BOOL bOnlyHardAttr=FALSE ) const;
- virtual BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll = FALSE);
+ virtual sal_Bool GetAttributes( SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr=sal_False ) const;
+ virtual sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll = sal_False);
virtual void MarkListHasChanged();
virtual void ModelHasChanged();
virtual void SelectAll();
@@ -94,21 +94,21 @@ public:
virtual void DoCopy(::Window* pWindow=NULL);
virtual void DoPaste(::Window* pWindow=NULL);
virtual void DoConnect(SdrOle2Obj* pOleObj);
- virtual BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr = FALSE);
+ virtual sal_Bool SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr = sal_False);
virtual void StartDrag( const Point& rStartPos, ::Window* pWindow );
virtual void DragFinished( sal_Int8 nDropAction );
virtual sal_Int8 AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND);
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
virtual sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND);
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
::com::sun::star::uno::Reference<
::com::sun::star::datatransfer::XTransferable>
@@ -121,7 +121,7 @@ public:
::com::sun::star::datatransfer::XTransferable>
CreateSelectionDataObject (::sd::View*, ::Window& rWindow);
- void UpdateSelectionClipboard( BOOL bForceDeselect );
+ void UpdateSelectionClipboard( sal_Bool bForceDeselect );
inline DrawDocShell* GetDocSh (void) const;
inline SdDrawDocument* GetDoc (void) const;
@@ -135,9 +135,9 @@ public:
bool RestoreDefaultText( SdrTextObj* pTextObj );
- BOOL InsertData( const TransferableDataHelper& rDataHelper,
- const Point& rPos, sal_Int8& rDnDAction, BOOL bDrag,
- ULONG nFormat = 0, USHORT nPage = SDRPAGE_NOTFOUND, USHORT nLayer = SDRLAYER_NOTFOUND );
+ sal_Bool InsertData( const TransferableDataHelper& rDataHelper,
+ const Point& rPos, sal_Int8& rDnDAction, sal_Bool bDrag,
+ sal_uLong nFormat = 0, sal_uInt16 nPage = SDRPAGE_NOTFOUND, sal_uInt16 nLayer = SDRLAYER_NOTFOUND );
/** gets the metafile from the given transferable helper and insert it as a graphic shape.
@param bOptimize if set to true, the metafile is analyzed and if only one bitmap action is
present, then is is inserted as a single graphic.
@@ -152,25 +152,25 @@ public:
SdrMediaObj* InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAction,
const Point& rPos, const Size& rSize );
- bool PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, ULONG nPasteOptions );
+ bool PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, sal_uLong nPasteOptions );
- BOOL IsPresObjSelected(BOOL bOnPage=TRUE, BOOL bOnMasterPage=TRUE, BOOL bCheckPresObjListOnly=FALSE, BOOL bCheckLayoutOnly=FALSE) const;
+ sal_Bool IsPresObjSelected(sal_Bool bOnPage=sal_True, sal_Bool bOnMasterPage=sal_True, sal_Bool bCheckPresObjListOnly=sal_False, sal_Bool bCheckLayoutOnly=sal_False) const;
void SetMarkedOriginalSize();
- void LockRedraw(BOOL bLock);
+ void LockRedraw(sal_Bool bLock);
- BOOL IsMorphingAllowed() const;
- BOOL IsVectorizeAllowed() const;
+ sal_Bool IsMorphingAllowed() const;
+ sal_Bool IsVectorizeAllowed() const;
virtual SfxStyleSheet* GetStyleSheet() const;
- BOOL GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT nType );
+ sal_Bool GetExchangeList( List*& rpExchangeList, List* pBookmarkList, sal_uInt16 nType );
virtual void onAccessibilityOptionsChanged();
virtual SdrModel* GetMarkedObjModel() const;
- virtual BOOL Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, UINT32 nOptions=0);
+ virtual sal_Bool Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
using SdrExchangeView::Paste;
/** returns true if we have an undo manager and there is an open list undo action */
@@ -183,14 +183,14 @@ public:
void updateHandles();
virtual SdrViewContext GetContext() const;
- virtual BOOL HasMarkablePoints() const;
- virtual ULONG GetMarkablePointCount() const;
- virtual BOOL HasMarkedPoints() const;
- virtual ULONG GetMarkedPointCount() const;
- virtual BOOL IsPointMarkable(const SdrHdl& rHdl) const;
- virtual BOOL MarkPoint(SdrHdl& rHdl, BOOL bUnmark=FALSE);
+ virtual sal_Bool HasMarkablePoints() const;
+ virtual sal_uLong GetMarkablePointCount() const;
+ virtual sal_Bool HasMarkedPoints() const;
+ virtual sal_uLong GetMarkedPointCount() const;
+ virtual sal_Bool IsPointMarkable(const SdrHdl& rHdl) const;
+ virtual sal_Bool MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark=sal_False);
virtual void CheckPossibilities();
- virtual BOOL MarkPoints(const ::Rectangle* pRect, BOOL bUnmark);
+ virtual sal_Bool MarkPoints(const ::Rectangle* pRect, sal_Bool bUnmark);
using SdrMarkView::MarkPoints;
void SetPossibilitiesDirty() { bPossibilitiesDirty = true; }
@@ -217,13 +217,13 @@ protected:
SdrMarkList* mpDragSrcMarkList;
SdrObject* mpDropMarkerObj;
SdrDropMarkerOverlay* mpDropMarker;
- USHORT mnDragSrcPgNum;
+ sal_uInt16 mnDragSrcPgNum;
Point maDropPos;
::std::vector< String > maDropFileVector;
sal_Int8 mnAction;
Timer maDropErrorTimer;
Timer maDropInsertFileTimer;
- USHORT mnLockRedrawSmph;
+ sal_uInt16 mnLockRedrawSmph;
List* mpLockedRedraws;
bool mbIsDropAllowed;
diff --git a/sd/source/ui/inc/ViewClipboard.hxx b/sd/source/ui/inc/ViewClipboard.hxx
index 6dbfe46ba0dc..1362ec399f08 100644..100755
--- a/sd/source/ui/inc/ViewClipboard.hxx
+++ b/sd/source/ui/inc/ViewClipboard.hxx
@@ -71,7 +71,7 @@ protected:
/** Return an index of a page after which the pages of the transferable
are to be inserted into the target document.
*/
- virtual USHORT DetermineInsertPosition (
+ virtual sal_uInt16 DetermineInsertPosition (
const SdTransferable& rTransferable);
/** Insert the slides in the given transferable behind the last selected
@@ -84,9 +84,9 @@ protected:
@return
Returns the number of inserted slides.
*/
- virtual USHORT InsertSlides (
+ virtual sal_uInt16 InsertSlides (
const SdTransferable& rTransferable,
- USHORT nInsertPosition);
+ sal_uInt16 nInsertPosition);
};
} // end of namespace ::sd
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 98aa7e02e036..0f1a4e71edf2 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -120,8 +120,8 @@ public:
static const int MAX_VSPLIT_CNT = 1;
static const int MIN_SCROLLBAR_SIZE = 50;
- static const ULONG OUTPUT_DRAWMODE_COLOR = DRAWMODE_DEFAULT;
- static const ULONG OUTPUT_DRAWMODE_GRAYSCALE
+ static const sal_uLong OUTPUT_DRAWMODE_COLOR = DRAWMODE_DEFAULT;
+ static const sal_uLong OUTPUT_DRAWMODE_GRAYSCALE
= DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL
| DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP
| DRAWMODE_GRAYGRADIENT;
@@ -200,23 +200,23 @@ public:
// Mouse- & Key-Events
virtual void PrePaint();
virtual void Paint (const Rectangle& rRect, ::sd::Window* pWin);
- virtual BOOL KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin);
virtual void MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin);
virtual void Command(const CommandEvent& rCEvt, ::sd::Window* pWin);
- virtual BOOL RequestHelp( const HelpEvent& rEvt, ::sd::Window* pWin );
+ virtual sal_Bool RequestHelp( const HelpEvent& rEvt, ::sd::Window* pWin );
virtual long Notify( NotifyEvent& rNEvt, ::sd::Window* pWin );
- BOOL HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin);
+ virtual bool HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin);
virtual void Draw(OutputDevice &rDev, const Region &rReg);
virtual void SetUIUnit(FieldUnit eUnit);
- virtual void SetDefTabHRuler( UINT16 nDefTab );
+ virtual void SetDefTabHRuler( sal_uInt16 nDefTab );
- BOOL HasRuler (void);
- void SetRuler(BOOL bRuler);
+ sal_Bool HasRuler (void);
+ void SetRuler(sal_Bool bRuler);
/** Set internal values of all scroll bars that determine thumb size and
position. The external values like size and position of the scroll
@@ -228,13 +228,13 @@ public:
virtual void SetZoom(long nZoom);
virtual void SetZoomRect(const Rectangle& rZoomRect);
void InitWindows(const Point& rViewOrigin, const Size& rViewSize,
- const Point& rWinPos, BOOL bUpdate = FALSE);
+ const Point& rWinPos, sal_Bool bUpdate = sal_False);
void InvalidateWindows();
/** This method is still used by the OutlineViewShell to update the
model according to the content of the outline view. This in turn
updates the previews in the slide sorter.
*/
- virtual void UpdatePreview (SdPage* pPage, BOOL bInit = FALSE);
+ virtual void UpdatePreview (SdPage* pPage, sal_Bool bInit = sal_False);
void DrawMarkRect(const Rectangle& rRect) const;
@@ -254,7 +254,7 @@ public:
virtual void WriteUserData(String& rString);
virtual void ReadUserData(const String& rString);
- virtual BOOL ActivateObject(SdrOle2Obj* pObj, long nVerb);
+ virtual sal_Bool ActivateObject(SdrOle2Obj* pObj, long nVerb);
/** @returns
current or selected page or 0. This method
@@ -272,7 +272,7 @@ public:
FunctionReference GetOldFunction() const { return mxOldFunction; }
bool HasOldFunction() const { return mxOldFunction.is(); }
FunctionReference GetCurrentFunction() const { return mxCurrentFunction; }
- bool HasCurrentFunction( USHORT nSID ) { return mxCurrentFunction.is() && (mxCurrentFunction->GetSlotID() == nSID ); }
+ bool HasCurrentFunction( sal_uInt16 nSID ) { return mxCurrentFunction.is() && (mxCurrentFunction->GetSlotID() == nSID ); }
bool HasCurrentFunction() { return mxCurrentFunction.is(); }
void SetCurrentFunction(const FunctionReference& xFunction);
@@ -281,26 +281,26 @@ public:
void SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
long nLeft, long nRight, long nUpper, long nLower,
- BOOL bScaleAll, Orientation eOrient, USHORT nPaperBin,
- BOOL bBackgroundFullSize );
+ sal_Bool bScaleAll, Orientation eOrient, sal_uInt16 nPaperBin,
+ sal_Bool bBackgroundFullSize );
- void SetStartShowWithDialog( BOOL bIn = TRUE ) { mbStartShowWithDialog = bIn; }
- BOOL IsStartShowWithDialog() const { return mbStartShowWithDialog; }
+ void SetStartShowWithDialog( sal_Bool bIn = sal_True ) { mbStartShowWithDialog = bIn; }
+ sal_Bool IsStartShowWithDialog() const { return mbStartShowWithDialog; }
- USHORT GetPrintedHandoutPageNum (void) const { return mnPrintedHandoutPageNum; }
- void SetPrintedHandoutPageNum (USHORT nPageNumber) {mnPrintedHandoutPageNum=nPageNumber; }
+ sal_uInt16 GetPrintedHandoutPageNum (void) const { return mnPrintedHandoutPageNum; }
+ void SetPrintedHandoutPageNum (sal_uInt16 nPageNumber) {mnPrintedHandoutPageNum=nPageNumber; }
- USHORT GetPrintedHandoutPageCount(void) const { return mnPrintedHandoutPageCount; }
- void SetPrintedHandoutPageCount (USHORT nPageCount) {mnPrintedHandoutPageCount=nPageCount; }
+ sal_uInt16 GetPrintedHandoutPageCount(void) const { return mnPrintedHandoutPageCount; }
+ void SetPrintedHandoutPageCount (sal_uInt16 nPageCount) {mnPrintedHandoutPageCount=nPageCount; }
- virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE );
+ virtual sal_uInt16 PrepareClose( sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False );
void GetMenuState(SfxItemSet& rSet);
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow, USHORT nPage, USHORT nLayer );
+ ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow, USHORT nPage, USHORT nLayer );
+ ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer );
virtual void WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
virtual void ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool bBrowse = sal_False );
@@ -429,7 +429,7 @@ public:
As a result the border is adapted.
*/
virtual void ShowUIControls (bool bVisible = true);
- BOOL IsPageFlipMode(void) const;
+ sal_Bool IsPageFlipMode(void) const;
/** Set the given window as new parent window. This is not possible for
all views, so the return value tells the caller if the relocation
@@ -440,6 +440,30 @@ public:
void AdaptDefaultsForChart(
const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XEmbeddedObject > & xEmbObj );
+ /** Depending on the given request create a new page or duplicate an
+ existing one. A new page is created behind the given slide.
+ @param rRequest
+ The request as passed to an Execute() method. Its arguments are
+ evaluated. Its slot id determines whether to create or
+ duplicate a slide.
+ @param pPage
+ This page is either duplicated or becomes the predecessor of the
+ new slide. If NULL a duplication request is ignored. A new
+ slide is inserted as first slide.
+ @param nInsertPosition
+ When -1 (the default) then insert after pPage. Otherwise insert
+ before the given index (of a standard page).
+ @return
+ The new slide is returned. If for some reason a new page can
+ not be created then NULL is returned.
+ */
+ virtual SdPage* CreateOrDuplicatePage (
+ SfxRequest& rRequest,
+ PageKind ePageKind,
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition = -1);
+
+
class Implementation;
protected:
@@ -484,13 +508,13 @@ protected:
Size maViewSize;
Size maScrBarWH;
- BOOL mbCenterAllowed; // wird an Fenster weitergegeben
+ sal_Bool mbCenterAllowed; // wird an Fenster weitergegeben
- BOOL mbStartShowWithDialog; // Praesentation wurde ueber Dialog gestartet
- USHORT mnPrintedHandoutPageNum; // Page number of the handout page that is to be printed.
- USHORT mnPrintedHandoutPageCount; // Page count of the handout pages that are to be printed.
+ sal_Bool mbStartShowWithDialog; // Praesentation wurde ueber Dialog gestartet
+ sal_uInt16 mnPrintedHandoutPageNum; // Page number of the handout page that is to be printed.
+ sal_uInt16 mnPrintedHandoutPageCount; // Page count of the handout pages that are to be printed.
- //af BOOL bPrintDirectSelected; // Print only selected objects in direct print
+ //af sal_Bool bPrintDirectSelected; // Print only selected objects in direct print
//afString sPageRange; // pagerange if selected objects in direct print
/** Area covered by all windows, i.e. the area of the parent window
@@ -509,11 +533,11 @@ protected:
::std::auto_ptr<Implementation> mpImpl;
// Support methods for centralized UNDO/REDO
- virtual SfxUndoManager* ImpGetUndoManager (void) const;
+ virtual ::svl::IUndoManager* ImpGetUndoManager (void) const;
void ImpGetUndoStrings(SfxItemSet &rSet) const;
void ImpGetRedoStrings(SfxItemSet &rSet) const;
- void ImpSidUndo(BOOL bDrawViewShell, SfxRequest& rReq);
- void ImpSidRedo(BOOL bDrawViewShell, SfxRequest& rReq);
+ void ImpSidUndo(sal_Bool bDrawViewShell, SfxRequest& rReq);
+ void ImpSidRedo(sal_Bool bDrawViewShell, SfxRequest& rReq);
DECL_LINK( HScrollHdl, ScrollBar * );
DECL_LINK( VScrollHdl, ScrollBar * );
@@ -523,7 +547,7 @@ protected:
virtual long VirtVScrollHdl(ScrollBar* pVScroll);
// virtuelle Funktionen fuer Lineal-Handling
- virtual SvxRuler* CreateHRuler(::sd::Window* pWin, BOOL bIsFirst);
+ virtual SvxRuler* CreateHRuler(::sd::Window* pWin, sal_Bool bIsFirst);
virtual SvxRuler* CreateVRuler(::sd::Window* pWin);
virtual void UpdateHRuler();
virtual void UpdateVRuler();
@@ -532,31 +556,12 @@ protected:
// abgeleiteter Klassen (z.B. ein TabBar) zurueckgeben
virtual long GetHCtrlWidth();
- virtual void Activate(BOOL IsMDIActivate);
- virtual void Deactivate(BOOL IsMDIActivate);
+ virtual void Activate(sal_Bool IsMDIActivate);
+ virtual void Deactivate(sal_Bool IsMDIActivate);
virtual void SetZoomFactor( const Fraction &rZoomX,
const Fraction &rZoomY );
- /** Depending on the given request create a new page or duplicate an
- existing one. A new page is created behind the given slide.
- @param rRequest
- The request as passed to an Execute() method. Its arguments are
- evaluated. Its slot id determines whether to create or
- duplicate a slide.
- @param pPage
- This page is either duplicated or becomes the predecessor of the
- new slide. If NULL a duplication request is ignored. A new
- slide is inserted as first slide.
- @return
- The new slide is returned. If for some reason a new page can
- not be created then NULL is returned.
- */
- virtual SdPage* CreateOrDuplicatePage (
- SfxRequest& rRequest,
- PageKind ePageKind,
- SdPage* pPage);
-
private:
::Window* mpParentWindow;
/** This window updater is used to keep all relevant windows up to date
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 18f6a14c2a1f..26355e41baeb 100644
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -137,32 +137,18 @@ public:
virtual com::sun::star::uno::Reference<com::sun::star::view::XRenderable> GetRenderable (void);
/// Forwarded to the print manager.
- virtual SfxPrinter* GetPrinter (BOOL bCreate = FALSE);
+ virtual SfxPrinter* GetPrinter (sal_Bool bCreate = sal_False);
/// Forwarded to the print manager.
- virtual USHORT SetPrinter (
+ virtual sal_uInt16 SetPrinter (
SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false);
-
- /// Forwarded to the print manager.
- virtual PrintDialog* CreatePrintDialog (::Window *pParent);
+ sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false);
/// Forwarded to the print manager.
virtual SfxTabPage* CreatePrintOptionsPage (
::Window *pParent,
const SfxItemSet &rOptions);
- /// Forwarded to the print manager.
- virtual USHORT Print (SfxProgress& rProgress, BOOL bIsAPI, PrintDialog* pDialog);
-
- /// Forwarded to the print manager.
- virtual ErrCode DoPrint (
- SfxPrinter *pPrinter,
- PrintDialog *pPrintDialog,
- BOOL bSilent, BOOL bIsAPI );
-
- virtual void PreparePrint (PrintDialog* pPrintDialog);
-
/// Forward methods to main sub shell.
virtual void WriteUserDataSequence (
::com::sun::star::uno::Sequence <
@@ -180,14 +166,14 @@ public:
virtual void UIActivating( SfxInPlaceClient* );
virtual void UIDeactivated( SfxInPlaceClient* );
- virtual void Activate (BOOL IsMDIActivate);
- virtual void Deactivate (BOOL IsMDIActivate);
+ virtual void Activate (sal_Bool IsMDIActivate);
+ virtual void Deactivate (sal_Bool IsMDIActivate);
virtual void SetZoomFactor (
const Fraction &rZoomX,
const Fraction &rZoomY);
- virtual USHORT PrepareClose (BOOL bUI = TRUE, BOOL bForBrowsing = FALSE);
- virtual void WriteUserData (String&, BOOL bBrowse = FALSE);
- virtual void ReadUserData (const String&, BOOL bBrowse = FALSE);
+ virtual sal_uInt16 PrepareClose (sal_Bool bUI = sal_True, sal_Bool bForBrowsing = sal_False);
+ virtual void WriteUserData (String&, sal_Bool bBrowse = sal_False);
+ virtual void ReadUserData (const String&, sal_Bool bBrowse = sal_False);
virtual SdrView* GetDrawView (void) const;
virtual void AdjustPosSizePixel (const Point &rOfs, const Size &rSize);
diff --git a/sd/source/ui/inc/ViewTabControl.hxx b/sd/source/ui/inc/ViewTabControl.hxx
index 7f4e955a7532..4cc1bddf472c 100644..100755
--- a/sd/source/ui/inc/ViewTabControl.hxx
+++ b/sd/source/ui/inc/ViewTabControl.hxx
@@ -65,7 +65,7 @@ public:
protected:
DrawViewShell* pDrViewSh;
- BOOL bInternalMove;
+ sal_Bool bInternalMove;
// TabBar
virtual void Select();
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx
index 9cf51d4a5b95..0f2cd228bdff 100644
--- a/sd/source/ui/inc/Window.hxx
+++ b/sd/source/ui/inc/Window.hxx
@@ -140,7 +140,7 @@ public:
larger than the view or the value of aWinPos in this direction is -1
then the window is centered in this direction.
*/
- void UpdateMapOrigin (BOOL bInvalidate = TRUE);
+ void UpdateMapOrigin (sal_Bool bInvalidate = sal_True);
void UpdateMapMode (void);
@@ -171,11 +171,12 @@ protected:
Point maWinPos;
Point maViewOrigin;
Size maViewSize;
- Size maPrevSize; // contains previous window size in logical coords
- USHORT mnMinZoom;
- USHORT mnMaxZoom;
+ sal_uInt16 mnMinZoom;
+ sal_uInt16 mnMaxZoom;
+
+ sal_uInt16 mnMaxZoom;
/** This flag tells whether to re-calculate the minimal zoom factor
- depening on the current zoom factor. Its default value is now FALSE.
+ depening on the current zoom factor. Its default value is now sal_False.
*/
bool mbMinZoomAutoCalc;
bool mbCalcMinZoomByMinSide;
diff --git a/sd/source/ui/inc/animobjs.hrc b/sd/source/ui/inc/animobjs.hrc
index 5c5c8e7852cc..1a6d8291ee59 100644..100755
--- a/sd/source/ui/inc/animobjs.hrc
+++ b/sd/source/ui/inc/animobjs.hrc
@@ -47,3 +47,6 @@
#define LB_ADJUSTMENT 2
#define LB_LOOP_COUNT 3
#define GRP_ANIMATION_GROUP 2
+//IAccessibility2 Implementation 2009-----
+#define STR_DISPLAY 1
+//-----IAccessibility2 Implementation 2009
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 0de7dac8ad8a..5f6c60e231b8 100644
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -107,7 +107,7 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
protected:
- virtual BOOL Close();
+ virtual sal_Bool Close();
virtual void Resize();
virtual void FillInfo( SfxChildWinInfo& ) const;
@@ -121,21 +121,20 @@ private:
NumericField aNumFldBitmap;
TimeField aTimeField;
ListBox aLbLoopCount;
-
+ FixedLine aGrpBitmap;
ImageButton aBtnGetOneObject;
ImageButton aBtnGetAllObjects;
ImageButton aBtnRemoveBitmap;
ImageButton aBtnRemoveAll;
FixedText aFtCount;
FixedInfo aFiCount;
- FixedLine aGrpBitmap;
+ FixedLine aGrpAnimation;
RadioButton aRbtGroup;
RadioButton aRbtBitmap;
FixedText aFtAdjustment;
ListBox aLbAdjustment;
PushButton aBtnCreateGroup;
- FixedLine aGrpAnimation;
::Window* pWin;
List aBmpExList;
@@ -147,8 +146,8 @@ private:
Size aFltWinSize;
Size aDisplaySize;
Size aBmpSize;
- BOOL bMovie;
- BOOL bAllObjects;
+ sal_Bool bMovie;
+ sal_Bool bAllObjects;
SfxBindings* pBindings;
AnimationControllerItem* pControllerItem;
@@ -167,9 +166,9 @@ private:
DECL_LINK( ModifyBitmapHdl, void * );
DECL_LINK( ModifyTimeHdl, void * );
- void UpdateControl( ULONG nPos, BOOL bDisableCtrls = FALSE );
+ void UpdateControl( sal_uLong nPos, sal_Bool bDisableCtrls = sal_False );
void ResetAttrs();
- void WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
+ void WaitInEffect( sal_uLong nMilliSeconds, sal_uLong nTime,
SfxProgress* pStbMgr ) const;
Fraction GetScale();
};
@@ -184,10 +183,10 @@ class AnimationControllerItem : public SfxControllerItem
{
public:
- AnimationControllerItem( USHORT, AnimationWindow*, SfxBindings* );
+ AnimationControllerItem( sal_uInt16, AnimationWindow*, SfxBindings* );
protected:
- virtual void StateChanged( USHORT nSId, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pState );
private:
AnimationWindow* pAnimationWin;
diff --git a/sd/source/ui/inc/celltempl.hxx b/sd/source/ui/inc/celltempl.hxx
index 4a25a784d3c3..b0164eebb7a3 100644..100755
--- a/sd/source/ui/inc/celltempl.hxx
+++ b/sd/source/ui/inc/celltempl.hxx
@@ -46,7 +46,7 @@ private:
XHatchList* mpHatchingList;
XBitmapList* mpBitmapList;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual const SfxItemSet* GetRefreshedSet();
public:
diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx
index 6ef5eca2b051..e45744e39fb3 100644..100755
--- a/sd/source/ui/inc/copydlg.hxx
+++ b/sd/source/ui/inc/copydlg.hxx
@@ -63,25 +63,25 @@ private:
NumericField maNumFldCopies;
ImageButton maBtnSetViewData;
+ FixedLine maGrpMovement;
FixedText maFtMoveX;
MetricField maMtrFldMoveX;
FixedText maFtMoveY;
MetricField maMtrFldMoveY;
FixedText maFtAngle;
MetricField maMtrFldAngle;
- FixedLine maGrpMovement;
+ FixedLine maGrpEnlargement;
FixedText maFtWidth;
MetricField maMtrFldWidth;
FixedText maFtHeight;
MetricField maMtrFldHeight;
- FixedLine maGrpEnlargement;
+ FixedLine maGrpColor;
FixedText maFtStartColor;
ColorLB maLbStartColor;
FixedText maFtEndColor;
ColorLB maLbEndColor;
- FixedLine maGrpColor;
OKButton maBtnOK;
CancelButton maBtnCancel;
diff --git a/sd/source/ui/inc/custsdlg.hxx b/sd/source/ui/inc/custsdlg.hxx
index 53bfc4c6114b..18cb8d44cf10 100644..100755
--- a/sd/source/ui/inc/custsdlg.hxx
+++ b/sd/source/ui/inc/custsdlg.hxx
@@ -58,7 +58,7 @@ private:
SdDrawDocument& rDoc;
List* pCustomShowList;
SdCustomShow* pCustomShow;
- BOOL bModified;
+ sal_Bool bModified;
void CheckState();
@@ -69,8 +69,8 @@ public:
SdCustomShowDlg( Window* pWindow, SdDrawDocument& rDrawDoc );
~SdCustomShowDlg();
- BOOL IsModified() const { return( bModified ); }
- BOOL IsCustomShow() const;
+ sal_Bool IsModified() const { return( bModified ); }
+ sal_Bool IsCustomShow() const;
};
@@ -93,7 +93,7 @@ private:
SdDrawDocument& rDoc;
SdCustomShow*& rpCustomShow;
- BOOL bModified;
+ sal_Bool bModified;
String aOldName;
void CheckState();
@@ -108,7 +108,7 @@ public:
SdDrawDocument& rDrawDoc, SdCustomShow*& rpCS );
~SdDefineCustomShowDlg();
- BOOL IsModified() const { return( bModified ); }
+ sal_Bool IsModified() const { return( bModified ); }
};
#endif // _SD_CUSTSDLG_HXX
diff --git a/sd/source/ui/inc/diactrl.hxx b/sd/source/ui/inc/diactrl.hxx
index 6b84865ed65d..8c999bae9f0e 100644..100755
--- a/sd/source/ui/inc/diactrl.hxx
+++ b/sd/source/ui/inc/diactrl.hxx
@@ -65,13 +65,13 @@ public:
class SdTbxCtlDiaPages : public SfxToolBoxControl
{
public:
- virtual void StateChanged( USHORT nSID, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window *pParent );
SFX_DECL_TOOLBOX_CONTROL();
- SdTbxCtlDiaPages( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SdTbxCtlDiaPages( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SdTbxCtlDiaPages();
};
diff --git a/sd/source/ui/inc/dlg_char.hxx b/sd/source/ui/inc/dlg_char.hxx
index f5b1c3e7ff27..c977ec21cea2 100644..100755
--- a/sd/source/ui/inc/dlg_char.hxx
+++ b/sd/source/ui/inc/dlg_char.hxx
@@ -49,7 +49,7 @@ private:
const SfxItemSet& rOutAttrs;
const SfxObjectShell& rDocShell;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
diff --git a/sd/source/ui/inc/dlgass.hxx b/sd/source/ui/inc/dlgass.hxx
index ec6493513135..915c0a314dd9 100644
--- a/sd/source/ui/inc/dlgass.hxx
+++ b/sd/source/ui/inc/dlgass.hxx
@@ -49,19 +49,19 @@ private:
AssistentDlgImpl* mpImpl;
public:
- AssistentDlg(Window* pParent, BOOL bAutoPilot);
+ AssistentDlg(Window* pParent, sal_Bool bAutoPilot);
~AssistentDlg();
DECL_LINK( FinishHdl, OKButton * );
SfxObjectShellLock GetDocument();
OutputType GetOutputMedium() const;
- BOOL IsSummary() const;
+ sal_Bool IsSummary() const;
StartType GetStartType() const;
String GetDocPath() const;
- BOOL GetStartWithFlag() const;
+ sal_Bool GetStartWithFlag() const;
- BOOL IsDocEmpty() const;
+ sal_Bool IsDocEmpty() const;
String GetPassword();
};
diff --git a/sd/source/ui/inc/dlgfield.hxx b/sd/source/ui/inc/dlgfield.hxx
index e5c91aa2bb36..8750e097070a 100644..100755
--- a/sd/source/ui/inc/dlgfield.hxx
+++ b/sd/source/ui/inc/dlgfield.hxx
@@ -48,9 +48,9 @@ class SvxFieldData;
class SdModifyFieldDlg : public ModalDialog
{
private:
+ FixedLine aGrpType;
RadioButton aRbtFix;
RadioButton aRbtVar;
- FixedLine aGrpType;
FixedText maFtLanguage;
SvxLanguageBox maLbLanguage;
FixedText aFtFormat;
diff --git a/sd/source/ui/inc/dlgpage.hxx b/sd/source/ui/inc/dlgpage.hxx
index 16f95eba2c9f..4dc783797025 100644..100755
--- a/sd/source/ui/inc/dlgpage.hxx
+++ b/sd/source/ui/inc/dlgpage.hxx
@@ -39,7 +39,7 @@ class XGradientList;
class XHatchList;
class XBitmapList;
-typedef USHORT ChangeType;
+typedef sal_uInt16 ChangeType;
/*************************************************************************
|*
@@ -59,10 +59,10 @@ private:
XBitmapList* mpBitmapList;
public:
- SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, BOOL bAreaPage = TRUE );
+ SdPageDlg( SfxObjectShell* pDocSh, Window* pParent, const SfxItemSet* pAttr, sal_Bool bAreaPage = sal_True );
~SdPageDlg() {};
- virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+ virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage);
};
#endif // _SD_DLGPAGE_HXX
diff --git a/sd/source/ui/inc/dlgsnap.hxx b/sd/source/ui/inc/dlgsnap.hxx
index 163828bc14c9..1d3c5b2c0885 100644..100755
--- a/sd/source/ui/inc/dlgsnap.hxx
+++ b/sd/source/ui/inc/dlgsnap.hxx
@@ -31,7 +31,7 @@
#define _SD_DLGSNAP_HXX
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
#include <vcl/group.hxx>
@@ -82,7 +82,7 @@ public:
void HideRadioGroup();
void HideDeleteBtn() { aBtnDelete.Hide(); }
- void SetInputFields(BOOL bEnableX, BOOL bEnableY);
+ void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY);
};
diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx
index 95cd38dccd33..8da09d3b202e 100644
--- a/sd/source/ui/inc/docprev.hxx
+++ b/sd/source/ui/inc/docprev.hxx
@@ -50,7 +50,7 @@ class SD_DLLPUBLIC SdDocPreviewWin : public Control, public SfxListener
{
protected:
GDIMetaFile* pMetaFile;
- BOOL bInEffect;
+ sal_Bool bInEffect;
Link aClickHdl;
SfxObjectShell* mpObj;
sal_uInt16 mnShowPage;
diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx
index 57eed72e3c32..4d4819f5b4c2 100644..100755
--- a/sd/source/ui/inc/drawview.hxx
+++ b/sd/source/ui/inc/drawview.hxx
@@ -61,14 +61,14 @@ public:
virtual void MarkListHasChanged();
void CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L);
- virtual BOOL SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll = FALSE);
+ virtual sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll = sal_False);
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
- void BlockPageOrderChangedHint(BOOL bBlock);
+ void BlockPageOrderChangedHint(sal_Bool bBlock);
- BOOL SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr = FALSE);
- virtual BOOL IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const;
+ sal_Bool SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr = sal_False);
+ virtual sal_Bool IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const;
virtual void MakeVisible(const Rectangle& rRect, ::Window& rWin);
virtual void HideSdrPage(); // SdrPageView* pPV);
@@ -86,7 +86,7 @@ private:
DrawViewShell* mpDrawViewShell;
VirtualDevice* mpVDev;
- USHORT mnPOCHSmph; // zum blockieren des PageOrderChangedHint
+ sal_uInt16 mnPOCHSmph; // zum blockieren des PageOrderChangedHint
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/framework/Configuration.hxx b/sd/source/ui/inc/framework/Configuration.hxx
index 6367c058581b..6367c058581b 100644..100755
--- a/sd/source/ui/inc/framework/Configuration.hxx
+++ b/sd/source/ui/inc/framework/Configuration.hxx
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index 8c081cc52eed..92b96ad28e21 100644
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -224,14 +224,23 @@ public:
/** Request the activation of the specified task panel in the standard
task pane.
+ @param rsTaskPanelURL
+ The panel that is to be activated.
+ @param bEnsureTaskPaneIsVisible
+ When this is <TRUE/> then the task pane is activated when not
+ yet active.
+ When this flag is <FALSE/> then the requested panel
+ is activated only when the task pane is already active. When it
+ is not active then this call is silently ignored.
*/
void RequestTaskPanel (
- const ::rtl::OUString& rsTaskPanelURL);
+ const ::rtl::OUString& rsTaskPanelURL,
+ const bool bEnsureTaskPaneIsVisible = true);
/** Process a slot call that requests a view shell change.
*/
void HandleModeChangeSlot (
- ULONG nSlotId,
+ sal_uLong nSlotId,
SfxRequest& rRequest);
/** Run the given callback when the specified event is notified by the
diff --git a/sd/source/ui/inc/framework/Pane.hxx b/sd/source/ui/inc/framework/Pane.hxx
index 89de980fe5f9..89de980fe5f9 100644..100755
--- a/sd/source/ui/inc/framework/Pane.hxx
+++ b/sd/source/ui/inc/framework/Pane.hxx
diff --git a/sd/source/ui/inc/fucon3d.hxx b/sd/source/ui/inc/fucon3d.hxx
index 5ed599ee655d..7e150242c2b1 100644..100755
--- a/sd/source/ui/inc/fucon3d.hxx
+++ b/sd/source/ui/inc/fucon3d.hxx
@@ -48,10 +48,10 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sd/source/ui/inc/fuconarc.hxx b/sd/source/ui/inc/fuconarc.hxx
index 1cc3d905d08b..3b6a81ccc439 100644..100755
--- a/sd/source/ui/inc/fuconarc.hxx
+++ b/sd/source/ui/inc/fuconarc.hxx
@@ -44,10 +44,10 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sd/source/ui/inc/fuconbez.hxx b/sd/source/ui/inc/fuconbez.hxx
index eae3766e0bfc..17de46f41aa8 100644..100755
--- a/sd/source/ui/inc/fuconbez.hxx
+++ b/sd/source/ui/inc/fuconbez.hxx
@@ -51,18 +51,18 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
virtual void SelectionHasChanged();
- void SetEditMode(USHORT nMode);
- USHORT GetEditMode() { return nEditMode; }
+ void SetEditMode(sal_uInt16 nMode);
+ sal_uInt16 GetEditMode() { return nEditMode; }
virtual SdrObject* CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rRectangle);
@@ -74,7 +74,7 @@ protected:
SdDrawDocument* pDoc,
SfxRequest& rReq);
- USHORT nEditMode;
+ sal_uInt16 nEditMode;
::com::sun::star::uno::Any maTargets; // used for creating a path for custom animations
};
diff --git a/sd/source/ui/inc/fuconcs.hxx b/sd/source/ui/inc/fuconcs.hxx
index 16de1c7c7e1c..258fb2109551 100644..100755
--- a/sd/source/ui/inc/fuconcs.hxx
+++ b/sd/source/ui/inc/fuconcs.hxx
@@ -55,10 +55,10 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
diff --git a/sd/source/ui/inc/fuconrec.hxx b/sd/source/ui/inc/fuconrec.hxx
index 5ef72160cb8c..f4d1115b481e 100644..100755
--- a/sd/source/ui/inc/fuconrec.hxx
+++ b/sd/source/ui/inc/fuconrec.hxx
@@ -55,10 +55,10 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sd/source/ui/inc/fuconstr.hxx b/sd/source/ui/inc/fuconstr.hxx
index 62b57f733a34..5b81a220410e 100644
--- a/sd/source/ui/inc/fuconstr.hxx
+++ b/sd/source/ui/inc/fuconstr.hxx
@@ -54,15 +54,15 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
- virtual void SelectionHasChanged() { bSelectionChanged = TRUE; }
+ virtual void SelectionHasChanged() { bSelectionChanged = sal_True; }
// SJ: setting stylesheet, the use of a filled or unfilled style
// is determined by the member nSlotId :
diff --git a/sd/source/ui/inc/fuconuno.hxx b/sd/source/ui/inc/fuconuno.hxx
index 3aff612ff8b2..972b503f4641 100644..100755
--- a/sd/source/ui/inc/fuconuno.hxx
+++ b/sd/source/ui/inc/fuconuno.hxx
@@ -50,10 +50,10 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -71,8 +71,8 @@ protected:
String aOldLayer;
private:
- UINT32 nInventor;
- UINT16 nIdentifier;
+ sal_uInt32 nInventor;
+ sal_uInt16 nIdentifier;
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/fudraw.hxx b/sd/source/ui/inc/fudraw.hxx
index 26c332f392dd..b364b97bd80b 100644
--- a/sd/source/ui/inc/fudraw.hxx
+++ b/sd/source/ui/inc/fudraw.hxx
@@ -49,11 +49,11 @@ class FuDraw
public:
TYPEINFO();
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BOOL RequestHelp(const HelpEvent& rHEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool RequestHelp(const HelpEvent& rHEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -65,10 +65,10 @@ public:
virtual void DoubleClick(const MouseEvent& rMEvt);
- BOOL SetPointer(SdrObject* pObj, const Point& rPos);
- BOOL SetHelpText(SdrObject* pObj, const Point& rPos, const SdrViewEvent& rVEvt);
+ sal_Bool SetPointer(SdrObject* pObj, const Point& rPos);
+ sal_Bool SetHelpText(SdrObject* pObj, const Point& rPos, const SdrViewEvent& rVEvt);
- void SetPermanent(BOOL bSet) { bPermanent = bSet; }
+ void SetPermanent(sal_Bool bSet) { bPermanent = bSet; }
/** is called when the currenct function should be aborted. <p>
This is used when a function gets a KEY_ESCAPE but can also
@@ -89,10 +89,10 @@ protected:
Pointer aNewPointer;
Pointer aOldPointer;
- BOOL bMBDown;
- BOOL bDragHelpLine;
- USHORT nHelpLine;
- BOOL bPermanent;
+ sal_Bool bMBDown;
+ sal_Bool bDragHelpLine;
+ sal_uInt16 nHelpLine;
+ sal_Bool bPermanent;
};
diff --git a/sd/source/ui/inc/fudspord.hxx b/sd/source/ui/inc/fudspord.hxx
index 3167d95e6f7f..80508f36ac4a 100644..100755
--- a/sd/source/ui/inc/fudspord.hxx
+++ b/sd/source/ui/inc/fudspord.hxx
@@ -53,9 +53,9 @@ public:
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
diff --git a/sd/source/ui/inc/fuediglu.hxx b/sd/source/ui/inc/fuediglu.hxx
index 82a9e50fd60f..af2c49672179 100644..100755
--- a/sd/source/ui/inc/fuediglu.hxx
+++ b/sd/source/ui/inc/fuediglu.hxx
@@ -49,11 +49,11 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BOOL Command(const CommandEvent& rCEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool Command(const CommandEvent& rCEvt);
virtual void ReceiveRequest(SfxRequest& rReq);
virtual void Activate(); // Function aktivieren
diff --git a/sd/source/ui/inc/fuformatpaintbrush.hxx b/sd/source/ui/inc/fuformatpaintbrush.hxx
index 1eb9a3223fc0..e2c05d12b111 100644..100755
--- a/sd/source/ui/inc/fuformatpaintbrush.hxx
+++ b/sd/source/ui/inc/fuformatpaintbrush.hxx
@@ -46,23 +46,23 @@ public:
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
virtual void Activate();
virtual void Deactivate();
static void GetMenuState( DrawViewShell& rDrawViewShell, SfxItemSet &rSet );
- static bool CanCopyThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier );
+ static bool CanCopyThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier );
private:
FuFormatPaintBrush ( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq);
void DoExecute( SfxRequest& rReq );
- bool HasContentForThisType( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const;
+ bool HasContentForThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const;
void Paste( bool, bool );
void implcancel();
diff --git a/sd/source/ui/inc/fuhhconv.hxx b/sd/source/ui/inc/fuhhconv.hxx
index 65eab16ea831..48f23b81cd32 100644..100755
--- a/sd/source/ui/inc/fuhhconv.hxx
+++ b/sd/source/ui/inc/fuhhconv.hxx
@@ -43,12 +43,12 @@ class FuHangulHanjaConversion : public FuPoor
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- void StartConversion( INT16 nSourceLanguage, INT16 nTargetLanguage,
- const Font *pTargetFont, INT32 nOptions, BOOL bIsInteractive );
+ void StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+ const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive );
void StartChineseConversion();
- void ConvertStyles( INT16 nTargetLanguage, const Font *pTargetFont );
+ void ConvertStyles( sal_Int16 nTargetLanguage, const Font *pTargetFont );
Outliner* GetOutliner() const { return pSdOutliner; }
@@ -56,7 +56,7 @@ class FuHangulHanjaConversion : public FuPoor
~FuHangulHanjaConversion();
Outliner* pSdOutliner;
- BOOL bOwnOutliner;
+ sal_Bool bOwnOutliner;
private:
FuHangulHanjaConversion (
diff --git a/sd/source/ui/inc/fuinsfil.hxx b/sd/source/ui/inc/fuinsfil.hxx
index 16d4bb0f346a..bad7d3a24f03 100644..100755
--- a/sd/source/ui/inc/fuinsfil.hxx
+++ b/sd/source/ui/inc/fuinsfil.hxx
@@ -61,9 +61,9 @@ private:
String aFile; // gewaehlter Dateiname
void InsTextOrRTFinOlMode(SfxMedium* pMedium);
- BOOL InsSDDinOlMode(SfxMedium* pMedium);
+ sal_Bool InsSDDinOlMode(SfxMedium* pMedium);
void InsTextOrRTFinDrMode(SfxMedium* pMedium);
- BOOL InsSDDinDrMode(SfxMedium* pMedium);
+ sal_Bool InsSDDinDrMode(SfxMedium* pMedium);
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/fumorph.hxx b/sd/source/ui/inc/fumorph.hxx
index 7773d69dca89..47312109aa6f 100644..100755
--- a/sd/source/ui/inc/fumorph.hxx
+++ b/sd/source/ui/inc/fumorph.hxx
@@ -59,7 +59,7 @@ private:
SdDrawDocument* pDoc,
SfxRequest& rReq);
- void ImpInsertPolygons(List& rPolyPolyList3D, BOOL bAttributeFade,
+ void ImpInsertPolygons(List& rPolyPolyList3D, sal_Bool bAttributeFade,
const SdrObject* pObj1, const SdrObject* pObj2);
::basegfx::B2DPolyPolygon* ImpCreateMorphedPolygon(
const ::basegfx::B2DPolyPolygon& rPolyPolyStart,
diff --git a/sd/source/ui/inc/fuoltext.hxx b/sd/source/ui/inc/fuoltext.hxx
index e3a248d5bdec..88812258eea7 100644..100755
--- a/sd/source/ui/inc/fuoltext.hxx
+++ b/sd/source/ui/inc/fuoltext.hxx
@@ -53,10 +53,10 @@ public:
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void DoCut();
virtual void DoCopy();
diff --git a/sd/source/ui/inc/fuoutl.hxx b/sd/source/ui/inc/fuoutl.hxx
index eb513c58403c..99a01295777c 100644
--- a/sd/source/ui/inc/fuoutl.hxx
+++ b/sd/source/ui/inc/fuoutl.hxx
@@ -55,7 +55,7 @@ class FuOutline
public:
TYPEINFO();
- virtual BOOL Command(const CommandEvent& rCEvt);
+ virtual sal_Bool Command(const CommandEvent& rCEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx
index 9d010c68eb4f..598ca1c7e3b7 100644
--- a/sd/source/ui/inc/fupoor.hxx
+++ b/sd/source/ui/inc/fupoor.hxx
@@ -76,16 +76,16 @@ public:
virtual void DoCopy();
virtual void DoPaste();
- // Mouse- & Key-Events; Returnwert=TRUE: Event wurde bearbeitet
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& );
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
+ // Mouse- & Key-Events; Returnwert=sal_True: Event wurde bearbeitet
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& );
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
// moved from inline to *.cxx
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual BOOL Command(const CommandEvent& rCEvt);
- virtual BOOL RequestHelp(const HelpEvent& rHEvt);
+ virtual sal_Bool Command(const CommandEvent& rCEvt);
+ virtual sal_Bool RequestHelp(const HelpEvent& rHEvt);
virtual void Paint(const Rectangle&, ::sd::Window* );
virtual void ReceiveRequest(SfxRequest& rReq);
@@ -99,10 +99,10 @@ public:
virtual void SelectionHasChanged();
- USHORT GetSlotID() const { return( nSlotId ); }
- USHORT GetSlotValue() const { return( nSlotValue ); }
+ sal_uInt16 GetSlotID() const { return( nSlotId ); }
+ sal_uInt16 GetSlotValue() const { return( nSlotValue ); }
- void SetNoScrollUntilInside(BOOL bNoScroll = TRUE)
+ void SetNoScrollUntilInside(sal_Bool bNoScroll = sal_True)
{ bNoScrollUntilInside = bNoScroll; }
void StartDelayToScrollTimer ();
@@ -167,8 +167,8 @@ protected:
DrawDocShell* mpDocSh;
SdDrawDocument* mpDoc;
- USHORT nSlotId;
- USHORT nSlotValue;
+ sal_uInt16 nSlotId;
+ sal_uInt16 nSlotValue;
Dialog* pDialog;
@@ -178,19 +178,19 @@ protected:
Timer aDragTimer; // fuer Drag&Drop
DECL_LINK( DragHdl, Timer * );
- BOOL bIsInDragMode;
+ sal_Bool bIsInDragMode;
Point aMDPos; // Position von MouseButtonDown
// Flag, um AutoScrolling zu verhindern, bis von ausserhalb in das
// Fenster hinein gedragt wurde
- BOOL bNoScrollUntilInside;
+ sal_Bool bNoScrollUntilInside;
// Timer um das scrolling zu verzoegern, wenn aus dem fenster
// herausgedraggt wird (ca. 1 sec.)
Timer aDelayToScrollTimer; // fuer Verzoegerung bis scroll
- BOOL bScrollable;
- BOOL bDelayActive;
- BOOL bFirstMouseMove;
+ sal_Bool bScrollable;
+ sal_Bool bDelayActive;
+ sal_Bool bFirstMouseMove;
// member to hold state of the mouse buttons for creation
// of own MouseEvents (like in ScrollHdl)
diff --git a/sd/source/ui/inc/fusearch.hxx b/sd/source/ui/inc/fusearch.hxx
index 3bbededb5331..cce5d4af30e9 100644..100755
--- a/sd/source/ui/inc/fusearch.hxx
+++ b/sd/source/ui/inc/fusearch.hxx
@@ -54,7 +54,7 @@ protected:
virtual ~FuSearch (void);
::sd::Outliner* pSdOutliner;
- BOOL bOwnOutliner;
+ sal_Bool bOwnOutliner;
private:
FuSearch (
diff --git a/sd/source/ui/inc/fusel.hxx b/sd/source/ui/inc/fusel.hxx
index 3aab29ff0c61..55ec9c0db2de 100644..100755
--- a/sd/source/ui/inc/fusel.hxx
+++ b/sd/source/ui/inc/fusel.hxx
@@ -50,20 +50,20 @@ public:
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
virtual void SelectionHasChanged();
- void SetEditMode(USHORT nMode);
- USHORT GetEditMode() { return nEditMode; }
+ void SetEditMode(sal_uInt16 nMode);
+ sal_uInt16 GetEditMode() { return nEditMode; }
- BOOL AnimateObj(SdrObject* pObj, const Point& rPos);
+ sal_Bool AnimateObj(SdrObject* pObj, const Point& rPos);
/** is called when the currenct function should be aborted. <p>
This is used when a function gets a KEY_ESCAPE but can also
@@ -82,13 +82,13 @@ protected:
virtual ~FuSelection();
- BOOL bTempRotation;
- BOOL bSelectionChanged;
- BOOL bHideAndAnimate;
+ sal_Bool bTempRotation;
+ sal_Bool bSelectionChanged;
+ sal_Bool bHideAndAnimate;
SdrHdl* pHdl;
- BOOL bSuppressChangesOfSelection;
- BOOL bMirrorSide0;
- USHORT nEditMode;
+ sal_Bool bSuppressChangesOfSelection;
+ sal_Bool bMirrorSide0;
+ sal_uInt16 nEditMode;
::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
private:
diff --git a/sd/source/ui/inc/fuslid.hxx b/sd/source/ui/inc/fuslid.hxx
index 6e17e21d3941..6d5529058dfc 100644..100755
--- a/sd/source/ui/inc/fuslid.hxx
+++ b/sd/source/ui/inc/fuslid.hxx
@@ -54,9 +54,9 @@ public:
static FunctionReference Create( SlideViewShell* pViewSh, ::sd::Window* pWin, SlideView* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void ScrollStart();
virtual void ScrollEnd();
diff --git a/sd/source/ui/inc/futext.hxx b/sd/source/ui/inc/futext.hxx
index b22cf719174e..f68c9bece7c1 100644..100755
--- a/sd/source/ui/inc/futext.hxx
+++ b/sd/source/ui/inc/futext.hxx
@@ -56,20 +56,20 @@ public:
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
virtual void DoExecute( SfxRequest& rReq );
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual BOOL Command(const CommandEvent& rCEvt);
- virtual BOOL RequestHelp(const HelpEvent& rHEvt);
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool Command(const CommandEvent& rCEvt);
+ virtual sal_Bool RequestHelp(const HelpEvent& rHEvt);
virtual void ReceiveRequest(SfxRequest& rReq);
virtual void DoubleClick(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
- void SetInEditMode(const MouseEvent& rMEvt, BOOL bQuickDrag);
- BOOL DeleteDefaultText();
+ void SetInEditMode(const MouseEvent& rMEvt, sal_Bool bQuickDrag);
+ sal_Bool DeleteDefaultText();
SdrTextObj* GetTextObj() { return static_cast< SdrTextObj* >( mxTextObj.get() ); }
DECL_LINK(SpellError, void* );
@@ -97,7 +97,7 @@ protected:
SdrObjectWeakRef mxTextObj;
Link aOldLink;
- BOOL bFirstObjCreated;
+ sal_Bool bFirstObjCreated;
SfxRequest& rRequest;
diff --git a/sd/source/ui/inc/fuzoom.hxx b/sd/source/ui/inc/fuzoom.hxx
index 793f073a9cb9..b79a46307066 100644..100755
--- a/sd/source/ui/inc/fuzoom.hxx
+++ b/sd/source/ui/inc/fuzoom.hxx
@@ -34,7 +34,7 @@
namespace sd {
-extern USHORT SidArrayZoom[];
+extern sal_uInt16 SidArrayZoom[];
class FuZoom
: public FuPoor
@@ -45,9 +45,9 @@ public:
static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
// Mouse- & Key-Events
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
virtual void Activate(); // Function aktivieren
virtual void Deactivate(); // Function deaktivieren
@@ -59,8 +59,8 @@ protected:
Point aBeginPos;
Point aEndPos;
Rectangle aZoomRect;
- BOOL bVisible;
- BOOL bStartDrag;
+ sal_Bool bVisible;
+ sal_Bool bStartDrag;
Pointer aPtr;
private:
diff --git a/sd/source/ui/inc/gluectrl.hxx b/sd/source/ui/inc/gluectrl.hxx
index 93cf110f0a47..dec20da87d5e 100644..100755
--- a/sd/source/ui/inc/gluectrl.hxx
+++ b/sd/source/ui/inc/gluectrl.hxx
@@ -60,16 +60,16 @@ public:
class SdTbxCtlGlueEscDir: public SfxToolBoxControl
{
private:
- UINT16 GetEscDirPos( UINT16 nEscDir );
+ sal_uInt16 GetEscDirPos( sal_uInt16 nEscDir );
public:
- virtual void StateChanged( USHORT nSId, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pState );
virtual Window* CreateItemWindow( Window *pParent );
SFX_DECL_TOOLBOX_CONTROL();
- SdTbxCtlGlueEscDir( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SdTbxCtlGlueEscDir( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SdTbxCtlGlueEscDir() {}
};
diff --git a/sd/source/ui/inc/ins_paste.hxx b/sd/source/ui/inc/ins_paste.hxx
index 1a35860235c0..173e57bbe9b8 100644..100755
--- a/sd/source/ui/inc/ins_paste.hxx
+++ b/sd/source/ui/inc/ins_paste.hxx
@@ -54,7 +54,7 @@ public:
SdInsertPasteDlg( Window* pWindow );
~SdInsertPasteDlg();
- BOOL IsInsertBefore() const;
+ sal_Bool IsInsertBefore() const;
};
#endif // _SD_INS_PASTE_HXX_
diff --git a/sd/source/ui/inc/inspagob.hxx b/sd/source/ui/inc/inspagob.hxx
index b84792d8476f..7a112df17e9b 100644..100755
--- a/sd/source/ui/inc/inspagob.hxx
+++ b/sd/source/ui/inc/inspagob.hxx
@@ -61,9 +61,9 @@ public:
const String& rFileName );
~SdInsertPagesObjsDlg();
- List* GetList( USHORT nType );
- BOOL IsLink();
- BOOL IsRemoveUnnessesaryMasterPages() const;
+ List* GetList( sal_uInt16 nType );
+ sal_Bool IsLink();
+ sal_Bool IsRemoveUnnessesaryMasterPages() const;
};
diff --git a/sd/source/ui/inc/masterlayoutdlg.hxx b/sd/source/ui/inc/masterlayoutdlg.hxx
index 73affd4caa9d..30e06713f675 100644..100755
--- a/sd/source/ui/inc/masterlayoutdlg.hxx
+++ b/sd/source/ui/inc/masterlayoutdlg.hxx
@@ -55,10 +55,10 @@ private:
OKButton maPBOK;
CancelButton maPBCancel;
- BOOL mbOldHeader;
- BOOL mbOldFooter;
- BOOL mbOldDate;
- BOOL mbOldPageNumber;
+ sal_Bool mbOldHeader;
+ sal_Bool mbOldFooter;
+ sal_Bool mbOldDate;
+ sal_Bool mbOldPageNumber;
void applyChanges();
void remove( PresObjKind eKind );
diff --git a/sd/source/ui/inc/morphdlg.hxx b/sd/source/ui/inc/morphdlg.hxx
index 141170475627..6e762754ed4f 100644..100755
--- a/sd/source/ui/inc/morphdlg.hxx
+++ b/sd/source/ui/inc/morphdlg.hxx
@@ -29,7 +29,7 @@
#ifndef SD_MORPH_DLG_HXX
#define SD_MORPH_DLG_HXX
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/group.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
@@ -50,9 +50,9 @@ public:
virtual ~MorphDlg (void);
void SaveSettings() const;
- USHORT GetFadeSteps() const { return (USHORT) aMtfSteps.GetValue(); }
- BOOL IsAttributeFade() const { return aCbxAttributes.IsChecked(); }
- BOOL IsOrientationFade() const { return aCbxOrientation.IsChecked(); }
+ sal_uInt16 GetFadeSteps() const { return (sal_uInt16) aMtfSteps.GetValue(); }
+ sal_Bool IsAttributeFade() const { return aCbxAttributes.IsChecked(); }
+ sal_Bool IsOrientationFade() const { return aCbxOrientation.IsChecked(); }
private:
FixedLine aGrpPreset;
diff --git a/sd/source/ui/inc/navigatr.hrc b/sd/source/ui/inc/navigatr.hrc
index 74a6490257d2..9f9f4a9df814 100644..100755
--- a/sd/source/ui/inc/navigatr.hrc
+++ b/sd/source/ui/inc/navigatr.hrc
@@ -25,6 +25,9 @@
*
************************************************************************/
#define FLT_NAVIGATOR 575
+//IAccessibility2 Implementation 2009-----
+#define STR_OBJECTS_TREE (FLT_NAVIGATOR+1)
+//-----IAccessibility2 Implementation 2009
#define TLB_OBJECTS 1
#define TBI_PEN 2
#define TBI_FIRST 3
@@ -40,3 +43,7 @@
#define LB_DOCS 1
#define IL_NAVIGATR 333
+//IAccessibility2 Implementation 2009-----
+#define STR_DRAGMODE 1
+//-----IAccessibility2 Implementation 2009
+
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 448371be528e..bc1ebceeee11 100644..100755
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -72,16 +72,16 @@ class NavDocInfo
public:
NavDocInfo() { mpDocShell = NULL; }
- BOOL HasName() { return( (BOOL) bName ); }
- BOOL IsActive() { return( (BOOL) bActive ); }
+ sal_Bool HasName() { return( (sal_Bool) bName ); }
+ sal_Bool IsActive() { return( (sal_Bool) bActive ); }
- void SetName( BOOL bOn = TRUE ) { bName = bOn; }
- void SetActive( BOOL bOn = TRUE ) { bActive = bOn; }
+ void SetName( sal_Bool bOn = sal_True ) { bName = bOn; }
+ void SetActive( sal_Bool bOn = sal_True ) { bActive = bOn; }
private:
friend class SdNavigatorWin;
- BOOL bName : 1;
- BOOL bActive : 1;
+ sal_Bool bName : 1;
+ sal_Bool bActive : 1;
::sd::DrawDocShell* mpDocShell;
};
@@ -103,7 +103,7 @@ public:
void InitTreeLB( const SdDrawDocument* pDoc );
void RefreshDocumentLB( const String* pDocName = NULL );
- BOOL InsertFile(const String& rFileName);
+ sal_Bool InsertFile(const String& rFileName);
NavigatorDragType GetNavigatorDragType();
void SetNavigatorDragType(NavigatorDragType eType) { meDragType = eType; }
@@ -125,7 +125,7 @@ private:
::sd::NavigatorChildWindow* mpChildWinContext;
Size maSize;
Size maMinSize;
- BOOL mbDocImported;
+ sal_Bool mbDocImported;
String maDropFileName;
NavigatorDragType meDragType;
List* mpDocList;
@@ -140,7 +140,7 @@ private:
*/
bool mbShowAllShapes;
- USHORT GetDragTypeSdResId( NavigatorDragType eDT, BOOL bImage = FALSE );
+ sal_uInt16 GetDragTypeSdResId( NavigatorDragType eDT, sal_Bool bImage = sal_False );
NavDocInfo* GetDocInfo();
DECL_LINK( GetFocusObjectsHdl, void * );
@@ -170,10 +170,10 @@ private:
class SdNavigatorControllerItem : public SfxControllerItem
{
public:
- SdNavigatorControllerItem( USHORT, SdNavigatorWin*, SfxBindings* );
+ SdNavigatorControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings* );
protected:
- virtual void StateChanged( USHORT nSId, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pState );
private:
@@ -191,10 +191,10 @@ private:
class SdPageNameControllerItem : public SfxControllerItem
{
public:
- SdPageNameControllerItem( USHORT, SdNavigatorWin*, SfxBindings* );
+ SdPageNameControllerItem( sal_uInt16, SdNavigatorWin*, SfxBindings* );
protected:
- virtual void StateChanged( USHORT nSId, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pState );
private:
diff --git a/sd/source/ui/inc/optdlg.hxx b/sd/source/ui/inc/optdlg.hxx
index 98393d4964d1..092a24c3efe8 100644..100755
--- a/sd/source/ui/inc/optdlg.hxx
+++ b/sd/source/ui/inc/optdlg.hxx
@@ -47,7 +47,7 @@ public:
protected:
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
};
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index 3965654ab418..ef3f531bea57 100644
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -104,9 +104,9 @@ private:
::rtl::OUString maSubTree;
SdOptionsItem* mpCfgItem;
- USHORT mnConfigId;
- BOOL mbInit : 1;
- BOOL mbEnableModify : 1;
+ sal_uInt16 mnConfigId;
+ sal_Bool mbInit : 1;
+ sal_Bool mbEnableModify : 1;
SD_DLLPRIVATE void Commit( SdOptionsItem& rCfgItem ) const;
SD_DLLPRIVATE ::com::sun::star::uno::Sequence< ::rtl::OUString > GetPropertyNames() const;
@@ -118,19 +118,19 @@ protected:
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const = 0;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues ) = 0;
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const = 0;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const = 0;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues ) = 0;
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const = 0;
public:
- SdOptionsGeneric( USHORT nConfigId, const ::rtl::OUString& rSubTree );
+ SdOptionsGeneric( sal_uInt16 nConfigId, const ::rtl::OUString& rSubTree );
virtual ~SdOptionsGeneric();
const ::rtl::OUString& GetSubTree() const { return maSubTree; }
- USHORT GetConfigId() const { return mnConfigId; }
+ sal_uInt16 GetConfigId() const { return mnConfigId; }
- void EnableModify( BOOL bModify ) { mbEnableModify = bModify; }
+ void EnableModify( sal_Bool bModify ) { mbEnableModify = bModify; }
void Store();
@@ -146,41 +146,41 @@ class SD_DLLPUBLIC SdOptionsLayout : public SdOptionsGeneric
{
private:
- BOOL bRuler : 1; // Layout/Display/Ruler
- BOOL bMoveOutline : 1; // Layout/Display/Contur
- BOOL bDragStripes : 1; // Layout/Display/Guide
- BOOL bHandlesBezier : 1; // Layout/Display/Bezier
- BOOL bHelplines : 1; // Layout/Display/Helpline
- UINT16 nMetric; // Layout/Other/MeasureUnit
- UINT16 nDefTab; // Layout/Other/TabStop
+ sal_Bool bRuler : 1; // Layout/Display/Ruler
+ sal_Bool bMoveOutline : 1; // Layout/Display/Contur
+ sal_Bool bDragStripes : 1; // Layout/Display/Guide
+ sal_Bool bHandlesBezier : 1; // Layout/Display/Bezier
+ sal_Bool bHelplines : 1; // Layout/Display/Helpline
+ sal_uInt16 nMetric; // Layout/Other/MeasureUnit
+ sal_uInt16 nDefTab; // Layout/Other/TabStop
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsLayout( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsLayout() {}
- BOOL operator==( const SdOptionsLayout& rOpt ) const;
-
- BOOL IsRulerVisible() const { Init(); return (BOOL) bRuler; }
- BOOL IsMoveOutline() const { Init(); return (BOOL) bMoveOutline; }
- BOOL IsDragStripes() const { Init(); return (BOOL) bDragStripes; }
- BOOL IsHandlesBezier() const { Init(); return (BOOL) bHandlesBezier; }
- BOOL IsHelplines() const { Init(); return (BOOL) bHelplines; }
- UINT16 GetMetric() const { Init(); return( ( 0xffff == nMetric ) ? (UINT16)SfxModule::GetCurrentFieldUnit() : nMetric ); }
- UINT16 GetDefTab() const { Init(); return nDefTab; }
-
- void SetRulerVisible( BOOL bOn = TRUE ) { if( bRuler != bOn ) { OptionsChanged(); bRuler = bOn; } }
- void SetMoveOutline( BOOL bOn = TRUE ) { if( bMoveOutline != bOn ) { OptionsChanged(); bMoveOutline = bOn; } }
- void SetDragStripes( BOOL bOn = TRUE ) { if( bDragStripes != bOn ) { OptionsChanged(); bDragStripes = bOn; } }
- void SetHandlesBezier( BOOL bOn = TRUE ) { if( bHandlesBezier != bOn ) { OptionsChanged(); bHandlesBezier = bOn; } }
- void SetHelplines( BOOL bOn = TRUE ) { if( bHelplines != bOn ) { OptionsChanged(); bHelplines = bOn; } }
- void SetMetric( UINT16 nInMetric ) { if( nMetric != nInMetric ) { OptionsChanged(); nMetric = nInMetric; } }
- void SetDefTab( UINT16 nTab ) { if( nDefTab != nTab ) { OptionsChanged(); nDefTab = nTab; } }
+ sal_Bool operator==( const SdOptionsLayout& rOpt ) const;
+
+ sal_Bool IsRulerVisible() const { Init(); return (sal_Bool) bRuler; }
+ sal_Bool IsMoveOutline() const { Init(); return (sal_Bool) bMoveOutline; }
+ sal_Bool IsDragStripes() const { Init(); return (sal_Bool) bDragStripes; }
+ sal_Bool IsHandlesBezier() const { Init(); return (sal_Bool) bHandlesBezier; }
+ sal_Bool IsHelplines() const { Init(); return (sal_Bool) bHelplines; }
+ sal_uInt16 GetMetric() const { Init(); return( ( 0xffff == nMetric ) ? (sal_uInt16)SfxModule::GetCurrentFieldUnit() : nMetric ); }
+ sal_uInt16 GetDefTab() const { Init(); return nDefTab; }
+
+ void SetRulerVisible( sal_Bool bOn = sal_True ) { if( bRuler != bOn ) { OptionsChanged(); bRuler = bOn; } }
+ void SetMoveOutline( sal_Bool bOn = sal_True ) { if( bMoveOutline != bOn ) { OptionsChanged(); bMoveOutline = bOn; } }
+ void SetDragStripes( sal_Bool bOn = sal_True ) { if( bDragStripes != bOn ) { OptionsChanged(); bDragStripes = bOn; } }
+ void SetHandlesBezier( sal_Bool bOn = sal_True ) { if( bHandlesBezier != bOn ) { OptionsChanged(); bHandlesBezier = bOn; } }
+ void SetHelplines( sal_Bool bOn = sal_True ) { if( bHelplines != bOn ) { OptionsChanged(); bHelplines = bOn; } }
+ void SetMetric( sal_uInt16 nInMetric ) { if( nMetric != nInMetric ) { OptionsChanged(); nMetric = nInMetric; } }
+ void SetDefTab( sal_uInt16 nTab ) { if( nDefTab != nTab ) { OptionsChanged(); nDefTab = nTab; } }
};
// -----------------------------------------------------------------------------
@@ -189,8 +189,8 @@ class SD_DLLPUBLIC SdOptionsLayoutItem : public SfxPoolItem
{
public:
- SdOptionsLayoutItem( USHORT nWhich);
- SdOptionsLayoutItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsLayoutItem( sal_uInt16 nWhich);
+ SdOptionsLayoutItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
@@ -211,16 +211,16 @@ class SD_DLLPUBLIC SdOptionsContents : public SdOptionsGeneric
private:
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsContents( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsContents( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsContents() {}
- BOOL operator==( const SdOptionsContents& rOpt ) const;
+ sal_Bool operator==( const SdOptionsContents& rOpt ) const;
};
// -----------------------------------------------------------------------------
@@ -229,7 +229,7 @@ class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem
{
public:
- SdOptionsContentsItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsContentsItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
@@ -249,28 +249,28 @@ class SD_DLLPUBLIC SdOptionsMisc : public SdOptionsGeneric
{
private:
- ULONG nDefaultObjectSizeWidth;
- ULONG nDefaultObjectSizeHeight;
-
- BOOL bStartWithTemplate : 1; // Misc/NewDoc/AutoPilot
- BOOL bMarkedHitMovesAlways : 1; // Misc/ObjectMoveable
- BOOL bMoveOnlyDragging : 1; // Currently, not in use !!!
- BOOL bCrookNoContortion : 1; // Misc/NoDistort
- BOOL bQuickEdit : 1; // Misc/TextObject/QuickEditing
- BOOL bMasterPageCache : 1; // Misc/BackgroundCache
- BOOL bDragWithCopy : 1; // Misc/CopyWhileMoving
- BOOL bPickThrough : 1; // Misc/TextObject/Selectable
- BOOL bBigHandles : 1; // Misc/BigHandles
- BOOL bDoubleClickTextEdit : 1; // Misc/DclickTextedit
- BOOL bClickChangeRotation : 1; // Misc/RotateClick
- BOOL bStartWithActualPage : 1; // Misc/Start/CurrentPage
- BOOL bSolidDragging : 1; // Misc/ModifyWithAttributes
- BOOL bSolidMarkHdl : 1; // /Misc/SimpleHandles
- BOOL bSummationOfParagraphs : 1; // misc/SummationOfParagraphs
- BOOL bShowUndoDeleteWarning : 1; // Misc/ShowUndoDeleteWarning
+ sal_uLong nDefaultObjectSizeWidth;
+ sal_uLong nDefaultObjectSizeHeight;
+
+ sal_Bool bStartWithTemplate : 1; // Misc/NewDoc/AutoPilot
+ sal_Bool bMarkedHitMovesAlways : 1; // Misc/ObjectMoveable
+ sal_Bool bMoveOnlyDragging : 1; // Currently, not in use !!!
+ sal_Bool bCrookNoContortion : 1; // Misc/NoDistort
+ sal_Bool bQuickEdit : 1; // Misc/TextObject/QuickEditing
+ sal_Bool bMasterPageCache : 1; // Misc/BackgroundCache
+ sal_Bool bDragWithCopy : 1; // Misc/CopyWhileMoving
+ sal_Bool bPickThrough : 1; // Misc/TextObject/Selectable
+ sal_Bool bBigHandles : 1; // Misc/BigHandles
+ sal_Bool bDoubleClickTextEdit : 1; // Misc/DclickTextedit
+ sal_Bool bClickChangeRotation : 1; // Misc/RotateClick
+ sal_Bool bStartWithActualPage : 1; // Misc/Start/CurrentPage
+ sal_Bool bSolidDragging : 1; // Misc/ModifyWithAttributes
+ sal_Bool bSolidMarkHdl : 1; // /Misc/SimpleHandles
+ sal_Bool bSummationOfParagraphs : 1; // misc/SummationOfParagraphs
+ sal_Bool bShowUndoDeleteWarning : 1; // Misc/ShowUndoDeleteWarning
// #i75315#
- BOOL bSlideshowRespectZOrder : 1; // Misc/SlideshowRespectZOrder
- BOOL bShowComments : 1; // Misc/ShowComments
+ sal_Bool bSlideshowRespectZOrder : 1; // Misc/SlideshowRespectZOrder
+ sal_Bool bShowComments : 1; // Misc/ShowComments
sal_Bool bPreviewNewEffects;
sal_Bool bPreviewChangedEffects;
@@ -278,53 +278,56 @@ private:
sal_Int32 mnDisplay;
+ sal_Int32 mnPenColor;
+ double mnPenWidth;
+
/** This value controls the device to use for formatting documents.
The currently supported values are 0 for the current printer or 1
for the printer independent virtual device the can be retrieved from
the modules.
*/
- USHORT mnPrinterIndependentLayout; // Misc/Compatibility/PrinterIndependentLayout
+ sal_uInt16 mnPrinterIndependentLayout; // Misc/Compatibility/PrinterIndependentLayout
// Misc
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsMisc( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsMisc() {}
- BOOL operator==( const SdOptionsMisc& rOpt ) const;
-
- BOOL IsStartWithTemplate() const { Init(); return (BOOL) bStartWithTemplate; }
- BOOL IsMarkedHitMovesAlways() const { Init(); return (BOOL) bMarkedHitMovesAlways; }
- BOOL IsMoveOnlyDragging() const { Init(); return (BOOL) bMoveOnlyDragging; }
- BOOL IsCrookNoContortion() const { Init(); return (BOOL) bCrookNoContortion; }
- BOOL IsQuickEdit() const { Init(); return (BOOL) bQuickEdit; }
- BOOL IsMasterPagePaintCaching() const { Init(); return (BOOL) bMasterPageCache; }
- BOOL IsDragWithCopy() const { Init(); return (BOOL) bDragWithCopy; }
- BOOL IsPickThrough() const { Init(); return (BOOL) bPickThrough; }
- BOOL IsBigHandles() const { Init(); return (BOOL) bBigHandles; }
- BOOL IsDoubleClickTextEdit() const { Init(); return (BOOL) bDoubleClickTextEdit; }
- BOOL IsClickChangeRotation() const { Init(); return (BOOL) bClickChangeRotation; }
- BOOL IsStartWithActualPage() const { Init(); return (BOOL) bStartWithActualPage; }
- BOOL IsSolidDragging() const { Init(); return (BOOL) bSolidDragging; }
- BOOL IsSolidMarkHdl() const { Init(); return (BOOL) bSolidMarkHdl; }
- BOOL IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs != 0; };
+ sal_Bool operator==( const SdOptionsMisc& rOpt ) const;
+
+ sal_Bool IsStartWithTemplate() const { Init(); return (sal_Bool) bStartWithTemplate; }
+ sal_Bool IsMarkedHitMovesAlways() const { Init(); return (sal_Bool) bMarkedHitMovesAlways; }
+ sal_Bool IsMoveOnlyDragging() const { Init(); return (sal_Bool) bMoveOnlyDragging; }
+ sal_Bool IsCrookNoContortion() const { Init(); return (sal_Bool) bCrookNoContortion; }
+ sal_Bool IsQuickEdit() const { Init(); return (sal_Bool) bQuickEdit; }
+ sal_Bool IsMasterPagePaintCaching() const { Init(); return (sal_Bool) bMasterPageCache; }
+ sal_Bool IsDragWithCopy() const { Init(); return (sal_Bool) bDragWithCopy; }
+ sal_Bool IsPickThrough() const { Init(); return (sal_Bool) bPickThrough; }
+ sal_Bool IsBigHandles() const { Init(); return (sal_Bool) bBigHandles; }
+ sal_Bool IsDoubleClickTextEdit() const { Init(); return (sal_Bool) bDoubleClickTextEdit; }
+ sal_Bool IsClickChangeRotation() const { Init(); return (sal_Bool) bClickChangeRotation; }
+ sal_Bool IsStartWithActualPage() const { Init(); return (sal_Bool) bStartWithActualPage; }
+ sal_Bool IsSolidDragging() const { Init(); return (sal_Bool) bSolidDragging; }
+ sal_Bool IsSolidMarkHdl() const { Init(); return (sal_Bool) bSolidMarkHdl; }
+ sal_Bool IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs != 0; };
/** Return the currently selected printer independent layout mode.
@return
Returns 1 for printer independent layout enabled and 0 when it
is disabled. Other values are reserved for future use.
*/
- USHORT GetPrinterIndependentLayout() const { Init(); return mnPrinterIndependentLayout; };
- BOOL IsShowUndoDeleteWarning() const { Init(); return (BOOL) bShowUndoDeleteWarning; }
- BOOL IsSlideshowRespectZOrder() const { Init(); return (BOOL) bSlideshowRespectZOrder; }
- ULONG GetDefaultObjectSizeWidth() const { Init(); return nDefaultObjectSizeWidth; }
- ULONG GetDefaultObjectSizeHeight() const { Init(); return nDefaultObjectSizeHeight; }
+ sal_uInt16 GetPrinterIndependentLayout() const { Init(); return mnPrinterIndependentLayout; };
+ sal_Bool IsShowUndoDeleteWarning() const { Init(); return (sal_Bool) bShowUndoDeleteWarning; }
+ sal_Bool IsSlideshowRespectZOrder() const { Init(); return (sal_Bool) bSlideshowRespectZOrder; }
+ sal_uLong GetDefaultObjectSizeWidth() const { Init(); return nDefaultObjectSizeWidth; }
+ sal_uLong GetDefaultObjectSizeHeight() const { Init(); return nDefaultObjectSizeHeight; }
sal_Bool IsPreviewNewEffects() const { Init(); return bPreviewNewEffects; }
sal_Bool IsPreviewChangedEffects() const { Init(); return bPreviewChangedEffects; }
@@ -333,39 +336,45 @@ public:
sal_Int32 GetDisplay() const { Init(); return mnDisplay; }
void SetDisplay( sal_Int32 nDisplay = 0 ) { if( mnDisplay != nDisplay ) { OptionsChanged(); mnDisplay = nDisplay; } }
- void SetStartWithTemplate( BOOL bOn = TRUE ) { if( bStartWithTemplate != bOn ) { OptionsChanged(); bStartWithTemplate = bOn; } }
- void SetMarkedHitMovesAlways( BOOL bOn = TRUE ) { if( bMarkedHitMovesAlways != bOn ) { OptionsChanged(); bMarkedHitMovesAlways = bOn; } }
- void SetMoveOnlyDragging( BOOL bOn = TRUE ) { if( bMoveOnlyDragging != bOn ) { OptionsChanged(); bMoveOnlyDragging = bOn; } }
- void SetCrookNoContortion( BOOL bOn = TRUE ) { if( bCrookNoContortion != bOn ) { OptionsChanged(); bCrookNoContortion = bOn; } }
- void SetQuickEdit( BOOL bOn = TRUE ) { if( bQuickEdit != bOn ) { OptionsChanged(); bQuickEdit = bOn; } }
- void SetMasterPagePaintCaching( BOOL bOn = TRUE ) { if( bMasterPageCache != bOn ) { OptionsChanged(); bMasterPageCache = bOn; } }
- void SetDragWithCopy( BOOL bOn = TRUE ) { if( bDragWithCopy != bOn ) { OptionsChanged(); bDragWithCopy = bOn; } }
- void SetPickThrough( BOOL bOn = TRUE ) { if( bPickThrough != bOn ) { OptionsChanged(); bPickThrough = bOn; } }
- void SetBigHandles( BOOL bOn = TRUE ) { if( bBigHandles != bOn ) { OptionsChanged(); bBigHandles = bOn; } }
- void SetDoubleClickTextEdit( BOOL bOn = TRUE ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
- void SetClickChangeRotation( BOOL bOn = TRUE ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
- void SetStartWithActualPage( BOOL bOn = TRUE ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
- void SetSummationOfParagraphs( BOOL bOn = TRUE ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
+ sal_Int32 GetPresentationPenColor() const { Init(); return mnPenColor; }
+ void SetPresentationPenColor( sal_Int32 nPenColor ) { if( mnPenColor != nPenColor ) { OptionsChanged(); mnPenColor = nPenColor; } }
+
+ double GetPresentationPenWidth() const { Init(); return mnPenWidth; }
+ void SetPresentationPenWidth( double nPenWidth ) { if( mnPenWidth != nPenWidth ) { OptionsChanged(); mnPenWidth = nPenWidth; } }
+
+ void SetStartWithTemplate( sal_Bool bOn = sal_True ) { if( bStartWithTemplate != bOn ) { OptionsChanged(); bStartWithTemplate = bOn; } }
+ void SetMarkedHitMovesAlways( sal_Bool bOn = sal_True ) { if( bMarkedHitMovesAlways != bOn ) { OptionsChanged(); bMarkedHitMovesAlways = bOn; } }
+ void SetMoveOnlyDragging( sal_Bool bOn = sal_True ) { if( bMoveOnlyDragging != bOn ) { OptionsChanged(); bMoveOnlyDragging = bOn; } }
+ void SetCrookNoContortion( sal_Bool bOn = sal_True ) { if( bCrookNoContortion != bOn ) { OptionsChanged(); bCrookNoContortion = bOn; } }
+ void SetQuickEdit( sal_Bool bOn = sal_True ) { if( bQuickEdit != bOn ) { OptionsChanged(); bQuickEdit = bOn; } }
+ void SetMasterPagePaintCaching( sal_Bool bOn = sal_True ) { if( bMasterPageCache != bOn ) { OptionsChanged(); bMasterPageCache = bOn; } }
+ void SetDragWithCopy( sal_Bool bOn = sal_True ) { if( bDragWithCopy != bOn ) { OptionsChanged(); bDragWithCopy = bOn; } }
+ void SetPickThrough( sal_Bool bOn = sal_True ) { if( bPickThrough != bOn ) { OptionsChanged(); bPickThrough = bOn; } }
+ void SetBigHandles( sal_Bool bOn = sal_True ) { if( bBigHandles != bOn ) { OptionsChanged(); bBigHandles = bOn; } }
+ void SetDoubleClickTextEdit( sal_Bool bOn = sal_True ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
+ void SetClickChangeRotation( sal_Bool bOn = sal_True ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
+ void SetStartWithActualPage( sal_Bool bOn = sal_True ) { if( bStartWithActualPage != bOn ) { OptionsChanged(); bStartWithActualPage = bOn; } }
+ void SetSummationOfParagraphs( sal_Bool bOn = sal_True ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
/** Set the printer independent layout mode.
@param nOn
The default value is to switch printer independent layout on,
hence the parameters name. Use 0 for turning it off. Other
values are reserved for future use.
*/
- void SetPrinterIndependentLayout (USHORT nOn = 1 ){ if ( nOn != mnPrinterIndependentLayout ) { OptionsChanged(); mnPrinterIndependentLayout = nOn; } }
- void SetSolidDragging( BOOL bOn = TRUE ) { if( bSolidDragging != bOn ) { OptionsChanged(); bSolidDragging = bOn; } }
- void SetSolidMarkHdl( BOOL bOn = TRUE ) { if( bSolidMarkHdl != bOn ) { OptionsChanged(); bSolidMarkHdl = bOn; } }
- void SetShowUndoDeleteWarning( BOOL bOn = TRUE ) { if( bShowUndoDeleteWarning != bOn ) { OptionsChanged(); bShowUndoDeleteWarning = bOn; } }
- void SetSlideshowRespectZOrder( BOOL bOn = TRUE ) { if( bSlideshowRespectZOrder != bOn ) { OptionsChanged(); bSlideshowRespectZOrder = bOn; } }
- void SetDefaultObjectSizeWidth( ULONG nWidth ) { if( nDefaultObjectSizeWidth != nWidth ) { OptionsChanged(); nDefaultObjectSizeWidth = nWidth; } }
- void SetDefaultObjectSizeHeight( ULONG nHeight ) { if( nDefaultObjectSizeHeight != nHeight ) { OptionsChanged(); nDefaultObjectSizeHeight = nHeight; } }
+ void SetPrinterIndependentLayout (sal_uInt16 nOn = 1 ){ if ( nOn != mnPrinterIndependentLayout ) { OptionsChanged(); mnPrinterIndependentLayout = nOn; } }
+ void SetSolidDragging( sal_Bool bOn = sal_True ) { if( bSolidDragging != bOn ) { OptionsChanged(); bSolidDragging = bOn; } }
+ void SetSolidMarkHdl( sal_Bool bOn = sal_True ) { if( bSolidMarkHdl != bOn ) { OptionsChanged(); bSolidMarkHdl = bOn; } }
+ void SetShowUndoDeleteWarning( sal_Bool bOn = sal_True ) { if( bShowUndoDeleteWarning != bOn ) { OptionsChanged(); bShowUndoDeleteWarning = bOn; } }
+ void SetSlideshowRespectZOrder( sal_Bool bOn = sal_True ) { if( bSlideshowRespectZOrder != bOn ) { OptionsChanged(); bSlideshowRespectZOrder = bOn; } }
+ void SetDefaultObjectSizeWidth( sal_uLong nWidth ) { if( nDefaultObjectSizeWidth != nWidth ) { OptionsChanged(); nDefaultObjectSizeWidth = nWidth; } }
+ void SetDefaultObjectSizeHeight( sal_uLong nHeight ) { if( nDefaultObjectSizeHeight != nHeight ) { OptionsChanged(); nDefaultObjectSizeHeight = nHeight; } }
void SetPreviewNewEffects( sal_Bool bOn ) { if( bPreviewNewEffects != bOn ) { OptionsChanged(); bPreviewNewEffects = bOn; } }
void SetPreviewChangedEffects( sal_Bool bOn ) { if( bPreviewChangedEffects != bOn ) { OptionsChanged(); bPreviewChangedEffects = bOn; } }
void SetPreviewTransitions( sal_Bool bOn ) { if( bPreviewTransitions != bOn ) { OptionsChanged(); bPreviewTransitions = bOn; } }
- BOOL IsShowComments() const { Init(); return bShowComments; }
- void SetShowComments( BOOL bShow ) { if( bShowComments != bShow ) { OptionsChanged(); bShowComments = bShow; } }
+ sal_Bool IsShowComments() const { Init(); return bShowComments; }
+ void SetShowComments( sal_Bool bShow ) { if( bShowComments != bShow ) { OptionsChanged(); bShowComments = bShow; } }
};
// -----------------------------------------------------------------------------
@@ -374,8 +383,8 @@ class SD_DLLPUBLIC SdOptionsMiscItem : public SfxPoolItem
{
public:
- SdOptionsMiscItem( USHORT nWhich);
- SdOptionsMiscItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsMiscItem( sal_uInt16 nWhich);
+ SdOptionsMiscItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
@@ -396,51 +405,51 @@ class SD_DLLPUBLIC SdOptionsSnap : public SdOptionsGeneric
{
private:
- BOOL bSnapHelplines : 1; // Snap/Object/SnapLine
- BOOL bSnapBorder : 1; // Snap/Object/PageMargin
- BOOL bSnapFrame : 1; // Snap/Object/ObjectFrame
- BOOL bSnapPoints : 1; // Snap/Object/ObjectPoint
- BOOL bOrtho : 1; // Snap/Position/CreatingMoving
- BOOL bBigOrtho : 1; // Snap/Position/ExtendEdges
- BOOL bRotate : 1; // Snap/Position/Rotating
- INT16 nSnapArea; // Snap/Object/Range
- INT16 nAngle; // Snap/Position/RotatingValue
- INT16 nBezAngle; // Snap/Position/PointReduction
+ sal_Bool bSnapHelplines : 1; // Snap/Object/SnapLine
+ sal_Bool bSnapBorder : 1; // Snap/Object/PageMargin
+ sal_Bool bSnapFrame : 1; // Snap/Object/ObjectFrame
+ sal_Bool bSnapPoints : 1; // Snap/Object/ObjectPoint
+ sal_Bool bOrtho : 1; // Snap/Position/CreatingMoving
+ sal_Bool bBigOrtho : 1; // Snap/Position/ExtendEdges
+ sal_Bool bRotate : 1; // Snap/Position/Rotating
+ sal_Int16 nSnapArea; // Snap/Object/Range
+ sal_Int16 nAngle; // Snap/Position/RotatingValue
+ sal_Int16 nBezAngle; // Snap/Position/PointReduction
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsSnap( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsSnap() {}
- BOOL operator==( const SdOptionsSnap& rOpt ) const;
-
- BOOL IsSnapHelplines() const { Init(); return (BOOL) bSnapHelplines; }
- BOOL IsSnapBorder() const { Init(); return (BOOL) bSnapBorder; }
- BOOL IsSnapFrame() const { Init(); return (BOOL) bSnapFrame; }
- BOOL IsSnapPoints() const { Init(); return (BOOL) bSnapPoints; }
- BOOL IsOrtho() const { Init(); return (BOOL) bOrtho; }
- BOOL IsBigOrtho() const { Init(); return (BOOL) bBigOrtho; }
- BOOL IsRotate() const { Init(); return (BOOL) bRotate; }
- INT16 GetSnapArea() const { Init(); return nSnapArea; }
- INT16 GetAngle() const { Init(); return nAngle; }
- INT16 GetEliminatePolyPointLimitAngle() const { Init(); return nBezAngle; }
-
- void SetSnapHelplines( BOOL bOn = TRUE ) { if( bSnapHelplines != bOn ) { OptionsChanged(); bSnapHelplines = bOn; } }
- void SetSnapBorder( BOOL bOn = TRUE ) { if( bSnapBorder != bOn ) { OptionsChanged(); bSnapBorder = bOn; } }
- void SetSnapFrame( BOOL bOn = TRUE ) { if( bSnapFrame != bOn ) { OptionsChanged(); bSnapFrame = bOn; } }
- void SetSnapPoints( BOOL bOn = TRUE ) { if( bSnapPoints != bOn ) { OptionsChanged(); bSnapPoints = bOn; } }
- void SetOrtho( BOOL bOn = TRUE ) { if( bOrtho != bOn ) { OptionsChanged(); bOrtho = bOn; } }
- void SetBigOrtho( BOOL bOn = TRUE ) { if( bBigOrtho != bOn ) { OptionsChanged(); bBigOrtho = bOn; } }
- void SetRotate( BOOL bOn = TRUE ) { if( bRotate != bOn ) { OptionsChanged(); bRotate = bOn; } }
- void SetSnapArea( INT16 nIn ) { if( nSnapArea != nIn ) { OptionsChanged(); nSnapArea = nIn; } }
- void SetAngle( INT16 nIn ) { if( nAngle != nIn ) { OptionsChanged(); nAngle = nIn; } }
- void SetEliminatePolyPointLimitAngle( INT16 nIn ) { if( nBezAngle != nIn ) { OptionsChanged(); nBezAngle = nIn; } }
+ sal_Bool operator==( const SdOptionsSnap& rOpt ) const;
+
+ sal_Bool IsSnapHelplines() const { Init(); return (sal_Bool) bSnapHelplines; }
+ sal_Bool IsSnapBorder() const { Init(); return (sal_Bool) bSnapBorder; }
+ sal_Bool IsSnapFrame() const { Init(); return (sal_Bool) bSnapFrame; }
+ sal_Bool IsSnapPoints() const { Init(); return (sal_Bool) bSnapPoints; }
+ sal_Bool IsOrtho() const { Init(); return (sal_Bool) bOrtho; }
+ sal_Bool IsBigOrtho() const { Init(); return (sal_Bool) bBigOrtho; }
+ sal_Bool IsRotate() const { Init(); return (sal_Bool) bRotate; }
+ sal_Int16 GetSnapArea() const { Init(); return nSnapArea; }
+ sal_Int16 GetAngle() const { Init(); return nAngle; }
+ sal_Int16 GetEliminatePolyPointLimitAngle() const { Init(); return nBezAngle; }
+
+ void SetSnapHelplines( sal_Bool bOn = sal_True ) { if( bSnapHelplines != bOn ) { OptionsChanged(); bSnapHelplines = bOn; } }
+ void SetSnapBorder( sal_Bool bOn = sal_True ) { if( bSnapBorder != bOn ) { OptionsChanged(); bSnapBorder = bOn; } }
+ void SetSnapFrame( sal_Bool bOn = sal_True ) { if( bSnapFrame != bOn ) { OptionsChanged(); bSnapFrame = bOn; } }
+ void SetSnapPoints( sal_Bool bOn = sal_True ) { if( bSnapPoints != bOn ) { OptionsChanged(); bSnapPoints = bOn; } }
+ void SetOrtho( sal_Bool bOn = sal_True ) { if( bOrtho != bOn ) { OptionsChanged(); bOrtho = bOn; } }
+ void SetBigOrtho( sal_Bool bOn = sal_True ) { if( bBigOrtho != bOn ) { OptionsChanged(); bBigOrtho = bOn; } }
+ void SetRotate( sal_Bool bOn = sal_True ) { if( bRotate != bOn ) { OptionsChanged(); bRotate = bOn; } }
+ void SetSnapArea( sal_Int16 nIn ) { if( nSnapArea != nIn ) { OptionsChanged(); nSnapArea = nIn; } }
+ void SetAngle( sal_Int16 nIn ) { if( nAngle != nIn ) { OptionsChanged(); nAngle = nIn; } }
+ void SetEliminatePolyPointLimitAngle( sal_Int16 nIn ) { if( nBezAngle != nIn ) { OptionsChanged(); nBezAngle = nIn; } }
};
// -----------------------------------------------------------------------------
@@ -449,8 +458,8 @@ class SD_DLLPUBLIC SdOptionsSnapItem : public SfxPoolItem
{
public:
- SdOptionsSnapItem( USHORT nWhich);
- SdOptionsSnapItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsSnapItem( sal_uInt16 nWhich);
+ SdOptionsSnapItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
@@ -470,24 +479,24 @@ class SdOptionsZoom : public SdOptionsGeneric
{
private:
- INT32 nX; // Zoom/ScaleX
- INT32 nY; // Zoom/ScaleY
+ sal_Int32 nX; // Zoom/ScaleX
+ sal_Int32 nY; // Zoom/ScaleY
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsZoom( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsZoom() {}
- BOOL operator==( const SdOptionsZoom& rOpt ) const;
+ sal_Bool operator==( const SdOptionsZoom& rOpt ) const;
- void GetScale( INT32& rX, INT32& rY ) const { Init(); rX = nX; rY = nY; }
- void SetScale( INT32 nInX, INT32 nInY ) { if( nX != nInX || nY != nInY ) { OptionsChanged(); nX = nInX; nY = nInY; } }
+ void GetScale( sal_Int32& rX, sal_Int32& rY ) const { Init(); rX = nX; rY = nY; }
+ void SetScale( sal_Int32 nInX, sal_Int32 nInY ) { if( nX != nInX || nY != nInY ) { OptionsChanged(); nX = nInX; nY = nInY; } }
};
// -----------------------------------------------------------------------------
@@ -500,39 +509,39 @@ class SdOptionsGrid : public SdOptionsGeneric, public SvxOptionsGrid
{
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsGrid( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsGrid( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsGrid();
void SetDefaults();
- BOOL operator==( const SdOptionsGrid& rOpt ) const;
-
- UINT32 GetFldDrawX() const { Init(); return SvxOptionsGrid::GetFldDrawX(); }
- UINT32 GetFldDivisionX() const { Init(); return SvxOptionsGrid::GetFldDivisionX(); }
- UINT32 GetFldDrawY() const { Init(); return SvxOptionsGrid::GetFldDrawY(); }
- UINT32 GetFldDivisionY() const { Init(); return SvxOptionsGrid::GetFldDivisionY(); }
- UINT32 GetFldSnapX() const { Init(); return SvxOptionsGrid::GetFldSnapX(); }
- UINT32 GetFldSnapY() const { Init(); return SvxOptionsGrid::GetFldSnapY(); }
- BOOL IsUseGridSnap() const { Init(); return SvxOptionsGrid::GetUseGridSnap(); }
- BOOL IsSynchronize() const { Init(); return SvxOptionsGrid::GetSynchronize(); }
- BOOL IsGridVisible() const { Init(); return SvxOptionsGrid::GetGridVisible(); }
- BOOL IsEqualGrid() const { Init(); return SvxOptionsGrid::GetEqualGrid(); }
-
- void SetFldDrawX( UINT32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawX( nSet ); } }
- void SetFldDivisionX( UINT32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionX( nSet ); } }
- void SetFldDrawY( UINT32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawY( nSet ); } }
- void SetFldDivisionY( UINT32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionY( nSet ); } }
- void SetFldSnapX( UINT32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapX() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapX( nSet ); } }
- void SetFldSnapY( UINT32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapY() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapY( nSet ); } }
- void SetUseGridSnap( BOOL bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } }
- void SetSynchronize( BOOL bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } }
- void SetGridVisible( BOOL bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } }
- void SetEqualGrid( BOOL bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } }
+ sal_Bool operator==( const SdOptionsGrid& rOpt ) const;
+
+ sal_uInt32 GetFldDrawX() const { Init(); return SvxOptionsGrid::GetFldDrawX(); }
+ sal_uInt32 GetFldDivisionX() const { Init(); return SvxOptionsGrid::GetFldDivisionX(); }
+ sal_uInt32 GetFldDrawY() const { Init(); return SvxOptionsGrid::GetFldDrawY(); }
+ sal_uInt32 GetFldDivisionY() const { Init(); return SvxOptionsGrid::GetFldDivisionY(); }
+ sal_uInt32 GetFldSnapX() const { Init(); return SvxOptionsGrid::GetFldSnapX(); }
+ sal_uInt32 GetFldSnapY() const { Init(); return SvxOptionsGrid::GetFldSnapY(); }
+ sal_Bool IsUseGridSnap() const { Init(); return SvxOptionsGrid::GetUseGridSnap(); }
+ sal_Bool IsSynchronize() const { Init(); return SvxOptionsGrid::GetSynchronize(); }
+ sal_Bool IsGridVisible() const { Init(); return SvxOptionsGrid::GetGridVisible(); }
+ sal_Bool IsEqualGrid() const { Init(); return SvxOptionsGrid::GetEqualGrid(); }
+
+ void SetFldDrawX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawX( nSet ); } }
+ void SetFldDivisionX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionX() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionX( nSet ); } }
+ void SetFldDrawY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDrawY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDrawY( nSet ); } }
+ void SetFldDivisionY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldDivisionY() ) { OptionsChanged(); SvxOptionsGrid::SetFldDivisionY( nSet ); } }
+ void SetFldSnapX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapX() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapX( nSet ); } }
+ void SetFldSnapY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFldSnapY() ) { OptionsChanged(); SvxOptionsGrid::SetFldSnapY( nSet ); } }
+ void SetUseGridSnap( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } }
+ void SetSynchronize( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } }
+ void SetGridVisible( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } }
+ void SetEqualGrid( sal_Bool bSet ) { if( bSet != SvxOptionsGrid::GetEqualGrid() ) { OptionsChanged(); SvxOptionsGrid::SetEqualGrid( bSet ); } }
};
// -----------------------------------------------
@@ -541,7 +550,7 @@ class SdOptionsGridItem : public SvxGridItem
{
public:
- SdOptionsGridItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsGridItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
void SetOptions( SdOptions* pOpts ) const;
};
@@ -554,84 +563,84 @@ class SD_DLLPUBLIC SdOptionsPrint : public SdOptionsGeneric
{
private:
- BOOL bDraw : 1; // Print/Content/Drawing
- BOOL bNotes : 1; // Print/Content/Note
- BOOL bHandout : 1; // Print/Content/Handout
- BOOL bOutline : 1; // Print/Content/Outline
- BOOL bDate : 1; // Print/Other/Date
- BOOL bTime : 1; // Print/Other/Time
- BOOL bPagename : 1; // Print/Other/PageName
- BOOL bHiddenPages : 1; // Print/Other/HiddenPage
- BOOL bPagesize : 1; // Print/Page/PageSize
- BOOL bPagetile : 1; // Print/Page/PageTile
- BOOL bWarningPrinter : 1; // These flags you get
- BOOL bWarningSize : 1; // from the common options,
- BOOL bWarningOrientation : 1; // currently org.openoffice.Office.Common.xml (class OfaMiscCfg ; sfx2/misccfg.hxx )
- BOOL bBooklet : 1; // Print/Page/Booklet
- BOOL bFront : 1; // Print/Page/BookletFront
- BOOL bBack : 1; // Print/Page/BookletFront
- BOOL bCutPage : 1; // NOT persistent !!!
- BOOL bPaperbin : 1; // Print/Other/FromPrinterSetup
- BOOL mbHandoutHorizontal : 1; // Order Page previews on Handout Pages horizontal
- UINT16 mnHandoutPages; // Number of page previews on handout page (only 1/2/4/6/9 are supported)
- UINT16 nQuality; // Print/Other/Quality
+ sal_Bool bDraw : 1; // Print/Content/Drawing
+ sal_Bool bNotes : 1; // Print/Content/Note
+ sal_Bool bHandout : 1; // Print/Content/Handout
+ sal_Bool bOutline : 1; // Print/Content/Outline
+ sal_Bool bDate : 1; // Print/Other/Date
+ sal_Bool bTime : 1; // Print/Other/Time
+ sal_Bool bPagename : 1; // Print/Other/PageName
+ sal_Bool bHiddenPages : 1; // Print/Other/HiddenPage
+ sal_Bool bPagesize : 1; // Print/Page/PageSize
+ sal_Bool bPagetile : 1; // Print/Page/PageTile
+ sal_Bool bWarningPrinter : 1; // These flags you get
+ sal_Bool bWarningSize : 1; // from the common options,
+ sal_Bool bWarningOrientation : 1; // currently org.openoffice.Office.Common.xml (class OfaMiscCfg ; sfx2/misccfg.hxx )
+ sal_Bool bBooklet : 1; // Print/Page/Booklet
+ sal_Bool bFront : 1; // Print/Page/BookletFront
+ sal_Bool bBack : 1; // Print/Page/BookletFront
+ sal_Bool bCutPage : 1; // NOT persistent !!!
+ sal_Bool bPaperbin : 1; // Print/Other/FromPrinterSetup
+ sal_Bool mbHandoutHorizontal : 1; // Order Page previews on Handout Pages horizontal
+ sal_uInt16 mnHandoutPages; // Number of page previews on handout page (only 1/2/4/6/9 are supported)
+ sal_uInt16 nQuality; // Print/Other/Quality
protected:
- virtual void GetPropNameArray( const char**& ppNames, ULONG& rCount ) const;
- virtual BOOL ReadData( const ::com::sun::star::uno::Any* pValues );
- virtual BOOL WriteData( ::com::sun::star::uno::Any* pValues ) const;
+ virtual void GetPropNameArray( const char**& ppNames, sal_uLong& rCount ) const;
+ virtual sal_Bool ReadData( const ::com::sun::star::uno::Any* pValues );
+ virtual sal_Bool WriteData( ::com::sun::star::uno::Any* pValues ) const;
public:
- SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig );
+ SdOptionsPrint( sal_uInt16 nConfigId, sal_Bool bUseConfig );
virtual ~SdOptionsPrint() {}
- BOOL operator==( const SdOptionsPrint& rOpt ) const;
-
- BOOL IsDraw() const { Init(); return (BOOL) bDraw; }
- BOOL IsNotes() const { Init(); return (BOOL) bNotes; }
- BOOL IsHandout() const { Init(); return (BOOL) bHandout; }
- BOOL IsOutline() const { Init(); return (BOOL) bOutline; }
- BOOL IsDate() const { Init(); return (BOOL) bDate; }
- BOOL IsTime() const { Init(); return (BOOL) bTime; }
- BOOL IsPagename() const { Init(); return (BOOL) bPagename; }
- BOOL IsHiddenPages() const { Init(); return (BOOL) bHiddenPages; }
- BOOL IsPagesize() const { Init(); return (BOOL) bPagesize; }
- BOOL IsPagetile() const { Init(); return (BOOL) bPagetile; }
- BOOL IsWarningPrinter() const { Init(); return (BOOL) bWarningPrinter; }
- BOOL IsWarningSize() const { Init(); return (BOOL) bWarningSize; }
- BOOL IsWarningOrientation() const { Init(); return (BOOL) bWarningOrientation; }
- BOOL IsBooklet() const { Init(); return (BOOL) bBooklet; }
- BOOL IsFrontPage() const { Init(); return (BOOL) bFront; }
- BOOL IsBackPage() const { Init(); return (BOOL) bBack; }
- BOOL IsCutPage() const { Init(); return (BOOL) bCutPage; }
- BOOL IsPaperbin() const { Init(); return (BOOL) bPaperbin; }
- UINT16 GetOutputQuality() const { Init(); return nQuality; }
- BOOL IsHandoutHorizontal() const { Init(); return mbHandoutHorizontal; }
- UINT16 GetHandoutPages() const { Init(); return mnHandoutPages; }
-
- void SetDraw( BOOL bOn = TRUE ) { if( bDraw != bOn ) { OptionsChanged(); bDraw = bOn; } }
- void SetNotes( BOOL bOn = TRUE ) { if( bNotes != bOn ) { OptionsChanged(); bNotes = bOn; } }
- void SetHandout( BOOL bOn = TRUE ) { if( bHandout != bOn ) { OptionsChanged(); bHandout = bOn; } }
- void SetOutline( BOOL bOn = TRUE ) { if( bOutline != bOn ) { OptionsChanged(); bOutline = bOn; } }
- void SetDate( BOOL bOn = TRUE ) { if( bDate != bOn ) { OptionsChanged(); bDate = bOn; } }
- void SetTime( BOOL bOn = TRUE ) { if( bTime != bOn ) { OptionsChanged(); bTime = bOn; } }
- void SetPagename( BOOL bOn = TRUE ) { if( bPagename != bOn ) { OptionsChanged(); bPagename = bOn; } }
- void SetHiddenPages( BOOL bOn = TRUE ) { if( bHiddenPages != bOn ) { OptionsChanged(); bHiddenPages = bOn; } }
- void SetPagesize( BOOL bOn = TRUE ) { if( bPagesize != bOn ) { OptionsChanged(); bPagesize = bOn; } }
- void SetPagetile( BOOL bOn = TRUE ) { if( bPagetile != bOn ) { OptionsChanged(); bPagetile = bOn; } }
- void SetWarningPrinter( BOOL bOn = TRUE ) { if( bWarningPrinter != bOn ) { OptionsChanged(); bWarningPrinter = bOn; } }
- void SetWarningSize( BOOL bOn = TRUE ) { if( bWarningSize != bOn ) { OptionsChanged(); bWarningSize = bOn; } }
- void SetWarningOrientation( BOOL bOn = TRUE ) { if( bWarningOrientation != bOn ) { OptionsChanged(); bWarningOrientation = bOn; } }
- void SetBooklet( BOOL bOn = TRUE ) { if( bBooklet != bOn ) { OptionsChanged(); bBooklet = bOn; } }
- void SetFrontPage( BOOL bOn = TRUE ) { if( bFront != bOn ) { OptionsChanged(); bFront = bOn; } }
- void SetBackPage( BOOL bOn = TRUE ) { if( bBack != bOn ) { OptionsChanged(); bBack = bOn; } }
- void SetCutPage( BOOL bOn = TRUE ) { if( bCutPage != bOn ) { OptionsChanged(); bCutPage = bOn; } }
- void SetPaperbin( BOOL bOn = TRUE ) { if( bPaperbin != bOn ) { OptionsChanged(); bPaperbin = bOn; } }
- void SetOutputQuality( UINT16 nInQuality ) { if( nQuality != nInQuality ) { OptionsChanged(); nQuality = nInQuality; } }
- void SetHandoutHorizontal( BOOL bHandoutHorizontal ) { if( mbHandoutHorizontal != bHandoutHorizontal ) { OptionsChanged(); mbHandoutHorizontal = bHandoutHorizontal; } }
- void SetHandoutPages( UINT16 nHandoutPages ) { if( nHandoutPages != mnHandoutPages ) { OptionsChanged(); mnHandoutPages = nHandoutPages; } }
+ sal_Bool operator==( const SdOptionsPrint& rOpt ) const;
+
+ sal_Bool IsDraw() const { Init(); return (sal_Bool) bDraw; }
+ sal_Bool IsNotes() const { Init(); return (sal_Bool) bNotes; }
+ sal_Bool IsHandout() const { Init(); return (sal_Bool) bHandout; }
+ sal_Bool IsOutline() const { Init(); return (sal_Bool) bOutline; }
+ sal_Bool IsDate() const { Init(); return (sal_Bool) bDate; }
+ sal_Bool IsTime() const { Init(); return (sal_Bool) bTime; }
+ sal_Bool IsPagename() const { Init(); return (sal_Bool) bPagename; }
+ sal_Bool IsHiddenPages() const { Init(); return (sal_Bool) bHiddenPages; }
+ sal_Bool IsPagesize() const { Init(); return (sal_Bool) bPagesize; }
+ sal_Bool IsPagetile() const { Init(); return (sal_Bool) bPagetile; }
+ sal_Bool IsWarningPrinter() const { Init(); return (sal_Bool) bWarningPrinter; }
+ sal_Bool IsWarningSize() const { Init(); return (sal_Bool) bWarningSize; }
+ sal_Bool IsWarningOrientation() const { Init(); return (sal_Bool) bWarningOrientation; }
+ sal_Bool IsBooklet() const { Init(); return (sal_Bool) bBooklet; }
+ sal_Bool IsFrontPage() const { Init(); return (sal_Bool) bFront; }
+ sal_Bool IsBackPage() const { Init(); return (sal_Bool) bBack; }
+ sal_Bool IsCutPage() const { Init(); return (sal_Bool) bCutPage; }
+ sal_Bool IsPaperbin() const { Init(); return (sal_Bool) bPaperbin; }
+ sal_uInt16 GetOutputQuality() const { Init(); return nQuality; }
+ sal_Bool IsHandoutHorizontal() const { Init(); return mbHandoutHorizontal; }
+ sal_uInt16 GetHandoutPages() const { Init(); return mnHandoutPages; }
+
+ void SetDraw( sal_Bool bOn = sal_True ) { if( bDraw != bOn ) { OptionsChanged(); bDraw = bOn; } }
+ void SetNotes( sal_Bool bOn = sal_True ) { if( bNotes != bOn ) { OptionsChanged(); bNotes = bOn; } }
+ void SetHandout( sal_Bool bOn = sal_True ) { if( bHandout != bOn ) { OptionsChanged(); bHandout = bOn; } }
+ void SetOutline( sal_Bool bOn = sal_True ) { if( bOutline != bOn ) { OptionsChanged(); bOutline = bOn; } }
+ void SetDate( sal_Bool bOn = sal_True ) { if( bDate != bOn ) { OptionsChanged(); bDate = bOn; } }
+ void SetTime( sal_Bool bOn = sal_True ) { if( bTime != bOn ) { OptionsChanged(); bTime = bOn; } }
+ void SetPagename( sal_Bool bOn = sal_True ) { if( bPagename != bOn ) { OptionsChanged(); bPagename = bOn; } }
+ void SetHiddenPages( sal_Bool bOn = sal_True ) { if( bHiddenPages != bOn ) { OptionsChanged(); bHiddenPages = bOn; } }
+ void SetPagesize( sal_Bool bOn = sal_True ) { if( bPagesize != bOn ) { OptionsChanged(); bPagesize = bOn; } }
+ void SetPagetile( sal_Bool bOn = sal_True ) { if( bPagetile != bOn ) { OptionsChanged(); bPagetile = bOn; } }
+ void SetWarningPrinter( sal_Bool bOn = sal_True ) { if( bWarningPrinter != bOn ) { OptionsChanged(); bWarningPrinter = bOn; } }
+ void SetWarningSize( sal_Bool bOn = sal_True ) { if( bWarningSize != bOn ) { OptionsChanged(); bWarningSize = bOn; } }
+ void SetWarningOrientation( sal_Bool bOn = sal_True ) { if( bWarningOrientation != bOn ) { OptionsChanged(); bWarningOrientation = bOn; } }
+ void SetBooklet( sal_Bool bOn = sal_True ) { if( bBooklet != bOn ) { OptionsChanged(); bBooklet = bOn; } }
+ void SetFrontPage( sal_Bool bOn = sal_True ) { if( bFront != bOn ) { OptionsChanged(); bFront = bOn; } }
+ void SetBackPage( sal_Bool bOn = sal_True ) { if( bBack != bOn ) { OptionsChanged(); bBack = bOn; } }
+ void SetCutPage( sal_Bool bOn = sal_True ) { if( bCutPage != bOn ) { OptionsChanged(); bCutPage = bOn; } }
+ void SetPaperbin( sal_Bool bOn = sal_True ) { if( bPaperbin != bOn ) { OptionsChanged(); bPaperbin = bOn; } }
+ void SetOutputQuality( sal_uInt16 nInQuality ) { if( nQuality != nInQuality ) { OptionsChanged(); nQuality = nInQuality; } }
+ void SetHandoutHorizontal( sal_Bool bHandoutHorizontal ) { if( mbHandoutHorizontal != bHandoutHorizontal ) { OptionsChanged(); mbHandoutHorizontal = bHandoutHorizontal; } }
+ void SetHandoutPages( sal_uInt16 nHandoutPages ) { if( nHandoutPages != mnHandoutPages ) { OptionsChanged(); mnHandoutPages = nHandoutPages; } }
};
// -----------------------------------------------------------------------------
@@ -640,8 +649,8 @@ class SD_DLLPUBLIC SdOptionsPrintItem : public SfxPoolItem
{
public:
- SdOptionsPrintItem( USHORT nWhich);
- SdOptionsPrintItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsPrintItem( sal_uInt16 nWhich);
+ SdOptionsPrintItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
@@ -665,10 +674,10 @@ class SdOptions : public SdOptionsLayout, public SdOptionsContents,
{
public:
- SdOptions( USHORT nConfigId );
+ SdOptions( sal_uInt16 nConfigId );
virtual ~SdOptions();
- void StoreConfig( ULONG nOptionRange = SD_OPTIONS_ALL );
+ void StoreConfig( sal_uLong nOptionRange = SD_OPTIONS_ALL );
};
#endif // _SD_OPTSITEM_HXX
diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx
index f182f4311dab..b186f200aeca 100644..100755
--- a/sd/source/ui/inc/prltempl.hxx
+++ b/sd/source/ui/inc/prltempl.hxx
@@ -64,9 +64,9 @@ private:
XDashList* pDashList;
XLineEndList* pLineEndList;
- USHORT nPageType;
- USHORT nDlgType;
- USHORT nPos;
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
+ sal_uInt16 nPos;
ChangeType nColorTableState;
ChangeType nBitmapListState;
@@ -77,14 +77,14 @@ private:
PresentationObjects ePO;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
// fuers Maping mit dem neuen SvxNumBulletItem
SfxItemSet aInputSet;
SfxItemSet* pOutSet;
const SfxItemSet* pOrgSet;
- USHORT GetOutlineLevel() const;
+ sal_uInt16 GetOutlineLevel() const;
using SfxTabDialog::GetOutputItemSet;
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 291f40e0e7b6..a3ed535d61cb 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -94,7 +94,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
void SetDrawMode();
diff --git a/sd/source/ui/inc/pubdlg.hxx b/sd/source/ui/inc/pubdlg.hxx
index 544b7c6cb5c5..b264cc6ae89e 100644..100755
--- a/sd/source/ui/inc/pubdlg.hxx
+++ b/sd/source/ui/inc/pubdlg.hxx
@@ -172,8 +172,8 @@ private:
Assistent aAssistentFunc;
- BOOL m_bImpress;
- BOOL m_bButtonsDirty;
+ sal_Bool m_bImpress;
+ sal_Bool m_bButtonsDirty;
void SetDefaults();
void CreatePages();
@@ -186,10 +186,10 @@ private:
void UpdatePage();
List* m_pDesignList;
- BOOL m_bDesignListDirty;
+ sal_Bool m_bDesignListDirty;
SdPublishingDesign* m_pDesign;
- BOOL Load();
- BOOL Save();
+ sal_Bool Load();
+ sal_Bool Save();
void GetDesign( SdPublishingDesign* pDesign );
void SetDesign( SdPublishingDesign* pDesign );
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 170166e05e79..2feaec4f360e 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -67,7 +67,7 @@ class SD_DLLPUBLIC SdPageObjsTLB : public SvTreeListBox
{
private:
- static BOOL SD_DLLPRIVATE bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
+ static sal_Bool SD_DLLPRIVATE bIsInDrag; // static, falls der Navigator im ExecuteDrag geloescht wird
public:
@@ -135,8 +135,8 @@ protected:
SfxMedium* mpOwnMedium;
Image maImgOle;
Image maImgGraphic;
- BOOL mbLinkableSelected;
- BOOL mbDragEnabled;
+ sal_Bool mbLinkableSelected;
+ sal_Bool mbDragEnabled;
String maDocName;
::sd::DrawDocShellRef mxBookmarkDocShRef; // Zum Laden von Bookmarks
::sd::DrawDocShell* mpDropDocSh;
@@ -178,11 +178,11 @@ protected:
reorders both the involved shapes in their page as well as the
associated list box entries.
*/
- virtual BOOL NotifyMoving(
+ virtual sal_Bool NotifyMoving(
SvLBoxEntry* pTarget,
SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent,
- ULONG& rNewChildPos);
+ sal_uLong& rNewChildPos);
using Window::GetDropTarget;
virtual SvLBoxEntry* GetDropTarget (const Point& rLocation);
@@ -198,23 +198,24 @@ public:
void SetViewFrame( SfxViewFrame* pViewFrame ) { mpFrame = pViewFrame; }
SfxViewFrame* GetViewFrame() const { return mpFrame; }
- void Fill( const SdDrawDocument*, BOOL bAllPages, const String& rDocName );
+ void Fill( const SdDrawDocument*, sal_Bool bAllPages, const String& rDocName );
void Fill( const SdDrawDocument*, SfxMedium* pSfxMedium, const String& rDocName );
void SetShowAllShapes (const bool bShowAllShapes, const bool bFill);
bool GetShowAllShapes (void) const;
- BOOL IsEqualToDoc( const SdDrawDocument* pInDoc = NULL );
- BOOL HasSelectedChilds( const String& rName );
- BOOL SelectEntry( const String& rName );
+ sal_Bool IsEqualToDoc( const SdDrawDocument* pInDoc = NULL );
+ sal_Bool HasSelectedChilds( const String& rName );
+ sal_Bool SelectEntry( const String& rName );
String GetSelectEntry();
- List* GetSelectEntryList( USHORT nDepth );
+ List* GetSelectEntryList( sal_uInt16 nDepth );
SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = NULL);
::sd::DrawDocShell* GetDropDocSh() { return(mpDropDocSh); }
- BOOL IsLinkableSelected() const { return mbLinkableSelected; }
+ sal_Bool IsLinkableSelected() const { return mbLinkableSelected; }
- static BOOL IsInDrag();
+ static sal_Bool IsInDrag();
using SvLBox::ExecuteDrop;
+ using SvTreeListBox::SelectEntry;
private:
/** This flag controls whether all shapes are shown as children of pages
and group shapes or only the named shapes.
diff --git a/sd/source/ui/inc/sdundogr.hxx b/sd/source/ui/inc/sdundogr.hxx
index fdc2c3c2abc7..2af43c4f8f7d 100644
--- a/sd/source/ui/inc/sdundogr.hxx
+++ b/sd/source/ui/inc/sdundogr.hxx
@@ -43,13 +43,13 @@ public:
aCtn(16, 16, 16) {}
virtual ~SdUndoGroup();
- virtual BOOL Merge( SfxUndoAction* pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction* pNextAction );
virtual void Undo();
virtual void Redo();
void AddAction(SdUndoAction* pAction);
- ULONG Count() const { return aCtn.Count(); }
+ sal_uLong Count() const { return aCtn.Count(); }
};
diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx
index 749c7b4fede4..fdd2c9401acb 100644..100755
--- a/sd/source/ui/inc/sdxfer.hxx
+++ b/sd/source/ui/inc/sdxfer.hxx
@@ -54,7 +54,7 @@ class SdTransferable : public TransferableHelper, public SfxListener
{
public:
- SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView, BOOL bInitOnGetData );
+ SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView, sal_Bool bInitOnGetData );
~SdTransferable();
void SetDocShell( const SfxObjectShellRef& rRef ) { maDocShellRef = rRef; }
@@ -71,14 +71,14 @@ public:
void SetStartPos( const Point& rStartPos ) { maStartPos = rStartPos; }
const Point& GetStartPos() const { return maStartPos; }
- void SetInternalMove( BOOL bSet ) { mbInternalMove = bSet; }
- BOOL IsInternalMove() const { return mbInternalMove; }
+ void SetInternalMove( sal_Bool bSet ) { mbInternalMove = bSet; }
+ sal_Bool IsInternalMove() const { return mbInternalMove; }
- BOOL HasSourceDoc( const SdDrawDocument* pDoc ) const { return( mpSourceDoc == pDoc ); }
+ sal_Bool HasSourceDoc( const SdDrawDocument* pDoc ) const { return( mpSourceDoc == pDoc ); }
- void SetPageBookmarks( const List& rPageBookmarks, BOOL bPersistent );
- BOOL IsPageTransferable() const { return mbPageTransferable; }
- BOOL HasPageBookmarks() const { return( mpPageDocShell && ( maPageBookmarks.Count() > 0 ) ); }
+ void SetPageBookmarks( const List& rPageBookmarks, sal_Bool bPersistent );
+ sal_Bool IsPageTransferable() const { return mbPageTransferable; }
+ sal_Bool HasPageBookmarks() const { return( mpPageDocShell && ( maPageBookmarks.Count() > 0 ) ); }
const List& GetPageBookmarks() const { return maPageBookmarks; }
::sd::DrawDocShell* GetPageDocShell() const { return mpPageDocShell; }
@@ -118,12 +118,12 @@ private:
ImageMap* mpImageMap;
Rectangle maVisArea;
Point maStartPos;
- BOOL mbInternalMove : 1;
- BOOL mbOwnDocument : 1;
- BOOL mbOwnView : 1;
- BOOL mbLateInit : 1;
- BOOL mbPageTransferable : 1;
- BOOL mbPageTransferablePersistent : 1;
+ sal_Bool mbInternalMove : 1;
+ sal_Bool mbOwnDocument : 1;
+ sal_Bool mbOwnView : 1;
+ sal_Bool mbLateInit : 1;
+ sal_Bool mbPageTransferable : 1;
+ sal_Bool mbPageTransferablePersistent : 1;
bool mbIsUnoObj : 1;
// not available
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index a776197ea1ff..5e67832ff467 100644
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -77,11 +77,11 @@ public:
::sd::View& getView() const { return mrView; }
protected:
- virtual ULONG GetMarkablePointCount() const;
- virtual ULONG GetMarkedPointCount() const;
- virtual BOOL MarkPoint(SdrHdl& rHdl, BOOL bUnmark=FALSE);
+ virtual sal_uLong GetMarkablePointCount() const;
+ virtual sal_uLong GetMarkedPointCount() const;
+ virtual sal_Bool MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark=sal_False);
virtual void CheckPossibilities();
- virtual BOOL MarkPoints(const Rectangle* pRect, BOOL bUnmark);
+ virtual sal_Bool MarkPoints(const Rectangle* pRect, sal_Bool bUnmark);
virtual void addCustomHandles( SdrHdlList& rHandlerList );
virtual void select();
@@ -140,13 +140,13 @@ public:
bool getContext( SdrViewContext& rContext ) const;
// support point editing
- BOOL HasMarkablePoints() const;
- ULONG GetMarkablePointCount() const;
- BOOL HasMarkedPoints() const;
- ULONG GetMarkedPointCount() const;
- BOOL IsPointMarkable(const SdrHdl& rHdl) const;
- BOOL MarkPoint(SdrHdl& rHdl, BOOL bUnmark=FALSE);
- BOOL MarkPoints(const Rectangle* pRect, BOOL bUnmark);
+ sal_Bool HasMarkablePoints() const;
+ sal_uLong GetMarkablePointCount() const;
+ sal_Bool HasMarkedPoints() const;
+ sal_uLong GetMarkedPointCount() const;
+ sal_Bool IsPointMarkable(const SdrHdl& rHdl) const;
+ sal_Bool MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark=sal_False);
+ sal_Bool MarkPoints(const Rectangle* pRect, sal_Bool bUnmark);
void CheckPossibilities();
diff --git a/sd/source/ui/inc/sprite.hxx b/sd/source/ui/inc/sprite.hxx
index fed519b25d7f..d67163ee59e7 100644..100755
--- a/sd/source/ui/inc/sprite.hxx
+++ b/sd/source/ui/inc/sprite.hxx
@@ -51,7 +51,7 @@ public:
Sprite( List* pListOfBmpEx );
~Sprite();
- BOOL StartMoving( OutputDevice* pOut,
+ sal_Bool StartMoving( OutputDevice* pOut,
OutputDevice* pBottomLayer = NULL,
BitmapEx* pTopLayer = NULL,
MetaFile** ppTopMtf = NULL,
@@ -76,10 +76,10 @@ protected:
Marker* pObjStartMarker;
Marker* pObjEndMarker;
List* pListOfBmpEx;
- ULONG nLastTime;
- BOOL bClipRegion;
+ sal_uLong nLastTime;
+ sal_Bool bClipRegion;
- BOOL ImplPrepareMoveTo();
+ sal_Bool ImplPrepareMoveTo();
void ImplDrawSprite( OutputDevice* pOut, const Point& rPt, const Size& rSz );
};
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index 7f5086057e5c..97693308ee07 100755
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -500,6 +500,9 @@
#define STR_NAVIGATOR_SHOW_NAMED_SHAPES (RID_APP_START+718)
#define STR_NAVIGATOR_SHOW_ALL_SHAPES (RID_APP_START+719)
#define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720)
+//IAccessibility2 Implementation 2009-----
+#define STR_ACC_DIALOG_DESC (RID_APP_START + 730)
+//-----IAccessibility2 Implementation 2009
#define STR_RESET_LAYOUT (RID_APP_START+721)
#define STR_INSERT_TABLE (RID_APP_START+722)
diff --git a/sd/source/ui/inc/tabtempl.hxx b/sd/source/ui/inc/tabtempl.hxx
index 1b6b3f4aa373..b7e46f603d0e 100644..100755
--- a/sd/source/ui/inc/tabtempl.hxx
+++ b/sd/source/ui/inc/tabtempl.hxx
@@ -61,15 +61,15 @@ private:
XDashList* pDashList;
XLineEndList* pLineEndList;
- USHORT nPageType;
- USHORT nDlgType;
- USHORT nPos;
+ sal_uInt16 nPageType;
+ sal_uInt16 nDlgType;
+ sal_uInt16 nPos;
ChangeType nColorTableState;
ChangeType nBitmapListState;
ChangeType nGradientListState;
ChangeType nHatchingListState;
- virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
+ virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
virtual const SfxItemSet* GetRefreshedSet();
public:
diff --git a/sd/source/ui/inc/taskpane/ControlContainer.hxx b/sd/source/ui/inc/taskpane/ControlContainer.hxx
index d14dd1418f44..9f4ad9219f18 100644
--- a/sd/source/ui/inc/taskpane/ControlContainer.hxx
+++ b/sd/source/ui/inc/taskpane/ControlContainer.hxx
@@ -106,8 +106,6 @@ public:
*/
sal_uInt32 GetControlIndex (TreeNode* pControl) const;
- sal_uInt32 GetActiveControlIndex (void) const;
-
/** Return the number of controls in the container.
*/
sal_uInt32 GetControlCount (void) const;
@@ -165,18 +163,6 @@ public:
bool bIncludeHidden=false,
bool bCycle=false) const;
- /** Return the index of the first control.
- @param bIncludeHidden
- When <FALSE/> then the first visible control is returned.
- */
- sal_uInt32 GetFirstIndex (bool bIncludeHidden=false);
-
- /** Return the index of the last control.
- @param bIncludeHidden
- When <FALSE/> then the last visible control is returned.
- */
- sal_uInt32 GetLastIndex (bool bIncludeHidden=false);
-
void SetMultiSelection (bool bFlag);
/** This is method is called when the list of controls has changed,
diff --git a/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
index 92186cbc2529..0667eb0f58fc 100644
--- a/sd/source/ui/inc/taskpane/ScrollPanel.hxx
+++ b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
@@ -57,10 +57,6 @@ class ScrollPanel
public TreeNode
{
public:
- /** Create a new sub tool panel with the given window as its
- parent. This will usually be a child window.
- */
- ScrollPanel (TreeNode* pParent);
/** Create a new scroll panel which itself is the root of a TreeNode hierarchy
parent. This will usually be a child window.
*/
@@ -81,7 +77,7 @@ public:
TitledControl* AddControl (
::std::auto_ptr<TreeNode> pControl,
const String& rTitle,
- ULONG nHelpId);
+ const rtl::OString& sHelpId);
/** Add a control to the sub panel without a title bar.
*/
diff --git a/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
index 46063086bfa3..a69ab2ae6274 100644
--- a/sd/source/ui/inc/taskpane/SubToolPanel.hxx
+++ b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
@@ -65,7 +65,6 @@ public:
/** Create a new sub tool panel with the given window as its
parent. This will usually be a child window.
*/
- SubToolPanel (TreeNode* pParent);
SubToolPanel (Window& i_rParentWindow);
virtual ~SubToolPanel (void);
diff --git a/sd/source/ui/inc/taskpane/TitleBar.hxx b/sd/source/ui/inc/taskpane/TitleBar.hxx
index 052fd39f3b4c..3fad137c55ad 100644
--- a/sd/source/ui/inc/taskpane/TitleBar.hxx
+++ b/sd/source/ui/inc/taskpane/TitleBar.hxx
@@ -153,7 +153,7 @@ private:
void PaintText (const Rectangle& rTextBox);
- USHORT GetTextStyle (void);
+ sal_uInt16 GetTextStyle (void);
const static int snIndentationWidth;
diff --git a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
index 46efdaea259e..8a0faf9a7d03 100644
--- a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
+++ b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
@@ -93,9 +93,6 @@ public:
virtual SdPage* GetActualPage (void);
virtual SdPage* getCurrentPage (void) const;
- void Execute (SfxRequest& rRequest);
- void GetState (SfxItemSet& rItemSet);
-
virtual void ArrangeGUIElements (void);
TaskPaneShellManager& GetSubShellManager (void) const;
@@ -146,7 +143,7 @@ private:
/** The id of the menu in the menu bar/tool box of the parent docking
window.
*/
- USHORT mnMenuId;
+ sal_uInt16 mnMenuId;
/** Create a popup menu. it contains two sections, one for
docking or un-docking the tool panel, one for toggling the
diff --git a/sd/source/ui/inc/tbx_ww.hxx b/sd/source/ui/inc/tbx_ww.hxx
index 434551e08825..357ce5982bd2 100644..100755
--- a/sd/source/ui/inc/tbx_ww.hxx
+++ b/sd/source/ui/inc/tbx_ww.hxx
@@ -48,7 +48,7 @@ private:
DECL_LINK( TbxSelectHdl, ToolBox * );
public:
- SdPopupWindowTbx( USHORT nId, WindowAlign eAlign,
+ SdPopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign,
SdResId aRIdWin, SdResId aRIdTbx, SfxBindings& rBindings );
~SdPopupWindowTbx();
@@ -72,17 +72,17 @@ private:
class SdTbxControl : public SfxToolBoxControl
{
private:
- BOOL IsCheckable( USHORT nSId );
+ sal_Bool IsCheckable( sal_uInt16 nSId );
public:
SFX_DECL_TOOLBOX_CONTROL();
- SdTbxControl(USHORT nSlotId, USHORT nId, ToolBox& rTbx );
+ SdTbxControl(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SdTbxControl() {}
virtual SfxPopupWindowType GetPopupWindowType() const;
virtual SfxPopupWindow* CreatePopupWindow();
- virtual void StateChanged( USHORT nSId, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pState );
};
diff --git a/sd/source/ui/inc/tmplctrl.hxx b/sd/source/ui/inc/tmplctrl.hxx
index 254247103310..51f1238dfaff 100644..100755
--- a/sd/source/ui/inc/tmplctrl.hxx
+++ b/sd/source/ui/inc/tmplctrl.hxx
@@ -34,10 +34,10 @@
class SdTemplateControl : public SfxStatusBarControl
{
public:
- SdTemplateControl( USHORT nSlotId, USHORT nId, StatusBar& rStb );
+ SdTemplateControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb );
~SdTemplateControl();
- virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState );
+ virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState );
virtual void Paint( const UserDrawEvent& rEvt );
SFX_DECL_STATUSBAR_CONTROL();
diff --git a/sd/source/ui/inc/tools/AsynchronousTask.hxx b/sd/source/ui/inc/tools/AsynchronousTask.hxx
index f27508cd278a..f27508cd278a 100644..100755
--- a/sd/source/ui/inc/tools/AsynchronousTask.hxx
+++ b/sd/source/ui/inc/tools/AsynchronousTask.hxx
diff --git a/sd/source/ui/inc/tools/IconCache.hxx b/sd/source/ui/inc/tools/IconCache.hxx
index eb3855e1c961..caf73750d4fc 100644..100755
--- a/sd/source/ui/inc/tools/IconCache.hxx
+++ b/sd/source/ui/inc/tools/IconCache.hxx
@@ -58,7 +58,7 @@ public:
given id or an error occurred. Should not happen under normal
circumstances.
*/
- Image GetIcon (USHORT nResourceId);
+ Image GetIcon (sal_uInt16 nResourceId);
private:
class Implementation;
diff --git a/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx b/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx
index d37aa44d4550..d37aa44d4550 100644..100755
--- a/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx
+++ b/sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx
diff --git a/sd/source/ui/inc/tpaction.hrc b/sd/source/ui/inc/tpaction.hrc
index e273b9cb573c..0c4fe8a265d9 100644..100755
--- a/sd/source/ui/inc/tpaction.hrc
+++ b/sd/source/ui/inc/tpaction.hrc
@@ -49,3 +49,6 @@
#define FT_TREE 5
#define TP_ANIMATION 787
#define TP_ANIMATION_ACTION 789
+//IAccessibility2 Implementation 2009-----
+#define STR_PATHNAME 1
+ //-----IAccessibility2 Implementation 2009
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index 4d8ba7cf67a9..66afd44f582c 100644
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -96,7 +96,7 @@ private:
SdDrawDocument* mpDoc;
XColorTable* pColTab;
- BOOL bTreeUpdated;
+ sal_Bool bTreeUpdated;
List* pCurrentActions;
String aLastFile;
::std::vector< long > aVerbVector;
@@ -114,9 +114,9 @@ private:
void SetActualClickAction( ::com::sun::star::presentation::ClickAction eCA );
void SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
void SetEditText( String const & rStr );
- String GetEditText( BOOL bURL = FALSE );
- USHORT GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
- USHORT GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
+ String GetEditText( sal_Bool bURL = sal_False );
+ sal_uInt16 GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
+ sal_uInt16 GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
public:
SdTPAction( Window* pParent, const SfxItemSet& rInAttrs );
@@ -124,7 +124,7 @@ public:
static SfxTabPage* Create( Window*, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
virtual void ActivatePage( const SfxItemSet& rSet );
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index 28bb8dedc002..c99e9f7af23e 100644..100755
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -51,7 +51,7 @@ public:
~SdTpOptionsSnap();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
};
@@ -75,7 +75,7 @@ public:
~SdTpOptionsContents();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
};
@@ -134,15 +134,15 @@ private:
MetricField aMtrFldInfo1;
MetricField aMtrFldInfo2;
- UINT32 nWidth;
- UINT32 nHeight;
+ sal_uInt32 nWidth;
+ sal_uInt32 nHeight;
String aInfo1;
String aInfo2;
SfxMapUnit ePoolUnit;
- String GetScale( INT32 nX, INT32 nY );
- BOOL SetScale( const String& aScale, INT32& rX, INT32& rY );
+ String GetScale( sal_Int32 nX, sal_Int32 nY );
+ sal_Bool SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
DECL_LINK( ModifyScaleHdl, void * );
DECL_LINK( ModifyOriginalScaleHdl, void * );
@@ -163,7 +163,7 @@ public:
~SdTpOptionsMisc();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- virtual BOOL FillItemSet( SfxItemSet& );
+ virtual sal_Bool FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
/** Hide Impress specific controls, make Draw specific controls visible
diff --git a/sd/source/ui/inc/undopage.hxx b/sd/source/ui/inc/undopage.hxx
index 49d1505b1fa1..8e6ba7a6c9e3 100644..100755
--- a/sd/source/ui/inc/undopage.hxx
+++ b/sd/source/ui/inc/undopage.hxx
@@ -44,48 +44,48 @@ class SdPageFormatUndoAction : public SdUndoAction
SdPage* mpPage;
Size maOldSize;
- INT32 mnOldLeft;
- INT32 mnOldRight;
- INT32 mnOldUpper;
- INT32 mnOldLower;
- BOOL mbOldScale;
+ sal_Int32 mnOldLeft;
+ sal_Int32 mnOldRight;
+ sal_Int32 mnOldUpper;
+ sal_Int32 mnOldLower;
+ sal_Bool mbOldScale;
Orientation meOldOrientation;
- USHORT mnOldPaperBin;
- BOOL mbOldFullSize;
+ sal_uInt16 mnOldPaperBin;
+ sal_Bool mbOldFullSize;
Size maNewSize;
- INT32 mnNewLeft;
- INT32 mnNewRight;
- INT32 mnNewUpper;
- INT32 mnNewLower;
- BOOL mbNewScale;
+ sal_Int32 mnNewLeft;
+ sal_Int32 mnNewRight;
+ sal_Int32 mnNewUpper;
+ sal_Int32 mnNewLower;
+ sal_Bool mbNewScale;
Orientation meNewOrientation;
- USHORT mnNewPaperBin;
- BOOL mbNewFullSize;
+ sal_uInt16 mnNewPaperBin;
+ sal_Bool mbNewFullSize;
public:
TYPEINFO();
SdPageFormatUndoAction( SdDrawDocument* pDoc,
SdPage* pThePage,
const Size& rOldSz,
- INT32 nOldLft,
- INT32 nOldRgt,
- INT32 nOldUpr,
- INT32 nOldLwr,
- BOOL bOldScl,
+ sal_Int32 nOldLft,
+ sal_Int32 nOldRgt,
+ sal_Int32 nOldUpr,
+ sal_Int32 nOldLwr,
+ sal_Bool bOldScl,
Orientation eOldOrient,
- USHORT nOPaperBin,
- BOOL bOFullSize,
+ sal_uInt16 nOPaperBin,
+ sal_Bool bOFullSize,
const Size& rNewSz,
- INT32 nNewLft,
- INT32 nNewRgt,
- INT32 nNewUpr,
- INT32 nNewLwr,
- BOOL bNewScl,
+ sal_Int32 nNewLft,
+ sal_Int32 nNewRgt,
+ sal_Int32 nNewUpr,
+ sal_Int32 nNewLwr,
+ sal_Bool bNewScl,
Orientation eNewOrient,
- USHORT nNPaperBin,
- BOOL bNFullSize
+ sal_uInt16 nNPaperBin,
+ sal_Bool bNFullSize
) :
SdUndoAction(pDoc),
mpPage (pThePage),
@@ -123,16 +123,16 @@ class SdPageLRUndoAction : public SdUndoAction
{
SdPage* mpPage;
- INT32 mnOldLeft;
- INT32 mnOldRight;
- INT32 mnNewLeft;
- INT32 mnNewRight;
+ sal_Int32 mnOldLeft;
+ sal_Int32 mnOldRight;
+ sal_Int32 mnNewLeft;
+ sal_Int32 mnNewRight;
public:
TYPEINFO();
SdPageLRUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
- INT32 nOldLft, INT32 nOldRgt,
- INT32 nNewLft, INT32 nNewRgt ) :
+ sal_Int32 nOldLft, sal_Int32 nOldRgt,
+ sal_Int32 nNewLft, sal_Int32 nNewRgt ) :
SdUndoAction(pDoc),
mpPage (pThePage),
mnOldLeft (nOldLft),
@@ -152,16 +152,16 @@ class SdPageULUndoAction : public SdUndoAction
{
SdPage* mpPage;
- INT32 mnOldUpper;
- INT32 mnOldLower;
- INT32 mnNewUpper;
- INT32 mnNewLower;
+ sal_Int32 mnOldUpper;
+ sal_Int32 mnOldLower;
+ sal_Int32 mnNewUpper;
+ sal_Int32 mnNewLower;
public:
TYPEINFO();
SdPageULUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
- INT32 nOldUpr, INT32 nOldLwr,
- INT32 nNewUpr, INT32 nNewLwr ) :
+ sal_Int32 nOldUpr, sal_Int32 nOldLwr,
+ sal_Int32 nNewUpr, sal_Int32 nNewLwr ) :
SdUndoAction(pDoc),
mpPage (pThePage),
mnOldUpper (nOldUpr),
diff --git a/sd/source/ui/inc/unmodpg.hxx b/sd/source/ui/inc/unmodpg.hxx
index 2181ab587e69..83fc603d955a 100644..100755
--- a/sd/source/ui/inc/unmodpg.hxx
+++ b/sd/source/ui/inc/unmodpg.hxx
@@ -37,30 +37,27 @@ class SdPage;
class ModifyPageUndoAction : public SdUndoAction
{
- SfxUndoManager* mpManager;
-
SdPage* mpPage;
String maOldName;
String maNewName;
AutoLayout meOldAutoLayout;
AutoLayout meNewAutoLayout;
- BOOL mbOldBckgrndVisible;
- BOOL mbNewBckgrndVisible;
- BOOL mbOldBckgrndObjsVisible;
- BOOL mbNewBckgrndObjsVisible;
+ sal_Bool mbOldBckgrndVisible;
+ sal_Bool mbNewBckgrndVisible;
+ sal_Bool mbOldBckgrndObjsVisible;
+ sal_Bool mbNewBckgrndObjsVisible;
String maComment;
public:
TYPEINFO();
ModifyPageUndoAction(
- SfxUndoManager* pManager,
SdDrawDocument* pTheDoc,
SdPage* pThePage,
String aTheNewName,
AutoLayout eTheNewAutoLayout,
- BOOL bTheNewBckgrndVisible,
- BOOL bTheNewBckgrndObjsVisible);
+ sal_Bool bTheNewBckgrndVisible,
+ sal_Bool bTheNewBckgrndObjsVisible);
virtual ~ModifyPageUndoAction();
virtual void Undo();
diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx
index 7640be9ed6ed..2ce6296def27 100644
--- a/sd/source/ui/inc/unoaprms.hxx
+++ b/sd/source/ui/inc/unoaprms.hxx
@@ -44,20 +44,20 @@ class SdrObject;
class SdAnimationPrmsUndoAction : public SdUndoAction
{
SdrObject* pObject;
- BOOL bOldActive;
- BOOL bNewActive;
- BOOL bOldDimPrevious;
- BOOL bNewDimPrevious;
- BOOL bOldDimHide;
- BOOL bNewDimHide;
- BOOL bOldSoundOn;
- BOOL bNewSoundOn;
- BOOL bOldSecondSoundOn;
- BOOL bNewSecondSoundOn;
- BOOL bOldPlayFull;
- BOOL bNewPlayFull;
- BOOL bOldSecondPlayFull;
- BOOL bNewSecondPlayFull;
+ sal_Bool bOldActive;
+ sal_Bool bNewActive;
+ sal_Bool bOldDimPrevious;
+ sal_Bool bNewDimPrevious;
+ sal_Bool bOldDimHide;
+ sal_Bool bNewDimHide;
+ sal_Bool bOldSoundOn;
+ sal_Bool bNewSoundOn;
+ sal_Bool bOldSecondSoundOn;
+ sal_Bool bNewSecondSoundOn;
+ sal_Bool bOldPlayFull;
+ sal_Bool bNewPlayFull;
+ sal_Bool bOldSecondPlayFull;
+ sal_Bool bNewSecondPlayFull;
::com::sun::star::presentation::AnimationEffect eOldEffect;
::com::sun::star::presentation::AnimationEffect eNewEffect;
::com::sun::star::presentation::AnimationEffect eOldTextEffect;
@@ -80,25 +80,25 @@ class SdAnimationPrmsUndoAction : public SdUndoAction
::com::sun::star::presentation::ClickAction eNewClickAction;
String aOldBookmark;
String aNewBookmark;
- BOOL bOldInvisibleInPres;
- BOOL bNewInvisibleInPres;
- USHORT nOldVerb;
- USHORT nNewVerb;
- ULONG nOldPresOrder;
- ULONG nNewPresOrder;
+ sal_Bool bOldInvisibleInPres;
+ sal_Bool bNewInvisibleInPres;
+ sal_uInt16 nOldVerb;
+ sal_uInt16 nNewVerb;
+ sal_uLong nOldPresOrder;
+ sal_uLong nNewPresOrder;
- BOOL bInfoCreated;
+ sal_Bool bInfoCreated;
public:
TYPEINFO();
SdAnimationPrmsUndoAction(SdDrawDocument* pTheDoc, SdrObject* pObj,
- BOOL bCreated):
+ sal_Bool bCreated):
SdUndoAction (pTheDoc),
pObject (pObj),
bInfoCreated (bCreated)
{}
- void SetActive(BOOL bTheOldActive, BOOL bTheNewActive)
+ void SetActive(sal_Bool bTheOldActive, sal_Bool bTheNewActive)
{ bOldActive = bTheOldActive; bNewActive = bTheNewActive; }
void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
{ eOldEffect = eTheOldEffect; eNewEffect = eTheNewEffect; }
@@ -106,19 +106,19 @@ public:
{ eOldTextEffect = eTheOldEffect; eNewTextEffect = eTheNewEffect; }
void SetSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)
{ eOldSpeed = eTheOldSpeed; eNewSpeed = eTheNewSpeed; }
- void SetDim(BOOL bTheOldDim, BOOL bTheNewDim)
+ void SetDim(sal_Bool bTheOldDim, sal_Bool bTheNewDim)
{ bOldDimPrevious = bTheOldDim; bNewDimPrevious = bTheNewDim; }
void SetDimColor(Color aTheOldDimColor, Color aTheNewDimColor)
{ aOldDimColor = aTheOldDimColor; aNewDimColor = aTheNewDimColor; }
- void SetDimHide(BOOL bTheOldDimHide, BOOL bTheNewDimHide)
+ void SetDimHide(sal_Bool bTheOldDimHide, sal_Bool bTheNewDimHide)
{ bOldDimHide = bTheOldDimHide; bNewDimHide = bTheNewDimHide; }
- void SetSoundOn(BOOL bTheOldSoundOn, BOOL bTheNewSoundOn)
+ void SetSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn)
{ bOldSoundOn = bTheOldSoundOn; bNewSoundOn = bTheNewSoundOn; }
void SetSound(String aTheOldSound, String aTheNewSound)
{ aOldSoundFile = aTheOldSound; aNewSoundFile = aTheNewSound; }
void SetBlueScreen(Color aTheOldBlueScreen, Color aTheNewBlueScreen)
{ aOldBlueScreen = aTheOldBlueScreen; aNewBlueScreen = aTheNewBlueScreen; }
- void SetPlayFull(BOOL bTheOldPlayFull, BOOL bTheNewPlayFull)
+ void SetPlayFull(sal_Bool bTheOldPlayFull, sal_Bool bTheNewPlayFull)
{ bOldPlayFull = bTheOldPlayFull; bNewPlayFull = bTheNewPlayFull; }
void SetPathObj(SdrPathObj* pTheOldPath, SdrPathObj* pTheNewPath)
{ pOldPathObj = pTheOldPath; pNewPathObj = pTheNewPath; }
@@ -126,19 +126,19 @@ public:
{ eOldClickAction = eTheOldAction; eNewClickAction = eTheNewAction; }
void SetBookmark(String aTheOldBookmark, String aTheNewBookmark)
{ aOldBookmark = aTheOldBookmark; aNewBookmark = aTheNewBookmark; }
- void SetInvisibleInPres(BOOL bTheOldInvisibleInPres, BOOL bTheNewInvisibleInPres)
+ void SetInvisibleInPres(sal_Bool bTheOldInvisibleInPres, sal_Bool bTheNewInvisibleInPres)
{ bOldInvisibleInPres = bTheOldInvisibleInPres; bNewInvisibleInPres = bTheNewInvisibleInPres; }
- void SetVerb(USHORT nTheOldVerb, USHORT nTheNewVerb)
+ void SetVerb(sal_uInt16 nTheOldVerb, sal_uInt16 nTheNewVerb)
{ nOldVerb = nTheOldVerb; nNewVerb = nTheNewVerb; }
void SetSecondEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
{ eOldSecondEffect = eTheOldEffect; eNewSecondEffect = eTheNewEffect; }
void SetSecondSpeed(::com::sun::star::presentation::AnimationSpeed eTheOldSpeed, ::com::sun::star::presentation::AnimationSpeed eTheNewSpeed)
{ eOldSecondSpeed = eTheOldSpeed; eNewSecondSpeed = eTheNewSpeed; }
- void SetSecondSoundOn(BOOL bTheOldSoundOn, BOOL bTheNewSoundOn)
+ void SetSecondSoundOn(sal_Bool bTheOldSoundOn, sal_Bool bTheNewSoundOn)
{ bOldSecondSoundOn = bTheOldSoundOn; bNewSecondSoundOn = bTheNewSoundOn; }
- void SetSecondPlayFull(BOOL bTheOldPlayFull, BOOL bTheNewPlayFull)
+ void SetSecondPlayFull(sal_Bool bTheOldPlayFull, sal_Bool bTheNewPlayFull)
{ bOldSecondPlayFull = bTheOldPlayFull; bNewSecondPlayFull = bTheNewPlayFull; }
- void SetPresOrder(ULONG nTheOldPresOrder, ULONG nTheNewPresOrder)
+ void SetPresOrder(sal_uLong nTheOldPresOrder, sal_uLong nTheNewPresOrder)
{ nOldPresOrder = nTheOldPresOrder; nNewPresOrder = nTheNewPresOrder; }
virtual ~SdAnimationPrmsUndoAction();
diff --git a/sd/source/ui/inc/unprlout.hxx b/sd/source/ui/inc/unprlout.hxx
index 73b8a7d2bf8b..c9130e6b2f0b 100644..100755
--- a/sd/source/ui/inc/unprlout.hxx
+++ b/sd/source/ui/inc/unprlout.hxx
@@ -41,7 +41,7 @@ class SdPresentationLayoutUndoAction : public SdUndoAction
String aNewLayoutName;
AutoLayout eOldAutoLayout;
AutoLayout eNewAutoLayout;
- BOOL bSetAutoLayout; // TRUE: AutoLayout aendern
+ sal_Bool bSetAutoLayout; // sal_True: AutoLayout aendern
SdPage* pPage;
String aComment;
@@ -52,7 +52,7 @@ public:
String aTheNewLayoutName,
AutoLayout eTheOldAutoLayout,
AutoLayout eTheNewAutoLayout,
- BOOL bSet,
+ sal_Bool bSet,
SdPage* pThePage);
virtual ~SdPresentationLayoutUndoAction();
diff --git a/sd/source/ui/inc/vectdlg.hxx b/sd/source/ui/inc/vectdlg.hxx
index b3f4b84a10b5..de71a72fe257 100644..100755
--- a/sd/source/ui/inc/vectdlg.hxx
+++ b/sd/source/ui/inc/vectdlg.hxx
@@ -30,7 +30,7 @@
#ifndef _SD_VECTDLG_HXX
#define _SD_VECTDLG_HXX
-#include <vcl/imagebtn.hxx>
+#include <vcl/button.hxx>
#include <vcl/group.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
index fa345337979a..137c183ef98d 100644
--- a/sd/source/ui/inc/view/viewoverlaymanager.hxx
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -59,7 +59,7 @@ public:
private:
ViewShellBase& mrBase;
- ULONG mnUpdateTagsEvent;
+ sal_uLong mnUpdateTagsEvent;
ViewTagVector maTagVector;
};
diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx
index 1d8c1f2237ad..555504224596 100644
--- a/sd/source/ui/inc/zoomlist.hxx
+++ b/sd/source/ui/inc/zoomlist.hxx
@@ -47,12 +47,12 @@ public:
void InsertZoomRect(const Rectangle& rRect);
Rectangle GetNextZoomRect();
Rectangle GetPreviousZoomRect();
- BOOL IsNextPossible() const;
- BOOL IsPreviousPossible() const;
+ sal_Bool IsNextPossible() const;
+ sal_Bool IsPreviousPossible() const;
private:
ViewShell* mpViewShell;
- ULONG mnCurPos;
+ sal_uLong mnCurPos;
};
} // end of namespace sd
diff --git a/sd/source/ui/notes/EditWindow.cxx b/sd/source/ui/notes/EditWindow.cxx
index 98aa817b14c3..9212ce6f5bec 100644
--- a/sd/source/ui/notes/EditWindow.cxx
+++ b/sd/source/ui/notes/EditWindow.cxx
@@ -114,7 +114,7 @@ EditWindow::~EditWindow (void)
void SmGetLeftSelectionPart(const ESelection aSel,
- USHORT &nPara, USHORT &nPos)
+ sal_uInt16 &nPara, sal_uInt16 &nPos)
// returns paragraph number and position of the selections left part
{
// compare start and end of selection and use the one that comes first
@@ -158,10 +158,10 @@ EditEngine* EditWindow::CreateEditEngine (void)
SvtLinguConfig().GetOptions( aOpt );
//
struct FontDta {
- INT16 nFallbackLang;
- INT16 nLang;
- USHORT nFontType;
- USHORT nFontInfoId;
+ sal_Int16 nFallbackLang;
+ sal_Int16 nLang;
+ sal_uInt16 nFontType;
+ sal_uInt16 nFontInfoId;
} aTable[3] =
{
// info to get western font to be used
@@ -208,8 +208,8 @@ EditEngine* EditWindow::CreateEditEngine (void)
pEditEngine = new EditEngine (mpEditEngineItemPool);
- pEditEngine->EnableUndo (TRUE);
- pEditEngine->SetDefTab (USHORT(
+ pEditEngine->EnableUndo (sal_True);
+ pEditEngine->SetDefTab (sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth(
UniString::CreateFromAscii("XXXX"))));
@@ -250,9 +250,9 @@ void EditWindow::DataChanged (const DataChangedEvent&)
//! see also SmDocShell::GetEditEngine() !
//!
- // pEditEngine->SetDefTab( USHORT( GetTextWidth( C2S("XXXX") ) ) );
+ // pEditEngine->SetDefTab( sal_uInt16( GetTextWidth( C2S("XXXX") ) ) );
- USHORT aFntInfoId[3] = {
+ sal_uInt16 aFntInfoId[3] = {
EE_CHAR_FONTINFO, EE_CHAR_FONTINFO_CJK, EE_CHAR_FONTINFO_CTL };
for (int i = 0; i < 3; ++i)
{
@@ -412,7 +412,7 @@ void EditWindow::CreateEditView (void)
mpEditView->SetSelection(eSelection);
Update();
- mpEditView->ShowCursor(TRUE, TRUE);
+ mpEditView->ShowCursor(sal_True, sal_True);
pEditEngine->SetStatusEventHdl(
LINK(this, EditWindow, EditStatusHdl));
@@ -551,7 +551,7 @@ void EditWindow::SetText(const XubString& rText)
pEditEngine->SetText(rText);
pEditEngine->ClearModifyFlag();
- //! Hier die Timer neu zu starten verhindert, dass die Handler für andere
+ //! Hier die Timer neu zu starten verhindert, dass die Handler f�r andere
//! (im Augenblick nicht mehr aktive) Math Tasks aufgerufen werden.
maModifyTimer.Start();
maCursorMoveTimer.Start();
@@ -582,16 +582,16 @@ void EditWindow::LoseFocus()
}
-BOOL EditWindow::IsAllSelected() const
+sal_Bool EditWindow::IsAllSelected() const
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
EditEngine *pEditEngine = ((EditWindow *) this)->GetEditEngine();
DBG_ASSERT( mpEditView, "NULL pointer" );
DBG_ASSERT( pEditEngine, "NULL pointer" );
if (pEditEngine && mpEditView)
{
ESelection eSelection( mpEditView->GetSelection() );
- INT32 nParaCnt = pEditEngine->GetParagraphCount();
+ sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
{
String Text( pEditEngine->GetText( LINEEND_LF ) );
@@ -624,7 +624,7 @@ void EditWindow::MarkError(const Point &rPos)
const int Col = rPos.X();
const int Row = rPos.Y() - 1;
- mpEditView->SetSelection(ESelection ( (USHORT)Row, (USHORT)(Col - 1), (USHORT)Row, (USHORT)Col));
+ mpEditView->SetSelection(ESelection ( (sal_uInt16)Row, (sal_uInt16)(Col - 1), (sal_uInt16)Row, (sal_uInt16)Col));
GrabFocus();
}
}
@@ -637,10 +637,10 @@ void EditWindow::SelNextMark()
if (pEditEngine && mpEditView)
{
ESelection eSelection = mpEditView->GetSelection();
- USHORT Pos = eSelection.nEndPos;
+ sal_uInt16 Pos = eSelection.nEndPos;
String aMark (UniString::CreateFromAscii("<?>"));
String aText;
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
while (eSelection.nEndPara < nCounts)
{
@@ -667,15 +667,15 @@ void EditWindow::SelPrevMark()
if (pEditEngine && mpEditView)
{
ESelection eSelection = mpEditView->GetSelection();
- USHORT Pos = STRING_NOTFOUND;
+ sal_uInt16 Pos = STRING_NOTFOUND;
xub_StrLen Max = eSelection.nStartPos;
String Text( pEditEngine->GetText( eSelection.nStartPara ) );
String aMark (UniString::CreateFromAscii("<?>"));
- USHORT nCounts = pEditEngine->GetParagraphCount();
+ sal_uInt16 nCounts = pEditEngine->GetParagraphCount();
do
{
- USHORT Fnd = Text.Search(aMark, 0);
+ sal_uInt16 Fnd = Text.Search(aMark, 0);
while ((Fnd < Max) && (Fnd != STRING_NOTFOUND))
{
@@ -700,7 +700,7 @@ void EditWindow::SelPrevMark()
}
}
-BOOL EditWindow::HasMark(const String& rText) const
+sal_Bool EditWindow::HasMark(const String& rText) const
// returns true iff 'rText' contains a mark
{
return rText.SearchAscii("<?>", 0) != STRING_NOTFOUND;
@@ -740,15 +740,15 @@ void EditWindow::SetSelection(const ESelection &rSel)
mpEditView->SetSelection(rSel);
}
-BOOL EditWindow::IsEmpty() const
+sal_Bool EditWindow::IsEmpty() const
{
EditEngine *pEditEngine = ((EditWindow *) this)->GetEditEngine();
- return (pEditEngine && (pEditEngine->GetTextLen() == 0)) ? TRUE : FALSE;
+ return (pEditEngine && (pEditEngine->GetTextLen() == 0)) ? sal_True : sal_False;
}
-BOOL EditWindow::IsSelected() const
+sal_Bool EditWindow::IsSelected() const
{
- return mpEditView ? mpEditView->HasSelection() : FALSE;
+ return mpEditView ? mpEditView->HasSelection() : sal_False;
}
void EditWindow::Cut()
diff --git a/sd/source/ui/notes/EditWindow.hxx b/sd/source/ui/notes/EditWindow.hxx
index cd4b827fab6a..e6d1e6fa79ea 100644
--- a/sd/source/ui/notes/EditWindow.hxx
+++ b/sd/source/ui/notes/EditWindow.hxx
@@ -107,9 +107,9 @@ private:
ESelection GetSelection() const;
void SetSelection(const ESelection &rSel);
- BOOL IsEmpty() const;
- BOOL IsSelected() const;
- BOOL IsAllSelected() const;
+ sal_Bool IsEmpty() const;
+ sal_Bool IsSelected() const;
+ sal_Bool IsAllSelected() const;
void Cut();
void Copy();
void Paste();
@@ -118,7 +118,7 @@ private:
void MarkError(const Point &rPos);
void SelNextMark();
void SelPrevMark();
- BOOL HasMark(const String &rText) const;
+ sal_Bool HasMark(const String &rText) const;
void ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg );
};
diff --git a/sd/source/ui/notes/NotesChildWindow.cxx b/sd/source/ui/notes/NotesChildWindow.cxx
index abd6a84d88ef..f997a4a61e9c 100644
--- a/sd/source/ui/notes/NotesChildWindow.cxx
+++ b/sd/source/ui/notes/NotesChildWindow.cxx
@@ -40,7 +40,7 @@ namespace sd { namespace notes {
NotesChildWindow::NotesChildWindow (
::Window* _pParent,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: SfxChildWindow (_pParent, nId)
diff --git a/sd/source/ui/notes/NotesChildWindow.src b/sd/source/ui/notes/NotesChildWindow.src
index f01a258bf812..14ac956ce9e3 100755
--- a/sd/source/ui/notes/NotesChildWindow.src
+++ b/sd/source/ui/notes/NotesChildWindow.src
@@ -27,10 +27,11 @@
#include "app.hrc"
#include "NotesChildWindow.hrc"
+#include "sdcommands.h"
DockingWindow FLT_WIN_NOTES
{
- HelpID = SID_NOTES_WINDOW ;
+ HelpID = CMD_SID_NOTES_WINDOW ;
Border = TRUE ;
Hide = FALSE ;
SVLook = TRUE ;
diff --git a/sd/source/ui/notes/TextLogger.cxx b/sd/source/ui/notes/TextLogger.cxx
index ffcd743accbc..b7b70c0bf420 100644
--- a/sd/source/ui/notes/TextLogger.cxx
+++ b/sd/source/ui/notes/TextLogger.cxx
@@ -123,7 +123,7 @@ IMPL_LINK(TextLogger, WindowEventHandler, VclWindowEvent*, pEvent)
break;
}
}
- return TRUE;
+ return sal_True;
}
diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.hxx b/sd/source/ui/presenter/CanvasUpdateRequester.hxx
index e8c8f5d93fbe..6ea1d3a5ec0a 100644..100755
--- a/sd/source/ui/presenter/CanvasUpdateRequester.hxx
+++ b/sd/source/ui/presenter/CanvasUpdateRequester.hxx
@@ -71,7 +71,7 @@ private:
static RequesterMap maRequesterMap;
css::uno::Reference<css::rendering::XSpriteCanvas> mxCanvas;
- ULONG mnUserEventId;
+ sal_uLong mnUserEventId;
sal_Bool mbUpdateFlag;
DECL_LINK(Callback, void*);
};
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 493c3c5a4bed..f7e06c2f89ff 100644..100755
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -136,7 +136,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
// Make the frame window transparent and make the parent able to
// draw behind it.
if (pParentWindow != NULL)
- pParentWindow->EnableChildTransparentMode(TRUE);
+ pParentWindow->EnableChildTransparentMode(sal_True);
}
if (pWindow != NULL)
@@ -148,12 +148,12 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
if ( ! bEnableParentClip)
{
pWindow->SetParentClipMode(PARENTCLIPMODE_NOCLIP);
- pWindow->SetPaintTransparent(TRUE);
+ pWindow->SetPaintTransparent(sal_True);
}
else
{
pWindow->SetParentClipMode(PARENTCLIPMODE_CLIP);
- pWindow->SetPaintTransparent(FALSE);
+ pWindow->SetPaintTransparent(sal_False);
}
}
diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx
index d7c8793a6d63..1d069f40b765 100644..100755
--- a/sd/source/ui/presenter/PresenterPreviewCache.cxx
+++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx
@@ -65,7 +65,8 @@ public:
// CacheContext
virtual void NotifyPreviewCreation (
- CacheKey aKey, const ::boost::shared_ptr<BitmapEx>& rPreview);
+ CacheKey aKey,
+ const Bitmap& rPreview);
virtual bool IsIdle (void);
virtual bool IsVisible (CacheKey aKey);
virtual const SdrPage* GetPage (CacheKey aKey);
@@ -123,7 +124,7 @@ PresenterPreviewCache::PresenterPreviewCache (const Reference<XComponentContext>
: PresenterPreviewCacheInterfaceBase(m_aMutex),
maPreviewSize(Size(200,200)),
mpCacheContext(new PresenterCacheContext()),
- mpCache(new PageCache(maPreviewSize, mpCacheContext))
+ mpCache(new PageCache(maPreviewSize, false, mpCacheContext))
{
(void)rxContext;
}
@@ -188,7 +189,7 @@ void SAL_CALL PresenterPreviewCache::setPreviewSize (
OSL_ASSERT(mpCache.get()!=NULL);
maPreviewSize = Size(rSize.Width, rSize.Height);
- mpCache->ChangeSize(maPreviewSize);
+ mpCache->ChangeSize(maPreviewSize, false);
}
@@ -210,7 +211,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview (
if (pPage == NULL)
throw RuntimeException();
- const BitmapEx aPreview (mpCache->GetPreviewBitmap(pPage, maPreviewSize));
+ const BitmapEx aPreview (mpCache->GetPreviewBitmap(pPage,true));
if (aPreview.IsEmpty())
return NULL;
else
@@ -369,7 +370,7 @@ void PresenterPreviewCache::PresenterCacheContext::RemovePreviewCreationNotifyLi
void PresenterPreviewCache::PresenterCacheContext::NotifyPreviewCreation (
CacheKey aKey,
- const ::boost::shared_ptr<BitmapEx>& rPreview)
+ const Bitmap& rPreview)
{
(void)rPreview;
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index ec3261686bdf..d8126597b4a2 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -364,10 +364,10 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine (void)
SvtLinguConfig().GetOptions( aOpt );
struct FontDta {
- INT16 nFallbackLang;
- INT16 nLang;
- USHORT nFontType;
- USHORT nFontInfoId;
+ sal_Int16 nFallbackLang;
+ sal_Int16 nLang;
+ sal_uInt16 nFontType;
+ sal_uInt16 nFontInfoId;
} aTable[3] =
{
// info to get western font to be used
@@ -404,8 +404,8 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine (void)
pEditEngine = new EditEngine (mpEditEngineItemPool);
- pEditEngine->EnableUndo (TRUE);
- pEditEngine->SetDefTab (USHORT(
+ pEditEngine->EnableUndo (sal_True);
+ pEditEngine->SetDefTab (sal_uInt16(
Application::GetDefaultDevice()->GetTextWidth(
UniString::CreateFromAscii("XXXX"))));
@@ -459,8 +459,8 @@ void PresenterTextView::Implementation::SetBackgroundColor (const Color aColor)
DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
DBG_ASSERT(mpEditEngineItemPool!=NULL, "EditEngineItemPool missing");
mpEditEngine->SetBackgroundColor(aColor);
- mpEditEngine->EnableAutoColor(FALSE);
- mpEditEngine->ForceAutoColor(FALSE);
+ mpEditEngine->EnableAutoColor(sal_False);
+ mpEditEngine->ForceAutoColor(sal_False);
}
@@ -577,7 +577,7 @@ Reference<rendering::XBitmap> PresenterTextView::Implementation::GetBitmap (void
delete mpOutputDevice;
mpOutputDevice = new VirtualDevice(*Application::GetDefaultDevice(), 0, 0);
mpOutputDevice->SetMapMode(MAP_PIXEL);
- mpOutputDevice->SetOutputSizePixel(maSize, TRUE);
+ mpOutputDevice->SetOutputSizePixel(maSize, sal_True);
mpOutputDevice->SetLineColor();
mpOutputDevice->SetFillColor();
mpOutputDevice->SetBackground(Wallpaper());
diff --git a/sd/source/ui/slideshow/makefile.mk b/sd/source/ui/slideshow/makefile.mk
index ad4f4d306c6b..62062d7e5461 100644..100755
--- a/sd/source/ui/slideshow/makefile.mk
+++ b/sd/source/ui/slideshow/makefile.mk
@@ -40,8 +40,7 @@ AUTOSEG=true
.INCLUDE : $(PRJ)$/util$/makefile.pmk
.IF "$(ENABLE_PRESENTER_EXTRA_UI)"=="YES"
-RSCDEFS+=-DENABLE_PRESENTER_EXTRA_UI
-ADDCDEFS+=-DENABLE_PRESENTER_EXTRA_UI
+ENABLE_PRESENTER_EXTRA_UI is not used anymore
.ENDIF
# --- Files --------------------------------------------------------
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index 18556148d00a..eccd94c6e960 100644..100755
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -50,8 +50,8 @@ using namespace ::com::sun::star;
namespace sd {
-static const ULONG HIDE_MOUSE_TIMEOUT = 10000;
-static const ULONG SHOW_MOUSE_TIMEOUT = 1000;
+static const sal_uLong HIDE_MOUSE_TIMEOUT = 10000;
+static const sal_uLong SHOW_MOUSE_TIMEOUT = 1000;
// =============================================================================
@@ -60,7 +60,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, ::
, mnPauseTimeout( SLIDE_NO_TIMEOUT )
, mnRestartPageIndex( PAGE_NO_END )
, meShowWindowMode(SHOWWINDOWMODE_NORMAL)
-, mbShowNavigatorAfterSpecialMode( FALSE )
+, mbShowNavigatorAfterSpecialMode( sal_False )
, mbMouseAutoHide(true)
, mbMouseCursorHidden(false)
, mnFirstMouseMove(0)
@@ -70,7 +70,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, ::
// Do never mirror the preview window. This explicitly includes right
// to left writing environments.
- EnableRTL (FALSE);
+ EnableRTL (sal_False);
MapMode aMap(GetMapMode());
aMap.SetMapUnit(MAP_100TH_MM);
@@ -105,7 +105,7 @@ ShowWindow::~ShowWindow(void)
void ShowWindow::KeyInput(const KeyEvent& rKEvt)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if( SHOWWINDOWMODE_PREVIEW == meShowWindowMode )
{
@@ -219,10 +219,10 @@ void ShowWindow::MouseMove(const MouseEvent& /*rMEvt*/)
{
// if this is not the first mouse move while hidden, see if
// enough time has pasted to show mouse pointer again
- ULONG nTime = Time::GetSystemTicks();
+ sal_uLong nTime = Time::GetSystemTicks();
if( (nTime - mnFirstMouseMove) >= SHOW_MOUSE_TIMEOUT )
{
- ShowPointer( TRUE );
+ ShowPointer( sal_True );
mnFirstMouseMove = 0;
mbMouseCursorHidden = false;
maMouseTimer.SetTimeout( HIDE_MOUSE_TIMEOUT );
@@ -307,7 +307,7 @@ void ShowWindow::Paint(const Rectangle& rRect)
}
else if( SHOWWINDOWMODE_PAUSE == meShowWindowMode )
{
- DrawPauseScene( FALSE );
+ DrawPauseScene( sal_False );
}
else if( SHOWWINDOWMODE_BLANK == meShowWindowMode )
{
@@ -324,7 +324,7 @@ void ShowWindow::Paint(const Rectangle& rRect)
long ShowWindow::Notify(NotifyEvent& rNEvt)
{
- long nOK = FALSE;
+ long nOK = sal_False;
if (!nOK)
nOK = Window::Notify(rNEvt);
@@ -366,7 +366,7 @@ void ShowWindow::Move()
// -----------------------------------------------------------------------------
-BOOL ShowWindow::SetEndMode()
+sal_Bool ShowWindow::SetEndMode()
{
if( ( SHOWWINDOWMODE_NORMAL == meShowWindowMode ) && mpViewShell && mpViewShell->GetView() )
{
@@ -377,8 +377,8 @@ BOOL ShowWindow::SetEndMode()
// hide navigator if it is visible
if( mpViewShell->GetViewFrame()->GetChildWindow( SID_NAVIGATOR ) )
{
- mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, FALSE );
- mbShowNavigatorAfterSpecialMode = TRUE;
+ mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_False );
+ mbShowNavigatorAfterSpecialMode = sal_True;
}
Invalidate();
@@ -389,7 +389,7 @@ BOOL ShowWindow::SetEndMode()
// -----------------------------------------------------------------------------
-BOOL ShowWindow::SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeout, Graphic* pLogo )
+sal_Bool ShowWindow::SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeout, Graphic* pLogo )
{
rtl::Reference< SlideShow > xSlideShow;
@@ -411,8 +411,8 @@ BOOL ShowWindow::SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeout
// hide navigator if it is visible
if( mpViewShell->GetViewFrame()->GetChildWindow( SID_NAVIGATOR ) )
{
- mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, FALSE );
- mbShowNavigatorAfterSpecialMode = TRUE;
+ mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_False );
+ mbShowNavigatorAfterSpecialMode = sal_True;
}
if( pLogo )
@@ -429,7 +429,7 @@ BOOL ShowWindow::SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeout
// -----------------------------------------------------------------------------
-BOOL ShowWindow::SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor )
+sal_Bool ShowWindow::SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor )
{
if( ( SHOWWINDOWMODE_NORMAL == meShowWindowMode ) && mpViewShell && mpViewShell->GetView() )
{
@@ -441,8 +441,8 @@ BOOL ShowWindow::SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlan
// hide navigator if it is visible
if( mpViewShell->GetViewFrame()->GetChildWindow( SID_NAVIGATOR ) )
{
- mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, FALSE );
- mbShowNavigatorAfterSpecialMode = TRUE;
+ mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_False );
+ mbShowNavigatorAfterSpecialMode = sal_True;
}
Invalidate();
@@ -475,8 +475,8 @@ void ShowWindow::TerminateShow()
// show navigator?
if( mbShowNavigatorAfterSpecialMode )
{
- mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, TRUE );
- mbShowNavigatorAfterSpecialMode = FALSE;
+ mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_True );
+ mbShowNavigatorAfterSpecialMode = sal_False;
}
}
@@ -532,14 +532,14 @@ void ShowWindow::RestartShow( sal_Int32 nPageIndexToRestart )
// show navigator?
if( mbShowNavigatorAfterSpecialMode )
{
- mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, TRUE );
- mbShowNavigatorAfterSpecialMode = FALSE;
+ mpViewShell->GetViewFrame()->ShowChildWindow( SID_NAVIGATOR, sal_True );
+ mbShowNavigatorAfterSpecialMode = sal_False;
}
}
// -----------------------------------------------------------------------------
-void ShowWindow::DrawPauseScene( BOOL bTimeoutOnly )
+void ShowWindow::DrawPauseScene( sal_Bool bTimeoutOnly )
{
const MapMode& rMap = GetMapMode();
const Point aOutOrg( PixelToLogic( Point() ) );
@@ -547,7 +547,7 @@ void ShowWindow::DrawPauseScene( BOOL bTimeoutOnly )
const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, rMap ) );
const Size aOffset( LogicToLogic( Size( 1000, 1000 ), MAP_100TH_MM, rMap ) );
String aText( SdResId( STR_PRES_PAUSE ) );
- BOOL bDrawn = FALSE;
+ sal_Bool bDrawn = sal_False;
Font aFont( GetSettings().GetStyleSettings().GetMenuFont() );
const Font aOldFont( GetFont() );
@@ -600,7 +600,7 @@ void ShowWindow::DrawPauseScene( BOOL bTimeoutOnly )
aText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " )" ));
aVDev.DrawText( Point( aOffset.Width(), 0 ), aText );
DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, aVDev );
- bDrawn = TRUE;
+ bDrawn = sal_True;
}
}
@@ -647,7 +647,7 @@ IMPL_LINK( ShowWindow, PauseTimeoutHdl, Timer*, pTimer )
RestartShow();
else
{
- DrawPauseScene( TRUE );
+ DrawPauseScene( sal_True );
pTimer->Start();
}
@@ -665,7 +665,7 @@ IMPL_LINK( ShowWindow, MouseTimeoutHdl, Timer*, EMPTYARG )
else
{
// mouse has been idle to long, hide pointer
- ShowPointer( FALSE );
+ ShowPointer( sal_False );
mbMouseCursorHidden = true;
}
return 0L;
@@ -694,9 +694,9 @@ void ShowWindow::DeleteWindowFromPaintView()
if( mpViewShell->GetView() )
mpViewShell->GetView()->DeleteWindowFromPaintView( this );
- USHORT nChild = GetChildCount();
+ sal_uInt16 nChild = GetChildCount();
while( nChild-- )
- GetChild( nChild )->Show( FALSE );
+ GetChild( nChild )->Show( sal_False );
}
void ShowWindow::AddWindowToPaintView()
@@ -704,9 +704,9 @@ void ShowWindow::AddWindowToPaintView()
if( mpViewShell->GetView() )
mpViewShell->GetView()->AddWindowToPaintView( this );
- USHORT nChild = GetChildCount();
+ sal_uInt16 nChild = GetChildCount();
while( nChild-- )
- GetChild( nChild )->Show( TRUE );
+ GetChild( nChild )->Show( sal_True );
}
} // end of namespace sd
diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx
index 41a385d46af2..31a447a630c9 100644..100755
--- a/sd/source/ui/slideshow/showwindow.hxx
+++ b/sd/source/ui/slideshow/showwindow.hxx
@@ -76,9 +76,9 @@ public:
ShowWindow ( const ::rtl::Reference< ::sd::SlideshowImpl >& xController, ::Window* pParent );
virtual ~ShowWindow (void);
- BOOL SetEndMode();
- BOOL SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
- BOOL SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
+ sal_Bool SetEndMode();
+ sal_Bool SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
+ sal_Bool SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
const Color& GetBlankColor() const { return maShowBackground.GetColor(); }
@@ -107,7 +107,7 @@ public:
void RestartShow();
private:
- void DrawPauseScene( BOOL bTimeoutOnly );
+ void DrawPauseScene( sal_Bool bTimeoutOnly );
void DrawEndScene();
void DrawBlankScene();
@@ -119,14 +119,14 @@ private:
Timer maMouseTimer;
Wallpaper maShowBackground;
Graphic maLogo;
- ULONG mnPauseTimeout;
+ sal_uLong mnPauseTimeout;
sal_Int32 mnRestartPageIndex;
ShowWindowMode meShowWindowMode;
- BOOL mbShowNavigatorAfterSpecialMode;
+ sal_Bool mbShowNavigatorAfterSpecialMode;
Rectangle maPresArea;
bool mbMouseAutoHide;
bool mbMouseCursorHidden;
- ULONG mnFirstMouseMove;
+ sal_uLong mnFirstMouseMove;
DECL_LINK( PauseTimeoutHdl, Timer* pTimer );
DECL_LINK( MouseTimeoutHdl, Timer* pTimer );
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index a17fdea1cd98..464aa4fe76e7 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -61,6 +61,7 @@
#include "FactoryIds.hxx"
#include "ViewShell.hxx"
#include "SlideShowRestarter.hxx"
+#include "DrawController.hxx"
#include <boost/bind.hpp>
using ::com::sun::star::presentation::XSlideShowController;
@@ -715,7 +716,7 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent());
if( pWorkWindow )
{
- pWorkWindow->StartPresentationMode( FALSE, isAlwaysOnTop() );
+ pWorkWindow->StartPresentationMode( sal_False, isAlwaysOnTop() );
}
}
}
@@ -754,7 +755,7 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
framework::FrameworkHelper::GetViewURL(ePreviousType),
framework::FrameworkHelper::msCenterPaneURL);
- pViewShell->GetViewFrame()->GetBindings().InvalidateAll( TRUE );
+ pViewShell->GetViewFrame()->GetBindings().InvalidateAll( sal_True );
}
}
}
@@ -773,7 +774,17 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
// switch to the previously visible Slide
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>( pViewShell );
if( pDrawViewShell )
- pDrawViewShell->SwitchPage( (USHORT)xController->getRestoreSlide() );
+ pDrawViewShell->SwitchPage( (sal_uInt16)xController->getRestoreSlide() );
+ else
+ {
+ Reference<XDrawView> xDrawView (
+ Reference<XWeak>(&mpCurrentViewShellBase->GetDrawController()), UNO_QUERY);
+ if (xDrawView.is())
+ xDrawView->setCurrentPage(
+ Reference<XDrawPage>(
+ mpDoc->GetSdPage(xController->getRestoreSlide(), PK_STANDARD)->getUnoPage(),
+ UNO_QUERY));
+ }
}
if( pViewShell->GetDoc()->IsStartWithPresentation() )
@@ -1198,9 +1209,9 @@ void SlideShow::StartFullscreenPresentation( )
// fullscreen.
const sal_Int32 nDisplay (GetDisplay());
WorkWindow* pWorkWindow = new FullScreenWorkWindow(this, mpCurrentViewShellBase);
- pWorkWindow->StartPresentationMode( TRUE, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PRESENTATION_HIDEALLAPPS : 0, nDisplay);
- // pWorkWindow->ShowFullScreenMode(FALSE, nDisplay);
pWorkWindow->SetBackground(Wallpaper(COL_BLACK));
+ pWorkWindow->StartPresentationMode( sal_True, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PRESENTATION_HIDEALLAPPS : 0, nDisplay);
+ // pWorkWindow->ShowFullScreenMode(sal_False, nDisplay);
if (pWorkWindow->IsVisible())
{
@@ -1218,7 +1229,7 @@ void SlideShow::StartFullscreenPresentation( )
// new view shell--a prerequisite to process slot calls and initialize
// its panes--a GrabFocus() has to be called later on.
SfxFrame* pNewFrame = SfxFrame::Create( *mpDoc->GetDocSh(), *pWorkWindow, PRESENTATION_FACTORY_ID, true );
- pNewFrame->SetPresentationMode(TRUE);
+ pNewFrame->SetPresentationMode(sal_True);
mpFullScreenViewShellBase = static_cast<ViewShellBase*>(pNewFrame->GetCurrentViewFrame()->GetViewShell());
if(mpFullScreenViewShellBase != NULL)
diff --git a/sd/source/ui/slideshow/slideshow.hrc b/sd/source/ui/slideshow/slideshow.hrc
index 709e2a79146e..f086f52cb73f 100644..100755
--- a/sd/source/ui/slideshow/slideshow.hrc
+++ b/sd/source/ui/slideshow/slideshow.hrc
@@ -37,25 +37,20 @@
#define CM_ENDSHOW 7
#define CM_FIRST_SLIDE 8
#define CM_LAST_SLIDE 9
-#define CM_SLIDES 10
+
//CM for extra presenter UI
-#define CM_ERASE_ALLINK 11
-#define CM_ERASE_INK 12
-#define CM_ERASE_INK_PEN 13
-#define CM_ERASE_INK_PEN_VERY_THIN 14
-#define CM_ERASE_INK_PEN_THIN 15
-#define CM_ERASE_INK_PEN_NORMAL 16
-#define CM_ERASE_INK_PEN_THICK 17
-#define CM_ERASE_INK_PEN_VERY_THICK 18
-#define CM_COLOR_PEN 19
-#define CM_WIDTH_PEN 20
-#define CM_WIDTH_PEN_VERY_THIN 21
-#define CM_WIDTH_PEN_THIN 22
-#define CM_WIDTH_PEN_NORMAL 23
-#define CM_WIDTH_PEN_THICK 24
-#define CM_WIDTH_PEN_VERY_THICK 25
-#define CM_PEN_MODE 26
-#define CM_ERASE_MODE 27
-#define CM_POINTER_OPTION 28
+#define CM_ERASE_ALLINK 10
+#define CM_COLOR_PEN 11
+#define CM_WIDTH_PEN 12
+#define CM_WIDTH_PEN_VERY_THIN 13
+#define CM_WIDTH_PEN_THIN 14
+#define CM_WIDTH_PEN_NORMAL 15
+#define CM_WIDTH_PEN_THICK 16
+#define CM_WIDTH_PEN_VERY_THICK 17
+#define CM_PEN_MODE 18
+#define CM_ERASE_MODE 19
+#define CM_POINTER_OPTION 20
+
+#define CM_SLIDES 21 // this must be the last id!
#endif
diff --git a/sd/source/ui/slideshow/slideshow.src b/sd/source/ui/slideshow/slideshow.src
index 02c225fb5ea9..78cd2aae0d9f 100644..100755
--- a/sd/source/ui/slideshow/slideshow.src
+++ b/sd/source/ui/slideshow/slideshow.src
@@ -71,20 +71,10 @@ Menu RID_SLIDESHOW_CONTEXTMENU
{
Separator = TRUE;
};
-#ifdef ENABLE_PRESENTER_EXTRA_UI
MenuItem
{
Identifier = CM_PEN_MODE;
- Text [ en-US ] = "~Pen Mode";
- };
- MenuItem
- {
- Identifier = CM_ERASE_MODE;
- Text [ en-US ] = "~Eraser Mode";
- };
- MenuItem
- {
- Separator = TRUE;
+ Text [ en-US ] = "Mouse pointer as ~pen";
};
MenuItem
{
@@ -124,20 +114,8 @@ Menu RID_SLIDESHOW_CONTEXTMENU
};
MenuItem
{
- Separator = TRUE;
- };
- MenuItem
- {
Identifier = CM_COLOR_PEN ;
- Text [ en-US ] = "~Change Pen Color" ;
- };
- MenuItem
- {
- Separator = TRUE;
- };
- MenuItem
- {
- Separator = TRUE;
+ Text [ en-US ] = "~Change Pen Color..." ;
};
MenuItem
{
@@ -150,48 +128,6 @@ Menu RID_SLIDESHOW_CONTEXTMENU
};
MenuItem
{
- Identifier = CM_ERASE_INK_PEN;
- Text [ en-US ] = "~Eraser Width" ;
-
- SubMenu = Menu
- {
- ItemList =
- {
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_VERY_THIN;
- Text [ en-US ] = "~Very thin";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_THIN;
- Text [ en-US ] = "~Thin";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_NORMAL;
- Text [ en-US ] = "~Normal";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_THICK;
- Text [ en-US ] = "~Thick";
- };
- MenuItem
- {
- Identifier = CM_ERASE_INK_PEN_VERY_THICK;
- Text [ en-US ] = "~Very Thick";
- };
- };
- };
- };
-#endif
- MenuItem
- {
- Separator = TRUE;
- };
- MenuItem
- {
Identifier = CM_SCREEN;
Text [ en-US ] = "~Screen" ;
@@ -216,6 +152,6 @@ Menu RID_SLIDESHOW_CONTEXTMENU
{
Identifier = CM_ENDSHOW ;
Text [ en-US ] = "~End Show" ;
- };
+ };
};
};
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 63bce31f8cb8..8fcf76f2f728 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -115,7 +115,7 @@ namespace sd
// Slots, welche im Sfx verwaltet werden und in der SlideShow disabled
// werden sollen (muss in Reihenfolge der SIDs geordnet sein)
-static USHORT const pAllowed[] =
+static sal_uInt16 const pAllowed[] =
{
SID_OPENDOC , // 5501 // damit interne Spruenge klappen
SID_JUMPTOMARK , // 5598
@@ -549,12 +549,11 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
, mbInputFreeze(false)
, mbActive(sal_False)
, maPresSettings( pDoc->getPresentationSettings() )
-, mnUserPaintColor( 0x00000000L ) //User paint color is Black by default
-#ifdef ENABLE_PRESENTER_EXTRA_UI
-, mbSwitchPenMode(true)
+, mnUserPaintColor( 0x80ff0000L )
+, mbUsePen(false)
+, mdUserPaintStrokeWidth ( 150.0 )
+#ifdef ENABLE_ERASER_UI
, mbSwitchEraserMode(false)
-, mdUserPaintStrokeWidth ( 4.0 )
-, mbEraseAllInk(false)
, mnEraseInkSize(100)
#endif
, mnEntryCounter(0)
@@ -585,10 +584,26 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
mbAutoSaveWasOn = true;
Application::AddEventListener( LINK( this, SlideshowImpl, EventListenerHdl ) );
+
+ mbUsePen = maPresSettings.mbMouseAsPen;
+
+ SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
+ if( pOptions )
+ {
+ mnUserPaintColor = pOptions->GetPresentationPenColor();
+ mdUserPaintStrokeWidth = pOptions->GetPresentationPenWidth();
+ }
}
SlideshowImpl::~SlideshowImpl()
{
+ SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
+ if( pOptions )
+ {
+ pOptions->SetPresentationPenColor(mnUserPaintColor);
+ pOptions->SetPresentationPenWidth(mdUserPaintStrokeWidth);
+ }
+
Application::RemoveEventListener( LINK( this, SlideshowImpl, EventListenerHdl ) );
maDeactivateTimer.Stop();
@@ -670,7 +685,7 @@ void SAL_CALL SlideshowImpl::disposing()
mpView->DeleteWindowFromPaintView( mpShowWindow );
if( mpView )
- mpView->SetAnimationPause( FALSE );
+ mpView->SetAnimationPause( sal_False );
if( mpViewShell )
{
@@ -748,7 +763,7 @@ void SAL_CALL SlideshowImpl::disposing()
// restart the custom show dialog if he started us
if( mpViewShell->IsStartShowWithDialog() && getDispatcher() )
{
- mpViewShell->SetStartShowWithDialog( FALSE );
+ mpViewShell->SetStartShowWithDialog( sal_False );
getDispatcher()->Execute( SID_CUSTOMSHOW_DLG, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
}
@@ -832,7 +847,7 @@ bool SlideshowImpl::startPreview(
if( mpView )
{
mpView->AddWindowToPaintView( mpShowWindow );
- mpView->SetAnimationPause( TRUE );
+ mpView->SetAnimationPause( sal_True );
}
// call resize handler
@@ -939,7 +954,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
{
// we are in notes page mode, so get
// the corresponding draw page
- const USHORT nPgNum = ( pStartPage->GetPageNum() - 2 ) >> 1;
+ const sal_uInt16 nPgNum = ( pStartPage->GetPageNum() - 2 ) >> 1;
pStartPage = mpDoc->GetSdPage( nPgNum, PK_STANDARD );
}
}
@@ -981,7 +996,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
sal_Int32 nSlide;
for( nSlide = 0; (nSlide < nSlideCount); nSlide++ )
{
- if( mpDoc->GetSdPage( (USHORT) nSlide, PK_STANDARD )->GetName() == aPresSlide )
+ if( mpDoc->GetSdPage( (sal_uInt16) nSlide, PK_STANDARD )->GetName() == aPresSlide )
break;
}
@@ -1020,7 +1035,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// these Slots are forbiden in other views for this document
if( mpDocSh )
{
- mpDocSh->SetSlotFilter( TRUE, sizeof( pAllowed ) / sizeof( USHORT ), pAllowed );
+ mpDocSh->SetSlotFilter( sal_True, sizeof( pAllowed ) / sizeof( sal_uInt16 ), pAllowed );
mpDocSh->ApplySlotFilter();
}
@@ -1054,7 +1069,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( mpView )
{
mpView->AddWindowToPaintView( mpShowWindow );
- mpView->SetAnimationPause( TRUE );
+ mpView->SetAnimationPause( sal_True );
}
SfxBindings* pBindings = getBindings();
@@ -1095,13 +1110,20 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
-1, Any( maPresSettings.mbManual != sal_False ),
beans::PropertyState_DIRECT_VALUE ) );
- if( maPresSettings.mbMouseAsPen )
+ if( mbUsePen )
{
aProperties.push_back(
beans::PropertyValue(
OUString( RTL_CONSTASCII_USTRINGPARAM("UserPaintColor") ),
// User paint color is black by default.
- -1, Any( static_cast<sal_Int32>(0x00000000L) ),
+ -1, Any( mnUserPaintColor ),
+ beans::PropertyState_DIRECT_VALUE ) );
+
+ aProperties.push_back(
+ beans::PropertyValue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("UserPaintStrokeWidth") ),
+ // User paint color is black by default.
+ -1, Any( mdUserPaintStrokeWidth ),
beans::PropertyState_DIRECT_VALUE ) );
}
@@ -1201,13 +1223,15 @@ void SlideshowImpl::onFirstPaint()
{
if( mpShowWindow )
{
+ /*
mpShowWindow->SetBackground( Wallpaper( Color( COL_BLACK ) ) );
mpShowWindow->Erase();
mpShowWindow->SetBackground();
+ */
}
SolarMutexGuard aSolarGuard;
- maUpdateTimer.SetTimeout( (ULONG)100 );
+ maUpdateTimer.SetTimeout( (sal_uLong)100 );
maUpdateTimer.Start();
}
@@ -1430,14 +1454,14 @@ void SlideshowImpl::displayCurrentSlide (const bool bSkipAllMainSequenceEffects)
void SlideshowImpl::endPresentation()
{
-#ifdef ENABLE_PRESENTER_EXTRA_UI
+/*
if( maPresSettings.mbMouseAsPen)
{
Reference< XMultiServiceFactory > xDocFactory(mpDoc->getUnoModel(), UNO_QUERY );
if( xDocFactory.is() )
mxShow->registerUserPaintPolygons(xDocFactory);
}
-#endif
+*/
if( !mnEndShowEvent )
mnEndShowEvent = Application::PostUserEvent( LINK(this, SlideshowImpl, endPresentationHdl) );
}
@@ -1610,7 +1634,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun::
if( INET_PROT_FILE == aURL.GetProtocol() )
{
SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) );
- SfxBoolItem aBrowsing( SID_BROWSE, TRUE );
+ SfxBoolItem aBrowsing( SID_BROWSE, sal_True );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (pViewFrm)
@@ -1673,9 +1697,9 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun::
sal_Int32 SlideshowImpl::getSlideNumberForBookmark( const OUString& rStrBookmark )
{
- BOOL bIsMasterPage;
+ sal_Bool bIsMasterPage;
OUString aBookmark = getUiNameFromPageApiNameImpl( rStrBookmark );
- USHORT nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
+ sal_uInt16 nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
if( nPgNum == SDRPAGE_NOTFOUND )
{
@@ -1685,7 +1709,7 @@ sal_Int32 SlideshowImpl::getSlideNumberForBookmark( const OUString& rStrBookmark
if( pObj )
{
nPgNum = pObj->GetPage()->GetPageNum();
- bIsMasterPage = (BOOL)pObj->GetPage()->IsMasterPage();
+ bIsMasterPage = (sal_Bool)pObj->GetPage()->IsMasterPage();
}
}
@@ -1913,13 +1937,13 @@ sal_Int32 SlideshowImpl::updateSlideShow (void)
// Make sure that the maximum frame count has not been set
// too high (only then conversion to milliseconds and long
// integer may lead to zero value.)
- OSL_ASSERT(static_cast<ULONG>(fUpdate * 1000.0) > 0);
+ OSL_ASSERT(static_cast<sal_uLong>(fUpdate * 1000.0) > 0);
Application::EnableNoYieldMode(false);
Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
// Use a timer for the asynchronous callback.
- maUpdateTimer.SetTimeout(static_cast<ULONG>(fUpdate * 1000.0));
+ maUpdateTimer.SetTimeout(static_cast<sal_uLong>(fUpdate * 1000.0));
maUpdateTimer.Start();
}
}
@@ -2170,16 +2194,8 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
PopupMenu* pMenu = new PopupMenu( SdResId( RID_SLIDESHOW_CONTEXTMENU ) );
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- //adding button to contextual menu for erasing functionnalities for UserPaintOverlay
- pMenu->EnableItem( CM_ERASE_ALLINK, (maPresSettings.mbMouseAsPen));
- // Adding button to contextual menu for changing pen color
- pMenu->EnableItem( CM_COLOR_PEN, (maPresSettings.mbMouseAsPen));
// Adding button to display if in Pen mode
- pMenu->EnableItem( CM_PEN_MODE, (maPresSettings.mbMouseAsPen));
- // Adding button to displau if in Erase Mode
- pMenu->EnableItem( CM_ERASE_MODE, (maPresSettings.mbMouseAsPen));
-#endif
+ pMenu->CheckItem( CM_PEN_MODE, mbUsePen);
const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
pMenu->EnableItem( CM_NEXT_SLIDE, ( mpSlideController->getNextSlideIndex() != -1 ) );
@@ -2193,13 +2209,13 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
Reference< ::com::sun::star::frame::XFrame > xFrame( pViewFrame->GetFrame().GetFrameInterface() );
if( xFrame.is() )
{
- pMenu->SetItemImage( CM_NEXT_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10617") ), FALSE ) );
- pMenu->SetItemImage( CM_PREV_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10618") ), FALSE ) );
+ pMenu->SetItemImage( CM_NEXT_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10617") ), sal_False ) );
+ pMenu->SetItemImage( CM_PREV_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10618") ), sal_False ) );
if( pPageMenu )
{
- pPageMenu->SetItemImage( CM_FIRST_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10616") ), FALSE ) );
- pPageMenu->SetItemImage( CM_LAST_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10619") ), FALSE ) );
+ pPageMenu->SetItemImage( CM_FIRST_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10616") ), sal_False ) );
+ pPageMenu->SetItemImage( CM_LAST_SLIDE, GetImage( xFrame, OUString( RTL_CONSTASCII_USTRINGPARAM( "slot:10619") ), sal_False ) );
}
}
}
@@ -2210,7 +2226,7 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
const sal_Int32 nPageNumberCount = mpSlideController->getSlideNumberCount();
if( nPageNumberCount <= 1 )
{
- pMenu->EnableItem( CM_GOTO, FALSE );
+ pMenu->EnableItem( CM_GOTO, sal_False );
}
else
{
@@ -2227,12 +2243,12 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
{
if( mpSlideController->isVisibleSlideNumber( nPageNumber ) )
{
- SdPage* pPage = mpDoc->GetSdPage((USHORT)nPageNumber, PK_STANDARD);
+ SdPage* pPage = mpDoc->GetSdPage((sal_uInt16)nPageNumber, PK_STANDARD);
if (pPage)
{
- pPageMenu->InsertItem( (USHORT)(CM_SLIDES + nPageNumber), pPage->GetName() );
+ pPageMenu->InsertItem( (sal_uInt16)(CM_SLIDES + nPageNumber), pPage->GetName() );
if( nPageNumber == nCurrentSlideNumber )
- pPageMenu->CheckItem( (USHORT)(CM_SLIDES + nPageNumber) );
+ pPageMenu->CheckItem( (sal_uInt16)(CM_SLIDES + nPageNumber) );
}
}
}
@@ -2247,105 +2263,44 @@ IMPL_LINK( SlideshowImpl, ContextMenuHdl, void*, EMPTYARG )
pBlankMenu->CheckItem( ( mpShowWindow->GetBlankColor() == Color( COL_WHITE ) ) ? CM_SCREEN_WHITE : CM_SCREEN_BLACK );
}
}
-#ifdef ENABLE_PRESENTER_EXTRA_UI
PopupMenu* pWidthMenu = pMenu->GetPopupMenu( CM_WIDTH_PEN);
// populate color width list
if( pWidthMenu )
{
- if(! maPresSettings.mbMouseAsPen)
- {
- pMenu->EnableItem( CM_WIDTH_PEN, FALSE );
- }
- else
- {
- sal_Int32 nIterator;
- double nWidth;
-
- nWidth = 4.0;
- for( nIterator = 1; nIterator < 6; nIterator++)
- {
- switch(nIterator)
- {
- case 1:
- nWidth = 4.0;
- break;
- case 2:
- nWidth = 100.0;
- break;
- case 3:
- nWidth = 150.0;
- break;
- case 4:
- nWidth = 200.0;
- break;
- case 5:
- nWidth = 400.0;
- break;
- default:
- break;
- }
+ sal_Int32 nIterator;
+ double nWidth;
- pWidthMenu->EnableItem( (USHORT)(CM_WIDTH_PEN + nIterator), TRUE);
- if( nWidth == mdUserPaintStrokeWidth)
- pWidthMenu->CheckItem( (USHORT)(CM_WIDTH_PEN + nIterator) );
-
- }
- }
- }
-
-
- PopupMenu* pEraseWidthMenu = pMenu->GetPopupMenu( CM_ERASE_INK_PEN);
-
- // populate eraser width list
- if( pEraseWidthMenu )
- {
- if(! maPresSettings.mbMouseAsPen)
+ nWidth = 4.0;
+ for( nIterator = 1; nIterator < 6; nIterator++)
{
- pMenu->EnableItem( CM_ERASE_INK_PEN, FALSE );
- }
- else
- {
- sal_Int32 nEIterator;
- double nEWidth;
-
- nEWidth = 100.0;
- for( nEIterator = 1; nEIterator < 6; nEIterator++)
+ switch(nIterator)
{
- switch(nEIterator)
- {
- case 1:
- nEWidth = 100.0;
- break;
- case 2:
- nEWidth = 200.0;
- break;
- case 3:
- nEWidth = 300.0;
- break;
- case 4:
- nEWidth = 400.0;
- break;
- case 5:
- nEWidth = 500.0;
- break;
- default:
- break;
- }
-
- pEraseWidthMenu->EnableItem( (USHORT)(CM_ERASE_INK_PEN + nEIterator), TRUE);
- if( nEWidth == mnEraseInkSize)
- pEraseWidthMenu->CheckItem( (USHORT)(CM_ERASE_INK_PEN + nEIterator) );
- if( mbSwitchPenMode )
- pMenu->CheckItem( (USHORT)(CM_PEN_MODE));
- if( mbSwitchEraserMode )
- pMenu->CheckItem( (USHORT)(CM_ERASE_MODE));
-
+ case 1:
+ nWidth = 4.0;
+ break;
+ case 2:
+ nWidth = 100.0;
+ break;
+ case 3:
+ nWidth = 150.0;
+ break;
+ case 4:
+ nWidth = 200.0;
+ break;
+ case 5:
+ nWidth = 400.0;
+ break;
+ default:
+ break;
}
+
+ pWidthMenu->EnableItem( (sal_uInt16)(CM_WIDTH_PEN + nIterator), sal_True);
+ if( nWidth == mdUserPaintStrokeWidth)
+ pWidthMenu->CheckItem( (sal_uInt16)(CM_WIDTH_PEN + nIterator) );
}
}
-#endif
pMenu->SetSelectHdl( LINK( this, SlideshowImpl, ContextMenuSelectHdl ) );
pMenu->Execute( mpShowWindow, maPopupMousePos );
@@ -2409,139 +2364,93 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu )
}
}
break;
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- if( maPresSettings.mbMouseAsPen )
- {
- case CM_COLOR_PEN:
- {
- //Open a color picker based on SvColorDialog
- ::Color aColor( mnUserPaintColor );
- SvColorDialog aColorDlg( mpShowWindow);
- aColorDlg.SetColor( aColor );
-
- if (aColorDlg.Execute() )
- {
- aColor = aColorDlg.GetColor();
- mnUserPaintColor = aColor.GetColor();
- setPenColor(mnUserPaintColor);
- }
- mbWasPaused = false;
- }
- break;
-
- case CM_WIDTH_PEN_VERY_THIN:
- {
- setPenWidth(4.0);
- mbWasPaused = false;
- }
- break;
-
- case CM_WIDTH_PEN_THIN:
- {
- setPenWidth(100.0);
- mbWasPaused = false;
- }
- break;
+ case CM_COLOR_PEN:
+ {
+ //Open a color picker based on SvColorDialog
+ ::Color aColor( mnUserPaintColor );
+ SvColorDialog aColorDlg( mpShowWindow);
+ aColorDlg.SetColor( aColor );
- case CM_WIDTH_PEN_NORMAL:
+ if (aColorDlg.Execute() )
{
- setPenWidth(150.0);
- mbWasPaused = false;
+ aColor = aColorDlg.GetColor();
+ setPenColor(aColor.GetColor());
}
- break;
+ mbWasPaused = false;
+ }
+ break;
- case CM_WIDTH_PEN_THICK:
- {
- setPenWidth(200.0);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_VERY_THIN:
+ {
+ setPenWidth(4.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_WIDTH_PEN_VERY_THICK:
- {
- setPenWidth(400.0);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_ALLINK:
- {
- setEraseAllInk(true);
- mbWasPaused = false;
- }
- break;
- case CM_PEN_MODE:
- {
- setPenMode(true);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_MODE:
- {
- setEraserMode(true);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_INK_PEN_VERY_THIN:
- {
- setEraseInk(100);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_THIN:
+ {
+ setPenWidth(100.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ERASE_INK_PEN_THIN:
- {
- setEraseInk(200);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_NORMAL:
+ {
+ setPenWidth(150.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ERASE_INK_PEN_NORMAL:
- {
- setEraseInk(300);
- mbWasPaused = false;
- }
- break;
+ case CM_WIDTH_PEN_THICK:
+ {
+ setPenWidth(200.0);
+ mbWasPaused = false;
+ }
+ break;
- case CM_ERASE_INK_PEN_THICK:
- {
- setEraseInk(400);
- mbWasPaused = false;
- }
- break;
- case CM_ERASE_INK_PEN_VERY_THICK:
- {
- setEraseInk(500);
+ case CM_WIDTH_PEN_VERY_THICK:
+ {
+ setPenWidth(400.0);
+ mbWasPaused = false;
+ }
+ break;
+ case CM_ERASE_ALLINK:
+ {
+ setEraseAllInk(true);
mbWasPaused = false;
- }
- break;
- }
-#endif
-
- case CM_ENDSHOW:
- // in case the user cancels the presentation, switch to current slide
- // in edit mode
- if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
- {
- if( mpSlideController->getCurrentSlideNumber() != -1 )
- {
- mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
- }
- }
- endPresentation();
- break;
- default:
- sal_Int32 nPageNumber = nMenuId - CM_SLIDES;
- const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
- if( (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
- {
- mpShowWindow->RestartShow( nPageNumber );
- }
- else if( nPageNumber != mpSlideController->getCurrentSlideNumber() )
+ }
+ break;
+ case CM_PEN_MODE:
+ {
+ setUsePen(!mbUsePen);
+ mbWasPaused = false;
+ }
+ break;
+ case CM_ENDSHOW:
+ // in case the user cancels the presentation, switch to current slide
+ // in edit mode
+ if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ {
+ if( mpSlideController->getCurrentSlideNumber() != -1 )
{
- displaySlideNumber( nPageNumber );
+ mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
}
- mbWasPaused = false;
- break;
+ }
+ endPresentation();
+ break;
+ default:
+ sal_Int32 nPageNumber = nMenuId - CM_SLIDES;
+ const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
+ if( (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
+ {
+ mpShowWindow->RestartShow( nPageNumber );
+ }
+ else if( nPageNumber != mpSlideController->getCurrentSlideNumber() )
+ {
+ displaySlideNumber( nPageNumber );
+ }
+ mbWasPaused = false;
+ break;
}
}
@@ -2613,16 +2522,16 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
if( rPresSlide.Len() )
{
sal_Int32 nSlide;
- BOOL bTakeNextAvailable = FALSE;
+ sal_Bool bTakeNextAvailable = sal_False;
for( nSlide = 0, nFirstSlide = -1; ( nSlide < nSlideCount ) && ( -1 == nFirstSlide ); nSlide++ )
{
- SdPage* pTestSlide = mpDoc->GetSdPage( (USHORT)nSlide, PK_STANDARD );
+ SdPage* pTestSlide = mpDoc->GetSdPage( (sal_uInt16)nSlide, PK_STANDARD );
if( pTestSlide->GetName() == rPresSlide )
{
if( pTestSlide->IsExcluded() )
- bTakeNextAvailable = TRUE;
+ bTakeNextAvailable = sal_True;
else
nFirstSlide = nSlide;
}
@@ -2637,7 +2546,7 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
for( sal_Int32 i = 0; i < nSlideCount; i++ )
{
- bool bVisible = ( mpDoc->GetSdPage( (USHORT)i, PK_STANDARD ) )->IsExcluded() ? false : true;
+ bool bVisible = ( mpDoc->GetSdPage( (sal_uInt16)i, PK_STANDARD ) )->IsExcluded() ? false : true;
if( bVisible || (eMode == AnimationSlideController::ALL) )
mpSlideController->insertSlideNumber( i, bVisible );
}
@@ -2650,18 +2559,18 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
{
sal_Int32 nSlide;
for( nSlide = 0; nSlide < nSlideCount; nSlide++ )
- if( rPresSlide == mpDoc->GetSdPage( (USHORT) nSlide, PK_STANDARD )->GetName() )
+ if( rPresSlide == mpDoc->GetSdPage( (sal_uInt16) nSlide, PK_STANDARD )->GetName() )
break;
if( nSlide < nSlideCount )
- mpSlideController->insertSlideNumber( (USHORT) nSlide );
+ mpSlideController->insertSlideNumber( (sal_uInt16) nSlide );
}
void* pCustomSlide;
sal_Int32 nSlideIndex;
for( pCustomSlide = pCustomShow->First(),nSlideIndex=0; pCustomSlide; pCustomSlide = pCustomShow->Next(), nSlideIndex++ )
{
- const USHORT nSdSlide = ( ( (SdPage*) pCustomSlide )->GetPageNum() - 1 ) / 2;
+ const sal_uInt16 nSdSlide = ( ( (SdPage*) pCustomSlide )->GetPageNum() - 1 ) / 2;
if( !( mpDoc->GetSdPage( nSdSlide, PK_STANDARD ) )->IsExcluded())
mpSlideController->insertSlideNumber( nSdSlide );
@@ -2672,7 +2581,7 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
// ---------------------------------------------------------
-typedef USHORT (*FncGetChildWindowId)();
+typedef sal_uInt16 (*FncGetChildWindowId)();
FncGetChildWindowId aShowChilds[] =
{
@@ -2703,13 +2612,13 @@ void SlideshowImpl::hideChildWindows()
if( pViewFrame->GetChildWindow( SID_NAVIGATOR ) != NULL )
mnChildMask |= NAVIGATOR_CHILD_MASK;
- for( ULONG i = 0, nCount = sizeof( aShowChilds ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = sizeof( aShowChilds ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
{
- const USHORT nId = ( *aShowChilds[ i ] )();
+ const sal_uInt16 nId = ( *aShowChilds[ i ] )();
if( pViewFrame->GetChildWindow( nId ) )
{
- pViewFrame->SetChildWindow( nId, FALSE );
+ pViewFrame->SetChildWindow( nId, sal_False );
mnChildMask |= 1 << i;
}
}
@@ -2728,10 +2637,10 @@ void SlideshowImpl::showChildWindows()
{
pViewFrame->SetChildWindow( SID_NAVIGATOR, ( mnChildMask & NAVIGATOR_CHILD_MASK ) != 0 );
- for( ULONG i = 0, nCount = sizeof( aShowChilds ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = sizeof( aShowChilds ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
{
if( mnChildMask & ( 1 << i ) )
- pViewFrame->SetChildWindow( ( *aShowChilds[ i ] )(), TRUE );
+ pViewFrame->SetChildWindow( ( *aShowChilds[ i ] )(), sal_True );
}
}
}
@@ -2848,11 +2757,11 @@ void SAL_CALL SlideshowImpl::activate() throw (RuntimeException)
if( pDispatcher )
{
// filter all forbiden slots
- pDispatcher->SetSlotFilter( TRUE, sizeof(pAllowed) / sizeof(USHORT), pAllowed );
+ pDispatcher->SetSlotFilter( sal_True, sizeof(pAllowed) / sizeof(sal_uInt16), pAllowed );
}
if( getBindings() )
- getBindings()->InvalidateAll(TRUE);
+ getBindings()->InvalidateAll(sal_True);
mpShowWindow->GrabFocus();
}
@@ -2915,7 +2824,7 @@ void SlideshowImpl::receiveRequest(SfxRequest& rReq)
switch ( rReq.GetSlot() )
{
case SID_NAVIGATOR_PEN:
- setUsePen(!maPresSettings.mbMouseAsPen);
+ setUsePen(!mbUsePen);
break;
case SID_NAVIGATOR_PAGE:
@@ -2937,8 +2846,8 @@ void SlideshowImpl::receiveRequest(SfxRequest& rReq)
const String aTarget( ((SfxStringItem&) pArgs->Get(SID_NAVIGATOR_OBJECT)).GetValue() );
// is the bookmark a Slide?
- BOOL bIsMasterPage;
- USHORT nPgNum = mpDoc->GetPageByName( aTarget, bIsMasterPage );
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nPgNum = mpDoc->GetPageByName( aTarget, bIsMasterPage );
SdrObject* pObj = NULL;
if( nPgNum == SDRPAGE_NOTFOUND )
@@ -3101,7 +3010,7 @@ void SAL_CALL SlideshowImpl::setMouseVisible( sal_Bool bVisible ) throw (Runtime
sal_Bool SAL_CALL SlideshowImpl::getUsePen() throw (RuntimeException)
{
SolarMutexGuard aSolarGuard;
- return maPresSettings.mbMouseAsPen;
+ return mbUsePen;
}
// --------------------------------------------------------------------
@@ -3109,93 +3018,38 @@ sal_Bool SAL_CALL SlideshowImpl::getUsePen() throw (RuntimeException)
void SAL_CALL SlideshowImpl::setUsePen( sal_Bool bMouseAsPen ) throw (RuntimeException)
{
SolarMutexGuard aSolarGuard;
- maPresSettings.mbMouseAsPen = bMouseAsPen;
+ mbUsePen = bMouseAsPen;
if( mxShow.is() ) try
{
- // For Pencolor;
+ // For Pencolor;
Any aValue;
- if( maPresSettings.mbMouseAsPen )
- // TODO: take color from configuration
- aValue <<= mnUserPaintColor;
+ if( mbUsePen )
+ aValue <<= mnUserPaintColor;
beans::PropertyValue aPenProp;
aPenProp.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "UserPaintColor" ));
aPenProp.Value = aValue;
mxShow->setProperty( aPenProp );
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- //for StrokeWidth :
- Any aValueWidth;
- if( maPresSettings.mbMouseAsPen )
- aValueWidth <<= mdUserPaintStrokeWidth;
-
- beans::PropertyValue aPenPropWidth;
- aPenPropWidth.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "UserPaintStrokeWidth" ));
- aPenPropWidth.Value = aValueWidth;
-
- mxShow->setProperty( aPenPropWidth );
-
- // for Pen Mode
- Any aValueSwitchPenMode;
- if( maPresSettings.mbMouseAsPen )
- aValueSwitchPenMode <<= mbSwitchPenMode;
- beans::PropertyValue aPenPropSwitchPenMode;
- aPenPropSwitchPenMode.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SwitchPenMode" ));
- aPenPropSwitchPenMode.Value = aValueSwitchPenMode;
- mxShow->setProperty( aPenPropSwitchPenMode );
-
- //for EraseAllInk :
- Any aValueEraseAllInk;
- if( maPresSettings.mbMouseAsPen )
- aValueEraseAllInk <<= mbEraseAllInk;
- beans::PropertyValue aPenPropEraseAllInk;
- aPenPropEraseAllInk.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EraseAllInk" ));
- aPenPropEraseAllInk.Value = aValueEraseAllInk;
- mxShow->setProperty( aPenPropEraseAllInk );
- mbEraseAllInk = false; // sets to false so not to have it applied again
-#endif
- }
- catch( Exception& e )
- {
- static_cast<void>(e);
- DBG_ERROR(
- (OString("sd::SlideshowImpl::setUsePen(), "
- "exception caught: ") +
- rtl::OUStringToOString(
- comphelper::anyToString( cppu::getCaughtException() ),
- RTL_TEXTENCODING_UTF8 )).getStr() );
- }
-}
-#ifdef ENABLE_PRESENTER_EXTRA_UI
-void SAL_CALL SlideshowImpl::setUseEraser( sal_Bool bMouseAsPen ) throw (RuntimeException)
-{
- SolarMutexGuard aSolarGuard;
- maPresSettings.mbMouseAsPen = bMouseAsPen;
- if( mxShow.is() ) try
- {
+ //for StrokeWidth :
+ if( mbUsePen )
+ {
+ beans::PropertyValue aPenPropWidth;
+ aPenPropWidth.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "UserPaintStrokeWidth" ));
+ aPenPropWidth.Value <<= mdUserPaintStrokeWidth;
+ mxShow->setProperty( aPenPropWidth );
- //for EraseInk :
- Any aValueEraseInk;
- if( maPresSettings.mbMouseAsPen )
- aValueEraseInk <<= mnEraseInkSize;
- beans::PropertyValue aPenPropEraseInk;
- aPenPropEraseInk.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EraseInk" ));
- aPenPropEraseInk.Value = aValueEraseInk;
- mxShow->setProperty( aPenPropEraseInk );
-
- // for Erase Mode
- Any aValueSwitchEraserMode;
- if( maPresSettings.mbMouseAsPen )
- aValueSwitchEraserMode <<= mbSwitchEraserMode;
- beans::PropertyValue aPenPropSwitchEraserMode;
- aPenPropSwitchEraserMode.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SwitchEraserMode" ));
- aPenPropSwitchEraserMode.Value = aValueSwitchEraserMode;
- mxShow->setProperty( aPenPropSwitchEraserMode );
+ // for Pen Mode
+ beans::PropertyValue aPenPropSwitchPenMode;
+ aPenPropSwitchPenMode.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "SwitchPenMode" ));
+ aPenPropSwitchPenMode.Value <<= sal_True;
+ mxShow->setProperty( aPenPropSwitchPenMode );
+ }
}
catch( Exception& e )
{
static_cast<void>(e);
DBG_ERROR(
- (OString("sd::SlideshowImpl::setUseEraser(), "
+ (OString("sd::SlideshowImpl::setUsePen(), "
"exception caught: ") +
rtl::OUStringToOString(
comphelper::anyToString( cppu::getCaughtException() ),
@@ -3217,12 +3071,9 @@ void SAL_CALL SlideshowImpl::setPenWidth( double dStrokeWidth ) throw (RuntimeEx
{
SolarMutexGuard aSolarGuard;
mdUserPaintStrokeWidth = dStrokeWidth;
- mbSwitchPenMode = true;
- mbSwitchEraserMode = !mbSwitchPenMode;
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // update color and width
+ setUsePen( true ); // enable pen mode, update color and width
}
-#endif
+
// --------------------------------------------------------------------
sal_Int32 SAL_CALL SlideshowImpl::getPenColor() throw (RuntimeException)
@@ -3237,71 +3088,59 @@ void SAL_CALL SlideshowImpl::setPenColor( sal_Int32 nColor ) throw (RuntimeExcep
{
SolarMutexGuard aSolarGuard;
mnUserPaintColor = nColor;
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- mbSwitchPenMode = true;
- mbSwitchEraserMode = !mbSwitchPenMode;
-#endif
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // update color
+ setUsePen( true ); // enable pen mode, update color
}
-#ifdef ENABLE_PRESENTER_EXTRA_UI
// --------------------------------------------------------------------
-void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeException)
+void SAL_CALL SlideshowImpl::setUseEraser( ::sal_Bool /*_usepen*/ ) throw (css::uno::RuntimeException)
{
- SolarMutexGuard aSolarGuard;
- mbSwitchPenMode = bSwitchPenMode;
-
- if(mbSwitchPenMode == true){
- mbSwitchEraserMode = false;
- }else{
- mbSwitchEraserMode = true;
- }
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // Switch to Pen Mode
-
}
-void SAL_CALL SlideshowImpl::setEraserMode(bool bSwitchEraserMode ) throw (RuntimeException)
+// --------------------------------------------------------------------
+
+void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeException)
{
SolarMutexGuard aSolarGuard;
- mbSwitchEraserMode = bSwitchEraserMode;
- if(mbSwitchEraserMode = true){
- mbSwitchPenMode = false;
- }else{
- mbSwitchPenMode = true;
- }
-
- if( maPresSettings.mbMouseAsPen )
- setUseEraser( sal_True ); // Switch to EraseMode
+ setUsePen( bSwitchPenMode ); // SwitchPen Mode
}
-
// --------------------------------------------------------------------
-void SAL_CALL SlideshowImpl::setEraseAllInk( bool bEraseAllInk ) throw (RuntimeException)
+void SAL_CALL SlideshowImpl::setEraseAllInk(bool bEraseAllInk) throw (RuntimeException)
{
- SolarMutexGuard aSolarGuard;
- mbEraseAllInk=bEraseAllInk;
- mbSwitchPenMode = true;
- mbSwitchEraserMode = false;
- if( maPresSettings.mbMouseAsPen )
- setUsePen( sal_True ); // update erase all ink bool
+ if( bEraseAllInk )
+ {
+ SolarMutexGuard aSolarGuard;
+ if( mxShow.is() ) try
+ {
+ beans::PropertyValue aPenPropEraseAllInk;
+ aPenPropEraseAllInk.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EraseAllInk" ));
+ aPenPropEraseAllInk.Value <<= bEraseAllInk;
+ mxShow->setProperty( aPenPropEraseAllInk );
+ }
+ catch( Exception& e )
+ {
+ static_cast<void>(e);
+ DBG_ERROR(
+ (OString("sd::SlideshowImpl::setEraseAllInk(), "
+ "exception caught: ") +
+ rtl::OUStringToOString(
+ comphelper::anyToString( cppu::getCaughtException() ),
+ RTL_TEXTENCODING_UTF8 )).getStr() );
+ }
+ }
}
+void SAL_CALL SlideshowImpl::setEraseInk( sal_Int32 /*nEraseInkSize*/ ) throw (css::uno::RuntimeException)
+{
+}
-void SAL_CALL SlideshowImpl::setEraseInk( sal_Int32 nEraseInkSize ) throw (RuntimeException)
+void SAL_CALL SlideshowImpl::setEraserMode( bool /*bSwitchEraserMode*/ ) throw (css::uno::RuntimeException)
{
- SolarMutexGuard aSolarGuard;
- mnEraseInkSize=nEraseInkSize;
- mbSwitchPenMode = false;
- mbSwitchEraserMode = true;
- if( maPresSettings.mbMouseAsPen )
- setUseEraser( sal_True ); // update erase ink size
}
-#endif
+
// --------------------------------------------------------------------
// XSlideShowController Methods
// --------------------------------------------------------------------
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index ef8e2c2b9b28..612d91b263cf 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -195,7 +195,6 @@ public:
virtual void SAL_CALL setUsePen( ::sal_Bool _usepen ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getPenColor() throw (css::uno::RuntimeException);
virtual void SAL_CALL setPenColor( ::sal_Int32 _pencolor ) throw (css::uno::RuntimeException);
-#ifdef ENABLE_PRESENTER_EXTRA_UI
virtual void SAL_CALL setUseEraser( ::sal_Bool _usepen ) throw (css::uno::RuntimeException);
virtual double SAL_CALL getPenWidth() throw (css::uno::RuntimeException);
virtual void SAL_CALL setPenWidth( double dStrokeWidth ) throw (css::uno::RuntimeException);
@@ -203,7 +202,6 @@ public:
virtual void SAL_CALL setEraseInk( sal_Int32 nEraseInkSize ) throw (css::uno::RuntimeException);
virtual void SAL_CALL setPenMode( bool bSwitchPenMode) throw (css::uno::RuntimeException);
virtual void SAL_CALL setEraserMode( bool bSwitchEraserMode ) throw (css::uno::RuntimeException);
-#endif
virtual ::sal_Bool SAL_CALL isRunning( ) throw (css::uno::RuntimeException);
virtual ::sal_Int32 SAL_CALL getSlideCount( ) throw (css::uno::RuntimeException);
virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException);
@@ -393,13 +391,9 @@ private:
PresentationSettings maPresSettings;
sal_Int32 mnUserPaintColor;
-#ifdef ENABLE_PRESENTER_EXTRA_UI
- bool mbSwitchPenMode;
- bool mbSwitchEraserMode;
+ bool mbUsePen;
double mdUserPaintStrokeWidth;
- bool mbEraseAllInk;
- sal_Int32 mnEraseInkSize;
-#endif
+
/// used in updateHdl to prevent recursive calls
sal_Int32 mnEntryCounter;
@@ -417,8 +411,8 @@ private:
::std::auto_ptr<PaneHider> mpPaneHider;
- ULONG mnEndShowEvent;
- ULONG mnContextMenuEvent;
+ sal_uLong mnEndShowEvent;
+ sal_uLong mnContextMenuEvent;
sal_Int32 mnUpdateEvent;
css::uno::Reference< css::presentation::XPresentation2 > mxPresentation;
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 6187bf00f719..531b01e57cc4 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -34,7 +34,6 @@
#include "SlsBitmapCompressor.hxx"
#include "SlsCacheConfiguration.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
@@ -56,8 +55,7 @@ namespace sd { namespace slidesorter { namespace cache {
class BitmapCache::CacheEntry
{
public:
- CacheEntry(const ::boost::shared_ptr<BitmapEx>& rpBitmap,
- sal_Int32 nLastAccessTime, bool bIsPrecious);
+ CacheEntry(const Bitmap& rBitmap, sal_Int32 nLastAccessTime, bool bIsPrecious);
CacheEntry(sal_Int32 nLastAccessTime, bool bIsPrecious);
~CacheEntry (void) {};
inline void Recycle (const CacheEntry& rEntry);
@@ -69,18 +67,26 @@ public:
void SetUpToDate (bool bIsUpToDate) { mbIsUpToDate = bIsUpToDate; }
sal_Int32 GetAccessTime (void) const { return mnLastAccessTime; }
void SetAccessTime (sal_Int32 nAccessTime) { mnLastAccessTime = nAccessTime; }
- ::boost::shared_ptr<BitmapEx> GetPreview (void) const { return mpPreview; }
- inline void SetPreview (const ::boost::shared_ptr<BitmapEx>& rpPreview);
+
+ Bitmap GetPreview (void) const { return maPreview; }
+ inline void SetPreview (const Bitmap& rPreview);
bool HasPreview (void) const;
+
+ Bitmap GetMarkedPreview (void) const { return maMarkedPreview; }
+ inline void SetMarkedPreview (const Bitmap& rMarkePreview);
+ bool HasMarkedPreview (void) const;
+
bool HasReplacement (void) const { return (mpReplacement.get() != NULL); }
inline bool HasLosslessReplacement (void) const;
- void Clear (void) { mpPreview.reset(); mpReplacement.reset(); mpCompressor.reset(); }
+ void Clear (void) { maPreview.SetEmpty(); maMarkedPreview.SetEmpty();
+ mpReplacement.reset(); mpCompressor.reset(); }
void Invalidate (void) { mpReplacement.reset(); mpCompressor.reset(); mbIsUpToDate = false; }
bool IsPrecious (void) const { return mbIsPrecious; }
void SetPrecious (bool bIsPrecious) { mbIsPrecious = bIsPrecious; }
private:
- ::boost::shared_ptr<BitmapEx> mpPreview;
+ Bitmap maPreview;
+ Bitmap maMarkedPreview;
::boost::shared_ptr<BitmapReplacement> mpReplacement;
::boost::shared_ptr<BitmapCompressor> mpCompressor;
Size maBitmapSize;
@@ -222,7 +228,7 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
-::boost::shared_ptr<BitmapEx> BitmapCache::GetBitmap (const CacheKey& rKey)
+Bitmap BitmapCache::GetBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -231,10 +237,9 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
{
// Create an empty bitmap for the given key that acts as placeholder
// until we are given the real one. Mark it as not being up to date.
- SetBitmap (rKey, ::boost::shared_ptr<BitmapEx>(new BitmapEx()), false);
+ SetBitmap(rKey, Bitmap(), false);
iEntry = mpBitmapContainer->find(rKey);
iEntry->second.SetUpToDate(false);
- SSCD_SET_UPTODATE(iEntry->first,false);
}
else
{
@@ -254,7 +259,39 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
-void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
+Bitmap BitmapCache::GetMarkedBitmap (const CacheKey& rKey)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ CacheBitmapContainer::iterator iEntry (mpBitmapContainer->find(rKey));
+ if (iEntry != mpBitmapContainer->end())
+ {
+ iEntry->second.SetAccessTime(mnCurrentAccessTime++);
+ return iEntry->second.GetMarkedPreview();
+ }
+ else
+ return Bitmap();
+}
+
+
+
+
+void BitmapCache::ReleaseBitmap (const CacheKey& rKey)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey));
+ if (aIterator != mpBitmapContainer->end())
+ {
+ UpdateCacheSize(aIterator->second, REMOVE);
+ mpBitmapContainer->erase(aIterator);
+ }
+}
+
+
+
+
+bool BitmapCache::InvalidateBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -262,7 +299,6 @@ void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
if (iEntry != mpBitmapContainer->end())
{
iEntry->second.SetUpToDate(false);
- SSCD_SET_UPTODATE(iEntry->first,false);
// When there is a preview then we release the replacement. The
// preview itself is kept until a new one is created.
@@ -270,10 +306,12 @@ void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
{
UpdateCacheSize(iEntry->second, REMOVE);
iEntry->second.Invalidate();
- SSCD_SET_UPTODATE(iEntry->first,false);
UpdateCacheSize(iEntry->second, ADD);
}
+ return true;
}
+ else
+ return false;
}
@@ -287,7 +325,6 @@ void BitmapCache::InvalidateCache (void)
for (iEntry=mpBitmapContainer->begin(); iEntry!=mpBitmapContainer->end(); ++iEntry)
{
iEntry->second.Invalidate();
- SSCD_SET_UPTODATE(iEntry->first,false);
}
ReCalculateTotalCacheSize();
}
@@ -297,7 +334,7 @@ void BitmapCache::InvalidateCache (void)
void BitmapCache::SetBitmap (
const CacheKey& rKey,
- const ::boost::shared_ptr<BitmapEx>& rpPreview,
+ const Bitmap& rPreview,
bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
@@ -306,16 +343,15 @@ void BitmapCache::SetBitmap (
if (iEntry != mpBitmapContainer->end())
{
UpdateCacheSize(iEntry->second, REMOVE);
- iEntry->second.SetPreview(rpPreview);
+ iEntry->second.SetPreview(rPreview);
iEntry->second.SetUpToDate(true);
- SSCD_SET_UPTODATE(iEntry->first,true);
iEntry->second.SetAccessTime(mnCurrentAccessTime++);
}
else
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
rKey,
- CacheEntry (rpPreview, mnCurrentAccessTime++, bIsPrecious))
+ CacheEntry(rPreview, mnCurrentAccessTime++, bIsPrecious))
).first;
}
@@ -326,6 +362,25 @@ void BitmapCache::SetBitmap (
+void BitmapCache::SetMarkedBitmap (
+ const CacheKey& rKey,
+ const Bitmap& rPreview)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ CacheBitmapContainer::iterator iEntry (mpBitmapContainer->find(rKey));
+ if (iEntry != mpBitmapContainer->end())
+ {
+ UpdateCacheSize(iEntry->second, REMOVE);
+ iEntry->second.SetMarkedPreview(rPreview);
+ iEntry->second.SetAccessTime(mnCurrentAccessTime++);
+ UpdateCacheSize(iEntry->second, ADD);
+ }
+}
+
+
+
+
void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
@@ -344,9 +399,7 @@ void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
iEntry = mpBitmapContainer->insert(CacheBitmapContainer::value_type (
rKey,
- CacheEntry (
- ::boost::shared_ptr<BitmapEx>(),
- mnCurrentAccessTime++, bIsPrecious))
+ CacheEntry(Bitmap(), mnCurrentAccessTime++, bIsPrecious))
).first;
UpdateCacheSize(iEntry->second, ADD);
}
@@ -504,7 +557,8 @@ void BitmapCache::UpdateCacheSize (const CacheEntry& rEntry, CacheOperation eOpe
BitmapCache::CacheEntry::CacheEntry(
sal_Int32 nLastAccessTime,
bool bIsPrecious)
- : mpPreview(),
+ : maPreview(),
+ maMarkedPreview(),
mbIsUpToDate(true),
mnLastAccessTime(nLastAccessTime),
mbIsPrecious(bIsPrecious)
@@ -515,10 +569,11 @@ BitmapCache::CacheEntry::CacheEntry(
BitmapCache::CacheEntry::CacheEntry(
- const ::boost::shared_ptr<BitmapEx>& rpPreview,
+ const Bitmap& rPreview,
sal_Int32 nLastAccessTime,
bool bIsPrecious)
- : mpPreview(rpPreview),
+ : maPreview(rPreview),
+ maMarkedPreview(),
mbIsUpToDate(true),
mnLastAccessTime(nLastAccessTime),
mbIsPrecious(bIsPrecious)
@@ -533,7 +588,8 @@ inline void BitmapCache::CacheEntry::Recycle (const CacheEntry& rEntry)
if ((rEntry.HasPreview() || rEntry.HasLosslessReplacement())
&& ! (HasPreview() || HasLosslessReplacement()))
{
- mpPreview = rEntry.mpPreview;
+ maPreview = rEntry.maPreview;
+ maMarkedPreview = rEntry.maMarkedPreview;
mpReplacement = rEntry.mpReplacement;
mpCompressor = rEntry.mpCompressor;
mnLastAccessTime = rEntry.mnLastAccessTime;
@@ -547,8 +603,8 @@ inline void BitmapCache::CacheEntry::Recycle (const CacheEntry& rEntry)
inline sal_Int32 BitmapCache::CacheEntry::GetMemorySize (void) const
{
sal_Int32 nSize (0);
- if (mpPreview.get() != NULL)
- nSize += mpPreview->GetSizeBytes();
+ nSize += maPreview.GetSizeBytes();
+ nSize += maMarkedPreview.GetSizeBytes();
if (mpReplacement.get() != NULL)
nSize += mpReplacement->GetMemorySize();
return nSize;
@@ -559,14 +615,14 @@ inline sal_Int32 BitmapCache::CacheEntry::GetMemorySize (void) const
void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompressor>& rpCompressor)
{
- if (mpPreview.get() != NULL)
+ if ( ! maPreview.IsEmpty())
{
if (mpReplacement.get() == NULL)
{
- mpReplacement = rpCompressor->Compress(mpPreview);
+ mpReplacement = rpCompressor->Compress(maPreview);
#ifdef VERBOSE
- sal_uInt32 nOldSize (mpPreview->GetSizeBytes());
+ sal_uInt32 nOldSize (maPreview.GetSizeBytes());
sal_uInt32 nNewSize (mpReplacement.get()!=NULL ? mpReplacement->GetMemorySize() : 0);
if (nOldSize == 0)
nOldSize = 1;
@@ -581,7 +637,8 @@ void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompress
mpCompressor = rpCompressor;
}
- mpPreview.reset();
+ maPreview.SetEmpty();
+ maMarkedPreview.SetEmpty();
}
}
@@ -590,9 +647,10 @@ void BitmapCache::CacheEntry::Compress (const ::boost::shared_ptr<BitmapCompress
inline void BitmapCache::CacheEntry::Decompress (void)
{
- if (mpReplacement.get()!=NULL && mpCompressor.get()!=NULL && mpPreview.get()==NULL)
+ if (mpReplacement.get()!=NULL && mpCompressor.get()!=NULL && maPreview.IsEmpty())
{
- mpPreview = mpCompressor->Decompress(*mpReplacement);
+ maPreview = mpCompressor->Decompress(*mpReplacement);
+ maMarkedPreview.SetEmpty();
if ( ! mpCompressor->IsLossless())
mbIsUpToDate = false;
}
@@ -600,9 +658,10 @@ inline void BitmapCache::CacheEntry::Decompress (void)
-inline void BitmapCache::CacheEntry::SetPreview (const ::boost::shared_ptr<BitmapEx>& rpPreview)
+inline void BitmapCache::CacheEntry::SetPreview (const Bitmap& rPreview)
{
- mpPreview = rpPreview;
+ maPreview = rPreview;
+ maMarkedPreview.SetEmpty();
mpReplacement.reset();
mpCompressor.reset();
}
@@ -612,10 +671,23 @@ inline void BitmapCache::CacheEntry::SetPreview (const ::boost::shared_ptr<Bitma
bool BitmapCache::CacheEntry::HasPreview (void) const
{
- if (mpPreview.get() != NULL)
- return mpPreview->GetSizePixel().Width()>0 && mpPreview->GetSizePixel().Height()>0;
- else
- return false;
+ return ! maPreview.IsEmpty();
+}
+
+
+
+
+inline void BitmapCache::CacheEntry::SetMarkedPreview (const Bitmap& rMarkedPreview)
+{
+ maMarkedPreview = rMarkedPreview;
+}
+
+
+
+
+bool BitmapCache::CacheEntry::HasMarkedPreview (void) const
+{
+ return ! maMarkedPreview.IsEmpty();
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index c414138fdb3b..03610667c1be 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -33,9 +33,9 @@ class SdrPage;
#include <vcl/bitmapex.hxx>
#include <osl/mutex.hxx>
-#include <memory>
#include <boost/shared_ptr.hpp>
#include <boost/unordered_map.hpp>
+#include <boost/scoped_ptr.hpp>
namespace sd { namespace slidesorter { namespace cache {
@@ -45,10 +45,14 @@ class BitmapCompressor;
/** This low level cache is the actual bitmap container. It supports a
precious flag for every preview bitmap and keeps track of total sizes
- for all previews with as well as those without the flag. The precious
- flag is used by compaction algorithms to determine which previews may be
- compressed or even discarded and which have to remain in their original
- form. The precious flag is usually set for the visible previews.
+ for all previews with/without this flag. The precious flag is used by
+ compaction algorithms to determine which previews may be compressed or
+ even discarded and which have to remain in their original form. The
+ precious flag is usually set for the visible previews.
+
+ Additionally to the actual preview there is an optional marked preview.
+ This is used for slides excluded from the slide show which have a preview
+ that shows a mark (some sort of bitmap overlay) to that effect.
*/
class BitmapCache
{
@@ -103,11 +107,25 @@ public:
/** Return the preview bitmap for the given contact object.
*/
- ::boost::shared_ptr<BitmapEx> GetBitmap (const CacheKey& rKey);
+ Bitmap GetBitmap (const CacheKey& rKey);
- /** Mark the specified preview bitmap as not being up-to-date anymore.
+ /** Return the marked preview bitmap for the given contact object.
*/
- void InvalidateBitmap (const CacheKey& rKey);
+ Bitmap GetMarkedBitmap (const CacheKey& rKey);
+
+ /** Release the reference to the preview bitmap that is associated with
+ the given key.
+ */
+ void ReleaseBitmap (const CacheKey& rKey);
+
+ /** Mark the specified preview bitmap as not being up-to-date
+ anymore.
+ @return
+ When the key references a page in the cache then
+ return <TRUE/>. When the key is not known then <FALSE/>
+ is returned.
+ */
+ bool InvalidateBitmap (const CacheKey& rKey);
/** Mark all preview bitmaps as not being up-to-date anymore.
*/
@@ -117,9 +135,15 @@ public:
*/
void SetBitmap (
const CacheKey& rKey,
- const ::boost::shared_ptr<BitmapEx>& rpPreview,
+ const Bitmap& rPreview,
bool bIsPrecious);
+ /** Add or replace a marked bitmap for the given key.
+ */
+ void SetMarkedBitmap (
+ const CacheKey& rKey,
+ const Bitmap& rPreview);
+
/** Mark the specified preview bitmap as precious, i.e. that it must not
be compressed or otherwise removed from the cache.
*/
@@ -162,7 +186,7 @@ public:
private:
mutable ::osl::Mutex maMutex;
- ::std::auto_ptr<CacheBitmapContainer> mpBitmapContainer;
+ ::boost::scoped_ptr<CacheBitmapContainer> mpBitmapContainer;
/** Total size of bytes that are occupied by bitmaps in the cache for
whom the slides are currently not inside the visible area.
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
index 279746a29fc0..69cc8f0b377d 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
@@ -48,37 +48,24 @@ class NoBitmapCompression::DummyReplacement
: public BitmapReplacement
{
public:
- ::boost::shared_ptr<BitmapEx> mpPreview;
+ Bitmap maPreview;
Size maOriginalSize;
- DummyReplacement (const ::boost::shared_ptr<BitmapEx>& rpPreview) : mpPreview(rpPreview)
- {
- }
-
- virtual ~DummyReplacement();
-
- virtual sal_Int32 GetMemorySize (void) const;
+ DummyReplacement (const Bitmap& rPreview) : maPreview(rPreview) { }
+ virtual ~DummyReplacement(void) {}
+ virtual sal_Int32 GetMemorySize (void) const { return maPreview.GetSizeBytes(); }
};
-NoBitmapCompression::DummyReplacement::~DummyReplacement()
-{
-}
-sal_Int32 NoBitmapCompression::DummyReplacement::GetMemorySize (void) const
-{
- return mpPreview->GetSizeBytes();
-}
-::boost::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const
+::boost::shared_ptr<BitmapReplacement> NoBitmapCompression::Compress (const Bitmap& rBitmap) const
{
- return ::boost::shared_ptr<BitmapReplacement>(new DummyReplacement(rpBitmap));
+ return ::boost::shared_ptr<BitmapReplacement>(new DummyReplacement(rBitmap));
}
-::boost::shared_ptr<BitmapEx> NoBitmapCompression::Decompress (
- const BitmapReplacement& rBitmapData) const
+Bitmap NoBitmapCompression::Decompress (const BitmapReplacement& rBitmapData) const
{
- return dynamic_cast<const DummyReplacement&>(rBitmapData).mpPreview;
+ return dynamic_cast<const DummyReplacement&>(rBitmapData).maPreview;
}
@@ -94,8 +81,7 @@ bool NoBitmapCompression::IsLossless (void) const
//===== CompressionByDeletion =================================================
-::boost::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (
- const ::boost::shared_ptr<BitmapEx>& ) const
+::boost::shared_ptr<BitmapReplacement> CompressionByDeletion::Compress (const Bitmap& ) const
{
return ::boost::shared_ptr<BitmapReplacement>();
}
@@ -103,12 +89,11 @@ bool NoBitmapCompression::IsLossless (void) const
-::boost::shared_ptr<BitmapEx> CompressionByDeletion::Decompress (
- const BitmapReplacement& ) const
+Bitmap CompressionByDeletion::Decompress (const BitmapReplacement& ) const
{
// Return a NULL pointer. This will eventually lead to a request for
// the creation of a new one.
- return ::boost::shared_ptr<BitmapEx>();
+ return Bitmap();
}
@@ -129,11 +114,10 @@ bool CompressionByDeletion::IsLossless (void) const
class ResolutionReduction::ResolutionReducedReplacement : public BitmapReplacement
{
public:
- ::boost::shared_ptr<BitmapEx> mpPreview;
+ Bitmap maPreview;
Size maOriginalSize;
virtual ~ResolutionReducedReplacement();
-
virtual sal_Int32 GetMemorySize (void) const;
};
@@ -143,23 +127,20 @@ ResolutionReduction::ResolutionReducedReplacement::~ResolutionReducedReplacement
sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize (void) const
{
- if (mpPreview.get() != NULL)
- return mpPreview->GetSizeBytes();
- else
- return 0;
+ return maPreview.GetSizeBytes();
}
::boost::shared_ptr<BitmapReplacement> ResolutionReduction::Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const
+ const Bitmap& rBitmap) const
{
ResolutionReducedReplacement* pResult = new ResolutionReducedReplacement();
- pResult->mpPreview.reset(new BitmapEx(*rpBitmap));
- Size aSize (rpBitmap->GetSizePixel());
+ pResult->maPreview = rBitmap;
+ Size aSize (rBitmap.GetSizePixel());
pResult->maOriginalSize = aSize;
if (aSize.Width()>0 && aSize.Width()<mnWidth)
{
int nHeight = aSize.Height() * mnWidth / aSize.Width() ;
- pResult->mpPreview->Scale(Size(mnWidth,nHeight));
+ pResult->maPreview.Scale(Size(mnWidth,nHeight));
}
return ::boost::shared_ptr<BitmapReplacement>(pResult);
@@ -168,22 +149,21 @@ sal_Int32 ResolutionReduction::ResolutionReducedReplacement::GetMemorySize (void
-::boost::shared_ptr<BitmapEx> ResolutionReduction::Decompress (
- const BitmapReplacement& rBitmapData) const
+Bitmap ResolutionReduction::Decompress (const BitmapReplacement& rBitmapData) const
{
- ::boost::shared_ptr<BitmapEx> pResult;
+ Bitmap aResult;
const ResolutionReducedReplacement* pData (
dynamic_cast<const ResolutionReducedReplacement*>(&rBitmapData));
- if (pData->mpPreview.get() != NULL)
+ if ( ! pData->maPreview.IsEmpty())
{
- pResult.reset(new BitmapEx(*pData->mpPreview));
+ aResult = pData->maPreview;
if (pData->maOriginalSize.Width() > mnWidth)
- pResult->Scale(pData->maOriginalSize);
+ aResult.Scale(pData->maOriginalSize);
}
- return pResult;
+ return aResult;
}
@@ -224,15 +204,14 @@ public:
-::boost::shared_ptr<BitmapReplacement> PngCompression::Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const
+::boost::shared_ptr<BitmapReplacement> PngCompression::Compress (const Bitmap& rBitmap) const
{
- ::vcl::PNGWriter aWriter (*rpBitmap);
+ ::vcl::PNGWriter aWriter (rBitmap);
SvMemoryStream aStream (32768, 32768);
aWriter.Write(aStream);
PngReplacement* pResult = new PngReplacement();
- pResult->maImageSize = rpBitmap->GetSizePixel();
+ pResult->maImageSize = rBitmap.GetSizePixel();
pResult->mnDataSize = aStream.Tell();
pResult->mpData = new char[pResult->mnDataSize];
memcpy(pResult->mpData, aStream.GetData(), pResult->mnDataSize);
@@ -243,19 +222,19 @@ public:
-::boost::shared_ptr<BitmapEx> PngCompression::Decompress (
+Bitmap PngCompression::Decompress (
const BitmapReplacement& rBitmapData) const
{
- BitmapEx* pResult = NULL;
+ Bitmap aResult;
const PngReplacement* pData (dynamic_cast<const PngReplacement*>(&rBitmapData));
if (pData != NULL)
{
SvMemoryStream aStream (pData->mpData, pData->mnDataSize, STREAM_READ);
::vcl::PNGReader aReader (aStream);
- pResult = new BitmapEx(aReader.Read());
+ aResult = aReader.Read().GetBitmap();
}
- return ::boost::shared_ptr<BitmapEx>(pResult);
+ return aResult;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
index cbfeff086260..f978c013d0b3 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
@@ -33,7 +33,8 @@
#include <tools/gen.hxx>
#include <boost/shared_ptr.hpp>
-class BitmapEx;
+
+class Bitmap;
namespace sd { namespace slidesorter { namespace cache {
@@ -49,8 +50,7 @@ public:
/** Compress the given bitmap into a replacement format that is specific
to the compressor class.
*/
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const = 0;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const = 0;
/** Decompress the given replacement data into a preview bitmap.
Depending on the compression technique the returned bitmap may
@@ -59,7 +59,7 @@ public:
task of the caller to create a new preview bitmap if the returned
one is not as desired.
*/
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData)const=0;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData)const=0;
/** Return whether the compression and decompression is lossless. This
value is used by the caller of Decompress() to decide whether to use
@@ -92,9 +92,8 @@ class NoBitmapCompression
{
class DummyReplacement;
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
@@ -110,9 +109,8 @@ class CompressionByDeletion
: public BitmapCompressor
{
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
@@ -130,11 +128,10 @@ class ResolutionReduction
class ResolutionReducedReplacement;
static const sal_Int32 mnWidth = 100;
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rpBitmap) const;
/** Scale the replacement bitmap up to the original size.
*/
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
@@ -149,9 +146,8 @@ class PngCompression
{
class PngReplacement;
public:
- virtual ::boost::shared_ptr<BitmapReplacement> Compress (
- const ::boost::shared_ptr<BitmapEx>& rpBitmap) const;
- virtual ::boost::shared_ptr<BitmapEx> Decompress (const BitmapReplacement& rBitmapData) const;
+ virtual ::boost::shared_ptr<BitmapReplacement> Compress (const Bitmap& rBitmap) const;
+ virtual Bitmap Decompress (const BitmapReplacement& rBitmapData) const;
virtual bool IsLossless (void) const;
};
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index cd656a7b589f..56625d5d9f04 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -25,8 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
@@ -34,12 +32,19 @@
#include "PreviewRenderer.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "sdpage.hxx"
#include "Window.hxx"
+#include <drawdoc.hxx>
+#include "DrawDocShell.hxx"
#include <svx/svdtypes.hxx>
#include <svx/svdpage.hxx>
#include <vcl/bitmapex.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/pngwrite.hxx>
+
+const static sal_Int32 gnSuperSampleFactor (2);
+const static bool gbAllowSuperSampling (false);
+
namespace sd { namespace slidesorter { namespace view {
class SlideSorterView;
@@ -49,7 +54,7 @@ class PageObjectViewObjectContact;
namespace sd { namespace slidesorter { namespace cache {
BitmapFactory::BitmapFactory (void)
- : maRenderer(NULL,false)
+ : maRenderer(NULL, false)
{
}
@@ -63,16 +68,30 @@ BitmapFactory::~BitmapFactory (void)
-::boost::shared_ptr<BitmapEx> BitmapFactory::CreateBitmap (
+Bitmap BitmapFactory::CreateBitmap (
const SdPage& rPage,
- const Size& rPixelSize)
+ const Size& rPixelSize,
+ const bool bDoSuperSampling)
{
- Image aPreview (maRenderer.RenderPage (
+ Size aSize (rPixelSize);
+ if (bDoSuperSampling && gbAllowSuperSampling)
+ {
+ aSize.Width() *= gnSuperSampleFactor;
+ aSize.Height() *= gnSuperSampleFactor;
+ }
+
+ Bitmap aPreview (maRenderer.RenderPage (
&rPage,
- rPixelSize,
- String()));
-
- return ::boost::shared_ptr<BitmapEx>(new BitmapEx(aPreview.GetBitmapEx()));
+ aSize,
+ String(),
+ true,
+ false).GetBitmapEx().GetBitmap());
+ if (bDoSuperSampling && gbAllowSuperSampling)
+ {
+ aPreview.Scale(rPixelSize, BMP_SCALE_INTERPOLATE);
+ }
+
+ return aPreview;
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
index ff39fdc2675d..0b858f98565c 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
@@ -32,7 +32,6 @@
#include "PreviewRenderer.hxx"
#include <boost/shared_ptr.hpp>
-class BitmapEx;
class SdPage;
class Size;
@@ -51,9 +50,10 @@ public:
BitmapFactory (void);
~BitmapFactory (void);
- ::boost::shared_ptr<BitmapEx> CreateBitmap (
+ Bitmap CreateBitmap (
const SdPage& rPage,
- const Size& rPixelSize);
+ const Size& rPixelSize,
+ const bool bDoSuperSampling);
private:
PreviewRenderer maRenderer;
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index 48480d11bd80..0677035e31e4 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -25,8 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
@@ -38,20 +36,27 @@
#include "cache/SlsPageCacheManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "controller/SlideSorterController.hxx"
+
namespace sd { namespace slidesorter { namespace cache {
GenericPageCache::GenericPageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext)
: mpBitmapCache(),
maRequestQueue(rpCacheContext),
mpQueueProcessor(),
mpCacheContext(rpCacheContext),
- maPreviewSize(rPreviewSize)
+ maPreviewSize(rPreviewSize),
+ mbDoSuperSampling(bDoSuperSampling)
{
+ // A large size may indicate an error of the caller. After all we
+ // are creating previews.
+ DBG_ASSERT (maPreviewSize.Width()<1000 && maPreviewSize.Height()<1000,
+ "GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
+ "This may indicate an error.");
}
@@ -59,14 +64,12 @@ GenericPageCache::GenericPageCache (
GenericPageCache::~GenericPageCache (void)
{
- OSL_TRACE("terminating queue processor %p", mpQueueProcessor.get());
if (mpQueueProcessor.get() != NULL)
mpQueueProcessor->Stop();
maRequestQueue.Clear();
if (mpQueueProcessor.get() != NULL)
mpQueueProcessor->Terminate();
mpQueueProcessor.reset();
- OSL_TRACE("queue processor stopped and terminated");
if (mpBitmapCache.get() != NULL)
PageCacheManager::Instance()->ReleaseCache(mpBitmapCache);
@@ -88,62 +91,69 @@ void GenericPageCache::ProvideCacheAndProcessor (void)
maRequestQueue,
mpBitmapCache,
maPreviewSize,
+ mbDoSuperSampling,
mpCacheContext));
}
-void GenericPageCache::ChangePreviewSize (const Size& rPreviewSize)
+void GenericPageCache::ChangePreviewSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling)
{
- if (rPreviewSize != maPreviewSize)
+ if (rPreviewSize!=maPreviewSize || bDoSuperSampling!=mbDoSuperSampling)
{
+ // A large size may indicate an error of the caller. After all we
+ // are creating previews.
+ DBG_ASSERT (maPreviewSize.Width()<1000 && maPreviewSize.Height()<1000,
+ "GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
+ "This may indicate an error.");
+
if (mpBitmapCache.get() != NULL)
{
mpBitmapCache = PageCacheManager::Instance()->ChangeSize(
mpBitmapCache, maPreviewSize, rPreviewSize);
if (mpQueueProcessor.get() != NULL)
{
- mpQueueProcessor->SetPreviewSize(rPreviewSize);
+ mpQueueProcessor->SetPreviewSize(rPreviewSize, bDoSuperSampling);
mpQueueProcessor->SetBitmapCache(mpBitmapCache);
}
}
maPreviewSize = rPreviewSize;
+ mbDoSuperSampling = bDoSuperSampling;
}
}
-BitmapEx GenericPageCache::GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize)
+Bitmap GenericPageCache::GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
{
OSL_ASSERT(aKey != NULL);
- BitmapEx aPreview;
+ Bitmap aPreview;
bool bMayBeUpToDate = true;
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
if (mpBitmapCache->HasBitmap(pPage))
{
- ::boost::shared_ptr<BitmapEx> pPreview(mpBitmapCache->GetBitmap(pPage));
- OSL_ASSERT(pPreview.get() != NULL);
- aPreview = *pPreview;
- Size aBitmapSize (aPreview.GetSizePixel());
- if (aBitmapSize != rSize)
+ aPreview = mpBitmapCache->GetBitmap(pPage);
+ const Size aBitmapSize (aPreview.GetSizePixel());
+ if (aBitmapSize != maPreviewSize)
{
- // The bitmap has the wrong size.
- DBG_ASSERT (rSize.Width() < 1000,
- "GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
- "This may indicate an error.");
-
// Scale the bitmap to the desired size when that is possible,
// i.e. the bitmap is not empty.
- if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
- aPreview.Scale (rSize, BMP_SCALE_FAST);
+ if (bResize && aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
+ {
+ aPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
+ }
+ bMayBeUpToDate = false;
}
- bMayBeUpToDate = true;
+ else
+ bMayBeUpToDate = true;
}
else
bMayBeUpToDate = false;
@@ -151,7 +161,7 @@ BitmapEx GenericPageCache::GetPreviewBitmap (
// Request the creation of a correctly sized preview bitmap. We do this
// even when the size of the bitmap in the cache is correct because its
// content may be not up-to-date anymore.
- RequestPreviewBitmap(aKey, rSize, bMayBeUpToDate);
+ RequestPreviewBitmap(aKey, bMayBeUpToDate);
return aPreview;
}
@@ -159,10 +169,49 @@ BitmapEx GenericPageCache::GetPreviewBitmap (
+Bitmap GenericPageCache::GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
+{
+ OSL_ASSERT(aKey != NULL);
+
+ ProvideCacheAndProcessor();
+ const SdrPage* pPage = mpCacheContext->GetPage(aKey);
+ Bitmap aMarkedPreview (mpBitmapCache->GetMarkedBitmap(pPage));
+ const Size aBitmapSize (aMarkedPreview.GetSizePixel());
+ if (bResize && aBitmapSize != maPreviewSize)
+ {
+ // Scale the bitmap to the desired size when that is possible,
+ // i.e. the bitmap is not empty.
+ if (aBitmapSize.Width()>0 && aBitmapSize.Height()>0)
+ {
+ aMarkedPreview.Scale(maPreviewSize, BMP_SCALE_FAST);
+ }
+ }
+
+ return aMarkedPreview;
+}
+
+
+
+
+void GenericPageCache::SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rMarkedBitmap)
+{
+ OSL_ASSERT(aKey != NULL);
+
+ ProvideCacheAndProcessor();
+ const SdrPage* pPage = mpCacheContext->GetPage(aKey);
+ mpBitmapCache->SetMarkedBitmap(pPage, rMarkedBitmap);
+}
+
+
+
+
void GenericPageCache::RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize,
- bool bMayBeUpToDate)
+ const CacheKey aKey,
+ const bool bMayBeUpToDate)
{
OSL_ASSERT(aKey != NULL);
@@ -176,8 +225,8 @@ void GenericPageCache::RequestPreviewBitmap (
bIsUpToDate = mpBitmapCache->BitmapIsUpToDate (pPage);
if (bIsUpToDate)
{
- ::boost::shared_ptr<BitmapEx> pPreview (mpBitmapCache->GetBitmap(pPage));
- if (pPreview.get()==NULL || pPreview->GetSizePixel()!=rSize)
+ const Bitmap aPreview (mpBitmapCache->GetBitmap(pPage));
+ if (aPreview.IsEmpty() || aPreview.GetSizePixel()!=maPreviewSize)
bIsUpToDate = false;
}
@@ -200,7 +249,25 @@ void GenericPageCache::RequestPreviewBitmap (
-void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey)
+bool GenericPageCache::InvalidatePreviewBitmap (const CacheKey aKey)
+{
+ // Invalidate the page in all caches that reference it, not just this one.
+ ::boost::shared_ptr<cache::PageCacheManager> pCacheManager (
+ cache::PageCacheManager::Instance());
+ if (pCacheManager)
+ return pCacheManager->InvalidatePreviewBitmap(
+ mpCacheContext->GetModel(),
+ aKey);
+ else if (mpBitmapCache.get() != NULL)
+ return mpBitmapCache->InvalidateBitmap(mpCacheContext->GetPage(aKey));
+ else
+ return false;
+}
+
+
+
+
+void GenericPageCache::ReleasePreviewBitmap (const CacheKey aKey)
{
if (mpBitmapCache.get() != NULL)
{
@@ -234,9 +301,9 @@ void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey)
-void GenericPageCache::InvalidateCache (bool bUpdateCache)
+void GenericPageCache::InvalidateCache (const bool bUpdateCache)
{
- if (mpBitmapCache.get() != NULL)
+ if (mpBitmapCache)
{
// When the cache is being invalidated then it makes no sense to
// continue creating preview bitmaps. However, this may be
@@ -256,7 +323,9 @@ void GenericPageCache::InvalidateCache (bool bUpdateCache)
-void GenericPageCache::SetPreciousFlag (CacheKey aKey, bool bIsPrecious)
+void GenericPageCache::SetPreciousFlag (
+ const CacheKey aKey,
+ const bool bIsPrecious)
{
ProvideCacheAndProcessor();
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
index 734b39a3a5a4..f4dd4900b6ad 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
@@ -31,8 +31,6 @@
#include "SlideSorter.hxx"
#include "SlsRequestQueue.hxx"
-#include "SlsQueueProcessor.hxx"
-#include <boost/function.hpp>
#include <boost/scoped_ptr.hpp>
namespace sd { namespace slidesorter { namespace cache {
@@ -45,12 +43,18 @@ class QueueProcessor;
class GenericPageCache
{
public:
- /** The page chache is created with references both to the SlideSorter.
- This allows access to both view and model and the cache can so fill
- itself with requests for all or just the visible pages.
+ /** The page chache is created with a reference to the SlideSorter and
+ thus has access to both view and model. This allows the cache to
+ fill itself with requests for all pages or just the visible ones.
+ @param rPreviewSize
+ The size of the previews is expected in pixel values.
+ @param bDoSuperSampling
+ When <TRUE/> the previews are rendered larger and then scaled
+ down to the requested size to improve image quality.
*/
GenericPageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
~GenericPageCache (void);
@@ -59,10 +63,12 @@ public:
resize of the slide sorter window or a change of the number of
columns.
*/
- void ChangePreviewSize (const Size& rPreviewSize);
+ void ChangePreviewSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling);
/** Request a preview bitmap for the specified page object in the
- specified size. The returned bitmap may be preview of the preview,
+ specified size. The returned bitmap may be a preview of the preview,
i.e. either a scaled (up or down) version of a previous preview (of
the wrong size) or an empty bitmap. In this case a request for the
generation of a new preview is created and inserted into the request
@@ -71,53 +77,67 @@ public:
receives the correctly sized preview bitmap.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap.
+ @param bResize
+ When <TRUE/> then when the available bitmap has not the
+ requested size, it is scaled before it is returned. When
+ <FALSE/> then the bitmap is returned in the wrong size and it is
+ the task of the caller to scale it.
@return
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- BitmapEx GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
+ Bitmap GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ Bitmap GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ void SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rMarkedBitmap);
/** When the requested preview bitmap does not yet exist or is not
up-to-date then the rendering of one is scheduled. Otherwise this
method does nothing.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap in pixel coordinates.
@param bMayBeUpToDate
This flag helps the method to determine whether an existing
preview that matches the request is up to date. If the caller
- know that it is not then by passing <FALSE/> he tells us that we
+ knows that it is not then by passing <FALSE/> he tells us that we
do not have to check the up-to-date flag a second time. If
- unsure pass <TRUE/>.
+ unsure use <TRUE/>.
*/
void RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize,
- bool bMayBeUpToDate = true);
+ const CacheKey aKey,
+ const bool bMayBeUpToDate = true);
+
+ /** Tell the cache to replace the bitmap associated with the given
+ request data with a new one that reflects recent changes in the
+ content of the page object.
+ @return
+ When the key is kown then return <TRUE/>.
+ */
+ bool InvalidatePreviewBitmap (const CacheKey aKey);
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested a new bitmap.
*/
- void ReleasePreviewBitmap (CacheKey aKey);
+ void ReleasePreviewBitmap (const CacheKey aKey);
/** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has
changed or when the model has changed.
*/
- void InvalidateCache (bool bUpdateCache);
+ void InvalidateCache (const bool bUpdateCache);
/** With the precious flag you can control whether a bitmap can be
removed from the cache or reduced in size to make room for other
bitmaps or is so precious that it will not be touched. A typical
use is to set the precious flag for the visible pages.
*/
- void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
+ void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious);
void Pause (void);
void Resume (void);
@@ -135,6 +155,8 @@ private:
*/
Size maPreviewSize;
+ bool mbDoSuperSampling;
+
/** Both bitmap cache and queue processor are created on demand by this
method.
*/
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
index 06bd132975e7..7fb9d956834d 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
@@ -45,10 +45,12 @@ namespace sd { namespace slidesorter { namespace cache {
PageCache::PageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext)
: mpImplementation(
new GenericPageCache(
rPreviewSize,
+ bDoSuperSampling,
rpCacheContext))
{
}
@@ -63,26 +65,66 @@ PageCache::~PageCache (void)
-void PageCache::ChangeSize(const Size& rPreviewSize)
+void PageCache::ChangeSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling)
+{
+ mpImplementation->ChangePreviewSize(rPreviewSize, bDoSuperSampling);
+}
+
+
+
+
+Bitmap PageCache::GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
+{
+ return mpImplementation->GetPreviewBitmap(aKey, bResize);
+}
+
+
+
+
+Bitmap PageCache::GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize)
+{
+ return mpImplementation->GetMarkedPreviewBitmap(aKey, bResize);
+}
+
+
+
+
+void PageCache::SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rMarkedBitmap)
+{
+ mpImplementation->SetMarkedPreviewBitmap(aKey, rMarkedBitmap);
+}
+
+
+
+
+void PageCache::RequestPreviewBitmap (const CacheKey aKey)
{
- mpImplementation->ChangePreviewSize(rPreviewSize);
+ return mpImplementation->RequestPreviewBitmap(aKey);
}
-BitmapEx PageCache::GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize)
+void PageCache::InvalidatePreviewBitmap (
+ const CacheKey aKey,
+ const bool bRequestPreview)
{
- return mpImplementation->GetPreviewBitmap(aKey, rSize);
+ if (mpImplementation->InvalidatePreviewBitmap(aKey) && bRequestPreview)
+ RequestPreviewBitmap(aKey);
}
-void PageCache::ReleasePreviewBitmap (
- CacheKey aKey)
+void PageCache::ReleasePreviewBitmap (const CacheKey aKey)
{
mpImplementation->ReleasePreviewBitmap(aKey);
}
@@ -90,7 +132,7 @@ void PageCache::ReleasePreviewBitmap (
-void PageCache::InvalidateCache (bool bUpdateCache)
+void PageCache::InvalidateCache (const bool bUpdateCache)
{
mpImplementation->InvalidateCache(bUpdateCache);
}
@@ -99,8 +141,8 @@ void PageCache::InvalidateCache (bool bUpdateCache)
void PageCache::SetPreciousFlag (
- CacheKey aKey,
- bool bIsPrecious)
+ const CacheKey aKey,
+ const bool bIsPrecious)
{
mpImplementation->SetPreciousFlag(aKey, bIsPrecious);
}
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 6fb292a56c1b..229db639ceb4 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -326,7 +326,6 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache)
mpPageCaches->begin(),
mpPageCaches->end(),
PageCacheContainer::CompareWithCache(rpCache)));
- OSL_ASSERT(iCacheToChange != mpPageCaches->end());
if (iCacheToChange != mpPageCaches->end())
{
OSL_ASSERT(iCacheToChange->second == rpCache);
@@ -343,6 +342,10 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache)
pResult = rpCache;
}
+ else
+ {
+ OSL_ASSERT(iCacheToChange != mpPageCaches->end());
+ }
}
return pResult;
@@ -351,10 +354,12 @@ void PageCacheManager::ReleaseCache (const ::boost::shared_ptr<Cache>& rpCache)
-void PageCacheManager::InvalidatePreviewBitmap (
+bool PageCacheManager::InvalidatePreviewBitmap (
DocumentKey pDocument,
const SdrPage* pKey)
{
+ bool bHasChanged (false);
+
if (pDocument!=NULL)
{
// Iterate over all caches that are currently in use and invalidate
@@ -362,7 +367,7 @@ void PageCacheManager::InvalidatePreviewBitmap (
PageCacheContainer::iterator iCache;
for (iCache=mpPageCaches->begin(); iCache!=mpPageCaches->end(); ++iCache)
if (iCache->first.mpDocument == pDocument)
- iCache->second->InvalidateBitmap(pKey);
+ bHasChanged |= iCache->second->InvalidateBitmap(pKey);
// Invalidate the previews in the recently used caches belonging to
// the given document.
@@ -371,9 +376,37 @@ void PageCacheManager::InvalidatePreviewBitmap (
{
RecentlyUsedQueue::const_iterator iCache2;
for (iCache2=iQueue->second.begin(); iCache2!=iQueue->second.end(); ++iCache2)
- iCache2->mpCache->InvalidateBitmap(pKey);
+ bHasChanged |= iCache2->mpCache->InvalidateBitmap(pKey);
}
}
+
+ return bHasChanged;
+}
+
+
+
+
+void PageCacheManager::InvalidateAllPreviewBitmaps (DocumentKey pDocument)
+{
+ if (pDocument == NULL)
+ return;
+
+ // Iterate over all caches that are currently in use and invalidate the
+ // previews in those that belong to the document.
+ PageCacheContainer::iterator iCache;
+ for (iCache=mpPageCaches->begin(); iCache!=mpPageCaches->end(); ++iCache)
+ if (iCache->first.mpDocument == pDocument)
+ iCache->second->InvalidateCache();
+
+ // Invalidate the previews in the recently used caches belonging to the
+ // given document.
+ RecentlyUsedPageCaches::iterator iQueue (mpRecentlyUsedPageCaches->find(pDocument));
+ if (iQueue != mpRecentlyUsedPageCaches->end())
+ {
+ RecentlyUsedQueue::const_iterator iCache2;
+ for (iCache2=iQueue->second.begin(); iCache2!=iQueue->second.end(); ++iCache2)
+ iCache2->mpCache->InvalidateCache();
+ }
}
@@ -395,6 +428,16 @@ void PageCacheManager::InvalidateAllCaches (void)
+void PageCacheManager::ReleasePreviewBitmap (const SdrPage* pPage)
+{
+ PageCacheContainer::iterator iCache;
+ for (iCache=mpPageCaches->begin(); iCache!=mpPageCaches->end(); ++iCache)
+ iCache->second->ReleaseBitmap(pPage);
+}
+
+
+
+
::boost::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetRecentlyUsedCache (
DocumentKey pDocument,
const Size& rPreviewSize)
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index ac26e8c89fa7..345c3c5d5513 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -41,6 +41,7 @@ QueueProcessor::QueueProcessor (
RequestQueue& rQueue,
const ::boost::shared_ptr<BitmapCache>& rpCache,
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext)
: maMutex(),
maTimer(),
@@ -48,6 +49,7 @@ QueueProcessor::QueueProcessor (
mnTimeBetweenLowPriorityRequests (100/*ms*/),
mnTimeBetweenRequestsWhenNotIdle (1000/*ms*/),
maPreviewSize(rPreviewSize),
+ mbDoSuperSampling(bDoSuperSampling),
mpCacheContext(rpCacheContext),
mrQueue(rQueue),
mpCache(rpCache),
@@ -137,9 +139,12 @@ void QueueProcessor::Terminate (void)
-void QueueProcessor::SetPreviewSize (const Size& rPreviewSize)
+void QueueProcessor::SetPreviewSize (
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling)
{
maPreviewSize = rPreviewSize;
+ mbDoSuperSampling = bDoSuperSampling;
}
@@ -208,15 +213,12 @@ void QueueProcessor::ProcessOneRequest (
const SdPage* pSdPage = dynamic_cast<const SdPage*>(mpCacheContext->GetPage(aKey));
if (pSdPage != NULL)
{
- const ::boost::shared_ptr<BitmapEx> pPreview (
- maBitmapFactory.CreateBitmap(*pSdPage, maPreviewSize));
- mpCache->SetBitmap (
- pSdPage,
- pPreview,
- ePriorityClass!=NOT_VISIBLE);
+ const Bitmap aPreview (
+ maBitmapFactory.CreateBitmap(*pSdPage, maPreviewSize, mbDoSuperSampling));
+ mpCache->SetBitmap (pSdPage, aPreview, ePriorityClass!=NOT_VISIBLE);
// Initiate a repaint of the new preview.
- mpCacheContext->NotifyPreviewCreation(aKey, pPreview);
+ mpCacheContext->NotifyPreviewCreation(aKey, aPreview);
}
}
}
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx
index d79f2267346c..55139a300fe3 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.hxx
@@ -32,9 +32,7 @@
#include "cache/SlsPageCache.hxx"
#include "SlsRequestPriorityClass.hxx"
#include "SlsBitmapFactory.hxx"
-#include "view/SlsPageObject.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "tools/IdleDetection.hxx"
#include "SlsBitmapCache.hxx"
#include "sdpage.hxx"
@@ -72,6 +70,7 @@ public:
RequestQueue& rQueue,
const ::boost::shared_ptr<BitmapCache>& rpCache,
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
virtual ~QueueProcessor();
@@ -91,7 +90,9 @@ public:
void Terminate (void);
- void SetPreviewSize (const Size& rSize);
+ void SetPreviewSize (
+ const Size& rSize,
+ const bool bDoSuperSampling);
/** As we can not really terminate the rendering of a preview bitmap for
a request in midair this method acts more like a semaphor. It
@@ -119,6 +120,7 @@ private:
sal_uInt32 mnTimeBetweenLowPriorityRequests;
sal_uInt32 mnTimeBetweenRequestsWhenNotIdle;
Size maPreviewSize;
+ bool mbDoSuperSampling;
SharedCacheContext mpCacheContext;
RequestQueue& mrQueue;
::boost::shared_ptr<BitmapCache> mpCache;
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx
index 349d2813c0cb..e0f519860cad 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessorThread.hxx
@@ -129,7 +129,6 @@ template <class Queue, class Request, class Cache, class Factory>
mrQueue (rQueue),
mrCache (rCache)
{
- OSL_TRACE("QueueProcessorThread::constructor %p", this);
create();
}
@@ -140,7 +139,6 @@ template <class Queue, class Request, class Cache, class Factory>
QueueProcessorThread<Queue, Request, Cache, Factory>
::~QueueProcessorThread (void)
{
- OSL_TRACE("QueueProcessorThread::destructor %p", this);
}
@@ -149,16 +147,12 @@ template <class Queue, class Request, class Cache, class Factory>
template <class Queue, class Request, class Cache, class Factory>
void SAL_CALL QueueProcessorThread<Queue, Request, Cache, Factory>::run (void)
{
- OSL_TRACE("QueueProcessorThread::run(): running thread %p", this);
while ( ! mbIsTerminated)
{
- OSL_TRACE("QueueProcessorThread::run(): still running thread %p: %d", this, mbIsTerminated?1:0);
if (mrQueue.IsEmpty())
{
// Sleep while the queue is empty.
- OSL_TRACE("QueueProcessorThread::run(): suspending thread %p", this);
suspend();
- OSL_TRACE("QueueProcessorThread::run(): running again thread %p", this);
}
else if (GetpApp()->AnyInput())
@@ -169,19 +163,15 @@ void SAL_CALL QueueProcessorThread<Queue, Request, Cache, Factory>::run (void)
TimeValue aTimeToWait;
aTimeToWait.Seconds = 0;
aTimeToWait.Nanosec = 50*1000*1000;
- OSL_TRACE("QueueProcessorThread::run(): input pending: waiting %d nanoseconds",
- aTimeToWait.Nanosec);
wait (aTimeToWait);
}
else
{
- OSL_TRACE ("QueueProcessorThread::run(): Processing Query");
ProcessQueueEntry();
yield ();
}
}
- OSL_TRACE("QueueProcessorThread::run(): exiting run %p", this);
}
@@ -197,7 +187,6 @@ void QueueProcessorThread<Queue, Request, Cache, Factory>
do
{
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry(): testing for mbIsTerminated %p", this);
{
::osl::MutexGuard aGuard (maMutex);
if (mbIsTerminated)
@@ -205,7 +194,6 @@ void QueueProcessorThread<Queue, Request, Cache, Factory>
if (mrQueue.IsEmpty())
break;
}
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry():acquiring mutex for bitmap creation %p", this);
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard (maMutex);
if (mbIsTerminated)
@@ -214,18 +202,12 @@ void QueueProcessorThread<Queue, Request, Cache, Factory>
if (mrQueue.IsEmpty())
break;
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry(): have mutexes %p", this);
-
// Get the requeuest with the highest priority from the queue.
nPriorityClass = mrQueue.GetFrontPriorityClass();
pRequest = &mrQueue.GetFront();
mrQueue.PopFront();
bRequestIsValid = true;
-
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry():using request %p for creating bitmap", pRequest);
- OSL_TRACE ("QueueProcessorThread::ProcessQueueEntry():processing request for page %d with priority class ",
- pRequest->GetPage()->GetPageNum(), nPriorityClass);
try
{
// Create a new preview bitmap and store it in the cache.
@@ -261,7 +243,6 @@ void QueueProcessorThread<
Queue, RequestData, BitmapCache, BitmapFactory
>::Start (void)
{
- OSL_TRACE ("QueueProcessorThread::Start %p", this);
resume ();
}
@@ -276,7 +257,6 @@ void QueueProcessorThread<
Queue, RequestData, BitmapCache, BitmapFactory
>::Stop (void)
{
- OSL_TRACE ("QueueProcessorThread::Stop %p", this);
suspend();
}
@@ -291,7 +271,6 @@ void QueueProcessorThread<
Queue, RequestData, BitmapCache, BitmapFactory
>::RemoveRequest (RequestData& rRequest)
{
- OSL_TRACE ("QueueProcessorThread::RemoveRequest %p", this);
// Do nothing else then wait for the mutex to be released.
::osl::MutexGuard aGuard (mrQueue.GetMutex());
}
@@ -308,11 +287,9 @@ void QueueProcessorThread<
>::Terminate (void)
{
// SolarMutexGuard aSolarGuard;
- OSL_TRACE("QueueProcessorThread::Terminate(): terminating thread %p", this);
::osl::Thread::terminate ();
{
::osl::MutexGuard aGuard (maMutex);
- OSL_TRACE("QueueProcessorThread::Terminate(): starting to join %p, %d", this, mbIsTerminated?1:0);
mbIsTerminated = true;
}
Start();
@@ -333,29 +310,6 @@ void SAL_CALL QueueProcessorThread<
{
::osl::MutexGuard aGuard (maMutex);
mbCanBeJoined = true;
- /*
- OSL_TRACE("QueueProcessorThread::Terminate():join %p, %d", this, mbIsTerminated?1:0);
- while (true)
- {
- {
- ::osl::MutexGuard aGuard (maMutex);
- if (mbCanBeJoined)
- break;
- }
- Start();
- TimeValue aTimeToWait;
- aTimeToWait.Seconds = 0;
- aTimeToWait.Nanosec = 50*1000*1000;
- OSL_TRACE("QueueProcessorThread::Terminate(): waiting for join");
- wait (aTimeToWait);
- }
- if (mbCanBeJoined)
- join();
- else
- OSL_TRACE("Can not join");
- OSL_TRACE("QueueProcessorThread::Terminate():terminated thread %p :%d",
- this, mbIsTerminated?1:0);
- */
}
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
index 28794967281e..017f7572ea9c 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
@@ -25,8 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index e92b1c90bc67..969e85c3c7f4 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -25,8 +25,6 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
index e59f7e3ab3bd..e59f7e3ab3bd 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 3e822890ded4..4cc101990807 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -40,17 +40,22 @@
#include "SlsSelectionCommand.hxx"
#include "controller/SlsAnimator.hxx"
#include "controller/SlsClipboard.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
#include "controller/SlsScrollBarManager.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "controller/SlsSelectionManager.hxx"
#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsTransferable.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
#include "view/SlsFontProvider.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsPageObjectPainter.hxx"
+#include "view/SlsTheme.hxx"
+#include "view/SlsToolTip.hxx"
#include "cache/SlsPageCache.hxx"
#include "cache/SlsPageCacheManager.hxx"
@@ -92,12 +97,12 @@
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::sd::slidesorter::model;
using namespace ::sd::slidesorter::view;
using namespace ::sd::slidesorter::controller;
+using namespace ::basegfx;
namespace sd { namespace slidesorter { namespace controller {
@@ -113,9 +118,12 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mpScrollBarManager(),
mpCurrentSlideManager(),
mpSelectionManager(),
+ mpInsertionIndicatorHandler(new InsertionIndicatorHandler(rSlideSorter)),
mpAnimator(new Animator(rSlideSorter)),
+ mpVisibleAreaManager(new VisibleAreaManager(rSlideSorter)),
mpListener(),
mnModelChangeLockCount(0),
+ mbIsForcedRearrangePending(false),
mbPreModelChangeDone(false),
mbPostModelChangePending(false),
maSelectionBeforeSwitch(),
@@ -123,12 +131,11 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mpEditModeChangeMasterPage(NULL),
maTotalWindowArea(),
mnPaintEntranceCount(0),
- mbIsContextMenuOpen(false),
- mpProperties(new Properties())
+ mbIsContextMenuOpen(false)
{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- OSL_ASSERT(pWindow!=NULL);
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ OSL_ASSERT(pWindow);
+ if (pWindow)
{
// The whole background is painted by the view and controls.
::Window* pParentWindow = pWindow->GetParent();
@@ -137,22 +144,10 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
// Connect the view with the window that has been created by our base
// class.
- pWindow->SetBackground (Wallpaper());
- mrView.AddWindowToPaintView(pWindow);
- mrView.SetActualWin(pWindow);
- pWindow->SetCenterAllowed (false);
- pWindow->SetViewSize (mrView.GetModelArea().GetSize());
- pWindow->EnableRTL(FALSE);
-
- // Reinitialize colors in Properties with window specific values.
- mpProperties->SetBackgroundColor(
- pWindow->GetSettings().GetStyleSettings().GetWindowColor());
- mpProperties->SetTextColor(
- pWindow->GetSettings().GetStyleSettings().GetWindowTextColor());
- mpProperties->SetSelectionColor(
- pWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
- mpProperties->SetHighlightColor(
- pWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ pWindow->SetBackground(Wallpaper());
+ pWindow->SetCenterAllowed(false);
+ pWindow->SetMapMode(MapMode(MAP_PIXEL));
+ pWindow->SetViewSize(mrView.GetModelArea().GetSize());
}
}
@@ -161,8 +156,6 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
void SlideSorterController::Init (void)
{
- mrView.HandleModelChange();
-
mpCurrentSlideManager.reset(new CurrentSlideManager(mrSlideSorter));
mpPageSelector.reset(new PageSelector(mrSlideSorter));
mpFocusManager.reset(new FocusManager(mrSlideSorter));
@@ -182,7 +175,7 @@ void SlideSorterController::Init (void)
mpListener = new Listener(mrSlideSorter);
- mpPageSelector->UpdateAllPages();
+ mpPageSelector->GetCoreSelection();
GetSelectionManager()->SelectionHasChanged();
}
@@ -211,17 +204,48 @@ SlideSorterController::~SlideSorterController (void)
+void SlideSorterController::Dispose (void)
+{
+ mpInsertionIndicatorHandler->End(Animator::AM_Immediate);
+ mpSelectionManager.reset();
+ mpAnimator->Dispose();
+}
+
+
+
+
model::SharedPageDescriptor SlideSorterController::GetPageAt (
- const Point& aPixelPosition)
+ const Point& aWindowPosition)
{
- sal_Int32 nHitPageIndex (mrView.GetPageIndexAtPoint(aPixelPosition));
+ sal_Int32 nHitPageIndex (mrView.GetPageIndexAtPoint(aWindowPosition));
model::SharedPageDescriptor pDescriptorAtPoint;
if (nHitPageIndex >= 0)
+ {
pDescriptorAtPoint = mrModel.GetPageDescriptor(nHitPageIndex);
+ // Depending on a property we may have to check that the mouse is no
+ // just over the page object but over the preview area.
+ if (pDescriptorAtPoint
+ && mrSlideSorter.GetProperties()->IsOnlyPreviewTriggersMouseOver()
+ && ! pDescriptorAtPoint->HasState(PageDescriptor::ST_Selected))
+ {
+ // Make sure that the mouse is over the preview area.
+ if ( ! mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ pDescriptorAtPoint,
+ view::PageObjectLayouter::Preview,
+ view::PageObjectLayouter::WindowCoordinateSystem).IsInside(aWindowPosition))
+ {
+ pDescriptorAtPoint.reset();
+ }
+ }
+ }
+
return pDescriptorAtPoint;
}
+
+
+
PageSelector& SlideSorterController::GetPageSelector (void)
{
OSL_ASSERT(mpPageSelector.get()!=NULL);
@@ -285,10 +309,11 @@ ScrollBarManager& SlideSorterController::GetScrollBarManager (void)
-void SlideSorterController::PrePaint()
+::boost::shared_ptr<InsertionIndicatorHandler>
+ SlideSorterController::GetInsertionIndicatorHandler (void) const
{
- // forward VCLs PrePaint window event to DrawingLayer
- mrView.PrePaint();
+ OSL_ASSERT(mpInsertionIndicatorHandler.get()!=NULL);
+ return mpInsertionIndicatorHandler;
}
@@ -298,14 +323,12 @@ void SlideSorterController::Paint (
const Rectangle& rBBox,
::Window* pWindow)
{
+ if (mnPaintEntranceCount == 0)
+ {
++mnPaintEntranceCount;
try
{
- if (GetSelectionManager()->IsMakeSelectionVisiblePending())
- GetSelectionManager()->MakeSelectionVisible();
-
- mrView.SetApplicationDocumentColor(GetProperties()->GetBackgroundColor());
mrView.CompleteRedraw(pWindow, Region(rBBox), 0);
}
catch (const Exception&)
@@ -314,6 +337,7 @@ void SlideSorterController::Paint (
}
--mnPaintEntranceCount;
+ }
}
@@ -356,7 +380,7 @@ bool SlideSorterController::Command (
case COMMAND_CONTEXTMENU:
{
SdPage* pPage = NULL;
- USHORT nPopupId;
+ sal_uInt16 nPopupId;
model::PageEnumeration aSelectedPages (
PageEnumerationProvider::CreateSelectedPagesEnumeration(mrModel));
@@ -392,50 +416,64 @@ bool SlideSorterController::Command (
else
nPopupId = RID_SLIDE_SORTER_MASTER_NOSEL_POPUP;
}
-
+ ::boost::scoped_ptr<InsertionIndicatorHandler::ForceShowContext> pContext;
if (pPage == NULL)
{
// When there is no selection, then we show the insertion
// indicator so that the user knows where a page insertion
// would take place.
- mrView.GetOverlay().GetInsertionIndicatorOverlay().SetPosition(
- pWindow->PixelToLogic(rEvent.GetMousePosPixel()));
- mrView.GetOverlay().GetInsertionIndicatorOverlay().setVisible(true);
+ mpInsertionIndicatorHandler->Start(false);
+ mpInsertionIndicatorHandler->UpdateIndicatorIcon(
+ dynamic_cast<Transferable*>(SD_MOD()->pTransferClip));
+ mpInsertionIndicatorHandler->UpdatePosition(
+ pWindow->PixelToLogic(rEvent.GetMousePosPixel()),
+ InsertionIndicatorHandler::MoveMode);
+ pContext.reset(new InsertionIndicatorHandler::ForceShowContext(
+ mpInsertionIndicatorHandler));
}
pWindow->ReleaseMouse();
+
+ Point aMenuLocation (0,0);
if (rEvent.IsMouseEvent())
{
- mbIsContextMenuOpen = true;
- if (pViewShell != NULL)
- {
- SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
- if (pDispatcher != NULL)
- pDispatcher->ExecutePopup(SdResId(nPopupId));
- }
+ // We have to explicitly specify the location of the menu
+ // when the slide sorter is placed in an undocked child
+ // menu. But when it is docked it does not hurt, so we
+ // specify the location always.
+ aMenuLocation = rEvent.GetMousePosPixel();
}
else
{
// The event is not a mouse event. Use the center of the
// focused page as top left position of the context menu.
- if (pPage != NULL)
+ model::SharedPageDescriptor pDescriptor (
+ GetFocusManager().GetFocusedPageDescriptor());
+ if (pDescriptor.get() != NULL)
{
- model::SharedPageDescriptor pDescriptor (
- GetFocusManager().GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
- {
- Rectangle aBBox (mrView.GetPageBoundingBox (
+ Rectangle aBBox (
+ mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox (
pDescriptor,
- view::SlideSorterView::CS_SCREEN,
- view::SlideSorterView::BBT_SHAPE));
- Point aPosition (aBBox.Center());
- mbIsContextMenuOpen = true;
- if (pViewShell != NULL)
- pViewShell->GetViewFrame()->GetDispatcher()->ExecutePopup(
- SdResId(nPopupId),
- pWindow,
- &aPosition);
- }
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem));
+ aMenuLocation = aBBox.Center();
+ }
+ }
+
+ mbIsContextMenuOpen = true;
+ if (pViewShell != NULL)
+ {
+ SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
+ if (pDispatcher != NULL)
+ {
+ pDispatcher->ExecutePopup(
+ SdResId(nPopupId),
+ pWindow,
+ &aMenuLocation);
+ mrSlideSorter.GetView().UpdatePageUnderMouse(false);
+ ::rtl::Reference<SelectionFunction> pFunction(GetCurrentSelectionFunction());
+ if (pFunction.is())
+ pFunction->ResetMouseAnchor();
}
}
mbIsContextMenuOpen = false;
@@ -445,19 +483,44 @@ bool SlideSorterController::Command (
// it is hidden, so that a pending slide insertion slot call
// finds the right place to insert a new slide.
GetSelectionManager()->SetInsertionPosition(
- mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex());
- mrView.GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
+ GetInsertionIndicatorHandler()->GetInsertionPageIndex());
}
+ pContext.reset();
bEventHasBeenHandled = true;
}
break;
case COMMAND_WHEEL:
{
- // We ignore zooming with control+mouse wheel.
const CommandWheelData* pData = rEvent.GetWheelData();
- if (pData!=NULL && pData->IsMod1())
- bEventHasBeenHandled = true;
+ if (pData == NULL)
+ return false;
+ if (pData->IsMod1())
+ {
+ // We do not support zooming with control+mouse wheel.
+ return false;
+ }
+ // Determine whether to scroll horizontally or vertically. This
+ // depends on the orientation of the scroll bar and the
+ // IsHoriz() flag of the event.
+ if ((mrSlideSorter.GetView().GetOrientation()==view::Layouter::HORIZONTAL)
+ == pData->IsHorz())
+ {
+ GetScrollBarManager().Scroll(
+ ScrollBarManager::Orientation_Vertical,
+ ScrollBarManager::Unit_Slide,
+ -pData->GetNotchDelta());
+ }
+ else
+ {
+ GetScrollBarManager().Scroll(
+ ScrollBarManager::Orientation_Horizontal,
+ ScrollBarManager::Unit_Slide,
+ -pData->GetNotchDelta());
+ }
+ mrSlideSorter.GetView().UpdatePageUnderMouse(rEvent.GetMousePosPixel(), false);
+
+ bEventHasBeenHandled = true;
}
break;
}
@@ -480,7 +543,9 @@ void SlideSorterController::UnlockModelChange (void)
{
mnModelChangeLockCount -= 1;
if (mnModelChangeLockCount==0 && mbPostModelChangePending)
+ {
PostModelChange();
+ }
}
@@ -497,11 +562,9 @@ void SlideSorterController::PreModelChange (void)
mrSlideSorter.GetViewShell()->Broadcast(
ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START));
- mpPageSelector->PrepareModelChange();
GetCurrentSlideManager()->PrepareModelChange();
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow != NULL)
+ if (mrSlideSorter.GetContentWindow())
mrView.PreModelChange();
mbPostModelChangePending = true;
@@ -515,8 +578,8 @@ void SlideSorterController::PostModelChange (void)
mbPostModelChangePending = false;
mrModel.Resync();
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
GetCurrentSlideManager()->HandleModelChange();
@@ -528,11 +591,9 @@ void SlideSorterController::PostModelChange (void)
// The visibility of the scroll bars may have to be changed. Then
// the size of the view has to change, too. Let Rearrange() handle
// that.
- Rearrange();
+ Rearrange(mbIsForcedRearrangePending);
}
- mpPageSelector->HandleModelChange ();
-
if (mrSlideSorter.GetViewShell() != NULL)
mrSlideSorter.GetViewShell()->Broadcast(
ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END));
@@ -562,23 +623,36 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
if (pEvent != NULL)
{
::Window* pWindow = pEvent->GetWindow();
- ::sd::Window* pActiveWindow = mrSlideSorter.GetActiveWindow();
+ SharedSdWindow pActiveWindow (mrSlideSorter.GetContentWindow());
switch (pEvent->GetId())
{
case VCLEVENT_WINDOW_ACTIVATE:
case VCLEVENT_WINDOW_SHOW:
- if (pActiveWindow != NULL && pWindow == pActiveWindow->GetParent())
+ if (pActiveWindow && pWindow == pActiveWindow->GetParent())
mrView.RequestRepaint();
break;
+ case VCLEVENT_WINDOW_HIDE:
+ if (pActiveWindow && pWindow == pActiveWindow->GetParent())
+ mrView.SetPageUnderMouse(SharedPageDescriptor());
+ break;
+
case VCLEVENT_WINDOW_GETFOCUS:
- if (pActiveWindow != NULL && pWindow == pActiveWindow)
- GetFocusManager().ShowFocus(false);
+ if (pActiveWindow)
+ if (pWindow == pActiveWindow.get())
+ GetFocusManager().ShowFocus(false);
break;
case VCLEVENT_WINDOW_LOSEFOCUS:
- if (pActiveWindow != NULL && pWindow == pActiveWindow)
+ if (pActiveWindow && pWindow == pActiveWindow.get())
+ {
GetFocusManager().HideFocus();
+ mrView.GetToolTip().Hide();
+
+ // Select the current slide so that it is properly
+ // visualized when the focus is moved to the edit view.
+ GetPageSelector().SelectPage(GetCurrentSlideManager()->GetCurrentSlide());
+ }
break;
case VCLEVENT_APPLICATION_DATACHANGED:
@@ -587,7 +661,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
cache::PageCacheManager::Instance()->InvalidateAllCaches();
// Update the draw mode.
- ULONG nDrawMode (Application::GetSettings().GetStyleSettings().GetHighContrastMode()
+ sal_uLong nDrawMode (Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR);
if (mrSlideSorter.GetViewShell() != NULL)
@@ -599,6 +673,11 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
// When the system font has changed a layout has to be done.
mrView.Resize();
FontProvider::Instance().Invalidate();
+
+ // Update theme colors.
+ mrSlideSorter.GetProperties()->HandleDataChangeEvent();
+ mrSlideSorter.GetTheme()->Update(mrSlideSorter.GetProperties());
+ mrView.HandleDataChangeEvent();
}
break;
@@ -607,7 +686,7 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
}
}
- return TRUE;
+ return sal_True;
}
@@ -637,11 +716,10 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet)
||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_AVAILABLE
||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_AVAILABLE)
{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow != NULL)
+ if (mrSlideSorter.GetContentWindow())
{
- ULONG nMode = pWindow->GetDrawMode();
- UINT16 nQuality = 0;
+ sal_uLong nMode = mrSlideSorter.GetContentWindow()->GetDrawMode();
+ sal_uInt16 nQuality = 0;
switch (nMode)
{
@@ -660,19 +738,19 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet)
}
rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_COLOR,
- (BOOL)(nQuality==0)));
+ (sal_Bool)(nQuality==0)));
rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_GRAYSCALE,
- (BOOL)(nQuality==1)));
+ (sal_Bool)(nQuality==1)));
rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_BLACKWHITE,
- (BOOL)(nQuality==2)));
+ (sal_Bool)(nQuality==2)));
rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_CONTRAST,
- (BOOL)(nQuality==3)));
+ (sal_Bool)(nQuality==3)));
}
}
if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_AVAILABLE)
{
- rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, TRUE));
+ rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, sal_True));
}
}
@@ -713,7 +791,7 @@ void SlideSorterController::ExecStatusBar (SfxRequest& )
void SlideSorterController::UpdateAllPages (void)
{
// Do a redraw.
- mrView.InvalidateAllWin();
+ mrSlideSorter.GetContentWindow()->Invalidate();
}
@@ -739,20 +817,35 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
{
Rectangle aNewContentArea (maTotalWindowArea);
- ::boost::shared_ptr<sd::Window> pWindow = mrSlideSorter.GetContentWindow();
- if (pWindow.get() != NULL)
+ if (aNewContentArea.IsEmpty())
+ return aNewContentArea;
+
+ if (mnModelChangeLockCount>0)
{
+ mbIsForcedRearrangePending |= bForce;
+ return aNewContentArea;
+ }
+ else
+ mbIsForcedRearrangePending = false;
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ if (bForce)
+ mrView.UpdateOrientation();
+
// Place the scroll bars.
- aNewContentArea = GetScrollBarManager().PlaceScrollBars(maTotalWindowArea);
+ aNewContentArea = GetScrollBarManager().PlaceScrollBars(
+ maTotalWindowArea,
+ mrView.GetOrientation() != view::Layouter::VERTICAL,
+ mrView.GetOrientation() != view::Layouter::HORIZONTAL);
bool bSizeHasChanged (false);
// Only when bForce is not true we have to test for a size change in
// order to determine whether the window and the view have to be resized.
if ( ! bForce)
{
- Rectangle aCurrentContentArea (
- pWindow->GetPosPixel(),
- pWindow->GetOutputSizePixel());
+ Rectangle aCurrentContentArea (pWindow->GetPosPixel(), pWindow->GetOutputSizePixel());
bSizeHasChanged = (aNewContentArea != aCurrentContentArea);
}
if (bForce || bSizeHasChanged)
@@ -765,6 +858,11 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
// Adapt the scroll bars to the new zoom factor of the browser
// window and the arrangement of the page objects.
GetScrollBarManager().UpdateScrollBars(false, !bForce);
+
+ // Keep the current slide in the visible area.
+ GetVisibleAreaManager().RequestCurrentSlideVisible();
+
+ mrView.RequestRepaint();
}
return aNewContentArea;
@@ -782,6 +880,15 @@ FunctionReference SlideSorterController::CreateSelectionFunction (SfxRequest& rR
+::rtl::Reference<SelectionFunction> SlideSorterController::GetCurrentSelectionFunction (void)
+{
+ FunctionReference pFunction (mrSlideSorter.GetViewShell()->GetCurrentFunction());
+ return ::rtl::Reference<SelectionFunction>(dynamic_cast<SelectionFunction*>(pFunction.get()));
+}
+
+
+
+
void SlideSorterController::PrepareEditModeChange (void)
{
// Before we throw away the page descriptors we prepare for selecting
@@ -883,12 +990,12 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const String& rs
// Get a pointer to the corresponding accessible object and notify
// that of the name change.
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return;
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return;
::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
- xAccessible (pWindow->GetAccessible(FALSE));
+ xAccessible (pWindow->GetAccessible(sal_False));
if ( ! xAccessible.is())
return;
@@ -931,14 +1038,6 @@ bool SlideSorterController::IsContextMenuOpen (void) const
-::boost::shared_ptr<Properties> SlideSorterController::GetProperties (void) const
-{
- return mpProperties;
-}
-
-
-
-
void SlideSorterController::SetDocumentSlides (const Reference<container::XIndexAccess>& rxSlides)
{
if (mrModel.GetDocumentSlides() != rxSlides)
@@ -948,6 +1047,11 @@ void SlideSorterController::SetDocumentSlides (const Reference<container::XIndex
mrModel.SetDocumentSlides(rxSlides);
mrView.Layout();
+
+ // Select just the current slide.
+ PageSelector::BroadcastLock aBroadcastLock (*mpPageSelector);
+ mpPageSelector->DeselectAllPages();
+ mpPageSelector->SelectPage(mpCurrentSlideManager->GetCurrentSlide());
}
}
@@ -962,6 +1066,35 @@ void SlideSorterController::SetDocumentSlides (const Reference<container::XIndex
+VisibleAreaManager& SlideSorterController::GetVisibleAreaManager (void) const
+{
+ OSL_ASSERT(mpVisibleAreaManager);
+ return *mpVisibleAreaManager;
+}
+
+
+
+
+void SlideSorterController::CheckForMasterPageAssignment (void)
+{
+ if (mrModel.GetPageCount()%2==0)
+ return;
+ PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+ while (aAllPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ if (pDescriptor->UpdateMasterPage())
+ {
+ mrView.GetPreviewCache()->InvalidatePreviewBitmap (
+ pDescriptor->GetPage(),
+ true);
+ }
+ }
+}
+
+
+
+
//===== SlideSorterController::ModelChangeLock ================================
SlideSorterController::ModelChangeLock::ModelChangeLock (
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
new file mode 100644
index 000000000000..71b6c024ae7a
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx
@@ -0,0 +1,294 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlideSorterView.hxx"
+
+
+#include <osl/diagnose.hxx>
+#include <rtl/math.hxx>
+
+namespace sd { namespace slidesorter { namespace controller {
+
+
+double AnimationFunction::Linear (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+ return nTime;
+}
+
+
+
+
+double AnimationFunction::FastInSlowOut_Sine (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+
+ const double nResult (sin(nTime * M_PI/2));
+
+ OSL_ASSERT(nResult>=0.0 && nResult<=1.0);
+ return nResult;
+}
+
+
+
+
+double AnimationFunction::FastInSlowOut_Root (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+
+ const double nResult (sqrt(nTime));
+
+ OSL_ASSERT(nResult>=0.0 && nResult<=1.0);
+ return nResult;
+}
+
+
+
+
+double AnimationFunction::SlowInSlowOut_0to0_Sine (const double nTime)
+{
+ OSL_ASSERT(nTime>=0.0 && nTime<=1.0);
+
+ const double nResult (sin(nTime * M_PI));
+
+ OSL_ASSERT(nResult>=0.0 && nResult<=1.0);
+ return nResult;
+}
+
+
+
+
+double AnimationFunction::Vibrate_Sine (const double nTime)
+{
+ return sin(nTime*M_PI*8);
+}
+
+
+
+
+Point AnimationFunction::ScalePoint (const Point& rPoint, const double nTime)
+{
+ return Point(
+ sal_Int32(::rtl::math::round(rPoint.X() * nTime)),
+ sal_Int32(::rtl::math::round(rPoint.Y() * nTime)));
+}
+
+
+
+
+double AnimationFunction::Blend (
+ const double nStartValue,
+ const double nEndValue,
+ const double nTime)
+{
+ return nStartValue*(1-nTime) + nEndValue*nTime;
+}
+
+
+
+
+void AnimationFunction::ApplyVisualStateChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nTime)
+{
+ if (rpDescriptor)
+ {
+ rpDescriptor->GetVisualState().SetVisualStateBlend(nTime);
+ rView.RequestRepaint(rpDescriptor);
+ }
+}
+
+
+
+
+void AnimationFunction::ApplyLocationOffsetChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const Point aLocationOffset)
+{
+ if (rpDescriptor)
+ {
+ const Rectangle aOldBoundingBox(rpDescriptor->GetBoundingBox());
+ rpDescriptor->GetVisualState().SetLocationOffset(aLocationOffset);
+ rView.RequestRepaint(aOldBoundingBox);
+ rView.RequestRepaint(rpDescriptor);
+ }
+}
+
+
+
+
+void AnimationFunction::ApplyButtonAlphaChange(
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nButtonAlpha,
+ const double nButtonBarAlpha)
+{
+ if (rpDescriptor)
+ {
+ rpDescriptor->GetVisualState().SetButtonAlpha(nButtonAlpha);
+ rpDescriptor->GetVisualState().SetButtonBarAlpha(nButtonBarAlpha);
+ rView.RequestRepaint(rpDescriptor);
+ }
+}
+
+
+
+
+//===== AnimationBezierFunction ===============================================
+
+AnimationBezierFunction::AnimationBezierFunction (
+ const double nX1,
+ const double nY1,
+ const double nX2,
+ const double nY2)
+ : mnX1(nX1),
+ mnY1(nY1),
+ mnX2(nX2),
+ mnY2(nY2)
+{
+}
+
+
+
+
+AnimationBezierFunction::AnimationBezierFunction (
+ const double nX1,
+ const double nY1)
+ : mnX1(nX1),
+ mnY1(nY1),
+ mnX2(1-nY1),
+ mnY2(1-nX1)
+{
+}
+
+
+
+
+::basegfx::B2DPoint AnimationBezierFunction::operator() (const double nT)
+{
+ return ::basegfx::B2DPoint(
+ EvaluateComponent(nT, mnX1, mnX2),
+ EvaluateComponent(nT, mnY1, mnY2));
+}
+
+
+
+
+double AnimationBezierFunction::EvaluateComponent (
+ const double nT,
+ const double nV1,
+ const double nV2)
+{
+ const double nS (1-nT);
+
+ // While the control point values 1 and 2 are explicitly given the start
+ // and end values are implicitly given.
+ const double nV0 (0);
+ const double nV3 (1);
+
+ const double nV01 (nS*nV0 + nT*nV1);
+ const double nV12 (nS*nV1 + nT*nV2);
+ const double nV23 (nS*nV2 + nT*nV3);
+
+ const double nV012 (nS*nV01 + nT*nV12);
+ const double nV123 (nS*nV12 + nT*nV23);
+
+ const double nV0123 (nS*nV012 + nT*nV123);
+
+ return nV0123;
+}
+
+
+
+
+//===== AnimationParametricFunction ===========================================
+
+AnimationParametricFunction::AnimationParametricFunction (const ParametricFunction& rFunction)
+ : maY()
+{
+ const sal_Int32 nSampleCount (64);
+
+ // Sample the given parametric function.
+ ::std::vector<basegfx::B2DPoint> aPoints;
+ aPoints.reserve(nSampleCount);
+ for (sal_Int32 nIndex=0; nIndex<nSampleCount; ++nIndex)
+ {
+ const double nT (nIndex/double(nSampleCount-1));
+ aPoints.push_back(basegfx::B2DPoint(rFunction(nT)));
+ }
+
+ // Interpolate at evenly spaced points.
+ maY.clear();
+ maY.reserve(nSampleCount);
+ double nX0 (aPoints[0].getX());
+ double nY0 (aPoints[0].getY());
+ double nX1 (aPoints[1].getX());
+ double nY1 (aPoints[1].getY());
+ sal_Int32 nIndex (1);
+ for (sal_Int32 nIndex2=0; nIndex2<nSampleCount; ++nIndex2)
+ {
+ const double nX (nIndex2 / double(nSampleCount-1));
+ while (nX > nX1 && nIndex<nSampleCount)
+ {
+ nX0 = nX1;
+ nY0 = nY1;
+ nX1 = aPoints[nIndex].getX();
+ nY1 = aPoints[nIndex].getY();
+ ++nIndex;
+ }
+ const double nU ((nX-nX1) / (nX0 - nX1));
+ const double nY (nY0*nU + nY1*(1-nU));
+ maY.push_back(nY);
+ }
+}
+
+
+
+
+double AnimationParametricFunction::operator() (const double nX)
+{
+ const sal_Int32 nIndex0 (nX * maY.size());
+ const double nX0 (nIndex0 / double(maY.size()-1));
+ const sal_uInt32 nIndex1 (nIndex0 + 1);
+ const double nX1 (nIndex1 / double(maY.size()-1));
+
+ if (nIndex0<=0)
+ return maY[0];
+ else if (sal_uInt32(nIndex0)>=maY.size() || nIndex1>=maY.size())
+ return maY[maY.size()-1];
+
+ const double nU ((nX-nX1) / (nX0 - nX1));
+ return maY[nIndex0]*nU + maY[nIndex1]*(1-nU);
+}
+
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
index 92853fddb7e6..6a634b15c9db 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx
@@ -30,6 +30,7 @@
#include "controller/SlsAnimator.hxx"
#include "view/SlideSorterView.hxx"
#include "View.hxx"
+#include <boost/bind.hpp>
namespace sd { namespace slidesorter { namespace controller {
@@ -43,27 +44,32 @@ class Animator::Animation
{
public:
Animation (
- const Animator::AnimationFunction& rAnimation,
- const double nDelta);
+ const Animator::AnimationFunctor& rAnimation,
+ const double nStartOffset,
+ const double nDuration,
+ const double nGlobalTime,
+ const Animator::AnimationId nAnimationId,
+ const Animator::FinishFunctor& rFinishFunctor);
~Animation (void);
- bool Run (void);
+ /** Run next animation step. If animation has reached its end it is
+ expired.
+ */
+ bool Run (const double nGlobalTime);
+
+ /** Typically called when an animation has finished, but also from
+ Animator::Disposed(). The finish functor is called and the
+ animation is marked as expired to prevent another run.
+ */
+ void Expire (void);
bool IsExpired (void);
- Animator::AnimationFunction maAnimation;
- double mnValue;
- double mnDelta;
-};
-
-
-
-
-class Animator::DrawLock
-{
-public:
- DrawLock (View& rView);
- ~DrawLock (void);
-private:
- View& mrView;
+ Animator::AnimationFunctor maAnimation;
+ Animator::FinishFunctor maFinishFunctor;
+ const Animator::AnimationId mnAnimationId;
+ const double mnDuration;
+ const double mnEnd;
+ const double mnGlobalTimeAtStart;
+ bool mbIsExpired;
};
@@ -72,8 +78,11 @@ private:
Animator::Animator (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
maTimer(),
+ mbIsDisposed(false),
maAnimations(),
- mpDrawLock()
+ maElapsedTime(),
+ mpDrawLock(),
+ mnNextAnimationId(0)
{
maTimer.SetTimeout(gnResolution);
maTimer.SetTimeoutHdl(LINK(this,Animator,TimeoutHandler));
@@ -84,39 +93,161 @@ Animator::Animator (SlideSorter& rSlideSorter)
Animator::~Animator (void)
{
+ if ( ! mbIsDisposed)
+ {
+ OSL_ASSERT(mbIsDisposed);
+ Dispose();
+ }
+}
+
+
+
+
+void Animator::Dispose (void)
+{
+ mbIsDisposed = true;
+
+ AnimationList aCopy (maAnimations);
+ AnimationList::const_iterator iAnimation;
+ for (iAnimation=aCopy.begin(); iAnimation!=aCopy.end(); ++iAnimation)
+ (*iAnimation)->Expire();
+
maTimer.Stop();
- mpDrawLock.reset();
+ if (mpDrawLock)
+ {
+ mpDrawLock->Dispose();
+ mpDrawLock.reset();
+ }
}
-void Animator::AddAnimation (
- const AnimationFunction& rAnimation,
- const sal_Int32 nDuration)
+Animator::AnimationId Animator::AddAnimation (
+ const AnimationFunctor& rAnimation,
+ const sal_Int32 nStartOffset,
+ const sal_Int32 nDuration,
+ const FinishFunctor& rFinishFunctor)
{
- const double nDelta = double(gnResolution) / double(nDuration);
- maAnimations.push_back(boost::shared_ptr<Animation>(new Animation(rAnimation, nDelta)));
+ // When the animator is already disposed then ignore this call
+ // silently (well, we show an assertion, but do not throw an exception.)
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return -1;
+
+ boost::shared_ptr<Animation> pAnimation (
+ new Animation(
+ rAnimation,
+ nStartOffset / 1000.0,
+ nDuration / 1000.0,
+ maElapsedTime.getElapsedTime(),
+ ++mnNextAnimationId,
+ rFinishFunctor));
+ maAnimations.push_back(pAnimation);
+
+ RequestNextFrame();
+
+ return pAnimation->mnAnimationId;
+}
+
- // Prevent redraws except for the ones in TimeoutHandler.
- // While the Animator is active it will schedule repaints regularly.
- // Repaints in between would only lead to visual artifacts.
- mpDrawLock.reset(new DrawLock(mrSlideSorter.GetView()));
- maTimer.Start();
+
+
+Animator::AnimationId Animator::AddInfiniteAnimation (
+ const AnimationFunctor& rAnimation,
+ const double nDelta)
+{
+ (void)nDelta;
+
+ // When the animator is already disposed then ignore this call
+ // silently (well, we show an assertion, but do not throw an exception.)
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return -1;
+
+ boost::shared_ptr<Animation> pAnimation (
+ new Animation(
+ rAnimation,
+ 0,
+ -1,
+ maElapsedTime.getElapsedTime(),
+ mnNextAnimationId++,
+ FinishFunctor()));
+ maAnimations.push_back(pAnimation);
+
+ RequestNextFrame();
+
+ return pAnimation->mnAnimationId;
}
-bool Animator::ServeAnimations (void)
+void Animator::RemoveAnimation (const Animator::AnimationId nId)
+{
+ OSL_ASSERT( ! mbIsDisposed);
+
+ const AnimationList::iterator iAnimation (::std::find_if(
+ maAnimations.begin(),
+ maAnimations.end(),
+ ::boost::bind(
+ ::std::equal_to<Animator::AnimationId>(),
+ nId,
+ ::boost::bind(&Animation::mnAnimationId, _1))));
+ if (iAnimation != maAnimations.end())
+ {
+ OSL_ASSERT((*iAnimation)->mnAnimationId == nId);
+ (*iAnimation)->Expire();
+ maAnimations.erase(iAnimation);
+ }
+
+ if (maAnimations.empty())
+ {
+ // Reset the animation id when we can.
+ mnNextAnimationId = 0;
+
+ // No more animations => we do not have to suppress painting
+ // anymore.
+ mpDrawLock.reset();
+ }
+}
+
+
+
+
+void Animator::RemoveAllAnimations (void)
+{
+ ::std::for_each(
+ maAnimations.begin(),
+ maAnimations.end(),
+ ::boost::bind(
+ &Animation::Expire,
+ _1));
+ maAnimations.clear();
+ mnNextAnimationId = 0;
+
+ // No more animations => we do not have to suppress painting
+ // anymore.
+ mpDrawLock.reset();
+}
+
+
+
+
+bool Animator::ProcessAnimations (const double nTime)
{
bool bExpired (false);
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return bExpired;
+
+
AnimationList aCopy (maAnimations);
AnimationList::const_iterator iAnimation;
for (iAnimation=aCopy.begin(); iAnimation!=aCopy.end(); ++iAnimation)
{
- bExpired |= (*iAnimation)->Run();
+ bExpired |= (*iAnimation)->Run(nTime);
}
return bExpired;
@@ -127,6 +258,10 @@ bool Animator::ServeAnimations (void)
void Animator::CleanUpAnimationList (void)
{
+ OSL_ASSERT( ! mbIsDisposed);
+ if (mbIsDisposed)
+ return;
+
AnimationList aActiveAnimations;
AnimationList::const_iterator iAnimation;
@@ -142,19 +277,35 @@ void Animator::CleanUpAnimationList (void)
+void Animator::RequestNextFrame (const double nFrameStart)
+{
+ (void)nFrameStart;
+ if ( ! maTimer.IsActive())
+ {
+ // Prevent redraws except for the ones in TimeoutHandler. While the
+ // Animator is active it will schedule repaints regularly. Repaints
+ // in between would only lead to visual artifacts.
+ mpDrawLock.reset(new view::SlideSorterView::DrawLock(mrSlideSorter));
+ maTimer.Start();
+ }
+}
+
+
+
+
IMPL_LINK(Animator, TimeoutHandler, Timer*, EMPTYARG)
{
- if (ServeAnimations())
+ if (mbIsDisposed)
+ return 0;
+
+ if (ProcessAnimations(maElapsedTime.getElapsedTime()))
CleanUpAnimationList();
// Unlock the draw lock. This should lead to a repaint.
mpDrawLock.reset();
if (maAnimations.size() > 0)
- {
- mpDrawLock.reset(new DrawLock(mrSlideSorter.GetView()));
- maTimer.Start();
- }
+ RequestNextFrame();
return 0;
}
@@ -165,16 +316,21 @@ IMPL_LINK(Animator, TimeoutHandler, Timer*, EMPTYARG)
//===== Animator::Animation ===================================================
Animator::Animation::Animation (
- const Animator::AnimationFunction& rAnimation,
- const double nDelta)
+ const Animator::AnimationFunctor& rAnimation,
+ const double nStartOffset,
+ const double nDuration,
+ const double nGlobalTime,
+ const Animator::AnimationId nId,
+ const Animator::FinishFunctor& rFinishFunctor)
: maAnimation(rAnimation),
- mnValue(0),
- mnDelta(nDelta)
+ maFinishFunctor(rFinishFunctor),
+ mnAnimationId(nId),
+ mnDuration(nDuration),
+ mnEnd(nGlobalTime + nDuration + nStartOffset),
+ mnGlobalTimeAtStart(nGlobalTime + nStartOffset),
+ mbIsExpired(false)
{
-
- maAnimation(mnValue);
- mnValue = mnDelta;
-
+ Run(nGlobalTime);
}
@@ -187,49 +343,56 @@ Animator::Animation::~Animation (void)
-bool Animator::Animation::Run (void)
+bool Animator::Animation::Run (const double nGlobalTime)
{
- if (mnValue < 1.0)
+ if ( ! mbIsExpired)
{
- maAnimation(mnValue);
- mnValue += mnDelta;
- return false;
- }
- else
- {
- maAnimation(1.0);
- return true;
+ if (mnDuration > 0)
+ {
+ if (nGlobalTime >= mnEnd)
+ {
+ maAnimation(1.0);
+ Expire();
+ }
+ else if (nGlobalTime >= mnGlobalTimeAtStart)
+ {
+ maAnimation((nGlobalTime - mnGlobalTimeAtStart) / mnDuration);
+ }
+ }
+ else if (mnDuration < 0)
+ {
+ // Animations without end have to be expired by their owner.
+ maAnimation(nGlobalTime);
+ }
}
+
+ return mbIsExpired;
}
-bool Animator::Animation::IsExpired (void)
+void Animator::Animation::Expire (void)
{
- return mnValue >= 1.0;
+ if ( ! mbIsExpired)
+ {
+ mbIsExpired = true;
+ if (maFinishFunctor)
+ maFinishFunctor();
+ }
}
-//===== Animator::DrawLock ====================================================
-
-Animator::DrawLock::DrawLock (View& rView)
- : mrView(rView)
+bool Animator::Animation::IsExpired (void)
{
- mrView.LockRedraw(TRUE);
+ return mbIsExpired;
}
-Animator::DrawLock::~DrawLock (void)
-{
- mrView.LockRedraw(FALSE);
-}
-
-
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 4f1a0e35fe0c..700b3e0a605a 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -36,16 +36,18 @@
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsViewOverlay.hxx"
-#include "view/SlsPageObject.hxx"
+#include "view/SlsTheme.hxx"
#include "controller/SlideSorterController.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsSelectionFunction.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsScrollBarManager.hxx"
#include "controller/SlsFocusManager.hxx"
#include "controller/SlsSelectionManager.hxx"
-#include "SlsTransferable.hxx"
+#include "controller/SlsTransferable.hxx"
+#include "controller/SlsSelectionObserver.hxx"
+#include "cache/SlsPageCache.hxx"
#include "ViewShellBase.hxx"
#include "DrawViewShell.hxx"
@@ -75,6 +77,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/docfile.hxx>
#include <svx/svxids.hrc>
+#include <svx/svdstr.hrc>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
#include <rtl/ustring.hxx>
@@ -83,6 +86,43 @@
namespace sd { namespace slidesorter { namespace controller {
+class Clipboard::UndoContext
+{
+public:
+ UndoContext (
+ SdDrawDocument* pDocument,
+ const ::boost::shared_ptr<ViewShell>& rpMainViewShell,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : mpDocument(pDocument),
+ mpMainViewShell(rpMainViewShell)
+ {
+ if (mpDocument!=NULL && mpDocument->IsUndoEnabled())
+ {
+ if (mpMainViewShell && mpMainViewShell->GetShellType() == ViewShell::ST_DRAW)
+ mpDocument->BegUndo(rpTheme->GetString(view::Theme::String_DragAndDropPages));
+ else
+ mpDocument->BegUndo(rpTheme->GetString(view::Theme::String_DragAndDropSlides));
+ }
+ }
+
+ ~UndoContext (void)
+ {
+ if (mpDocument!=NULL && mpDocument->IsUndoEnabled())
+ mpDocument->EndUndo();
+ if (mpMainViewShell && mpMainViewShell->GetViewFrame()!=NULL)
+ {
+ SfxBindings& rBindings = mpMainViewShell->GetViewFrame()->GetBindings();
+ rBindings.Invalidate(SID_UNDO);
+ rBindings.Invalidate(SID_REDO);
+ }
+ }
+private:
+ SdDrawDocument* mpDocument;
+ ::boost::shared_ptr<ViewShell> mpMainViewShell;
+};
+
+
+
Clipboard::Clipboard (SlideSorter& rSlideSorter)
: ViewClipboard(rSlideSorter.GetView()),
@@ -90,7 +130,10 @@ Clipboard::Clipboard (SlideSorter& rSlideSorter)
mrController(mrSlideSorter.GetController()),
maPagesToRemove(),
maPagesToSelect(),
- mbUpdateSelectionPending(false)
+ mbUpdateSelectionPending(false),
+ mpUndoContext(),
+ mpSelectionObserverContext(),
+ mnDragFinishedUserEventId(0)
{
}
@@ -99,6 +142,8 @@ Clipboard::Clipboard (SlideSorter& rSlideSorter)
Clipboard::~Clipboard (void)
{
+ if (mnDragFinishedUserEventId != 0)
+ Application::RemoveUserEvent(mnDragFinishedUserEventId);
}
@@ -144,13 +189,12 @@ void Clipboard::HandleSlotCall (SfxRequest& rRequest)
// a crash.
if (mrSlideSorter.GetModel().GetEditMode() != EM_MASTERPAGE)
{
- mrSlideSorter.GetView().LockRedraw (TRUE);
+ view::SlideSorterView::DrawLock aLock (mrSlideSorter);
+ SelectionObserver::Context aContext (mrSlideSorter);
if(xFunc.is())
xFunc->DoPaste();
else
DoPaste();
- mrController.GetSelectionManager()->MakeSelectionVisible();
- mrSlideSorter.GetView().LockRedraw(FALSE);
}
rRequest.Done();
break;
@@ -190,7 +234,7 @@ void Clipboard::DoDelete (::Window* )
void Clipboard::DoCopy (::Window* pWindow )
{
- CreateSlideTransferable( pWindow, FALSE );
+ CreateSlideTransferable( pWindow, sal_False );
}
@@ -210,7 +254,7 @@ void Clipboard::DoPaste (::Window* pWindow)
sal_Int32 nInsertPageCount = PasteTransferable(nInsertPosition);
// Select the pasted pages and make the first of them the
// current page.
- mrSlideSorter.GetView().GetWindow()->GrabFocus();
+ mrSlideSorter.GetContentWindow()->GrabFocus();
SelectPageRange(nInsertPosition, nInsertPageCount);
}
}
@@ -231,14 +275,22 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
// selection.
// d) After the last page when there is no selection and no focus.
- view::InsertionIndicatorOverlay& rInsertionIndicatorOverlay (
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay());
- if (rInsertionIndicatorOverlay.isVisible())
+ ::boost::shared_ptr<controller::InsertionIndicatorHandler> pInsertionIndicatorHandler (
+ mrController.GetInsertionIndicatorHandler());
+ if (pInsertionIndicatorHandler->IsActive())
{
- nInsertPosition = rInsertionIndicatorOverlay.GetInsertionPageIndex();
+ // Use the insertion index of an active insertion indicator.
+ nInsertPosition = pInsertionIndicatorHandler->GetInsertionPageIndex();
+ }
+ else if (mrController.GetSelectionManager()->GetInsertionPosition() >= 0)
+ {
+ // Use the insertion index of an insertion indicator that has been
+ // deactivated a short while ago.
+ nInsertPosition = mrController.GetSelectionManager()->GetInsertionPosition();
}
else if (mrController.GetFocusManager().IsFocusShowing())
{
+ // Use the focus to determine the insertion position.
SdInsertPasteDlg aDialog (pWindow);
if (aDialog.Execute() == RET_OK)
{
@@ -247,10 +299,6 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
nInsertPosition ++;
}
}
- else
- {
- nInsertPosition = mrController.GetSelectionManager()->GetInsertionPosition();
- }
return nInsertPosition;
}
@@ -261,27 +309,27 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
{
SdTransferable* pClipTransferable = SD_MOD()->pTransferClip;
- bool bMergeMasterPages = !pClipTransferable->HasSourceDoc (
- mrSlideSorter.GetModel().GetDocument());
- USHORT nInsertIndex ((USHORT)(nInsertPosition * 2 + 1));
+ model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
+ bool bMergeMasterPages = !pClipTransferable->HasSourceDoc (rModel.GetDocument());
+ sal_uInt16 nInsertIndex (rModel.GetCoreIndex(nInsertPosition));
sal_Int32 nInsertPageCount (0);
if (pClipTransferable->HasPageBookmarks())
{
const List& rBookmarkList = pClipTransferable->GetPageBookmarks();
const SolarMutexGuard aGuard;
- nInsertPageCount = (USHORT) rBookmarkList.Count();
- mrSlideSorter.GetModel().GetDocument()->InsertBookmarkAsPage(
+ nInsertPageCount = (sal_uInt16) rBookmarkList.Count();
+ rModel.GetDocument()->InsertBookmarkAsPage(
const_cast<List*>(&rBookmarkList),
NULL,
- FALSE,
- FALSE,
+ sal_False,
+ sal_False,
nInsertIndex,
- FALSE,
+ sal_False,
pClipTransferable->GetPageDocShell(),
- TRUE,
+ sal_True,
bMergeMasterPages,
- FALSE);
+ sal_False);
}
else
{
@@ -294,19 +342,19 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
{
const SolarMutexGuard aGuard;
- bMergeMasterPages = (pDataDoc != mrSlideSorter.GetModel().GetDocument());
+ bMergeMasterPages = (pDataDoc != rModel.GetDocument());
nInsertPageCount = pDataDoc->GetSdPageCount( PK_STANDARD );
- mrSlideSorter.GetModel().GetDocument()->InsertBookmarkAsPage(
+ rModel.GetDocument()->InsertBookmarkAsPage(
NULL,
NULL,
- FALSE,
- FALSE,
+ sal_False,
+ sal_False,
nInsertIndex,
- FALSE,
+ sal_False,
pDataDocSh,
- TRUE,
+ sal_True,
bMergeMasterPages,
- FALSE);
+ sal_False);
}
}
mrController.HandleModelChange();
@@ -322,7 +370,7 @@ void Clipboard::SelectPageRange (sal_Int32 nFirstIndex, sal_Int32 nPageCount)
// after the nInsertIndex position.
PageSelector& rSelector (mrController.GetPageSelector());
rSelector.DeselectAllPages();
- for (USHORT i=0; i<nPageCount; i++)
+ for (sal_uInt16 i=0; i<nPageCount; i++)
{
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor(nFirstIndex + i));
@@ -333,7 +381,6 @@ void Clipboard::SelectPageRange (sal_Int32 nFirstIndex, sal_Int32 nPageCount)
if (i == 0)
{
mrController.GetCurrentSlideManager()->SwitchCurrentSlide(pDescriptor);
- mrController.GetFocusManager().SetFocusedPage(pDescriptor);
}
}
}
@@ -362,6 +409,27 @@ void Clipboard::CreateSlideTransferable (
maPagesToRemove.push_back (pDescriptor->GetPage());
}
+ // Create a small set of representatives of the selection for which
+ // previews are included into the transferable so that an insertion
+ // indicator can be rendered.
+ aSelectedPages.Rewind();
+ ::std::vector<Transferable::Representative> aRepresentatives;
+ aRepresentatives.reserve(3);
+ ::boost::shared_ptr<cache::PageCache> pPreviewCache (
+ mrSlideSorter.GetView().GetPreviewCache());
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ if ( ! pDescriptor || pDescriptor->GetPage()==NULL)
+ continue;
+ Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
+ aRepresentatives.push_back(Transferable::Representative(
+ aPreview,
+ pDescriptor->HasState(model::PageDescriptor::ST_Excluded)));
+ if (aRepresentatives.size() >= 3)
+ break;
+ }
+
if (aBookmarkList.Count() > 0)
{
mrSlideSorter.GetView().BrkAction();
@@ -369,8 +437,9 @@ void Clipboard::CreateSlideTransferable (
SdTransferable* pTransferable = new Transferable (
pDocument,
NULL,
- FALSE,
- dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell()));
+ sal_False,
+ dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell()),
+ aRepresentatives);
if (bDrag)
SD_MOD()->pTransferDrag = pTransferable;
@@ -424,13 +493,17 @@ void Clipboard::CreateSlideTransferable (
void Clipboard::StartDrag (
- const Point&,
+ const Point& rPosition,
::Window* pWindow)
{
maPagesToRemove.clear();
maPagesToSelect.clear();
mbUpdateSelectionPending = false;
- CreateSlideTransferable (pWindow, TRUE);
+ CreateSlideTransferable(pWindow, sal_True);
+
+ mrController.GetInsertionIndicatorHandler()->UpdatePosition(
+ rPosition,
+ InsertionIndicatorHandler::UnknownMode);
}
@@ -438,15 +511,36 @@ void Clipboard::StartDrag (
void Clipboard::DragFinished (sal_Int8 nDropAction)
{
- // Hide the substitution display and insertion indicator.
- mrSlideSorter.GetView().GetOverlay().GetSubstitutionOverlay().setVisible(false);
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
-
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
-
if (pDragTransferable != NULL)
pDragTransferable->SetView (NULL);
+ if (mnDragFinishedUserEventId == 0)
+ {
+ if ( ! Application::PostUserEvent(
+ mnDragFinishedUserEventId,
+ LINK(this, Clipboard, ProcessDragFinished),
+ reinterpret_cast<void*>(nDropAction)))
+ {
+ mnDragFinishedUserEventId = 0;
+ }
+ }
+}
+
+
+
+
+IMPL_LINK(Clipboard, ProcessDragFinished, void*, pUserData)
+{
+ const sal_Int8 nDropAction (static_cast<sal_Int8>(reinterpret_cast<sal_IntPtr>(pUserData)));
+
+ mnDragFinishedUserEventId = 0;
+
+ // Hide the substitution display and insertion indicator.
+ ::rtl::Reference<SelectionFunction> pFunction (mrController.GetCurrentSelectionFunction());
+ if (pFunction.is())
+ pFunction->NotifyDragFinished();
+
PageSelector& rSelector (mrController.GetPageSelector());
if ((nDropAction & DND_ACTION_MOVE) != 0
&& ! maPagesToRemove.empty())
@@ -459,12 +553,14 @@ void Clipboard::DragFinished (sal_Int8 nDropAction)
aDraggedPage!=maPagesToRemove.end();
++aDraggedPage)
{
- rSelector.SelectPage (*aDraggedPage);
+ rSelector.SelectPage(*aDraggedPage);
}
- mrController.GetSelectionManager()->DeleteSelectedPages ();
+ mrController.GetSelectionManager()->DeleteSelectedPages();
}
+ mpUndoContext.reset();
+ mpSelectionObserverContext.reset();
- SelectPages();
+ return 1;
}
@@ -490,17 +586,19 @@ sal_Int8 Clipboard::AcceptDrop (
const AcceptDropEvent& rEvent,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
- sal_Int8 nResult = DND_ACTION_NONE;
+ sal_Int8 nAction (DND_ACTION_NONE);
- switch (IsDropAccepted())
+ const Clipboard::DropType eDropType (IsDropAccepted());
+
+ switch (eDropType)
{
case DT_PAGE:
{
// Accept a drop.
- nResult = rEvent.mnAction;
+ nAction = rEvent.mnAction;
// Use the copy action when the drop action is the default, i.e. not
// explicitly set to move or link, and when the source and
@@ -513,23 +611,27 @@ sal_Int8 Clipboard::AcceptDrop (
&& (mrSlideSorter.GetModel().GetDocument()->GetDocSh()
!= pDragTransferable->GetPageDocShell()))
{
- nResult = DND_ACTION_COPY;
+ nAction = DND_ACTION_COPY;
+ }
+ else if (mrController.GetInsertionIndicatorHandler()->IsInsertionTrivial(nAction))
+ {
+ nAction = DND_ACTION_NONE;
}
// Show the insertion marker and the substitution for a drop.
Point aPosition = pTargetWindow->PixelToLogic (rEvent.maPosPixel);
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition (aPosition);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
- rOverlay.GetSubstitutionOverlay().SetPosition (aPosition);
+ SelectionFunction* pSelectionFunction = dynamic_cast<SelectionFunction*>(
+ mrSlideSorter.GetViewShell()->GetCurrentFunction().get());
+ if (pSelectionFunction != NULL)
+ pSelectionFunction->MouseDragged(rEvent, nAction);
// Scroll the window when the mouse reaches the window border.
- mrController.GetScrollBarManager().AutoScroll (rEvent.maPosPixel);
+ // mrController.GetScrollBarManager().AutoScroll (rEvent.maPosPixel);
}
break;
case DT_SHAPE:
- nResult = ExecuteOrAcceptShapeDrop(
+ nAction = ExecuteOrAcceptShapeDrop(
DC_ACCEPT,
rEvent.maPosPixel,
&rEvent,
@@ -538,11 +640,13 @@ sal_Int8 Clipboard::AcceptDrop (
nPage,
nLayer);
break;
+
default:
+ nAction = DND_ACTION_NONE;
break;
}
- return nResult;
+ return nAction;
}
@@ -552,10 +656,11 @@ sal_Int8 Clipboard::ExecuteDrop (
const ExecuteDropEvent& rEvent,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
sal_Int8 nResult = DND_ACTION_NONE;
+ mpUndoContext.reset();
switch (IsDropAccepted())
{
@@ -564,54 +669,57 @@ sal_Int8 Clipboard::ExecuteDrop (
const SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
const Point aEventModelPosition (
pTargetWindow->PixelToLogic (rEvent.maPosPixel));
- long int nXOffset = labs (pDragTransferable->GetStartPos().X()
- - aEventModelPosition.X());
- long int nYOffset = labs (pDragTransferable->GetStartPos().Y()
- - aEventModelPosition.Y());
- const bool bContinue =
+ const sal_Int32 nXOffset (labs (pDragTransferable->GetStartPos().X()
+ - aEventModelPosition.X()));
+ const sal_Int32 nYOffset (labs (pDragTransferable->GetStartPos().Y()
+ - aEventModelPosition.Y()));
+ bool bContinue =
( pDragTransferable->GetView() != &mrSlideSorter.GetView() )
|| ( nXOffset >= 2 && nYOffset >= 2 );
+ ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler(
+ mrController.GetInsertionIndicatorHandler());
// Get insertion position and then turn off the insertion indicator.
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(
- aEventModelPosition);
- USHORT nIndex = DetermineInsertPosition (*pDragTransferable);
- OSL_TRACE ("Clipboard::AcceptDrop() called for index %d",
- nIndex);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
+ pInsertionIndicatorHandler->UpdatePosition(aEventModelPosition, rEvent.mnAction);
+ // sal_uInt16 nIndex = DetermineInsertPosition(*pDragTransferable);
+
+ // Do not process the insertion when it is trivial,
+ // i.e. would insert pages at their original place.
+ if (pInsertionIndicatorHandler->IsInsertionTrivial(rEvent.mnAction))
+ bContinue = false;
+
+ // Tell the insertion indicator handler to hide before the model
+ // is modified. Doing it later may result in page objects whose
+ // animation state is not properly reset because they are then
+ // in another run then before the model change.
+ pInsertionIndicatorHandler->End(Animator::AM_Immediate);
if (bContinue)
{
SlideSorterController::ModelChangeLock aModelChangeLock (mrController);
- if (pDragTransferable->GetView() == &mrSlideSorter.GetView()
- && rEvent.mnAction == DND_ACTION_MOVE)
- {
- // We are asked to move pages inside one view. For this we
- // call MoveSelectedPages() which is faster than going the
- // generic way.
-
- // Remember to select the moved pages afterwards.
- maPagesToRemove.swap(maPagesToSelect);
- maPagesToRemove.clear();
-
- USHORT nSdrModelIndex;
- if (nIndex != SDRPAGE_NOTFOUND)
- nSdrModelIndex = nIndex / 2 - 1;
- else
- nSdrModelIndex = SDRPAGE_NOTFOUND;
- mrController.GetSelectionManager()->MoveSelectedPages(nSdrModelIndex);
- mbUpdateSelectionPending = true;
- nResult = DND_ACTION_NONE;
- }
- else
- {
- // Handle a general drop operation.
- HandlePageDrop (*pDragTransferable);
- nResult = rEvent.mnAction;
- }
+ // Handle a general drop operation.
+ mpUndoContext.reset(new UndoContext (
+ mrSlideSorter.GetModel().GetDocument(),
+ mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell(),
+ mrSlideSorter.GetTheme()));
+ mpSelectionObserverContext.reset(new SelectionObserver::Context(mrSlideSorter));
+
+ HandlePageDrop(*pDragTransferable);
+ nResult = rEvent.mnAction;
+
+ // We leave the undo context alive for when moving or
+ // copying inside one view then the actions in
+ // NotifyDragFinished should be covered as well as
+ // well as the ones above.
}
+
+ // Notify the receiving selection function that drag-and-drop is
+ // finished and the substitution handler can be released.
+ ::rtl::Reference<SelectionFunction> pFunction (
+ mrController.GetCurrentSelectionFunction());
+ if (pFunction.is())
+ pFunction->NotifyDragFinished();
}
break;
@@ -635,46 +743,52 @@ sal_Int8 Clipboard::ExecuteDrop (
-USHORT Clipboard::DetermineInsertPosition (const SdTransferable& )
+void Clipboard::Abort (void)
{
- USHORT nInsertPosition = SDRPAGE_NOTFOUND;
+ if (mpSelectionObserverContext)
+ {
+ mpSelectionObserverContext->Abort();
+ mpSelectionObserverContext.reset();
+ }
+}
+
+
+
+sal_uInt16 Clipboard::DetermineInsertPosition (const SdTransferable& )
+{
// Tell the model to move the dragged pages behind the one with the
// index nInsertionIndex which first has to be transformed into an index
// understandable by the document.
- view::InsertionIndicatorOverlay& rOverlay (
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay());
- sal_Int32 nInsertionIndex (rOverlay.GetInsertionPageIndex());
+ const sal_Int32 nInsertionIndex (
+ mrController.GetInsertionIndicatorHandler()->GetInsertionPageIndex());
- // The index returned by the overlay starts with 1 for the first slide.
- // This is now converted that to an SdModel index that also starts with 1.
+ // Convert to insertion index to that of an SdModel.
if (nInsertionIndex >= 0)
- nInsertPosition = (USHORT)nInsertionIndex * 2 + 1;
-
- return nInsertPosition;
+ return mrSlideSorter.GetModel().GetCoreIndex(nInsertionIndex);
+ else
+ return 0;
}
-USHORT Clipboard::InsertSlides (
+sal_uInt16 Clipboard::InsertSlides (
const SdTransferable& rTransferable,
- USHORT nInsertPosition)
+ sal_uInt16 nInsertPosition)
{
- USHORT nInsertedPageCount = ViewClipboard::InsertSlides (
+ sal_uInt16 nInsertedPageCount = ViewClipboard::InsertSlides (
rTransferable,
nInsertPosition);
// Remember the inserted pages so that they can be selected when the
// operation is finished.
- int nDocumentIndex = nInsertPosition / 2 - 1;
- for (USHORT i=1; i<=nInsertedPageCount; i++)
- {
- model::SharedPageDescriptor pDescriptor (
- mrSlideSorter.GetModel().GetPageDescriptor(nDocumentIndex + i));
- if (pDescriptor.get() != NULL)
- maPagesToSelect.push_back (pDescriptor->GetPage());
- }
+ maPagesToSelect.clear();
+ SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
+ if (pDocument != NULL)
+ for (sal_Int32 i=0; i<=nInsertedPageCount; i+=2)
+ maPagesToSelect.push_back(
+ dynamic_cast<SdPage*>(pDocument->GetPage(nInsertPosition+i)));
mbUpdateSelectionPending |= (nInsertedPageCount>0);
@@ -714,8 +828,8 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop (
const void* pDropEvent,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
sal_Int8 nResult = 0;
@@ -740,8 +854,8 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop (
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor(
mrSlideSorter.GetView().GetPageIndexAtPoint(rPosition)));
- if (pDescriptor.get() != NULL && pDescriptor->GetPage()!=NULL)
- nPage = (pDescriptor->GetPage()->GetPageNum() - 1) / 2;
+ if (pDescriptor)
+ nPage = pDescriptor->GetPageIndex();
}
// Now comes the code that is different for the Execute and Accept:
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 0f9cb1b1becb..97de9f7b2c20 100644
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -34,8 +34,8 @@
#include "controller/SlsPageSelector.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsFocusManager.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "ViewShellBase.hxx"
#include "ViewShell.hxx"
#include "DrawViewShell.hxx"
@@ -48,13 +48,18 @@ using namespace ::com::sun::star::uno;
using namespace ::sd::slidesorter::model;
+
namespace sd { namespace slidesorter { namespace controller {
+
CurrentSlideManager::CurrentSlideManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
mnCurrentSlideIndex(-1),
- mpCurrentSlide()
+ mpCurrentSlide(),
+ maSwitchPageDelayTimer()
{
+ maSwitchPageDelayTimer.SetTimeout(100);
+ maSwitchPageDelayTimer.SetTimeoutHdl(LINK(this,CurrentSlideManager,SwitchPageCallback));
}
@@ -67,7 +72,22 @@ CurrentSlideManager::~CurrentSlideManager (void)
-void CurrentSlideManager::CurrentSlideHasChanged (const sal_Int32 nSlideIndex)
+void CurrentSlideManager::NotifyCurrentSlideChange (const SdPage* pPage)
+{
+ if (pPage != NULL)
+ NotifyCurrentSlideChange(
+ mrSlideSorter.GetModel().GetIndex(
+ Reference<drawing::XDrawPage>(
+ const_cast<SdPage*>(pPage)->getUnoPage(),
+ UNO_QUERY)));
+ else
+ NotifyCurrentSlideChange(-1);
+}
+
+
+
+
+void CurrentSlideManager::NotifyCurrentSlideChange (const sal_Int32 nSlideIndex)
{
if (mnCurrentSlideIndex != nSlideIndex)
{
@@ -76,8 +96,11 @@ void CurrentSlideManager::CurrentSlideHasChanged (const sal_Int32 nSlideIndex)
// Update the selection.
mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
- if (mpCurrentSlide.get() != NULL)
+ if (mpCurrentSlide)
+ {
mrSlideSorter.GetController().GetPageSelector().SelectPage(mpCurrentSlide);
+ mrSlideSorter.GetController().GetFocusManager().SetFocusedPage(mpCurrentSlide);
+ }
}
}
@@ -87,10 +110,7 @@ void CurrentSlideManager::CurrentSlideHasChanged (const sal_Int32 nSlideIndex)
void CurrentSlideManager::ReleaseCurrentSlide (void)
{
if (mpCurrentSlide.get() != NULL)
- {
- mpCurrentSlide->SetIsCurrentPage(false);
- mrSlideSorter.GetView().RequestRepaint(mpCurrentSlide);
- }
+ mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, false);
mpCurrentSlide.reset();
mnCurrentSlideIndex = -1;
@@ -118,48 +138,64 @@ void CurrentSlideManager::AcquireCurrentSlide (const sal_Int32 nSlideIndex)
// document.
mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
if (mpCurrentSlide.get() != NULL)
- {
- mpCurrentSlide->SetIsCurrentPage(true);
- mrSlideSorter.GetView().RequestRepaint(mpCurrentSlide);
- }
+ mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
-void CurrentSlideManager::SwitchCurrentSlide (const sal_Int32 nSlideIndex)
+void CurrentSlideManager::SwitchCurrentSlide (
+ const sal_Int32 nSlideIndex,
+ const bool bUpdateSelection)
{
- SwitchCurrentSlide(mrSlideSorter.GetModel().GetPageDescriptor(nSlideIndex));
+ SwitchCurrentSlide(mrSlideSorter.GetModel().GetPageDescriptor(nSlideIndex), bUpdateSelection);
}
-void CurrentSlideManager::SwitchCurrentSlide (const SharedPageDescriptor& rpDescriptor)
+void CurrentSlideManager::SwitchCurrentSlide (
+ const SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateSelection)
{
- if (rpDescriptor.get() != NULL)
+ if (rpDescriptor.get() != NULL && mpCurrentSlide!=rpDescriptor)
{
- mpCurrentSlide = rpDescriptor;
- mnCurrentSlideIndex = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
+ ReleaseCurrentSlide();
+ AcquireCurrentSlide((rpDescriptor->GetPage()->GetPageNum()-1)/2);
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
if (pViewShell != NULL && pViewShell->IsMainViewShell())
{
+ // The slide sorter is the main view.
FrameView* pFrameView = pViewShell->GetFrameView();
if (pFrameView != NULL)
- pFrameView->SetSelectedPage(sal::static_int_cast<USHORT>(mnCurrentSlideIndex));
+ pFrameView->SetSelectedPage(sal::static_int_cast<sal_uInt16>(mnCurrentSlideIndex));
+ mrSlideSorter.GetController().GetPageSelector().SetCoreSelection();
}
- else
+
+ // We do not tell the XController/ViewShellBase about the new
+ // slide right away. This is done asynchronously after a short
+ // delay to allow for more slide switches in the slide sorter.
+ // This goes under the assumption that slide switching inside
+ // the slide sorter is fast (no expensive redraw of the new page
+ // (unless the preview of the new slide is not yet preset)) and
+ // that slide switching in the edit view is slow (all shapes of
+ // the new slide have to be repainted.)
+ maSwitchPageDelayTimer.Start();
+
+ // We have to store the (index of the) new current slide at
+ // the tab control because there are other asynchronous
+ // notifications of the slide switching that otherwise
+ // overwrite the correct value.
+ SetCurrentSlideAtTabControl(mpCurrentSlide);
+
+ if (bUpdateSelection)
{
- // Set current page. At the moment we have to do this in two
- // different ways. The UNO way is the preferable one but, alas,
- // it does not work always correctly (after some kinds of model
- // changes). Therefore, we call DrawViewShell::SwitchPage(),
- // too.
- SetCurrentSlideAtViewShellBase(rpDescriptor);
- SetCurrentSlideAtXController(rpDescriptor);
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
}
+ mrSlideSorter.GetController().GetFocusManager().SetFocusedPage(rpDescriptor);
}
}
@@ -177,23 +213,30 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescri
pBase->GetMainViewShell().get());
if (pDrawViewShell != NULL)
{
- USHORT nPageNumber = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
+ sal_uInt16 nPageNumber = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
pDrawViewShell->SwitchPage(nPageNumber);
pDrawViewShell->GetPageTabControl()->SetCurPageId(nPageNumber+1);
}
- /*
- else
+ }
+}
+
+
+
+
+void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescriptor& rpDescriptor)
+{
+ OSL_ASSERT(rpDescriptor.get() != NULL);
+
+ ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
+ if (pBase != NULL)
+ {
+ ::boost::shared_ptr<DrawViewShell> pDrawViewShell (
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell()));
+ if (pDrawViewShell)
{
- presenter::PresenterViewShell* pPresenterViewShell
- = dynamic_cast<presenter::PresenterViewShell*>(pBase->GetMainViewShell());
- if (pPresenterViewShell != NULL)
- {
- pPresenterViewShell->SetCurrentSlide(
- Reference<drawing::XDrawPage>(
- rpDescriptor->GetPage()->getUnoPage(), UNO_QUERY));
- }
+ sal_uInt16 nPageNumber = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
+ pDrawViewShell->GetPageTabControl()->SetCurPageId(nPageNumber+1);
}
- */
}
}
@@ -216,7 +259,7 @@ void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescript
aPage);
}
}
- catch (beans::UnknownPropertyException aException)
+ catch (Exception aException)
{
// We have not been able to set the current page at the main view.
// This is sad but still leaves us in a valid state. Therefore,
@@ -247,13 +290,33 @@ void CurrentSlideManager::HandleModelChange (void)
{
if (mnCurrentSlideIndex >= 0)
{
- mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(
- mnCurrentSlideIndex);
+ mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
if (mpCurrentSlide.get() != NULL)
- mpCurrentSlide->SetIsCurrentPage(true);
+ mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
+
+
+
+IMPL_LINK(CurrentSlideManager, SwitchPageCallback, void*, EMPTYARG)
+{
+ if (mpCurrentSlide)
+ {
+ // Set current page. At the moment we have to do this in two
+ // different ways. The UNO way is the preferable one but, alas,
+ // it does not work always correctly (after some kinds of model
+ // changes). Therefore, we call DrawViewShell::SwitchPage(),
+ // too.
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell==NULL || ! pViewShell->IsMainViewShell())
+ SetCurrentSlideAtViewShellBase(mpCurrentSlide);
+ SetCurrentSlideAtXController(mpCurrentSlide);
+ }
+
+ return 1;
+}
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
new file mode 100644
index 000000000000..76a5f583f4a5
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlsDragAndDropContext.hxx"
+
+#include "SlideSorter.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
+#include "view/SlideSorterView.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "controller/SlsScrollBarManager.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsSelectionFunction.hxx"
+#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsTransferable.hxx"
+#include "DrawDocShell.hxx"
+#include "drawdoc.hxx"
+#include "app.hrc"
+#include <sfx2/bindings.hxx>
+#include <boost/bind.hpp>
+
+namespace sd { namespace slidesorter { namespace controller {
+
+DragAndDropContext::DragAndDropContext (SlideSorter& rSlideSorter)
+ : mpTargetSlideSorter(&rSlideSorter),
+ mnInsertionIndex(-1)
+{
+ ::std::vector<const SdPage*> aPages;
+
+ // No Drag-and-Drop for master pages.
+ if (rSlideSorter.GetModel().GetEditMode() != EM_PAGE)
+ return;
+
+ rSlideSorter.GetController().GetInsertionIndicatorHandler()->UpdateIndicatorIcon(
+ dynamic_cast<Transferable*>(SD_MOD()->pTransferDrag));
+}
+
+
+
+
+DragAndDropContext::~DragAndDropContext (void)
+{
+ SetTargetSlideSorter (NULL, Point(0,0), InsertionIndicatorHandler::UnknownMode, false);
+}
+
+
+
+
+void DragAndDropContext::GetPagesFromBookmarks (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ DrawDocShell* pDocShell,
+ const List& rBookmarks) const
+{
+ if (pDocShell == NULL)
+ return;
+
+ const SdDrawDocument* pDocument = pDocShell->GetDoc();
+ if (pDocument == NULL)
+ return;
+
+ for (sal_uLong nIndex=0,nCount=rBookmarks.Count(); nIndex<nCount; ++nIndex)
+ {
+ const String sPageName (*static_cast<String*>(rBookmarks.GetObject(nIndex)));
+ sal_Bool bIsMasterPage (sal_False);
+ const sal_uInt16 nPageIndex (pDocument->GetPageByName(sPageName, bIsMasterPage));
+ if (nPageIndex == SDRPAGE_NOTFOUND)
+ continue;
+
+ const SdPage* pPage = dynamic_cast<const SdPage*>(pDocument->GetPage(nPageIndex));
+ if (pPage != NULL)
+ rPages.push_back(pPage);
+ }
+ rnSelectionCount = rBookmarks.Count();
+}
+
+
+
+
+void DragAndDropContext::GetPagesFromSelection (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ model::PageEnumeration& rSelection) const
+{
+ // Show a new substitution for the selected page objects.
+ rnSelectionCount = 0;
+
+ while (rSelection.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (rSelection.GetNextElement());
+ if (rPages.size() < 3)
+ rPages.push_back(pDescriptor->GetPage());
+ ++rnSelectionCount;
+ }
+}
+
+
+
+
+void DragAndDropContext::Dispose (void)
+{
+ mnInsertionIndex = -1;
+}
+
+
+
+
+void DragAndDropContext::UpdatePosition (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode,
+ const bool bAllowAutoScroll)
+{
+ if (mpTargetSlideSorter == NULL)
+ return;
+
+ if (mpTargetSlideSorter->GetProperties()->IsUIReadOnly())
+ return;
+
+ // Convert window coordinates into model coordinates (we need the
+ // window coordinates for auto-scrolling because that remains
+ // constant while scrolling.)
+ SharedSdWindow pWindow (mpTargetSlideSorter->GetContentWindow());
+ const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
+ ::boost::shared_ptr<InsertionIndicatorHandler> pInsertionIndicatorHandler (
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler());
+
+ if ( ! (bAllowAutoScroll
+ && mpTargetSlideSorter->GetController().GetScrollBarManager().AutoScroll(
+ rMousePosition,
+ ::boost::bind(
+ &DragAndDropContext::UpdatePosition, this, rMousePosition, eMode, false))))
+ {
+ pInsertionIndicatorHandler->UpdatePosition(aMouseModelPosition, eMode);
+
+ // Remember the new insertion index.
+ mnInsertionIndex = pInsertionIndicatorHandler->GetInsertionPageIndex();
+ if (pInsertionIndicatorHandler->IsInsertionTrivial(mnInsertionIndex, eMode))
+ mnInsertionIndex = -1;
+ }
+}
+
+
+
+
+void DragAndDropContext::SetTargetSlideSorter (
+ SlideSorter* pSlideSorter,
+ const Point aMousePosition,
+ const InsertionIndicatorHandler::Mode eMode,
+ const bool bIsOverSourceView)
+{
+ if (mpTargetSlideSorter != NULL)
+ {
+ mpTargetSlideSorter->GetController().GetScrollBarManager().StopAutoScroll();
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->End(
+ Animator::AM_Animated);
+ }
+
+ mpTargetSlideSorter = pSlideSorter;
+
+ if (mpTargetSlideSorter != NULL)
+ {
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->Start(
+ bIsOverSourceView);
+ mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->UpdatePosition(
+ aMousePosition,
+ eMode);
+
+ }
+}
+
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
new file mode 100644
index 000000000000..7536f88d9474
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_SUBSTITUTION_HANDLER_HXX
+#define SD_SLIDESORTER_SUBSTITUTION_HANDLER_HXX
+
+#include <tools/gen.hxx>
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include <vector>
+
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+/** A DragAndDropContext object handles an active drag and drop operation.
+ When the mouse is moved from one slide sorter window to another the
+ target SlideSorter object is exchanged accordingly.
+*/
+class DragAndDropContext
+{
+public:
+ /** Create a substitution display of the currently selected pages or,
+ when provided, the pages in the transferable.
+ */
+ DragAndDropContext (SlideSorter& rSlideSorter);
+ ~DragAndDropContext (void);
+
+ /** Call this method (for example as reaction to ESC key press) to avoid
+ processing (ie moving or inserting) the substition when the called
+ DragAndDropContext object is destroyed.
+ */
+ void Dispose (void);
+
+ /** Move the substitution display by the distance the mouse has
+ travelled since the last call to this method or to
+ CreateSubstitution(). The given point becomes the new anchor.
+ */
+ void UpdatePosition (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode,
+ const bool bAllowAutoScroll = true);
+
+ void SetTargetSlideSorter (
+ SlideSorter* pSlideSorter = NULL,
+ const Point aMousePosition = Point(0,0),
+ const InsertionIndicatorHandler::Mode eMode = InsertionIndicatorHandler::UnknownMode,
+ const bool bIsOverSourceView = false);
+
+private:
+ SlideSorter* mpTargetSlideSorter;
+ model::SharedPageDescriptor mpHitDescriptor;
+ sal_Int32 mnInsertionIndex;
+
+ void GetPagesFromBookmarks (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ DrawDocShell* pDocShell,
+ const List& rBookmarks) const;
+ void GetPagesFromSelection (
+ ::std::vector<const SdPage*>& rPages,
+ sal_Int32& rnSelectionCount,
+ model::PageEnumeration& rSelection) const;
+};
+
+
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index 83f34270c1b3..03ca44d4b848 100644
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -32,7 +32,8 @@
#include "SlideSorter.hxx"
#include "PaneDockingWindow.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
@@ -42,12 +43,15 @@
#include "Window.hxx"
#include "sdpage.hxx"
+#define UNIFY_FOCUS_AND_CURRENT_PAGE
+
namespace sd { namespace slidesorter { namespace controller {
FocusManager::FocusManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
mnPageIndex(0),
- mbPageIsFocused(false)
+ mbPageIsFocused(false),
+ mbIsVerticalWrapActive(false)
{
if (mrSlideSorter.GetModel().GetPageCount() > 0)
mnPageIndex = 0;
@@ -69,69 +73,101 @@ void FocusManager::MoveFocus (FocusMoveDirection eDirection)
{
HideFocusIndicator (GetFocusedPageDescriptor());
- int nColumnCount (mrSlideSorter.GetView().GetLayouter().GetColumnCount());
+ const sal_Int32 nColumnCount (mrSlideSorter.GetView().GetLayouter().GetColumnCount());
+ const sal_Int32 nPageCount (mrSlideSorter.GetModel().GetPageCount());
switch (eDirection)
{
case FMD_NONE:
- if (mnPageIndex >= mrSlideSorter.GetModel().GetPageCount())
- mnPageIndex = mrSlideSorter.GetModel().GetPageCount() - 1;
+ // Nothing to be done.
break;
case FMD_LEFT:
- mnPageIndex -= 1;
- if (mnPageIndex < 0)
- {
- mnPageIndex = mrSlideSorter.GetModel().GetPageCount() - 1;
- SetFocusToToolBox();
- }
+ if (mnPageIndex > 0)
+ mnPageIndex -= 1;
+ else if (mbIsVerticalWrapActive)
+ mnPageIndex = nPageCount-1;
break;
case FMD_RIGHT:
- mnPageIndex += 1;
- if (mnPageIndex >= mrSlideSorter.GetModel().GetPageCount())
- {
+ if (mnPageIndex < nPageCount-1)
+ mnPageIndex += 1;
+ else if (mbIsVerticalWrapActive)
mnPageIndex = 0;
- SetFocusToToolBox();
- }
break;
case FMD_UP:
{
- int nColumn = mnPageIndex % nColumnCount;
- mnPageIndex -= nColumnCount;
- if (mnPageIndex < 0)
+ const sal_Int32 nCandidate (mnPageIndex - nColumnCount);
+ if (nCandidate < 0)
{
- // Wrap arround to the bottom row or the one above and
- // go to the correct column.
- int nCandidate = mrSlideSorter.GetModel().GetPageCount()-1;
- int nCandidateColumn = nCandidate % nColumnCount;
- if (nCandidateColumn > nColumn)
- mnPageIndex = nCandidate - (nCandidateColumn-nColumn);
- else if (nCandidateColumn < nColumn)
- mnPageIndex = nCandidate
- - nColumnCount
- + (nColumn - nCandidateColumn);
- else
- mnPageIndex = nCandidate;
+ if (mbIsVerticalWrapActive)
+ {
+ // Wrap arround to the bottom row or the one above
+ // and go to the correct column.
+ const sal_Int32 nLastIndex (nPageCount-1);
+ const sal_Int32 nLastColumn (nLastIndex % nColumnCount);
+ const sal_Int32 nCurrentColumn (mnPageIndex%nColumnCount);
+ if (nLastColumn >= nCurrentColumn)
+ {
+ // The last row contains the current column.
+ mnPageIndex = nLastIndex - (nLastColumn-nCurrentColumn);
+ }
+ else
+ {
+ // Only the second to last row contains the current column.
+ mnPageIndex = nLastIndex - nLastColumn
+ - nColumnCount
+ + nCurrentColumn;
+ }
+ }
+ }
+ else
+ {
+ // Move the focus the previous row.
+ mnPageIndex = nCandidate;
}
}
break;
case FMD_DOWN:
{
- int nColumn = mnPageIndex % nColumnCount;
- mnPageIndex += nColumnCount;
- if (mnPageIndex >= mrSlideSorter.GetModel().GetPageCount())
+ const sal_Int32 nCandidate (mnPageIndex + nColumnCount);
+ if (nCandidate >= nPageCount)
+ {
+ if (mbIsVerticalWrapActive)
+ {
+ // Wrap arround to the correct column.
+ mnPageIndex = mnPageIndex % nColumnCount;
+ }
+ else
+ {
+ // Do not move the focus.
+ }
+ }
+ else
{
- // Wrap arround to the correct column.
- mnPageIndex = nColumn;
+ // Move the focus to the next row.
+ mnPageIndex = nCandidate;
}
}
break;
}
+ if (mnPageIndex < 0)
+ {
+ OSL_ASSERT(mnPageIndex>=0);
+ mnPageIndex = 0;
+ }
+ else if (mnPageIndex >= nPageCount)
+ {
+ OSL_ASSERT(mnPageIndex<nPageCount);
+ mnPageIndex = nPageCount - 1;
+ }
+
if (mbPageIsFocused)
+ {
ShowFocusIndicator(GetFocusedPageDescriptor(), true);
+ }
}
}
@@ -173,7 +209,7 @@ bool FocusManager::ToggleFocus (void)
bool FocusManager::HasFocus (void) const
{
- return mrSlideSorter.GetView().GetWindow()->HasFocus();
+ return mrSlideSorter.GetContentWindow()->HasFocus();
}
@@ -194,7 +230,7 @@ sal_Int32 FocusManager::GetFocusedPageIndex (void) const
-
+/*
void FocusManager::FocusPage (sal_Int32 nPageIndex)
{
if (nPageIndex != mnPageIndex)
@@ -207,7 +243,7 @@ void FocusManager::FocusPage (sal_Int32 nPageIndex)
if (HasFocus() && !IsFocusShowing())
ShowFocus();
}
-
+*/
@@ -232,6 +268,14 @@ void FocusManager::SetFocusedPage (sal_Int32 nPageIndex)
+void FocusManager::SetFocusedPageToCurrentPage (void)
+{
+ SetFocusedPage(mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
+}
+
+
+
+
bool FocusManager::IsFocusShowing (void) const
{
return HasFocus() && mbPageIsFocused;
@@ -244,8 +288,7 @@ void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDesc
{
if (rpDescriptor.get() != NULL)
{
- rpDescriptor->RemoveFocus();
- mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
+ mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, false);
}
}
@@ -258,21 +301,16 @@ void FocusManager::ShowFocusIndicator (
{
if (rpDescriptor.get() != NULL)
{
- rpDescriptor->SetFocus ();
+ mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, true);
if (bScrollToFocus)
{
// Scroll the focused page object into the visible area and repaint
// it, so that the focus indicator becomes visible.
- view::SlideSorterView& rView (mrSlideSorter.GetView());
- mrSlideSorter.GetController().GetSelectionManager()->MakeRectangleVisible (
- rView.GetPageBoundingBox (
- GetFocusedPageDescriptor(),
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_INFO));
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(rpDescriptor,true);
}
+ mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
- mrSlideSorter.GetView().RequestRepaint (rpDescriptor);
NotifyFocusChangeListeners();
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
index 46917e48c1c2..e7fff7b9f52a 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
@@ -110,8 +110,10 @@ void HideSlideFunction::DoExecute (SfxRequest& rRequest)
while (aSelectedPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
- pDescriptor->GetPage()->SetExcluded (eState==EXCLUDED);
- static_cast<view::SlideSorterView*>(mpView)->RequestRepaint(pDescriptor);
+ static_cast<view::SlideSorterView*>(mpView)->SetState(
+ pDescriptor,
+ model::PageDescriptor::ST_Excluded,
+ eState==EXCLUDED);
}
}
@@ -130,7 +132,7 @@ HideSlideFunction::ExclusionState HideSlideFunction::GetExclusionState (
model::PageEnumeration& rPageSet)
{
ExclusionState eState (UNDEFINED);
- BOOL bState;
+ sal_Bool bState;
// Get toggle state of the selected pages.
while (rPageSet.HasMoreElements() && eState!=MIXED)
diff --git a/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
new file mode 100644
index 000000000000..882adab932a8
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsInsertionIndicatorHandler.cxx
@@ -0,0 +1,327 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "controller/SlsProperties.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsInsertionIndicatorOverlay.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
+#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
+
+#include "SlideSorter.hxx"
+
+using namespace ::com::sun::star::datatransfer::dnd::DNDConstants;
+
+namespace sd { namespace slidesorter { namespace controller {
+
+
+InsertionIndicatorHandler::InsertionIndicatorHandler (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ mpInsertAnimator(),
+ mpInsertionIndicatorOverlay(new view::InsertionIndicatorOverlay(rSlideSorter)),
+ maInsertPosition(),
+ meMode(MoveMode),
+ mbIsActive(false),
+ mbIsReadOnly(mrSlideSorter.GetModel().IsReadOnly()),
+ mbIsOverSourceView(true),
+ maIconSize(0,0),
+ mbIsForcedShow(false)
+{
+}
+
+
+
+
+InsertionIndicatorHandler::~InsertionIndicatorHandler (void)
+{
+}
+
+
+
+
+void InsertionIndicatorHandler::Start (const bool bIsOverSourceView)
+{
+ if (mbIsActive)
+ {
+ OSL_ASSERT(!mbIsActive);
+ }
+
+ mbIsReadOnly = mrSlideSorter.GetModel().IsReadOnly();
+ if (mbIsReadOnly)
+ return;
+
+ mbIsActive = true;
+ mbIsOverSourceView = bIsOverSourceView;
+}
+
+
+
+
+void InsertionIndicatorHandler::End (const controller::Animator::AnimationMode eMode)
+{
+ if (mbIsForcedShow || ! mbIsActive || mbIsReadOnly)
+ return;
+
+ GetInsertAnimator()->Reset(eMode);
+
+ mbIsActive = false;
+ // maInsertPosition = view::InsertPosition();
+ meMode = UnknownMode;
+
+ mpInsertionIndicatorOverlay->Hide();
+ mpInsertionIndicatorOverlay.reset(new view::InsertionIndicatorOverlay(mrSlideSorter));
+}
+
+
+
+
+void InsertionIndicatorHandler::ForceShow (void)
+{
+ mbIsForcedShow = true;
+}
+
+
+
+
+void InsertionIndicatorHandler::ForceEnd (void)
+{
+ mbIsForcedShow = false;
+ End(Animator::AM_Immediate);
+}
+
+
+
+
+void InsertionIndicatorHandler::UpdateIndicatorIcon (const Transferable* pTransferable)
+{
+ mpInsertionIndicatorOverlay->Create(pTransferable);
+ maIconSize = mpInsertionIndicatorOverlay->GetSize();
+}
+
+
+
+
+InsertionIndicatorHandler::Mode InsertionIndicatorHandler::GetModeFromDndAction (
+ const sal_Int8 nDndAction)
+{
+ if ((nDndAction & ACTION_MOVE) != 0)
+ return MoveMode;
+ else if ((nDndAction & ACTION_COPY) != 0)
+ return CopyMode;
+ else
+ return UnknownMode;
+}
+
+
+
+
+void InsertionIndicatorHandler::UpdatePosition (
+ const Point& rMouseModelPosition,
+ const Mode eMode)
+{
+ if ( ! mbIsActive)
+ return;
+
+ if (mbIsReadOnly)
+ return;
+
+ SetPosition(rMouseModelPosition, eMode);
+}
+
+
+
+
+void InsertionIndicatorHandler::UpdatePosition (
+ const Point& rMouseModelPosition,
+ const sal_Int8 nDndAction)
+{
+ UpdatePosition(rMouseModelPosition, GetModeFromDndAction(nDndAction));
+}
+
+
+
+
+bool InsertionIndicatorHandler::IsActive (void) const
+{
+ return mbIsActive;
+}
+
+
+
+
+sal_Int32 InsertionIndicatorHandler::GetInsertionPageIndex (void) const
+{
+ if (mbIsReadOnly)
+ return -1;
+ else
+ return maInsertPosition.GetIndex();
+}
+
+
+
+
+void InsertionIndicatorHandler::SetPosition (
+ const Point& rPoint,
+ const Mode eMode)
+{
+ view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
+
+ const view::InsertPosition aInsertPosition (rLayouter.GetInsertPosition(
+ rPoint,
+ maIconSize,
+ mrSlideSorter.GetModel()));
+
+ static sal_Int32 TargetIndex (1);
+ if (aInsertPosition.GetIndex() == TargetIndex)
+ {
+ const view::InsertPosition aPosition (rLayouter.GetInsertPosition(
+ rPoint,
+ maIconSize,
+ mrSlideSorter.GetModel()));
+ const view::InsertPosition aPosition2 (rLayouter.GetInsertPosition(
+ rPoint,
+ maIconSize,
+ mrSlideSorter.GetModel()));
+ }
+
+ if (maInsertPosition != aInsertPosition
+ || meMode != eMode
+ // || ! mpInsertionIndicatorOverlay->IsVisible()
+ )
+ {
+ maInsertPosition = aInsertPosition;
+ meMode = eMode;
+ mbIsInsertionTrivial = IsInsertionTrivial(maInsertPosition.GetIndex(), eMode);
+ if (maInsertPosition.GetIndex()>=0 && ! mbIsInsertionTrivial)
+ {
+ mpInsertionIndicatorOverlay->SetLocation(maInsertPosition.GetLocation());
+
+ GetInsertAnimator()->SetInsertPosition(maInsertPosition);
+ mpInsertionIndicatorOverlay->Show();
+ }
+ else
+ {
+ GetInsertAnimator()->Reset(Animator::AM_Animated);
+ mpInsertionIndicatorOverlay->Hide();
+ }
+ }
+}
+
+
+
+
+::boost::shared_ptr<view::InsertAnimator> InsertionIndicatorHandler::GetInsertAnimator (void)
+{
+ if ( ! mpInsertAnimator)
+ mpInsertAnimator.reset(new view::InsertAnimator(mrSlideSorter));
+ return mpInsertAnimator;
+}
+
+
+
+
+bool InsertionIndicatorHandler::IsInsertionTrivial (
+ const sal_Int32 nInsertionIndex,
+ const Mode eMode) const
+{
+ if (eMode == CopyMode)
+ return false;
+ else if (eMode == UnknownMode)
+ return true;
+
+ if ( ! mbIsOverSourceView)
+ return false;
+
+ // Iterate over all selected pages and check whether there are
+ // holes. While we do this we remember the indices of the first and
+ // last selected page as preparation for the next step.
+ sal_Int32 nCurrentIndex = -1;
+ sal_Int32 nFirstIndex = -1;
+ sal_Int32 nLastIndex = -1;
+ model::PageEnumeration aSelectedPages (
+ model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
+ mrSlideSorter.GetModel()));
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+
+ // Get the page number and compare it to the last one.
+ const sal_Int32 nPageNumber (pDescriptor->GetPageIndex());
+ if (nCurrentIndex>=0 && nPageNumber>(nCurrentIndex+1))
+ return false;
+ else
+ nCurrentIndex = nPageNumber;
+
+ // Remember indices of the first and last page of the selection.
+ if (nFirstIndex == -1)
+ nFirstIndex = nPageNumber;
+ nLastIndex = nPageNumber;
+ }
+
+ // When we come here then the selection has no holes. We still have
+ // to check that the insertion position is not directly in front or
+ // directly behind the selection and thus moving the selection there
+ // would not change the model.
+ if (nInsertionIndex<nFirstIndex || nInsertionIndex>(nLastIndex+1))
+ return false;
+
+ return true;
+}
+
+
+
+
+bool InsertionIndicatorHandler::IsInsertionTrivial (const sal_Int8 nDndAction)
+{
+ return IsInsertionTrivial(GetInsertionPageIndex(), GetModeFromDndAction(nDndAction));
+}
+
+
+
+
+//===== InsertionIndicatorHandler::ForceShowContext ===========================
+
+InsertionIndicatorHandler::ForceShowContext::ForceShowContext (
+ const ::boost::shared_ptr<InsertionIndicatorHandler>& rpHandler)
+ : mpHandler(rpHandler)
+{
+ mpHandler->ForceShow();
+}
+
+
+
+
+InsertionIndicatorHandler::ForceShowContext::~ForceShowContext (void)
+{
+ mpHandler->ForceEnd();
+}
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 8273bdda4aa0..3604f55a8c29 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -26,8 +26,8 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+
#include "SlsListener.hxx"
#include "SlideSorter.hxx"
@@ -36,9 +36,15 @@
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsSelectionObserver.hxx"
#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
+#include "cache/SlsPageCache.hxx"
+#include "cache/SlsPageCacheManager.hxx"
#include "drawdoc.hxx"
+#include "DrawDocShell.hxx"
#include "glob.hrc"
#include "ViewShellBase.hxx"
@@ -76,7 +82,8 @@ Listener::Listener (
mxFrameWeak(),
mpModelChangeLock()
{
- StartListening (*mrSlideSorter.GetModel().GetDocument());
+ StartListening(*mrSlideSorter.GetModel().GetDocument());
+ StartListening(*mrSlideSorter.GetModel().GetDocument()->GetDocSh());
mbListeningToDocument = true;
// Connect to the UNO document.
@@ -128,7 +135,7 @@ Listener::Listener (
if (pMainViewShell != NULL
&& pMainViewShell!=pViewShell)
{
- StartListening (*pMainViewShell);
+ StartListening(*pMainViewShell);
}
Link aLink (LINK(this, Listener, EventMultiplexerCallback));
@@ -158,7 +165,8 @@ void Listener::ReleaseListeners (void)
{
if (mbListeningToDocument)
{
- EndListening (*mrSlideSorter.GetModel().GetDocument());
+ EndListening(*mrSlideSorter.GetModel().GetDocument()->GetDocSh());
+ EndListening(*mrSlideSorter.GetModel().GetDocument());
mbListeningToDocument = false;
}
@@ -304,18 +312,15 @@ void Listener::Notify (
if (rHint.ISA(SdrHint))
{
SdrHint& rSdrHint (*PTR_CAST(SdrHint,&rHint));
- if(rSdrHint.GetKind() == HINT_PAGEORDERCHG )
+ switch (rSdrHint.GetKind())
{
- if (rBroadcaster.ISA(SdDrawDocument))
- {
- SdDrawDocument& rDocument (
- static_cast<SdDrawDocument&>(rBroadcaster));
- if (rDocument.GetMasterSdPageCount(PK_STANDARD)
- == rDocument.GetMasterSdPageCount(PK_NOTES))
- {
- mrController.HandleModelChange();
- }
- }
+ case HINT_PAGEORDERCHG:
+ if (&rBroadcaster == mrSlideSorter.GetModel().GetDocument())
+ HandleModelChange(rSdrHint.GetPage());
+ break;
+
+ default:
+ break;
}
}
else if (rHint.ISA(ViewShellHint))
@@ -352,6 +357,16 @@ void Listener::Notify (
break;
}
}
+ else if (rHint.ISA(SfxSimpleHint))
+ {
+ SfxSimpleHint& rSfxSimpleHint (*PTR_CAST(SfxSimpleHint,&rHint));
+ switch (rSfxSimpleHint.GetId())
+ {
+ case SFX_HINT_DOCCHANGED:
+ mrController.CheckForMasterPageAssignment();
+ break;
+ }
+ }
}
@@ -393,7 +408,7 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
{
ConnectToController();
- mrController.GetPageSelector().UpdateAllPages();
+ // mrController.GetPageSelector().GetCoreSelection();
UpdateEditMode();
}
break;
@@ -403,6 +418,12 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
DisconnectFromController();
break;
+ case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
+ case tools::EventMultiplexerEvent::EID_SHAPE_INSERTED:
+ case tools::EventMultiplexerEvent::EID_SHAPE_REMOVED:
+ HandleShapeModification(static_cast<const SdrPage*>(pEvent->mpUserData));
+ break;
+
default:
break;
}
@@ -464,7 +485,7 @@ void SAL_CALL Listener::propertyChange (
static const ::rtl::OUString sEditModePropertyName (
RTL_CONSTASCII_USTRINGPARAM("IsMasterPageMode"));
- if (rEvent.PropertyName.equals (sCurrentPagePropertyName))
+ if (rEvent.PropertyName.equals(sCurrentPagePropertyName))
{
Any aCurrentPage = rEvent.NewValue;
Reference<beans::XPropertySet> xPageSet (aCurrentPage, UNO_QUERY);
@@ -476,13 +497,13 @@ void SAL_CALL Listener::propertyChange (
String(RTL_CONSTASCII_USTRINGPARAM("Number")));
sal_Int32 nCurrentPage = 0;
aPageNumber >>= nCurrentPage;
- mrController.GetPageSelector().UpdateAllPages ();
+ mrController.GetPageSelector().GetCoreSelection();
// The selection is already set but we call SelectPage()
// nevertheless in order to make the new current page the
// last recently selected page of the PageSelector. This is
// used when making the selection visible.
mrController.GetPageSelector().SelectPage(nCurrentPage-1);
- mrController.GetCurrentSlideManager()->CurrentSlideHasChanged(nCurrentPage-1);
+ mrController.GetCurrentSlideManager()->NotifyCurrentSlideChange(nCurrentPage-1);
}
catch (beans::UnknownPropertyException&)
{
@@ -521,7 +542,7 @@ void SAL_CALL Listener::frameAction (const frame::FrameActionEvent& rEvent)
case frame::FrameAction_COMPONENT_REATTACHED:
{
ConnectToController();
- mrController.GetPageSelector().UpdateAllPages();
+ mrController.GetPageSelector().GetCoreSelection();
UpdateEditMode();
}
break;
@@ -581,6 +602,84 @@ void Listener::UpdateEditMode (void)
+void Listener::HandleModelChange (const SdrPage* pPage)
+{
+ // Notify model and selection observer about the page. The return value
+ // of the model call acts as filter as to which events to pass to the
+ // selection observer.
+ if (mrSlideSorter.GetModel().NotifyPageEvent(pPage))
+ {
+ // The page of the hint belongs (or belonged) to the model.
+
+ // Tell the cache manager that the preview bitmaps for a deleted
+ // page can be removed from all caches.
+ if (pPage!=NULL && ! pPage->IsInserted())
+ cache::PageCacheManager::Instance()->ReleasePreviewBitmap(pPage);
+
+ mrController.GetSelectionManager()->GetSelectionObserver()->NotifyPageEvent(pPage);
+ }
+
+ // Tell the controller about the model change only when the document is
+ // in a sane state, not just in the middle of a larger change.
+ SdDrawDocument* pDocument (mrSlideSorter.GetModel().GetDocument());
+ if (pDocument != NULL
+ && pDocument->GetMasterSdPageCount(PK_STANDARD) == pDocument->GetMasterSdPageCount(PK_NOTES))
+ {
+ // A model change can make updates of some text fields necessary
+ // (like page numbers and page count.) Invalidate all previews in
+ // the cache to cope with this. Doing this on demand would be a
+ // nice optimization.
+ cache::PageCacheManager::Instance()->InvalidateAllPreviewBitmaps(pDocument->getUnoModel());
+
+ mrController.HandleModelChange();
+ }
+}
+
+
+
+void Listener::HandleShapeModification (const SdrPage* pPage)
+{
+ if (pPage == NULL)
+ return;
+
+ // Invalidate the preview of the page (in all slide sorters that display
+ // it.)
+ ::boost::shared_ptr<cache::PageCacheManager> pCacheManager (cache::PageCacheManager::Instance());
+ if ( ! pCacheManager)
+ return;
+ SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
+ if (pDocument == NULL)
+ {
+ OSL_ASSERT(pDocument!=NULL);
+ return;
+ }
+ pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage);
+ mrSlideSorter.GetView().GetPreviewCache()->RequestPreviewBitmap(pPage);
+
+ // When the page is a master page then invalidate the previews of all
+ // pages that are linked to this master page.
+ if (pPage->IsMasterPage())
+ {
+ for (sal_uInt16 nIndex=0,nCount=pDocument->GetSdPageCount(PK_STANDARD);
+ nIndex<nCount;
+ ++nIndex)
+ {
+ const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD);
+ if (pCandidate!=NULL && pCandidate->TRG_HasMasterPage())
+ {
+ if (&pCandidate->TRG_GetMasterPage() == pPage)
+ pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pCandidate);
+ }
+ else
+ {
+ OSL_ASSERT(pCandidate!=NULL && pCandidate->TRG_HasMasterPage());
+ }
+ }
+ }
+}
+
+
+
void Listener::ThrowIfDisposed (void)
throw (::com::sun::star::lang::DisposedException)
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.hxx b/sd/source/ui/slidesorter/controller/SlsListener.hxx
index 23faf53128b5..36d24af055fa 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsListener.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.hxx
@@ -170,6 +170,17 @@ private:
*/
void UpdateEditMode (void);
+ /** Handle a change in the order of slides or when the set of slides has
+ changed, i.e. a slide has been created.
+ */
+ void HandleModelChange (const SdrPage* pPage);
+
+ /** Handle a modification to a shape on the given page. When this is a
+ regular page then update its preview. When it is a master page then
+ additionally update the previews of all pages linked to it.
+ */
+ void HandleShapeModification (const SdrPage* pPage);
+
/** This method throws a DisposedException when the object has already been
disposed.
*/
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index 30b1db5998fa..cfd34db8177f 100644
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -34,6 +34,9 @@
#include "SlideSorterViewShell.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsAnimator.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlideSorterModel.hxx"
@@ -45,14 +48,16 @@
#include "ViewShellBase.hxx"
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <boost/bind.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::sd::slidesorter::model;
using namespace ::sd::slidesorter::view;
-namespace sd { namespace slidesorter { namespace controller {
+namespace sd { namespace slidesorter { namespace controller {
PageSelector::PageSelector (SlideSorter& rSlideSorter)
: mrModel(rSlideSorter.GetModel()),
@@ -62,7 +67,10 @@ PageSelector::PageSelector (SlideSorter& rSlideSorter)
mnBroadcastDisableLevel(0),
mbSelectionChangeBroadcastPending(false),
mpMostRecentlySelectedPage(),
- mpSelectionAnchor()
+ mpSelectionAnchor(),
+ mpCurrentPage(),
+ mnUpdateLockCount(0),
+ mbIsUpdateCurrentPagePending(false)
{
CountSelectedPages ();
}
@@ -72,9 +80,12 @@ PageSelector::PageSelector (SlideSorter& rSlideSorter)
void PageSelector::SelectAllPages (void)
{
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+ PageSelector::UpdateLock aLock (*this);
+
int nPageCount = mrModel.GetPageCount();
for (int nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
- SelectPage (nPageIndex);
+ SelectPage(nPageIndex);
}
@@ -82,21 +93,26 @@ void PageSelector::SelectAllPages (void)
void PageSelector::DeselectAllPages (void)
{
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+ PageSelector::UpdateLock aLock (*this);
+
int nPageCount = mrModel.GetPageCount();
for (int nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
- DeselectPage (nPageIndex);
+ DeselectPage(nPageIndex);
+
DBG_ASSERT (mnSelectedPageCount==0,
"PageSelector::DeselectAllPages: the selected pages counter is not 0");
mnSelectedPageCount = 0;
- mpMostRecentlySelectedPage.reset();
mpSelectionAnchor.reset();
}
-void PageSelector::UpdateAllPages (void)
+void PageSelector::GetCoreSelection (void)
{
+ PageSelector::UpdateLock aLock (*this);
+
bool bSelectionHasChanged (true);
mnSelectedPageCount = 0;
model::PageEnumeration aAllPages (
@@ -104,13 +120,14 @@ void PageSelector::UpdateAllPages (void)
while (aAllPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- if (pDescriptor->UpdateSelection())
+ if (pDescriptor->GetCoreSelection())
{
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(pDescriptor);
mrSlideSorter.GetView().RequestRepaint(pDescriptor);
bSelectionHasChanged = true;
}
- if (pDescriptor->IsSelected())
+ if (pDescriptor->HasState(PageDescriptor::ST_Selected))
mnSelectedPageCount++;
}
@@ -126,6 +143,20 @@ void PageSelector::UpdateAllPages (void)
+void PageSelector::SetCoreSelection (void)
+{
+ model::PageEnumeration aAllPages (
+ model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+ while (aAllPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ pDescriptor->SetCoreSelection();
+ }
+}
+
+
+
+
void PageSelector::SelectPage (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
@@ -138,7 +169,7 @@ void PageSelector::SelectPage (int nPageIndex)
void PageSelector::SelectPage (const SdPage* pPage)
{
- int nPageIndex = (pPage->GetPageNum()-1) / 2;
+ const sal_Int32 nPageIndex (mrModel.GetIndex(pPage));
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
SelectPage(pDescriptor);
@@ -149,9 +180,11 @@ void PageSelector::SelectPage (const SdPage* pPage)
void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->Select())
+ if (rpDescriptor.get()!=NULL
+ && mrSlideSorter.GetView().SetState(rpDescriptor, PageDescriptor::ST_Selected, true))
{
- mnSelectedPageCount ++;
+ ++mnSelectedPageCount;
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(rpDescriptor,true);
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
mpMostRecentlySelectedPage = rpDescriptor;
@@ -162,27 +195,49 @@ void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
mbSelectionChangeBroadcastPending = true;
else
mrController.GetSelectionManager()->SelectionHasChanged();
+ UpdateCurrentPage();
+
+ CheckConsistency();
}
}
-void PageSelector::DeselectPage (int nPageIndex)
+void PageSelector::DeselectPage (
+ int nPageIndex,
+ const bool bUpdateCurrentPage)
{
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get() != NULL)
- DeselectPage(pDescriptor);
+ DeselectPage(pDescriptor, bUpdateCurrentPage);
}
-void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor)
+void PageSelector::DeselectPage (
+ const SdPage* pPage,
+ const bool bUpdateCurrentPage)
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->Deselect())
+ const sal_Int32 nPageIndex (mrModel.GetIndex(pPage));
+ SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
+ if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
+ DeselectPage(pDescriptor, bUpdateCurrentPage);
+}
+
+
+
+
+void PageSelector::DeselectPage (
+ const SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateCurrentPage)
+{
+ if (rpDescriptor.get()!=NULL
+ && mrSlideSorter.GetView().SetState(rpDescriptor, PageDescriptor::ST_Selected, false))
{
- mnSelectedPageCount --;
+ --mnSelectedPageCount;
+ mrSlideSorter.GetController().GetVisibleAreaManager().RequestVisible(rpDescriptor);
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
if (mpMostRecentlySelectedPage == rpDescriptor)
mpMostRecentlySelectedPage.reset();
@@ -190,6 +245,29 @@ void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor)
mbSelectionChangeBroadcastPending = true;
else
mrController.GetSelectionManager()->SelectionHasChanged();
+ if (bUpdateCurrentPage)
+ UpdateCurrentPage();
+
+ CheckConsistency();
+ }
+}
+
+
+
+
+void PageSelector::CheckConsistency (void) const
+{
+ int nSelectionCount (0);
+ for (int nPageIndex=0,nPageCount=mrModel.GetPageCount(); nPageIndex<nPageCount; nPageIndex++)
+ {
+ SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
+ assert(pDescriptor);
+ if (pDescriptor->HasState(PageDescriptor::ST_Selected))
+ ++nSelectionCount;
+ }
+ if (nSelectionCount!=mnSelectedPageCount)
+ {
+ assert(nSelectionCount==mnSelectedPageCount);
}
}
@@ -200,7 +278,7 @@ bool PageSelector::IsPageSelected (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
if (pDescriptor.get() != NULL)
- return pDescriptor->IsSelected();
+ return pDescriptor->HasState(PageDescriptor::ST_Selected);
else
return false;
}
@@ -224,30 +302,6 @@ int PageSelector::GetSelectedPageCount (void) const
-void PageSelector::PrepareModelChange (void)
-{
- DeselectAllPages ();
-}
-
-
-
-
-void PageSelector::HandleModelChange (void)
-{
- UpdateAllPages();
-}
-
-
-
-
-SharedPageDescriptor PageSelector::GetMostRecentlySelectedPage (void) const
-{
- return mpMostRecentlySelectedPage;
-}
-
-
-
-
SharedPageDescriptor PageSelector::GetSelectionAnchor (void) const
{
return mpSelectionAnchor;
@@ -271,13 +325,13 @@ void PageSelector::CountSelectedPages (void)
-void PageSelector::EnableBroadcasting (bool bMakeSelectionVisible)
+void PageSelector::EnableBroadcasting (void)
{
if (mnBroadcastDisableLevel > 0)
mnBroadcastDisableLevel --;
if (mnBroadcastDisableLevel==0 && mbSelectionChangeBroadcastPending)
{
- mrController.GetSelectionManager()->SelectionHasChanged(bMakeSelectionVisible);
+ mrController.GetSelectionManager()->SelectionHasChanged();
mbSelectionChangeBroadcastPending = false;
}
}
@@ -302,7 +356,7 @@ void PageSelector::DisableBroadcasting (void)
for (int nIndex=0; nIndex<nPageCount; nIndex++)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
- if (pDescriptor.get()!=NULL && pDescriptor->IsSelected())
+ if (pDescriptor.get()!=NULL && pDescriptor->HasState(PageDescriptor::ST_Selected))
pSelection->push_back(pDescriptor->GetPage());
}
@@ -312,16 +366,126 @@ void PageSelector::DisableBroadcasting (void)
-void PageSelector::SetPageSelection (const ::boost::shared_ptr<PageSelection>& rpSelection)
+void PageSelector::SetPageSelection (
+ const ::boost::shared_ptr<PageSelection>& rpSelection,
+ const bool bUpdateCurrentPage)
{
PageSelection::const_iterator iPage;
for (iPage=rpSelection->begin(); iPage!=rpSelection->end(); ++iPage)
SelectPage(*iPage);
+ if (bUpdateCurrentPage)
+ UpdateCurrentPage();
}
+void PageSelector::UpdateCurrentPage (const bool bUpdateOnlyWhenPending)
+{
+ if (mnUpdateLockCount > 0)
+ {
+ mbIsUpdateCurrentPagePending = true;
+ return;
+ }
+
+ if ( ! mbIsUpdateCurrentPagePending && bUpdateOnlyWhenPending)
+ return;
+
+ mbIsUpdateCurrentPagePending = false;
+
+ // Make the first selected page the current page.
+ const sal_Int32 nPageCount (GetPageCount());
+ for (sal_Int32 nIndex=0; nIndex<nPageCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
+ if (pDescriptor && pDescriptor->HasState(PageDescriptor::ST_Selected))
+ {
+ // Switching the current slide normally sets also the selection
+ // to just the new current slide. To prevent that, we store
+ // (and at the end of this scope restore) the current selection.
+ ::boost::shared_ptr<PageSelection> pSelection (GetPageSelection());
+
+ mrController.GetCurrentSlideManager()->SwitchCurrentSlide(pDescriptor);
+
+ // Restore the selection and prevent a recursive call to
+ // UpdateCurrentPage().
+ SetPageSelection(pSelection, false);
+ return;
+ }
+ }
+
+ // No page is selected. Do not change the current slide.
+}
+
+
+
+
+//===== PageSelector::UpdateLock ==============================================
+
+PageSelector::UpdateLock::UpdateLock (SlideSorter& rSlideSorter)
+ : mpSelector(&rSlideSorter.GetController().GetPageSelector())
+{
+ ++mpSelector->mnUpdateLockCount;
+}
+
+
+
+
+PageSelector::UpdateLock::UpdateLock (PageSelector& rSelector)
+ : mpSelector(&rSelector)
+{
+ ++mpSelector->mnUpdateLockCount;
+}
+
+
+
+
+PageSelector::UpdateLock::~UpdateLock (void)
+{
+ Release();
+}
+
+void PageSelector::UpdateLock::Release (void)
+{
+ if (mpSelector != NULL)
+ {
+ --mpSelector->mnUpdateLockCount;
+ OSL_ASSERT(mpSelector->mnUpdateLockCount >= 0);
+ if (mpSelector->mnUpdateLockCount == 0)
+ mpSelector->UpdateCurrentPage(true);
+
+ mpSelector = NULL;
+ }
+}
+
+
+
+
+//===== PageSelector::BroadcastLock ==============================================
+
+PageSelector::BroadcastLock::BroadcastLock (SlideSorter& rSlideSorter)
+ : mrSelector(rSlideSorter.GetController().GetPageSelector())
+{
+ mrSelector.DisableBroadcasting();
+}
+
+
+
+
+PageSelector::BroadcastLock::BroadcastLock (PageSelector& rSelector)
+ : mrSelector(rSelector)
+{
+ mrSelector.DisableBroadcasting();
+}
+
+
+
+
+PageSelector::BroadcastLock::~BroadcastLock (void)
+{
+ mrSelector.EnableBroadcasting();
+}
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsProperties.cxx b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
index 02168ca4eb2d..88a17a8444ac 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsProperties.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsProperties.cxx
@@ -38,13 +38,16 @@ Properties::Properties (void)
mbIsShowSelection(true),
mbIsShowFocus(true),
mbIsCenterSelection(false),
- mbIsSmoothSelectionScrolling(false),
+ mbIsSmoothSelectionScrolling(true),
mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(true),
maBackgroundColor(Application::GetSettings().GetStyleSettings().GetWindowColor()),
maTextColor(Application::GetSettings().GetStyleSettings().GetActiveTextColor()),
- maSelectionColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
+ maSelectionColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()),
maHighlightColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor()),
- mbIsUIReadOnly(false)
+ mbIsUIReadOnly(false),
+ mbIsOnlyPreviewTriggersMouseOver(true),
+ mbIsHighContrastModeActive(
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode())
{
}
@@ -58,6 +61,19 @@ Properties::~Properties (void)
+void Properties::HandleDataChangeEvent (void)
+{
+ maBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor();
+ maTextColor = Application::GetSettings().GetStyleSettings().GetActiveTextColor();
+ maSelectionColor = Application::GetSettings().GetStyleSettings().GetHighlightColor();
+ maHighlightColor = Application::GetSettings().GetStyleSettings().GetMenuHighlightColor();
+ mbIsHighContrastModeActive
+ = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+}
+
+
+
+
bool Properties::IsHighlightCurrentSlide (void) const
{
return mbIsHighlightCurrentSlide;
@@ -231,6 +247,30 @@ void Properties::SetUIReadOnly (const bool bIsUIReadOnly)
}
+
+
+bool Properties::IsOnlyPreviewTriggersMouseOver (void) const
+{
+ return mbIsOnlyPreviewTriggersMouseOver;
+}
+
+
+
+
+void Properties::SetOnlyPreviewTriggersMouseOver (const bool bFlag)
+{
+ mbIsOnlyPreviewTriggersMouseOver = bFlag;
+}
+
+
+
+
+bool Properties::IsHighContrastModeActive (void) const
+{
+ return mbIsHighContrastModeActive;
+}
+
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index 0785f786366f..71ac9450ca21 100644
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -32,11 +32,12 @@
#include "SlideSorter.hxx"
#include "controller/SlideSorterController.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
+#include "view/SlsTheme.hxx"
#include "Window.hxx"
#include "sdpage.hxx"
@@ -52,11 +53,15 @@ ScrollBarManager::ScrollBarManager (SlideSorter& rSlideSorter)
mpVerticalScrollBar(mrSlideSorter.GetVerticalScrollBar()),
mnHorizontalPosition (0),
mnVerticalPosition (0),
- maScrollBorder (10,10),
- mnHorizontalScrollFactor (0.1),
- mnVerticalScrollFactor (0.1),
+ maScrollBorder (20,20),
+ mnHorizontalScrollFactor (0.15),
+ mnVerticalScrollFactor (0.25),
mpScrollBarFiller(mrSlideSorter.GetScrollBarFiller()),
- mpContentWindow(mrSlideSorter.GetContentWindow())
+ maAutoScrollTimer(),
+ maAutoScrollOffset(0,0),
+ mbIsAutoScrollActive(false),
+ mpContentWindow(mrSlideSorter.GetContentWindow()),
+ maAutoScrollFunctor()
{
// Hide the scroll bars by default to prevent display errors while
// switching between view shells: In the short time between initiating
@@ -67,7 +72,7 @@ ScrollBarManager::ScrollBarManager (SlideSorter& rSlideSorter)
mpVerticalScrollBar->Hide();
mpScrollBarFiller->Hide();
- maAutoScrollTimer.SetTimeout(50);
+ maAutoScrollTimer.SetTimeout(25);
maAutoScrollTimer.SetTimeoutHdl (
LINK(this, ScrollBarManager, AutoScrollTimeoutHandler));
}
@@ -92,17 +97,15 @@ void ScrollBarManager::LateInitialization (void)
void ScrollBarManager::Connect (void)
{
if (mpVerticalScrollBar != NULL)
+ {
mpVerticalScrollBar->SetScrollHdl (
- LINK(
- this,
- ScrollBarManager,
- VerticalScrollBarHandler));
+ LINK(this, ScrollBarManager, VerticalScrollBarHandler));
+ }
if (mpHorizontalScrollBar != NULL)
- mpHorizontalScrollBar->SetScrollHdl (
- LINK(
- this,
- ScrollBarManager,
- HorizontalScrollBarHandler));
+ {
+ mpHorizontalScrollBar->SetScrollHdl(
+ LINK(this, ScrollBarManager, HorizontalScrollBarHandler));
+ }
}
@@ -111,9 +114,13 @@ void ScrollBarManager::Connect (void)
void ScrollBarManager::Disconnect (void)
{
if (mpVerticalScrollBar != NULL)
+ {
mpVerticalScrollBar->SetScrollHdl (Link());
+ }
if (mpHorizontalScrollBar != NULL)
+ {
mpHorizontalScrollBar->SetScrollHdl (Link());
+ }
}
@@ -130,12 +137,24 @@ void ScrollBarManager::Disconnect (void)
window changes and a second call to the layouter becomes necessary.
That call is made anyway after this method returns.
*/
-Rectangle ScrollBarManager::PlaceScrollBars (const Rectangle& rAvailableArea)
+Rectangle ScrollBarManager::PlaceScrollBars (
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed)
{
- Rectangle aRemainingSpace (DetermineScrollBarVisibilities(rAvailableArea));
- PlaceHorizontalScrollBar (rAvailableArea);
- PlaceVerticalScrollBar (rAvailableArea);
- PlaceFiller (rAvailableArea);
+ Rectangle aRemainingSpace (DetermineScrollBarVisibilities(
+ rAvailableArea,
+ bIsHorizontalScrollBarAllowed,
+ bIsVerticalScrollBarAllowed));
+
+ if (mpHorizontalScrollBar!=NULL && mpHorizontalScrollBar->IsVisible())
+ PlaceHorizontalScrollBar (rAvailableArea);
+
+ if (mpVerticalScrollBar!=NULL && mpVerticalScrollBar->IsVisible())
+ PlaceVerticalScrollBar (rAvailableArea);
+
+ if (mpScrollBarFiller!=NULL && mpScrollBarFiller->IsVisible())
+ PlaceFiller (rAvailableArea);
return aRemainingSpace;
}
@@ -145,25 +164,21 @@ Rectangle ScrollBarManager::PlaceScrollBars (const Rectangle& rAvailableArea)
void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea)
{
- if (mpHorizontalScrollBar != NULL
- && mpHorizontalScrollBar->IsVisible())
- {
- // Save the current relative position.
- mnHorizontalPosition = double(mpHorizontalScrollBar->GetThumbPos())
- / double(mpHorizontalScrollBar->GetRange().Len());
-
- // Place the scroll bar.
- Size aScrollBarSize (mpHorizontalScrollBar->GetSizePixel());
- mpHorizontalScrollBar->SetPosSizePixel (
- Point(aAvailableArea.Left(),
- aAvailableArea.Bottom()-aScrollBarSize.Height()+1),
- Size (aAvailableArea.GetWidth() - GetVerticalScrollBarWidth(),
- aScrollBarSize.Height()));
-
- // Restore the relative position.
- mpHorizontalScrollBar->SetThumbPos(
- (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len()));
- }
+ // Save the current relative position.
+ mnHorizontalPosition = double(mpHorizontalScrollBar->GetThumbPos())
+ / double(mpHorizontalScrollBar->GetRange().Len());
+
+ // Place the scroll bar.
+ Size aScrollBarSize (mpHorizontalScrollBar->GetSizePixel());
+ mpHorizontalScrollBar->SetPosSizePixel (
+ Point(aAvailableArea.Left(),
+ aAvailableArea.Bottom()-aScrollBarSize.Height()+1),
+ Size (aAvailableArea.GetWidth() - GetVerticalScrollBarWidth(),
+ aScrollBarSize.Height()));
+
+ // Restore the relative position.
+ mpHorizontalScrollBar->SetThumbPos(
+ (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len()));
}
@@ -171,26 +186,17 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const Rectangle& aAvailableArea
void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea)
{
- if (mpVerticalScrollBar != NULL
- && mpVerticalScrollBar->IsVisible())
- {
- view::Layouter::DoublePoint aLayouterPosition
- = mrSlideSorter.GetView().GetLayouter().ConvertModelToLayouterCoordinates (
- Point (0, mpVerticalScrollBar->GetThumbPos()));
-
- // Place the scroll bar.
- Size aScrollBarSize (mpVerticalScrollBar->GetSizePixel());
- Point aPosition (aArea.Right()-aScrollBarSize.Width()+1, aArea.Top());
- Size aSize (aScrollBarSize.Width(), aArea.GetHeight() - GetHorizontalScrollBarHeight());
- mpVerticalScrollBar->SetPosSizePixel(aPosition, aSize);
-
- // Restore the position.
- mpVerticalScrollBar->SetThumbPos(
- mrSlideSorter.GetView().GetLayouter().ConvertLayouterToModelCoordinates(
- aLayouterPosition).Y());
- mnVerticalPosition = double(mpVerticalScrollBar->GetThumbPos())
- / double(mpVerticalScrollBar->GetRange().Len());
- }
+ const double nThumbPosition (mpVerticalScrollBar->GetThumbPos());
+
+ // Place the scroll bar.
+ Size aScrollBarSize (mpVerticalScrollBar->GetSizePixel());
+ Point aPosition (aArea.Right()-aScrollBarSize.Width()+1, aArea.Top());
+ Size aSize (aScrollBarSize.Width(), aArea.GetHeight() - GetHorizontalScrollBarHeight());
+ mpVerticalScrollBar->SetPosSizePixel(aPosition, aSize);
+
+ // Restore the position.
+ mpVerticalScrollBar->SetThumbPos(nThumbPosition);
+ mnVerticalPosition = nThumbPosition / double(mpVerticalScrollBar->GetRange().Len());
}
@@ -198,23 +204,13 @@ void ScrollBarManager::PlaceVerticalScrollBar (const Rectangle& aArea)
void ScrollBarManager::PlaceFiller (const Rectangle& aArea)
{
- // Place the filler when both scroll bars are visible.
- if (mpHorizontalScrollBar != NULL
- && mpVerticalScrollBar != NULL
- && mpHorizontalScrollBar->IsVisible()
- && mpVerticalScrollBar->IsVisible())
- {
- mpScrollBarFiller->SetPosSizePixel(
- Point(
- aArea.Right()-mpVerticalScrollBar->GetSizePixel().Width()+1,
- aArea.Bottom()-mpHorizontalScrollBar->GetSizePixel().Height()+1),
- Size (
- mpVerticalScrollBar->GetSizePixel().Width(),
- mpHorizontalScrollBar->GetSizePixel().Height()));
- mpScrollBarFiller->Show();
- }
- else
- mpScrollBarFiller->Hide();
+ mpScrollBarFiller->SetPosSizePixel(
+ Point(
+ aArea.Right()-mpVerticalScrollBar->GetSizePixel().Width()+1,
+ aArea.Bottom()-mpHorizontalScrollBar->GetSizePixel().Height()+1),
+ Size (
+ mpVerticalScrollBar->GetSizePixel().Width(),
+ mpHorizontalScrollBar->GetSizePixel().Height()));
}
@@ -223,7 +219,7 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea)
void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScrolling)
{
Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
- ::sd::Window* pWindow = mrSlideSorter.GetView().GetWindow();
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
Size aWindowModelSize (pWindow->PixelToLogic(pWindow->GetSizePixel()));
// The horizontal scroll bar is only shown when the window is
@@ -307,16 +303,15 @@ IMPL_LINK(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar)
if (pScrollBar!=NULL
&& pScrollBar==mpVerticalScrollBar.get()
&& pScrollBar->IsVisible()
- && mrSlideSorter.GetView().GetWindow()!=NULL)
+ && mrSlideSorter.GetContentWindow()!=NULL)
{
double nRelativePosition = double(pScrollBar->GetThumbPos())
/ double(pScrollBar->GetRange().Len());
mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- -1,
- nRelativePosition);
+ mrSlideSorter.GetContentWindow()->SetVisibleXY(-1, nRelativePosition);
+ mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking();
}
- return TRUE;
+ return sal_True;
}
@@ -327,14 +322,15 @@ IMPL_LINK(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar)
if (pScrollBar!=NULL
&& pScrollBar==mpHorizontalScrollBar.get()
&& pScrollBar->IsVisible()
- && mrSlideSorter.GetView().GetWindow()!=NULL)
+ && mrSlideSorter.GetContentWindow()!=NULL)
{
double nRelativePosition = double(pScrollBar->GetThumbPos())
/ double(pScrollBar->GetRange().Len());
mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (nRelativePosition, -1);
+ mrSlideSorter.GetContentWindow()->SetVisibleXY(nRelativePosition, -1);
+ mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking();
}
- return TRUE;
+ return sal_True;
}
@@ -347,7 +343,7 @@ void ScrollBarManager::SetWindowOrigin (
mnHorizontalPosition = nHorizontalPosition;
mnVerticalPosition = nVerticalPosition;
- ::sd::Window* pWindow = mrSlideSorter.GetView().GetWindow();
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
Size aViewSize (pWindow->GetViewSize());
Point aOrigin (
(long int) (mnHorizontalPosition * aViewSize.Width()),
@@ -372,31 +368,42 @@ void ScrollBarManager::SetWindowOrigin (
b) when not showing a scroll bar the area used by the page objects fits
into the available area in the scroll bars orientation.
*/
-Rectangle ScrollBarManager::DetermineScrollBarVisibilities (const Rectangle& rAvailableArea)
+Rectangle ScrollBarManager::DetermineScrollBarVisibilities (
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed)
{
// Test which combination of scroll bars is the best.
bool bShowHorizontal = false;
bool bShowVertical = false;
- do
+ if (mrSlideSorter.GetModel().GetPageCount() == 0)
{
- if (mrSlideSorter.GetModel().GetPageCount() == 0)
- // No pages => no scroll bars.
- break;
-
- if (TestScrollBarVisibilities(bShowHorizontal=false, bShowVertical=false, rAvailableArea))
- break;
- if (TestScrollBarVisibilities(bShowHorizontal=true, bShowVertical=false, rAvailableArea))
- break;
- if (TestScrollBarVisibilities(bShowHorizontal=false, bShowVertical=true, rAvailableArea))
- break;
- if (TestScrollBarVisibilities(bShowHorizontal=true, bShowVertical=true, rAvailableArea))
- break;
+ // No pages => no scroll bars.
+ }
+ else if (TestScrollBarVisibilities(false, false, rAvailableArea))
+ {
+ // Nothing to be done.
+ }
+ else if (bIsHorizontalScrollBarAllowed
+ && TestScrollBarVisibilities(true, false, rAvailableArea))
+ {
+ bShowHorizontal = true;
+ }
+ else if (bIsVerticalScrollBarAllowed
+ && TestScrollBarVisibilities(false, true, rAvailableArea))
+ {
+ bShowVertical = true;
+ }
+ else
+ {
+ bShowHorizontal = true;
+ bShowVertical = true;
}
- while (false);
// Make the visibility of the scroll bars permanent.
mpVerticalScrollBar->Show(bShowVertical);
mpHorizontalScrollBar->Show(bShowHorizontal);
+ mpScrollBarFiller->Show(bShowVertical && bShowHorizontal);
// Adapt the remaining space accordingly.
Rectangle aRemainingSpace (rAvailableArea);
@@ -416,7 +423,7 @@ bool ScrollBarManager::TestScrollBarVisibilities (
bool bVerticalScrollBarVisible,
const Rectangle& rAvailableArea)
{
- bool bAreVisibilitiesOK = true;
+ model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
// Adapt the available size by subtracting the sizes of the scroll bars
// visible in this combination.
@@ -428,74 +435,81 @@ bool ScrollBarManager::TestScrollBarVisibilities (
// Tell the view to rearrange its page objects and check whether the
// page objects can be shown without clipping.
- bool bRearrangeSuccess (false);
- if (mrSlideSorter.GetView().GetOrientation() == view::SlideSorterView::HORIZONTAL)
- {
- bRearrangeSuccess = mrSlideSorter.GetView().GetLayouter().RearrangeHorizontal (
- aBrowserSize,
- mrSlideSorter.GetModel().GetPageDescriptor(0)->GetPage()->GetSize(),
- mpContentWindow.get(),
- mrSlideSorter.GetModel().GetPageCount());
- }
- else
- {
- bRearrangeSuccess = mrSlideSorter.GetView().GetLayouter().RearrangeVertical (
- aBrowserSize,
- mrSlideSorter.GetModel().GetPageDescriptor(0)->GetPage()->GetSize(),
- mpContentWindow.get());
- }
+ bool bRearrangeSuccess (mrSlideSorter.GetView().GetLayouter().Rearrange (
+ mrSlideSorter.GetView().GetOrientation(),
+ aBrowserSize,
+ rModel.GetPageDescriptor(0)->GetPage()->GetSize(),
+ rModel.GetPageCount()));
if (bRearrangeSuccess)
{
- Size aPageSize = mrSlideSorter.GetView().GetLayouter().GetPageBox (
- mrSlideSorter.GetModel().GetPageCount()).GetSize();
+ Size aPageSize = mrSlideSorter.GetView().GetLayouter().GetTotalBoundingBox().GetSize();
Size aWindowModelSize = mpContentWindow->PixelToLogic(aBrowserSize);
- bool bHorizontallyClipped = (aPageSize.Width() > aWindowModelSize.Width());
- bool bVerticallyClipped = (aPageSize.Height() > aWindowModelSize.Height());
- bAreVisibilitiesOK = (bHorizontallyClipped == bHorizontalScrollBarVisible)
- && (bVerticallyClipped == bVerticalScrollBarVisible);
+ // The content may be clipped, i.e. not fully visible, in one
+ // direction only when the scroll bar is visible in that direction.
+ if (aPageSize.Width() > aWindowModelSize.Width())
+ if ( ! bHorizontalScrollBarVisible)
+ return false;
+ if (aPageSize.Height() > aWindowModelSize.Height())
+ if ( ! bVerticalScrollBarVisible)
+ return false;
+
+ return true;
}
else
- bAreVisibilitiesOK = false;
-
- return bAreVisibilitiesOK;
+ return false;
}
-void ScrollBarManager::SetTop (const sal_Int32 nNewTop)
+void ScrollBarManager::SetTopLeft (const Point aNewTopLeft)
{
- if (mpVerticalScrollBar != NULL
- && mpVerticalScrollBar->GetThumbPos() != nNewTop)
- {
- // Flush pending repaints before scrolling to avoid temporary artifacts.
- mrSlideSorter.GetView().GetWindow()->Update();
+ if (( ! mpVerticalScrollBar
+ || mpVerticalScrollBar->GetThumbPos() == aNewTopLeft.Y())
+ && ( ! mpHorizontalScrollBar
+ || mpHorizontalScrollBar->GetThumbPos() == aNewTopLeft.X()))
+ return;
+
+ // Flush pending repaints before scrolling to avoid temporary artifacts.
+ mrSlideSorter.GetContentWindow()->Update();
- mpVerticalScrollBar->SetThumbPos(nNewTop);
- mnVerticalPosition = double(nNewTop) / double(mpVerticalScrollBar->GetRange().Len());
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- mnHorizontalPosition, mnVerticalPosition);
+ if (mpVerticalScrollBar)
+ {
+ mpVerticalScrollBar->SetThumbPos(aNewTopLeft.Y());
+ mnVerticalPosition = aNewTopLeft.Y() / double(mpVerticalScrollBar->GetRange().Len());
+ }
+ if (mpHorizontalScrollBar)
+ {
+ mpHorizontalScrollBar->SetThumbPos(aNewTopLeft.X());
+ mnHorizontalPosition = aNewTopLeft.X() / double(mpHorizontalScrollBar->GetRange().Len());
}
+
+ mrSlideSorter.GetContentWindow()->SetVisibleXY(mnHorizontalPosition, mnVerticalPosition);
+ mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
}
-void ScrollBarManager::SetLeft (const sal_Int32 nNewLeft)
+sal_Int32 ScrollBarManager::GetTop (void) const
{
- if (mpHorizontalScrollBar != NULL
- && mpHorizontalScrollBar->GetThumbPos() != nNewLeft)
- {
- // Flush pending repaints before scrolling to avoid temporary artifacts.
- mrSlideSorter.GetView().GetWindow()->Update();
+ if (mpVerticalScrollBar != NULL)
+ return mpVerticalScrollBar->GetThumbPos();
+ else
+ return 0;
+}
- mpHorizontalScrollBar->SetThumbPos(nNewLeft);
- mnHorizontalPosition = double(nNewLeft) / double(mpHorizontalScrollBar->GetRange().Len());
- mrSlideSorter.GetView().GetWindow()->SetVisibleXY (
- mnHorizontalPosition, mnVerticalPosition);
- }
+
+
+
+sal_Int32 ScrollBarManager::GetLeft (void) const
+{
+ if (mpHorizontalScrollBar != NULL)
+ return mpHorizontalScrollBar->GetThumbPos();
+ else
+ return 0;
}
@@ -525,7 +539,7 @@ int ScrollBarManager::GetHorizontalScrollBarHeight (void) const
void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
{
- ::sd::Window* pWindow = mrSlideSorter.GetView().GetWindow();
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
int nDx = 0;
int nDy = 0;
@@ -580,14 +594,16 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition)
-bool ScrollBarManager::AutoScroll (const Point& rMouseWindowPosition)
+bool ScrollBarManager::AutoScroll (
+ const Point& rMouseWindowPosition,
+ const ::boost::function<void(void)>& rAutoScrollFunctor)
{
- CalcAutoScrollOffset (rMouseWindowPosition);
- bool bResult = RepeatAutoScroll();
- if (bResult)
- {
- maAutoScrollTimer.Start();
- }
+ maAutoScrollFunctor = rAutoScrollFunctor;
+ CalcAutoScrollOffset(rMouseWindowPosition);
+ bool bResult (true);
+ if ( ! mbIsAutoScrollActive)
+ bResult = RepeatAutoScroll();
+
return bResult;
}
@@ -597,6 +613,7 @@ bool ScrollBarManager::AutoScroll (const Point& rMouseWindowPosition)
void ScrollBarManager::StopAutoScroll (void)
{
maAutoScrollTimer.Stop();
+ mbIsAutoScrollActive = false;
}
@@ -608,13 +625,23 @@ bool ScrollBarManager::RepeatAutoScroll (void)
{
if (mrSlideSorter.GetViewShell() != NULL)
{
- mrSlideSorter.GetViewShell()->ScrollLines(
+ mrSlideSorter.GetViewShell()->Scroll(
maAutoScrollOffset.Width(),
- maAutoScrollOffset.Height());
+ maAutoScrollOffset.Height());
+ mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
+
+ if (maAutoScrollFunctor)
+ maAutoScrollFunctor();
+
+ mbIsAutoScrollActive = true;
+ maAutoScrollTimer.Start();
+
return true;
}
}
+ maAutoScrollFunctor = ::boost::function<void(void)>();
+ mbIsAutoScrollActive = false;
return false;
}
@@ -629,6 +656,85 @@ IMPL_LINK(ScrollBarManager, AutoScrollTimeoutHandler, Timer *, EMPTYARG)
}
+
+
+void ScrollBarManager::Scroll(
+ const Orientation eOrientation,
+ const Unit eUnit,
+ const sal_Int32 nDistance)
+{
+ bool bIsVertical (false);
+ switch (eOrientation)
+ {
+ case Orientation_Horizontal: bIsVertical = false; break;
+ case Orientation_Vertical: bIsVertical = true; break;
+ default:
+ OSL_ASSERT(eOrientation==Orientation_Horizontal || eOrientation==Orientation_Vertical);
+ return;
+ }
+
+ Point aNewTopLeft (
+ mpHorizontalScrollBar ? mpHorizontalScrollBar->GetThumbPos() : 0,
+ mpVerticalScrollBar ? mpVerticalScrollBar->GetThumbPos() : 0);
+ switch (eUnit)
+ {
+ case Unit_Pixel:
+ if (bIsVertical)
+ aNewTopLeft.Y() += nDistance;
+ else
+ aNewTopLeft.X() += nDistance;
+ break;
+
+ case Unit_Slide:
+ {
+ view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
+
+ // Calculate estimate of new location.
+ if (bIsVertical)
+ aNewTopLeft.Y() += nDistance * rLayouter.GetPageObjectSize().Height();
+ else
+ aNewTopLeft.X() += nDistance * rLayouter.GetPageObjectSize().Width();
+
+ // Adapt location to show whole slides.
+ if (bIsVertical)
+ if (nDistance > 0)
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X(), aNewTopLeft.Y()+mpVerticalScrollBar->GetVisibleSize()),
+ true));
+ aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Bottom()
+ - mpVerticalScrollBar->GetVisibleSize();
+ }
+ else
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X(), aNewTopLeft.Y()),
+ true));
+ aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Top();
+ }
+ else
+ if (nDistance > 0)
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X()+mpVerticalScrollBar->GetVisibleSize(), aNewTopLeft.Y()),
+ true));
+ aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Right()
+ - mpVerticalScrollBar->GetVisibleSize();
+ }
+ else
+ {
+ const sal_Int32 nIndex (rLayouter.GetIndexAtPoint(
+ Point(aNewTopLeft.X(), aNewTopLeft.Y()),
+ true));
+ aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Left();
+ }
+ }
+ }
+ mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking();
+ SetTopLeft(aNewTopLeft);
+}
+
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
index 905c3c3a7557..174c3b944ab3 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
@@ -55,7 +55,7 @@ SelectionCommand::SelectionCommand (
-void SelectionCommand::AddSlide (USHORT nPageIndex)
+void SelectionCommand::AddSlide (sal_uInt16 nPageIndex)
{
maPagesToSelect.push_back(nPageIndex);
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
index 8ca7f727ffa1..1bc80260ad72 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
@@ -68,7 +68,7 @@ public:
/** Remember the specified page to be selected when this command is
executed.
*/
- void AddSlide (USHORT nPageIndex);
+ void AddSlide (sal_uInt16 nPageIndex);
/** Execute the command and select the pages added by previous calls to
AddPages() and AddPage().
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 2d4952758155..c52581f990a8 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -32,38 +32,49 @@
#include "SlideSorter.hxx"
#include "SlideSorterViewShell.hxx"
+#include "SlsDragAndDropContext.hxx"
+#include "controller/SlsTransferable.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsFocusManager.hxx"
#include "controller/SlsScrollBarManager.hxx"
#include "controller/SlsClipboard.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
#include "controller/SlsSelectionManager.hxx"
#include "controller/SlsProperties.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsViewOverlay.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsButtonBar.hxx"
#include "framework/FrameworkHelper.hxx"
#include "ViewShellBase.hxx"
#include "DrawController.hxx"
-#include <vcl/sound.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/dispatch.hxx>
-#include <svx/svdpagv.hxx>
-#include <vcl/msgbox.hxx>
#include "Window.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
+#include "DrawDocShell.hxx"
+#include "sdxfer.hxx"
#include "ViewShell.hxx"
#include "ViewShellBase.hxx"
#include "FrameView.hxx"
#include "app.hrc"
#include "sdresid.hxx"
#include "strings.hrc"
+#include <vcl/sound.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+#include <svx/svdpagv.hxx>
+#include <vcl/msgbox.hxx>
+#include <svx/svxids.hrc>
+#include <boost/bind.hpp>
+#include <boost/optional.hpp>
namespace {
static const sal_uInt32 SINGLE_CLICK (0x00000001);
@@ -74,109 +85,304 @@ static const sal_uInt32 MIDDLE_BUTTON (0x00000040);
static const sal_uInt32 BUTTON_DOWN (0x00000100);
static const sal_uInt32 BUTTON_UP (0x00000200);
static const sal_uInt32 MOUSE_MOTION (0x00000400);
+static const sal_uInt32 MOUSE_DRAG (0x00000800);
// The rest leaves the lower 16 bit untouched so that it can be used with
// key codes.
static const sal_uInt32 OVER_SELECTED_PAGE (0x00010000);
static const sal_uInt32 OVER_UNSELECTED_PAGE (0x00020000);
static const sal_uInt32 OVER_FADE_INDICATOR (0x00040000);
-static const sal_uInt32 SHIFT_MODIFIER (0x00100000);
-static const sal_uInt32 CONTROL_MODIFIER (0x00200000);
-static const sal_uInt32 SUBSTITUTION_VISIBLE (0x01000000);
-static const sal_uInt32 RECTANGLE_VISIBLE (0x02000000);
+static const sal_uInt32 OVER_BUTTON_AREA (0x00080000);
+static const sal_uInt32 OVER_BUTTON (0x00100000);
+static const sal_uInt32 SHIFT_MODIFIER (0x00200000);
+static const sal_uInt32 CONTROL_MODIFIER (0x00400000);
static const sal_uInt32 KEY_EVENT (0x10000000);
// Some absent events are defined so they can be expressed explicitly.
static const sal_uInt32 NO_MODIFIER (0x00000000);
-static const sal_uInt32 SUBSTITUTION_NOT_VISIBLE (0x00000000);
static const sal_uInt32 NOT_OVER_PAGE (0x00000000);
+// Masks
+static const sal_uInt32 MODIFIER_MASK (SHIFT_MODIFIER | CONTROL_MODIFIER);
+static const sal_uInt32 BUTTON_MASK (LEFT_BUTTON | RIGHT_BUTTON | MIDDLE_BUTTON);
} // end of anonymous namespace
+
+// Define some macros to make the following switch statement more readable.
+#define ANY_MODIFIER(code) \
+ code|NO_MODIFIER: \
+ case code|SHIFT_MODIFIER: \
+ case code|CONTROL_MODIFIER
+
namespace sd { namespace slidesorter { namespace controller {
-class SelectionFunction::SubstitutionHandler
+//===== SelectionFunction::EventDescriptor ====================================
+
+class SelectionFunction::EventDescriptor
{
public:
- SubstitutionHandler (SlideSorter& rSlideSorter);
- ~SubstitutionHandler (void);
+ Point maMousePosition;
+ Point maMouseModelPosition;
+ model::SharedPageDescriptor mpHitDescriptor;
+ SdrPage* mpHitPage;
+ sal_uInt32 mnEventCode;
+ bool mbIsOverButton;
+ InsertionIndicatorHandler::Mode meDragMode;
+ bool mbMakeSelectionVisible;
+ bool mbIsLeaving;
+
+ EventDescriptor (
+ sal_uInt32 nEventType,
+ const MouseEvent& rEvent,
+ SlideSorter& rSlideSorter);
+ EventDescriptor (
+ sal_uInt32 nEventType,
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction,
+ SlideSorter& rSlideSorter);
+ EventDescriptor (
+ const KeyEvent& rEvent,
+ SlideSorter& rSlideSorter);
+
+ void SetDragMode (const InsertionIndicatorHandler::Mode eMode);
- /** Create a substitution display of the currently selected pages and
- use the given position as the anchor point.
+private:
+ /** Compute a numerical code that describes a mouse event and that can
+ be used for fast look up of the appropriate reaction.
*/
- void Start (const Point& rMouseModelPosition);
+ sal_uInt32 EncodeMouseEvent (const MouseEvent& rEvent) const;
- /** Move the substitution display by the distance the mouse has
- travelled since the last call to this method or to
- CreateSubstitution(). The given point becomes the new anchor.
+ /** Compute a numerical code that describes a key event and that can
+ be used for fast look up of the appropriate reaction.
*/
- void UpdatePosition (const Point& rMouseModelPosition);
+ sal_uInt32 EncodeKeyEvent (const KeyEvent& rEvent) const;
- /** Move the substitution display of the currently selected pages.
+ /** Compute a numerical code that describes the current state like
+ whether the selection rectangle is visible or whether the page under
+ the mouse or the one that has the focus is selected.
*/
- void Process (void);
+ sal_uInt32 EncodeState (void) const;
+};
- void End (void);
- bool HasBeenMoved (void) const;
-private:
+
+//===== SelectionFunction::ModeHandler ========================================
+
+class SelectionFunction::ModeHandler
+{
+public:
+ ModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const bool bIsMouseOverIndicatorAllowed);
+ virtual ~ModeHandler (void);
+
+ virtual Mode GetMode (void) const = 0;
+ virtual void Abort (void) = 0;
+ virtual void ProcessEvent (EventDescriptor& rDescriptor);
+
+ /** Set the selection to exactly the specified page and also set it as
+ the current page.
+ */
+ void SetCurrentPage (const model::SharedPageDescriptor& rpDescriptor);
+
+ /// Deselect all pages.
+ void DeselectAllPages (void);
+ void SelectOnePage (const model::SharedPageDescriptor& rpDescriptor);
+
+ /** When the view on which this selection function is working is the
+ main view then the view is switched to the regular editing view.
+ */
+ void SwitchView (const model::SharedPageDescriptor& rpDescriptor);
+
+ void StartDrag (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode);
+
+ bool IsMouseOverIndicatorAllowed (void) const;
+
+protected:
SlideSorter& mrSlideSorter;
+ SelectionFunction& mrSelectionFunction;
- bool mbHasBeenMoved;
+ virtual bool ProcessButtonDownEvent (EventDescriptor& rDescriptor);
+ virtual bool ProcessButtonUpEvent (EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (EventDescriptor& rDescriptor);
+ virtual bool ProcessDragEvent (EventDescriptor& rDescriptor);
+ virtual bool HandleUnprocessedEvent (EventDescriptor& rDescriptor);
- /** Determine whether there is a) a substitution and b) its insertion at
- the current position of the insertion marker would alter the
- document. This would be the case when the substitution has been
- moved or is not consecutive.
+ void ReprocessEvent (EventDescriptor& rDescriptor);
+
+private:
+ const bool mbIsMouseOverIndicatorAllowed;
+};
+
+
+/** This is the default handler for processing events. It activates the
+ multi selection or drag-and-drop when the right conditions are met.
+*/
+class NormalModeHandler : public SelectionFunction::ModeHandler
+{
+public:
+ NormalModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction);
+ virtual ~NormalModeHandler (void);
+
+ virtual SelectionFunction::Mode GetMode (void) const;
+ virtual void Abort (void);
+
+ void ResetButtonDownLocation (void);
+
+protected:
+ virtual bool ProcessButtonDownEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor);
+
+private:
+ ::boost::optional<Point> maButtonDownLocation;
+
+ /** Select all pages between and including the selection anchor and the
+ specified page.
*/
- bool IsSubstitutionInsertionNonTrivial (void) const;
+ void RangeSelect (const model::SharedPageDescriptor& rpDescriptor);
};
-class SelectionFunction::EventDescriptor
+/** Handle events during a multi selection, which typically is started by
+ pressing the left mouse button when not over a page.
+*/
+class MultiSelectionModeHandler : public SelectionFunction::ModeHandler
{
public:
+ /** Start a rectangle selection at the given position.
+ */
+ MultiSelectionModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMouseModelPosition,
+ const sal_uInt32 nEventCode);
+ virtual ~MultiSelectionModeHandler (void);
- Point maMousePosition;
- Point maMouseModelPosition;
- ::boost::weak_ptr<model::PageDescriptor> mpHitDescriptor;
- SdrPage* mpHitPage;
- sal_uInt32 mnEventCode;
+ virtual SelectionFunction::Mode GetMode (void) const;
+ virtual void Abort (void);
+ virtual void ProcessEvent (SelectionFunction::EventDescriptor& rDescriptor);
- EventDescriptor (
- sal_uInt32 nEventType,
- const MouseEvent& rEvent,
- SlideSorter& rSlideSorter);
- EventDescriptor (
- const KeyEvent& rEvent,
- SlideSorter& rSlideSorter);
+ enum SelectionMode { SM_Normal, SM_Add, SM_Toggle };
+
+ void SetSelectionMode (const SelectionMode eSelectionMode);
+ void SetSelectionModeFromModifier (const sal_uInt32 nEventCode);
+
+protected:
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool HandleUnprocessedEvent (SelectionFunction::EventDescriptor& rDescriptor);
+
+private:
+ SelectionMode meSelectionMode;
+ Point maSecondCorner;
+ Pointer maSavedPointer;
+ sal_Int32 mnAnchorIndex;
+ sal_Int32 mnSecondIndex;
+ view::ButtonBar::Lock maButtonBarLock;
+
+ virtual void UpdateModelPosition (const Point& rMouseModelPosition);
+ virtual void UpdateSelection (void);
+
+ /** Update the rectangle selection so that the given position becomes
+ the new second point of the selection rectangle.
+ */
+ void UpdatePosition (
+ const Point& rMousePosition,
+ const bool bAllowAutoScroll);
+
+ void UpdateSelectionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bIsInSelection) const;
+};
+
+
+/** Handle events during drag-and-drop.
+*/
+class DragAndDropModeHandler : public SelectionFunction::ModeHandler
+{
+public:
+ DragAndDropModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMousePosition,
+ ::Window* pWindow);
+ virtual ~DragAndDropModeHandler (void);
+
+ virtual SelectionFunction::Mode GetMode (void) const;
+ virtual void Abort (void);
+
+protected:
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor);
+
+private:
+ ::boost::scoped_ptr<DragAndDropContext> mpDragAndDropContext;
+};
+
+
+/** Handle events while the left mouse button is pressed over the button
+ bar.
+*/
+class ButtonModeHandler : public SelectionFunction::ModeHandler
+{
+public:
+ ButtonModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction);
+ virtual ~ButtonModeHandler (void);
+ virtual void Abort (void);
+
+ virtual SelectionFunction::Mode GetMode (void) const;
+
+protected:
+ virtual bool ProcessButtonDownEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor);
+ virtual bool ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor);
};
+
+
+//===== SelectionFunction =====================================================
+
TYPEINIT1(SelectionFunction, FuPoor);
SelectionFunction::SelectionFunction (
SlideSorter& rSlideSorter,
SfxRequest& rRequest)
- : SlideFunction (rSlideSorter, rRequest),
+ : FuPoor (
+ rSlideSorter.GetViewShell(),
+ rSlideSorter.GetContentWindow().get(),
+ &rSlideSorter.GetView(),
+ rSlideSorter.GetModel().GetDocument(),
+ rRequest),
mrSlideSorter(rSlideSorter),
mrController(mrSlideSorter.GetController()),
mbDragSelection(false),
maInsertionMarkerBox(),
mbProcessingMouseButtonDown(false),
- mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter))
+ mnShiftKeySelectionAnchor(-1),
+ mpModeHandler(new NormalModeHandler(rSlideSorter, *this))
{
- //af aDelayToScrollTimer.SetTimeout(50);
- aDragTimer.SetTimeoutHdl( LINK( this, SelectionFunction, DragSlideHdl ) );
}
+
+
+
SelectionFunction::~SelectionFunction (void)
{
- aDragTimer.Stop();
+ mpModeHandler.reset();
}
@@ -193,210 +399,187 @@ FunctionReference SelectionFunction::Create(
-BOOL SelectionFunction::MouseButtonDown (const MouseEvent& rEvent)
+sal_Bool SelectionFunction::MouseButtonDown (const MouseEvent& rEvent)
{
// remember button state for creation of own MouseEvents
SetMouseButtonCode (rEvent.GetButtons());
+ aMDPos = rEvent.GetPosPixel();
mbProcessingMouseButtonDown = true;
- mpWindow->CaptureMouse();
+ // mpWindow->CaptureMouse();
ProcessMouseEvent(BUTTON_DOWN, rEvent);
- return TRUE;
+ return sal_True;
}
-BOOL SelectionFunction::MouseMove (const MouseEvent& rEvent)
+sal_Bool SelectionFunction::MouseMove (const MouseEvent& rEvent)
{
- Point aMousePosition (rEvent.GetPosPixel());
-
- // Determine page under mouse and show the mouse over effect.
- model::SharedPageDescriptor pHitDescriptor (mrController.GetPageAt(aMousePosition));
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetMouseOverIndicatorOverlay().SetSlideUnderMouse(
- rEvent.IsLeaveWindow() ? model::SharedPageDescriptor() : pHitDescriptor);
- if (pHitDescriptor.get() != NULL)
- rOverlay.GetMouseOverIndicatorOverlay().setVisible(true);
- else
- rOverlay.GetMouseOverIndicatorOverlay().setVisible(false);
-
- // Allow one mouse move before the drag timer is disabled.
- if (aDragTimer.IsActive())
- {
- if (bFirstMouseMove)
- bFirstMouseMove = FALSE;
- else
- aDragTimer.Stop();
- }
-
- Rectangle aRectangle (Point(0,0),mpWindow->GetOutputSizePixel());
- if ( ! aRectangle.IsInside(aMousePosition)
- && rOverlay.GetSubstitutionOverlay().isVisible())
- {
- // Mouse left the window with pressed left button. Make it a drag.
- StartDrag();
- }
- else
- {
- // Call ProcessMouseEvent() only when one of the buttons is
- // pressed. This prevents calling the method on every motion.
- if (rEvent.GetButtons() != 0
- && mbProcessingMouseButtonDown)
- {
- ProcessMouseEvent(MOUSE_MOTION, rEvent);
- }
- }
-
- return TRUE;
+ ProcessMouseEvent(MOUSE_MOTION, rEvent);
+ return sal_True;
}
-BOOL SelectionFunction::MouseButtonUp (const MouseEvent& rEvent)
+sal_Bool SelectionFunction::MouseButtonUp (const MouseEvent& rEvent)
{
mrController.GetScrollBarManager().StopAutoScroll ();
- // remember button state for creation of own MouseEvents
- SetMouseButtonCode (rEvent.GetButtons());
-
- if (aDragTimer.IsActive())
- aDragTimer.Stop();
-
ProcessMouseEvent(BUTTON_UP, rEvent);
mbProcessingMouseButtonDown = false;
- mpWindow->ReleaseMouse();
+// mpWindow->ReleaseMouse();
+
+ return sal_True;
+}
+
- return TRUE;
+
+
+void SelectionFunction::NotifyDragFinished (void)
+{
+ SwitchToNormalMode();
}
-BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
+sal_Bool SelectionFunction::KeyInput (const KeyEvent& rEvent)
{
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ PageSelector::UpdateLock aLock (mrSlideSorter);
FocusManager& rFocusManager (mrController.GetFocusManager());
- BOOL bResult = FALSE;
+ sal_Bool bResult = sal_False;
- switch (rEvent.GetKeyCode().GetCode())
+ const KeyCode& rCode (rEvent.GetKeyCode());
+ switch (rCode.GetCode())
{
case KEY_RETURN:
- if (rFocusManager.HasFocus())
+ {
+ model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (rFocusManager.HasFocus() && pDescriptor && pViewShell!=NULL)
{
- model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
+ // The Return key triggers different functions depending on
+ // whether the slide sorter is the main view or displayed in
+ // the right pane.
+ if (pViewShell->IsMainViewShell())
{
- SetCurrentPage(pDescriptor);
- SwitchView(pDescriptor);
+ mpModeHandler->SetCurrentPage(pDescriptor);
+ mpModeHandler->SwitchView(pDescriptor);
}
- bResult = TRUE;
+ else
+ {
+ pViewShell->GetDispatcher()->Execute(
+ SID_INSERTPAGE,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
+ }
+ bResult = sal_True;
}
break;
+ }
case KEY_TAB:
if ( ! rFocusManager.IsFocusShowing())
+ {
rFocusManager.ShowFocus();
- else
- if (rEvent.GetKeyCode().IsShift())
- rFocusManager.MoveFocus (FocusManager::FMD_LEFT);
- else
- rFocusManager.MoveFocus (FocusManager::FMD_RIGHT);
- bResult = TRUE;
+ bResult = sal_True;
+ }
break;
case KEY_ESCAPE:
- rFocusManager.SetFocusToToolBox();
- bResult = TRUE;
+ // When there is an active multiselection or drag-and-drop
+ // operation then stop that.
+ mpModeHandler->Abort();
+ SwitchToNormalMode();
+ bResult = sal_True;
break;
case KEY_SPACE:
{
// Toggle the selection state.
model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
+ if (pDescriptor && rCode.IsMod1())
{
- // Doing a multi selection by default. Can we ask the event
- // for the state of the shift key?
- if (pDescriptor->IsSelected())
- mrController.GetPageSelector().DeselectPage(pDescriptor);
+ if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ mrController.GetPageSelector().DeselectPage(pDescriptor, false);
else
mrController.GetPageSelector().SelectPage(pDescriptor);
}
- bResult = TRUE;
+ bResult = sal_True;
}
break;
// Move the focus indicator left.
case KEY_LEFT:
- rFocusManager.MoveFocus (FocusManager::FMD_LEFT);
- bResult = TRUE;
+ MoveFocus(FocusManager::FMD_LEFT, rCode.IsShift(), rCode.IsMod1());
+ bResult = sal_True;
break;
// Move the focus indicator right.
case KEY_RIGHT:
- rFocusManager.MoveFocus (FocusManager::FMD_RIGHT);
- bResult = TRUE;
+ MoveFocus(FocusManager::FMD_RIGHT, rCode.IsShift(), rCode.IsMod1());
+ bResult = sal_True;
break;
// Move the focus indicator up.
case KEY_UP:
- rFocusManager.MoveFocus (FocusManager::FMD_UP);
- bResult = TRUE;
+ MoveFocus(FocusManager::FMD_UP, rCode.IsShift(), rCode.IsMod1());
+ bResult = sal_True;
break;
// Move the focus indicator down.
case KEY_DOWN:
- rFocusManager.MoveFocus (FocusManager::FMD_DOWN);
- bResult = TRUE;
+ MoveFocus(FocusManager::FMD_DOWN, rCode.IsShift(), rCode.IsMod1());
+ bResult = sal_True;
break;
// Go to previous page. No wrap around.
case KEY_PAGEUP:
GotoNextPage(-1);
- bResult = TRUE;
+ bResult = sal_True;
break;
// Go to next page. No wrap around..
case KEY_PAGEDOWN:
GotoNextPage(+1);
- bResult = TRUE;
+ bResult = sal_True;
+ break;
+
+ case KEY_HOME:
+ GotoPage(0);
+ bResult = sal_True;
+ break;
+
+ case KEY_END:
+ GotoPage(mrSlideSorter.GetModel().GetPageCount()-1);
+ bResult = sal_True;
break;
case KEY_DELETE:
case KEY_BACKSPACE:
{
- if (mrController.GetProperties()->IsUIReadOnly())
+ if (mrSlideSorter.GetProperties()->IsUIReadOnly())
break;
- int nSelectedPagesCount = 0;
+ mrController.GetSelectionManager()->DeleteSelectedPages(rCode.GetCode()==KEY_DELETE);
- // Count the selected pages and look if there any objects on any
- // of the selected pages so that we can warn the user and
- // prevent an accidental deletion.
- model::PageEnumeration aSelectedPages (
- model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
- mrSlideSorter.GetModel()));
- while (aSelectedPages.HasMoreElements())
- {
- nSelectedPagesCount++;
- aSelectedPages.GetNextElement();
- }
-
- if (nSelectedPagesCount > 0)
- mrController.GetSelectionManager()->DeleteSelectedPages();
-
- bResult = TRUE;
+ mnShiftKeySelectionAnchor = -1;
+ bResult = sal_True;
}
break;
case KEY_F10:
- if (rEvent.GetKeyCode().IsShift())
- ProcessKeyEvent(rEvent);
+ if (rCode.IsShift())
+ {
+ mpModeHandler->SelectOnePage(
+ mrSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
+ }
break;
default:
@@ -404,7 +587,7 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
}
if ( ! bResult)
- bResult = SlideFunction::KeyInput (rEvent);
+ bResult = FuPoor::KeyInput(rEvent);
return bResult;
}
@@ -412,6 +595,73 @@ BOOL SelectionFunction::KeyInput (const KeyEvent& rEvent)
+void SelectionFunction::MoveFocus (
+ const FocusManager::FocusMoveDirection eDirection,
+ const bool bIsShiftDown,
+ const bool bIsControlDown)
+{
+ // Remember the anchor of shift key multi selection.
+ if (bIsShiftDown)
+ {
+ if (mnShiftKeySelectionAnchor<0)
+ {
+ model::SharedPageDescriptor pFocusedDescriptor (
+ mrController.GetFocusManager().GetFocusedPageDescriptor());
+ mnShiftKeySelectionAnchor = pFocusedDescriptor->GetPageIndex();
+ }
+ }
+ else if ( ! bIsControlDown)
+ ResetShiftKeySelectionAnchor();
+
+ mrController.GetFocusManager().MoveFocus(eDirection);
+
+ PageSelector& rSelector (mrController.GetPageSelector());
+ model::SharedPageDescriptor pFocusedDescriptor (
+ mrController.GetFocusManager().GetFocusedPageDescriptor());
+ if (bIsShiftDown)
+ {
+ // When shift is pressed then select all pages in the range between
+ // the currently and the previously focused pages, including them.
+ if (pFocusedDescriptor)
+ {
+ sal_Int32 nPageRangeEnd (pFocusedDescriptor->GetPageIndex());
+ model::PageEnumeration aPages (
+ model::PageEnumerationProvider::CreateAllPagesEnumeration(
+ mrSlideSorter.GetModel()));
+ while (aPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aPages.GetNextElement());
+ if (pDescriptor)
+ {
+ const sal_Int32 nPageIndex(pDescriptor->GetPageIndex());
+ if ((nPageIndex>=mnShiftKeySelectionAnchor && nPageIndex<=nPageRangeEnd)
+ || (nPageIndex<=mnShiftKeySelectionAnchor && nPageIndex>=nPageRangeEnd))
+ {
+ rSelector.SelectPage(pDescriptor);
+ }
+ else
+ {
+ rSelector.DeselectPage(pDescriptor);
+ }
+ }
+ }
+ }
+ }
+ else if (bIsControlDown)
+ {
+ // When control is pressed then do not alter the selection or the
+ // current page, just move the focus.
+ }
+ else
+ {
+ // Without shift just select the focused page.
+ mpModeHandler->SelectOnePage(pFocusedDescriptor);
+ }
+}
+
+
+
+
void SelectionFunction::Activate()
{
FuPoor::Activate();
@@ -443,7 +693,7 @@ void SelectionFunction::ScrollEnd (void)
void SelectionFunction::DoCut (void)
{
- if ( ! mrController.GetProperties()->IsUIReadOnly())
+ if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
{
mrController.GetClipboard().DoCut();
}
@@ -462,7 +712,7 @@ void SelectionFunction::DoCopy (void)
void SelectionFunction::DoPaste (void)
{
- if ( ! mrController.GetProperties()->IsUIReadOnly())
+ if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
{
mrController.GetClipboard().DoPaste();
}
@@ -471,258 +721,316 @@ void SelectionFunction::DoPaste (void)
-void SelectionFunction::Paint (const Rectangle&, ::sd::Window* )
+bool SelectionFunction::cancel (void)
{
+ mrController.GetFocusManager().ToggleFocus();
+ return true;
}
-IMPL_LINK( SelectionFunction, DragSlideHdl, Timer*, EMPTYARG )
+void SelectionFunction::GotoNextPage (int nOffset)
{
- StartDrag();
- return 0;
+ model::SharedPageDescriptor pDescriptor
+ = mrController.GetCurrentSlideManager()->GetCurrentSlide();
+ if (pDescriptor.get() != NULL)
+ {
+ SdPage* pPage = pDescriptor->GetPage();
+ OSL_ASSERT(pPage!=NULL);
+ sal_Int32 nIndex = (pPage->GetPageNum()-1) / 2;
+ GotoPage(nIndex + nOffset);
+ }
+ ResetShiftKeySelectionAnchor();
}
-void SelectionFunction::StartDrag (void)
+void SelectionFunction::GotoPage (int nIndex)
{
- if (mbPageHit
- && ! mrController.GetProperties()->IsUIReadOnly())
+ sal_uInt16 nPageCount = (sal_uInt16)mrSlideSorter.GetModel().GetPageCount();
+
+ if (nIndex >= nPageCount)
+ nIndex = nPageCount - 1;
+ if (nIndex < 0)
+ nIndex = 0;
+
+ mrController.GetFocusManager().SetFocusedPage(nIndex);
+ model::SharedPageDescriptor pNextPageDescriptor (
+ mrSlideSorter.GetModel().GetPageDescriptor (nIndex));
+ if (pNextPageDescriptor.get() != NULL)
+ mpModeHandler->SetCurrentPage(pNextPageDescriptor);
+ else
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- mpSubstitutionHandler->Start(rOverlay.GetSubstitutionOverlay().GetPosition());
- mbPageHit = false;
- mpWindow->ReleaseMouse();
-
- if (mrSlideSorter.GetViewShell() != NULL)
- {
- SlideSorterViewShell* pSlideSorterViewShell
- = dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
- pSlideSorterViewShell->StartDrag (
- rOverlay.GetSubstitutionOverlay().GetPosition(),
- mpWindow);
- }
+ OSL_ASSERT(pNextPageDescriptor.get() != NULL);
}
+ ResetShiftKeySelectionAnchor();
}
-bool SelectionFunction::cancel (void)
+void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent)
{
- mrController.GetFocusManager().ToggleFocus();
- return true;
+ // #95491# remember button state for creation of own MouseEvents
+ SetMouseButtonCode (rEvent.GetButtons());
+
+ EventDescriptor aEventDescriptor (nEventType, rEvent, mrSlideSorter);
+ ProcessEvent(aEventDescriptor);
}
-void SelectionFunction::SelectHitPage (const model::SharedPageDescriptor& rpDescriptor)
+void SelectionFunction::MouseDragged (
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction)
{
- mrController.GetPageSelector().SelectPage(rpDescriptor);
+ EventDescriptor aEventDescriptor (MOUSE_DRAG, rEvent, nDragAction, mrSlideSorter);
+ ProcessEvent(aEventDescriptor);
}
-void SelectionFunction::DeselectHitPage (const model::SharedPageDescriptor& rpDescriptor)
+void SelectionFunction::ProcessKeyEvent (const KeyEvent& rEvent)
{
- mrController.GetPageSelector().DeselectPage(rpDescriptor);
+ EventDescriptor aEventDescriptor (rEvent, mrSlideSorter);
+ ProcessEvent(aEventDescriptor);
}
-void SelectionFunction::DeselectAllPages (void)
+void SelectionFunction::ProcessEvent (EventDescriptor& rDescriptor)
{
- mrController.GetPageSelector().DeselectAllPages();
+ // The call to ProcessEvent may switch to another mode handler.
+ // Prevent the untimely destruction of the called handler by aquiring a
+ // temporary reference here.
+ ::boost::shared_ptr<ModeHandler> pModeHandler (mpModeHandler);
+ pModeHandler->ProcessEvent(rDescriptor);
}
-void SelectionFunction::StartRectangleSelection (const Point& rMouseModelPosition)
+bool Match (
+ const sal_uInt32 nEventCode,
+ const sal_uInt32 nPositivePattern)
{
- if (mrController.GetProperties()->IsShowSelection())
- {
- mrSlideSorter.GetView().GetOverlay().GetSelectionRectangleOverlay().Start(
- rMouseModelPosition);
- }
+ return (nEventCode & nPositivePattern)==nPositivePattern;
}
-void SelectionFunction::UpdateRectangleSelection (const Point& rMouseModelPosition)
+void SelectionFunction::SwitchToNormalMode (void)
{
- if (mrController.GetProperties()->IsShowSelection())
+ if (mpModeHandler->GetMode() != NormalMode)
+ SwitchMode(::boost::shared_ptr<ModeHandler>(
+ new NormalModeHandler(mrSlideSorter, *this)));
+}
+
+
+
+
+void SelectionFunction::SwitchToDragAndDropMode (const Point aMousePosition)
+{
+ if (mpModeHandler->GetMode() != DragAndDropMode)
{
- mrSlideSorter.GetView().GetOverlay().GetSelectionRectangleOverlay().Update(
- rMouseModelPosition);
+ SwitchMode(::boost::shared_ptr<ModeHandler>(
+ new DragAndDropModeHandler(mrSlideSorter, *this, aMousePosition, mpWindow)));
}
}
-void SelectionFunction::ProcessRectangleSelection (bool bToggleSelection)
+void SelectionFunction::SwitchToMultiSelectionMode (
+ const Point aMousePosition,
+ const sal_uInt32 nEventCode)
{
- if ( ! mrController.GetProperties()->IsShowSelection())
- return;
+ if (mpModeHandler->GetMode() != MultiSelectionMode)
+ SwitchMode(::boost::shared_ptr<ModeHandler>(
+ new MultiSelectionModeHandler(mrSlideSorter, *this, aMousePosition, nEventCode)));
+}
+
+
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSelectionRectangleOverlay().isVisible())
+
+bool SelectionFunction::SwitchToButtonMode (void)
+{
+ // Do not show the buttons for draw pages.
+ ::boost::shared_ptr<ViewShell> pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell());
+ if (pMainViewShell
+ && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW
+ && mpModeHandler->GetMode() != ButtonMode)
{
- PageSelector& rSelector (mrController.GetPageSelector());
-
- rOverlay.GetSelectionRectangleOverlay().setVisible(false);
-
- // Select all pages whose page object lies completly inside the drag
- // rectangle.
- const Rectangle& rSelectionRectangle (
- rOverlay.GetSelectionRectangleOverlay().GetSelectionRectangle());
- model::PageEnumeration aPages (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(
- mrSlideSorter.GetModel()));
- while (aPages.HasMoreElements())
- {
- model::SharedPageDescriptor pDescriptor (aPages.GetNextElement());
- Rectangle aPageBox (mrSlideSorter.GetView().GetPageBoundingBox(
- pDescriptor,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_SHAPE));
- if (rSelectionRectangle.IsOver(aPageBox))
- {
- // When we are extending the selection (shift key is
- // pressed) then toggle the selection state of the page.
- // Otherwise select it: this results in the previously
- // selected pages becoming deslected.
- if (bToggleSelection && pDescriptor->IsSelected())
- rSelector.DeselectPage(pDescriptor);
- else
- rSelector.SelectPage(pDescriptor);
- }
- }
+ SwitchMode(::boost::shared_ptr<ModeHandler>(new ButtonModeHandler(mrSlideSorter, *this)));
+ return true;
}
+ else
+ return false;
}
-void SelectionFunction::PrepareMouseMotion (const Point& )
+void SelectionFunction::SwitchMode (const ::boost::shared_ptr<ModeHandler>& rpHandler)
{
- if ( ! mrController.GetProperties()->IsUIReadOnly())
+ // Not all modes allow mouse over indicator.
+ if (mpModeHandler->IsMouseOverIndicatorAllowed() != rpHandler->IsMouseOverIndicatorAllowed())
{
- bFirstMouseMove = TRUE;
- aDragTimer.Start();
+ if ( ! rpHandler->IsMouseOverIndicatorAllowed())
+ {
+ mrSlideSorter.GetView().SetPageUnderMouse(model::SharedPageDescriptor());
+ mrSlideSorter.GetView().GetButtonBar().ResetPage();
+ }
+ else
+ mrSlideSorter.GetView().UpdatePageUnderMouse(false);
}
+
+ mpModeHandler = rpHandler;
}
-void SelectionFunction::RangeSelect (const model::SharedPageDescriptor& rpDescriptor)
+void SelectionFunction::ResetShiftKeySelectionAnchor (void)
{
- PageSelector& rSelector (mrController.GetPageSelector());
+ mnShiftKeySelectionAnchor = -1;
+}
- model::SharedPageDescriptor pAnchor (rSelector.GetSelectionAnchor());
- DeselectAllPages();
- if (pAnchor.get() != NULL)
- {
- // Select all pages between the anchor and the given one, including
- // the two.
- USHORT nAnchorIndex ((pAnchor->GetPage()->GetPageNum()-1) / 2);
- USHORT nOtherIndex ((rpDescriptor->GetPage()->GetPageNum()-1) / 2);
- // Iterate over all pages in the range. Start with the anchor
- // page. This way the PageSelector will recognize it again as
- // anchor (the first selected page after a DeselectAllPages()
- // becomes the anchor.)
- USHORT nStep = (nAnchorIndex < nOtherIndex) ? +1 : -1;
- USHORT nIndex = nAnchorIndex;
- while (true)
- {
- rSelector.SelectPage(nIndex);
- if (nIndex == nOtherIndex)
- break;
- nIndex = nIndex + nStep;
- }
+
+void SelectionFunction::ResetMouseAnchor (void)
+{
+ if (mpModeHandler && mpModeHandler->GetMode() == NormalMode)
+ {
+ ::boost::shared_ptr<NormalModeHandler> pHandler (
+ ::boost::dynamic_pointer_cast<NormalModeHandler>(mpModeHandler));
+ if (pHandler)
+ pHandler->ResetButtonDownLocation();
}
}
-void SelectionFunction::GotoNextPage (int nOffset)
+//===== EventDescriptor =======================================================
+
+SelectionFunction::EventDescriptor::EventDescriptor (
+ const sal_uInt32 nEventType,
+ const MouseEvent& rEvent,
+ SlideSorter& rSlideSorter)
+ : maMousePosition(rEvent.GetPosPixel()),
+ maMouseModelPosition(),
+ mpHitDescriptor(),
+ mpHitPage(),
+ mnEventCode(nEventType),
+ mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
+ meDragMode(InsertionIndicatorHandler::MoveMode),
+ mbMakeSelectionVisible(true),
+ mbIsLeaving(false)
{
- model::SharedPageDescriptor pDescriptor
- = mrController.GetCurrentSlideManager()->GetCurrentSlide();
- if (pDescriptor.get() != NULL)
+ maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
+ mpHitDescriptor = rSlideSorter.GetController().GetPageAt(maMousePosition);
+ if (mpHitDescriptor)
{
- SdPage* pPage = pDescriptor->GetPage();
- OSL_ASSERT(pPage!=NULL);
- sal_Int32 nIndex = (pPage->GetPageNum()-1) / 2;
- nIndex += nOffset;
- USHORT nPageCount = (USHORT)mrSlideSorter.GetModel().GetPageCount();
-
- if (nIndex >= nPageCount)
- nIndex = nPageCount - 1;
- if (nIndex < 0)
- nIndex = 0;
-
- mrController.GetFocusManager().SetFocusedPage(nIndex);
- model::SharedPageDescriptor pNextPageDescriptor (
- mrSlideSorter.GetModel().GetPageDescriptor (nIndex));
- if (pNextPageDescriptor.get() != NULL)
- SetCurrentPage(pNextPageDescriptor);
- else
- {
- OSL_ASSERT(pNextPageDescriptor.get() != NULL);
- }
+ mpHitPage = mpHitDescriptor->GetPage();
}
+
+ mnEventCode |= EncodeMouseEvent(rEvent);
+ mnEventCode |= EncodeState();
+
+ // Detect the mouse leaving the window. When not button is pressed then
+ // we can call IsLeaveWindow at the event. Otherwise we have to make an
+ // explicit test.
+ mbIsLeaving = rEvent.IsLeaveWindow()
+ || ! Rectangle(Point(0,0),
+ rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition);
}
-void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent)
+SelectionFunction::EventDescriptor::EventDescriptor (
+ const sal_uInt32 nEventType,
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction,
+ SlideSorter& rSlideSorter)
+ : maMousePosition(rEvent.maPosPixel),
+ maMouseModelPosition(),
+ mpHitDescriptor(),
+ mpHitPage(),
+ mnEventCode(nEventType),
+ mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
+ meDragMode(InsertionIndicatorHandler::GetModeFromDndAction(nDragAction)),
+ mbMakeSelectionVisible(true),
+ mbIsLeaving(false)
{
- // remember button state for creation of own MouseEvents
- SetMouseButtonCode (rEvent.GetButtons());
+ maMouseModelPosition = rSlideSorter.GetContentWindow()->PixelToLogic(maMousePosition);
+ mpHitDescriptor = rSlideSorter.GetController().GetPageAt(maMousePosition);
+ if (mpHitDescriptor)
+ {
+ mpHitPage = mpHitDescriptor->GetPage();
+ }
+
+ mnEventCode |= EncodeState();
+
+ // Detect the mouse leaving the window. When not button is pressed then
+ // we can call IsLeaveWindow at the event. Otherwise we have to make an
+ // explicit test.
+ mbIsLeaving = rEvent.mbLeaving
+ || ! Rectangle(Point(0,0),
+ rSlideSorter.GetContentWindow()->GetOutputSizePixel()).IsInside(maMousePosition);
+}
- // 1. Compute some frequently used values relating to the event.
- ::std::auto_ptr<EventDescriptor> pEventDescriptor (
- new EventDescriptor(nEventType, rEvent, mrSlideSorter));
- // 2. Compute a numerical code that describes the event and that is used
- // for fast look-up of the associated reaction.
- pEventDescriptor->mnEventCode = EncodeMouseEvent(*pEventDescriptor, rEvent);
- // 3. Process the event.
- EventPreprocessing(*pEventDescriptor);
- if ( ! EventProcessing(*pEventDescriptor))
+
+SelectionFunction::EventDescriptor::EventDescriptor (
+ const KeyEvent& rEvent,
+ SlideSorter& rSlideSorter)
+ : maMousePosition(),
+ maMouseModelPosition(),
+ mpHitDescriptor(),
+ mpHitPage(),
+ mnEventCode(KEY_EVENT),
+ mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
+ meDragMode(InsertionIndicatorHandler::MoveMode),
+ mbMakeSelectionVisible(true),
+ mbIsLeaving(false)
+{
+ model::SharedPageDescriptor pHitDescriptor (
+ rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
+ if (pHitDescriptor.get() != NULL)
{
- OSL_TRACE ("can not handle event code %x", pEventDescriptor->mnEventCode);
+ mpHitPage = pHitDescriptor->GetPage();
+ mpHitDescriptor = pHitDescriptor;
}
- EventPostprocessing(*pEventDescriptor);
- if (nEventType == BUTTON_UP)
- mbPageHit = false;
+ mnEventCode |= EncodeKeyEvent(rEvent) | EncodeState();
}
-sal_uInt32 SelectionFunction::EncodeMouseEvent (
- const EventDescriptor& rDescriptor,
+void SelectionFunction::EventDescriptor::SetDragMode (const InsertionIndicatorHandler::Mode eMode)
+{
+ meDragMode = eMode;
+}
+
+
+
+
+sal_uInt32 SelectionFunction::EventDescriptor::EncodeMouseEvent (
const MouseEvent& rEvent) const
{
// Initialize with the type of mouse event.
- sal_uInt32 nEventCode (rDescriptor.mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION));
+ sal_uInt32 nEventCode (mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION));
// Detect the affected button.
switch (rEvent.GetButtons())
@@ -739,28 +1047,16 @@ sal_uInt32 SelectionFunction::EncodeMouseEvent (
case 2: nEventCode |= DOUBLE_CLICK; break;
}
- // Detect whether the event has happened over a page object.
- if (rDescriptor.mpHitPage != NULL && ! rDescriptor.mpHitDescriptor.expired())
- {
- model::SharedPageDescriptor pHitDescriptor (rDescriptor.mpHitDescriptor);
- if (pHitDescriptor->IsSelected())
- nEventCode |= OVER_SELECTED_PAGE;
- else
- nEventCode |= OVER_UNSELECTED_PAGE;
- }
-
// Detect pressed modifier keys.
if (rEvent.IsShift())
nEventCode |= SHIFT_MODIFIER;
if (rEvent.IsMod1())
nEventCode |= CONTROL_MODIFIER;
- // Detect whether we are dragging pages or dragging a selection rectangle.
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSubstitutionOverlay().isVisible())
- nEventCode |= SUBSTITUTION_VISIBLE;
- if (rOverlay.GetSelectionRectangleOverlay().isVisible())
- nEventCode |= RECTANGLE_VISIBLE;
+ // Detect whether the mouse is over one of the active elements inside a
+ // page object.
+ if (mbIsOverButton)
+ nEventCode |= OVER_BUTTON;
return nEventCode;
}
@@ -768,553 +1064,964 @@ sal_uInt32 SelectionFunction::EncodeMouseEvent (
-void SelectionFunction::ProcessKeyEvent (const KeyEvent& rEvent)
+sal_uInt32 SelectionFunction::EventDescriptor::EncodeKeyEvent (const KeyEvent& rEvent) const
{
- // 1. Compute some frequently used values relating to the event.
- ::std::auto_ptr<EventDescriptor> pEventDescriptor (
- new EventDescriptor(rEvent, mrSlideSorter));
+ // The key code in the lower 16 bit.
+ sal_uInt32 nEventCode (rEvent.GetKeyCode().GetCode());
- // 2. Encode the event.
- pEventDescriptor->mnEventCode = EncodeKeyEvent(*pEventDescriptor, rEvent);
+ // Detect pressed modifier keys.
+ if (rEvent.GetKeyCode().IsShift())
+ nEventCode |= SHIFT_MODIFIER;
+ if (rEvent.GetKeyCode().IsMod1())
+ nEventCode |= CONTROL_MODIFIER;
- // 3. Process the event.
- EventPreprocessing(*pEventDescriptor);
- if ( ! EventProcessing(*pEventDescriptor))
- OSL_TRACE ("can not handle event code %x", pEventDescriptor->mnEventCode);
- EventPostprocessing(*pEventDescriptor);
+ return nEventCode;
}
-sal_uInt32 SelectionFunction::EncodeKeyEvent (
- const EventDescriptor& rDescriptor,
- const KeyEvent& rEvent) const
+sal_uInt32 SelectionFunction::EventDescriptor::EncodeState (void) const
{
- // Initialize as key event.
- sal_uInt32 nEventCode (KEY_EVENT);
-
- // Add the actual key code in the lower 16 bit.
- nEventCode |= rEvent.GetKeyCode().GetCode();
-
- // Detect pressed modifier keys.
- if (rEvent.GetKeyCode().IsShift())
- nEventCode |= SHIFT_MODIFIER;
- if (rEvent.GetKeyCode().IsMod1())
- nEventCode |= CONTROL_MODIFIER;
+ sal_uInt32 nEventCode (0);
// Detect whether the event has happened over a page object.
- if (rDescriptor.mpHitPage != NULL && ! rDescriptor.mpHitDescriptor.expired())
+ if (mpHitPage!=NULL && mpHitDescriptor)
{
- model::SharedPageDescriptor pHitDescriptor (rDescriptor.mpHitDescriptor);
- if (pHitDescriptor->IsSelected())
+ if (mpHitDescriptor->HasState(model::PageDescriptor::ST_Selected))
nEventCode |= OVER_SELECTED_PAGE;
else
nEventCode |= OVER_UNSELECTED_PAGE;
- }
- // Detect whether we are dragging pages or dragging a selection rectangle.
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSubstitutionOverlay().isVisible())
- nEventCode |= SUBSTITUTION_VISIBLE;
- if (rOverlay.GetSelectionRectangleOverlay().isVisible())
- nEventCode |= RECTANGLE_VISIBLE;
+ // Detect whether the mouse is over one of the active elements
+ // inside a page object.
+ if (mbIsOverButton)
+ nEventCode |= OVER_BUTTON;
+ }
return nEventCode;
}
-void SelectionFunction::EventPreprocessing (const EventDescriptor& rDescriptor)
+
+//===== SelectionFunction::ModeHandler ========================================
+
+SelectionFunction::ModeHandler::ModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const bool bIsMouseOverIndicatorAllowed)
+ : mrSlideSorter(rSlideSorter),
+ mrSelectionFunction(rSelectionFunction),
+ mbIsMouseOverIndicatorAllowed(bIsMouseOverIndicatorAllowed)
+{
+}
+
+
+
+
+SelectionFunction::ModeHandler::~ModeHandler (void)
{
- // Some general processing that is not specific to the exact event code.
- if (rDescriptor.mnEventCode & BUTTON_DOWN)
- mbPageHit = (rDescriptor.mpHitPage!=NULL);
+}
+
- // Set the focus to the slide under the mouse.
- if (rDescriptor.mpHitPage != NULL)
- mrController.GetFocusManager().FocusPage((rDescriptor.mpHitPage->GetPageNum()-1)/2);
+
+
+void SelectionFunction::ModeHandler::ReprocessEvent (EventDescriptor& rDescriptor)
+{
+ mrSelectionFunction.ProcessEvent(rDescriptor);
}
-bool SelectionFunction::EventProcessing (const EventDescriptor& rDescriptor)
+void SelectionFunction::ModeHandler::ProcessEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
{
- // Define some macros to make the following switch statement more readable.
-#define ANY_MODIFIER(code) \
- code|NO_MODIFIER: \
- case code|SHIFT_MODIFIER: \
- case code|CONTROL_MODIFIER
-#define ANY_PAGE(code) \
- code|NOT_OVER_PAGE: \
- case code|OVER_UNSELECTED_PAGE: \
- case code|OVER_SELECTED_PAGE
-#define ANY_PAGE_AND_MODIFIER(code) \
- ANY_PAGE(code|NO_MODIFIER): \
- case ANY_PAGE(code|SHIFT_MODIFIER): \
- case ANY_PAGE(code|CONTROL_MODIFIER)
+ PageSelector::BroadcastLock aBroadcastLock (mrSlideSorter);
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+
+ bool bIsProcessed (false);
+ switch (rDescriptor.mnEventCode & (BUTTON_DOWN | BUTTON_UP | MOUSE_MOTION | MOUSE_DRAG))
+ {
+ case BUTTON_DOWN:
+ bIsProcessed = ProcessButtonDownEvent(rDescriptor);
+ break;
+
+ case BUTTON_UP:
+ bIsProcessed = ProcessButtonUpEvent(rDescriptor);
+ break;
+
+ case MOUSE_MOTION:
+ bIsProcessed = ProcessMotionEvent(rDescriptor);
+ break;
+
+ case MOUSE_DRAG:
+ bIsProcessed = ProcessDragEvent(rDescriptor);
+ break;
+ }
+
+ if ( ! bIsProcessed)
+ HandleUnprocessedEvent(rDescriptor);
+}
+
- bool bResult (true);
- bool bMakeSelectionVisible (true);
- mrController.GetPageSelector().DisableBroadcasting();
+bool SelectionFunction::ModeHandler::ProcessButtonDownEvent (EventDescriptor&)
+{
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::ProcessButtonUpEvent (EventDescriptor&)
+{
+ mrSelectionFunction.SwitchToNormalMode();
+ return false;
+}
+
- // 2b. With the event code determine the type of operation with which to
- // react to the event.
- // Acquire a shared_ptr to the hit page descriptor.
- model::SharedPageDescriptor pHitDescriptor;
- if ( ! rDescriptor.mpHitDescriptor.expired())
- pHitDescriptor = model::SharedPageDescriptor(rDescriptor.mpHitDescriptor);
+
+bool SelectionFunction::ModeHandler::ProcessMotionEvent (EventDescriptor& rDescriptor)
+{
+ if (mbIsMouseOverIndicatorAllowed)
+ mrSlideSorter.GetView().UpdatePageUnderMouse(
+ rDescriptor.maMousePosition,
+ (rDescriptor.mnEventCode & LEFT_BUTTON) != 0,
+ true);
+
+ if (rDescriptor.mbIsLeaving)
+ {
+ mrSelectionFunction.SwitchToNormalMode();
+ mrSlideSorter.GetView().SetPageUnderMouse(model::SharedPageDescriptor());
+
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::ProcessDragEvent (EventDescriptor&)
+{
+ return false;
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::HandleUnprocessedEvent (EventDescriptor&)
+{
+ return false;
+}
+
+
+
+
+void SelectionFunction::ModeHandler::SetCurrentPage (
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ SelectOnePage(rpDescriptor);
+ mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(rpDescriptor);
+}
+
+
+
+
+void SelectionFunction::ModeHandler::DeselectAllPages (void)
+{
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSelectionFunction.ResetShiftKeySelectionAnchor();
+}
+
+
+
+
+void SelectionFunction::ModeHandler::SelectOnePage (
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
+}
+
+
+
+
+void SelectionFunction::ModeHandler::SwitchView (const model::SharedPageDescriptor& rpDescriptor)
+{
+ // Switch to the draw view. This is done only when the current
+ // view is the main view.
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell!=NULL && pViewShell->IsMainViewShell())
+ {
+ if (rpDescriptor.get()!=NULL && rpDescriptor->GetPage()!=NULL)
+ {
+ mrSlideSorter.GetModel().GetDocument()->SetSelected(rpDescriptor->GetPage(), sal_True);
+ pViewShell->GetFrameView()->SetSelectedPage(
+ (rpDescriptor->GetPage()->GetPageNum()-1)/2);
+ }
+ if (mrSlideSorter.GetViewShellBase() != NULL)
+ framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
+ framework::FrameworkHelper::msImpressViewURL,
+ framework::FrameworkHelper::msCenterPaneURL);
+ }
+}
+
+
+
+
+void SelectionFunction::ModeHandler::StartDrag (
+ const Point& rMousePosition,
+ const InsertionIndicatorHandler::Mode eMode)
+{
+ (void)eMode;
+ // Do not start a drag-and-drop operation when one is already active.
+ // (when dragging pages from one document into another, pressing a
+ // modifier key can trigger a MouseMotion event in the originating
+ // window (focus still in there). Together with the mouse button pressed
+ // (drag-and-drop is active) this triggers the start of drag-and-drop.)
+ if (SD_MOD()->pTransferDrag != NULL)
+ return;
+
+ if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
+ {
+ mrSelectionFunction.SwitchToDragAndDropMode(rMousePosition);
+ }
+}
+
+
+
+
+bool SelectionFunction::ModeHandler::IsMouseOverIndicatorAllowed (void) const
+{
+ return mbIsMouseOverIndicatorAllowed;
+}
+
+
+
+
+//===== NormalModeHandler =====================================================
+
+NormalModeHandler::NormalModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction)
+ : ModeHandler(rSlideSorter, rSelectionFunction, true),
+ maButtonDownLocation()
+{
+}
+
+
+
+
+NormalModeHandler::~NormalModeHandler (void)
+{
+}
+
+
+
+
+SelectionFunction::Mode NormalModeHandler::GetMode (void) const
+{
+ return SelectionFunction::NormalMode;
+}
+
+
+
+
+void NormalModeHandler::Abort (void)
+{
+}
+
+
+
+
+bool NormalModeHandler::ProcessButtonDownEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ // Remember the location where the left button is pressed. With
+ // that we can filter away motion events that are caused by key
+ // presses. We also can tune the minimal motion distance that
+ // triggers a drag-and-drop operation.
+ if ((rDescriptor.mnEventCode & BUTTON_DOWN) != 0)
+ maButtonDownLocation = rDescriptor.maMousePosition;
switch (rDescriptor.mnEventCode)
{
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE:
- SetCurrentPage(pHitDescriptor);
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
- mpSubstitutionHandler->Start(rDescriptor.maMouseModelPosition);
- break;
-
- case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
- SetCurrentPage(pHitDescriptor);
- mpSubstitutionHandler->End();
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
break;
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
- mpSubstitutionHandler->Start(rDescriptor.maMouseModelPosition);
break;
case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | OVER_SELECTED_PAGE:
case BUTTON_DOWN | LEFT_BUTTON | DOUBLE_CLICK | OVER_UNSELECTED_PAGE:
// A double click allways shows the selected slide in the center
// pane in an edit view.
- SetCurrentPage(pHitDescriptor);
- SwitchView(pHitDescriptor);
- break;
-
- // Multi selection with the control modifier.
- case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | CONTROL_MODIFIER:
- DeselectHitPage(pHitDescriptor);
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
+ SwitchView(rDescriptor.mpHitDescriptor);
break;
- case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | CONTROL_MODIFIER:
- SelectHitPage(pHitDescriptor);
- PrepareMouseMotion(mpWindow->PixelToLogic(rDescriptor.maMousePosition));
-
- break;
-
- // Range selection with the shift modifier.
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | SHIFT_MODIFIER:
case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | SHIFT_MODIFIER:
- RangeSelect(pHitDescriptor);
+ // Range selection with the shift modifier.
+ RangeSelect(rDescriptor.mpHitDescriptor);
break;
- // Was: Preview of the page transition effect.
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_FADE_INDICATOR:
- // No action.
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | OVER_BUTTON:
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | OVER_BUTTON:
+ OSL_ASSERT(mrSlideSorter.GetView().GetButtonBar().IsMouseOverButton());
+
+ // Switch to button mode only when the buttons are visible
+ // (or being faded in.)
+ if (mrSlideSorter.GetView().GetButtonBar().IsVisible(rDescriptor.mpHitDescriptor))
+ {
+ if (mrSelectionFunction.SwitchToButtonMode())
+ ReprocessEvent(rDescriptor);
+ }
+ else
+ {
+ // When the buttons are not (yet) visible then behave like
+ // the left button had been clicked over any other part of
+ // the slide.
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
+ }
break;
- // Right button for context menu.
+ // Right button for context menu.
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE:
- case KEY_EVENT | KEY_F10 | SHIFT_MODIFIER | OVER_UNSELECTED_PAGE:
// Single right click and shift+F10 select as preparation to
// show the context menu. Change the selection only when the
// page under the mouse is not selected. In this case the
// selection is set to this single page. Otherwise the
// selection is not modified.
- DeselectAllPages();
- SelectHitPage(pHitDescriptor);
- SetCurrentPage(pHitDescriptor);
- bMakeSelectionVisible = false;
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
+ rDescriptor.mbMakeSelectionVisible = false;
break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
- case KEY_EVENT | KEY_F10 | OVER_SELECTED_PAGE | SHIFT_MODIFIER:
// Do not change the selection. Just adjust the insertion indicator.
- bMakeSelectionVisible = false;
+ rDescriptor.mbMakeSelectionVisible = false;
break;
case BUTTON_DOWN | RIGHT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
- // The Shift+F10 key event is here just for completeness. It should
- // not be possible to really receive this (not being over a page.)
- case KEY_EVENT | KEY_F10 | SHIFT_MODIFIER | NOT_OVER_PAGE:
+ // Remember the current selection so that when a multi selection
+ // is started, we can restore the previous selection.
+ mrSlideSorter.GetModel().SaveCurrentSelection();
DeselectAllPages();
- bMakeSelectionVisible = false;
break;
- // A mouse motion without visible substitution starts that.
- case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE):
- mrController.GetScrollBarManager().AutoScroll(rDescriptor.maMousePosition);
- mpSubstitutionHandler->Start(rDescriptor.maMouseModelPosition);
+ case ANY_MODIFIER(BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
+ // Remember the current selection so that when a multi selection
+ // is started, we can restore the previous selection.
+ mrSlideSorter.GetModel().SaveCurrentSelection();
+ DeselectAllPages();
break;
- // Move substitution.
- case ANY_PAGE_AND_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | SUBSTITUTION_VISIBLE):
- if ((rDescriptor.mnEventCode & CONTROL_MODIFIER) != 0)
- StartDrag();
- mrController.GetScrollBarManager().AutoScroll(rDescriptor.maMousePosition);
- mpSubstitutionHandler->UpdatePosition(rDescriptor.maMouseModelPosition);
+ default:
+ return false;
+ }
+ return true;
+}
+
+
+
+
+bool NormalModeHandler::ProcessButtonUpEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ bool bIsProcessed (true);
+ switch (rDescriptor.mnEventCode)
+ {
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE:
+ SetCurrentPage(rDescriptor.mpHitDescriptor);
break;
- // Place substitution.
- case ANY_PAGE_AND_MODIFIER(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | SUBSTITUTION_VISIBLE):
- // When the substitution has not been moved the button up event
- // is taken to be part of a single click. The selected pages
- // are therefore not moved (which technically would be necessary
- // for unconsecutive multi selections). Instead the page under
- // the mouse becomes the only selected page.
- if (mpSubstitutionHandler->HasBeenMoved())
- {
- // The following Process() call may lead to the desctruction
- // of pHitDescriptor so release our reference to it.
- pHitDescriptor.reset();
- mpSubstitutionHandler->Process();
- }
- else
- if (pHitDescriptor != NULL)
- SetCurrentPage(pHitDescriptor);
- mpSubstitutionHandler->End();
+ // Multi selection with the control modifier.
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | CONTROL_MODIFIER:
+ mrSlideSorter.GetController().GetPageSelector().DeselectPage(
+ rDescriptor.mpHitDescriptor);
break;
- // Rectangle selection.
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE | NO_MODIFIER:
- DeselectAllPages();
- StartRectangleSelection(rDescriptor.maMouseModelPosition);
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | CONTROL_MODIFIER:
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(
+ rDescriptor.mpHitDescriptor);
+ mrSlideSorter.GetView().UpdatePageUnderMouse(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMousePosition,
+ false);
+ break;
+ case BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE:
break;
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE | SHIFT_MODIFIER:
- case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE | CONTROL_MODIFIER:
- StartRectangleSelection(rDescriptor.maMouseModelPosition);
+ default:
+ bIsProcessed = false;
break;
+ }
+ mrSelectionFunction.SwitchToNormalMode();
+ return bIsProcessed;
+}
- case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
+
+
+
+
+bool NormalModeHandler::ProcessMotionEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ if (ModeHandler::ProcessMotionEvent(rDescriptor))
+ return true;
+
+ bool bIsProcessed (true);
+ switch (rDescriptor.mnEventCode)
+ {
case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE):
- case ANY_PAGE_AND_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE):
- mrController.GetScrollBarManager().AutoScroll(rDescriptor.maMousePosition);
- UpdateRectangleSelection(rDescriptor.maMouseModelPosition);
- break;
+ // SetCurrentPage(rDescriptor.mpHitDescriptor);
+ // Fallthrough
- case ANY_PAGE(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE | NO_MODIFIER):
- ProcessRectangleSelection(false);
- break;
+ // A mouse motion without visible substitution starts that.
+ case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE):
+ {
+ if (maButtonDownLocation)
+ {
+ const sal_Int32 nDistance (maButtonDownLocation
+ ? ::std::max (
+ abs(maButtonDownLocation->X() - rDescriptor.maMousePosition.X()),
+ abs(maButtonDownLocation->Y() - rDescriptor.maMousePosition.Y()))
+ : 0);
+ if (nDistance > 3)
+ StartDrag(
+ rDescriptor.maMousePosition,
+ (rDescriptor.mnEventCode & CONTROL_MODIFIER) != 0
+ ? InsertionIndicatorHandler::CopyMode
+ : InsertionIndicatorHandler::MoveMode);
+ }
+ }
+ break;
- case ANY_PAGE(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE | SHIFT_MODIFIER):
- case ANY_PAGE(BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK | RECTANGLE_VISIBLE | CONTROL_MODIFIER):
- ProcessRectangleSelection(true);
+ // A mouse motion not over a page starts a rectangle selection.
+ case ANY_MODIFIER(MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK | NOT_OVER_PAGE):
+ mrSelectionFunction.SwitchToMultiSelectionMode(
+ rDescriptor.maMouseModelPosition,
+ rDescriptor.mnEventCode);
break;
default:
- bResult = false;
+ bIsProcessed = false;
break;
}
- mrController.GetPageSelector().EnableBroadcasting(bMakeSelectionVisible);
+ return bIsProcessed;
+}
- return bResult;
+
+
+
+bool NormalModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ mrSelectionFunction.SwitchToDragAndDropMode(rDescriptor.maMousePosition);
+ ReprocessEvent(rDescriptor);
+ return true;
}
-void SelectionFunction::EventPostprocessing (const EventDescriptor& rDescriptor)
+void NormalModeHandler::RangeSelect (const model::SharedPageDescriptor& rpDescriptor)
{
- if (rDescriptor.mnEventCode & BUTTON_UP)
+ PageSelector::UpdateLock aLock (mrSlideSorter);
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+
+ model::SharedPageDescriptor pAnchor (rSelector.GetSelectionAnchor());
+ DeselectAllPages();
+
+ if (pAnchor.get() != NULL)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
-
- mpWindow->ReleaseMouse();
-
- // The overlays should not be visible anymore. Warn when one of
- // them still is. An exception is th insertion indicator in the
- // case that the context menu is visible.
- DBG_ASSERT(
- mrController.IsContextMenuOpen()
- || !rOverlay.GetInsertionIndicatorOverlay().isVisible(),
- "slidesorter::SelectionFunction: insertion indicator still visible");
- DBG_ASSERT(
- !rOverlay.GetSubstitutionOverlay().isVisible(),
- "slidesorter::SelectionFunction: substitution still visible");
- DBG_ASSERT(
- !rOverlay.GetSelectionRectangleOverlay().isVisible(),
- "slidesorter::SelectionFunction: selection rectangle still visible");
-
- // Now turn them off.
- if ( ! mrController.IsContextMenuOpen())
- rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSelectionRectangleOverlay().setVisible(false);
+ // Select all pages between the anchor and the given one, including
+ // the two.
+ const sal_uInt16 nAnchorIndex ((pAnchor->GetPage()->GetPageNum()-1) / 2);
+ const sal_uInt16 nOtherIndex ((rpDescriptor->GetPage()->GetPageNum()-1) / 2);
+
+ // Iterate over all pages in the range. Start with the anchor
+ // page. This way the PageSelector will recognize it again as
+ // anchor (the first selected page after a DeselectAllPages()
+ // becomes the anchor.)
+ const sal_uInt16 nStep ((nAnchorIndex < nOtherIndex) ? +1 : -1);
+ sal_uInt16 nIndex (nAnchorIndex);
+ while (true)
+ {
+ rSelector.SelectPage(nIndex);
+ if (nIndex == nOtherIndex)
+ break;
+ nIndex = nIndex + nStep;
+ }
}
}
-void SelectionFunction::SetCurrentPage (const model::SharedPageDescriptor& rpDescriptor)
+void NormalModeHandler::ResetButtonDownLocation (void)
{
- PageSelector& rSelector (mrController.GetPageSelector());
- rSelector.DeselectAllPages ();
- rSelector.SelectPage(rpDescriptor);
+ maButtonDownLocation = ::boost::optional<Point>();
+}
+
+
+
- mrController.GetCurrentSlideManager()->SwitchCurrentSlide(rpDescriptor);
+//===== MultiSelectionModeHandler =============================================
+
+MultiSelectionModeHandler::MultiSelectionModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMouseModelPosition,
+ const sal_uInt32 nEventCode)
+ : ModeHandler(rSlideSorter, rSelectionFunction, false),
+ meSelectionMode(SM_Normal),
+ maSecondCorner(rMouseModelPosition),
+ maSavedPointer(mrSlideSorter.GetContentWindow()->GetPointer()),
+ mnAnchorIndex(-1),
+ mnSecondIndex(-1),
+ maButtonBarLock(rSlideSorter)
+{
+ const Pointer aSelectionPointer (POINTER_TEXT);
+ mrSlideSorter.GetContentWindow()->SetPointer(aSelectionPointer);
+ SetSelectionModeFromModifier(nEventCode);
}
-void SelectionFunction::SwitchView (const model::SharedPageDescriptor& rpDescriptor)
+
+MultiSelectionModeHandler::~MultiSelectionModeHandler (void)
{
- // Switch to the draw view. This is done only when the current
- // view is the main view.
- ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell!=NULL && pViewShell->IsMainViewShell())
+ mrSlideSorter.GetContentWindow()->SetPointer(maSavedPointer);
+}
+
+
+
+
+SelectionFunction::Mode MultiSelectionModeHandler::GetMode (void) const
+{
+ return SelectionFunction::MultiSelectionMode;
+}
+
+
+
+
+void MultiSelectionModeHandler::Abort (void)
+{
+ mrSlideSorter.GetView().RequestRepaint(mrSlideSorter.GetModel().RestoreSelection());
+}
+
+
+
+
+void MultiSelectionModeHandler::ProcessEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ // During a multi selection we do not want sudden jumps of the
+ // visible area caused by moving newly selected pages into view.
+ // Therefore disable that temporarily. The disabler object is
+ // released at the end of the event processing, after the focus and
+ // current slide have been updated.
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+
+ ModeHandler::ProcessEvent(rDescriptor);
+}
+
+
+
+
+bool MultiSelectionModeHandler::ProcessButtonUpEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ if (Match(rDescriptor.mnEventCode, BUTTON_UP | LEFT_BUTTON | SINGLE_CLICK))
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->GetPage()!=NULL)
- {
- mrSlideSorter.GetModel().GetDocument()->SetSelected(rpDescriptor->GetPage(), TRUE);
- mpViewShell->GetFrameView()->SetSelectedPage(
- (rpDescriptor->GetPage()->GetPageNum()-1)/2);
- }
- if (mrSlideSorter.GetViewShellBase() != NULL)
- framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
- framework::FrameworkHelper::msImpressViewURL,
- framework::FrameworkHelper::msCenterPaneURL);
+ mrSelectionFunction.SwitchToNormalMode();
+ return true;
}
+ else
+ return false;
}
-//===== EventDescriptor =======================================================
+bool MultiSelectionModeHandler::ProcessMotionEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
+{
+ // The selection rectangle is visible. Handle events accordingly.
+ if (Match(rDescriptor.mnEventCode, MOUSE_MOTION | LEFT_BUTTON | SINGLE_CLICK))
+ {
+ SetSelectionModeFromModifier(rDescriptor.mnEventCode);
+ UpdatePosition(rDescriptor.maMousePosition, true);
+ rDescriptor.mbMakeSelectionVisible = false;
+ return true;
+ }
+ else
+ return false;
+}
-SelectionFunction::EventDescriptor::EventDescriptor (
- sal_uInt32 nEventType,
- const MouseEvent& rEvent,
- SlideSorter& rSlideSorter)
- : maMousePosition(),
- maMouseModelPosition(),
- mpHitDescriptor(),
- mpHitPage(),
- mnEventCode(nEventType)
+
+
+bool MultiSelectionModeHandler::HandleUnprocessedEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
{
- ::Window* pWindow = rSlideSorter.GetActiveWindow();
+ if ( ! ModeHandler::HandleUnprocessedEvent(rDescriptor))
+ {
+ // If the event has not been processed then stop multi selection.
+ mrSelectionFunction.SwitchToNormalMode();
+ ReprocessEvent(rDescriptor);
+ }
+ return true;
+}
- maMousePosition = rEvent.GetPosPixel();
- maMouseModelPosition = pWindow->PixelToLogic(maMousePosition);
- model::SharedPageDescriptor pHitDescriptor (
- rSlideSorter.GetController().GetPageAt(maMousePosition));
- if (pHitDescriptor.get() != NULL)
+
+
+
+void MultiSelectionModeHandler::UpdatePosition (
+ const Point& rMousePosition,
+ const bool bAllowAutoScroll)
+{
+ VisibleAreaManager::TemporaryDisabler aDisabler (mrSlideSorter);
+
+ // Convert window coordinates into model coordinates (we need the
+ // window coordinates for auto-scrolling because that remains
+ // constant while scrolling.)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
+
+ if ( ! (bAllowAutoScroll && mrSlideSorter.GetController().GetScrollBarManager().AutoScroll(
+ rMousePosition,
+ ::boost::bind(
+ &MultiSelectionModeHandler::UpdatePosition,
+ this,
+ rMousePosition,
+ false))))
{
- mpHitDescriptor = pHitDescriptor;
- mpHitPage = pHitDescriptor->GetPage();
+ UpdateModelPosition(aMouseModelPosition);
}
}
+void MultiSelectionModeHandler::SetSelectionModeFromModifier (
+ const sal_uInt32 nEventCode)
+{
+ switch (nEventCode & MODIFIER_MASK)
+ {
+ case NO_MODIFIER:
+ SetSelectionMode(SM_Normal);
+ break;
+
+ case SHIFT_MODIFIER:
+ SetSelectionMode(SM_Add);
+ break;
-SelectionFunction::EventDescriptor::EventDescriptor (
- const KeyEvent&,
- SlideSorter& rSlideSorter)
- : maMousePosition(),
- maMouseModelPosition(),
- mpHitDescriptor(),
- mpHitPage(),
- mnEventCode(0)
+ case CONTROL_MODIFIER:
+ SetSelectionMode(SM_Toggle);
+ break;
+ }
+}
+
+
+
+
+void MultiSelectionModeHandler::SetSelectionMode (const SelectionMode eSelectionMode)
{
- mpHitDescriptor = rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor();
- model::SharedPageDescriptor pHitDescriptor (
- rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
- if (pHitDescriptor.get() != NULL)
+ if (meSelectionMode != eSelectionMode)
{
- mpHitPage = pHitDescriptor->GetPage();
- mpHitDescriptor = pHitDescriptor;
+ meSelectionMode = eSelectionMode;
+ UpdateSelection();
}
}
+void MultiSelectionModeHandler::UpdateSelectionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bIsInSelection) const
+{
+ // Determine whether the page was selected before the rectangle
+ // selection was started.
+ const bool bWasSelected (rpDescriptor->HasState(model::PageDescriptor::ST_WasSelected));
-//===== SubstitutionHandler ===================================================
+ // Combine the two selection states depending on the selection mode.
+ bool bSelect (false);
+ switch(meSelectionMode)
+ {
+ case SM_Normal:
+ bSelect = bIsInSelection;
+ break;
-SelectionFunction::SubstitutionHandler::SubstitutionHandler (SlideSorter& rSlideSorter)
- : mrSlideSorter(rSlideSorter),
- mbHasBeenMoved(false)
+ case SM_Add:
+ bSelect = bIsInSelection || bWasSelected;
+ break;
+
+ case SM_Toggle:
+ if (bIsInSelection)
+ bSelect = !bWasSelected;
+ else
+ bSelect = bWasSelected;
+ break;
+ }
+
+ // Set the new selection state.
+ if (bSelect)
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
+ else
+ mrSlideSorter.GetController().GetPageSelector().DeselectPage(rpDescriptor);
+}
+
+
+
+
+void MultiSelectionModeHandler::UpdateModelPosition (const Point& rMouseModelPosition)
{
+ maSecondCorner = rMouseModelPosition;
+ UpdateSelection();
}
-SelectionFunction::SubstitutionHandler::~SubstitutionHandler (void)
+void MultiSelectionModeHandler::UpdateSelection (void)
{
- if (mrSlideSorter.IsValid())
+ view::SlideSorterView::DrawLock aLock (mrSlideSorter);
+
+ model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
+ const sal_Int32 nPageCount (rModel.GetPageCount());
+
+ const sal_Int32 nIndexUnderMouse (
+ mrSlideSorter.GetView().GetLayouter().GetIndexAtPoint (
+ maSecondCorner,
+ false,
+ false));
+ if (nIndexUnderMouse>=0 && nIndexUnderMouse<nPageCount)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().Clear();
+ if (mnAnchorIndex < 0)
+ mnAnchorIndex = nIndexUnderMouse;
+ mnSecondIndex = nIndexUnderMouse;
+
+ Range aRange (mnAnchorIndex, mnSecondIndex);
+ aRange.Justify();
+
+ for (sal_Int32 nIndex=0; nIndex<nPageCount; ++nIndex)
+ {
+ UpdateSelectionState(rModel.GetPageDescriptor(nIndex), aRange.IsInside(nIndex));
+ }
}
}
-void SelectionFunction::SubstitutionHandler::Start (const Point& rMouseModelPosition)
+//===== DragAndDropModeHandler ================================================
+
+DragAndDropModeHandler::DragAndDropModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction,
+ const Point& rMousePosition,
+ ::Window* pWindow)
+ : ModeHandler(rSlideSorter, rSelectionFunction, false)
{
- // No Drag-and-Drop for master pages.
- if (mrSlideSorter.GetModel().GetEditMode() != EM_PAGE)
- return;
+ SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
+ if (pDragTransferable==NULL && mrSlideSorter.GetViewShell() != NULL)
+ {
+ SlideSorterViewShell* pSlideSorterViewShell
+ = dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
+ if (pSlideSorterViewShell != NULL)
+ pSlideSorterViewShell->StartDrag(rMousePosition, pWindow);
+ pDragTransferable = SD_MOD()->pTransferDrag;
+ }
+
+ mpDragAndDropContext.reset(new DragAndDropContext(mrSlideSorter));
+ mrSlideSorter.GetController().GetInsertionIndicatorHandler()->Start(
+ pDragTransferable != NULL
+ && pDragTransferable->GetView()==&mrSlideSorter.GetView());
+}
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if ( ! rOverlay.GetSubstitutionOverlay().isVisible())
+
+DragAndDropModeHandler::~DragAndDropModeHandler (void)
+{
+ if (mpDragAndDropContext)
{
- // Show a new substitution for the selected page objects.
- model::PageEnumeration aSelectedPages(
- model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
- mrSlideSorter.GetModel()));
- rOverlay.GetSubstitutionOverlay().Create(aSelectedPages, rMouseModelPosition);
- rOverlay.GetSubstitutionOverlay().setVisible(true);
- mbHasBeenMoved = false;
+ // Disconnect the substitution handler from this selection function.
+ mpDragAndDropContext->SetTargetSlideSorter();
+ mpDragAndDropContext.reset();
}
- else
- UpdatePosition(rMouseModelPosition);
+ mrSlideSorter.GetController().GetInsertionIndicatorHandler()->End(Animator::AM_Animated);
}
-void SelectionFunction::SubstitutionHandler::UpdatePosition (const Point& rMouseModelPosition)
+SelectionFunction::Mode DragAndDropModeHandler::GetMode (void) const
{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
+ return SelectionFunction::DragAndDropMode;
+}
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- // Move the existing substitution to the new position.
- rOverlay.GetSubstitutionOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
- mbHasBeenMoved = true;
+void DragAndDropModeHandler::Abort (void)
+{
+ mrSlideSorter.GetController().GetClipboard().Abort();
+ if (mpDragAndDropContext)
+ mpDragAndDropContext->Dispose();
+ // mrSlideSorter.GetView().RequestRepaint(mrSlideSorter.GetModel().RestoreSelection());
}
-void SelectionFunction::SubstitutionHandler::Process (void)
+bool DragAndDropModeHandler::ProcessButtonUpEvent (
+ SelectionFunction::EventDescriptor& rDescriptor)
{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
+ if (Match(rDescriptor.mnEventCode, BUTTON_UP | LEFT_BUTTON))
+ {
+ // The following Process() call may lead to the desctruction
+ // of rDescriptor.mpHitDescriptor so release our reference to it.
+ rDescriptor.mpHitDescriptor.reset();
+ mrSelectionFunction.SwitchToNormalMode();
+ return true;
+ }
+ else
+ return false;
+}
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (IsSubstitutionInsertionNonTrivial())
- {
- // Tell the model to move the selected pages behind the one with the
- // index mnInsertionIndex which first has to transformed into an index
- // understandable by the document.
- sal_Int32 nInsertionIndex = rOverlay.GetInsertionIndicatorOverlay().GetInsertionPageIndex();
- if (nInsertionIndex >= 0)
- {
- USHORT nDocumentIndex = (USHORT)nInsertionIndex-1;
- mrSlideSorter.GetController().GetSelectionManager()->MoveSelectedPages(nDocumentIndex);
- }
- ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL)
- pViewShell->GetViewFrame()->GetBindings().Invalidate(SID_STATUS_PAGE);
+
+bool DragAndDropModeHandler::ProcessDragEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ OSL_ASSERT(mpDragAndDropContext);
+
+ if (rDescriptor.mbIsLeaving)
+ {
+ mrSelectionFunction.SwitchToNormalMode();
+ }
+ else if (mpDragAndDropContext)
+ {
+ mpDragAndDropContext->UpdatePosition(
+ rDescriptor.maMousePosition,
+ rDescriptor.meDragMode);
}
+
+ return true;
}
-void SelectionFunction::SubstitutionHandler::End (void)
+//===== ButtonModeHandler =====================================================
+
+ButtonModeHandler::ButtonModeHandler (
+ SlideSorter& rSlideSorter,
+ SelectionFunction& rSelectionFunction)
+ : ModeHandler(rSlideSorter, rSelectionFunction, true)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().Clear();
- rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
}
-bool SelectionFunction::SubstitutionHandler::HasBeenMoved (void) const
+ButtonModeHandler::~ButtonModeHandler (void)
{
- return mbHasBeenMoved;
}
-bool SelectionFunction::SubstitutionHandler::IsSubstitutionInsertionNonTrivial (void) const
+SelectionFunction::Mode ButtonModeHandler::GetMode (void) const
{
- bool bIsNonTrivial = false;
+ return SelectionFunction::ButtonMode;
+}
+
- do
+
+
+void ButtonModeHandler::Abort (void)
+{
+}
+
+
+
+
+bool ButtonModeHandler::ProcessButtonDownEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ switch (rDescriptor.mnEventCode)
{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_UNSELECTED_PAGE | OVER_BUTTON:
+ case BUTTON_DOWN | LEFT_BUTTON | SINGLE_CLICK | OVER_SELECTED_PAGE | OVER_BUTTON:
+ // Remember page and button index. When mouse button is
+ // released over same page and button then invoke action of that
+ // button.
+ mrSlideSorter.GetView().GetButtonBar().ProcessButtonDownEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition);
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+
+
+
+bool ButtonModeHandler::ProcessButtonUpEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ switch (rDescriptor.mnEventCode & BUTTON_MASK)
+ {
+ case LEFT_BUTTON:
+ mrSlideSorter.GetView().GetButtonBar().ProcessButtonUpEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition);
+ mrSelectionFunction.SwitchToNormalMode();
+ return true;
+ }
+
+ return false;
+}
- // Make sure that the substitution and the insertion indicator are visible.
- if ( ! rOverlay.GetSubstitutionOverlay().isVisible())
- break;
- if ( ! rOverlay.GetInsertionIndicatorOverlay().isVisible())
- break;
- // Iterate over all selected pages and check whether there are
- // holes. While we do this we remember the indices of the first and
- // last selected page as preparation for the next step.
- sal_Int32 nCurrentIndex = -1;
- sal_Int32 nFirstIndex = -1;
- sal_Int32 nLastIndex = -1;
- model::PageEnumeration aSelectedPages (
- model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
- mrSlideSorter.GetModel()));
- while (aSelectedPages.HasMoreElements() && ! bIsNonTrivial)
- {
- model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
- SdPage* pPage = pDescriptor->GetPage();
- if (pPage != NULL)
- {
- // Get the page number and compare it to the last one.
- sal_Int32 nPageNumber = (pPage->GetPageNum()-1)/2;
- if (nCurrentIndex>=0 && nPageNumber>(nCurrentIndex+1))
- bIsNonTrivial = true;
- else
- nCurrentIndex = nPageNumber;
- // Remember indices of the first and last page of the selection.
- if (nFirstIndex == -1)
- nFirstIndex = nPageNumber;
- nLastIndex = nPageNumber;
- }
- }
- if (bIsNonTrivial)
- break;
- // When we come here then the selection is consecutive. We still
- // have to check that the insertion position is not directly in
- // front or directly behind the selection and thus moving the
- // selection there would not change the model.
- sal_Int32 nInsertionIndex = rOverlay.GetInsertionIndicatorOverlay().GetInsertionPageIndex();
- if (nInsertionIndex<nFirstIndex || nInsertionIndex>(nLastIndex+1))
- bIsNonTrivial = true;
+bool ButtonModeHandler::ProcessMotionEvent (SelectionFunction::EventDescriptor& rDescriptor)
+{
+ switch (rDescriptor.mnEventCode & (MOUSE_MOTION | BUTTON_MASK))
+ {
+ case MOUSE_MOTION | LEFT_BUTTON:
+ mrSlideSorter.GetView().GetButtonBar().ProcessMouseMotionEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition,
+ true);
+ return true;
+
+ case MOUSE_MOTION:
+ mrSlideSorter.GetView().GetButtonBar().ProcessMouseMotionEvent(
+ rDescriptor.mpHitDescriptor,
+ rDescriptor.maMouseModelPosition,
+ false);
+ return true;
}
- while (false);
- return bIsNonTrivial;
+ return false;
}
+
+
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index 4888696032e0..2eff162d5f53 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -31,18 +31,22 @@
#include "controller/SlsSelectionManager.hxx"
#include "SlideSorter.hxx"
-#include "SlsSelectionCommand.hxx"
+#include "SlsCommand.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsAnimator.hxx"
+#include "controller/SlsAnimationFunction.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsFocusManager.hxx"
+#include "controller/SlsPageSelector.hxx"
#include "controller/SlsProperties.hxx"
#include "controller/SlsScrollBarManager.hxx"
#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsSelectionObserver.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
#include "drawdoc.hxx"
#include "Window.hxx"
#include <svx/svxids.hrc>
@@ -66,39 +70,24 @@ using namespace ::sd::slidesorter::controller;
namespace sd { namespace slidesorter { namespace controller {
-namespace {
- class VerticalVisibleAreaScroller
- {
- public:
- VerticalVisibleAreaScroller (SlideSorter& rSlideSorter,
- const double nStart, const double nEnd);
- void operator() (const double nValue);
- private:
- SlideSorter& mrSlideSorter;
- double mnStart;
- double mnEnd;
- };
- class HorizontalVisibleAreaScroller
- {
- public:
- HorizontalVisibleAreaScroller (SlideSorter& rSlideSorter,
- const double nStart, const double nEnd);
- void operator() (const double nValue);
- private:
- SlideSorter& mrSlideSorter;
- double mnStart;
- double mnEnd;
- };
-}
-
+class SelectionManager::PageInsertionListener
+ : public SfxListener
+{
+public:
+};
SelectionManager::SelectionManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
mrController(rSlideSorter.GetController()),
maSelectionBeforeSwitch(),
- mbIsMakeSelectionVisiblePending(true)
+ mbIsMakeSelectionVisiblePending(true),
+ mnInsertionPosition(-1),
+ mnAnimationId(Animator::NotAnAnimationId),
+ maRequestedTopLeft(),
+ mpPageInsertionListener(),
+ mpSelectionObserver(new SelectionObserver(rSlideSorter))
{
}
@@ -107,14 +96,20 @@ SelectionManager::SelectionManager (SlideSorter& rSlideSorter)
SelectionManager::~SelectionManager (void)
{
+ if (mnAnimationId != Animator::NotAnAnimationId)
+ mrController.GetAnimator()->RemoveAnimation(mnAnimationId);
}
-void SelectionManager::DeleteSelectedPages (void)
+void SelectionManager::DeleteSelectedPages (const bool bSelectFollowingPage)
{
+ // Create some locks to prevent updates of the model, view, selection
+ // state while modifying any of them.
SlideSorterController::ModelChangeLock aLock (mrController);
+ SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ PageSelector::UpdateLock aSelectionLock (mrSlideSorter);
// Hide focus.
bool bIsFocusShowing = mrController.GetFocusManager().IsFocusShowing();
@@ -126,8 +121,23 @@ void SelectionManager::DeleteSelectedPages (void)
model::PageEnumeration aPageEnumeration (
PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
::std::vector<SdPage*> aSelectedPages;
+ sal_Int32 nNewCurrentSlide (-1);
while (aPageEnumeration.HasMoreElements())
- aSelectedPages.push_back (aPageEnumeration.GetNextElement()->GetPage());
+ {
+ SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
+ aSelectedPages.push_back(pDescriptor->GetPage());
+ if (bSelectFollowingPage || nNewCurrentSlide<0)
+ nNewCurrentSlide = pDescriptor->GetPageIndex();
+ }
+ if (aSelectedPages.empty())
+ return;
+
+ // Determine the slide to select (and thereby make the current slide)
+ // after the deletion.
+ if (bSelectFollowingPage)
+ nNewCurrentSlide -= aSelectedPages.size() - 1;
+ else
+ --nNewCurrentSlide;
// The actual deletion of the selected pages is done in one of two
// helper functions. They are specialized for normal respectively for
@@ -144,8 +154,16 @@ void SelectionManager::DeleteSelectedPages (void)
// Show focus and move it to next valid location.
if (bIsFocusShowing)
- mrController.GetFocusManager().ToggleFocus ();
- mrController.GetFocusManager().MoveFocus (FocusManager::FMD_NONE);
+ mrController.GetFocusManager().ToggleFocus();
+
+ // Set the new current slide.
+ if (nNewCurrentSlide < 0)
+ nNewCurrentSlide = 0;
+ else if (nNewCurrentSlide >= mrSlideSorter.GetModel().GetPageCount())
+ nNewCurrentSlide = mrSlideSorter.GetModel().GetPageCount()-1;
+ mrController.GetPageSelector().CountSelectedPages();
+ mrController.GetPageSelector().SelectPage(nNewCurrentSlide);
+ mrController.GetFocusManager().SetFocusedPage(nNewCurrentSlide);
}
@@ -172,7 +190,7 @@ void SelectionManager::DeleteSelectedNormalPages (const ::std::vector<SdPage*>&
if (xPages->getCount() <= 1)
break;
- USHORT nPage = ((*aI)->GetPageNum()-1) / 2;
+ const sal_uInt16 nPage (model::FromCoreIndex((*aI)->GetPageNum()));
Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
xPages->remove(xPage);
@@ -208,7 +226,7 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>&
if (xPages->getCount() <= 1)
break;
- USHORT nPage = ((*aI)->GetPageNum()-1) / 2;
+ const sal_uInt16 nPage (model::FromCoreIndex((*aI)->GetPageNum()));
Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
xPages->remove(xPage);
@@ -223,60 +241,6 @@ void SelectionManager::DeleteSelectedMasterPages (const ::std::vector<SdPage*>&
-bool SelectionManager::MoveSelectedPages (const sal_Int32 nTargetPageIndex)
-{
- bool bMoved (false);
- PageSelector& rSelector (mrController.GetPageSelector());
-
- mrSlideSorter.GetView().LockRedraw (TRUE);
- SlideSorterController::ModelChangeLock aLock (mrController);
-
- // Transfer selection of the slide sorter to the document.
- mrSlideSorter.GetModel().SynchronizeDocumentSelection ();
-
- // Detect how many pages lie between document start and insertion
- // position.
- sal_Int32 nPageCountBeforeTarget (0);
- ::boost::shared_ptr<PageSelector::PageSelection> pSelection (rSelector.GetPageSelection());
- PageSelector::PageSelection::const_iterator iSelectedPage (pSelection->begin());
- PageSelector::PageSelection::const_iterator iSelectionEnd (pSelection->end());
- for ( ; iSelectedPage!=iSelectionEnd; ++iSelectedPage)
- {
- if (*iSelectedPage==NULL)
- continue;
- if (((*iSelectedPage)->GetPageNum()-1)/2 <= nTargetPageIndex)
- ++nPageCountBeforeTarget;
- else
- break;
- }
-
- // Prepare to select the moved pages.
- SelectionCommand* pCommand = new SelectionCommand(
- rSelector,mrController.GetCurrentSlideManager(),mrSlideSorter.GetModel());
- sal_Int32 nSelectedPageCount (rSelector.GetSelectedPageCount());
- for (sal_Int32 nOffset=0; nOffset<nSelectedPageCount; ++nOffset)
- pCommand->AddSlide(sal::static_int_cast<USHORT>(
- nTargetPageIndex + nOffset - nPageCountBeforeTarget + 1));
-
- // At the moment we can not move master pages.
- if (nTargetPageIndex>=0)
- {
- if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
- bMoved = mrSlideSorter.GetModel().GetDocument()->MovePages(
- sal::static_int_cast<sal_uInt16>(nTargetPageIndex));
- }
- if (bMoved)
- mrController.GetSlotManager()->ExecuteCommandAsynchronously(
- ::std::auto_ptr<controller::Command>(pCommand));
-
- mrSlideSorter.GetView().LockRedraw (FALSE);
-
- return bMoved;
-}
-
-
-
-
void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
{
if (bMakeSelectionVisible)
@@ -319,166 +283,6 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
-bool SelectionManager::IsMakeSelectionVisiblePending (void) const
-{
- return mbIsMakeSelectionVisiblePending;
-}
-
-
-
-
-/** We have to distinguish three cases: 1) the selection is empty, 2) the
- selection fits completely into the visible area, 3) it does not.
- 1) The visible area is not modified.
- 2) When the selection fits completely into the visible area we have to
- decide how to align it. It is done by scrolling it there and thus when
- we scoll up the (towards the end of the document) the bottom of the
- selection is aligned with the bottom of the window. When we scroll
- down (towards the beginning of the document) the top of the selection is
- aligned with the top of the window.
- 3) We have to decide what part of the selection to make visible. Here
- we use the eSelectionHint and concentrate on either the first, the last,
- or the most recently selected page. We then again apply the algorithm
- of a).
-
-*/
-Size SelectionManager::MakeSelectionVisible (const SelectionHint eSelectionHint)
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return Size(0,0);
-
- mbIsMakeSelectionVisiblePending = false;
-
- // Determine the descriptors of the first and last selected page and the
- // bounding box that encloses their page objects.
- model::SharedPageDescriptor pFirst;
- model::SharedPageDescriptor pLast;
- Rectangle aSelectionBox;
- model::PageEnumeration aSelectedPages (
- PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
- while (aSelectedPages.HasMoreElements())
- {
- model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
-
- if (pFirst.get() == NULL)
- pFirst = pDescriptor;
- pLast = pDescriptor;
-
- aSelectionBox.Union (mrSlideSorter.GetView().GetPageBoundingBox (
- pDescriptor,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_INFO));
- }
-
- if (pFirst != NULL)
- {
- // Determine scroll direction and the position in model coordinates
- // that will be aligned with the top/left or bottom/right window
- // border.
- if (DoesSelectionExceedVisibleArea(aSelectionBox))
- {
- // We can show only a part of the selection.
- aSelectionBox = ResolveLargeSelection(pFirst,pLast, eSelectionHint);
- }
-
- return MakeRectangleVisible(aSelectionBox);
- }
-
- return Size(0,0);
-}
-
-
-
-
-Size SelectionManager::MakeRectangleVisible (const Rectangle& rBox)
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return Size(0,0);
-
- Rectangle aVisibleArea (pWindow->PixelToLogic(
- Rectangle(
- Point(0,0),
- pWindow->GetOutputSizePixel())));
-
- if (mrSlideSorter.GetView().GetOrientation() == SlideSorterView::VERTICAL)
- {
- // Scroll the visible area to make aSelectionBox visible.
- sal_Int32 nNewTop (aVisibleArea.Top());
- if (mrSlideSorter.GetController().GetProperties()->IsCenterSelection())
- {
- nNewTop = rBox.Top() - (aVisibleArea.GetHeight() - rBox.GetHeight()) / 2;
- }
- else
- {
- if (rBox.Top() < aVisibleArea.Top())
- nNewTop = rBox.Top();
- else if (rBox.Bottom() > aVisibleArea.Bottom())
- nNewTop = rBox.Bottom() - aVisibleArea.GetHeight();
- // otherwise we do not modify the visible area.
- }
-
- // Make some corrections of the new visible area.
- Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
- if (nNewTop + aVisibleArea.GetHeight() > aModelArea.Bottom())
- nNewTop = aModelArea.GetHeight() - aVisibleArea.GetHeight();
- if (nNewTop < aModelArea.Top())
- nNewTop = aModelArea.Top();
-
- // Scroll.
- if (nNewTop != aVisibleArea.Top())
- {
- mrController.GetAnimator()->AddAnimation(
- VerticalVisibleAreaScroller(mrSlideSorter, aVisibleArea.Top(), nNewTop),
- mrSlideSorter.GetController().GetProperties()->IsSmoothSelectionScrolling() ?
- 1000 : 0
- );
- }
-
- return Size(0,aVisibleArea.Top() - nNewTop);
- }
- else
- {
- // Scroll the visible area to make aSelectionBox visible.
- sal_Int32 nNewLeft (aVisibleArea.Left());
- if (mrSlideSorter.GetController().GetProperties()->IsCenterSelection())
- {
- nNewLeft = rBox.Left() - (aVisibleArea.GetWidth() - rBox.GetWidth()) / 2;
- }
- else
- {
- if (rBox.Left() < aVisibleArea.Left())
- nNewLeft = rBox.Left();
- else if (rBox.Right() > aVisibleArea.Right())
- nNewLeft = rBox.Right() - aVisibleArea.GetWidth();
- // otherwise we do not modify the visible area.
- }
-
- // Make some corrections of the new visible area.
- Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
- if (nNewLeft + aVisibleArea.GetWidth() > aModelArea.Right())
- nNewLeft = aModelArea.GetWidth() - aVisibleArea.GetWidth();
- if (nNewLeft < aModelArea.Left())
- nNewLeft = aModelArea.Left();
-
- // Scroll.
- if (nNewLeft != aVisibleArea.Left())
- {
- mrController.GetAnimator()->AddAnimation(
- HorizontalVisibleAreaScroller(mrSlideSorter, aVisibleArea.Left(), nNewLeft),
- mrSlideSorter.GetController().GetProperties()->IsSmoothSelectionScrolling() ?
- 1000 : 0
- );
- }
-
- return Size(aVisibleArea.Left() - nNewLeft, 0);
- }
-}
-
-
-
-
void SelectionManager::AddSelectionChangeListener (const Link& rListener)
{
if (::std::find (
@@ -505,70 +309,6 @@ void SelectionManager::RemoveSelectionChangeListener(const Link&rListener)
-bool SelectionManager::DoesSelectionExceedVisibleArea (const Rectangle& rSelectionBox) const
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- if (pWindow == NULL)
- return true;
-
- Rectangle aVisibleArea (pWindow->PixelToLogic(
- Rectangle(
- Point(0,0),
- pWindow->GetOutputSizePixel())));
- if (mrSlideSorter.GetView().GetOrientation() == SlideSorterView::VERTICAL)
- return rSelectionBox.GetHeight() > aVisibleArea.GetHeight();
- else
- return rSelectionBox.GetWidth() > aVisibleArea.GetWidth();
-}
-
-
-
-
-Rectangle SelectionManager::ResolveLargeSelection (
- const SharedPageDescriptor& rpFirst,
- const SharedPageDescriptor& rpLast,
- const SelectionHint eSelectionHint)
-{
- OSL_ASSERT(rpFirst.get()!=NULL);
- OSL_ASSERT(rpLast.get()!=NULL);
-
- // The mose recently selected page is assumed to lie in the range
- // between first and last selected page. Therefore the bounding box is
- // not modified.
- model::SharedPageDescriptor pRecent (
- mrController.GetPageSelector().GetMostRecentlySelectedPage());
-
- // Get the bounding box of the page object on which to concentrate.
- model::SharedPageDescriptor pRepresentative;
- switch (eSelectionHint)
- {
- case SH_FIRST:
- pRepresentative = rpFirst;
- break;
-
- case SH_LAST:
- pRepresentative = rpLast;
- break;
-
- case SH_RECENT:
- default:
- if (pRecent.get() == NULL)
- pRepresentative = rpFirst;
- else
- pRepresentative = pRecent;
- break;
- }
- OSL_ASSERT(pRepresentative.get() != NULL);
-
- return mrSlideSorter.GetView().GetPageBoundingBox (
- pRepresentative,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_INFO);
-}
-
-
-
-
sal_Int32 SelectionManager::GetInsertionPosition (void) const
{
sal_Int32 nInsertionPosition (mnInsertionPosition);
@@ -585,7 +325,7 @@ sal_Int32 SelectionManager::GetInsertionPosition (void) const
const sal_Int32 nPosition (aSelectedPages.GetNextElement()->GetPage()->GetPageNum());
// Convert *2+1 index to straight index (n-1)/2 after the page
// (+1).
- nInsertionPosition = (nPosition-1)/2 + 1;
+ nInsertionPosition = model::FromCoreIndex(nPosition) + 1;
}
}
@@ -612,54 +352,11 @@ void SelectionManager::SetInsertionPosition (const sal_Int32 nInsertionPosition)
-//===== VerticalVisibleAreaScroller ===========================================
-
-namespace {
-
-VerticalVisibleAreaScroller::VerticalVisibleAreaScroller (
- SlideSorter& rSlideSorter,
- const double nStart,
- const double nEnd)
- : mrSlideSorter(rSlideSorter),
- mnStart(nStart),
- mnEnd(nEnd)
+::boost::shared_ptr<SelectionObserver> SelectionManager::GetSelectionObserver (void) const
{
+ return mpSelectionObserver;
}
-
-
-void VerticalVisibleAreaScroller::operator() (const double nValue)
-{
- mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetController().GetScrollBarManager().SetTop(
- int(mnStart * (1.0 - nValue) + mnEnd * nValue));
-}
-
-
-
-
-HorizontalVisibleAreaScroller::HorizontalVisibleAreaScroller (
- SlideSorter& rSlideSorter,
- const double nStart,
- const double nEnd)
- : mrSlideSorter(rSlideSorter),
- mnStart(nStart),
- mnEnd(nEnd)
-{
-}
-
-
-
-
-void HorizontalVisibleAreaScroller::operator() (const double nValue)
-{
- mrSlideSorter.GetView().InvalidatePageObjectVisibilities();
- mrSlideSorter.GetController().GetScrollBarManager().SetLeft(
- int(mnStart * (1.0 - nValue) + mnEnd * nValue));
-}
-
-} // end of anonymous namespace
-
} } } // end of namespace ::sd::slidesorter
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
new file mode 100644
index 000000000000..b40bd667131c
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -0,0 +1,173 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlideSorter.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsSelectionObserver.hxx"
+#include "controller/SlsPageSelector.hxx"
+#include "controller/SlsFocusManager.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include <svx/svdmodel.hxx>
+#include "drawdoc.hxx"
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+SelectionObserver::Context::Context (SlideSorter& rSlideSorter)
+ : mpSelectionObserver(
+ rSlideSorter.GetController().GetSelectionManager()->GetSelectionObserver())
+{
+ if (mpSelectionObserver)
+ mpSelectionObserver->StartObservation();
+}
+
+
+
+
+SelectionObserver::Context::~Context(void)
+{
+ if (mpSelectionObserver)
+ mpSelectionObserver->EndObservation();
+}
+
+
+
+
+void SelectionObserver::Context::Abort(void)
+{
+ if (mpSelectionObserver)
+ {
+ mpSelectionObserver->AbortObservation();
+ mpSelectionObserver.reset();
+ }
+}
+
+
+
+
+//===== SelectionObserver =====================================================
+
+SelectionObserver::SelectionObserver (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ mpDocument(mrSlideSorter.GetModel().GetDocument()),
+ mbIsOvservationActive(false),
+ maInsertedPages(),
+ maDeletedPages()
+{
+}
+
+
+
+
+SelectionObserver::~SelectionObserver (void)
+{
+}
+
+
+
+
+void SelectionObserver::NotifyPageEvent (const SdrPage* pSdrPage)
+{
+ if ( ! mbIsOvservationActive)
+ return;
+
+ const SdPage* pPage = dynamic_cast<const SdPage*>(pSdrPage);
+ if (pPage == NULL)
+ return;
+
+ if (pPage->IsInserted())
+ maInsertedPages.push_back(pPage);
+ else
+ {
+ ::std::vector<const SdPage*>::iterator iPage(
+ ::std::find(maInsertedPages.begin(), maInsertedPages.end(), pPage));
+ if (iPage != maInsertedPages.end())
+ maInsertedPages.erase(iPage);
+
+ maDeletedPages.push_back(pPage->GetPageNum());
+ }
+}
+
+
+
+void SelectionObserver::StartObservation (void)
+{
+ OSL_ASSERT(!mbIsOvservationActive);
+ maInsertedPages.clear();
+ maDeletedPages.clear();
+ mbIsOvservationActive = true;
+}
+
+
+
+
+void SelectionObserver::AbortObservation (void)
+{
+ OSL_ASSERT(mbIsOvservationActive);
+ mbIsOvservationActive = false;
+ maInsertedPages.clear();
+ maDeletedPages.clear();
+}
+
+
+
+
+void SelectionObserver::EndObservation (void)
+{
+ OSL_ASSERT(mbIsOvservationActive);
+ mbIsOvservationActive = false;
+
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ rSelector.DeselectAllPages();
+ if ( ! maInsertedPages.empty())
+ {
+ // Select the inserted pages.
+ for (::std::vector<const SdPage*>::const_iterator
+ iPage(maInsertedPages.begin()),
+ iEnd(maInsertedPages.end());
+ iPage!=iEnd;
+ ++iPage)
+ {
+ rSelector.SelectPage(*iPage);
+ }
+ maInsertedPages.clear();
+ }
+ maDeletedPages.clear();
+
+ aUpdateLock.Release();
+ mrSlideSorter.GetController().GetFocusManager().SetFocusedPageToCurrentPage();
+
+}
+
+
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
index fdcb02f35946..d34fcbd4992a 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
@@ -47,7 +47,7 @@ SlideFunction::SlideFunction (
SfxRequest& rRequest)
: FuPoor (
rSlideSorter.GetViewShell(),
- rSlideSorter.GetView().GetWindow(),
+ rSlideSorter.GetContentWindow().get(),
&rSlideSorter.GetView(),
rSlideSorter.GetModel().GetDocument(),
rRequest)
@@ -62,20 +62,20 @@ void SlideFunction::ScrollEnd (void)
{
}
-BOOL SlideFunction::MouseMove(const MouseEvent& )
+sal_Bool SlideFunction::MouseMove(const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
-BOOL SlideFunction::MouseButtonUp(const MouseEvent& )
+sal_Bool SlideFunction::MouseButtonUp(const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
-BOOL SlideFunction::MouseButtonDown(const MouseEvent& )
+sal_Bool SlideFunction::MouseButtonDown(const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index fd90023c6b92..ad756c9727ae 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -30,24 +30,26 @@
#include <com/sun/star/presentation/XPresentation2.hpp>
+#include <editeng/outlobj.hxx>
+
#include "controller/SlsSlotManager.hxx"
#include "SlideSorter.hxx"
#include "SlideSorterViewShell.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsPageSelector.hxx"
#include "controller/SlsClipboard.hxx"
-#include "controller/SlsSelectionFunction.hxx"
-#include "controller/SlsFocusManager.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsFocusManager.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "controller/SlsPageSelector.hxx"
+#include "controller/SlsSelectionFunction.hxx"
#include "controller/SlsSelectionManager.hxx"
-#include "SlsHideSlideFunction.hxx"
+#include "controller/SlsSelectionObserver.hxx"
#include "SlsCommand.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
#include "framework/FrameworkHelper.hxx"
#include "Window.hxx"
#include "fupoor.hxx"
@@ -93,12 +95,30 @@
#include <com/sun/star/drawing/XDrawPages.hpp>
#include <vcl/svapp.hxx>
+#include <boost/bind.hpp>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation;
namespace sd { namespace slidesorter { namespace controller {
+namespace {
+
+/** The state of a set of slides with respect to being excluded from the
+ slide show.
+*/
+enum SlideExclusionState {UNDEFINED, EXCLUDED, INCLUDED, MIXED};
+
+/** Return for the given set of slides whether they included are
+ excluded from the slide show.
+*/
+SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet);
+
+} // end of anonymous namespace
+
+
+
SlotManager::SlotManager (SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter),
maCommandQueue()
@@ -134,27 +154,31 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
break;
case SID_HIDE_SLIDE:
+ ChangeSlideExclusionState(model::SharedPageDescriptor(), true);
+ break;
+
case SID_SHOW_SLIDE:
- HideSlideFunction::Create(mrSlideSorter, rRequest);
+ ChangeSlideExclusionState(model::SharedPageDescriptor(), false);
break;
case SID_PAGES_PER_ROW:
if (rRequest.GetArgs() != NULL)
{
SFX_REQUEST_ARG(rRequest, pPagesPerRow, SfxUInt16Item,
- SID_PAGES_PER_ROW, FALSE);
+ SID_PAGES_PER_ROW, sal_False);
if (pPagesPerRow != NULL)
{
sal_Int32 nColumnCount = pPagesPerRow->GetValue();
- // Force the given number of columns by setting the
- // minimal and maximal number of columns to the same
- // value.
+ // Force the given number of columns by setting
+ // the minimal and maximal number of columns to
+ // the same value.
mrSlideSorter.GetView().GetLayouter().SetColumnCount (
nColumnCount, nColumnCount);
// Force a repaint and re-layout.
pShell->ArrangeGUIElements ();
// Rearrange the UI-elements controlled by the
- // controller and force a rearrangement of the view.
+ // controller and force a rearrangement of the
+ // view.
mrSlideSorter.GetController().Rearrange(true);
}
}
@@ -168,11 +192,11 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_SLIDE_TRANSITIONS_PANEL:
{
- // Make the slide transition panel visible (expand it) in the
- // tool pane.
+ // Make the slide transition panel visible (expand it)
+ // in the tool pane.
if (mrSlideSorter.GetViewShellBase() != NULL)
- framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())
- ->RequestTaskPanel(sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
+ framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())
+ ->RequestTaskPanel(sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
rRequest.Ignore ();
break;
}
@@ -180,7 +204,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_PRESENTATION_DLG:
FuSlideShowDlg::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
@@ -189,16 +213,16 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_CUSTOMSHOW_DLG:
FuCustomShowDlg::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
- break;
+ break;
case SID_EXPAND_PAGE:
FuExpandPage::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
@@ -207,7 +231,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_SUMMARY_PAGE:
FuSummaryPage::Create (
pShell,
- mrSlideSorter.GetView().GetWindow(),
+ mrSlideSorter.GetContentWindow().get(),
&mrSlideSorter.GetView(),
pDocument,
rRequest);
@@ -219,17 +243,22 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
rRequest.Done();
break;
+ case SID_DUPLICATE_PAGE:
+ DuplicateSelectedSlides(rRequest);
+ rRequest.Done();
+ break;
+
case SID_DELETE_PAGE:
case SID_DELETE_MASTER_PAGE:
case SID_DELETE: // we need SID_CUT to handle the delete key
- // (DEL -> accelerator -> SID_CUT).
- if (mrSlideSorter.GetModel().GetPageCount() > 1)
- {
- mrSlideSorter.GetController().GetSelectionManager()->DeleteSelectedPages();
- }
+ // (DEL -> accelerator -> SID_CUT).
+ if (mrSlideSorter.GetModel().GetPageCount() > 1)
+ {
+ mrSlideSorter.GetController().GetSelectionManager()->DeleteSelectedPages();
+ }
- rRequest.Done();
- break;
+ rRequest.Done();
+ break;
case SID_RENAMEPAGE:
case SID_RENAME_MASTER_PAGE:
@@ -362,21 +391,33 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
break;
}
- case SID_UNDO :
+ case SID_UNDO:
{
SlideSorterViewShell* pViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
if (pViewShell != NULL)
- pViewShell->ImpSidUndo (FALSE, rRequest);
+ {
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ SlideSorterController::ModelChangeLock aModelLock (mrSlideSorter.GetController());
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ SelectionObserver::Context aContext (mrSlideSorter);
+ pViewShell->ImpSidUndo (sal_False, rRequest);
+ }
break;
}
- case SID_REDO :
+ case SID_REDO:
{
SlideSorterViewShell* pViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
if (pViewShell != NULL)
- pViewShell->ImpSidRedo (FALSE, rRequest);
+ {
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ SlideSorterController::ModelChangeLock aModelLock (mrSlideSorter.GetController());
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ SelectionObserver::Context aContext (mrSlideSorter);
+ pViewShell->ImpSidRedo (sal_False, rRequest);
+ }
break;
}
@@ -391,7 +432,7 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
void SlotManager::ExecCtrl (SfxRequest& rRequest)
{
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- USHORT nSlot = rRequest.GetSlot();
+ sal_uInt16 nSlot = rRequest.GetSlot();
switch (nSlot)
{
case SID_RELOAD:
@@ -457,10 +498,10 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
{
// Iteratate over all items.
SfxWhichIter aIter (rSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
- USHORT nSlotId (nWhich);
+ sal_uInt16 nSlotId (nWhich);
if (SfxItemPool::IsWhich(nWhich) && mrSlideSorter.GetViewShell()!=NULL)
nSlotId = mrSlideSorter.GetViewShell()->GetPool().GetSlotId(nWhich);
switch (nSlotId)
@@ -469,7 +510,7 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
rSet.Put (
SfxUInt16Item (
nSlotId,
- (USHORT)mrSlideSorter.GetView().GetLayouter().GetColumnCount()
+ (sal_uInt16)mrSlideSorter.GetView().GetLayouter().GetColumnCount()
)
);
break;
@@ -478,7 +519,7 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
}
}
-void SlotManager::GetMenuState ( SfxItemSet& rSet)
+void SlotManager::GetMenuState (SfxItemSet& rSet)
{
EditMode eEditMode = mrSlideSorter.GetModel().GetEditMode();
ViewShell* pShell = mrSlideSorter.GetViewShell();
@@ -486,15 +527,15 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
if (pShell!=NULL && pShell->GetCurrentFunction().is())
{
- USHORT nSId = pShell->GetCurrentFunction()->GetSlotID();
+ sal_uInt16 nSId = pShell->GetCurrentFunction()->GetSlotID();
- rSet.Put( SfxBoolItem( nSId, TRUE ) );
+ rSet.Put( SfxBoolItem( nSId, sal_True ) );
}
- rSet.Put( SfxBoolItem( SID_DRAWINGMODE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_DIAMODE, TRUE ) );
- rSet.Put( SfxBoolItem( SID_OUTLINEMODE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_NOTESMODE, FALSE ) );
- rSet.Put( SfxBoolItem( SID_HANDOUTMODE, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_DRAWINGMODE, sal_False ) );
+ rSet.Put( SfxBoolItem( SID_DIAMODE, sal_True ) );
+ rSet.Put( SfxBoolItem( SID_OUTLINEMODE, sal_False ) );
+ rSet.Put( SfxBoolItem( SID_NOTESMODE, sal_False ) );
+ rSet.Put( SfxBoolItem( SID_HANDOUTMODE, sal_False ) );
// Vorlagenkatalog darf nicht aufgerufen werden
rSet.DisableItem(SID_STYLE_CATALOG);
@@ -520,8 +561,27 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
{
SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
- if (pObj!=NULL && !pObj->IsEmptyPresObj())
- bDisable = false;
+ if (pObj!=NULL )
+ {
+ if( !pObj->IsEmptyPresObj() )
+ {
+ bDisable = false;
+ }
+ else
+ {
+ // check if the object is in edit, than its temporarely not empty
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ if( pTextObj )
+ {
+ OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
+ if( pParaObj )
+ {
+ delete pParaObj;
+ bDisable = false;
+ }
+ }
+ }
+ }
}
}
@@ -557,7 +617,7 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) )
{
- BOOL bDisable = TRUE;
+ sal_Bool bDisable = sal_True;
model::PageEnumeration aAllPages (
model::PageEnumerationProvider::CreateAllPagesEnumeration(mrSlideSorter.GetModel()));
while (aAllPages.HasMoreElements())
@@ -565,7 +625,7 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
SdPage* pPage = aAllPages.GetNextElement()->GetPage();
if( !pPage->IsExcluded() )
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable || pDocShell->IsPreview())
{
@@ -593,39 +653,48 @@ void SlotManager::GetMenuState ( SfxItemSet& rSet)
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
- HideSlideFunction::ExclusionState eState (
- HideSlideFunction::GetExclusionState(aSelectedPages));
+ const SlideExclusionState eState (GetSlideExclusionState(aSelectedPages));
switch (eState)
{
- case HideSlideFunction::MIXED:
+ case MIXED:
// Show both entries.
break;
- case HideSlideFunction::EXCLUDED:
+ case EXCLUDED:
rSet.DisableItem(SID_HIDE_SLIDE);
break;
- case HideSlideFunction::INCLUDED:
+ case INCLUDED:
rSet.DisableItem(SID_SHOW_SLIDE);
break;
- case HideSlideFunction::UNDEFINED:
+ case UNDEFINED:
rSet.DisableItem(SID_HIDE_SLIDE);
rSet.DisableItem(SID_SHOW_SLIDE);
break;
}
}
+
PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
- if( (eEditMode == EM_MASTERPAGE) && (ePageKind != PK_HANDOUT ) )
+ if ((eEditMode == EM_MASTERPAGE) && (ePageKind != PK_HANDOUT))
{
rSet.DisableItem(SID_ASSIGN_LAYOUT);
}
- if( (eEditMode == EM_MASTERPAGE) || (ePageKind==PK_NOTES) )
+ if ((eEditMode == EM_MASTERPAGE) || (ePageKind==PK_NOTES))
{
rSet.DisableItem(SID_INSERTPAGE);
}
+
+ // Disable some slots when in master page mode.
+ if (eEditMode == EM_MASTERPAGE)
+ {
+ if (rSet.GetItemState(SID_INSERTPAGE) == SFX_ITEM_AVAILABLE)
+ rSet.DisableItem(SID_INSERTPAGE);
+ if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SFX_ITEM_AVAILABLE)
+ rSet.DisableItem(SID_DUPLICATE_PAGE);
+ }
}
@@ -762,8 +831,8 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
*/
SdPage* pPage = NULL;
SdPage* pFirstPage = NULL;
- USHORT nFirstPage;
- USHORT nSelectedPages = (USHORT)mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
+ sal_uInt16 nFirstPage;
+ sal_uInt16 nSelectedPages = (sal_uInt16)mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
String aPageStr;
String aLayoutStr;
@@ -775,18 +844,22 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
- pPage = aSelectedPages.GetNextElement()->GetPage();
- nFirstPage = pPage->GetPageNum()/2;
- pFirstPage = pPage;
-
- aPageStr += sal_Unicode(' ');
- aPageStr += String::CreateFromInt32( nFirstPage + 1 );
- aPageStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " ));
- aPageStr += String::CreateFromInt32(
- mrSlideSorter.GetModel().GetPageCount());
-
- aLayoutStr = pFirstPage->GetLayoutName();
- aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ if (pDescriptor)
+ {
+ pPage = pDescriptor->GetPage();
+ nFirstPage = pPage->GetPageNum()/2;
+ pFirstPage = pPage;
+
+ aPageStr += sal_Unicode(' ');
+ aPageStr += String::CreateFromInt32( nFirstPage + 1 );
+ aPageStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " ));
+ aPageStr += String::CreateFromInt32(
+ mrSlideSorter.GetModel().GetPageCount());
+
+ aLayoutStr = pFirstPage->GetLayoutName();
+ aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ }
}
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
@@ -837,7 +910,7 @@ void SlotManager::RenameSlide (void)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
AbstractSvxNameDialog* aNameDlg = pFact->CreateSvxNameDialog(
- mrSlideSorter.GetActiveWindow(),
+ mrSlideSorter.GetContentWindow().get(),
aPageName, aDescr);
DBG_ASSERT(aNameDlg, "Dialogdiet fail!");
aNameDlg->SetText( aTitle );
@@ -887,9 +960,9 @@ IMPL_LINK(SlotManager, RenameSlideHdl, AbstractSvxNameDialog*, pDialog)
&& mrSlideSorter.GetViewShell()->GetDocSh()->IsNewPageNameValid( aNewName ) ));
}
-bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & rName )
+bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const String & rName )
{
- BOOL bOutDummy;
+ sal_Bool bOutDummy;
SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
if( pDocument->GetPageByName( rName, bOutDummy ) != SDRPAGE_NOTFOUND )
return false;
@@ -897,7 +970,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
SdPage* pPageToRename = NULL;
PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
- SfxUndoManager* pManager = pDocument->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = pDocument->GetDocSh()->GetUndoManager();
if( mrSlideSorter.GetModel().GetEditMode() == EM_PAGE )
{
@@ -911,13 +984,13 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
// Undo
SdPage* pUndoPage = pPageToRename;
SdrLayerAdmin & rLayerAdmin = pDocument->GetLayerAdmin();
- BYTE nBackground = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), FALSE );
- BYTE nBgObj = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), FALSE );
+ sal_uInt8 nBackground = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), sal_False );
+ sal_uInt8 nBgObj = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), sal_False );
SetOfByte aVisibleLayers = pPageToRename->TRG_GetMasterPageVisibleLayers();
// (#67720#)
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
- pManager, pDocument, pUndoPage, rName, pUndoPage->GetAutoLayout(),
+ pDocument, pUndoPage, rName, pUndoPage->GetAutoLayout(),
aVisibleLayers.IsSet( nBackground ),
aVisibleLayers.IsSet( nBgObj ));
pManager->AddUndoAction( pAction );
@@ -946,7 +1019,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
}
}
- bool bSuccess = pPageToRename!=NULL && ( FALSE != rName.Equals( pPageToRename->GetName()));
+ bool bSuccess = pPageToRename!=NULL && ( sal_False != rName.Equals( pPageToRename->GetName()));
if( bSuccess )
{
@@ -954,10 +1027,10 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
// aTabControl.SetPageText( nPageId, rName );
// set document to modified state
- pDocument->SetChanged( TRUE );
+ pDocument->SetChanged( sal_True );
// inform navigator about change
- SfxBoolItem aItem( SID_NAVIGATOR_INIT, TRUE );
+ SfxBoolItem aItem( SID_NAVIGATOR_INIT, sal_True );
if (mrSlideSorter.GetViewShell() != NULL)
mrSlideSorter.GetViewShell()->GetDispatcher()->Execute(
SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -985,123 +1058,110 @@ bool SlotManager::RenameSlideFromDrawViewShell( USHORT nPageId, const String & r
*/
void SlotManager::InsertSlide (SfxRequest& rRequest)
{
- PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
- // The fallback insertion position is after the last slide.
- sal_Int32 nInsertionIndex (rSelector.GetPageCount() - 1);
- if (rSelector.GetSelectedPageCount() > 0)
+ const sal_Int32 nInsertionIndex (GetInsertionPosition());
+
+ PageSelector::BroadcastLock aBroadcastLock (mrSlideSorter);
+
+ SdPage* pNewPage = NULL;
+ if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
{
- // Deselect all but the last selected slide.
- bool bLastSelectedSlideSeen (false);
- for (int nIndex=rSelector.GetPageCount()-1; nIndex>=0; --nIndex)
+ SlideSorterViewShell* pShell = dynamic_cast<SlideSorterViewShell*>(
+ mrSlideSorter.GetViewShell());
+ if (pShell != NULL)
{
- if (rSelector.IsPageSelected(nIndex))
- {
- if (bLastSelectedSlideSeen)
- rSelector.DeselectPage (nIndex);
- else
- {
- nInsertionIndex = nIndex;
- bLastSelectedSlideSeen = true;
- }
- }
+ pNewPage = pShell->CreateOrDuplicatePage (
+ rRequest,
+ mrSlideSorter.GetModel().GetPageType(),
+ nInsertionIndex>=0
+ ? mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex)->GetPage()
+ : NULL);
}
}
-
- // No selection. Is there an insertion indicator?
- else if (mrSlideSorter.GetView().GetOverlay()
- .GetInsertionIndicatorOverlay().isVisible())
- {
- // Select the page before the insertion indicator.
- nInsertionIndex = mrSlideSorter.GetView().GetOverlay()
- .GetInsertionIndicatorOverlay().GetInsertionPageIndex();
- nInsertionIndex --;
- rSelector.SelectPage (nInsertionIndex);
- }
-
- // Is there a stored insertion position?
- else if (mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() >= 0)
+ else
{
- nInsertionIndex
- = mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() - 1;
- rSelector.SelectPage(nInsertionIndex);
- }
+ // Use the API to create a new page.
+ SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
+ Reference<drawing::XMasterPagesSupplier> xMasterPagesSupplier (
+ pDocument->getUnoModel(), UNO_QUERY);
+ if (xMasterPagesSupplier.is())
+ {
+ Reference<drawing::XDrawPages> xMasterPages (
+ xMasterPagesSupplier->getMasterPages());
+ if (xMasterPages.is())
+ {
+ xMasterPages->insertNewByIndex (nInsertionIndex+1);
- // Select the last page when there is at least one page.
- else if (rSelector.GetPageCount() > 0)
- {
- nInsertionIndex = rSelector.GetPageCount() - 1;
- rSelector.SelectPage (nInsertionIndex);
+ // Create shapes for the default layout.
+ pNewPage = pDocument->GetMasterSdPage(
+ (sal_uInt16)(nInsertionIndex+1), PK_STANDARD);
+ pNewPage->CreateTitleAndLayout (sal_True,sal_True);
+ }
+ }
}
+ if (pNewPage == NULL)
+ return;
- // Hope for the best that CreateOrDuplicatePage() can cope with an empty
- // selection.
- else
- {
- nInsertionIndex = -1;
- }
+ // When a new page has been inserted then select it, make it the
+ // current page, and focus it.
+ view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
+ PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(pNewPage);
+}
- USHORT nPageCount ((USHORT)mrSlideSorter.GetModel().GetPageCount());
- rSelector.DisableBroadcasting();
- // In order for SlideSorterController::GetActualPage() to select the
- // selected page as current page we have to turn off the focus
- // temporarily.
- {
- FocusManager::FocusHider aTemporaryFocusHider (
- mrSlideSorter.GetController().GetFocusManager());
- SdPage* pPreviousPage = NULL;
- if (nInsertionIndex >= 0)
- pPreviousPage = mrSlideSorter.GetModel()
- .GetPageDescriptor(nInsertionIndex)->GetPage();
- if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
+void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest)
+{
+ // Create a list of the pages that are to be duplicated. The process of
+ // duplication alters the selection.
+ sal_Int32 nInsertPosition (0);
+ ::std::vector<SdPage*> aPagesToDuplicate;
+ model::PageEnumeration aSelectedPages (
+ model::PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel()));
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ if (pDescriptor && pDescriptor->GetPage())
{
- SlideSorterViewShell* pShell = dynamic_cast<SlideSorterViewShell*>(
- mrSlideSorter.GetViewShell());
- if (pShell != NULL)
- {
- pShell->CreateOrDuplicatePage (
- rRequest,
- mrSlideSorter.GetModel().GetPageType(),
- pPreviousPage);
- }
- }
- else
- {
- // Use the API to create a new page.
- SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
- Reference<drawing::XMasterPagesSupplier> xMasterPagesSupplier (
- pDocument->getUnoModel(), UNO_QUERY);
- if (xMasterPagesSupplier.is())
- {
- Reference<drawing::XDrawPages> xMasterPages (
- xMasterPagesSupplier->getMasterPages());
- if (xMasterPages.is())
- {
- xMasterPages->insertNewByIndex (nInsertionIndex+1);
-
- // Create shapes for the default layout.
- SdPage* pMasterPage = pDocument->GetMasterSdPage(
- (USHORT)(nInsertionIndex+1), PK_STANDARD);
- pMasterPage->CreateTitleAndLayout (TRUE,TRUE);
- }
- }
+ aPagesToDuplicate.push_back(pDescriptor->GetPage());
+ nInsertPosition = pDescriptor->GetPage()->GetPageNum()+2;
}
}
- // When a new page has been inserted then select it and make it the
- // current page.
- mrSlideSorter.GetView().LockRedraw(TRUE);
- if (mrSlideSorter.GetModel().GetPageCount() > nPageCount)
+ // Duplicate the pages in aPagesToDuplicate and collect the newly
+ // created pages in aPagesToSelect.
+ const bool bUndo (aPagesToDuplicate.size()>1 && mrSlideSorter.GetView().IsUndoEnabled());
+ if (bUndo)
+ mrSlideSorter.GetView().BegUndo(String(SdResId(STR_INSERTPAGE)));
+
+ ::std::vector<SdPage*> aPagesToSelect;
+ for(::std::vector<SdPage*>::const_iterator
+ iPage(aPagesToDuplicate.begin()),
+ iEnd(aPagesToDuplicate.end());
+ iPage!=iEnd;
+ ++iPage, nInsertPosition+=2)
{
- nInsertionIndex++;
- model::SharedPageDescriptor pDescriptor = mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex);
- if (pDescriptor.get() != NULL)
- mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(pDescriptor);
+ aPagesToSelect.push_back(
+ mrSlideSorter.GetViewShell()->CreateOrDuplicatePage(
+ rRequest, PK_STANDARD, *iPage, nInsertPosition));
}
- rSelector.EnableBroadcasting();
- mrSlideSorter.GetView().LockRedraw(FALSE);
+ aPagesToDuplicate.clear();
+
+ if (bUndo)
+ mrSlideSorter.GetView().EndUndo();
+
+ // Set the selection to the pages in aPagesToSelect.
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+ rSelector.DeselectAllPages();
+ ::std::for_each (
+ aPagesToSelect.begin(),
+ aPagesToSelect.end(),
+ ::boost::bind(
+ static_cast<void (PageSelector::*)(const SdPage*)>(&PageSelector::SelectPage),
+ rSelector,
+ _1));
}
void SlotManager::ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand)
@@ -1131,6 +1191,155 @@ IMPL_LINK(SlotManager, UserEventCallback, void*, EMPTYARG)
return 1;
}
+
+
+
+void SlotManager::ChangeSlideExclusionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bExcludeSlide)
+{
+ if (rpDescriptor)
+ {
+ mrSlideSorter.GetView().SetState(
+ rpDescriptor,
+ model::PageDescriptor::ST_Excluded,
+ bExcludeSlide);
+ }
+ else
+ {
+ model::PageEnumeration aSelectedPages (
+ model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
+ mrSlideSorter.GetModel()));
+ while (aSelectedPages.HasMoreElements())
+ {
+ model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
+ mrSlideSorter.GetView().SetState(
+ pDescriptor,
+ model::PageDescriptor::ST_Excluded,
+ bExcludeSlide);
+ }
+ }
+
+ SfxBindings& rBindings (mrSlideSorter.GetViewShell()->GetViewFrame()->GetBindings());
+ rBindings.Invalidate(SID_PRESENTATION);
+ rBindings.Invalidate(SID_REHEARSE_TIMINGS);
+ rBindings.Invalidate(SID_HIDE_SLIDE);
+ rBindings.Invalidate(SID_SHOW_SLIDE);
+ mrSlideSorter.GetModel().GetDocument()->SetChanged();
+}
+
+
+
+
+sal_Int32 SlotManager::GetInsertionPosition (void)
+{
+ PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
+
+ // The insertion indicator is preferred. After all the user explicitly
+ // used it to define the insertion position.
+ if (mrSlideSorter.GetController().GetInsertionIndicatorHandler()->IsActive())
+ {
+ // Select the page before the insertion indicator.
+ return mrSlideSorter.GetController().GetInsertionIndicatorHandler()->GetInsertionPageIndex()
+ - 1;
+ }
+
+ // Is there a stored insertion position?
+ else if (mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() >= 0)
+ {
+ return mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() - 1;
+ }
+
+ // Use the index of the last selected slide.
+ else if (rSelector.GetSelectedPageCount() > 0)
+ {
+ for (int nIndex=rSelector.GetPageCount()-1; nIndex>=0; --nIndex)
+ if (rSelector.IsPageSelected(nIndex))
+ return nIndex;
+
+ // We should never get here.
+ OSL_ASSERT(false);
+ return rSelector.GetPageCount() - 1;
+ }
+
+ // Select the last page when there is at least one page.
+ else if (rSelector.GetPageCount() > 0)
+ {
+ return rSelector.GetPageCount() - 1;
+ }
+
+ // Hope for the best that CreateOrDuplicatePage() can cope with an empty
+ // selection.
+ else
+ {
+ // We should never get here because there has to be at least one page.
+ OSL_ASSERT(false);
+ return -1;
+ }
+}
+
+
+
+
+void SlotManager::NotifyEditModeChange (void)
+{
+ SfxBindings& rBindings (mrSlideSorter.GetViewShell()->GetViewFrame()->GetBindings());
+ rBindings.Invalidate(SID_PRESENTATION);
+ rBindings.Invalidate(SID_INSERTPAGE);
+ rBindings.Invalidate(SID_DUPLICATE_PAGE);
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+
+namespace {
+
+
+
+SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet)
+{
+ SlideExclusionState eState (UNDEFINED);
+ sal_Bool bState;
+
+ // Get toggle state of the selected pages.
+ while (rPageSet.HasMoreElements() && eState!=MIXED)
+ {
+ bState = rPageSet.GetNextElement()->GetPage()->IsExcluded();
+ switch (eState)
+ {
+ case UNDEFINED:
+ // Use the first selected page to set the inital value.
+ eState = bState ? EXCLUDED : INCLUDED;
+ break;
+
+ case EXCLUDED:
+ // The pages before where all not part of the show,
+ // this one is.
+ if ( ! bState)
+ eState = MIXED;
+ break;
+
+ case INCLUDED:
+ // The pages before where all part of the show,
+ // this one is not.
+ if (bState)
+ eState = MIXED;
+ break;
+
+ case MIXED:
+ default:
+ // No need to change anything.
+ break;
+ }
+ }
+
+ return eState;
+}
+
+} // end of anonymous namespace
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferable.cxx b/sd/source/ui/slidesorter/controller/SlsTransferable.cxx
index d39033ab67a5..aa94aad2c56a 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsTransferable.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsTransferable.cxx
@@ -29,7 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
-#include "SlsTransferable.hxx"
+#include "controller/SlsTransferable.hxx"
#include "SlideSorterViewShell.hxx"
#include "View.hxx"
@@ -39,10 +39,12 @@ namespace sd { namespace slidesorter { namespace controller {
Transferable::Transferable (
SdDrawDocument* pSrcDoc,
::sd::View* pWorkView,
- BOOL bInitOnGetData,
- SlideSorterViewShell* pViewShell)
+ sal_Bool bInitOnGetData,
+ SlideSorterViewShell* pViewShell,
+ const ::std::vector<Representative>& rRepresentatives)
: SdTransferable (pSrcDoc, pWorkView, bInitOnGetData),
- mpViewShell(pViewShell)
+ mpViewShell(pViewShell),
+ maRepresentatives(rRepresentatives)
{
if (mpViewShell != NULL)
StartListening(*mpViewShell);
@@ -50,6 +52,7 @@ Transferable::Transferable (
+
Transferable::~Transferable (void)
{
if (mpViewShell != NULL)
@@ -90,6 +93,12 @@ void Transferable::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
+const ::std::vector<Transferable::Representative>& Transferable::GetRepresentatives (void) const
+{
+ return maRepresentatives;
+}
+
+
} } } // end of namespace ::sd::slidesorter::controller
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
new file mode 100644
index 000000000000..76e9e411e81e
--- /dev/null
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -0,0 +1,305 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "controller/SlsVisibleAreaManager.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "controller/SlsScrollBarManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+namespace {
+ class VisibleAreaScroller
+ {
+ public:
+ VisibleAreaScroller (
+ SlideSorter& rSlideSorter,
+ const Point aStart,
+ const Point aEnd);
+ void operator() (const double nValue);
+ private:
+ SlideSorter& mrSlideSorter;
+ Point maStart;
+ const Point maEnd;
+ const ::boost::function<double(double)> maAccelerationFunction;
+ };
+
+} // end of anonymous namespace
+
+
+
+VisibleAreaManager::VisibleAreaManager (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ maVisibleRequests(),
+ mnScrollAnimationId(Animator::NotAnAnimationId),
+ maRequestedVisibleTopLeft(),
+ meRequestedAnimationMode(Animator::AM_Immediate),
+ mbIsCurrentSlideTrackingActive(true),
+ mnDisableCount(0)
+{
+}
+
+
+
+
+VisibleAreaManager::~VisibleAreaManager (void)
+{
+}
+
+
+
+
+void VisibleAreaManager::ActivateCurrentSlideTracking (void)
+{
+ mbIsCurrentSlideTrackingActive = true;
+}
+
+
+
+
+void VisibleAreaManager::DeactivateCurrentSlideTracking (void)
+{
+ mbIsCurrentSlideTrackingActive = false;
+}
+
+
+
+
+void VisibleAreaManager::RequestVisible (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bForce)
+{
+ if (rpDescriptor)
+ {
+ if (mnDisableCount == 0)
+ {
+ maVisibleRequests.push_back(
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectBox(
+ rpDescriptor->GetPageIndex(),
+ true));
+ }
+ if (bForce && ! mbIsCurrentSlideTrackingActive)
+ ActivateCurrentSlideTracking();
+ MakeVisible();
+ }
+}
+
+
+
+
+void VisibleAreaManager::RequestCurrentSlideVisible (void)
+{
+ if (mbIsCurrentSlideTrackingActive && mnDisableCount==0)
+ RequestVisible(
+ mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
+}
+
+
+
+
+void VisibleAreaManager::MakeVisible (void)
+{
+ if (maVisibleRequests.empty())
+ return;
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return;
+ const Point aCurrentTopLeft (pWindow->PixelToLogic(Point(0,0)));
+
+ const ::boost::optional<Point> aNewVisibleTopLeft (GetRequestedTopLeft());
+ maVisibleRequests.clear();
+ if ( ! aNewVisibleTopLeft)
+ return;
+
+ // We now know what the visible area shall be. Scroll accordingly
+ // unless that is not already the visible area or a running scroll
+ // animation has it as its target area.
+ if (mnScrollAnimationId!=Animator::NotAnAnimationId
+ && maRequestedVisibleTopLeft==aNewVisibleTopLeft)
+ return;
+
+ // Stop a running animation.
+ if (mnScrollAnimationId != Animator::NotAnAnimationId)
+ mrSlideSorter.GetController().GetAnimator()->RemoveAnimation(mnScrollAnimationId);
+
+ maRequestedVisibleTopLeft = aNewVisibleTopLeft.get();
+ VisibleAreaScroller aAnimation(
+ mrSlideSorter,
+ aCurrentTopLeft,
+ maRequestedVisibleTopLeft);
+ if (meRequestedAnimationMode==Animator::AM_Animated
+ && mrSlideSorter.GetProperties()->IsSmoothSelectionScrolling())
+ {
+ mnScrollAnimationId = mrSlideSorter.GetController().GetAnimator()->AddAnimation(
+ aAnimation,
+ 0,
+ 300);
+ }
+ else
+ {
+ // Execute the animation at its final value.
+ aAnimation(1.0);
+ }
+ meRequestedAnimationMode = Animator::AM_Immediate;
+}
+
+
+
+
+::boost::optional<Point> VisibleAreaManager::GetRequestedTopLeft (void) const
+{
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return ::boost::optional<Point>();
+
+ // Get the currently visible area and the model area.
+ const Rectangle aVisibleArea (pWindow->PixelToLogic(
+ Rectangle(
+ Point(0,0),
+ pWindow->GetOutputSizePixel())));
+ const Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
+
+ sal_Int32 nVisibleTop (aVisibleArea.Top());
+ const sal_Int32 nVisibleWidth (aVisibleArea.GetWidth());
+ sal_Int32 nVisibleLeft (aVisibleArea.Left());
+ const sal_Int32 nVisibleHeight (aVisibleArea.GetHeight());
+
+ // Find the longest run of boxes whose union fits into the visible area.
+ Rectangle aBoundingBox;
+ for (::std::vector<Rectangle>::const_iterator
+ iBox(maVisibleRequests.begin()),
+ iEnd(maVisibleRequests.end());
+ iBox!=iEnd;
+ ++iBox)
+ {
+ if (nVisibleTop+nVisibleHeight <= iBox->Bottom())
+ nVisibleTop = iBox->Bottom()-nVisibleHeight;
+ if (nVisibleTop > iBox->Top())
+ nVisibleTop = iBox->Top();
+
+ if (nVisibleLeft+nVisibleWidth <= iBox->Right())
+ nVisibleLeft = iBox->Right()-nVisibleWidth;
+ if (nVisibleLeft > iBox->Left())
+ nVisibleLeft = iBox->Left();
+
+ // Make sure the visible area does not move outside the model area.
+ if (nVisibleTop + nVisibleHeight > aModelArea.Bottom())
+ nVisibleTop = aModelArea.Bottom() - nVisibleHeight;
+ if (nVisibleTop < aModelArea.Top())
+ nVisibleTop = aModelArea.Top();
+
+ if (nVisibleLeft + nVisibleWidth > aModelArea.Right())
+ nVisibleLeft = aModelArea.Right() - nVisibleWidth;
+ if (nVisibleLeft < aModelArea.Left())
+ nVisibleLeft = aModelArea.Left();
+ }
+
+ const Point aRequestedTopLeft (nVisibleLeft, nVisibleTop);
+ if (aRequestedTopLeft == aVisibleArea.TopLeft())
+ return ::boost::optional<Point>();
+ else
+ return ::boost::optional<Point>(aRequestedTopLeft);
+}
+
+
+
+
+//===== VisibleAreaManager::TemporaryDisabler =================================
+
+VisibleAreaManager::TemporaryDisabler::TemporaryDisabler (SlideSorter& rSlideSorter)
+ : mrVisibleAreaManager(rSlideSorter.GetController().GetVisibleAreaManager())
+{
+ ++mrVisibleAreaManager.mnDisableCount;
+}
+
+
+
+
+VisibleAreaManager::TemporaryDisabler::~TemporaryDisabler (void)
+{
+ --mrVisibleAreaManager.mnDisableCount;
+}
+
+
+
+//===== VerticalVisibleAreaScroller ===========================================
+
+namespace {
+
+const static sal_Int32 gnMaxScrollDistance = 300;
+
+VisibleAreaScroller::VisibleAreaScroller (
+ SlideSorter& rSlideSorter,
+ const Point aStart,
+ const Point aEnd)
+ : mrSlideSorter(rSlideSorter),
+ maStart(aStart),
+ maEnd(aEnd),
+ maAccelerationFunction(
+ controller::AnimationParametricFunction(
+ controller::AnimationBezierFunction (0.1,0.6)))
+{
+ // When the distance to scroll is larger than a threshold then first
+ // jump to within this distance of the final value and start the
+ // animation from there.
+ if (abs(aStart.X()-aEnd.X()) > gnMaxScrollDistance)
+ {
+ if (aStart.X() < aEnd.X())
+ maStart.X() = aEnd.X()-gnMaxScrollDistance;
+ else
+ maStart.X() = aEnd.X()+gnMaxScrollDistance;
+ }
+ if (abs(aStart.Y()-aEnd.Y()) > gnMaxScrollDistance)
+ {
+ if (aStart.Y() < aEnd.Y())
+ maStart.Y() = aEnd.Y()-gnMaxScrollDistance;
+ else
+ maStart.Y() = aEnd.Y()+gnMaxScrollDistance;
+ }
+}
+
+
+
+
+void VisibleAreaScroller::operator() (const double nTime)
+{
+ const double nLocalTime (maAccelerationFunction(nTime));
+ mrSlideSorter.GetController().GetScrollBarManager().SetTopLeft(
+ Point(
+ sal_Int32(0.5 + maStart.X() * (1.0 - nLocalTime) + maEnd.X() * nLocalTime),
+ sal_Int32 (0.5 + maStart.Y() * (1.0 - nLocalTime) + maEnd.Y() * nLocalTime)));
+}
+
+} // end of anonymous namespace
+
+} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/makefile.mk b/sd/source/ui/slidesorter/controller/makefile.mk
index 8ab63ddf776c..460ef16ed3f1 100644..100755
--- a/sd/source/ui/slidesorter/controller/makefile.mk
+++ b/sd/source/ui/slidesorter/controller/makefile.mk
@@ -45,25 +45,23 @@ PRJINC=..$/..
SLOFILES = \
$(SLO)$/SlideSorterController.obj \
$(SLO)$/SlsAnimator.obj \
+ $(SLO)$/SlsAnimationFunction.obj \
$(SLO)$/SlsClipboard.obj \
$(SLO)$/SlsCurrentSlideManager.obj \
+ $(SLO)$/SlsDragAndDropContext.obj \
$(SLO)$/SlsFocusManager.obj \
+ $(SLO)$/SlsInsertionIndicatorHandler.obj\
$(SLO)$/SlsListener.obj \
- $(SLO)$/SlsPageObjectFactory.obj \
$(SLO)$/SlsPageSelector.obj \
$(SLO)$/SlsProperties.obj \
$(SLO)$/SlsScrollBarManager.obj \
$(SLO)$/SlsSelectionCommand.obj \
+ $(SLO)$/SlsSelectionFunction.obj \
$(SLO)$/SlsSelectionManager.obj \
+ $(SLO)$/SlsSelectionObserver.obj \
$(SLO)$/SlsSlotManager.obj \
$(SLO)$/SlsTransferable.obj \
- \
- $(SLO)$/SlsHideSlideFunction.obj \
- $(SLO)$/SlsSelectionFunction.obj \
- $(SLO)$/SlsSlideFunction.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/SlideSorterController.obj
+ $(SLO)$/SlsVisibleAreaManager.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
index de5fec6dadd8..aaf99ad19886 100644..100755
--- a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
@@ -34,8 +34,8 @@
#include <boost/shared_ptr.hpp>
#include <vector>
-class BitmapEx;
class SdrPage;
+class Bitmap;
namespace sd { namespace slidesorter { namespace cache {
@@ -56,7 +56,7 @@ public:
*/
virtual void NotifyPreviewCreation (
CacheKey aKey,
- const ::boost::shared_ptr<BitmapEx>& rPreview) = 0;
+ const Bitmap& rPreview) = 0;
/** Called to determine whether the system is idle and a preview can be
created without annoying the user.
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index 0eadb8beec1c..026235861e66 100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -31,10 +31,10 @@
#include "cache/SlsCacheContext.hxx"
#include <sal/types.h>
-#include <vcl/bitmapex.hxx>
-#include <boost/function.hpp>
+#include <tools/gen.hxx>
#include <boost/scoped_ptr.hpp>
-#include <boost/shared_ptr.hpp>
+#include <vcl/bitmap.hxx>
+
namespace sd { namespace slidesorter { namespace view {
class PageObjectViewObjectContact;
@@ -88,37 +88,68 @@ public:
*/
PageCache (
const Size& rPreviewSize,
+ const bool bDoSuperSampling,
const SharedCacheContext& rpCacheContext);
~PageCache (void);
- void ChangeSize(const Size& rPreviewSize);
+ void ChangeSize(
+ const Size& rPreviewSize,
+ const bool bDoSuperSampling);
/** Request a preview bitmap for the specified page object in the
specified size. The returned bitmap may be a preview of the
preview, i.e. either a scaled (up or down) version of a previous
preview (of the wrong size) or an empty bitmap. In this case a
request for the generation of a new preview is created and inserted
- into the request queue. When the preview is available the page
- shape will be told to paint itself again. When it then calls this
- method again if receives the correctly sized preview bitmap.
+ into the request queue. When the preview is available in the right
+ size the page shape will be told to paint itself again. When it
+ then calls this method again if receives the correctly sized preview
+ bitmap.
@param rRequestData
This data is used to determine the preview.
- @param rSize
- The size of the requested preview bitmap.
+ @param bResize
+ When <TRUE/> then when the available bitmap has not the
+ requested size, it is scaled before it is returned. When
+ <FALSE/> then the bitmap is returned in the wrong size and it is
+ the task of the caller to scale it.
@return
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- BitmapEx GetPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
+ Bitmap GetPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+
+ Bitmap GetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const bool bResize);
+ void SetMarkedPreviewBitmap (
+ const CacheKey aKey,
+ const Bitmap& rBitmap);
+
+ /** When the requested preview bitmap does not yet exist or is not
+ up-to-date then the rendering of one is scheduled. Otherwise this
+ method does nothing.
+ */
+ void RequestPreviewBitmap (const CacheKey aKey);
+
+ /** Tell the cache that the bitmap associated with the given request
+ data is not up-to-date anymore. This will invalidate all previews
+ in other caches that represent the same page as well.
+ @param bRequestPreview
+ When <TRUE/> then a new preview is requested and will lead
+ eventually to a repaint of the associated page object.
+ */
+ void InvalidatePreviewBitmap (
+ const CacheKey aKey,
+ const bool bRequestPreview);
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested new bitmap.
*/
- void ReleasePreviewBitmap (CacheKey aKey);
+ void ReleasePreviewBitmap (const CacheKey aKey);
/** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has
@@ -128,14 +159,14 @@ public:
are created. When it is <FALSE/> the existing previews are only
marked as not being up-to-date anymore.
*/
- void InvalidateCache (bool bUpdateCache = true);
+ void InvalidateCache (const bool bUpdateCache = true);
/** With the precious flag you can control whether a bitmap can be
removed or reduced in size to make room for other bitmaps or is so
precious that it will not touched. A typical use is to set the
precious flag for exactly the visible pages.
*/
- void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
+ void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious);
void Pause (void);
void Resume (void);
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
index a3150ff65df5..0e9407b6db75 100644..100755
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCacheManager.hxx
@@ -104,16 +104,27 @@ public:
marked as out-of-date and will be re-created when they are requested
the next time.
*/
- void InvalidatePreviewBitmap (
+ bool InvalidatePreviewBitmap (
DocumentKey pDocument,
const SdrPage* pPage);
+ /** Invalidate the preview bitmaps for all slides that belong to the
+ specified document. This is necessary after model changes that
+ affect e.g. page number fiels.
+ */
+ void InvalidateAllPreviewBitmaps (DocumentKey pDocument);
+
/** Invalidate all the caches that are currently in use and destroy
those that are not. This is used for example when the high contrast
mode is turned on or off.
*/
void InvalidateAllCaches (void);
+ /** Call this method when a page has been deleted and its preview
+ is not needed anymore.
+ */
+ void ReleasePreviewBitmap (const SdrPage* pPage);
+
private:
/** Singleton instance of the cache manager. Note that this is a weak
pointer. The (implementation class of) ViewShellBase holds a
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index be2f09b58f73..4e7628450ca3 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -38,7 +38,6 @@
#include <sfx2/viewfac.hxx>
#include <tools/link.hxx>
#include <tools/gen.hxx>
-#include <memory>
#include <comphelper/implementationreference.hxx>
namespace sd { namespace slidesorter {
@@ -62,12 +61,15 @@ class Animator;
class Clipboard;
class CurrentSlideManager;
class FocusManager;
+class InsertionIndicatorHandler;
class Listener;
class PageSelector;
-class Properties;
class ScrollBarManager;
+class SelectionFunction;
class SelectionManager;
+class SelectionObserver;
class SlotManager;
+class VisibleAreaManager;
class SlideSorterController
{
@@ -86,6 +88,8 @@ public:
virtual ~SlideSorterController (void);
+ void Dispose (void);
+
/** Place and size the scroll bars and the browser window so that the
given rectangle is filled.
@return
@@ -107,7 +111,8 @@ public:
Rectangle Rearrange (bool bForce = false);
/** Return the descriptor of the page that is rendered under the
- given position.
+ given position. This takes the IsOnlyPreviewTriggersMouseOver
+ property into account.
@return
Returns a pointer to a page descriptor instead of a
reference because when no page is found at the position
@@ -126,9 +131,7 @@ public:
::boost::shared_ptr<CurrentSlideManager> GetCurrentSlideManager (void) const;
::boost::shared_ptr<SlotManager> GetSlotManager (void) const;
::boost::shared_ptr<SelectionManager> GetSelectionManager (void) const;
-
- // forward VCLs PrePaint window event to DrawingLayer
- void PrePaint();
+ ::boost::shared_ptr<InsertionIndicatorHandler> GetInsertionIndicatorHandler (void) const;
/** This method forwards the call to the SlideSorterView and executes
pending operations like moving selected pages into the visible area.
@@ -184,6 +187,12 @@ public:
*/
virtual FunctionReference CreateSelectionFunction (SfxRequest& rRequest);
+ /** When the current function of the view shell is the slide sorter
+ selection function then return a reference to it. Otherwise return
+ an empty reference.
+ */
+ ::rtl::Reference<SelectionFunction> GetCurrentSelectionFunction (void);
+
/** Prepare for a change of the edit mode. Depending on the current
edit mode we may save the selection so that it can be restored when
later changing back to the current edit mode.
@@ -220,11 +229,6 @@ public:
*/
bool IsContextMenuOpen (void) const;
- /** Return a collection of properties that are used througout the slide
- sorter.
- */
- ::boost::shared_ptr<Properties> GetProperties (void) const;
-
/** Provide the set of pages to be displayed in the slide sorter. The
GetDocumentSlides() method can be found only in the SlideSorterModel.
*/
@@ -234,18 +238,24 @@ public:
*/
::boost::shared_ptr<Animator> GetAnimator (void) const;
+ VisibleAreaManager& GetVisibleAreaManager (void) const;
+
+ void CheckForMasterPageAssignment (void);
+
private:
SlideSorter& mrSlideSorter;
model::SlideSorterModel& mrModel;
view::SlideSorterView& mrView;
- ::std::auto_ptr<PageSelector> mpPageSelector;
- ::std::auto_ptr<FocusManager> mpFocusManager;
+ ::boost::scoped_ptr<PageSelector> mpPageSelector;
+ ::boost::scoped_ptr<FocusManager> mpFocusManager;
::boost::shared_ptr<SlotManager> mpSlotManager;
- ::std::auto_ptr<controller::Clipboard> mpClipboard;
- ::std::auto_ptr<ScrollBarManager> mpScrollBarManager;
+ ::boost::scoped_ptr<controller::Clipboard> mpClipboard;
+ ::boost::scoped_ptr<ScrollBarManager> mpScrollBarManager;
mutable ::boost::shared_ptr<CurrentSlideManager> mpCurrentSlideManager;
::boost::shared_ptr<SelectionManager> mpSelectionManager;
+ ::boost::shared_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler;
::boost::shared_ptr<Animator> mpAnimator;
+ ::boost::scoped_ptr<VisibleAreaManager> mpVisibleAreaManager;
// The listener listens to UNO events and thus is a UNO object.
// For proper life time management and at the same time free access to
@@ -253,6 +263,7 @@ private:
::rtl::Reference<controller::Listener> mpListener;
int mnModelChangeLockCount;
+ bool mbIsForcedRearrangePending;
bool mbPreModelChangeDone;
bool mbPostModelChangePending;
@@ -287,11 +298,6 @@ private:
*/
bool mbIsContextMenuOpen;
- /** Some slide sorter wide properties that are used in different
- classes.
- */
- ::boost::shared_ptr<Properties> mpProperties;
-
/** Delete the given list of normal pages. This method is a helper
function for DeleteSelectedPages().
@param rSelectedNormalPages
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
new file mode 100644
index 000000000000..38d0b2b22749
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx
@@ -0,0 +1,180 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_CONTROLLER_ANIMATION_FUNCTION_HXX
+#define SD_SLIDESORTER_CONTROLLER_ANIMATION_FUNCTION_HXX
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include <basegfx/point/b2dpoint.hxx>
+#include <boost/noncopyable.hpp>
+#include <boost/function.hpp>
+#include <tools/gen.hxx>
+#include <vector>
+
+namespace sd { namespace slidesorter { namespace view {
+class SlideSorterView;
+} } }
+
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+/** A collection of functions that are usefull when creating animations.
+ They are collected here until a better place is found.
+*/
+class AnimationFunction
+ : private ::boost::noncopyable
+{
+public:
+ /** Acceleration function that maps [0,1] to [0,1] linearly, ie it
+ returns the given time value unaltered.
+ */
+ static double Linear (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,1]. Speed starts fast
+ and ends slow following the sine function.
+ */
+ static double FastInSlowOut_Sine (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,1]. Speed starts fast
+ and ends slow following the square root function.
+ */
+ static double FastInSlowOut_Root (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,0]. Speed starts slow,
+ rises, drops and ends slow following the sine function.
+ */
+ static double SlowInSlowOut_0to0_Sine (const double nTime);
+
+ /** Acceleration function that maps [0,1] to [0,0]. Speed starts slow,
+ rises and drops several times and ends slow following multiple
+ cycles of the the sine function.
+ */
+ static double Vibrate_Sine (const double nTime);
+
+ /** Scale point linearly.
+ */
+ static Point ScalePoint (const Point& rPoint, const double nTime);
+
+ /** Blend two points together according to the given weight.
+ */
+ static double Blend (const double nStartValue, const double nEndValue, const double nWeight);
+
+ /** Apply a gradual visual state change. The kind of change, i.e. the
+ previous and the new states are expected to be already set. This
+ method only adjusts the blending of the visual representation from
+ one state to the other.
+ */
+ static void ApplyVisualStateChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nTime);
+
+ /** Apply a gradual change of a previously set offset to the location of
+ a page object.
+ */
+ static void ApplyLocationOffsetChange (
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const Point aLocationOffset);
+
+ /** Apply a gradual change the alpha value from the old value to a
+ new value (set prior to this call.)
+ */
+ static void ApplyButtonAlphaChange(
+ const model::SharedPageDescriptor& rpDescriptor,
+ view::SlideSorterView& rView,
+ const double nButtonAlpha,
+ const double nButtonBarAlpha);
+};
+
+
+
+
+class AnimationBezierFunction
+{
+public:
+ /** Create a cubic bezier curve whose start and end points are given
+ implicitly as P0=(0,0) and P3=(1,1).
+ */
+ AnimationBezierFunction (
+ const double nX1,
+ const double nY1,
+ const double nX2,
+ const double nY2);
+
+ /** Create a cubic bezier curve whose start and end points are given
+ implicitly as P0=(0,0) and P3=(1,1). The second control point is
+ implicitly given as P2=(1-nY1,1-nX1).
+ */
+ AnimationBezierFunction (
+ const double nX1,
+ const double nY1);
+
+ ::basegfx::B2DPoint operator() (const double nT);
+
+private:
+ const double mnX1;
+ const double mnY1;
+ const double mnX2;
+ const double mnY2;
+
+ double EvaluateComponent (
+ const double nT,
+ const double nV1,
+ const double nV2);
+};
+
+
+
+
+/** Turn a parametric function into one whose y-Values depend on its
+ x-Values. Note a lot of interpolation takes place. The resulting
+ accuracy should be good enough for the purpose of acceleration
+ function for animations.
+*/
+class AnimationParametricFunction
+{
+public:
+ typedef ::boost::function<basegfx::B2DPoint(double)> ParametricFunction;
+ AnimationParametricFunction (const ParametricFunction& rFunction);
+
+ double operator() (const double nX);
+
+private:
+ /** y-Values of the parametric function given to the constructor
+ evaluated (and interpolated) for evenly spaced x-Values.
+ */
+ ::std::vector<double> maY;
+};
+
+
+
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
index 3fa16dee7f65..e06bc6ca6708 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx
@@ -30,6 +30,8 @@
#define SD_SLIDESORTER_CONTROLLER_ANIMATOR_HXX
#include "SlideSorter.hxx"
+#include "view/SlideSorterView.hxx"
+#include <canvas/elapsedtime.hxx>
#include <vcl/timer.hxx>
#include <sal/types.h>
#include <vector>
@@ -47,51 +49,94 @@ class Animator
: private ::boost::noncopyable
{
public:
+ /** In some circumstances we have to avoid animation and jump to the
+ final animation state immediately. Use this enum instead of a bool
+ to be more expressive.
+ */
+ enum AnimationMode { AM_Animated, AM_Immediate };
+
Animator (SlideSorter& rSlideSorter);
~Animator (void);
+ /** When disposed the animator will stop its work immediately and not
+ process any timer events anymore.
+ */
+ void Dispose (void);
+
/** An animation object is called with values between 0 and 1 as single
argument to its operator() method.
*/
- typedef ::boost::function1<void, double> AnimationFunction;
+ typedef ::boost::function1<void, double> AnimationFunctor;
+ typedef ::boost::function0<void> FinishFunctor;
+
+ typedef sal_Int32 AnimationId;
+ static const AnimationId NotAnAnimationId = -1;
/** Schedule a new animation for execution. The () operator of that
animation will be called with increasing values between 0 and 1 for
the specified duration.
@param rAnimation
The animation operation.
+ @param nStartOffset
+ Time in milli seconds before the animation is started.
@param nDuration
The duration in milli seconds.
*/
- void AddAnimation (
- const AnimationFunction& rAnimation,
- const sal_Int32 nDuration);
+ AnimationId AddAnimation (
+ const AnimationFunctor& rAnimation,
+ const sal_Int32 nStartOffset,
+ const sal_Int32 nDuration,
+ const FinishFunctor& rFinishFunctor = FinishFunctor());
+
+ AnimationId AddInfiniteAnimation (
+ const AnimationFunctor& rAnimation,
+ const double nDelta);
+
+ /** Abort and remove an animation. In order to reduce the bookkeeping
+ on the caller side, it is OK to call this method with an animation
+ function that is not currently being animated. Such a call is
+ silently ignored.
+ */
+ void RemoveAnimation (const AnimationId nAnimationId);
+
+ /** A typical use case for this method is the temporary shutdown of the
+ slidesorter when the slide sorter bar is put into a cache due to a
+ change of the edit mode.
+ */
+ void RemoveAllAnimations (void);
private:
SlideSorter& mrSlideSorter;
Timer maTimer;
-
+ bool mbIsDisposed;
class Animation;
typedef ::std::vector<boost::shared_ptr<Animation> > AnimationList;
AnimationList maAnimations;
+ ::canvas::tools::ElapsedTime maElapsedTime;
- class DrawLock;
- ::boost::scoped_ptr<DrawLock> mpDrawLock;
+ ::boost::scoped_ptr<view::SlideSorterView::DrawLock> mpDrawLock;
+
+ AnimationId mnNextAnimationId;
DECL_LINK(TimeoutHandler, Timer*);
/** Execute one step of every active animation.
+ @param nTime
+ Time measured in milli seconds with some arbitrary reference point.
@return
When one or more animation has finished then <TRUE/> is
returned. Call CleanUpAnimationList() in this case.
*/
- bool ServeAnimations (void);
+ bool ProcessAnimations (const double nTime);
/** Remove animations that have expired.
*/
void CleanUpAnimationList (void);
+
+ void RequestNextFrame (const double nFrameStart = 0);
};
+
} } } // end of namespace ::sd::slidesorter::controller
#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index a475b7a7166b..fc97dd32829a 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -25,11 +25,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#ifndef SD_SLIDESORTER_CLIPBOARD
#define SD_SLIDESORTER_CLIPBOARD
#include "ViewClipboard.hxx"
-
+#include "controller/SlsSelectionObserver.hxx"
#include <sal/types.h>
#include <tools/solar.h>
#include <svx/svdpage.hxx>
@@ -87,23 +88,25 @@ public:
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND );
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND );
sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow = NULL,
- USHORT nPage = SDRPAGE_NOTFOUND,
- USHORT nLayer = SDRPAGE_NOTFOUND);
+ sal_uInt16 nPage = SDRPAGE_NOTFOUND,
+ sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
+
+ void Abort (void);
protected:
- virtual USHORT DetermineInsertPosition (
+ virtual sal_uInt16 DetermineInsertPosition (
const SdTransferable& rTransferable);
- virtual USHORT InsertSlides (
+ virtual sal_uInt16 InsertSlides (
const SdTransferable& rTransferable,
- USHORT nInsertPosition);
+ sal_uInt16 nInsertPosition);
private:
SlideSorter& mrSlideSorter;
@@ -124,10 +127,19 @@ private:
/** When pages are moved or copied then the selection of the slide
sorter has to be updated. This flag is used to remember whether the
- selection has to be updated or can stay as it is (FALSE).
+ selection has to be updated or can stay as it is (sal_False).
*/
bool mbUpdateSelectionPending;
+ /** Used when a drop is executed to combine all undo actions into one.
+ Typically created in ExecuteDrop() and released in DragFinish().
+ */
+ class UndoContext;
+ ::boost::scoped_ptr<UndoContext> mpUndoContext;
+
+ ::boost::scoped_ptr<SelectionObserver::Context> mpSelectionObserverContext;
+ sal_uLong mnDragFinishedUserEventId;
+
void CreateSlideTransferable (
::Window* pWindow,
bool bDrag);
@@ -207,8 +219,13 @@ private:
const void* pDropEvent ,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer);
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer);
+
+ /** Asynchronous part of DragFinished. The argument is the sal_Int8
+ nDropAction, disguised as void*.
+ */
+ DECL_LINK(ProcessDragFinished, void*);
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
index 6bc502be4768..8bc96827c02e 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
@@ -30,6 +30,8 @@
#define SD_SLIDESORTER_CURRENT_SLIDE_MANAGER_HXX
#include "model/SlsSharedPageDescriptor.hxx"
+#include <vcl/timer.hxx>
+#include <tools/link.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
class SdPage;
@@ -44,6 +46,10 @@ namespace sd { namespace slidesorter { namespace controller {
/** Manage the current slide. This includes setting the according flags at
the PageDescriptor objects and setting the current slide at the main
view shell.
+
+ Switching pages is triggered only after a little delay. This allows
+ fast travelling through a larger set of slides without having to wait
+ for the edit view to update its content after every slide change.
*/
class CurrentSlideManager
{
@@ -58,14 +64,24 @@ public:
/** Call this when the current page of the main view shell has been
switched. Use SwitchCurrentSlide() to initiate such a switch.
*/
- void CurrentSlideHasChanged (const sal_Int32 nSlideIndex);
+ void NotifyCurrentSlideChange (const sal_Int32 nSlideIndex);
+ void NotifyCurrentSlideChange (const SdPage* pPage);
/** Call this method to switch the current page of the main view shell
to the given slide. Use CurrentSlideHasChanged() when the current
slide change has been initiated by someone else.
+ @param nSlideIndex
+ Zero based index in the range [0,number-of-slides).
+ @param bUpdateSelection
+ When <TRUE/> then the page selection is cleared and only the new
+ current slide is selected.
*/
- void SwitchCurrentSlide (const sal_Int32 nSlideIndex);
- void SwitchCurrentSlide (const model::SharedPageDescriptor& rpSlide);
+ void SwitchCurrentSlide (
+ const sal_Int32 nSlideIndex,
+ const bool bUpdateSelection = false);
+ void SwitchCurrentSlide (
+ const model::SharedPageDescriptor& rpSlide,
+ const bool bUpdateSelection = false);
/** Return the page descriptor for the current slide. Note, that when
there is no current slide then the returned pointer is empty.
@@ -84,9 +100,14 @@ private:
SlideSorter& mrSlideSorter;
sal_Int32 mnCurrentSlideIndex;
model::SharedPageDescriptor mpCurrentSlide;
+ /** Timer to control the delay after which to ask
+ XController/ViewShellBase to switch to another slide.
+ */
+ Timer maSwitchPageDelayTimer;
bool IsCurrentSlideIsValid (void);
void SetCurrentSlideAtViewShellBase (const model::SharedPageDescriptor& rpSlide);
+ void SetCurrentSlideAtTabControl (const model::SharedPageDescriptor& rpSlide);
void SetCurrentSlideAtXController (const model::SharedPageDescriptor& rpSlide);
/** When switching from one slide to a new current slide then this
@@ -98,6 +119,8 @@ private:
method connects to the new current slide.
*/
void AcquireCurrentSlide (const sal_Int32 nSlideIndex);
+
+ DECL_LINK(SwitchPageCallback,void*);
};
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
index 9a3df93f5f96..d077e64d5fbb 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
@@ -121,16 +121,6 @@ public:
*/
sal_Int32 GetFocusedPageIndex (void) const;
- /** DEPRECATED. (Use equivalent SetFocusedPage(sal_Int32) instead.
-
- Set the focus to the page with the given index. This does not make
- the focus visible.
- @param nPageIndex
- Index of a page as it is accepted by the slide sorter model.
- The index is not checked for validity.
- */
- void FocusPage (sal_Int32 nPageIndex);
-
/** Set the focused page to the one described by the given page
descriptor. The visibility of the focus indicator is not modified.
@param rDescriptor
@@ -146,6 +136,8 @@ public:
*/
void SetFocusedPage (sal_Int32 nPageIndex);
+ void SetFocusedPageToCurrentPage (void);
+
/** Return <TRUE/> when the focus inidcator is currently shown. A
prerequisite is that the window managed by this focus manager has
the input focus as indicated by a <TRUE/> return value of
@@ -204,6 +196,12 @@ private:
::std::vector<Link> maFocusChangeListeners;
+ /** When vertical wrap is active then pressing UP in the top row moves
+ the focus to the bottom row, DOWN in the bottom row moves the focus
+ to the top row.
+ */
+ bool mbIsVerticalWrapActive;
+
/** Reset the focus state of the given descriptor and request a repaint
so that the focus indicator is hidden.
@param pDescriptor
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
new file mode 100644
index 000000000000..e257c5729b10
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsInsertionIndicatorHandler.hxx
@@ -0,0 +1,153 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_INSERTION_INDICATOR_HANDLER_HXX
+#define SD_SLIDESORTER_INSERTION_INDICATOR_HANDLER_HXX
+
+#include "view/SlsInsertAnimator.hxx"
+
+#include "view/SlsLayouter.hxx"
+
+namespace sd { namespace slidesorter { class SlideSorter; } }
+namespace sd { namespace slidesorter { namespace model {
+class PageEnumeration;
+} } }
+namespace sd { namespace slidesorter { namespace view {
+class InsertAnimator;
+class InsertionIndicatorOverlay;
+} } }
+
+
+namespace sd { namespace slidesorter { namespace controller {
+
+class Transferable;
+
+
+/** Manage the visibility and location of the insertion indicator. Its
+ actual display is controlled by the InsertionIndicatorOverlay.
+*/
+class InsertionIndicatorHandler
+{
+public:
+ InsertionIndicatorHandler (SlideSorter& rSlideSorter);
+ ~InsertionIndicatorHandler (void);
+
+ enum Mode { CopyMode, MoveMode, UnknownMode };
+ static Mode GetModeFromDndAction (const sal_Int8 nDndAction);
+
+ /** Activate the insertion marker at the given coordinates.
+ */
+ void Start (const bool bIsOverSourceView);
+
+ /** Deactivate the insertion marker.
+ */
+ void End (const controller::Animator::AnimationMode eMode);
+
+ /** This context make sure that the insertion indicator is shown
+ (provided that the clipboard is not empty) while the context is
+ alive. Typically used while a context menu is displayed.
+ */
+ class ForceShowContext
+ {
+ public:
+ ForceShowContext (const ::boost::shared_ptr<InsertionIndicatorHandler>& rpHandler);
+ ~ForceShowContext (void);
+ private:
+ const ::boost::shared_ptr<InsertionIndicatorHandler> mpHandler;
+ };
+
+ /** Update the indicator icon from the current transferable (from the
+ clipboard or an active drag and drop operation.)
+ */
+ void UpdateIndicatorIcon (const Transferable* pTransferable);
+
+ /** Set the position of the insertion marker to the given coordinates.
+ */
+ void UpdatePosition (
+ const Point& rMouseModelPosition,
+ const Mode eMode);
+ void UpdatePosition (
+ const Point& rMouseModelPosition,
+ const sal_Int8 nDndAction);
+
+ /** Return whether the insertion marker is active.
+ */
+ bool IsActive (void) const;
+
+ /** Return the insertion index that corresponds with the current
+ graphical location of the insertion indicator.
+ */
+ sal_Int32 GetInsertionPageIndex (void) const;
+
+ /** Determine whether moving the current selection to the current
+ position of the insertion marker would alter the document. This
+ would be the case when the selection is not consecutive or would be
+ moved to a position outside and not adjacent to the selection.
+ */
+ bool IsInsertionTrivial (
+ const sal_Int32 nInsertionIndex,
+ const Mode eMode) const;
+ /** This method is like the other variant. It operates implicitly
+ on the current insertion index as would be returned by
+ GetInsertionPageIndex().
+ */
+ bool IsInsertionTrivial (const sal_Int8 nDndAction);
+
+private:
+ SlideSorter& mrSlideSorter;
+ ::boost::shared_ptr<view::InsertAnimator> mpInsertAnimator;
+ ::boost::shared_ptr<view::InsertionIndicatorOverlay> mpInsertionIndicatorOverlay;
+ view::InsertPosition maInsertPosition;
+ Mode meMode;
+ bool mbIsInsertionTrivial;
+ bool mbIsActive;
+ bool mbIsReadOnly;
+ bool mbIsOverSourceView;
+ Size maIconSize;
+ bool mbIsForcedShow;
+
+ void SetPosition (
+ const Point& rPoint,
+ const Mode eMode);
+ ::boost::shared_ptr<view::InsertAnimator> GetInsertAnimator (void);
+
+ /** Make the insertion indicator visible (that is the show part) and
+ keep it visible, even when the mouse leaves the window (that is the
+ force part). We need this when a context menu is displayed (mouse
+ over the popup menu triggers a mouse leave event) while the
+ insertion indicator remains visible in the background.
+
+ In effect all calls to End() are ignored until ForceEnd() is called.
+ */
+ void ForceShow (void);
+ void ForceEnd (void);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
index 58c44698c7ec..2aa7ee13f873 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
@@ -70,16 +70,29 @@ public:
void SelectAllPages (void);
void DeselectAllPages (void);
+
/** Update the selection state of all page descriptors to be the same as
- that of the pages of the SdDrawDocument they describe and issue
+ that of the corresponding pages of the SdPage objects and issue
redraw requests where necessary.
*/
- void UpdateAllPages (void);
+ void GetCoreSelection (void);
+
+ /** Update the selection state of the SdPage objects to be the same as
+ that of the correspinding page descriptors.
+ */
+ void SetCoreSelection (void);
+ /** Select the specified descriptor. The selection state of the other
+ descriptors is not affected.
+ */
void SelectPage (int nPageIndex);
- /** Select the descriptor that is associated with the given page.
+ /** Select the descriptor that is associated with the given page. The
+ selection state of the other descriptors is not affected.
*/
void SelectPage (const SdPage* pPage);
+ /** Select the specified descriptor. The selection state of the other
+ descriptors is not affected.
+ */
void SelectPage (const model::SharedPageDescriptor& rpDescriptor);
/** Return whether the specified page is selected. This convenience
@@ -90,9 +103,19 @@ public:
bool IsPageSelected (int nPageIndex);
/** Deselect the descriptor that is associated with the given page.
+ @param bUpdateCurrentPage
+ When <TRUE/> then the current page is updated to the first slide
+ of the remaining selection.
*/
- void DeselectPage (int nPageIndex);
- void DeselectPage (const model::SharedPageDescriptor& rpDescriptor);
+ void DeselectPage (
+ int nPageIndex,
+ const bool bUpdateCurrentPage = true);
+ void DeselectPage (
+ const SdPage* pPage,
+ const bool bUpdateCurrentPage = true);
+ void DeselectPage (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateCurrentPage = true);
/** This convenience method returns the same number of pages that
SlideSorterModel.GetPageCount() returns. It is included here so
@@ -102,35 +125,6 @@ public:
int GetPageCount (void) const;
int GetSelectedPageCount (void) const;
- void PrepareModelChange (void);
- void HandleModelChange (void);
-
- /** Enable the broadcasting of selection change events. This calls the
- SlideSorterController::SelectionHasChanged() method to do the actual
- work. When EnableBroadcasting has been called as many times as
- DisableBroadcasting() was called before and the selection has been
- changed in the mean time, this change will be broadcasted.
- */
- void EnableBroadcasting (bool bMakeSelectionVisible = true);
-
- /** Disable the broadcasting o selectio change events. Subsequent
- changes of the selection will set a flag that triggers the sending
- of events when EnableBroadcasting() is called.
- */
- void DisableBroadcasting (void);
-
- /** Return the descriptor of the most recently selected page. This
- works only when the page has not been de-selected in the mean time.
- This method helps the view when it scrolls the selection into the
- visible area.
- @return
- When the selection is empty or when the most recently selected
- page has been deselected already (but other pages are still
- selected) then NULL is returned, even when a selection did exist
- but has been cleared.
- */
- model::SharedPageDescriptor GetMostRecentlySelectedPage (void) const;
-
/** Return the anchor for a range selection. This usually is the first
selected page after all pages have been deselected.
@return
@@ -157,10 +151,46 @@ public:
the last call to GetPageSelection() it is still valid to call
this method with the selection. When pages have been inserted
or removed the result may be unexpected.
+ @param bUpdateCurrentPage
+ When <TRUE/> (the default value) then after setting the
+ selection update the current page to the first page of the
+ selection.
+ When called from withing UpdateCurrentPage() then this flag is
+ used to prevent a recursion loop.
*/
- void SetPageSelection (const ::boost::shared_ptr<PageSelection>& rSelection);
+ void SetPageSelection (
+ const ::boost::shared_ptr<PageSelection>& rSelection,
+ const bool bUpdateCurrentPage = true);
- void UpdateCurrentPage (const model::SharedPageDescriptor& rCurrentPageDescriptor);
+ /** Call this method after the the model has changed to set the number
+ of selected pages.
+ */
+ void CountSelectedPages (void);
+
+ /** Use the UpdateLock whenever you do a complex selection, i.e. call
+ more than one method in a row. An active lock prevents intermediate
+ changes of the current slide.
+ */
+ class UpdateLock
+ {
+ public:
+ UpdateLock (SlideSorter& rSlideSorter);
+ UpdateLock (PageSelector& rPageSelector);
+ ~UpdateLock (void);
+ void Release (void);
+ private:
+ PageSelector* mpSelector;
+ };
+
+ class BroadcastLock
+ {
+ public:
+ BroadcastLock (SlideSorter& rSlideSorter);
+ BroadcastLock (PageSelector& rPageSelector);
+ ~BroadcastLock (void);
+ private:
+ PageSelector& mrSelector;
+ };
private:
model::SlideSorterModel& mrModel;
@@ -173,8 +203,26 @@ private:
/// Anchor for a range selection.
model::SharedPageDescriptor mpSelectionAnchor;
model::SharedPageDescriptor mpCurrentPage;
+ sal_Int32 mnUpdateLockCount;
+ bool mbIsUpdateCurrentPagePending;
- void CountSelectedPages (void);
+ /** Enable the broadcasting of selection change events. This calls the
+ SlideSorterController::SelectionHasChanged() method to do the actual
+ work. When EnableBroadcasting has been called as many times as
+ DisableBroadcasting() was called before and the selection has been
+ changed in the mean time, this change will be broadcasted.
+ */
+ void EnableBroadcasting (void);
+
+ /** Disable the broadcasting of selection change events. Subsequent
+ changes of the selection will set a flag that triggers the sending
+ of events when EnableBroadcasting() is called.
+ */
+ void DisableBroadcasting (void);
+
+ void UpdateCurrentPage (const bool bUpdateOnlyWhenPending = false);
+
+ void CheckConsistency (void) const;
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 7a6eeac00eba..2e9a183c36d4 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
@@ -41,6 +41,11 @@ public:
Properties (void);
~Properties (void);
+ /** Call this method after receiving a VCLEVENT_APPLICATION_DATACHANGED
+ event.
+ */
+ void HandleDataChangeEvent (void);
+
/** When this method returns <TRUE/> then the current slide is
highlighted in the view. The default value is <FALSE/>.
*/
@@ -109,6 +114,15 @@ public:
bool IsUIReadOnly (void) const;
void SetUIReadOnly (const bool bIsUIReadOnly);
+ /** The mouse over effect (and whether a mouse motion starts a multi
+ selection or a drag-and-drop) can be triggered by just the preview
+ area or the whole page object area.
+ */
+ bool IsOnlyPreviewTriggersMouseOver (void) const;
+ void SetOnlyPreviewTriggersMouseOver (const bool bFlag);
+
+ bool IsHighContrastModeActive (void) const;
+
private:
bool mbIsHighlightCurrentSlide;
bool mbIsShowSelection;
@@ -121,6 +135,8 @@ private:
Color maSelectionColor;
Color maHighlightColor;
bool mbIsUIReadOnly;
+ bool mbIsOnlyPreviewTriggersMouseOver;
+ bool mbIsHighContrastModeActive;
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
index 1f9e0552f1fb..2894650da197 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
@@ -29,10 +29,13 @@
#ifndef SD_SLIDESORTER_SLIDE_SORTER_SCROLL_BAR_MANAGER_HXX
#define SD_SLIDESORTER_SLIDE_SORTER_SCROLL_BAR_MANAGER_HXX
+#include "SlideSorter.hxx"
+
#include <tools/link.hxx>
#include <tools/gen.hxx>
#include <vcl/timer.hxx>
#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
class Point;
class Rectangle;
@@ -111,30 +114,34 @@ public:
bool bScrollToCurrentPosition = true);
/** Place the scroll bars inside the given area. When the available
- area is not large enough for the content to display the resulting
- behaviour depends on the mbUseVerticalScrollBar flag. When it is
- set to true then a vertical scroll bar is shown. Otherwise the
- height of the returned area is enlarged so that the content fits
- into it.
+ area is not large enough for the content to display the horizontal
+ and/or vertical scroll bar is enabled.
@param rAvailableArea
The scroll bars will be placed inside this rectangle. It is
expected to be given in pixel relative to its parent.
+ @param bIsHorizontalScrollBarAllowed
+ Only when this flag is <TRUE/> the horizontal scroll may be
+ displayed.
+ @param bIsVerticalScrollBarAllowed
+ Only when this flag is <TRUE/> the horizontal scroll may be
+ displayed.
@return
Returns the space that remains after the scroll bars are
- placed. When the mbUseVerticalScrollBar flag is false then the
- returned rectangle may be larger than the given one.
+ placed.
*/
- Rectangle PlaceScrollBars (const Rectangle& rAvailableArea);
+ Rectangle PlaceScrollBars (
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed);
- /** Update the vertical scroll bar so that the visible area has the
- given top value.
+ /** Update the vertical and horizontal scroll bars so that the visible
+ area has the given top and left values.
*/
- void SetTop (const sal_Int32 nTop);
+ void SetTopLeft (const Point aNewTopLeft);
- /** Update the horizontal scroll bar so that the visible area has the
- given left value.
- */
- void SetLeft (const sal_Int32 nLeft);
+ sal_Int32 GetTop (void) const;
+
+ sal_Int32 GetLeft (void) const;
/** Return the width of the vertical scroll bar, which--when
shown--should be fixed in contrast to its height.
@@ -155,14 +162,35 @@ public:
/** Call this method to scroll a window while the mouse is in dragging a
selection. If the mouse is near the window border or is outside the
window then scroll the window accordingly.
+ @param rMouseWindowPosition
+ The mouse position for which the scroll amount is calculated.
+ @param rAutoScrollFunctor
+ Every time when the window is scrolled then this functor is executed.
@return
When the window is scrolled then this method returns <TRUE/>.
When the window is not changed then <FALSE/> is returned.
*/
- bool AutoScroll (const Point& rMouseWindowPosition);
+ bool AutoScroll (
+ const Point& rMouseWindowPosition,
+ const ::boost::function<void(void)>& rAutoScrollFunctor);
void StopAutoScroll (void);
+ enum Orientation { Orientation_Horizontal, Orientation_Vertical };
+ enum Unit { Unit_Pixel, Unit_Slide };
+ /** Scroll the slide sorter by setting the thumbs of the scroll bars and
+ by moving the content of the content window.
+ @param eOrientation
+ Defines whether to scroll horizontally or vertically.
+ @param eUnit
+ Defines whether the distance is a pixel value or the number of
+ slides to scroll.
+ */
+ void Scroll(
+ const Orientation eOrientation,
+ const Unit eUnit,
+ const sal_Int32 nDistance);
+
private:
SlideSorter& mrSlideSorter;
@@ -198,11 +226,14 @@ private:
*/
Timer maAutoScrollTimer;
Size maAutoScrollOffset;
+ bool mbIsAutoScrollActive;
/** The content window is the one whose view port is controlled by the
scroll bars.
*/
- ::boost::shared_ptr<sd::Window> mpContentWindow;
+ SharedSdWindow mpContentWindow;
+
+ ::boost::function<void(void)> maAutoScrollFunctor;
void SetWindowOrigin (
double nHorizontalPosition,
@@ -218,7 +249,10 @@ private:
The area that is enclosed by the scroll bars is returned. It
will be filled with the SlideSorterView.
*/
- Rectangle DetermineScrollBarVisibilities (const Rectangle& rAvailableArea);
+ Rectangle DetermineScrollBarVisibilities(
+ const Rectangle& rAvailableArea,
+ const bool bIsHorizontalScrollBarAllowed,
+ const bool bIsVerticalScrollBarAllowed);
/** Typically called by DetermineScrollBarVisibilities() this method
tests a specific configuration of the two scroll bars being visible
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index 557d4070574c..9e399d7262f8 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -29,9 +29,13 @@
#ifndef SD_SLIDESORTER_SELECTION_FUNCTION_HXX
#define SD_SLIDESORTER_SELECTION_FUNCTION_HXX
-#include "controller/SlsSlideFunction.hxx"
#include "model/SlsSharedPageDescriptor.hxx"
-#include <memory>
+#include "controller/SlsFocusManager.hxx"
+#include "controller/SlsInsertionIndicatorHandler.hxx"
+#include "fupoor.hxx"
+#include <svtools/transfer.hxx>
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
class SdSlideViewShell;
class SdWindow;
@@ -46,9 +50,12 @@ class SlideSorter;
namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
+class DragAndDropContext;
+
class SelectionFunction
- : public SlideFunction
+ : public FuPoor,
+ private ::boost::noncopyable
{
public:
TYPEINFO();
@@ -56,14 +63,13 @@ public:
static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest );
// Mouse- & Key-Events
- virtual BOOL KeyInput(const KeyEvent& rKEvt);
- virtual BOOL MouseMove(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Paint(const Rectangle&, ::sd::Window* );
+ virtual sal_Bool KeyInput(const KeyEvent& rKEvt);
+ virtual sal_Bool MouseMove(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt);
- virtual void Activate(); // Function aktivieren
- virtual void Deactivate(); // Function deaktivieren
+ virtual void Activate();
+ virtual void Deactivate();
virtual void ScrollStart();
virtual void ScrollEnd();
@@ -86,6 +92,42 @@ public:
*/
virtual bool cancel();
+ void MouseDragged (
+ const AcceptDropEvent& rEvent,
+ const sal_Int8 nDragAction);
+
+ /** Turn of substitution display and insertion indicator.
+ */
+ void NotifyDragFinished (void);
+
+ /** Call when drag-and-drop or multi selection is started or stopped in
+ order to update permission of mouse over indication.
+ */
+ void UpdateMouseOverIndicationPermission (void);
+
+ class EventDescriptor;
+ class ModeHandler;
+ friend class ModeHandler;
+ enum Mode
+ {
+ NormalMode,
+ MultiSelectionMode,
+ DragAndDropMode,
+ ButtonMode
+ };
+ void SwitchToNormalMode (void);
+ void SwitchToDragAndDropMode(const Point aMousePosition);
+ void SwitchToMultiSelectionMode (const Point aMousePosition, const sal_uInt32 nEventCode);
+ bool SwitchToButtonMode (void);
+
+ void ResetShiftKeySelectionAnchor (void);
+ /** Special case handling for when the context menu is hidden. This
+ method will reinitialize the current mouse position to prevent the
+ mouse motion during the time the context menu is displayed from
+ being interpreted as drag-and-drop start.
+ */
+ void ResetMouseAnchor (void);
+
protected:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
@@ -97,11 +139,6 @@ protected:
virtual ~SelectionFunction();
private:
- class SubstitutionHandler;
- class EventDescriptor;
-
- /// Set in MouseButtonDown this flag indicates that a page has been hit.
- bool mbPageHit;
/// The rectangle of the mouse drag selection.
Rectangle maDragSelectionRectangle;
@@ -118,20 +155,17 @@ private:
*/
bool mbProcessingMouseButtonDown;
- ::std::auto_ptr<SubstitutionHandler> mpSubstitutionHandler;
-
- DECL_LINK( DragSlideHdl, Timer* );
- void StartDrag (void);
+ bool mbIsDeselectionPending;
- /** Set the selection to exactly the specified page and also set it as
- the current page.
+ /** Remember the slide where the shift key was pressed and started a
+ multiselection via keyboard.
*/
- void SetCurrentPage (const model::SharedPageDescriptor& rpDescriptor);
+ sal_Int32 mnShiftKeySelectionAnchor;
- /** When the view on which this selection function is working is the
- main view then the view is switched to the regular editing view.
+ /** The selection function can be in one of several mutually
+ exclusive modes.
*/
- void SwitchView (const model::SharedPageDescriptor& rpDescriptor);
+ ::boost::shared_ptr<ModeHandler> mpModeHandler;
/** Make the slide nOffset slides away of the current one the new
current slide. When the new index is outside the range of valid
@@ -142,64 +176,33 @@ private:
*/
void GotoNextPage (int nOffset);
+ /** Make the slide with the given index the new current slide.
+ @param nIndex
+ Index of the new current slide. When the new index is outside
+ the range of valid page numbers it is clipped to that range.
+ */
+ void GotoPage (int nIndex);
+
void ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent);
void ProcessKeyEvent (const KeyEvent& rEvent);
// What follows are a couple of helper methods that are used by
// ProcessMouseEvent().
- /// Select the specified page and set the selection anchor.
- void SelectHitPage (const model::SharedPageDescriptor& rpDescriptor);
- /// Deselect the specified page.
- void DeselectHitPage (const model::SharedPageDescriptor& rpDescriptor);
- /// Deselect all pages.
- void DeselectAllPages (void);
-
- /** for a possibly following mouse motion by starting the drag timer
- that after a short time of pressed but un-moved mouse starts a drag
- operation.
- */
- void PrepareMouseMotion (const Point& aMouseModelPosition);
+ void ProcessEvent (EventDescriptor& rEvent);
- /** Select all pages between and including the selection anchor and the
- specified page.
- */
- void RangeSelect (const model::SharedPageDescriptor& rpDescriptor);
+ void MoveFocus (
+ const FocusManager::FocusMoveDirection eDirection,
+ const bool bIsShiftDown,
+ const bool bIsControlDown);
- /** Start a rectangle selection at the given position.
- */
- void StartRectangleSelection (const Point& aMouseModelPosition);
-
- /** Update the rectangle selection so that the given position becomes
- the new second point of the selection rectangle.
- */
- void UpdateRectangleSelection (const Point& aMouseModelPosition);
-
- /** Select all pages that lie completly in the selection rectangle.
- */
- void ProcessRectangleSelection (bool bToggleSelection);
-
- /** Compute a numerical code that describes a mouse event and that can
- be used for fast look up of the appropriate reaction.
- */
- sal_uInt32 EncodeMouseEvent (
- const EventDescriptor& rDescriptor,
- const MouseEvent& rEvent) const;
-
- /** Compute a numerical code that describes a key event and that can
- be used for fast look up of the appropriate reaction.
- */
- sal_uInt32 EncodeKeyEvent (
- const EventDescriptor& rDescriptor,
- const KeyEvent& rEvent) const;
+ void StopDragAndDrop (void);
- void EventPreprocessing (const EventDescriptor& rEvent);
- bool EventProcessing (const EventDescriptor& rEvent);
- void EventPostprocessing (const EventDescriptor& rEvent);
+ void SwitchMode (const ::boost::shared_ptr<ModeHandler>& rpHandler);
};
} } } // end of namespace ::sd::slidesorter::controller
#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
index 344adf3e8775..05bb8ef9a895 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
@@ -30,8 +30,10 @@
#define SD_SLIDESORTER_CONTROLLER_SELECTION_MANAGER_HXX
#include "model/SlsSharedPageDescriptor.hxx"
+#include "controller/SlsAnimator.hxx"
#include <sal/types.h>
#include <tools/gen.hxx>
+#include <basegfx/range/b2irectangle.hxx>
#include <vector>
class Link;
@@ -44,6 +46,7 @@ class SlideSorter;
namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
+class SelectionObserver;
/** This class is a part of the controller and handles the selection of
slides.
@@ -63,12 +66,13 @@ public:
/** Delete the currently selected slides. When this method returns the
selection is empty.
+ @param bSelectFollowingPage
+ When <TRUE/> then after deleting the selected pages make the
+ slide after the last selected page the new current page.
+ When <FALSE/> then make the first slide before the selected
+ pages the new current slide.
*/
- void DeleteSelectedPages (void);
-
- /** Move the maked pages to a position directly after the specified page.
- */
- bool MoveSelectedPages (const sal_Int32 nTargetPage);
+ void DeleteSelectedPages (const bool bSelectFollowingPage = true);
/** Call this method after the selection has changed (possible several
calls to the PageSelector) to invalidate the relevant slots and send
@@ -76,42 +80,6 @@ public:
*/
void SelectionHasChanged (const bool bMakeSelectionVisible = true);
- /** Return <TRUE/> when the selection has changed but has not yet been
- moved to the visible area of the slide sorter view.
- */
- bool IsMakeSelectionVisiblePending (void) const;
-
- enum SelectionHint { SH_FIRST, SH_LAST, SH_RECENT };
-
- /** Try to make all currently selected page objects visible, i.e. set
- the origin so that the page objects lie inside the visible area.
- When the selection is empty then the visible area is not modified.
-
- <p>This method, and the ones is calls, look into the Properties
- object of the SlideSorter in order to determine whether the current
- selection is to be displayed centered.</p>
- @param eSelectionHint
- This is an advice on which selected page object to handle with
- the highest priority when the whole selection does not fit into
- the visible area.
- @return
- Returns the vertical translation of the visible area. It is 0
- when no update of the visible area was done.
- */
- Size MakeSelectionVisible (
- const SelectionHint eSelectionHint = SH_RECENT);
-
- /** Modify the origin of the visible area so that the given rectangle
- comes into view. This is done with the smallest change: no
- scrolling takes place when the given rectangle already lies in the
- visible area. Otherwise either the top or the bottom of the given
- rectangle is aligned with the top or the bottom of the visible area.
- @return
- Returns the vertical translation of the visible area. It is 0
- when no update of the visible area was done.
- */
- Size MakeRectangleVisible (const Rectangle& rBox);
-
/** Add a listener that is called when the selection of the slide sorter
changes.
@param rListener
@@ -144,6 +112,8 @@ public:
*/
void SetInsertionPosition (const sal_Int32 nInsertionPosition);
+ ::boost::shared_ptr<SelectionObserver> GetSelectionObserver (void) const;
+
private:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
@@ -167,6 +137,17 @@ private:
*/
sal_Int32 mnInsertionPosition;
+ /** Animation id for a scroll animation the will eventually set the top
+ and left of the visible area to maRequestedTopLeft.
+ */
+ Animator::AnimationId mnAnimationId;
+ Point maRequestedTopLeft;
+
+ class PageInsertionListener;
+ ::boost::scoped_ptr<PageInsertionListener> mpPageInsertionListener;
+
+ ::boost::shared_ptr<SelectionObserver> mpSelectionObserver;
+
/** Delete the given list of normal pages. This method is a helper
function for DeleteSelectedPages().
@param rSelectedNormalPages
@@ -180,31 +161,6 @@ private:
A list of master pages. Supplying normal pages is an error.
*/
void DeleteSelectedMasterPages (const ::std::vector<SdPage*>& rSelectedMasterPages);
-
- /** Return <TRUE/> when the given rectangle, that typically is the
- bounding box of all currently selected slides, does not fit entirely
- into the visible area of the slide sorter view.
- */
- bool DoesSelectionExceedVisibleArea (const Rectangle& rSelectionBox) const;
-
- /** When not all currently selected slides fit into the visible area of
- the slide sorter view, and thus DoesSelectionExceedVisibleArea()
- would return <TRUE/>, then it is the task of this method to
- determine which part of the selection to move into the visible area.
- @param rpFirst
- The first selected slide. Must not be an empty pointer.
- @param rpLast
- The last selected slide. Must not be an empty pointer.
- @param eSelectionHint
- This hint tells the method on which slide to concentrate,
- i.e. which slide has to be inside the returned visible area.
- @return
- Returns the new visible area.
- */
- Rectangle ResolveLargeSelection (
- const model::SharedPageDescriptor& rpFirst,
- const model::SharedPageDescriptor& rpLast,
- const SelectionHint eSelectionHint);
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
new file mode 100644
index 000000000000..0fb45b403af1
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_CONTROLLER_SELECTION_OBSERVER_HXX
+#define SD_SLIDESORTER_CONTROLLER_SELECTION_OBSERVER_HXX
+
+#include <tools/gen.hxx>
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+class SdDrawDocument;
+class SdrPage;
+
+namespace sd { namespace slidesorter { namespace controller {
+
+/** Observe insertions and deletions of pages between calls to
+ StartObservation() and EndObservation(). When the later is called
+ the selection is set to just the newly inserted pages.
+*/
+class SelectionObserver
+{
+public:
+ SelectionObserver (SlideSorter& rSlideSorter);
+ virtual ~SelectionObserver (void);
+
+ void NotifyPageEvent (const SdrPage* pPage);
+ void StartObservation (void);
+ void AbortObservation (void);
+ void EndObservation (void);
+
+ /** Use this little class instead of calling StartObservation and
+ EndObservation directly so that EndObservation is not forgotten or
+ omitted due to an exception or some break or return in the middle of
+ code.
+ */
+ class Context
+ {
+ public:
+ Context (SlideSorter& rSlideSorter);
+ ~Context(void);
+ void Abort (void);
+ private:
+ ::boost::shared_ptr<SelectionObserver> mpSelectionObserver;
+ };
+
+private:
+ SlideSorter& mrSlideSorter;
+ SdDrawDocument* mpDocument;
+ bool mbIsOvservationActive;
+
+ ::std::vector<const SdPage*> maInsertedPages;
+ ::std::vector<sal_Int32> maDeletedPages;
+};
+
+} } } // end of namespace ::sd::slidesorter::controller
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
index ca7ee78c957d..774e4c09cc7c 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
@@ -51,9 +51,9 @@ class SlideFunction
public:
TYPEINFO();
- virtual BOOL MouseMove (const MouseEvent& rMEvt);
- virtual BOOL MouseButtonUp (const MouseEvent& rMEvt);
- virtual BOOL MouseButtonDown (const MouseEvent& rMEvt);
+ virtual sal_Bool MouseMove (const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonUp (const MouseEvent& rMEvt);
+ virtual sal_Bool MouseButtonDown (const MouseEvent& rMEvt);
/** Called from ForceScroll() before the actual scrolling.
*/
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index 083267da5c07..c21df03ad6d4 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -28,6 +28,7 @@
#ifndef SD_SLIDESORTER_SLOT_MANAGER_HXX
#define SD_SLIDESORTER_SLOT_MANAGER_HXX
+#include "model/SlsSharedPageDescriptor.hxx"
#include <tools/link.hxx>
#include <memory>
#include <queue>
@@ -72,6 +73,21 @@ public:
void ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand);
+ /** Exclude or include one slide or all selected slides.
+ @param rpDescriptor
+ When the pointer is empty then apply the new state to all
+ selected pages. Otherwise apply the new state to just the
+ specified state.
+ */
+ void ChangeSlideExclusionState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bExcludeSlide);
+
+ /** Call this after a change from normal mode to master mode or back.
+ The affected slots are invalidated.
+ */
+ void NotifyEditModeChange (void);
+
private:
/// The controller for which we manage the slot calls.
SlideSorter& mrSlideSorter;
@@ -88,12 +104,19 @@ private:
*/
void RenameSlide (void);
DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog*);
- bool RenameSlideFromDrawViewShell( USHORT nPageId, const String& rName);
+ bool RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const String& rName);
/** Handle SID_INSERTPAGE slot calls.
*/
void InsertSlide (SfxRequest& rRequest);
+ void DuplicateSelectedSlides (SfxRequest& rRequest);
+
+ /** Use one of several ways to determine where to insert a new page.
+ This can be the current selection or the insertion indicator.
+ */
+ sal_Int32 GetInsertionPosition (void);
+
DECL_LINK(UserEventCallback, void*);
};
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferable.hxx b/sd/source/ui/slidesorter/inc/controller/SlsTransferable.hxx
index 84b522b5a3b7..c0a09e73bfe9 100644
--- a/sd/source/ui/slidesorter/controller/SlsTransferable.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsTransferable.hxx
@@ -1,4 +1,3 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,17 +31,13 @@
#include "sdxfer.hxx"
class SdDrawDocument;
-namespace sd
-{
- class pWorkView;
- namespace slidesorter
- {
- class SlideSorterViewShell;
- }
-}
+namespace sd { namespace slidesorter {
+class SlideSorterViewShell;
+} }
namespace sd { namespace slidesorter { namespace controller {
+
/** This class exists to have DragFinished call the correct object: the
SlideSorterViewShell instead of the old SlideView.
*/
@@ -50,18 +45,39 @@ class Transferable
: public SdTransferable
{
public:
+ class Representative
+ {
+ public:
+ Representative (const Bitmap& rBitmap, const bool bIsExcluded)
+ : maBitmap(rBitmap), mbIsExcluded(bIsExcluded) {}
+ Representative (const Representative& rOther)
+ : maBitmap(rOther.maBitmap), mbIsExcluded(rOther.mbIsExcluded) {}
+ Representative operator= (Representative& rOther)
+ { if (&rOther != this) {maBitmap = rOther.maBitmap; mbIsExcluded = rOther.mbIsExcluded; }
+ return *this;
+ }
+
+ Bitmap maBitmap;
+ bool mbIsExcluded;
+ };
+
+
Transferable (
SdDrawDocument* pSrcDoc,
::sd::View* pWorkView,
- BOOL bInitOnGetData,
- SlideSorterViewShell* pViewShell);
+ sal_Bool bInitOnGetData,
+ SlideSorterViewShell* pViewShell,
+ const ::std::vector<Representative>& rRepresentatives);
virtual ~Transferable (void);
virtual void DragFinished (sal_Int8 nDropAction);
+ const ::std::vector<Representative>& GetRepresentatives (void) const;
+
private:
SlideSorterViewShell* mpViewShell;
+ const ::std::vector<Representative> maRepresentatives;
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
};
@@ -69,5 +85,3 @@ private:
} } } // end of namespace ::sd::slidesorter::controller
#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
new file mode 100644
index 000000000000..cdaf9b1588ea
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
@@ -0,0 +1,100 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VISIBLE_AREA_MANAGER_HXX
+#define SD_SLIDESORTER_VISIBLE_AREA_MANAGER_HXX
+
+#include "controller/SlsAnimator.hxx"
+#include "model/SlsSharedPageDescriptor.hxx"
+#include <boost/noncopyable.hpp>
+#include <boost/optional.hpp>
+
+namespace sd { namespace slidesorter { namespace controller {
+
+
+/** Manage requests for scrolling page objects into view.
+*/
+class VisibleAreaManager
+ : public ::boost::noncopyable
+{
+public:
+ VisibleAreaManager (SlideSorter& rSlideSorter);
+ ~VisibleAreaManager (void);
+
+ void ActivateCurrentSlideTracking (void);
+ void DeactivateCurrentSlideTracking (void);
+
+ /** Request the current slide to be moved into the visible area.
+ This request is only obeyed when the current slide tracking is
+ active.
+ @see ActivateCurrentSlideTracking() and DeactivateCurrentSlideTracking()
+ */
+ void RequestCurrentSlideVisible (void);
+
+ /** Request to make the specified page object visible.
+ */
+ void RequestVisible (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bForce = false);
+
+ /** Temporarily disable the update of the visible area.
+ */
+ class TemporaryDisabler
+ {
+ public:
+ TemporaryDisabler (SlideSorter& rSlideSorter);
+ ~TemporaryDisabler (void);
+ private:
+ VisibleAreaManager& mrVisibleAreaManager;
+ };
+
+private:
+ SlideSorter& mrSlideSorter;
+
+ /** List of rectangle that someone wants to be moved into the visible
+ area.
+ Cleared on every call to ForgetVisibleRequests() and MakeVisible().
+ */
+ ::std::vector<Rectangle> maVisibleRequests;
+
+ /** Animation id for a scroll animation that sets the top
+ and left of the visible area to maRequestedVisibleTopLeft.
+ */
+ Animator::AnimationId mnScrollAnimationId;
+ Point maRequestedVisibleTopLeft;
+ Animator::AnimationMode meRequestedAnimationMode;
+ bool mbIsCurrentSlideTrackingActive;
+ int mnDisableCount;
+
+ void MakeVisible (void);
+ ::boost::optional<Point> GetRequestedTopLeft (void) const;
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
index cef44ec61ac3..d059b48624d2 100644
--- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
@@ -37,6 +37,7 @@ class SdDrawDocument;
#include "pres.hxx"
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <osl/mutex.hxx>
+#include <vcl/region.hxx>
#include <memory>
#include <vector>
@@ -44,6 +45,9 @@ class SdDrawDocument;
namespace css = ::com::sun::star;
+class SdrPage;
+class SdPage;
+
namespace sd { namespace slidesorter {
class SlideSorter;
} }
@@ -56,6 +60,9 @@ namespace sd { namespace slidesorter { namespace model {
class DocumentPageContainer;
+inline sal_Int32 FromCoreIndex (const sal_uInt16 nCoreIndex) { return (nCoreIndex-1)/2; }
+inline sal_uInt16 ToCoreIndex (const sal_Int32 nIndex) { return nIndex*2+1; }
+
/** The model of the slide sorter gives access to the slides that are to be
displayed in the slide sorter view. Via the SetDocumentSlides() method
this set of slides can be modified (but do not call it directly, use
@@ -65,8 +72,10 @@ class SlideSorterModel
{
public:
SlideSorterModel (SlideSorter& rSlideSorter);
+ void Init (void);
virtual ~SlideSorterModel (void);
+ void Dispose (void);
/** This method is present to let the view create a ShowView for
displaying slides.
@@ -84,6 +93,9 @@ public:
*/
bool SetEditMode (EditMode eEditMode);
+ /** Set the edit mode to that currently used by the controller.
+ */
+ bool SetEditModeFromController (void);
EditMode GetEditMode (void) const;
PageKind GetPageType (void) const;
@@ -127,6 +139,25 @@ public:
sal_Int32 GetIndex (
const ::com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage>& rxSlide) const;
+ /** Return a page descriptor for the given SdrPage. Page descriptors
+ are created on demand. The page descriptor is found (or not found)
+ in (at most) linear time. Note that all page descriptors in front of
+ the one associated with the given XDrawPage are created when not yet
+ present. When the SdrPage is not found then all descriptors are
+ created.
+ @return
+ Returns the index to the requested page descriptor or -1 when
+ there is no such page descriptor.
+ */
+ sal_Int32 GetIndex (const SdrPage* pPage) const;
+
+ /** Return an index for accessing an SdrModel that corresponds to the
+ given SlideSorterModel index. In many cases we just have to apply
+ the n*2+1 magic. Only when a special model is set, like a custom
+ slide show, then the returned value is different.
+ */
+ sal_uInt16 GetCoreIndex (const sal_Int32 nIndex) const;
+
/** Call this method after the document has changed its structure. This
will get the model in sync with the SdDrawDocument. This method
tries not to throw away to much information already gathered. This
@@ -145,16 +176,9 @@ public:
*/
void SynchronizeDocumentSelection (void);
- /** Replace the factory for the creation of the page objects and
- contacts with the given object. The old factory is destroyed.
- */
- void SetPageObjectFactory(
- ::std::auto_ptr<controller::PageObjectFactory> pPageObjectFactory);
-
- /** Return the page object factory. It none has been set so far or it
- has been reset, then a new one is created.
+ /** Set the selection of the called model to exactly that of the document.
*/
- const controller::PageObjectFactory& GetPageObjectFactory (void) const;
+ void SynchronizeModelSelection (void);
/** Return the mutex so that the caller can lock it and then safely
access the model.
@@ -180,6 +204,29 @@ public:
*/
void UpdatePageList (void);
+ bool IsReadOnly (void) const;
+
+ /** The current selection is saved by copying the ST_Selected state into
+ ST_WasSelected for slides.
+ */
+ void SaveCurrentSelection (void);
+
+ /** The current selection is restored from the ST_WasSelected state from
+ the slides.
+ @returns
+ The returned region has to be repainted to reflect the updated
+ selection states.
+ */
+ Region RestoreSelection (void);
+
+ /** Typically called from controller::Listener this method handles the
+ insertion and deletion of single pages.
+ @return
+ Returns <TRUE/> when the given page is relevant for the current
+ page kind and edit mode.
+ */
+ bool NotifyPageEvent (const SdrPage* pPage);
+
private:
mutable ::osl::Mutex maMutex;
SlideSorter& mrSlideSorter;
@@ -188,13 +235,16 @@ private:
EditMode meEditMode;
typedef ::std::vector<SharedPageDescriptor> DescriptorContainer;
mutable DescriptorContainer maPageDescriptors;
- mutable ::std::auto_ptr<controller::PageObjectFactory> mpPageObjectFactory;
/** Resize the descriptor container according to current values of
page kind and edit mode.
*/
void AdaptSize (void);
+ SdPage* GetPage (const sal_Int32 nCoreIndex) const;
+ void InsertSlide (SdPage* pPage);
+ void DeleteSlide (const SdPage* pPage);
+ void UpdateIndices (const sal_Int32 nFirstIndex);
};
} } } // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
index d184777fa605..ab699d729356 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
@@ -29,6 +29,7 @@
#ifndef SD_SLIDESORTER_PAGE_DESCRIPTOR_HXX
#define SD_SLIDESORTER_PAGE_DESCRIPTOR_HXX
+#include "model/SlsVisualState.hxx"
#include <com/sun/star/drawing/XDrawPage.hpp>
#include <tools/gen.hxx>
#include <tools/link.hxx>
@@ -37,21 +38,11 @@
#include <memory>
#include <boost/enable_shared_from_this.hpp>
+#include <boost/scoped_ptr.hpp>
-class SdPage;
-
-namespace sdr { namespace contact {
-class ObjectContact;
-} }
-
-namespace sd { namespace slidesorter { namespace view {
-class PageObject;
-class PageObjectViewObjectContact;
-} } }
-namespace sd { namespace slidesorter { namespace controller {
-class PageObjectFactory;
-} } }
+class SdPage;
+class SdrPage;
namespace sd { namespace slidesorter { namespace model {
@@ -88,8 +79,7 @@ public:
PageDescriptor (
const css::uno::Reference<css::drawing::XDrawPage>& rxPage,
SdPage* pPage,
- const sal_Int32 nIndex,
- const controller::PageObjectFactory& rPageObjectFactory);
+ const sal_Int32 nIndex);
~PageDescriptor (void);
@@ -101,33 +91,22 @@ public:
*/
css::uno::Reference<css::drawing::XDrawPage> GetXDrawPage (void) const;
- /** Return the page shape that is used for visualizing the page.
+ /** Returns the index of the page as it is displayed in the view as page
+ number. The value may differ from the index returned by the
+ XDrawPage when there are hidden slides and the XIndexAccess used to
+ access the model filters them out.
*/
- view::PageObject* GetPageObject (void);
- void ReleasePageObject (void);
+ sal_Int32 GetPageIndex (void) const;
+ void SetPageIndex (const sal_Int32 nIndex);
- /** Return <TRUE/> when the page object is fully or parially visible. */
- bool IsVisible (void) const;
+ bool UpdateMasterPage (void);
- /** Set the visible state that is returned by the IsVisible() method.
- This method is typically called by the view who renders the object
- onto the screen.
- */
- void SetVisible (bool bVisible);
+ enum State { ST_Visible, ST_Selected, ST_WasSelected,
+ ST_Focused, ST_MouseOver, ST_Current, ST_Excluded };
- /** Make sure that the page is selected and return whether the
- selection state changed.
- */
- bool Select (void);
- /** Make sure that the page is not selected and return whether the
- selection state changed.
- */
- bool Deselect (void);
+ bool HasState (const State eState) const;
- /** Return whether the page is selected (and thus bypasses the internal
- mbIsSelected flag.
- */
- bool IsSelected (void) const;
+ bool SetState (const State eState, const bool bStateValue);
/** Set the internal mbIsSelected flag to the selection state of the
page. Use this method to synchronize a page descriptor with the
@@ -138,70 +117,39 @@ public:
returned. When they were the same this method returns
<FALSE/>.
*/
- bool UpdateSelection (void);
-
- bool IsFocused (void) const;
- void SetFocus (void);
- void RemoveFocus (void);
-
- view::PageObjectViewObjectContact* GetViewObjectContact (void) const;
-
- void SetViewObjectContact (
- view::PageObjectViewObjectContact* pViewObjectContact);
+ bool GetCoreSelection (void);
- /** Return the currently used page object factory.
+ /** Set the selection flags of the SdPage objects to the corresponding
+ selection states of the page descriptors.
*/
- const controller::PageObjectFactory& GetPageObjectFactory (void) const;
+ void SetCoreSelection (void);
- /** Replace the current page object factory by the given one.
- */
- void SetPageObjectFactory (const controller::PageObjectFactory& rFactory);
-
- void SetModelBorder (const SvBorder& rBorder);
- SvBorder GetModelBorder (void) const;
+ VisualState& GetVisualState (void);
- /** The size of the area in which the page number is displayed is
- calculated by the SlideSorterView and then stored in the page
- descriptors so that the contact objects can access them. The
- contact objects can not calculate them on demand because the total
- number of slides is needed to do that and this number is not known
- to the contact objects.
- */
- void SetPageNumberAreaModelSize (const Size& rSize);
- Size GetPageNumberAreaModelSize (void) const;
-
- /** Set or revoke the state of this slide being the current slide.
- */
- void SetIsCurrentPage (const bool bIsCurrent);
+ Rectangle GetBoundingBox (void) const;
+ Point GetLocation (const bool bIgnoreLocation = false) const;
+ void SetBoundingBox (const Rectangle& rBoundingBox);
private:
SdPage* mpPage;
css::uno::Reference<css::drawing::XDrawPage> mxPage;
- /** This index is displayed as page number in the view. It may or may
- not be actual page index.
- */
- const sal_Int32 mnIndex;
-
- /// The factory that is used to create PageObject objects.
- const controller::PageObjectFactory* mpPageObjectFactory;
+ SdrPage const* mpMasterPage;
- /** The page object will be destroyed by the page into which it has
- been inserted.
+ /** This index is displayed as page number in the view. It may or may
+ not be the actual page index.
*/
- view::PageObject* mpPageObject;
-
- bool mbIsSelected;
- bool mbIsVisible;
- bool mbIsFocused;
- bool mbIsCurrent;
+ sal_Int32 mnIndex;
- view::PageObjectViewObjectContact* mpViewObjectContact;
+ Rectangle maBoundingBox;
+ VisualState maVisualState;
- /// The borders in model coordinates arround the page object.
- SvBorder maModelBorder;
+ bool mbIsSelected : 1;
+ bool mbWasSelected : 1;
+ bool mbIsVisible : 1;
+ bool mbIsFocused : 1;
+ bool mbIsCurrent : 1;
+ bool mbIsMouseOver : 1;
- /// The size of the page number area in model coordinates.
- Size maPageNumberAreaModelSize;
// Do not use the copy constructor operator. It is not implemented.
PageDescriptor (const PageDescriptor& rDescriptor);
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
index 36a49f720589..36a49f720589 100644..100755
--- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
diff --git a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
new file mode 100644
index 000000000000..03b242fdd29a
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VISUAL_STATE_HXX
+#define SD_SLIDESORTER_VISUAL_STATE_HXX
+
+#include <sal/types.h>
+#include <tools/gen.hxx>
+#include <boost/function.hpp>
+
+namespace sd { namespace slidesorter { namespace model {
+
+class PageDescriptor;
+
+/** This class gives access to values related to the visualization of page
+ objects. This includes animation state when blending from one state to
+ another.
+*/
+class VisualState
+{
+public:
+ enum State {
+ VS_Selected,
+ VS_Focused,
+ VS_Current,
+ VS_Excluded,
+ VS_None };
+
+ VisualState (const sal_Int32 nPageId);
+ ~VisualState (void);
+
+ State GetCurrentVisualState (void) const;
+ State GetOldVisualState (void) const;
+ void SetVisualState (const State eState);
+ double GetVisualStateBlend (void) const;
+ void SetVisualStateBlend (const double nBlend);
+
+ void UpdateVisualState (const PageDescriptor& rDescriptor);
+
+ void SetMouseOverState (const bool bIsMouseOver);
+
+ sal_Int32 GetStateAnimationId (void) const;
+ void SetStateAnimationId (const sal_Int32 nAnimationId);
+
+ Point GetLocationOffset (void) const;
+ bool SetLocationOffset (const Point& rPoint);
+ sal_Int32 GetLocationAnimationId (void) const;
+ void SetLocationAnimationId (const sal_Int32 nAnimationId);
+
+ double GetButtonAlpha (void) const;
+ void SetButtonAlpha (const double nAlpha);
+ double GetButtonBarAlpha (void) const;
+ void SetButtonBarAlpha (const double nAlpha);
+ sal_Int32 GetButtonAlphaAnimationId (void) const;
+ void SetButtonAlphaAnimationId (const sal_Int32 nAnimationId);
+
+ sal_Int32 mnPageId; // For debugging
+
+private:
+ State meCurrentVisualState;
+ State meOldVisualState;
+ double mnVisualStateBlend;
+ sal_Int32 mnStateAnimationId;
+ bool mbOldMouseOverState;
+ bool mbCurrentMouseOverState;
+
+ Point maLocationOffset;
+ sal_Int32 mnLocationAnimationId;
+
+ double mnButtonAlpha;
+ double mnButtonBarAlpha;
+ sal_Int32 mnButtonAlphaAnimationId;
+};
+
+} } } // end of namespace ::sd::slidesorter::model
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index b4cdfecbcd2e..099f6544f861 100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -29,28 +29,29 @@
#ifndef SD_SLIDESORTER_SLIDE_SORTER_VIEW_HXX
#define SD_SLIDESORTER_SLIDE_SORTER_VIEW_HXX
-#include "View.hxx"
-
+#include "SlideSorter.hxx"
+#include "model/SlsPageDescriptor.hxx"
#include "model/SlsSharedPageDescriptor.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsILayerPainter.hxx"
+#include "View.hxx"
#include <sfx2/viewfrm.hxx>
#include "pres.hxx"
#include <tools/gen.hxx>
+#include <svx/svdmodel.hxx>
+#include <vcl/region.hxx>
+#include <vcl/outdev.hxx>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <memory>
#include <boost/shared_ptr.hpp>
+#include <boost/noncopyable.hpp>
class Point;
-namespace sdr { namespace contact {
-class ObjectContact;
-} }
-
-namespace sd { namespace slidesorter {
-class SlideSorter;
-} }
-
namespace sd { namespace slidesorter { namespace controller {
class SlideSorterController;
+class Properties;
} } }
namespace sd { namespace slidesorter { namespace cache {
@@ -63,15 +64,20 @@ class SlideSorterModel;
namespace sd { namespace slidesorter { namespace view {
+class ButtonBar;
+class LayeredDevice;
class Layouter;
-class ViewOverlay;
+class PageObjectPainter;
+class SelectionPainter;
+class ToolTip;
class SlideSorterView
- : public View
+ : public sd::View,
+ public ::boost::noncopyable
{
public:
- TYPEINFO();
+ TYPEINFO ();
/** Create a new view for the slide sorter.
@param rViewShell
@@ -80,53 +86,24 @@ public:
*/
SlideSorterView (SlideSorter& rSlideSorter);
+ void Init (void);
virtual ~SlideSorterView (void);
+ void Dispose (void);
- enum Orientation { HORIZONTAL, VERTICAL };
- void SetOrientation (const Orientation eOrientation);
- Orientation GetOrientation (void) const;
+ /** Set the general way of layouting the page objects. Note that this
+ method does not trigger any repaints or layouts.
+ */
+ bool SetOrientation (const Layouter::Orientation eOrientation);
+ Layouter::Orientation GetOrientation (void) const;
void RequestRepaint (void);
void RequestRepaint (const model::SharedPageDescriptor& rDescriptor);
+ void RequestRepaint (const Rectangle& rRepaintBox);
+ void RequestRepaint (const Region& rRepaintRegion);
Rectangle GetModelArea (void);
- enum CoordinateSystem { CS_SCREEN, CS_MODEL };
- enum BoundingBoxType { BBT_SHAPE, BBT_INFO };
-
- /** Return the rectangle that bounds the page object represented by the
- given page descriptor.
- @param rDescriptor
- The descriptor of the page for which to return the bounding box.
- @param eCoordinateSystem
- Specifies whether to return the screen or model coordinates.
- @param eBoundingBoxType
- Specifies whether to return the bounding box of only the page
- object or the one that additionally includes other displayed
- information like page name and fader symbol.
- */
- Rectangle GetPageBoundingBox (
- const model::SharedPageDescriptor& rpDescriptor,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const;
-
- /** Return the rectangle that bounds the page object represented by the
- given page index .
- @param nIndex
- The index of the page for which to return the bounding box.
- @param eCoordinateSystem
- Specifies whether to return the screen or model coordinates.
- @param eBoundingBoxType
- Specifies whether to return the bounding box of only the page
- object or the one that additionally includes other displayed
- information like page name and fader symbol.
- */
- Rectangle GetPageBoundingBox (
- sal_Int32 nIndex,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const;
-
/** Return the index of the page that is rendered at the given position.
@param rPosition
The position is expected to be in pixel coordinates.
@@ -164,12 +141,17 @@ public:
void HandleDrawModeChange (void);
virtual void Resize (void);
- virtual void CompleteRedraw (OutputDevice* pDevice, const Region& rPaintArea, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L);
- virtual void InvalidateOneWin (
- ::Window& rWindow);
- virtual void InvalidateOneWin (
- ::Window& rWindow,
- const Rectangle& rPaintArea );
+ virtual void CompleteRedraw (
+ OutputDevice* pDevice,
+ const Region& rPaintArea,
+ sdr::contact::ViewObjectContactRedirector* pRedirector = NULL);
+ void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea);
+
+ virtual void ConfigurationChanged (
+ utl::ConfigurationBroadcaster* pBroadcaster,
+ sal_uInt32 nHint);
+
+ void HandleDataChangeEvent (void);
void Layout (void);
/** This tells the view that it has to re-determine the visibility of
@@ -179,13 +161,10 @@ public:
/** Return the window to which this view renders its output.
*/
- ::sd::Window* GetWindow (void) const;
-
+ // ::boost::shared_ptr<sd::Window> GetWindow (void) const;
::boost::shared_ptr<cache::PageCache> GetPreviewCache (void);
- view::ViewOverlay& GetOverlay (void);
-
/** Set the bounding box of the insertion marker in model coordinates.
It will be painted as a dark rectangle that fills the given box.
@@ -206,19 +185,18 @@ public:
*/
void SetSelectionRectangleVisibility (bool bVisible);
- typedef ::std::pair<sal_Int32,sal_Int32> PageRange;
/** Return the range of currently visible page objects including the
first and last one in that range.
@return
The returned pair of page object indices is empty when the
second index is lower than the first.
*/
- PageRange GetVisiblePageRange (void);
+ Pair GetVisiblePageRange (void);
/** Add a shape to the page. Typically used from inside
PostModelChange().
*/
- void AddSdrObject (SdrObject& rObject);
+ // void AddSdrObject (SdrObject& rObject);
/** Add a listener that is called when the set of visible slides.
@param rListener
@@ -235,71 +213,87 @@ public:
*/
void RemoveVisibilityChangeListener (const Link& rListener);
+ /** The page under the mouse is not highlighted in some contexts. Call
+ this method on context changes.
+ */
+ void UpdatePageUnderMouse (bool bAnimate);
+ void UpdatePageUnderMouse (
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate = true);
+ void UpdatePageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate = true);
+ void SetPageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate = true);
+
+ bool SetState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const model::PageDescriptor::State eState,
+ const bool bStateValue,
+ const bool bAnimate = true);
+
+ void UpdateOrientation (void);
+
+ ::boost::shared_ptr<PageObjectPainter> GetPageObjectPainter (void);
+ ::boost::shared_ptr<LayeredDevice> GetLayeredDevice (void) const;
+
+ class DrawLock
+ {
+ public:
+ DrawLock (view::SlideSorterView& rView, const SharedSdWindow& rpWindow);
+ DrawLock (SlideSorter& rSlideSorter);
+ ~DrawLock (void);
+ /** When the DrawLock is disposed then it will not request a repaint
+ on destruction.
+ */
+ void Dispose (void);
+ private:
+ view::SlideSorterView& mrView;
+ SharedSdWindow mpWindow;
+ };
+
+ ButtonBar& GetButtonBar (void) const;
+ ToolTip& GetToolTip (void) const;
+
protected:
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint);
private:
SlideSorter& mrSlideSorter;
model::SlideSorterModel& mrModel;
- /// This model is used for the maPage object and for the page visualizers
- /// (SdrPageObj)
- SdrModel maPageModel;
- /** This page acts as container for the page objects that represent the
- pages of the document that is represented by the SlideSorterModel.
- */
- SdrPage* mpPage;
+ bool mbIsDisposed;
::std::auto_ptr<Layouter> mpLayouter;
bool mbPageObjectVisibilitiesValid;
::boost::shared_ptr<cache::PageCache> mpPreviewCache;
- ::std::auto_ptr<ViewOverlay> mpViewOverlay;
-
- int mnFirstVisiblePageIndex;
- int mnLastVisiblePageIndex;
-
- SvBorder maPagePixelBorder;
-
+ ::boost::shared_ptr<LayeredDevice> mpLayeredDevice;
+ Range maVisiblePageRange;
bool mbModelChangedWhileModifyEnabled;
-
Size maPreviewSize;
-
bool mbPreciousFlagUpdatePending;
-
- Size maPageNumberAreaModelSize;
- SvBorder maModelBorder;
-
- Orientation meOrientation;
-
+ Layouter::Orientation meOrientation;
+ ::boost::shared_ptr<controller::Properties> mpProperties;
+ model::SharedPageDescriptor mpPageUnderMouse;
+ sal_Int32 mnButtonUnderMouse;
+ ::boost::shared_ptr<PageObjectPainter> mpPageObjectPainter;
+ ::boost::shared_ptr<SelectionPainter> mpSelectionPainter;
+ Region maRedrawRegion;
+ SharedILayerPainter mpBackgroundPainter;
+ ::boost::scoped_ptr<ButtonBar> mpButtonBar;
+ ::boost::scoped_ptr<ToolTip> mpToolTip;
+ bool mbIsRearrangePending;
::std::vector<Link> maVisibilityChangeListeners;
- /** Adapt the coordinates of the given bounding box according to the
- other parameters.
- @param rModelPageObjectBoundingBox
- Bounding box given in model coordinates that bounds only the
- page object.
- @param eCoordinateSystem
- When CS_SCREEN is given then the bounding box is converted into
- screen coordinates.
- @param eBoundingBoxType
- When BBT_INFO is given then the bounding box is made larger so
- that it encloses all relevant displayed information.
- */
- void AdaptBoundingBox (
- Rectangle& rModelPageObjectBoundingBox,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const;
-
/** Determine the visibility of all page objects.
*/
void DeterminePageObjectVisibilities (void);
- /** Update the page borders used by the layouter by using those returned
- by the first page. Call this function when the model changes,
- especially when the number of pages changes, or when the window is
- resized as the borders may be device dependent.
- */
- void UpdatePageBorders (void);
-
void UpdatePreciousFlags (void);
+ void RequestRearrange (void);
+ void Rearrange (void);
};
diff --git a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
new file mode 100644
index 000000000000..460c915f8a56
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
@@ -0,0 +1,362 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_BUTTON_BAR_HXX
+#define SD_SLIDESORTER_VIEW_BUTTON_BAR_HXX
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include <tools/gen.hxx>
+#include <rtl/ustring.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/bmpacc.hxx>
+#include <boost/scoped_ptr.hpp>
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+class Theme;
+
+class Button;
+typedef ::boost::shared_ptr<Button> SharedButton;
+
+/** This is a container of buttons and a coordinating controller.
+ The last means that it receives mouse events and forwards them to
+ the right button.
+*/
+class ButtonBar
+{
+public:
+ ButtonBar (SlideSorter& rSlideSorter);
+ ~ButtonBar (void);
+
+ void ProcessButtonDownEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation);
+ void ProcessButtonUpEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation);
+ void ProcessMouseMotionEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation,
+ const bool bIsMouseButtonDown);
+
+ void ResetPage (void);
+
+ /** Return the number of buttons that are to be displayed in page
+ objects which the mouse hovers over.
+ @param bIsExcluded
+ When this flag is <TRUE/> then return the number of
+ buttons that is to be displayed for pages that are
+ excluded from the slide show.
+ */
+ sal_Int32 GetButtonCount (const bool bIsExcluded) const;
+
+ /** Return the specified button.
+ @param nIndex
+ Valid values lie in the range [0,GetButtonCount()).
+ @param bIsExcluded
+ When this flag is <TRUE/> then return a button that is to
+ be displayed for pages that are excluded from the slide
+ show.
+ @return
+ Returns an empty pointer when the given index is not valid.
+ */
+ ::boost::shared_ptr<Button> GetButton (
+ const bool bIsExcluded,
+ const sal_Int32 nIndex) const;
+
+ bool IsMouseOverBar (void) const;
+
+ /** Paint the specified page object. When this is not the same as the
+ one under the mouse (mpDescriptor) then the buttons are all
+ painted in their normal state.
+ */
+ void Paint (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpPageDescriptor);
+
+ bool IsMouseOverButton (void) const;
+
+ void RequestLayout (void);
+
+ /** Return the help text for the button under the mouse.
+ @return
+ When the mouse is not over a button then an empty string
+ is returned.
+ */
+ ::rtl::OUString GetButtonHelpText (void) const;
+
+ /** Request the button bar to be shown.
+ @param bAnimate
+ This flag controls whether to just show the button bar (<FALSE/>)
+ or to fade it in smoothly (<TRUE/>.)
+ */
+ void RequestFadeIn (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate);
+
+ /** Request the button bar to be hidden.
+ @param bAnimate
+ This flag controls whether to just hide the button bar (<FALSE/>)
+ or to fade it out smoothly (<TRUE/>.)
+ */
+ void RequestFadeOut (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate);
+
+ /** Return whether the button bar is visible for the givn descriptor (or
+ being faded in.)
+ */
+ bool IsVisible (const model::SharedPageDescriptor& rpDescriptor);
+
+ void HandleDataChangeEvent (void);
+
+ class BackgroundTheme;
+
+ /** While at least one Lock object exists the button bar will not be
+ displayed. Used, e.g. during a mouse multiselection to avoid
+ confusing and unhelpfull visual signals.
+ */
+ class Lock
+ {
+ public:
+ Lock (SlideSorter& rSlideSorter);
+ ~Lock (void);
+ private:
+ ButtonBar& mrButtonBar;
+ };
+
+private:
+ SlideSorter& mrSlideSorter;
+ Size maPageObjectSize;
+ Rectangle maButtonBoundingBox;
+ Point maBackgroundLocation;
+ model::SharedPageDescriptor mpDescriptor;
+ bool mbIsExcluded;
+ boost::shared_ptr<Button> mpButtonUnderMouse;
+ // The button on which the mouse button was pressed.
+ boost::shared_ptr<Button> mpDownButton;
+ ::std::vector<SharedButton> maRegularButtons;
+ ::std::vector<SharedButton> maExcludedButtons;
+ BitmapEx maNormalBackground;
+ BitmapEx maButtonDownBackground;
+ bool mbIsMouseOverBar;
+ ::boost::scoped_ptr<BackgroundTheme> mpBackgroundTheme;
+ int mnLockCount;
+
+ /** Remember the specified page. If it differs from mpDescriptor then
+ the buttons are placed anew.
+ @return
+ The returned flag indicates wether the mpDescriptor member
+ is set to a new value.
+ */
+ bool SetPage (const model::SharedPageDescriptor& rpDescriptor);
+ SharedButton GetButtonAt (const Point aModelLocation);
+ bool SetButtonUnderMouse (const SharedButton& rButton = SharedButton());
+ void PaintButtonBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpPageDescriptor,
+ const Point aOffset);
+ void LayoutButtons (const Size aPageModelSize);
+ bool LayoutButtons (void);
+ BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const;
+ bool IsMouseOverBar (const Point aModelLocation) const;
+ void StartFadeAnimation (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const double nTargetAlpha,
+ const bool bFadeIn);
+
+ void AcquireLock (void);
+ void ReleaseLock (void);
+};
+
+
+
+
+class Button
+{
+public:
+ Button (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsHelpText);
+ virtual ~Button (void);
+
+ enum State { State_Normal, State_Hover, State_Down };
+ enum IconSize { IconSize_Large, IconSize_Medium, IconSize_Small };
+
+ /** Set a new state.
+ @return
+ When the new state is different from the old state
+ then <TRUE/> is returned.
+ */
+ bool SetState (const State eState);
+ State GetState (void) const;
+
+ virtual void Place (const Rectangle aButtonBarBox) = 0;
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const = 0;
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor) = 0;
+
+ /** Return the bounding box of the layouted button.
+ */
+ Rectangle GetBoundingBox (void) const;
+ /** Return the minimum size required to completely paint the
+ button.
+ */
+ virtual Size GetSize (void) const = 0;
+ virtual Size GetSize (const IconSize eIconSize) const = 0;
+ ::rtl::OUString GetHelpText (void) const;
+ bool IsDown (void) const;
+ void SetActiveState (const bool bIsActive);
+ bool IsActive (void) const;
+ void SetIconSize (const IconSize eIconSize);
+ IconSize GetIconSize (void) const;
+ /** By default a button is always enabled. Override to change this.
+ */
+ virtual bool IsEnabled (void) const;
+
+protected:
+ SlideSorter& mrSlideSorter;
+ State meState;
+ Rectangle maBoundingBox;
+ const ::rtl::OUString msHelpText;
+ // Buttons that lie (partly) outside the button bar are deactivated.
+ bool mbIsActive;
+ IconSize meIconSize;
+};
+
+
+
+class TextButton : public Button
+{
+public:
+ TextButton (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsText,
+ const ::rtl::OUString& rsHelpText);
+
+ virtual void Place (const Rectangle aButtonBarBox);
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const;
+ virtual Size GetSize (void) const;
+ virtual Size GetSize (const IconSize eIconSize) const;
+
+private:
+ const ::rtl::OUString msText;
+};
+
+
+
+class ImageButton : public Button
+{
+public:
+ ImageButton (
+ SlideSorter& rSlideSorter,
+ const BitmapEx& rLargeIcon,
+ const BitmapEx& rLargeHoverIcon,
+ const BitmapEx& rMediumIcon,
+ const BitmapEx& rMediumHoverIcon,
+ const BitmapEx& rSmallIcon,
+ const BitmapEx& rSmallHoverIcon,
+ const ::rtl::OUString& rsHelpText);
+
+ virtual void Place (const Rectangle aButtonBarBox);
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const;
+ virtual Size GetSize (void) const;
+ virtual Size GetSize (const IconSize eIconSize) const;
+
+private:
+ const BitmapEx maLargeIcon;
+ const BitmapEx maLargeHoverIcon;
+ const BitmapEx maMediumIcon;
+ const BitmapEx maMediumHoverIcon;
+ const BitmapEx maSmallIcon;
+ const BitmapEx maSmallHoverIcon;
+};
+
+
+class UnhideButton : public ImageButton
+{
+public:
+ UnhideButton (SlideSorter& rSlideSorter);
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+class StartShowButton : public ImageButton
+{
+public:
+ StartShowButton (SlideSorter& rSlideSorter);
+ virtual bool IsEnabled (void) const;
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+class HideButton : public ImageButton
+{
+public:
+ HideButton (SlideSorter& rSlideSorter);
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+class DuplicateButton : public ImageButton
+{
+public:
+ DuplicateButton (SlideSorter& rSlideSorter);
+ virtual bool IsEnabled (void) const;
+
+protected:
+ virtual void ProcessClick (const model::SharedPageDescriptor& rpDescriptor);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx
new file mode 100644
index 000000000000..853890ee5894
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsILayerPainter.hxx
@@ -0,0 +1,60 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_LAYER_PAINTER_HXX
+#define SD_SLIDESORTER_VIEW_LAYER_PAINTER_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <sal/types.h>
+
+class OutputDevice;
+class Rectangle;
+
+namespace sd { namespace slidesorter { namespace view {
+
+class ILayerInvalidator
+{
+public:
+ virtual void Invalidate (const Rectangle& rInvalidationBox) = 0;
+};
+typedef ::boost::shared_ptr<ILayerInvalidator> SharedILayerInvalidator;
+
+class ILayerPainter
+{
+public:
+ virtual void SetLayerInvalidator (
+ const SharedILayerInvalidator& rpInvalidator) = 0;
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea) = 0;
+};
+typedef ::boost::shared_ptr<ILayerPainter> SharedILayerPainter;
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
new file mode 100644
index 000000000000..cfd789818408
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_INSERT_ANIMATOR_HXX
+#define SD_SLIDESORTER_VIEW_INSERT_ANIMATOR_HXX
+
+#include "controller/SlsAnimator.hxx"
+#include <boost/scoped_ptr.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace sd { namespace slidesorter { namespace view {
+
+class InsertPosition;
+
+
+/** Animate the positions of page objects to make room at the insert
+ position while a move or copy operation takes place.
+*/
+class InsertAnimator
+ : private ::boost::noncopyable
+{
+public:
+ InsertAnimator (SlideSorter& rSlideSorter);
+
+ /** Set the position at which we have to make room for the display of an
+ icon.
+ */
+ void SetInsertPosition (const InsertPosition& rInsertPosition);
+
+ enum ResetMode { RM_Normal, RM_AbortAnimations };
+ /** Restore the normal position of all page objects.
+ @param eMode
+ This flag controls wether to start an animation that ends in the
+ normal positions of all slides (AM_Animated) or to restore the
+ normal positions immediately (AM_Immediate).
+ */
+ void Reset (const controller::Animator::AnimationMode eMode);
+
+private:
+ class Implementation;
+ ::boost::shared_ptr<Implementation> mpImplementation;
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
new file mode 100644
index 000000000000..a9a640d978cf
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertionIndicatorOverlay.hxx
@@ -0,0 +1,131 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_INSERTION_INDICATOR_OVERLAY_HXX
+#define SD_SLIDESORTER_INSERTION_INDICATOR_OVERLAY_HXX
+
+#include "model/SlsSharedPageDescriptor.hxx"
+#include "view/SlsILayerPainter.hxx"
+#include "controller/SlsTransferable.hxx"
+
+#include <tools/gen.hxx>
+#include <vcl/bitmapex.hxx>
+#include <boost/scoped_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <vector>
+
+class OutputDevice;
+class SdPage;
+
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
+
+namespace sd { namespace slidesorter { namespace model {
+class PageEnumeration;
+} } }
+
+namespace sd { namespace slidesorter { namespace controller {
+class Transferable;
+} } }
+
+namespace sd { namespace slidesorter { namespace view {
+
+class FramePainter;
+class LayeredDevice;
+
+/** The insertion indicator is painted as a vertical or horizonal bar
+ in the space between slides.
+*/
+class InsertionIndicatorOverlay
+ : public ILayerPainter,
+ public ::boost::enable_shared_from_this<InsertionIndicatorOverlay>
+{
+public:
+ InsertionIndicatorOverlay (SlideSorter& rSlideSorter);
+ virtual ~InsertionIndicatorOverlay (void);
+
+ virtual void SetLayerInvalidator (const SharedILayerInvalidator& rpInvalidator);
+
+ void Create (const controller::Transferable* pTransferable);
+
+ /** Given a position in model coordinates this method calculates the
+ insertion marker both as an index in the document and as a location
+ used for drawing the insertion indicator.
+ */
+ void SetLocation (const Point& rPosition);
+
+ Size GetSize (void) const;
+
+ virtual void Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea);
+
+ bool IsVisible (void) const;
+ void Hide (void);
+ void Show (void);
+
+ Rectangle GetBoundingBox (void) const;
+
+private:
+ SlideSorter& mrSlideSorter;
+ bool mbIsVisible;
+ const sal_Int32 mnLayerIndex;
+ SharedILayerInvalidator mpLayerInvalidator;
+ // Center of the insertion indicator.
+ Point maLocation;
+ BitmapEx maIcon;
+ Point maIconOffset;
+ ::boost::scoped_ptr<FramePainter> mpShadowPainter;
+
+ void SetPositionAndSize (const Rectangle& rBoundingBox);
+ void SelectRepresentatives (
+ model::PageEnumeration& rSelection,
+ ::std::vector<model::SharedPageDescriptor>& rDescriptors) const;
+ Point PaintRepresentatives (
+ OutputDevice& rContent,
+ const Size aPreviewSize,
+ const sal_Int32 nOffset,
+ const ::std::vector<controller::Transferable::Representative>& rPages) const;
+ void PaintPageCount (
+ OutputDevice& rDevice,
+ const sal_Int32 nSelectionCount,
+ const Size aPreviewSize,
+ const Point aFirstPageOffset) const;
+ /** Setup the insertion indicator by creating the icon. It consists of
+ scaled down previews of some of the selected pages.
+ */
+ void Create (
+ const ::std::vector<controller::Transferable::Representative>& rPages,
+ const sal_Int32 nSelectionCount);
+};
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
index 22a614d65fe6..997b8159db0b 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
@@ -29,18 +29,26 @@
#ifndef SD_SLIDESORTER_VIEW_LAYOUTER_HXX
#define SD_SLIDESORTER_VIEW_LAYOUTER_HXX
+#include "SlideSorter.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsTheme.hxx"
#include <sal/types.h>
#include <tools/fract.hxx>
#include <vcl/mapmod.hxx>
#include <vector>
#include <utility>
+
class MapMode;
class OutputDevice;
class Size;
namespace sd { namespace slidesorter { namespace view {
+class InsertPosition;
+
+
+
/** Calculate the size and position of page objects displayed by a slide
sorter. The layouter takes into account various input values:
1.) Size of the window in which the slide sorter is displayed.
@@ -67,9 +75,14 @@ namespace sd { namespace slidesorter { namespace view {
class Layouter
{
public:
- Layouter (void);
+ enum Orientation { HORIZONTAL, VERTICAL, GRID };
+
+ Layouter (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<Theme>& rpTheme);
~Layouter (void);
+ ::boost::shared_ptr<PageObjectLayouter> GetPageObjectLayouter (void) const;
/** Set the horizontal and vertical borders in pixel coordinates between
the enclosing window and page objects. The borders may be painted
larger then the given values when the space for the insertion marker
@@ -90,23 +103,6 @@ public:
void SetBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder,
sal_Int32 nTopBorder, sal_Int32 nBottomBorder);
- /** Set the borders arround every page object.
- @param nLeftBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- @param nRightBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- @param nTopBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- @param nBottomBorder
- A negative value indicates that the left border shall not be
- modified. A value of 0 is the default.
- */
- void SetPageBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder,
- sal_Int32 nTopBorder, sal_Int32 nBottomBorder);
-
/** Set the interval of valid column counts. When nMinimalColumnCount
<= nMaximalColumnCount is not fullfilled then the call is ignored.
@param nMinimalColumnCount
@@ -121,37 +117,46 @@ public:
/** Central method of this class. It takes the input values and
calculates the output values. Both given sizes must not be 0 in any
dimension or the call is ignored.
+ @param eOrientation
+ This defines the generaly layout and specifies whether there may
+ be more than one row or more than one column.
@param rWindowSize
The size of the window in pixels that the slide sorter is
- displayed in.
- @param rPageObjectSize
+ displayed in. This can differ from the size of mpWindow during
+ detection of whether or not the scroll bars should be visible.
+ @param rPreviewModelSize
Size of each page in model coordinates.
- @param pDevice
- The map mode of this output device is adapted to the new layout
- of the page objects.
+ @param rpWindow
+ The map mode of this window is adapted to the new layout of the
+ page objects.
@return
The return value indicates whether the Get... methods can be
used to obtain valid values (<TRUE/>).
*/
- bool RearrangeHorizontal (
+ bool Rearrange (
+ const Orientation eOrientation,
const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice,
+ const Size& rPreviewModelSize,
const sal_uInt32 nPageCount);
- bool RearrangeVertical (
- const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice);
/** Change the zoom factor. This does not change the general layout
(number of columns).
*/
- void SetZoom (Fraction nZoomFactor, OutputDevice* pDevice);
+ void _SetZoom (double nZoomFactor);
+ void _SetZoom (Fraction nZoomFactor);
/** Return the number of columns.
*/
sal_Int32 GetColumnCount (void) const;
+ sal_Int32 GetRowCount (void) const;
+
+ sal_Int32 GetRow (const sal_Int32 nIndex) const;
+
+ sal_Int32 GetColumn (const sal_Int32 nIndex) const;
+
+ sal_Int32 GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) const;
+
/** Return the scale factor that can be set at the map mode of the
output window.
*/
@@ -159,52 +164,25 @@ public:
Size GetPageObjectSize (void) const;
- /** Return the bounding box in model coordinates of the nIndex-th page
+ /** Return the bounding box in window coordinates of the nIndex-th page
object.
*/
- Rectangle GetPageObjectBox (sal_Int32 nIndex) const;
+ Rectangle GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap = false) const;
/** Return the bounding box in model coordinates of the page that
contains the given amount of page objects.
*/
- Rectangle GetPageBox (sal_Int32 nObjectCount) const;
-
- /** Return the rectangle that bounds the insertion marker that is
- specified by the parameters.
- @param nIndex
- Index of the page object from which the position of the marker
- will be calculated.
- @param bVertical
- When <TRUE/> then the insertion marker will be calculated with a
- vertical orientation positioned to the left or right of the
- specified page object. A horizontal orientation is indicated by
- <FALSE/>. In this case the marker will be positioned above or
- below the page object.
- @param bLeftOrTop
- This flag indicates whether the insertion marker will be
- positioned above or to the left (<TRUE/>) the page object. When
- <FALSE/> is given then the marker will be positioned below or to
- the right of the page object.
- */
- Rectangle GetInsertionMarkerBox (
- sal_Int32 nIndex,
- bool bVertical,
- bool bLeftOrTop) const;
+ Rectangle GetTotalBoundingBox (void) const;
/** Return the index of the first fully or partially visible page
object. This takes into account only the vertical dimension.
- */
- sal_Int32 GetIndexOfFirstVisiblePageObject (
- const Rectangle& rVisibleArea) const;
-
- /** Return the index of the last fully or partially visible page
- object. This takes into account only the vertical dimension.
@return
- The returned index may be larger than the number of existing
+ The second index may be larger than the number of existing
page objects.
*/
- sal_Int32 GetIndexOfLastVisiblePageObject (
- const Rectangle& rVisibleArea) const;
+ Range GetRangeOfVisiblePageObjects (const Rectangle& rVisibleArea) const;
/** Return the index of the page object that is rendered at the given
point.
@@ -217,167 +195,103 @@ public:
the actual page area the index of that page is returned;
otherwise -1 would be returned to indicate that no page object
has been hit.
+ @param bClampToValidRange
+ When <TRUE/> then values outside the valid range [0,mnPageCount)
+ are mapped to 0 (when smaller than 0) or mnPageCount-1 when
+ equal to or larger than mnPageCount.
+ When <FALSE/> then -1 is returned for values outside the valid range.
@return
The returned index may be larger than the number of existing
page objects.
*/
sal_Int32 GetIndexAtPoint (
const Point& rModelPosition,
- bool bIncludePageBorders = false) const;
-
- /** Return the page index of where to do an insert operation when the
- user would release the the mouse button at the given position after
- a drag operation.
- @param rPosition
+ const bool bIncludePageBorders = false,
+ const bool bClampToValidRange = true) const;
+
+ /** Return an object that describes the logical and visual properties of
+ where to do an insert operation when the user would release the the
+ mouse button at the given position after a drag operation and of
+ where and how to display an insertion indicator.
+ @param rModelPosition
The position in the model coordinate system for which to
determine the insertion page index. The position does not have
to be over a page object to return a valid value.
- @param bAllowVerticalPosition
- When this flag is <TRUE/> then the vertical gaps between rows
- may be taken into account for calculating the insertion index as
- well as the horizontal gaps between columns. This will happen
- only when there is only one column.
- (better name, anyone?)
- @return
- Returns the page index, as accepted by the slide sorter model,
- of the page after which an insertion would take place. An index
- of 0 means that insertion will take place before the first page,
- An index equal to or greater than the page count means to insert
- after the last page.
- A value of -1 indicates that no valid insertion index exists for
- the given point.
+ @param rIndicatorSize
+ The size of the insertion indicator. This size is used to adapt
+ the location when at the left or right of a row or at the top or
+ bottom of a column.
+ @param rModel
+ The model is used to get access to the selection states of the
+ pages. This in turn is used to determine the visual bounding
+ boxes.
*/
- sal_Int32 GetInsertionIndex (
+ InsertPosition GetInsertPosition (
const Point& rModelPosition,
- bool bAllowVerticalPosition) const;
+ const Size& rIndicatorSize,
+ model::SlideSorterModel& rModel) const;
+
+ Range GetValidHorizontalSizeRange (void) const;
+ Range GetValidVerticalSizeRange (void) const;
+
+ class Implementation;
+
+private:
+ ::boost::scoped_ptr<Implementation> mpImplementation;
+ SharedSdWindow mpWindow;
+};
- typedef ::std::pair<double,double> DoublePoint;
- /** Transform a point given in model coordinates in to layouter
- coordinates. Layouter coordinates are floating point numbers where
- the integer part denotes a row or a column and the part after the
- decimal point is a relative position in that row or column.
- */
- DoublePoint ConvertModelToLayouterCoordinates (
- const Point& rModelPoint) const;
- /** Transform a point given in layouter coordinates to model
- coordinates. See ConvertModelToLayouterCoordinates for a
- description of layouter coordinates.
- */
- Point ConvertLayouterToModelCoordinates (
- const DoublePoint&rLayouterPoint) const;
- typedef ::std::vector<Rectangle> BackgroundRectangleList;
+
+
+/** Collect all values concerning the logical and visual properties of the
+ insertion position that is used for drag-and-drop and copy-and-past.
+*/
+class InsertPosition
+{
+public:
+ InsertPosition (void);
+ InsertPosition& operator= (const InsertPosition& rInsertPosition);
+ bool operator== (const InsertPosition& rInsertPosition) const;
+ bool operator!= (const InsertPosition& rInsertPosition) const;
+
+ void SetLogicalPosition (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const sal_Int32 nIndex,
+ const bool bIsAtRunStart,
+ const bool bIsAtRunEnd,
+ const bool bIsExtraSpaceNeeded);
+ void SetGeometricalPosition(
+ const Point aLocation,
+ const Point aLeadingOffset,
+ const Point aTrailingOffset);
+
+ sal_Int32 GetRow (void) const { return mnRow; }
+ sal_Int32 GetColumn (void) const { return mnColumn; }
+ sal_Int32 GetIndex (void) const { return mnIndex; }
+ Point GetLocation (void) const { return maLocation; }
+ Point GetLeadingOffset (void) const { return maLeadingOffset; }
+ Point GetTrailingOffset (void) const { return maTrailingOffset; }
+ bool IsAtRunStart (void) const { return mbIsAtRunStart; }
+ bool IsAtRunEnd (void) const { return mbIsAtRunEnd; }
+ bool IsExtraSpaceNeeded (void) const { return mbIsExtraSpaceNeeded; }
private:
- class ScreenAndModelValue {public:
- sal_Int32 mnScreen,mnModel;
- explicit ScreenAndModelValue (sal_Int32 nScreen, sal_Int32 nModel = 0)
- : mnScreen(nScreen),mnModel(nModel) {}
- };
- ScreenAndModelValue mnRequestedLeftBorder;
- ScreenAndModelValue mnRequestedRightBorder;
- ScreenAndModelValue mnRequestedTopBorder;
- ScreenAndModelValue mnRequestedBottomBorder;
- ScreenAndModelValue mnLeftBorder;
- ScreenAndModelValue mnRightBorder;
- ScreenAndModelValue mnTopBorder;
- ScreenAndModelValue mnBottomBorder;
- ScreenAndModelValue mnLeftPageBorder;
- ScreenAndModelValue mnRightPageBorder;
- ScreenAndModelValue mnTopPageBorder;
- ScreenAndModelValue mnBottomPageBorder;
- ScreenAndModelValue mnVerticalGap;
- ScreenAndModelValue mnHorizontalGap;
- ScreenAndModelValue mnInsertionMarkerThickness;
- ScreenAndModelValue mnTotalVerticalGap;
- ScreenAndModelValue mnTotalHorizontalGap;
- sal_Int32 mnMinimalWidth;
- sal_Int32 mnPreferredWidth;
- sal_Int32 mnMaximalWidth;
- sal_Int32 mnMinimalColumnCount;
- sal_Int32 mnMaximalColumnCount;
- sal_Int32 mnColumnCount;
- Size maPageObjectModelSize;
- Size maPageObjectPixelSize;
-
- BackgroundRectangleList maBackgroundRectangleList;
-
- enum GapMembership { GM_NONE, GM_PREVIOUS, GM_BOTH, GM_NEXT,
- GM_PAGE_BORDER};
-
- /** Calculate the row that the point with the given vertical coordinate
- is over. The horizontal component is ignored.
- @param nYPosition
- Vertical position in model coordinates.
- @param bIncludeBordersAndGaps
- When this flag is <TRUE/> then the area of borders and gaps are
- interpreted as belonging to one of the rows.
- @param eGapMembership
- Specifies to what row the gap areas belong. Here GM_NONE
- corresponds to bIncludeBordersAndGaps being <FALSE/>. When
- GM_BOTH is given then the upper half is associated to the row
- above and the lower half to the row below. Values of
- GM_PREVIOUS and GM_NEXT associate the whole gap area with the
- row above or below respectively.
- */
- sal_Int32 GetRowAtPosition (
- sal_Int32 nYPosition,
- bool bIncludeBordersAndGaps,
- GapMembership eGapMembership = GM_NONE) const;
-
- /** Calculate the column that the point with the given horizontal
- coordinate is over. The verical component is ignored.
- @param nXPosition
- Horizontal position in model coordinates.
- @param bIncludeBordersAndGaps
- When this flag is <TRUE/> then the area of borders and gaps are
- interpreted as belonging to one of the columns.
- @param eGapMembership
- Specifies to what column the gap areas belong. Here GM_NONE
- corresponds to bIncludeBordersAndGaps being <FALSE/>. When
- GM_BOTH is given then the left half is associated with the
- column at the left and the right half with the column to the
- right. Values of GM_PREVIOUS and GM_NEXT associate the whole
- gap area with the column to the left or right respectively.
- */
- sal_Int32 GetColumnAtPosition (
- sal_Int32 nXPosition,
- bool bIncludeBordersAndGaps,
- GapMembership eGapMembership = GM_NONE) const;
-
- /** This method is typically called from GetRowAtPosition() and
- GetColumnAtPosition() to handle a position that lies inside the gap
- between two adjacent rows or columns.
- @param nDistanceIntoGap
- Vertical distance from the bottom of the upper row down into the
- gap or or horizontal distance from the right edge right into the
- gap.
- @param eGapMemberhship
- This value decides what areas in the gap belong to which (or no)
- row or column.
- @param nIndex
- The row index of the upper row or the column index of the left
- column.
- @param nLeftOrTopPageBorder
- Width in model coordinates of the border the the right of or
- below a page.
- @param nGap
- Width or height of the gap in model coordiantes between the
- page borders.
- @return
- Returns either the index of the upper row (as given as nRow), the
- index of the lower row (nRow+1) or -1 to indicate that the
- position belongs to no row.
- */
- sal_Int32 ResolvePositionInGap (
- sal_Int32 nDistanceIntoGap,
- GapMembership eGapMembership,
- sal_Int32 nIndex,
- sal_Int32 nLeftOrTopPageBorder,
- sal_Int32 nGap) const;
+ sal_Int32 mnRow;
+ sal_Int32 mnColumn;
+ sal_Int32 mnIndex;
+ bool mbIsAtRunStart : 1;
+ bool mbIsAtRunEnd : 1;
+ bool mbIsExtraSpaceNeeded : 1;
+ Point maLocation;
+ Point maLeadingOffset;
+ Point maTrailingOffset;
};
+
+
} } } // end of namespace ::sd::slidesorter::view
#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
new file mode 100644
index 000000000000..8e61a8b1b47c
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_PAGE_OBJECT_LAYOUTER_HXX
+#define SD_SLIDESORTER_PAGE_OBJECT_LAYOUTER_HXX
+
+#include "SlideSorter.hxx"
+#include "model/SlsSharedPageDescriptor.hxx"
+#include "tools/gen.hxx"
+#include <vcl/image.hxx>
+
+namespace sd { namespace slidesorter { namespace view {
+
+
+/** In contrast to the Layouter that places page objects in the view, the
+ PageObjectLayouter places the parts of individual page objects like page
+ number area, borders, preview.
+*/
+class PageObjectLayouter
+{
+public:
+ /** Create a new PageObjectLayouter object.
+ @param rPageObjectSize
+ In general either the width or the height will be 0 in order to
+ signal that this size component has to be calculated from the other.
+ This calculation will make the preview as large as possible.
+ @param nPageCount
+ The page count is used to determine how wide the page number
+ area has to be, how many digits to except for the largest page number.
+ */
+ PageObjectLayouter(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const Size& rPageObjectWindowSize,
+ const Size& rPreviewModelSize,
+ const SharedSdWindow& rpWindow,
+ const sal_Int32 nPageCount);
+ ~PageObjectLayouter(void);
+
+ enum Part {
+ // The focus indicator is painted outside the actual page object.
+ FocusIndicator,
+ // This is the outer bounding box that includes the preview, page
+ // number, title.
+ PageObject,
+ // Bounding box of the actual preview.
+ Preview,
+ // Bounding box of the mouse indicator indicator frame.
+ MouseOverIndicator,
+ // Bounding box of the page number.
+ PageNumber,
+ // Bounding box of the pane name.
+ Name,
+ // Indicator whether or not there is a slide transition associated
+ // with this slide.
+ TransitionEffectIndicator
+ };
+ /** Two coordinate systems are supported. They differ only in
+ translation not in scale. Both relate to pixel values in the window.
+ A position in the model coordinate system does not change when the window content is
+ scrolled up or down. In the window coordinate system (relative
+ to the top left point of the window)scrolling leads to different values.
+ */
+ enum CoordinateSystem {
+ WindowCoordinateSystem,
+ ModelCoordinateSystem
+ };
+
+ /** Return the bounding box of the page object or one of its graphical
+ parts.
+ @param rWindow
+ This device is used to translate between model and window
+ coordinates.
+ @param rpPageDescriptor
+ The page for which to calculate the bounding box. This may be
+ NULL. When it is NULL then a generic bounding box is calculated
+ for the location (0,0).
+ @param ePart
+ The part of the page object for which to return the bounding
+ box.
+ @param eCoodinateSystem
+ The bounding box can be returned in model and in pixel
+ (window) coordinates.
+ */
+ Rectangle GetBoundingBox (
+ const model::SharedPageDescriptor& rpPageDescriptor,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem);
+ Rectangle GetBoundingBox (
+ const Point& rPageObjectLocation,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem);
+ Size GetSize (
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem);
+
+ Image GetTransitionEffectIcon (void) const;
+
+private:
+ SharedSdWindow mpWindow;
+ Size maPageObjectSize;
+ double mnModelToWindowScale;
+ Rectangle maFocusIndicatorBoundingBox;
+ Rectangle maPageObjectBoundingBox;
+ Rectangle maPageNumberAreaBoundingBox;
+ Rectangle maPreviewBoundingBox;
+ Rectangle maTransitionEffectBoundingBox;
+ const Image maTransitionEffectIcon;
+ const ::boost::shared_ptr<Font> mpPageNumberFont;
+
+ Size GetPageNumberAreaSize (const int nPageCount);
+ Rectangle CalculatePreviewBoundingBox (
+ Size& rPageObjectSize,
+ const Size& rPreviewModelSize,
+ const sal_Int32 nPageNumberAreaWidth,
+ const sal_Int32 nFocusIndicatorWidth);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
new file mode 100644
index 000000000000..e4e28a2e38b2
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_PAGE_OBJECT_PAINTER_HEADER
+#define SD_SLIDESORTER_PAGE_OBJECT_PAINTER_HEADER
+
+#include "SlideSorter.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include <boost/scoped_ptr.hpp>
+
+namespace sd { namespace slidesorter { namespace cache {
+class PageCache;
+} } }
+
+namespace sd { namespace slidesorter { namespace view {
+
+class ButtonBar;
+class Layouter;
+class PageObjectLayouter;
+class FramePainter;
+
+class PageObjectPainter
+{
+public:
+ PageObjectPainter (const SlideSorter& rSlideSorter);
+ ~PageObjectPainter (void);
+
+ void PaintPageObject (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor);
+
+ void NotifyResize (const bool bForce = false);
+
+ /** Called when the theme changes, either because it is replaced with
+ another or because the system colors have changed. So, even when
+ the given theme is the same object as the one already in use by this
+ painter everything that depends on the theme is updated.
+ */
+ void SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme);
+
+ /** Return a preview bitmap for the given page descriptor. When the
+ page is excluded from the show then the preview is marked
+ accordingly.
+ @rpDescriptor
+ Defines the page for which to return the preview.
+ @pReferenceDevice
+ When not <NULL/> then this reference device is used to created a
+ compatible bitmap.
+ @return
+ The returned bitmap may have a different size then the preview area.
+ */
+ Bitmap GetPreviewBitmap (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice* pReferenceDevice) const;
+
+private:
+ const Layouter& mrLayouter;
+ ::boost::shared_ptr<PageObjectLayouter> mpPageObjectLayouter;
+ ::boost::shared_ptr<cache::PageCache> mpCache;
+ ::boost::shared_ptr<controller::Properties> mpProperties;
+ ::boost::shared_ptr<view::Theme> mpTheme;
+ ::boost::shared_ptr<Font> mpPageNumberFont;
+ ::boost::scoped_ptr<FramePainter> mpShadowPainter;
+ ::boost::scoped_ptr<FramePainter> mpFocusBorderPainter;
+ Bitmap maNormalBackground;
+ Bitmap maSelectionBackground;
+ Bitmap maFocusedSelectionBackground;
+ Bitmap maFocusedBackground;
+ Bitmap maMouseOverBackground;
+ Bitmap maMouseOverFocusedBackground;
+ Bitmap maMouseOverSelectedAndFocusedBackground;
+ ::rtl::OUString msUnhideString;
+ ButtonBar& mrButtonBar;
+
+ void PaintBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor);
+ void PaintPreview (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const;
+ void PaintPageNumber (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const;
+ void PaintTransitionEffect (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const;
+ void PaintBorder (
+ OutputDevice& rDevice,
+ const Theme::GradientColorType eColorType,
+ const Rectangle& rBox) const;
+ Bitmap& GetBackgroundForState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice& rTemplateDevice);
+ Bitmap& GetBackground(
+ Bitmap& rBackground,
+ Theme::GradientColorType eType,
+ const OutputDevice& rTemplateDevice,
+ const bool bHasFocusBorder);
+ Bitmap CreateBackgroundBitmap(
+ const OutputDevice& rReferenceDevice,
+ const Theme::GradientColorType eType,
+ const bool bHasFocusBorder) const;
+ Bitmap CreateMarkedPreview(
+ const Size& rSize,
+ const Bitmap& rPreview,
+ const BitmapEx& rOverlay,
+ const OutputDevice* pReferenceDevice) const;
+};
+
+} } } // end of namespace sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx
index 4040d31aa694..4040d31aa694 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx
diff --git a/sd/source/ui/slidesorter/inc/view/SlsResource.hrc b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
new file mode 100644
index 000000000000..2b85a37d35dc
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsResource.hrc
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_ICONS_HRC
+#define SD_SLIDESORTER_ICONS_HRC
+
+#include "glob.hrc"
+
+#define IMAGE_COMMAND1_LARGE 1
+#define IMAGE_COMMAND1_LARGE_HOVER 2
+#define IMAGE_COMMAND1_MEDIUM 3
+#define IMAGE_COMMAND1_MEDIUM_HOVER 4
+#define IMAGE_COMMAND1_SMALL 5
+#define IMAGE_COMMAND1_SMALL_HOVER 6
+
+#define IMAGE_COMMAND1_LARGE_HC 7
+#define IMAGE_COMMAND1_LARGE_HOVER_HC 8
+#define IMAGE_COMMAND1_MEDIUM_HC 9
+#define IMAGE_COMMAND1_MEDIUM_HOVER_HC 10
+#define IMAGE_COMMAND1_SMALL_HC 11
+#define IMAGE_COMMAND1_SMALL_HOVER_HC 12
+
+
+#define IMAGE_COMMAND2_LARGE 20
+#define IMAGE_COMMAND2_LARGE_HOVER 21
+#define IMAGE_COMMAND2_MEDIUM 22
+#define IMAGE_COMMAND2_MEDIUM_HOVER 23
+#define IMAGE_COMMAND2_SMALL 24
+#define IMAGE_COMMAND2_SMALL_HOVER 25
+
+#define IMAGE_COMMAND2_LARGE_HC 26
+#define IMAGE_COMMAND2_LARGE_HOVER_HC 27
+#define IMAGE_COMMAND2_MEDIUM_HC 28
+#define IMAGE_COMMAND2_MEDIUM_HOVER_HC 29
+#define IMAGE_COMMAND2_SMALL_HC 30
+#define IMAGE_COMMAND2_SMALL_HOVER_HC 31
+
+#define IMAGE_COMMAND2B_LARGE 40
+#define IMAGE_COMMAND2B_LARGE_HOVER 41
+#define IMAGE_COMMAND2B_MEDIUM 42
+#define IMAGE_COMMAND2B_MEDIUM_HOVER 43
+#define IMAGE_COMMAND2B_SMALL 44
+#define IMAGE_COMMAND2B_SMALL_HOVER 45
+
+#define IMAGE_COMMAND2B_LARGE_HC 46
+#define IMAGE_COMMAND2B_LARGE_HOVER_HC 47
+#define IMAGE_COMMAND2B_MEDIUM_HC 48
+#define IMAGE_COMMAND2B_MEDIUM_HOVER_HC 49
+#define IMAGE_COMMAND2B_SMALL_HC 50
+#define IMAGE_COMMAND2B_SMALL_HOVER_HC 51
+
+
+#define IMAGE_COMMAND3_LARGE 60
+#define IMAGE_COMMAND3_LARGE_HOVER 61
+#define IMAGE_COMMAND3_MEDIUM 62
+#define IMAGE_COMMAND3_MEDIUM_HOVER 63
+#define IMAGE_COMMAND3_SMALL 64
+#define IMAGE_COMMAND3_SMALL_HOVER 65
+
+#define IMAGE_COMMAND3_LARGE_HC 66
+#define IMAGE_COMMAND3_LARGE_HOVER_HC 67
+#define IMAGE_COMMAND3_MEDIUM_HC 68
+#define IMAGE_COMMAND3_MEDIUM_HOVER_HC 69
+#define IMAGE_COMMAND3_SMALL_HC 70
+#define IMAGE_COMMAND3_SMALL_HOVER_HC 71
+
+#define IMAGE_BUTTONBAR_LARGE 80
+#define IMAGE_BUTTONBAR_LARGE_HC 81
+#define IMAGE_BUTTONBAR_MEDIUM 82
+#define IMAGE_BUTTONBAR_MEDIUM_HC 83
+#define IMAGE_BUTTONBAR_SMALL 84
+#define IMAGE_BUTTONBAR_SMALL_HC 85
+
+#define IMAGE_SHADOW 90
+#define IMAGE_INSERT_SHADOW 91
+#define IMAGE_HIDE_SLIDE_OVERLAY 92
+#define IMAGE_FOCUS_BORDER 93
+
+#define STRING_DRAG_AND_DROP_PAGES 101
+#define STRING_DRAG_AND_DROP_SLIDES 102
+
+#define STRING_COMMAND1 110
+#define STRING_COMMAND2_A 111
+#define STRING_COMMAND2_B 112
+#define STRING_COMMAND3 113
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
new file mode 100644
index 000000000000..0781d8ea3519
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsTheme.hxx
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_THEME_HXX
+#define SD_SLIDESORTER_VIEW_THEME_HXX
+
+#include "model/SlsVisualState.hxx"
+
+#include <vcl/bitmapex.hxx>
+#include <vcl/font.hxx>
+#include <vcl/gradient.hxx>
+#include <tools/color.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+
+namespace sd { namespace slidesorter { namespace controller {
+class Properties;
+} } }
+
+namespace sd { namespace slidesorter { namespace view {
+
+
+/** Collection of colors and styles that are used to paint the slide sorter
+ view.
+*/
+class Theme
+{
+public:
+ Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties);
+
+ /** Call this method to update some colors as response to a change of
+ a system color change.
+ */
+ void Update (
+ const ::boost::shared_ptr<controller::Properties>& rpProperties);
+
+ // BitmapEx GetInsertIndicatorIcon (void) const;
+
+ enum FontType {
+ Font_PageNumber,
+ Font_PageCount,
+ Font_Button
+ };
+ static ::boost::shared_ptr<Font> GetFont (
+ const FontType eType,
+ const OutputDevice& rDevice);
+
+ enum ColorType {
+ Color_Background,
+ Color_ButtonBackground,
+ Color_ButtonText,
+ Color_ButtonTextHover,
+ Color_PageNumberDefault,
+ Color_PageNumberHover,
+ Color_PageNumberHighContrast,
+ Color_PageNumberBrightBackground,
+ Color_PageNumberDarkBackground,
+ Color_Selection,
+ Color_PreviewBorder,
+ Color_PageCountFontColor,
+ _ColorType_Size_
+ };
+ ColorData GetColor (const ColorType eType);
+ void SetColor (const ColorType eType, const ColorData aColorData);
+
+ enum GradientColorType {
+ Gradient_NormalPage,
+ Gradient_SelectedPage,
+ Gradient_SelectedAndFocusedPage,
+ Gradient_MouseOverPage,
+ Gradient_MouseOverSelectedAndFocusedPage,
+ Gradient_FocusedPage,
+ Gradient_ButtonBackground,
+ _GradientColorType_Size_
+ };
+ enum GradientColorClass {
+ Border1,
+ Border2,
+ Fill1,
+ Fill2,
+ Base
+ };
+ ColorData GetGradientColor (
+ const GradientColorType eType,
+ const GradientColorClass eClass);
+ sal_Int32 GetGradientOffset (
+ const GradientColorType eType,
+ const GradientColorClass eClass);
+ void SetGradient (
+ const GradientColorType eType,
+ const ColorData aBaseColor,
+ const sal_Int32 nSaturationOverride,
+ const sal_Int32 nBrightnessOverride,
+ const sal_Int32 nFillStartOffset,
+ const sal_Int32 nFillEndOffset,
+ const sal_Int32 nBorderStartOffset,
+ const sal_Int32 nBorderEndOffset);
+ sal_Int32 GetGradientSaturationOverride (const GradientColorType eType);
+ sal_Int32 GetGradientBrightnessOverride (const GradientColorType eType);
+ void SetGradientSaturationOverride (const GradientColorType eType, const sal_Int32 nValue);
+ void SetGradientBrightnessOverride (const GradientColorType eType, const sal_Int32 nValue);
+
+ enum IconType
+ {
+ Icon_RawShadow,
+ Icon_RawInsertShadow,
+ Icon_HideSlideOverlay,
+ Icon_FocusBorder,
+ Icon_ButtonBarLarge,
+ Icon_ButtonBarMedium,
+ Icon_ButtonBarSmall,
+ Icon_Command1Large,
+ Icon_Command1LargeHover,
+ Icon_Command1Medium,
+ Icon_Command1MediumHover,
+ Icon_Command1Small,
+ Icon_Command1SmallHover,
+ Icon_Command2Large,
+ Icon_Command2LargeHover,
+ Icon_Command2Medium,
+ Icon_Command2MediumHover,
+ Icon_Command2Small,
+ Icon_Command2SmallHover,
+ Icon_Command2BLarge,
+ Icon_Command2BLargeHover,
+ Icon_Command2BMedium,
+ Icon_Command2BMediumHover,
+ Icon_Command2BSmall,
+ Icon_Command2BSmallHover,
+ Icon_Command3Large,
+ Icon_Command3LargeHover,
+ Icon_Command3Medium,
+ Icon_Command3MediumHover,
+ Icon_Command3Small,
+ Icon_Command3SmallHover,
+ _IconType_Size_
+ };
+ const BitmapEx& GetIcon (const IconType eType);
+
+ enum IntegerValueType
+ {
+ Integer_ButtonCornerRadius,
+ Integer_ButtonMaxAlpha,
+ Integer_ButtonBarMaxAlpha,
+ Integer_ButtonPaintType,
+ Integer_ButtonBorder,
+ Integer_ButtonGap,
+ Integer_ButtonFadeInDelay,
+ Integer_ButtonFadeInDuration,
+ Integer_ButtonFadeOutDelay,
+ Integer_ButtonFadeOutDuration,
+ Integer_ToolTipDelay,
+ Integer_FocusIndicatorWidth,
+ _IntegerValueType_Size_
+ };
+ sal_Int32 GetIntegerValue (const IntegerValueType eType) const;
+ void SetIntegerValue (const IntegerValueType eType, const sal_Int32 nValue);
+
+ enum StringType
+ {
+ String_Unhide,
+ String_DragAndDropPages,
+ String_DragAndDropSlides,
+ String_Command1,
+ String_Command2,
+ String_Command2B,
+ String_Command3,
+ _StringType_Size_
+ };
+ ::rtl::OUString GetString (const StringType eType) const;
+
+private:
+ bool mbIsHighContrastMode;
+ class GradientDescriptor
+ {
+ public:
+ ColorData maBaseColor;
+
+ sal_Int32 mnSaturationOverride;
+ sal_Int32 mnBrightnessOverride;
+
+ ColorData maFillColor1;
+ ColorData maFillColor2;
+ ColorData maBorderColor1;
+ ColorData maBorderColor2;
+
+ sal_Int32 mnFillOffset1;
+ sal_Int32 mnFillOffset2;
+ sal_Int32 mnBorderOffset1;
+ sal_Int32 mnBorderOffset2;
+ };
+ ColorData maBackgroundColor;
+ ColorData maPageBackgroundColor;
+ ::std::vector<GradientDescriptor> maGradients;
+ ::std::vector<BitmapEx> maIcons;
+ ::std::vector<ColorData> maColor;
+ ::std::vector<sal_Int32> maIntegerValues;
+ ::std::vector<rtl::OUString> maStrings;
+
+ GradientDescriptor& GetGradient (const GradientColorType eType);
+ /** Guarded initialization of the specified icon in the maIcons
+ container. Call only while a LocalResource object is active.
+ */
+ void InitializeIcon (const IconType eType, sal_uInt16 nResourceId);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
new file mode 100644
index 000000000000..48a4c7c3d272
--- /dev/null
+++ b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
@@ -0,0 +1,97 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_TOOL_TIP_HXX
+#define SD_SLIDESORTER_VIEW_TOOL_TIP_HXX
+
+#include "SlideSorter.hxx"
+#include "model/SlsSharedPageDescriptor.hxx"
+
+namespace sd { namespace slidesorter { namespace view {
+
+/** Manage the display of tool tips. The tool tip text changes when the
+ mouse is moved from slide to slide or from button to button.
+ After the mouse enters a slide the first display of the tool tip is
+ delayed for a short time in order to not draw attention from the slide
+ or its button bar.
+*/
+class ToolTip
+{
+public:
+ ToolTip (SlideSorter& rSlideSorter);
+ ~ToolTip (void);
+
+ /** Set a new page. This modifies the default help text. After a page
+ change a timer is started to delay the display of the tool tip for
+ the new page.
+ @param rpPage
+ When this is empty then the tool tip is hidden.
+ */
+ void SetPage (const model::SharedPageDescriptor& rpPage);
+
+ /** Set and show the default help text.
+ */
+ void ShowDefaultHelpText (const ::rtl::OUString& rsHelpText);
+
+ /** Show a previously set default help text.
+ */
+ void ShowDefaultHelpText (void);
+
+ /** Show a temporary help text.
+ */
+ void ShowHelpText (const ::rtl::OUString& rsHelpText);
+
+ /** Hide the tool tip.
+ @return
+ Returns whether the tool tip was visible at the time this method
+ was called.
+ */
+ bool Hide (void);
+
+private:
+ SlideSorter& mrSlideSorter;
+ model::SharedPageDescriptor mpDescriptor;
+ ::rtl::OUString msDefaultHelpText;
+ ::rtl::OUString msCurrentHelpText;
+ sal_uLong mnHelpWindowHandle;
+ Timer maTimer;
+
+ /** Request to show the tool tip.
+ @param bForce
+ When <TRUE/> then the tool tip is show right away. Otherwise it
+ is shown after a short delay.
+ */
+ void Show (const bool bForce);
+ void DoShow (void);
+
+ DECL_LINK(DelayTrigger, void*);
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
deleted file mode 100644
index f4a0fbba4693..000000000000
--- a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
+++ /dev/null
@@ -1,276 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_SLIDESORTER_VIEW_OVERLAY_HXX
-#define SD_SLIDESORTER_VIEW_OVERLAY_HXX
-
-#include "model/SlsSharedPageDescriptor.hxx"
-
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <osl/mutex.hxx>
-#include <svx/sdr/overlay/overlayobject.hxx>
-#include <tools/gen.hxx>
-#include <vector>
-#include <boost/weak_ptr.hpp>
-#include <boost/noncopyable.hpp>
-
-class OutputDevice;
-class Region;
-
-
-namespace sd { namespace slidesorter {
-class SlideSorter;
-} }
-
-namespace sd { namespace slidesorter { namespace model {
-class PageEnumeration;
-} } }
-
-namespace sd { namespace slidesorter { namespace controller {
-class SlideSorterController;
-} } }
-
-namespace sdr { namespace overlay {
-class OverlayManager;
-} }
-
-namespace sd { namespace slidesorter { namespace view {
-
-
-class InsertionIndicatorOverlay;
-class PageObjectViewObjectContact;
-class SelectionRectangleOverlay;
-class SubstitutionOverlay;
-class ViewOverlay;
-
-/** This base class of slide sorter overlays uses the drawing layer overlay
- support for the display.
-*/
-class OverlayBase
- : public sdr::overlay::OverlayObject
-{
-public:
- OverlayBase (ViewOverlay& rViewOverlay);
- virtual ~OverlayBase (void);
-
-protected:
- ::osl::Mutex maMutex;
-
- ViewOverlay& mrViewOverlay;
-
- /** Make sure that the overlay object is registered at the
- OverlayManager. This registration is done on demand.
- */
- void EnsureRegistration (void);
- void RemoveRegistration();
-};
-
-
-
-
-/** During internal drag and drop the outlines of the selected slides are
- painted at the mouse position in dashed lines.
-*/
-class SubstitutionOverlay
- : public OverlayBase
-{
-public:
- SubstitutionOverlay (ViewOverlay& rViewOverlay);
- virtual ~SubstitutionOverlay (void);
-
- /** Setup the substitution display of the given set of selected pages.
- The given mouse position is remembered so that it later can be
- returned by GetPosition(). This is a convenience feature.
- */
- void Create (
- model::PageEnumeration& rSelection,
- const Point& rPosition);
-
- /** Clear the substitution display. Until the next call of Create() no
- substution is painted.
- */
- void Clear (void);
-
- /** Move the substitution display by the given amount of pixels.
- */
- void Move (const Point& rOffset);
- void SetPosition (const Point& rPosition);
- Point GetPosition (void) const;
-
- // react on stripe definition change
- virtual void stripeDefinitionHasChanged();
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- Point maPosition;
- basegfx::B2DPolyPolygon maShapes;
-};
-
-
-
-
-/** Slides can be selected by drawing a selection rectangle in the slide
- sorter. When the left mouse button is released all slides that are at
- least partially in the rectangle are selected.
-*/
-class SelectionRectangleOverlay
- : public OverlayBase
-{
-public:
- SelectionRectangleOverlay (ViewOverlay& rViewOverlay);
- virtual ~SelectionRectangleOverlay();
-
- void Start (const Point& rAnchor);
- void Update (const Point& rSecondCorner);
-
- Rectangle GetSelectionRectangle (void);
-
- // react on stripe definition change
- virtual void stripeDefinitionHasChanged();
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- Point maAnchor;
- Point maSecondCorner;
-};
-
-
-
-
-/** The insertion indicator is painted as a vertical or horizonal bar
- in the space between slides.
-*/
-class InsertionIndicatorOverlay
- : public OverlayBase
-{
-public:
- InsertionIndicatorOverlay (ViewOverlay& rViewOverlay);
- virtual ~InsertionIndicatorOverlay();
-
- /** Given a position in model coordinates this method calculates the
- insertion marker both as an index in the document and as a rectangle
- used for drawing the insertion indicator.
- */
- void SetPosition (const Point& rPosition);
-
- sal_Int32 GetInsertionPageIndex (void) const;
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- sal_Int32 mnInsertionIndex;
- Rectangle maBoundingBox;
-
- void SetPositionAndSize (const Rectangle& rBoundingBox);
-};
-
-
-
-
-/** Paint a frame around the slide preview under the mouse. The actual
- painting is done by the PageObjectViewObjectContact of the slidesorter.
-*/
-class MouseOverIndicatorOverlay
- : public OverlayBase
-{
-public:
- MouseOverIndicatorOverlay (ViewOverlay& rViewOverlay);
- virtual ~MouseOverIndicatorOverlay (void);
-
- /** Set the page object for which to paint a mouse over indicator.
- @param pContact
- A value of <NULL/> indicates to not paint the mouse over indicator.
- */
- void SetSlideUnderMouse (const model::SharedPageDescriptor& rpDescriptor);
-
-protected:
- // geometry creation for OverlayObject
- virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
-
-private:
- /** The page under the mouse is stored as weak shared pointer so that
- model changes can be handled without having the SlideSorterModel
- inform this class explicitly.
- */
- ::boost::weak_ptr<model::PageDescriptor> mpPageUnderMouse;
-
- view::PageObjectViewObjectContact* GetViewObjectContact (void) const;
-};
-
-
-
-
-/** The view overlay manages and paints some indicators that are painted on
- top of the regular view content (the page objects). It is separated
- from the view to allow the indicators to be altered in position and size
- without repainting the whole view content (inside that the bounding box
- of the indicator). This is achieved by using the drawing layer overlay
- support.
-
- The view overlay itself simply gives access to the more specialized
- classes that handle individual indicators.
-
-*/
-class ViewOverlay
-{
-public:
- ViewOverlay (SlideSorter& rSlideSorter);
- ~ViewOverlay (void);
-
- SelectionRectangleOverlay& GetSelectionRectangleOverlay (void);
- MouseOverIndicatorOverlay& GetMouseOverIndicatorOverlay (void);
- InsertionIndicatorOverlay& GetInsertionIndicatorOverlay (void);
- SubstitutionOverlay& GetSubstitutionOverlay (void);
-
- SlideSorter& GetSlideSorter (void) const;
-
- sdr::overlay::OverlayManager* GetOverlayManager (void) const;
-
-private:
- SlideSorter& mrSlideSorter;
- SelectionRectangleOverlay maSelectionRectangleOverlay;
- MouseOverIndicatorOverlay maMouseOverIndicatorOverlay;
- InsertionIndicatorOverlay maInsertionIndicatorOverlay;
- SubstitutionOverlay maSubstitutionOverlay;
-};
-
-
-
-} } } // end of namespace ::sd::slidesorter::view
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 80e822e9b102..57c887d6f02c 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -34,10 +34,10 @@
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "controller/SlsProperties.hxx"
#include "controller/SlsPageSelector.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsSlotManager.hxx"
#include "view/SlideSorterView.hxx"
#include "taskpane/SlideSorterCacheDisplay.hxx"
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
@@ -47,6 +47,7 @@
#include "ViewShellBase.hxx"
#include "DrawViewShell.hxx"
+#include "DrawDocShell.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
#include "FrameView.hxx"
@@ -68,6 +69,56 @@ namespace {
private:
Reference<drawing::XDrawPage> mxSlide;
};
+
+ bool PrintModel (const SlideSorterModel& rModel)
+ {
+ for (sal_Int32 nIndex=0,nCount=rModel.GetPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ {
+ OSL_TRACE("%d %d %d %d %x",
+ nIndex,
+ pDescriptor->GetPageIndex(),
+ pDescriptor->GetVisualState().mnPageId,
+ FromCoreIndex(pDescriptor->GetPage()->GetPageNum()),
+ pDescriptor->GetPage());
+ }
+ else
+ {
+ OSL_TRACE("%d", nIndex);
+ }
+ }
+
+ return true;
+ }
+ bool CheckModel (const SlideSorterModel& rModel)
+ {
+ for (sal_Int32 nIndex=0,nCount=rModel.GetPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if ( ! pDescriptor)
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(pDescriptor);
+ return false;
+ }
+ if (nIndex != pDescriptor->GetPageIndex())
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(nIndex == pDescriptor->GetPageIndex());
+ return false;
+ }
+ if (nIndex != pDescriptor->GetVisualState().mnPageId)
+ {
+ PrintModel(rModel);
+ OSL_ASSERT(nIndex == pDescriptor->GetVisualState().mnPageId);
+ return false;
+ }
+ }
+
+ return true;
+ }
}
@@ -79,8 +130,7 @@ SlideSorterModel::SlideSorterModel (SlideSorter& rSlideSorter)
mxSlides(),
mePageKind(PK_STANDARD),
meEditMode(EM_PAGE),
- maPageDescriptors(0),
- mpPageObjectFactory(NULL)
+ maPageDescriptors(0)
{
}
@@ -95,6 +145,21 @@ SlideSorterModel::~SlideSorterModel (void)
+void SlideSorterModel::Init (void)
+{
+}
+
+
+
+
+void SlideSorterModel::Dispose (void)
+{
+ ClearDescriptorList ();
+}
+
+
+
+
SdDrawDocument* SlideSorterModel::GetDocument (void)
{
if (mrSlideSorter.GetViewShellBase() != NULL)
@@ -159,20 +224,11 @@ SharedPageDescriptor SlideSorterModel::GetPageDescriptor (
pDescriptor = maPageDescriptors[nPageIndex];
if (pDescriptor == NULL && bCreate && mxSlides.is())
{
- SdDrawDocument* pModel = const_cast<SlideSorterModel*>(this)->GetDocument();
- SdPage* pPage = NULL;
- if (pModel != NULL)
- {
- if (meEditMode == EM_PAGE)
- pPage = pModel->GetSdPage ((USHORT)nPageIndex, mePageKind);
- else
- pPage = pModel->GetMasterSdPage ((USHORT)nPageIndex, mePageKind);
- }
+ SdPage* pPage = GetPage(nPageIndex);
pDescriptor.reset(new PageDescriptor (
Reference<drawing::XDrawPage>(mxSlides->getByIndex(nPageIndex),UNO_QUERY),
pPage,
- nPageIndex,
- GetPageObjectFactory()));
+ nPageIndex));
maPageDescriptors[nPageIndex] = pDescriptor;
}
}
@@ -235,6 +291,59 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
+sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
+{
+ if (pPage == NULL)
+ return -1;
+
+ ::osl::MutexGuard aGuard (maMutex);
+
+ // First try to guess the right index.
+ sal_Int16 nNumber ((pPage->GetPageNum()-1)/2);
+ SharedPageDescriptor pDescriptor (GetPageDescriptor(nNumber, false));
+ if (pDescriptor.get() != NULL
+ && pDescriptor->GetPage() == pPage)
+ {
+ return nNumber;
+ }
+
+ // Guess was wrong, iterate over all slides and search for the right
+ // one.
+ const sal_Int32 nCount (maPageDescriptors.size());
+ for (sal_Int32 nIndex=0; nIndex<nCount; ++nIndex)
+ {
+ pDescriptor = maPageDescriptors[nIndex];
+
+ // Make sure that the descriptor exists. Without it the given slide
+ // can not be found.
+ if (pDescriptor.get() == NULL)
+ {
+ // Call GetPageDescriptor() to create the missing descriptor.
+ pDescriptor = GetPageDescriptor(nIndex, true);
+ }
+
+ if (pDescriptor->GetPage() == pPage)
+ return nIndex;
+ }
+
+ return -1;
+}
+
+
+
+
+sal_uInt16 SlideSorterModel::GetCoreIndex (const sal_Int32 nIndex) const
+{
+ SharedPageDescriptor pDescriptor (GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ return pDescriptor->GetPage()->GetPageNum();
+ else
+ return mxSlides->getCount()*2+1;
+}
+
+
+
+
/** For now this method uses a trivial algorithm: throw away all descriptors
and create them anew (on demand). The main problem that we are facing
when designing a better algorithm is that we can not compare pointers to
@@ -245,8 +354,39 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
void SlideSorterModel::Resync (void)
{
::osl::MutexGuard aGuard (maMutex);
- ClearDescriptorList ();
- AdaptSize();
+
+ // Check if document and this model really differ.
+ bool bIsUpToDate (true);
+ SdDrawDocument* pDocument = GetDocument();
+ if (pDocument!=NULL && maPageDescriptors.size()==pDocument->GetSdPageCount(mePageKind))
+ {
+ for (sal_Int32 nIndex=0,nCount=maPageDescriptors.size(); nIndex<nCount; ++nIndex)
+ {
+ if (maPageDescriptors[nIndex]
+ && maPageDescriptors[nIndex]->GetPage()
+ != GetPage(nIndex))
+ {
+ OSL_TRACE("page %d differs\n", nIndex);
+ bIsUpToDate = false;
+ break;
+ }
+ }
+ }
+ else
+ {
+ bIsUpToDate = false;
+ OSL_TRACE("models differ");
+ }
+
+ if ( ! bIsUpToDate)
+ {
+ SynchronizeDocumentSelection(); // Try to make the current selection persistent.
+ ClearDescriptorList ();
+ AdaptSize();
+ SynchronizeModelSelection();
+ mrSlideSorter.GetController().GetPageSelector().CountSelectedPages();
+ }
+ CheckModel(*this);
}
@@ -254,21 +394,26 @@ void SlideSorterModel::Resync (void)
void SlideSorterModel::ClearDescriptorList (void)
{
- ::osl::MutexGuard aGuard (maMutex);
+ DescriptorContainer aDescriptors;
+
+ {
+ ::osl::MutexGuard aGuard (maMutex);
+ aDescriptors.swap(maPageDescriptors);
+ }
- // Clear the cache of page descriptors.
- DescriptorContainer::iterator I;
- for (I=maPageDescriptors.begin(); I!=maPageDescriptors.end(); ++I)
+ for (DescriptorContainer::iterator iDescriptor=aDescriptors.begin(), iEnd=aDescriptors.end();
+ iDescriptor!=iEnd;
+ ++iDescriptor)
{
- if (I->get() != NULL)
+ if (iDescriptor->get() != NULL)
{
- if ( ! I->unique())
+ if ( ! iDescriptor->unique())
{
- OSL_TRACE("SlideSorterModel::ClearDescriptorList: trying to delete page descriptor that is still used with count %d", I->use_count());
+ OSL_TRACE("SlideSorterModel::ClearDescriptorList: trying to delete page descriptor that is still used with count %d", iDescriptor->use_count());
// No assertion here because that can hang the office when
// opening a dialog from here.
}
- I->reset();
+ iDescriptor->reset();
}
}
}
@@ -284,44 +429,23 @@ void SlideSorterModel::SynchronizeDocumentSelection (void)
while (aAllPages.HasMoreElements())
{
SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- pDescriptor->GetPage()->SetSelected (pDescriptor->IsSelected());
+ pDescriptor->GetPage()->SetSelected(pDescriptor->HasState(PageDescriptor::ST_Selected));
}
}
-void SlideSorterModel::SetPageObjectFactory(
- ::std::auto_ptr<controller::PageObjectFactory> pPageObjectFactory)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- mpPageObjectFactory = pPageObjectFactory;
- // When a NULL pointer was given then create a default factory.
- const controller::PageObjectFactory& rFactory (GetPageObjectFactory());
- PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
- while (aAllPages.HasMoreElements())
- {
- SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- pDescriptor->SetPageObjectFactory(rFactory);
- }
-}
-
-const controller::PageObjectFactory&
- SlideSorterModel::GetPageObjectFactory (void) const
+void SlideSorterModel::SynchronizeModelSelection (void)
{
::osl::MutexGuard aGuard (maMutex);
- if (mpPageObjectFactory.get() == NULL)
+ PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
+ while (aAllPages.HasMoreElements())
{
- // We have to create a new factory. The pointer is mutable so we
- // are alowed to do so.
- mpPageObjectFactory = ::std::auto_ptr<controller::PageObjectFactory> (
- new controller::PageObjectFactory(
- mrSlideSorter.GetView().GetPreviewCache(),
- mrSlideSorter.GetController().GetProperties()));
+ SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ pDescriptor->SetState(PageDescriptor::ST_Selected, pDescriptor->GetPage()->IsSelected());
}
- return *mpPageObjectFactory.get();
}
@@ -341,7 +465,7 @@ void SlideSorterModel::SetDocumentSlides (
::osl::MutexGuard aGuard (maMutex);
// Reset the current page so to cause everbody to release references to it.
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(-1);
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(-1);
mxSlides = rxSlides;
Resync();
@@ -351,24 +475,27 @@ void SlideSorterModel::SetDocumentSlides (
{
SdPage* pPage = pViewShell->getCurrentPage();
if (pPage != NULL)
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(
- GetIndex(Reference<drawing::XDrawPage>(pPage->getUnoPage(), UNO_QUERY)));
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ pPage);
else
{
// No current page. This can only be when the slide sorter is
// the main view shell. Get current slide form frame view.
const FrameView* pFrameView = pViewShell->GetFrameView();
if (pFrameView != NULL)
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
pFrameView->GetSelectedPage());
else
{
// No frame view. As a last resort use the first slide as
// current slide.
- mrSlideSorter.GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(0);
+ mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ sal_Int32(0));
}
}
}
+
+ mrSlideSorter.GetController().GetSlotManager()->NotifyEditModeChange();
}
@@ -440,6 +567,174 @@ void SlideSorterModel::AdaptSize (void)
maPageDescriptors.resize(0);
}
+
+
+
+bool SlideSorterModel::IsReadOnly (void) const
+{
+ if (mrSlideSorter.GetViewShellBase() != NULL
+ && mrSlideSorter.GetViewShellBase()->GetDocShell())
+ return mrSlideSorter.GetViewShellBase()->GetDocShell()->IsReadOnly();
+ else
+ return true;
+}
+
+
+
+
+void SlideSorterModel::SaveCurrentSelection (void)
+{
+ PageEnumeration aPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
+ while (aPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aPages.GetNextElement());
+ pDescriptor->SetState(
+ PageDescriptor::ST_WasSelected,
+ pDescriptor->HasState(PageDescriptor::ST_Selected));
+ }
+}
+
+
+
+
+Region SlideSorterModel::RestoreSelection (void)
+{
+ Region aRepaintRegion;
+ PageEnumeration aPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
+ while (aPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aPages.GetNextElement());
+ if (pDescriptor->SetState(
+ PageDescriptor::ST_Selected,
+ pDescriptor->HasState(PageDescriptor::ST_WasSelected)))
+ {
+ aRepaintRegion.Union(pDescriptor->GetBoundingBox());
+ }
+ }
+ return aRepaintRegion;
+}
+
+
+
+
+bool SlideSorterModel::NotifyPageEvent (const SdrPage* pSdrPage)
+{
+ ::osl::MutexGuard aGuard (maMutex);
+
+ SdPage* pPage = const_cast<SdPage*>(dynamic_cast<const SdPage*>(pSdrPage));
+ if (pPage == NULL)
+ return false;
+
+ // We are only interested in pages that are currently served by this
+ // model.
+ if (pPage->GetPageKind() != mePageKind)
+ return false;
+ if (pPage->IsMasterPage() != (meEditMode==EM_MASTERPAGE))
+ return false;
+
+ if (pPage->IsInserted())
+ InsertSlide(pPage);
+ else
+ DeleteSlide(pPage);
+ CheckModel(*this);
+
+ return true;
+}
+
+
+
+
+void SlideSorterModel::InsertSlide (SdPage* pPage)
+{
+ // Find the index at which to insert the given page.
+ sal_uInt16 nCoreIndex (pPage->GetPageNum());
+ sal_Int32 nIndex (FromCoreIndex(nCoreIndex));
+ if (pPage != GetPage(nIndex))
+ return;
+
+ // Check that the pages in the document before and after the given page
+ // are present in this model.
+ if (nIndex>0)
+ if (GetPage(nIndex-1) != GetPageDescriptor(nIndex-1)->GetPage())
+ return;
+ if (size_t(nIndex)<maPageDescriptors.size()-1)
+ if (GetPage(nIndex+1) != GetPageDescriptor(nIndex)->GetPage())
+ return;
+
+ // Insert the given page at index nIndex
+ maPageDescriptors.insert(
+ maPageDescriptors.begin()+nIndex,
+ SharedPageDescriptor(
+ new PageDescriptor (
+ Reference<drawing::XDrawPage>(mxSlides->getByIndex(nIndex),UNO_QUERY),
+ pPage,
+ nIndex)));
+
+ // Update page indices.
+ UpdateIndices(nIndex+1);
+ OSL_TRACE("page inserted");
+}
+
+
+
+
+void SlideSorterModel::DeleteSlide (const SdPage* pPage)
+{
+ const sal_Int32 nIndex (GetIndex(pPage));
+ if (maPageDescriptors[nIndex])
+ if (maPageDescriptors[nIndex]->GetPage() != pPage)
+ return;
+
+ maPageDescriptors.erase(maPageDescriptors.begin()+nIndex);
+ UpdateIndices(nIndex);
+ OSL_TRACE("page removed");
+}
+
+
+
+
+void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
+{
+ for (sal_Int32 nDescriptorIndex=0,nCount=maPageDescriptors.size();
+ nDescriptorIndex<nCount;
+ ++nDescriptorIndex)
+ {
+ SharedPageDescriptor& rpDescriptor (maPageDescriptors[nDescriptorIndex]);
+ if (rpDescriptor)
+ {
+ if (nDescriptorIndex < nFirstIndex)
+ {
+ if (rpDescriptor->GetPageIndex()!=nDescriptorIndex)
+ {
+ OSL_ASSERT(rpDescriptor->GetPageIndex()==nDescriptorIndex);
+ }
+ }
+ else
+ {
+ rpDescriptor->SetPageIndex(nDescriptorIndex);
+ }
+ }
+ }
+}
+
+
+
+
+SdPage* SlideSorterModel::GetPage (const sal_Int32 nSdIndex) const
+{
+ SdDrawDocument* pModel = const_cast<SlideSorterModel*>(this)->GetDocument();
+ if (pModel != NULL)
+ {
+ if (meEditMode == EM_PAGE)
+ return pModel->GetSdPage ((sal_uInt16)nSdIndex, mePageKind);
+ else
+ return pModel->GetMasterSdPage ((sal_uInt16)nSdIndex, mePageKind);
+ }
+ else
+ return NULL;
+}
+
+
} } } // end of namespace ::sd::slidesorter::model
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
index 9a3ddc3ac8a0..bb1beb58f2ff 100644
--- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
@@ -30,9 +30,6 @@
#include "precompiled_sd.hxx"
#include "model/SlsPageDescriptor.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
@@ -40,31 +37,35 @@
#include <svx/svdopage.hxx>
#include <svx/svdpagv.hxx>
#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/sdr/contact/viewobjectcontact.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
namespace sd { namespace slidesorter { namespace model {
+
PageDescriptor::PageDescriptor (
const Reference<drawing::XDrawPage>& rxPage,
SdPage* pPage,
- const sal_Int32 nIndex,
- const controller::PageObjectFactory& rPageObjectFactory)
+ const sal_Int32 nIndex)
: mpPage(pPage),
mxPage(rxPage),
+ mpMasterPage(NULL),
mnIndex(nIndex),
- mpPageObjectFactory(&rPageObjectFactory),
- mpPageObject(NULL),
+ maBoundingBox(),
+ maVisualState(nIndex),
mbIsSelected(false),
+ mbWasSelected(false),
mbIsVisible(false),
mbIsFocused(false),
mbIsCurrent(false),
- mpViewObjectContact(NULL),
- maModelBorder(0,0,0,0),
- maPageNumberAreaModelSize(0,0)
+ mbIsMouseOver(false)
{
+ OSL_ASSERT(mpPage);
OSL_ASSERT(mpPage == SdPage::getImplementation(rxPage));
+ if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
+ mpMasterPage = &mpPage->TRG_GetMasterPage();
}
@@ -93,48 +94,31 @@ Reference<drawing::XDrawPage> PageDescriptor::GetXDrawPage (void) const
-view::PageObject* PageDescriptor::GetPageObject (void)
+sal_Int32 PageDescriptor::GetPageIndex (void) const
{
- if (mpPageObject==NULL && mpPageObjectFactory!=NULL && mpPage != NULL)
- {
- mpPageObject = mpPageObjectFactory->CreatePageObject(mpPage, shared_from_this());
- }
-
- return mpPageObject;
+ return mnIndex;
}
-void PageDescriptor::ReleasePageObject (void)
+void PageDescriptor::SetPageIndex (const sal_Int32 nNewIndex)
{
- mpPageObject = NULL;
+ mnIndex = nNewIndex;
+ maVisualState.mnPageId = nNewIndex;
}
-bool PageDescriptor::IsVisible (void) const
+bool PageDescriptor::UpdateMasterPage (void)
{
- return mbIsVisible;
-}
-
-
-
-
-void PageDescriptor::SetVisible (bool bIsVisible)
-{
- mbIsVisible = bIsVisible;
-}
-
-
-
-
-bool PageDescriptor::Select (void)
-{
- if ( ! IsSelected())
+ const SdrPage* pMaster = NULL;
+ if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
+ pMaster = &mpPage->TRG_GetMasterPage();
+ if (mpMasterPage != pMaster)
{
- mbIsSelected = true;
+ mpMasterPage = pMaster;
return true;
}
else
@@ -144,137 +128,161 @@ bool PageDescriptor::Select (void)
-bool PageDescriptor::Deselect (void)
+bool PageDescriptor::HasState (const State eState) const
{
- if (IsSelected())
+ switch (eState)
{
- mbIsSelected = false;
- return true;
- }
- else
- return false;
-}
+ case ST_Visible:
+ return mbIsVisible;
+ case ST_Selected:
+ return mbIsSelected;
+ case ST_WasSelected:
+ return mbWasSelected;
+ case ST_Focused:
+ return mbIsFocused;
-bool PageDescriptor::IsSelected (void) const
-{
- return mbIsSelected;
-}
+ case ST_MouseOver:
+ return mbIsMouseOver;
+ case ST_Current:
+ return mbIsCurrent;
+ case ST_Excluded:
+ return mpPage!=NULL && mpPage->IsExcluded();
-
-bool PageDescriptor::UpdateSelection (void)
-{
- if (mpPage!=NULL && (mpPage->IsSelected()==TRUE) != mbIsSelected)
- {
- mbIsSelected = ! mbIsSelected;
- return true;
+ default:
+ OSL_ASSERT(false);
+ return false;
}
- else
- return false;
-}
-
-
-
-
-bool PageDescriptor::IsFocused (void) const
-{
- return mbIsFocused;
}
-void PageDescriptor::SetFocus (void)
+bool PageDescriptor::SetState (const State eState, const bool bNewStateValue)
{
- mbIsFocused = true;
-}
-
-
-
-
-void PageDescriptor::RemoveFocus (void)
-{
- mbIsFocused = false;
-}
-
-
-
-
-view::PageObjectViewObjectContact*
- PageDescriptor::GetViewObjectContact (void) const
-{
- return mpViewObjectContact;
-}
-
-
-
-
-void PageDescriptor::SetViewObjectContact (
- view::PageObjectViewObjectContact* pViewObjectContact)
-{
- mpViewObjectContact = pViewObjectContact;
-}
-
-
-
+ bool bModified (false);
+ switch (eState)
+ {
+ case ST_Visible:
+ bModified = (bNewStateValue!=mbIsVisible);
+ if (bModified)
+ mbIsVisible = bNewStateValue;
+ break;
+
+ case ST_Selected:
+ bModified = (bNewStateValue!=mbIsSelected);
+ if (bModified)
+ mbIsSelected = bNewStateValue;
+ break;
+
+ case ST_WasSelected:
+ bModified = (bNewStateValue!=mbWasSelected);
+ if (bModified)
+ mbWasSelected = bNewStateValue;
+ break;
+
+ case ST_Focused:
+ bModified = (bNewStateValue!=mbIsFocused);
+ if (bModified)
+ mbIsFocused = bNewStateValue;
+ break;
+
+ case ST_MouseOver:
+ bModified = (bNewStateValue!=mbIsMouseOver);
+ if (bModified)
+ mbIsMouseOver = bNewStateValue;
+ break;
+
+ case ST_Current:
+ bModified = (bNewStateValue!=mbIsCurrent);
+ if (bModified)
+ mbIsCurrent = bNewStateValue;
+ break;
+
+ case ST_Excluded:
+ // This is a state of the page and has to be handled differently
+ // from the view-only states.
+ if (mpPage != NULL)
+ if (bNewStateValue != (mpPage->IsExcluded()==sal_True))
+ {
+ mpPage->SetExcluded(bNewStateValue);
+ bModified = true;
+ }
+ break;
+ }
-const controller::PageObjectFactory&
- PageDescriptor::GetPageObjectFactory (void) const
-{
- return *mpPageObjectFactory;
+ if (bModified)
+ maVisualState.UpdateVisualState(*this);
+ return bModified;
}
-void PageDescriptor::SetPageObjectFactory (
- const controller::PageObjectFactory& rFactory)
+VisualState& PageDescriptor::GetVisualState (void)
{
- mpPageObjectFactory = &rFactory;
+ return maVisualState;
}
-void PageDescriptor::SetModelBorder (const SvBorder& rBorder)
+bool PageDescriptor::GetCoreSelection (void)
{
- maModelBorder = rBorder;
+ if (mpPage!=NULL && (mpPage->IsSelected()==sal_True) != mbIsSelected)
+ return SetState(ST_Selected, !mbIsSelected);
+ else
+ return false;
}
-SvBorder PageDescriptor::GetModelBorder (void) const
+void PageDescriptor::SetCoreSelection (void)
{
- return maModelBorder;
+ if (mpPage != NULL)
+ if (HasState(ST_Selected))
+ mpPage->SetSelected(sal_True);
+ else
+ mpPage->SetSelected(sal_False);
+ else
+ {
+ OSL_ASSERT(mpPage!=NULL);
+ }
}
-void PageDescriptor::SetPageNumberAreaModelSize (const Size& rSize)
+Rectangle PageDescriptor::GetBoundingBox (void) const
{
- maPageNumberAreaModelSize = rSize;
+ Rectangle aBox (maBoundingBox);
+ const Point aOffset (maVisualState.GetLocationOffset());
+ aBox.Move(aOffset.X(), aOffset.Y());
+ return aBox;
}
-Size PageDescriptor::GetPageNumberAreaModelSize (void) const
+Point PageDescriptor::GetLocation (const bool bIgnoreOffset) const
{
- return maPageNumberAreaModelSize;
+ if (bIgnoreOffset)
+ return maBoundingBox.TopLeft();
+ else
+ return maBoundingBox.TopLeft() + maVisualState.GetLocationOffset();
}
-void PageDescriptor::SetIsCurrentPage (const bool bIsCurrent)
+void PageDescriptor::SetBoundingBox (const Rectangle& rBoundingBox)
{
- mbIsCurrent = bIsCurrent;
+ maBoundingBox = rBoundingBox;
}
diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx b/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx
index 28235ef1c513..98240924a75c 100644..100755
--- a/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx
@@ -57,7 +57,7 @@ class SelectedPagesPredicate
public:
bool operator() (const SharedPageDescriptor& rpDescriptor)
{
- return rpDescriptor->IsSelected();
+ return rpDescriptor->HasState(PageDescriptor::ST_Selected);
}
};
@@ -69,7 +69,7 @@ class VisiblePagesPredicate
public:
bool operator() (const SharedPageDescriptor& rpDescriptor)
{
- return rpDescriptor->IsVisible();
+ return rpDescriptor->HasState(PageDescriptor::ST_Visible);
}
};
diff --git a/sd/source/ui/slidesorter/model/SlsVisualState.cxx b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
new file mode 100644
index 000000000000..3dee5e914ab9
--- /dev/null
+++ b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
@@ -0,0 +1,236 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "model/SlsVisualState.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "controller/SlsAnimator.hxx"
+
+namespace sd { namespace slidesorter { namespace model {
+
+VisualState::VisualState (const sal_Int32 nPageId)
+ : mnPageId(nPageId),
+ meCurrentVisualState(VS_None),
+ meOldVisualState(VS_None),
+ mnVisualStateBlend(1.0),
+ mnStateAnimationId(controller::Animator::NotAnAnimationId),
+ maLocationOffset(0,0),
+ mnLocationAnimationId(controller::Animator::NotAnAnimationId),
+ mnButtonAlpha(1.0),
+ mnButtonBarAlpha(1.0),
+ mnButtonAlphaAnimationId(controller::Animator::NotAnAnimationId)
+{
+}
+
+
+
+
+VisualState::~VisualState (void)
+{
+ if (mnStateAnimationId != controller::Animator::NotAnAnimationId
+ || mnLocationAnimationId != controller::Animator::NotAnAnimationId)
+ {
+ OSL_ASSERT(mnStateAnimationId == controller::Animator::NotAnAnimationId);
+ OSL_ASSERT(mnLocationAnimationId == controller::Animator::NotAnAnimationId);
+ }
+}
+
+
+
+
+VisualState::State VisualState::GetCurrentVisualState (void) const
+{
+ return meCurrentVisualState;
+}
+
+
+
+
+VisualState::State VisualState::GetOldVisualState (void) const
+{
+ return meOldVisualState;
+}
+
+
+
+
+void VisualState::SetVisualState (const State eState)
+{
+ meOldVisualState = meCurrentVisualState;
+ meCurrentVisualState = eState;
+ mnVisualStateBlend = 1.0;
+}
+
+
+
+
+double VisualState::GetVisualStateBlend (void) const
+{
+ return mnVisualStateBlend;
+}
+
+
+
+
+void VisualState::SetVisualStateBlend (const double nBlend)
+{
+ mnVisualStateBlend = nBlend;
+}
+
+
+
+
+void VisualState::UpdateVisualState (const PageDescriptor& rDescriptor)
+{
+ if (rDescriptor.HasState(PageDescriptor::ST_Excluded))
+ SetVisualState(VS_Excluded);
+ else if (rDescriptor.HasState(PageDescriptor::ST_Current))
+ SetVisualState(VS_Current);
+ else if (rDescriptor.HasState(PageDescriptor::ST_Focused))
+ SetVisualState(VS_Focused);
+ else if (rDescriptor.HasState(PageDescriptor::ST_Selected))
+ SetVisualState(VS_Selected);
+ else
+ SetVisualState(VS_None);
+
+ SetMouseOverState(rDescriptor.HasState(PageDescriptor::ST_MouseOver));
+}
+
+
+
+
+void VisualState::SetMouseOverState (const bool bIsMouseOver)
+{
+ mbOldMouseOverState = mbCurrentMouseOverState;
+ mbCurrentMouseOverState = bIsMouseOver;
+}
+
+
+
+
+sal_Int32 VisualState::GetStateAnimationId (void) const
+{
+ return mnStateAnimationId;
+}
+
+
+
+
+void VisualState::SetStateAnimationId (const sal_Int32 nAnimationId)
+{
+ mnStateAnimationId = nAnimationId;
+}
+
+
+
+
+Point VisualState::GetLocationOffset (void) const
+{
+ return maLocationOffset;
+}
+
+
+
+
+bool VisualState::SetLocationOffset (const Point& rOffset)
+{
+ if (maLocationOffset != rOffset)
+ {
+ maLocationOffset = rOffset;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+sal_Int32 VisualState::GetLocationAnimationId (void) const
+{
+ return mnLocationAnimationId;
+}
+
+
+
+
+void VisualState::SetLocationAnimationId (const sal_Int32 nAnimationId)
+{
+ mnLocationAnimationId = nAnimationId;
+}
+
+
+
+
+double VisualState::GetButtonAlpha (void) const
+{
+ return mnButtonAlpha;
+}
+
+
+
+
+void VisualState::SetButtonAlpha (const double nAlpha)
+{
+ mnButtonAlpha = nAlpha;
+}
+
+
+
+
+double VisualState::GetButtonBarAlpha (void) const
+{
+ return mnButtonBarAlpha;
+}
+
+
+
+
+void VisualState::SetButtonBarAlpha (const double nAlpha)
+{
+ mnButtonBarAlpha = nAlpha;
+}
+
+
+
+
+sal_Int32 VisualState::GetButtonAlphaAnimationId (void) const
+{
+ return mnButtonAlphaAnimationId;
+}
+
+
+
+
+void VisualState::SetButtonAlphaAnimationId (const sal_Int32 nAnimationId)
+{
+ mnButtonAlphaAnimationId = nAnimationId;
+}
+
+
+} } } // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/model/makefile.mk b/sd/source/ui/slidesorter/model/makefile.mk
index 9c8979fe3767..0347d05a8100 100644..100755
--- a/sd/source/ui/slidesorter/model/makefile.mk
+++ b/sd/source/ui/slidesorter/model/makefile.mk
@@ -46,6 +46,7 @@ SLOFILES = \
$(SLO)$/SlsPageDescriptor.obj \
$(SLO)$/SlsPageEnumeration.obj \
$(SLO)$/SlsPageEnumerationProvider.obj \
+ $(SLO)$/SlsVisualState.obj \
$(SLO)$/SlideSorterModel.obj
EXCEPTIONSFILES=
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index 47f3f56bc1c9..0c75e7a047dc 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -34,7 +34,10 @@
#include "SlideSorterViewShell.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsScrollBarManager.hxx"
+#include "controller/SlsProperties.hxx"
+#include "controller/SlsAnimator.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsTheme.hxx"
#include "model/SlideSorterModel.hxx"
#include "glob.hrc"
@@ -133,10 +136,13 @@ SlideSorter::SlideSorter (
mpViewShell(&rViewShell),
mpViewShellBase(&rViewShell.GetViewShellBase()),
mpContentWindow(rpContentWindow),
+ mbOwnesContentWindow(false),
mpHorizontalScrollBar(rpHorizontalScrollBar),
mpVerticalScrollBar(rpVerticalScrollBar),
mpScrollBarBox(rpScrollBarBox),
- mbLayoutPending(true)
+ mbLayoutPending(true),
+ mpProperties(new controller::Properties()),
+ mpTheme(new view::Theme(mpProperties))
{
}
@@ -155,10 +161,13 @@ SlideSorter::SlideSorter (
mpViewShell(pViewShell),
mpViewShellBase(&rBase),
mpContentWindow(new ContentWindow(rParentWindow,*this )),
+ mbOwnesContentWindow(true),
mpHorizontalScrollBar(new ScrollBar(&rParentWindow,WinBits(WB_HSCROLL | WB_DRAG))),
mpVerticalScrollBar(new ScrollBar(&rParentWindow,WinBits(WB_VSCROLL | WB_DRAG))),
mpScrollBarBox(new ScrollBarBox(&rParentWindow)),
- mbLayoutPending(true)
+ mbLayoutPending(true),
+ mpProperties(new controller::Properties()),
+ mpTheme(new view::Theme(mpProperties))
{
}
@@ -170,24 +179,37 @@ void SlideSorter::Init (void)
if (mpViewShellBase != NULL)
mxControllerWeak = mpViewShellBase->GetController();
+ // Reinitialize colors in Properties with window specific values.
+ if (mpContentWindow)
+ {
+ mpProperties->SetBackgroundColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetWindowColor());
+ mpProperties->SetTextColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetWindowTextColor());
+ mpProperties->SetSelectionColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ mpProperties->SetHighlightColor(
+ mpContentWindow->GetSettings().GetStyleSettings().GetMenuHighlightColor());
+ }
+
CreateModelViewController ();
SetupListeners ();
// Initialize the window.
- ::sd::Window* pWindow = GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pContentWindow (GetContentWindow());
+ if (pContentWindow)
{
- ::Window* pParentWindow = pWindow->GetParent();
+ ::Window* pParentWindow = pContentWindow->GetParent();
if (pParentWindow != NULL)
pParentWindow->SetBackground(Wallpaper());
- pWindow->SetBackground(Wallpaper());
- pWindow->SetViewOrigin (Point(0,0));
+ pContentWindow->SetBackground(Wallpaper());
+ pContentWindow->SetViewOrigin (Point(0,0));
// We do our own scrolling while dragging a page selection.
- pWindow->SetUseDropScroll (false);
+ pContentWindow->SetUseDropScroll (false);
// Change the winbits so that the active window accepts the focus.
- pWindow->SetStyle ((pWindow->GetStyle() & ~WB_DIALOGCONTROL) | WB_TABSTOP);
- pWindow->Hide();
+ pContentWindow->SetStyle ((pContentWindow->GetStyle() & ~WB_DIALOGCONTROL) | WB_TABSTOP);
+ pContentWindow->Hide();
// Set view pointer of base class.
SetupControls(pParentWindow);
@@ -205,6 +227,12 @@ SlideSorter::~SlideSorter (void)
ReleaseListeners();
+ // Dispose model, view and controller to avoid calls between them when
+ // they are being destructed and one or two of them are already gone.
+ mpSlideSorterController->Dispose();
+ mpSlideSorterView->Dispose();
+ mpSlideSorterModel->Dispose();
+
// Reset the auto pointers explicitly to control the order of destruction.
mpSlideSorterController.reset();
mpSlideSorterView.reset();
@@ -213,6 +241,17 @@ SlideSorter::~SlideSorter (void)
mpHorizontalScrollBar.reset();
mpVerticalScrollBar.reset();
mpScrollBarBox.reset();
+
+ if (mbOwnesContentWindow)
+ {
+ OSL_ASSERT(mpContentWindow.unique());
+ }
+ else
+ {
+ // Assume that outside this class only the owner holds a reference
+ // to the content window.
+ OSL_ASSERT(mpContentWindow.use_count()==2);
+ }
mpContentWindow.reset();
}
@@ -298,7 +337,7 @@ void SlideSorter::Paint (const Rectangle& rRepaintArea)
-::boost::shared_ptr<sd::Window> SlideSorter::GetContentWindow (void) const
+::SharedSdWindow SlideSorter::GetContentWindow (void) const
{
return mpContentWindow;
}
@@ -306,17 +345,6 @@ void SlideSorter::Paint (const Rectangle& rRepaintArea)
-::sd::Window* SlideSorter::GetActiveWindow (void) const
-{
- if (mpViewShell != NULL)
- return mpViewShell->GetActiveWindow();
- else
- return mpContentWindow.get();
-}
-
-
-
-
ViewShellBase* SlideSorter::GetViewShellBase (void) const
{
return mpViewShellBase;
@@ -344,8 +372,8 @@ void SlideSorter::SetupControls (::Window* )
void SlideSorter::SetupListeners (void)
{
- ::sd::Window* pWindow = GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (GetContentWindow());
+ if (pWindow)
{
::Window* pParentWindow = pWindow->GetParent();
if (pParentWindow != NULL)
@@ -376,10 +404,9 @@ void SlideSorter::ReleaseListeners (void)
{
mpSlideSorterController->GetScrollBarManager().Disconnect();
- ::sd::Window* pWindow = GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (GetContentWindow());
+ if (pWindow)
{
-
pWindow->RemoveEventListener(
LINK(mpSlideSorterController.get(),
controller::SlideSorterController,
@@ -414,7 +441,12 @@ void SlideSorter::CreateModelViewController (void)
mpSlideSorterController.reset(CreateController());
DBG_ASSERT (mpSlideSorterController.get()!=NULL,
"Can not create controller for slide browser");
+
+ // Now that model, view, and controller are constructed, do the
+ // initialization that relies on all three being in place.
+ mpSlideSorterModel->Init();
mpSlideSorterController->Init();
+ mpSlideSorterView->Init();
}
@@ -461,26 +493,21 @@ void SlideSorter::ArrangeGUIElements (
{
Point aOrigin (rOffset);
- if (rSize.Width()!=0 && rSize.Height()!=0)
+ if (rSize.Width()>0
+ && rSize.Height()>0
+ && GetContentWindow()
+ && GetContentWindow()->IsVisible())
{
// Prevent untimely redraws while the view is not yet correctly
// resized.
- mpSlideSorterView->LockRedraw (TRUE);
- if (GetActiveWindow() != NULL)
- GetActiveWindow()->EnablePaint (FALSE);
+ view::SlideSorterView::DrawLock aLock (*this);
+ GetContentWindow()->EnablePaint (sal_False);
- // maAllWindowRectangle =
mpSlideSorterController->Resize (Rectangle(aOrigin, rSize));
- if (GetActiveWindow() != NULL)
- GetActiveWindow()->EnablePaint (TRUE);
+ GetContentWindow()->EnablePaint (sal_True);
mbLayoutPending = false;
- mpSlideSorterView->LockRedraw (FALSE);
- }
- else
- {
- // maAllWindowRectangle = Rectangle();
}
}
@@ -507,6 +534,9 @@ SvBorder SlideSorter::GetBorder (void)
bool SlideSorter::RelocateToWindow (::Window* pParentWindow)
{
+ // Stop all animations for they have been started for the old window.
+ mpSlideSorterController->GetAnimator()->RemoveAllAnimations();
+
ReleaseListeners();
if (mpViewShell != NULL)
@@ -518,8 +548,8 @@ bool SlideSorter::RelocateToWindow (::Window* pParentWindow)
// For accessibility we have to shortly hide the content window. This
// triggers the construction of a new accessibility object for the new
// view shell. (One is created earlier while the construtor of the base
- // class is executed. At that time the correct accessibility object can
- // not be constructed.)
+ // class is executed. But because at that time the correct
+ // accessibility object can not be constructed we do that now.)
if (mpContentWindow.get() !=NULL)
{
mpContentWindow->Hide();
@@ -541,9 +571,8 @@ void SlideSorter::SetCurrentFunction (const FunctionReference& rpFunction)
}
else
{
- ::boost::shared_ptr<ContentWindow> pWindow
- = ::boost::dynamic_pointer_cast<ContentWindow>(GetContentWindow());
- if (pWindow.get() != NULL)
+ ContentWindow* pWindow = dynamic_cast<ContentWindow*>(GetContentWindow().get());
+ if (pWindow != NULL)
pWindow->SetCurrentFunction(rpFunction);
}
}
@@ -551,6 +580,24 @@ void SlideSorter::SetCurrentFunction (const FunctionReference& rpFunction)
+::boost::shared_ptr<controller::Properties> SlideSorter::GetProperties (void) const
+{
+ OSL_ASSERT(mpProperties);
+ return mpProperties;
+}
+
+
+
+
+::boost::shared_ptr<view::Theme> SlideSorter::GetTheme (void) const
+{
+ OSL_ASSERT(mpTheme);
+ return mpTheme;
+}
+
+
+
+
//===== ContentWindow =========================================================
namespace {
@@ -645,10 +692,12 @@ long ContentWindow::Notify (NotifyEvent& rEvent)
-
} // end of anonymous namespace
+
+
+
} } // end of namespace ::sd::slidesorter
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx b/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx
index 79b14e6f4ccd..e78fa4218c74 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterChildWindow.cxx
@@ -41,7 +41,7 @@ namespace sd { namespace slidesorter {
SlideSorterChildWindow::SlideSorterChildWindow (
::Window* pParentWindow,
- USHORT nId,
+ sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: SfxChildWindow (pParentWindow, nId)
@@ -52,7 +52,7 @@ SlideSorterChildWindow::SlideSorterChildWindow (
pParentWindow);
eChildAlignment = SFX_ALIGN_LEFT;
static_cast<SfxDockingWindow*>(pWindow)->Initialize (pInfo);
- // SetHideNotDelete (TRUE);
+ // SetHideNotDelete (sal_True);
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index 41f55fcc6be5..de3affaa1f5d 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -35,6 +35,7 @@
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
#include "DrawController.hxx"
#include <toolkit/helper/vclunohelper.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -47,7 +48,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
-using ::sd::slidesorter::view::SlideSorterView;
+using ::sd::slidesorter::view::Layouter;
namespace sd { namespace slidesorter {
@@ -267,7 +268,7 @@ void SAL_CALL SlideSorterService::setCurrentPage(const Reference<drawing::XDrawP
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL)
- mpSlideSorter->GetController().GetCurrentSlideManager()->CurrentSlideHasChanged(
+ mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
mpSlideSorter->GetModel().GetIndex(rxSlide));
}
@@ -318,7 +319,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsHighlightCurrentSlide (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsHighlightCurrentSlide();
+ return mpSlideSorter->GetProperties()->IsHighlightCurrentSlide();
}
@@ -330,7 +331,7 @@ void SAL_CALL SlideSorterService::setIsHighlightCurrentSlide (sal_Bool bValue)
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
{
- mpSlideSorter->GetController().GetProperties()->SetHighlightCurrentSlide(bValue);
+ mpSlideSorter->GetProperties()->SetHighlightCurrentSlide(bValue);
controller::SlideSorterController::ModelChangeLock aLock (mpSlideSorter->GetController());
mpSlideSorter->GetController().HandleModelChange();
}
@@ -346,7 +347,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowSelection (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsShowSelection();
+ return mpSlideSorter->GetProperties()->IsShowSelection();
}
@@ -357,7 +358,7 @@ void SAL_CALL SlideSorterService::setIsShowSelection (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetShowSelection(bValue);
+ mpSlideSorter->GetProperties()->SetShowSelection(bValue);
}
@@ -370,7 +371,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowFocus (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsShowFocus();
+ return mpSlideSorter->GetProperties()->IsShowFocus();
}
@@ -381,7 +382,7 @@ void SAL_CALL SlideSorterService::setIsShowFocus (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetShowFocus(bValue);
+ mpSlideSorter->GetProperties()->SetShowFocus(bValue);
}
@@ -394,7 +395,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsCenterSelection (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsCenterSelection();
+ return mpSlideSorter->GetProperties()->IsCenterSelection();
}
@@ -405,7 +406,7 @@ void SAL_CALL SlideSorterService::setIsCenterSelection (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetCenterSelection(bValue);
+ mpSlideSorter->GetProperties()->SetCenterSelection(bValue);
}
@@ -418,7 +419,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsSuspendPreviewUpdatesDuringFullScreen
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return true;
else
- return mpSlideSorter->GetController().GetProperties()
+ return mpSlideSorter->GetProperties()
->IsSuspendPreviewUpdatesDuringFullScreenPresentation();
}
@@ -431,7 +432,7 @@ void SAL_CALL SlideSorterService::setIsSuspendPreviewUpdatesDuringFullScreenPres
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()
+ mpSlideSorter->GetProperties()
->SetSuspendPreviewUpdatesDuringFullScreenPresentation(bValue);
}
@@ -445,7 +446,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsOrientationVertical (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return true;
else
- return mpSlideSorter->GetView().GetOrientation() == SlideSorterView::VERTICAL;
+ return mpSlideSorter->GetView().GetOrientation() != Layouter::HORIZONTAL;
}
@@ -457,8 +458,8 @@ void SAL_CALL SlideSorterService::setIsOrientationVertical (sal_Bool bValue)
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
mpSlideSorter->GetView().SetOrientation(bValue
- ? SlideSorterView::VERTICAL
- : SlideSorterView::HORIZONTAL);
+ ? Layouter::GRID
+ : Layouter::HORIZONTAL);
}
@@ -471,7 +472,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsSmoothScrolling (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return false;
else
- return mpSlideSorter->GetController().GetProperties()->IsSmoothSelectionScrolling();
+ return mpSlideSorter->GetProperties()->IsSmoothSelectionScrolling();
}
@@ -482,7 +483,7 @@ void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetSmoothSelectionScrolling(bValue);
+ mpSlideSorter->GetProperties()->SetSmoothSelectionScrolling(bValue);
}
@@ -496,7 +497,7 @@ util::Color SAL_CALL SlideSorterService::getBackgroundColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetBackgroundColor().GetColor());
+ mpSlideSorter->GetProperties()->GetBackgroundColor().GetColor());
}
@@ -507,8 +508,7 @@ void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundCol
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetBackgroundColor(
- Color(aBackgroundColor));
+ mpSlideSorter->GetProperties()->SetBackgroundColor(Color(aBackgroundColor));
}
@@ -522,7 +522,7 @@ util::Color SAL_CALL SlideSorterService::getTextColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetTextColor().GetColor());
+ mpSlideSorter->GetProperties()->GetTextColor().GetColor());
}
@@ -533,8 +533,7 @@ void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetTextColor(
- Color(aTextColor));
+ mpSlideSorter->GetProperties()->SetTextColor(Color(aTextColor));
}
@@ -548,7 +547,7 @@ util::Color SAL_CALL SlideSorterService::getSelectionColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetSelectionColor().GetColor());
+ mpSlideSorter->GetProperties()->GetSelectionColor().GetColor());
}
@@ -559,8 +558,7 @@ void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetSelectionColor(
- Color(aSelectionColor));
+ mpSlideSorter->GetProperties()->SetSelectionColor(Color(aSelectionColor));
}
@@ -574,7 +572,7 @@ util::Color SAL_CALL SlideSorterService::getHighlightColor (void)
return util::Color();
else
return util::Color(
- mpSlideSorter->GetController().GetProperties()->GetHighlightColor().GetColor());
+ mpSlideSorter->GetProperties()->GetHighlightColor().GetColor());
}
@@ -585,8 +583,7 @@ void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetHighlightColor(
- Color(aHighlightColor));
+ mpSlideSorter->GetProperties()->SetHighlightColor(Color(aHighlightColor));
}
@@ -598,7 +595,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly (void)
if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
return true;
else
- return mpSlideSorter->GetController().GetProperties()->IsUIReadOnly();
+ return mpSlideSorter->GetProperties()->IsUIReadOnly();
}
@@ -609,8 +606,7 @@ void SAL_CALL SlideSorterService::setIsUIReadOnly (sal_Bool bIsUIReadOnly)
{
ThrowIfDisposed();
if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
- mpSlideSorter->GetController().GetProperties()->SetUIReadOnly(
- bIsUIReadOnly);
+ mpSlideSorter->GetProperties()->SetUIReadOnly(bIsUIReadOnly);
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 635ff7096d4a..11c002c97d1f 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -40,6 +40,8 @@
#include "controller/SlsSlotManager.hxx"
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsSelectionFunction.hxx"
+#include "controller/SlsProperties.hxx"
#include "view/SlideSorterView.hxx"
#include "view/SlsLayouter.hxx"
#include "model/SlideSorterModel.hxx"
@@ -98,8 +100,11 @@ TYPEINIT1(SlideSorterViewShell, ViewShell);
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
::Window* pParentWindow,
- FrameView* pFrameViewArgument)
+ FrameView* pFrameViewArgument,
+ const bool bIsCenterPane)
{
+ (void)bIsCenterPane;
+
::boost::shared_ptr<SlideSorterViewShell> pViewShell;
try
{
@@ -125,7 +130,8 @@ SlideSorterViewShell::SlideSorterViewShell (
::Window* pParentWindow,
FrameView* pFrameViewArgument)
: ViewShell (pFrame, pParentWindow, rViewShellBase),
- mpSlideSorter()
+ mpSlideSorter(),
+ mbIsArrangeGUIElementsPending(true)
{
meShellType = ST_SLIDE_SORTER;
@@ -189,8 +195,8 @@ void SlideSorterViewShell::Initialize (void)
// the new view shell. (One is created earlier while the construtor
// of the base class is executed. At that time the correct
// accessibility object can not be constructed.)
- ::Window* pWindow = mpSlideSorter->GetActiveWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mpSlideSorter->GetContentWindow());
+ if (pWindow)
{
pWindow->Hide();
pWindow->Show();
@@ -306,14 +312,23 @@ SlideSorter& SlideSorterViewShell::GetSlideSorter (void) const
bool SlideSorterViewShell::RelocateToParentWindow (::Window* pParentWindow)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- return mpSlideSorter->RelocateToWindow(pParentWindow);
+ OSL_ASSERT(mpSlideSorter);
+ if ( ! mpSlideSorter)
+ return false;
+
+ if (pParentWindow == NULL)
+ WriteFrameViewData();
+ const bool bSuccess (mpSlideSorter->RelocateToWindow(pParentWindow));
+ if (pParentWindow != NULL)
+ ReadFrameViewData(mpFrameView);
+
+ return bSuccess;
}
-SfxUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const
+::svl::IUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const
{
SfxShell* pObjectBar = GetViewShellBase().GetViewShellManager()->GetTopShell();
if (pObjectBar != NULL)
@@ -384,6 +399,11 @@ SdPage* SlideSorterViewShell::GetActualPage (void)
pCurrentPage = pDescriptor->GetPage();
}
+ if (pCurrentPage == NULL)
+ {
+
+ }
+
return pCurrentPage;
}
@@ -503,23 +523,13 @@ void SlideSorterViewShell::ExecStatusBar (SfxRequest& rRequest)
-void SlideSorterViewShell::PrePaint()
-{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- if (mpSlideSorter.get() != NULL)
- mpSlideSorter->GetController().PrePaint();
-}
-
-
-
-
void SlideSorterViewShell::Paint (
const Rectangle& rBBox,
::sd::Window* pWindow)
{
SetActiveWindow (pWindow);
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- if (mpSlideSorter.get() != NULL)
+ OSL_ASSERT(mpSlideSorter);
+ if (mpSlideSorter)
mpSlideSorter->GetController().Paint(rBBox,pWindow);
}
@@ -528,10 +538,24 @@ void SlideSorterViewShell::Paint (
void SlideSorterViewShell::ArrangeGUIElements (void)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- mpSlideSorter->ArrangeGUIElements(
- maViewPos,
- maViewSize);
+ if (IsActive())
+ {
+ OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ mpSlideSorter->ArrangeGUIElements(maViewPos, maViewSize);
+ mbIsArrangeGUIElementsPending = false;
+ }
+ else
+ mbIsArrangeGUIElementsPending = true;
+}
+
+
+
+
+void SlideSorterViewShell::Activate (sal_Bool bIsMDIActivate)
+{
+ ViewShell::Activate(bIsMDIActivate);
+ if (mbIsArrangeGUIElementsPending)
+ ArrangeGUIElements();
}
@@ -565,35 +589,45 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
{
view::SlideSorterView& rView (mpSlideSorter->GetView());
- USHORT nSlidesPerRow (pFrameView->GetSlidesPerRow());
- if (nSlidesPerRow == 0 || ! IsMainViewShell())
+ sal_uInt16 nSlidesPerRow (pFrameView->GetSlidesPerRow());
+ if (nSlidesPerRow > 0
+ && rView.GetOrientation() == view::Layouter::GRID
+ && IsMainViewShell())
{
- // When a value of 0 (automatic) is given or the the slide
- // sorter is displayed in a side pane then we ignore the value
- // of the frame view and adapt the number of columns
- // automatically to the window width.
- rView.GetLayouter().SetColumnCount(1,5);
- }
- else
rView.GetLayouter().SetColumnCount(nSlidesPerRow,nSlidesPerRow);
+ }
+ if (IsMainViewShell())
+ mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ mpFrameView->GetSelectedPage());
mpSlideSorter->GetController().Rearrange(true);
// DrawMode for 'main' window
if (GetActiveWindow()->GetDrawMode() != pFrameView->GetDrawMode() )
GetActiveWindow()->SetDrawMode( pFrameView->GetDrawMode() );
}
+
+ // When this slide sorter is not displayed in the main window then we do
+ // not share the same frame view and have to find other ways to acquire
+ // certain values.
+ if ( ! IsMainViewShell())
+ {
+ ::boost::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
+ if (pMainViewShell.get() != NULL)
+ mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
+ pMainViewShell->getCurrentPage());
+ }
}
-void SlideSorterViewShell::WriteFrameViewData()
+void SlideSorterViewShell::WriteFrameViewData (void)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
if (mpFrameView != NULL)
{
view::SlideSorterView& rView (mpSlideSorter->GetView());
- mpFrameView->SetSlidesPerRow((USHORT)rView.GetLayouter().GetColumnCount());
+ mpFrameView->SetSlidesPerRow((sal_uInt16)rView.GetLayouter().GetColumnCount());
// DrawMode for 'main' window
if( mpFrameView->GetDrawMode() != GetActiveWindow()->GetDrawMode() )
@@ -602,16 +636,18 @@ void SlideSorterViewShell::WriteFrameViewData()
SdPage* pActualPage = GetActualPage();
if (pActualPage != NULL)
{
+ if (IsMainViewShell())
+ mpFrameView->SetSelectedPage((pActualPage->GetPageNum()- 1) / 2);
+ // else
// The slide sorter is not expected to switch the current page
// other then by double clicks. That is handled seperatly.
- // mpFrameView->SetSelectedPage((pActualPage->GetPageNum()- 1) / 2);
}
else
{
// We have no current page to set but at least we can make sure
// that the index of the frame view has a legal value.
if (mpFrameView->GetSelectedPage() >= mpSlideSorter->GetModel().GetPageCount())
- mpFrameView->SetSelectedPage((USHORT)mpSlideSorter->GetModel().GetPageCount()-1);
+ mpFrameView->SetSelectedPage((sal_uInt16)mpSlideSorter->GetModel().GetPageCount()-1);
}
}
}
@@ -626,13 +662,13 @@ void SlideSorterViewShell::SetZoom (long int )
// the window.
}
+
+
+
void SlideSorterViewShell::SetZoomRect (const Rectangle& rZoomRect)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
- Size aPageSize (mpSlideSorter->GetView().GetPageBoundingBox(
- 0,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_SHAPE).GetSize());
+ Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize());
Rectangle aRect(rZoomRect);
@@ -708,8 +744,8 @@ sal_Int8 SlideSorterViewShell::AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
return mpSlideSorter->GetController().GetClipboard().AcceptDrop (
@@ -727,8 +763,8 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
return mpSlideSorter->GetController().GetClipboard().ExecuteDrop (
diff --git a/sd/source/ui/slidesorter/shell/makefile.mk b/sd/source/ui/slidesorter/shell/makefile.mk
index 94209c34dc2b..94209c34dc2b 100644..100755
--- a/sd/source/ui/slidesorter/shell/makefile.mk
+++ b/sd/source/ui/slidesorter/shell/makefile.mk
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 50ac6db334c7..8bbe698205a6 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -35,11 +35,14 @@
#include "SlideSorterViewShell.hxx"
#include "ViewShell.hxx"
#include "SlsViewCacheContext.hxx"
+#include "SlsLayeredDevice.hxx"
#include "view/SlsLayouter.hxx"
-#include "view/SlsViewOverlay.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsPageObjectPainter.hxx"
+#include "view/SlsILayerPainter.hxx"
+#include "view/SlsButtonBar.hxx"
+#include "view/SlsToolTip.hxx"
#include "controller/SlideSorterController.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
#include "controller/SlsProperties.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
@@ -47,10 +50,9 @@
#include "cache/SlsPageCache.hxx"
#include "cache/SlsPageCacheManager.hxx"
#include "cache/SlsCacheContext.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "taskpane/SlideSorterCacheDisplay.hxx"
#include "DrawDocShell.hxx"
+#include "PaneDockingWindow.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
@@ -63,60 +65,135 @@
#include <svx/svdopage.hxx>
#include <svx/xlndsit.hxx>
#include <svx/xlnclit.hxx>
-#include <com/sun/star/presentation/FadeEffect.hpp>
#include <vcl/svapp.hxx>
+#include <vcl/scrbar.hxx>
#include <tools/poly.hxx>
#include <vcl/lineinfo.hxx>
#include <algorithm>
-#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svl/itempool.hxx>
-#include <svl/itempool.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+#include <canvas/elapsedtime.hxx>
+//#define DEBUG_TIMING
+#include <svl/itempool.hxx>
+#ifdef DEBUG_TIMING
+#include <vector>
+#endif
#include <boost/foreach.hpp>
+
using namespace std;
using namespace ::sd::slidesorter::model;
+using namespace ::drawinglayer::primitive2d;
+
namespace sd { namespace slidesorter { namespace view {
-TYPEINIT1(SlideSorterView, ::sd::View);
+namespace {
+ /** Wrapper around the SlideSorterView that supports the IPainter
+ interface and that allows the LayeredDevice to hold the
+ SlideSorterView (held as scoped_ptr by the SlideSorter) as
+ shared_ptr.
+ */
+ class Painter : public ILayerPainter
+ {
+ public:
+ Painter (SlideSorterView& rView) : mrView(rView) {}
+ virtual ~Painter (void) {}
+
+ virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea)
+ {
+ mrView.Paint(rDevice,rRepaintArea);
+ }
+
+ virtual void SetLayerInvalidator (const SharedILayerInvalidator&) {}
+
+ private:
+ SlideSorterView& mrView;
+ };
+}
+
+
+
+class BackgroundPainter
+ : public ILayerPainter,
+ public ::boost::noncopyable
+{
+public:
+ BackgroundPainter (const Color aBackgroundColor) : maBackgroundColor(aBackgroundColor) {}
+ virtual ~BackgroundPainter (void) {}
+
+ virtual void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea)
+ {
+ rDevice.SetFillColor(maBackgroundColor);
+ rDevice.SetLineColor();
+ rDevice.DrawRect(rRepaintArea);
+ }
+
+ virtual void SetLayerInvalidator (const SharedILayerInvalidator&) {}
+
+ void SetColor (const Color aColor) { maBackgroundColor = aColor; }
+
+private:
+ Color maBackgroundColor;
+};
+
+TYPEINIT1(SlideSorterView, ::sd::View);
+
SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
: ::sd::View (
- rSlideSorter.GetModel().GetDocument(),
- NULL,
- rSlideSorter.GetViewShell()),
- mrSlideSorter(rSlideSorter),
- mrModel(rSlideSorter.GetModel()),
- maPageModel(),
- mpPage(new SdrPage(maPageModel)),
- mpLayouter (new Layouter ()),
- mbPageObjectVisibilitiesValid (false),
- mpPreviewCache(),
- mpViewOverlay (new ViewOverlay(rSlideSorter)),
- mnFirstVisiblePageIndex(0),
- mnLastVisiblePageIndex(-1),
- mbModelChangedWhileModifyEnabled(true),
- maPreviewSize(0,0),
- mbPreciousFlagUpdatePending(true),
- maPageNumberAreaModelSize(0,0),
- maModelBorder(),
- meOrientation(VERTICAL)
+ rSlideSorter.GetModel().GetDocument(),
+ rSlideSorter.GetContentWindow().get(),
+ rSlideSorter.GetViewShell()),
+ mrSlideSorter(rSlideSorter),
+ mrModel(rSlideSorter.GetModel()),
+ mbIsDisposed(false),
+ mpLayouter (new Layouter(rSlideSorter.GetContentWindow(), rSlideSorter.GetTheme())),
+ mbPageObjectVisibilitiesValid (false),
+ mpPreviewCache(),
+ mpLayeredDevice(new LayeredDevice(rSlideSorter.GetContentWindow())),
+ maVisiblePageRange(-1,-1),
+ mbModelChangedWhileModifyEnabled(true),
+ maPreviewSize(0,0),
+ mbPreciousFlagUpdatePending(true),
+ meOrientation(Layouter::GRID),
+ mpProperties(rSlideSorter.GetProperties()),
+ mpPageUnderMouse(),
+ mnButtonUnderMouse(-1),
+ mpPageObjectPainter(),
+ mpSelectionPainter(),
+ mpBackgroundPainter(
+ new BackgroundPainter(mrSlideSorter.GetTheme()->GetColor(Theme::Color_Background))),
+ mpButtonBar(new ButtonBar(mrSlideSorter)),
+ mpToolTip(new ToolTip(mrSlideSorter)),
+ mbIsRearrangePending(true),
+ maVisibilityChangeListeners()
{
// Hide the page that contains the page objects.
- SetPageVisible (FALSE);
+ SetPageVisible (sal_False);
+
- // call FreezeIdRanges() at the pool from the newly constructed SdrModel,
- // else creating SfxItemSets on it will complain
- maPageModel.GetItemPool().FreezeIdRanges();
+ // Register the background painter on level 1 to avoid the creation of a
+ // background buffer.
+ mpLayeredDevice->RegisterPainter(mpBackgroundPainter, 1);
- // add the page to the model (no, this is NOT done by the constructor :-( )
- maPageModel.InsertPage(mpPage);
+ // Wrap a shared_ptr-held-wrapper around this view and register it as
+ // painter at the layered device. There is no explicit destruction: in
+ // the SlideSorterView destructor the layered device is destroyed and
+ // with it the only reference to the wrapper which therefore is also
+ // destroyed.
+ SharedILayerPainter pPainter (new Painter(*this));
- // show page
- LocalModelHasChanged();
+ // The painter is placed on level 1 to avoid buffering. This should be
+ // a little faster during animations because the previews are painted
+ // directly into the window, not via the buffer.
+ mpLayeredDevice->RegisterPainter(pPainter, 1);
}
@@ -124,41 +201,57 @@ SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
SlideSorterView::~SlideSorterView (void)
{
- // Inform the contact objects to disconnect from the preview cache.
- // Otherwise each dying contact object invalidates its preview. When
- // the previews are kept for a later re-use than this invalidation is
- // not wanted.
- ::boost::shared_ptr<cache::PageCache> pEmptyCache;
- model::PageEnumeration aPageEnumeration (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- while (aPageEnumeration.HasMoreElements())
+ if ( ! mbIsDisposed)
{
- view::PageObjectViewObjectContact* pContact
- = aPageEnumeration.GetNextElement()->GetViewObjectContact();
- if (pContact != NULL)
- pContact->SetCache(pEmptyCache);
+ OSL_ASSERT(mbIsDisposed);
+ Dispose();
}
+}
+
+
+
+
+void SlideSorterView::Init (void)
+{
+ HandleModelChange();
+}
+
+
+
+
+void SlideSorterView::Dispose (void)
+{
+ mpSelectionPainter.reset();
+
+ mpLayeredDevice->Dispose();
mpPreviewCache.reset();
- // hide the page to avoid problems in the view when deleting
+ SetPageUnderMouse(SharedPageDescriptor(),false);
+
+ // Hide the page to avoid problems in the view when deleting
// visualized objects
HideSdrPage();
// Deletion of the objects and the page will be done in SdrModel
// destructor (as long as objects and pages are added)
+
+ OSL_ASSERT(mpLayeredDevice.unique());
+ mpLayeredDevice.reset();
+
+ mbIsDisposed = true;
}
-sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rPosition) const
+sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rWindowPosition) const
{
sal_Int32 nIndex (-1);
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
- nIndex = mpLayouter->GetIndexAtPoint (pWindow->PixelToLogic (rPosition));
+ nIndex = mpLayouter->GetIndexAtPoint(pWindow->PixelToLogic(rWindowPosition), false, false);
// Clip the page index against the page count.
if (nIndex >= mrModel.GetPageCount())
@@ -181,12 +274,8 @@ Layouter& SlideSorterView::GetLayouter (void)
void SlideSorterView::ModelHasChanged (void)
{
- if (mbModelChangedWhileModifyEnabled)
- {
- controller::SlideSorterController::ModelChangeLock alock( mrSlideSorter.GetController() );
- mrSlideSorter.GetController().HandleModelChange();
- LocalModelHasChanged();
- }
+ // Ignore this call. Rely on hints sent by the model to get informed of
+ // model changes.
}
@@ -198,16 +287,6 @@ void SlideSorterView::LocalModelHasChanged(void)
// First call our base class.
View::ModelHasChanged ();
-
- // Then re-set the page as current page that contains the page objects.
- ShowSdrPage(mpPage);
-
- // Initialize everything that depends on a page view, now that we have
- // one.
- // SetApplicationDocumentColor(
- // Application::GetSettings().GetStyleSettings().GetWindowColor());
-
- UpdatePageBorders();
}
@@ -215,19 +294,8 @@ void SlideSorterView::LocalModelHasChanged(void)
void SlideSorterView::PreModelChange (void)
{
- // Reset the slide under the mouse. It will be set to the correct slide
- // on the next mouse motion.
- GetOverlay().GetMouseOverIndicatorOverlay().SetSlideUnderMouse(SharedPageDescriptor());
-
- // Tell the page descriptors of the model that the page objects do not
- // exist anymore.
- model::PageEnumeration aPageEnumeration (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- while (aPageEnumeration.HasMoreElements())
- aPageEnumeration.GetNextElement()->ReleasePageObject();
-
- // Remove all page objects from the page.
- mpPage->Clear();
+ // Reset the slide under the mouse. It will be re-set in PostModelChange().
+ SetPageUnderMouse(SharedPageDescriptor());
}
@@ -241,16 +309,10 @@ void SlideSorterView::PostModelChange (void)
model::PageEnumeration aPageEnumeration (
model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- UpdatePageBorders();
- while (aPageEnumeration.HasMoreElements())
- {
- SdrPageObj* pPageObject = aPageEnumeration.GetNextElement()->GetPageObject();
- if (pPageObject != NULL)
- AddSdrObject(*pPageObject);
- }
// The new page objects have to be scaled and positioned.
- Layout ();
+ RequestRearrange();
+ RequestRepaint();
}
@@ -272,18 +334,30 @@ void SlideSorterView::HandleModelChange (void)
void SlideSorterView::HandleDrawModeChange (void)
{
- UpdatePageBorders();
-
// Replace the preview cache with a new and empty one. The
// PreviewRenderer that is used by the cache is replaced by this as
// well.
mpPreviewCache.reset();
GetPreviewCache()->InvalidateCache(true);
- mrModel.SetPageObjectFactory(
- ::std::auto_ptr<controller::PageObjectFactory>(
- new controller::PageObjectFactory(
- GetPreviewCache(),
- mrSlideSorter.GetController().GetProperties())));
+
+ RequestRepaint();
+}
+
+
+
+
+void SlideSorterView::HandleDataChangeEvent (void)
+{
+ GetPageObjectPainter()->SetTheme(mrSlideSorter.GetTheme());
+
+ // Update the color used by the background painter.
+ ::boost::shared_ptr<BackgroundPainter> pPainter (
+ ::boost::dynamic_pointer_cast<BackgroundPainter>(mpBackgroundPainter));
+ if (pPainter)
+ pPainter->SetColor(mrSlideSorter.GetTheme()->GetColor(Theme::Color_Background));
+
+ if (mpButtonBar)
+ mpButtonBar->HandleDataChangeEvent();
RequestRepaint();
}
@@ -293,31 +367,120 @@ void SlideSorterView::HandleDrawModeChange (void)
void SlideSorterView::Resize (void)
{
- ::sd::Window* pWindow = GetWindow();
- if (mrModel.GetPageCount()>0 && pWindow != NULL)
+ UpdateOrientation();
+
+ mpLayeredDevice->Resize();
+ RequestRearrange();
+}
+
+
+
+
+void SlideSorterView::RequestRearrange (void)
+{
+ mbIsRearrangePending = true;
+ Rearrange();
+}
+
+
+
+
+void SlideSorterView::Rearrange (void)
+{
+ if ( ! mbIsRearrangePending)
+ return;
+ if (mrModel.GetPageCount() <= 0)
+ return;
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if ( ! pWindow)
+ return;
+ const Size aWindowSize (pWindow->GetSizePixel());
+ if (aWindowSize.Width()<=0 || aWindowSize.Height()<=0)
+ return;
+
+ const bool bRearrangeSuccess (
+ mpLayouter->Rearrange (
+ meOrientation,
+ aWindowSize,
+ mrModel.GetPageDescriptor(0)->GetPage()->GetSize(),
+ mrModel.GetPageCount()));
+ if (bRearrangeSuccess)
+ {
+ mbIsRearrangePending = false;
+ Layout();
+ UpdatePageUnderMouse(false);
+ // RequestRepaint();
+ }
+}
+
+
+
+
+void SlideSorterView::UpdateOrientation (void)
+{
+ // The layout of slides depends on whether the slide sorter is
+ // displayed in the center or the side pane.
+ if (mrSlideSorter.GetViewShell()->IsMainViewShell())
+ SetOrientation(Layouter::GRID);
+ else
{
- UpdatePageBorders();
- bool bRearrangeSuccess (false);
- if (meOrientation == HORIZONTAL)
+ // Get access to the docking window.
+ ::Window* pWindow = mrSlideSorter.GetContentWindow().get();
+ PaneDockingWindow* pDockingWindow = NULL;
+ while (pWindow!=NULL && pDockingWindow==NULL)
{
- bRearrangeSuccess = mpLayouter->RearrangeHorizontal (
- pWindow->GetSizePixel(),
- mrModel.GetPageDescriptor(0)->GetPage()->GetSize(),
- pWindow,
- mrModel.GetPageCount());
+ pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow);
+ pWindow = pWindow->GetParent();
}
- else
+
+ if (pDockingWindow != NULL)
{
- bRearrangeSuccess = mpLayouter->RearrangeVertical (
- pWindow->GetSizePixel(),
- mrModel.GetPageDescriptor(0)->GetPage()->GetSize(),
- pWindow);
+ const long nScrollBarSize (
+ Application::GetSettings().GetStyleSettings().GetScrollBarSize());
+ switch (pDockingWindow->GetOrientation())
+ {
+ case PaneDockingWindow::HorizontalOrientation:
+ if (SetOrientation(Layouter::HORIZONTAL))
+ {
+ const Range aRange (mpLayouter->GetValidVerticalSizeRange());
+ pDockingWindow->SetValidSizeRange(Range(
+ aRange.Min() + nScrollBarSize,
+ aRange.Max() + nScrollBarSize));
+ }
+ break;
+
+ case PaneDockingWindow::VerticalOrientation:
+ if (SetOrientation(Layouter::VERTICAL))
+ {
+ const Range aRange (mpLayouter->GetValidHorizontalSizeRange());
+ pDockingWindow->SetValidSizeRange(Range(
+ aRange.Min() + nScrollBarSize,
+ aRange.Max() + nScrollBarSize));
+ }
+ break;
+
+ case PaneDockingWindow::UnknownOrientation:
+ if (SetOrientation(Layouter::GRID))
+ {
+ const sal_Int32 nAdditionalSize (10);
+ pDockingWindow->SetMinOutputSizePixel(Size(
+ mpLayouter->GetValidHorizontalSizeRange().Min()
+ + nScrollBarSize
+ + nAdditionalSize,
+ mpLayouter->GetValidVerticalSizeRange().Min()
+ + nScrollBarSize
+ + nAdditionalSize));
+ }
+ return;
+ }
}
-
- if (bRearrangeSuccess)
+ else
{
- Layout();
- pWindow->Invalidate();
+ // We are not placed in a docking window. One possible reason
+ // is that the slide sorter is temporarily into a cache and was
+ // reparented to a non-docking window.
+ SetOrientation(Layouter::GRID);
}
}
}
@@ -327,38 +490,40 @@ void SlideSorterView::Resize (void)
void SlideSorterView::Layout ()
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
// Set the model area, i.e. the smallest rectangle that includes all
// page objects.
- Rectangle aViewBox (mpLayouter->GetPageBox(mrModel.GetPageCount()));
+ const Rectangle aViewBox (mpLayouter->GetTotalBoundingBox());
pWindow->SetViewOrigin (aViewBox.TopLeft());
pWindow->SetViewSize (aViewBox.GetSize());
- Size aPageObjectPixelSize (pWindow->LogicToPixel(mpLayouter->GetPageObjectSize()));
- if (maPreviewSize != aPageObjectPixelSize && mpPreviewCache.get()!=NULL)
+ ::boost::shared_ptr<PageObjectLayouter> pPageObjectLayouter(
+ mpLayouter->GetPageObjectLayouter());
+ if (pPageObjectLayouter)
{
- mpPreviewCache->ChangeSize(aPageObjectPixelSize);
- maPreviewSize = aPageObjectPixelSize;
+ const Size aNewPreviewSize (mpLayouter->GetPageObjectLayouter()->GetSize(
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::WindowCoordinateSystem));
+ if (maPreviewSize != aNewPreviewSize && GetPreviewCache())
+ {
+ mpPreviewCache->ChangeSize(aNewPreviewSize, true);
+ maPreviewSize = aNewPreviewSize;
+ }
}
// Iterate over all page objects and place them relative to the
// containing page.
model::PageEnumeration aPageEnumeration (
model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- int nIndex = 0;
while (aPageEnumeration.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
- SdrPageObj* pPageObject = pDescriptor->GetPageObject();
- Rectangle aPageObjectBox (mpLayouter->GetPageObjectBox (nIndex));
- pPageObject->SetSnapRect(aPageObjectBox);
-
- nIndex += 1;
+ pDescriptor->SetBoundingBox(mpLayouter->GetPageObjectBox(pDescriptor->GetPageIndex()));
}
- // Set the page so that it encloses all page objects.
- mpPage->SetSize (aViewBox.GetSize());
+
+ GetPageObjectPainter()->NotifyResize();
}
InvalidatePageObjectVisibilities ();
@@ -377,71 +542,56 @@ void SlideSorterView::InvalidatePageObjectVisibilities (void)
void SlideSorterView::DeterminePageObjectVisibilities (void)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
// Set this flag to true here so that an invalidate during the
// visibility calculation can correctly invalidate it again.
mbPageObjectVisibilitiesValid = true;
- Rectangle aViewArea (
- Point(0,0),
- pWindow->GetSizePixel());
- aViewArea = pWindow->PixelToLogic (aViewArea);
- int nFirstIndex =
- mpLayouter->GetIndexOfFirstVisiblePageObject (aViewArea);
- int nLastIndex =
- mpLayouter->GetIndexOfLastVisiblePageObject (aViewArea);
+ Rectangle aViewArea (pWindow->PixelToLogic(Rectangle(Point(0,0),pWindow->GetSizePixel())));
+ const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(aViewArea));
+ const Range aUnion(
+ ::std::min(maVisiblePageRange.Min(), aRange.Min()),
+ ::std::max(maVisiblePageRange.Max(), aRange.Max()));
// For page objects that just dropped off the visible area we
// decrease the priority of pending requests for preview bitmaps.
-
- int nMinIndex = ::std::min (mnFirstVisiblePageIndex, nFirstIndex);
- int nMaxIndex = ::std::max (mnLastVisiblePageIndex, nLastIndex);
- if (mnFirstVisiblePageIndex!=nFirstIndex || mnLastVisiblePageIndex!=nLastIndex)
+ if (maVisiblePageRange != aRange)
mbPreciousFlagUpdatePending |= true;
+
model::SharedPageDescriptor pDescriptor;
- view::PageObjectViewObjectContact* pContact;
- for (int nIndex=nMinIndex; nIndex<=nMaxIndex; nIndex++)
+ for (int nIndex=aUnion.Min(); nIndex<=aUnion.Max(); nIndex++)
{
- // Determine the visibility before and after the change so that
- // we can handle the page objects for which the visibility has
- // changed.
- bool bWasVisible = nIndex>=mnFirstVisiblePageIndex
- && nIndex<=mnLastVisiblePageIndex;
- bool bIsVisible = nIndex>=nFirstIndex && nIndex<=nLastIndex;
-
- // Get the view-object-contact.
- if (bWasVisible != bIsVisible)
- {
- pContact = NULL;
- pDescriptor = mrModel.GetPageDescriptor(nIndex);
- if (pDescriptor.get() != NULL)
- pContact = pDescriptor->GetViewObjectContact();
-
- if (pDescriptor.get() != NULL)
- pDescriptor->SetVisible(bIsVisible);
- }
-
+ pDescriptor = mrModel.GetPageDescriptor(nIndex);
+ if (pDescriptor.get() != NULL)
+ SetState(
+ pDescriptor,
+ PageDescriptor::ST_Visible,
+ aRange.IsInside(nIndex));
}
- if (mnFirstVisiblePageIndex != nFirstIndex
- || mnLastVisiblePageIndex != nLastIndex)
+ // Broadcast a change of the set of visible page objects.
+ if (maVisiblePageRange != aRange)
{
- mnFirstVisiblePageIndex = nFirstIndex;
- mnLastVisiblePageIndex = nLastIndex;
+ maVisiblePageRange = aRange;
- // Tell the listeners that the visibility of some objects has changed.
- ::std::vector<Link> aChangeListeners (maVisibilityChangeListeners);
+ // Tell the listeners that the visibility of some objects has
+ // changed.
+ ::std::vector<Link>& aChangeListeners (maVisibilityChangeListeners);
for (::std::vector<Link>::const_iterator
- iListener=aChangeListeners.begin(),
- iEnd=aChangeListeners.end();
- iListener!=iEnd;
- ++iListener)
+ iLink(aChangeListeners.begin()),
+ iEnd(aChangeListeners.end());
+ iLink!=iEnd;
+ ++iLink)
{
- iListener->Call(NULL);
+ iLink->Call(NULL);
}
}
+
+
+ // Restore the mouse over state.
+ UpdatePageUnderMouse(true);
}
}
@@ -465,9 +615,9 @@ void SlideSorterView::UpdatePreciousFlags (void)
{
pCache->SetPreciousFlag(
pDescriptor->GetPage(),
- (nIndex>=mnFirstVisiblePageIndex && nIndex<=mnLastVisiblePageIndex));
+ maVisiblePageRange.IsInside(nIndex));
SSCD_SET_VISIBILITY(mrModel.GetDocument(), nIndex,
- (nIndex>=mnFirstVisiblePageIndex && nIndex<=mnLastVisiblePageIndex));
+ maVisiblePageRange.IsInside(nIndex));
}
else
{
@@ -483,16 +633,21 @@ void SlideSorterView::UpdatePreciousFlags (void)
-void SlideSorterView::SetOrientation (const Orientation eOrientation)
+bool SlideSorterView::SetOrientation (const Layouter::Orientation eOrientation)
{
- meOrientation = eOrientation;
- RequestRepaint();
+ if (meOrientation != eOrientation)
+ {
+ meOrientation = eOrientation;
+ return true;
+ }
+ else
+ return false;
}
-SlideSorterView::Orientation SlideSorterView::GetOrientation (void) const
+Layouter::Orientation SlideSorterView::GetOrientation (void) const
{
return meOrientation;
}
@@ -502,9 +657,15 @@ SlideSorterView::Orientation SlideSorterView::GetOrientation (void) const
void SlideSorterView::RequestRepaint (void)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ mpLayeredDevice->InvalidateAllLayers(
+ Rectangle(
+ pWindow->PixelToLogic(Point(0,0)),
+ pWindow->PixelToLogic(pWindow->GetSizePixel())));
pWindow->Invalidate();
+ }
}
@@ -512,197 +673,230 @@ void SlideSorterView::RequestRepaint (void)
void SlideSorterView::RequestRepaint (const model::SharedPageDescriptor& rpDescriptor)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
- pWindow->Invalidate(
- GetPageBoundingBox (
- rpDescriptor,
- CS_MODEL,
- BBT_INFO));
+ if (rpDescriptor)
+ RequestRepaint(rpDescriptor->GetBoundingBox());
}
-Rectangle SlideSorterView::GetModelArea (void)
+void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox)
{
- return Rectangle (
- Point (0,0),
- Size (mpPage->GetSize().Width(),mpPage->GetSize().Height()));
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ mpLayeredDevice->InvalidateAllLayers(rRepaintBox);
+ pWindow->Invalidate(rRepaintBox);
+ }
}
-
-Rectangle SlideSorterView::GetPageBoundingBox (
- const model::SharedPageDescriptor& rpDescriptor,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const
+void SlideSorterView::RequestRepaint (const Region& rRepaintRegion)
{
- Rectangle aBBox;
- SdrObject* pPageObject = rpDescriptor->GetPageObject();
- if (pPageObject != NULL)
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
{
- aBBox = pPageObject->GetCurrentBoundRect();
- AdaptBoundingBox (aBBox, eCoordinateSystem, eBoundingBoxType);
+ mpLayeredDevice->InvalidateAllLayers(rRepaintRegion);
+ pWindow->Invalidate(rRepaintRegion);
}
-
- return aBBox;
}
-Rectangle SlideSorterView::GetPageBoundingBox (
- sal_Int32 nIndex,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const
+Rectangle SlideSorterView::GetModelArea (void)
{
- Rectangle aBBox;
- if (nIndex >= 0 && nIndex<mrModel.GetPageCount())
+ return mpLayouter->GetTotalBoundingBox();
+}
+
+
+#ifdef DEBUG_TIMING
+static ::canvas::tools::ElapsedTime gaTimer;
+static const size_t gFrameTimeCount (10);
+static size_t gFrameTimeIndex (0);
+static ::std::vector<double> gFrameTimes (gFrameTimeCount, 0);
+static double gFrameTimeSum (0);
+static const Rectangle gFrameTimeBox (10,10,150,20);
+static double gnLastFrameStart = 0;
+#endif
+
+void SlideSorterView::CompleteRedraw (
+ OutputDevice* pDevice,
+ const Region& rPaintArea,
+ sdr::contact::ViewObjectContactRedirector* pRedirector)
+{
+ (void)pRedirector;
+#ifdef DEBUG_TIMING
+ const double nStartTime (gaTimer.getElapsedTime());
+ OSL_TRACE("SlideSorterView::CompleteRedraw start at %f, %s",
+ nStartTime,
+ mnLockRedrawSmph ? "locked" : "");
+#endif
+
+ if (pDevice == NULL || pDevice!=mrSlideSorter.GetContentWindow().get())
+ return;
+
+ // The parent implementation of CompleteRedraw is called only when
+ // painting is locked. We do all the painting ourself. When painting
+ // is locked the parent implementation keeps track of the repaint
+ // requests and later, when painting is unlocked, calls CompleteRedraw
+ // for all missed repaints.
+
+ if (mnLockRedrawSmph == 0)
+ {
+ mrSlideSorter.GetContentWindow()->IncrementLockCount();
+ if (mpLayeredDevice->HandleMapModeChange())
+ DeterminePageObjectVisibilities();
+ mpLayeredDevice->Repaint(rPaintArea);
+ mrSlideSorter.GetContentWindow()->DecrementLockCount();
+ }
+ else
{
- aBBox = mpLayouter->GetPageObjectBox(nIndex);
- AdaptBoundingBox (aBBox, eCoordinateSystem, eBoundingBoxType);
+ maRedrawRegion.Union(rPaintArea);
}
- return aBBox;
+#ifdef DEBUG_TIMING
+ const double nEndTime (gaTimer.getElapsedTime());
+ OSL_TRACE("SlideSorterView::CompleteRedraw end at %f after %fms", nEndTime, (nEndTime-nStartTime)*1000);
+ gFrameTimeSum -= gFrameTimes[gFrameTimeIndex];
+ gFrameTimes[gFrameTimeIndex] = nStartTime - gnLastFrameStart;
+ gnLastFrameStart = nStartTime;
+ gFrameTimeSum += gFrameTimes[gFrameTimeIndex];
+ gFrameTimeIndex = (gFrameTimeIndex+1) % gFrameTimeCount;
+
+
+ mrSlideSorter.GetContentWindow()->SetFillColor(COL_BLUE);
+ mrSlideSorter.GetContentWindow()->DrawRect(gFrameTimeBox);
+ mrSlideSorter.GetContentWindow()->SetTextColor(COL_WHITE);
+ mrSlideSorter.GetContentWindow()->DrawText(
+ gFrameTimeBox,
+ ::rtl::OUString::valueOf(1 / (gFrameTimeSum / gFrameTimeCount)),
+ TEXT_DRAW_RIGHT | TEXT_DRAW_VCENTER);
+ // mrSlideSorter.GetContentWindow()->Invalidate(gFrameTimeBox);
+#endif
}
-void SlideSorterView::CompleteRedraw(OutputDevice* pDevice, const Region& rPaintArea, sdr::contact::ViewObjectContactRedirector* pRedirector)
+void SlideSorterView::Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea)
{
- if (mnLockRedrawSmph == 0)
- {
- // Update the page visibilities when they have been invalidated.
- if ( ! mbPageObjectVisibilitiesValid)
- DeterminePageObjectVisibilities();
+ if ( ! mpPageObjectPainter)
+ if ( ! GetPageObjectPainter())
+ return;
- if (mbPreciousFlagUpdatePending)
- UpdatePreciousFlags();
+ // Update the page visibilities when they have been invalidated.
+ if ( ! mbPageObjectVisibilitiesValid)
+ DeterminePageObjectVisibilities();
- // Call the base class InitRedraw even when re-drawing is locked to
- // let it remember the request for a redraw.
- View::CompleteRedraw (pDevice, rPaintArea, pRedirector);
- }
- else
+ if (mbPreciousFlagUpdatePending)
+ UpdatePreciousFlags();
+
+ if (mbIsRearrangePending)
+ Rearrange();
+
+ // Paint all page objects that are fully or partially inside the
+ // repaint region.
+ const Range aRange (mpLayouter->GetRangeOfVisiblePageObjects(rRepaintArea));
+ for (sal_Int32 nIndex=aRange.Min(); nIndex<=aRange.Max(); ++nIndex)
{
- // In sd::View::CompleteRedraw() this call is recorded and given
- // region is painted when the view is unlocked.
- View::CompleteRedraw (pDevice, rPaintArea, pRedirector);
+ model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
+ if (!pDescriptor || ! pDescriptor->HasState(PageDescriptor::ST_Visible))
+ continue;
+
+ mpPageObjectPainter->PaintPageObject(rDevice, pDescriptor);
}
}
-void SlideSorterView::InvalidateOneWin (::Window& rWindow)
+void SlideSorterView::ConfigurationChanged (
+ utl::ConfigurationBroadcaster* pBroadcaster,
+ sal_uInt32 nHint)
{
- // if ( IsInvalidateAllowed() )
- View::InvalidateOneWin (rWindow);
+ // Some changes of the configuration (some of the colors for example)
+ // may affect the previews. Throw away the old ones and create new ones.
+ cache::PageCacheManager::Instance()->InvalidateAllCaches();
+
+ ::sd::View::ConfigurationChanged(pBroadcaster, nHint);
+ RequestRepaint();
+
}
-void SlideSorterView::InvalidateOneWin (
- ::Window& rWindow,
- const Rectangle& rPaintArea)
+::boost::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache (void)
{
- // if( IsInvalidateAllowed() )
- View::InvalidateOneWin (rWindow, rPaintArea);
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow && mpPreviewCache.get() == NULL)
+ {
+ mpPreviewCache.reset(
+ new cache::PageCache(
+ mpLayouter->GetPageObjectSize(),
+ false,
+ cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter))));
+ }
+
+ return mpPreviewCache;
}
-::sd::Window* SlideSorterView::GetWindow (void) const
+Pair SlideSorterView::GetVisiblePageRange (void)
{
- return static_cast< ::sd::Window*>(GetFirstOutputDevice());
+ if ( ! mbPageObjectVisibilitiesValid)
+ DeterminePageObjectVisibilities();
+ return maVisiblePageRange;
}
-void SlideSorterView::AdaptBoundingBox (
- Rectangle& rModelPageObjectBoundingBox,
- CoordinateSystem eCoordinateSystem,
- BoundingBoxType eBoundingBoxType) const
+void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
{
- CoordinateSystem aCurrentCoordinateSystem = CS_MODEL;
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ if (::std::find (
+ maVisibilityChangeListeners.begin(),
+ maVisibilityChangeListeners.end(),
+ rListener) == maVisibilityChangeListeners.end())
{
- if (eBoundingBoxType == BBT_INFO)
- {
- // Make the box larger so that it encloses all relevant
- // displayed information.
- if (aCurrentCoordinateSystem == CS_MODEL)
- {
- // The relevant offsets are given in pixel values. Therefore
- // transform the box first into screen coordinates.
- rModelPageObjectBoundingBox
- = pWindow->LogicToPixel (rModelPageObjectBoundingBox);
- aCurrentCoordinateSystem = CS_SCREEN;
- }
- rModelPageObjectBoundingBox.Left() -= maPagePixelBorder.Left();
- rModelPageObjectBoundingBox.Right() += maPagePixelBorder.Right();
- rModelPageObjectBoundingBox.Top() -= maPagePixelBorder.Top();
- rModelPageObjectBoundingBox.Bottom() += maPagePixelBorder.Bottom();
- }
-
- // Make sure that the bounding box is given in the correct coordinate
- // system.
- if (eCoordinateSystem != aCurrentCoordinateSystem)
- {
- if (eCoordinateSystem == CS_MODEL)
- rModelPageObjectBoundingBox
- = pWindow->PixelToLogic (rModelPageObjectBoundingBox);
- else
- rModelPageObjectBoundingBox
- = pWindow->LogicToPixel (rModelPageObjectBoundingBox);
- }
+ maVisibilityChangeListeners.push_back(rListener);
}
}
-::boost::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache (void)
+void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
{
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL && mpPreviewCache.get() == NULL)
- {
- maPreviewSize = pWindow->LogicToPixel(mpLayouter->GetPageObjectSize());
- mpPreviewCache.reset(
- new cache::PageCache(
- maPreviewSize,
- cache::SharedCacheContext(new ViewCacheContext(mrSlideSorter.GetModel(), *this))));
- }
-
- return mpPreviewCache;
+ maVisibilityChangeListeners.erase (
+ ::std::find (
+ maVisibilityChangeListeners.begin(),
+ maVisibilityChangeListeners.end(),
+ rListener));
}
-ViewOverlay& SlideSorterView::GetOverlay (void)
+ButtonBar& SlideSorterView::GetButtonBar (void) const
{
- return *mpViewOverlay.get();
+ OSL_ASSERT(mpButtonBar);
+ return *mpButtonBar;
}
-SlideSorterView::PageRange SlideSorterView::GetVisiblePageRange (void)
+ToolTip& SlideSorterView::GetToolTip (void) const
{
- const int nMaxPageIndex (mrModel.GetPageCount() - 1);
- if ( ! mbPageObjectVisibilitiesValid)
- DeterminePageObjectVisibilities();
- return PageRange(
- ::std::min(mnFirstVisiblePageIndex,nMaxPageIndex),
- ::std::min(mnLastVisiblePageIndex, nMaxPageIndex));
+ OSL_ASSERT(mpToolTip);
+ return *mpToolTip;
}
@@ -720,104 +914,221 @@ void SlideSorterView::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint
-void SlideSorterView::UpdatePageBorders (void)
+void SlideSorterView::UpdatePageUnderMouse (bool bAnimate)
{
- maPagePixelBorder = SvBorder();
- ::sd::Window* pWindow = GetWindow();
- if (mrModel.GetPageCount()>0 && pWindow!=NULL)
+ ::boost::shared_ptr<ScrollBar> pVScrollBar (mrSlideSorter.GetVerticalScrollBar());
+ ::boost::shared_ptr<ScrollBar> pHScrollBar (mrSlideSorter.GetHorizontalScrollBar());
+ if ((pVScrollBar && pVScrollBar->IsVisible() && pVScrollBar->IsTracking())
+ || (pHScrollBar && pHScrollBar->IsVisible() && pHScrollBar->IsTracking()))
{
- // Calculate the border in model coordinates.
- maPageNumberAreaModelSize = PageObjectViewObjectContact::CalculatePageNumberAreaModelSize (
- pWindow,
- mrModel.GetPageCount());
- maModelBorder = PageObjectViewObjectContact::CalculatePageModelBorder (
- pWindow,
- mrModel.GetPageCount());
-
- // Depending on values in the global properties the border has to be
- // extended a little bit.
- ::boost::shared_ptr<controller::Properties> pProperties(
- mrSlideSorter.GetController().GetProperties());
- if (pProperties.get()!=NULL && pProperties->IsHighlightCurrentSlide())
+ // One of the scroll bars is tracking mouse movement. Do not
+ // highlight the slide under the mouse in this case.
+ SetPageUnderMouse(SharedPageDescriptor(),false);
+ return;
+ }
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow && pWindow->IsVisible() && ! pWindow->IsMouseCaptured())
+ {
+ const Window::PointerState aPointerState (pWindow->GetPointerState());
+ const Rectangle aWindowBox (pWindow->GetPosPixel(), pWindow->GetSizePixel());
+ if (aWindowBox.IsInside(aPointerState.maPos))
{
- Size aBorderSize (pWindow->PixelToLogic (Size(3,3)));
- maModelBorder.Left() += aBorderSize.Width();
- maModelBorder.Right() += aBorderSize.Width();
- maModelBorder.Top() += aBorderSize.Height();
- maModelBorder.Bottom() += aBorderSize.Height();
+ UpdatePageUnderMouse (
+ aPointerState.maPos,
+ (aPointerState.mnState & MOUSE_LEFT)!=0,
+ bAnimate);
+ return;
}
+ }
- // Set the border at all page descriptors so that the contact
- // objects have access to them.
- model::PageEnumeration aPageEnumeration (
- model::PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
- while (aPageEnumeration.HasMoreElements())
+ SetPageUnderMouse(SharedPageDescriptor(),false);
+}
+
+
+
+
+void SlideSorterView::UpdatePageUnderMouse (
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate)
+{
+ UpdatePageUnderMouse(
+ mrSlideSorter.GetController().GetPageAt(rMousePosition),
+ rMousePosition,
+ bIsMouseButtonDown,
+ bAnimate);
+}
+
+
+
+
+void SlideSorterView::UpdatePageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point& rMousePosition,
+ const bool bIsMouseButtonDown,
+ const bool bAnimate)
+{
+ // Update the page under the mouse.
+ SetPageUnderMouse(rpDescriptor, bAnimate);
+
+ // Tell the button bar about the new mouse position.
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ const Point aMouseModelPosition (pWindow->PixelToLogic(rMousePosition));
+
+ ::boost::shared_ptr<ViewShell> pMainViewShell (mrSlideSorter.GetViewShellBase()->GetMainViewShell());
+ if (pMainViewShell
+ && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW)
+ {
+ const bool bIsMouseOverButtonBar (GetButtonBar().IsMouseOverBar());
+ GetButtonBar().ProcessMouseMotionEvent(rpDescriptor, aMouseModelPosition, bIsMouseButtonDown);
+ // Set the help text of the slide when the mouse was moved from the
+ // button bar back over the preview.
+ if (rpDescriptor
+ && GetButtonBar().IsMouseOverBar() != bIsMouseOverButtonBar
+ && bIsMouseOverButtonBar)
{
- model::SharedPageDescriptor pDescriptor (aPageEnumeration.GetNextElement());
- pDescriptor->SetModelBorder(maModelBorder);
- pDescriptor->SetPageNumberAreaModelSize(maPageNumberAreaModelSize);
+ mpToolTip->ShowDefaultHelpText();
}
-
- // Convert the borders to pixel coordinates and store them for later
- // use.
- Size aTopLeftBorders(pWindow->LogicToPixel(
- Size (maModelBorder.Left(), maModelBorder.Top())));
- Size aBottomRightBorders(pWindow->LogicToPixel(
- Size (maModelBorder.Right(), maModelBorder.Bottom())));
- maPagePixelBorder = SvBorder (
- aTopLeftBorders.Width(),
- aTopLeftBorders.Height(),
- aBottomRightBorders.Width(),
- aBottomRightBorders.Height());
}
-
- // Finally tell the layouter about the borders.
- mpLayouter->SetBorders (2,5,4,5);
- mpLayouter->SetPageBorders (
- maPagePixelBorder.Left(),
- maPagePixelBorder.Right(),
- maPagePixelBorder.Top(),
- maPagePixelBorder.Bottom());
}
-void SlideSorterView::AddSdrObject (SdrObject& rObject)
+void SlideSorterView::SetPageUnderMouse (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate)
{
- mpPage->InsertObject(&rObject);
- rObject.SetModel(&maPageModel);
+ if (mpPageUnderMouse != rpDescriptor)
+ {
+ if (mpPageUnderMouse)
+ SetState(mpPageUnderMouse, PageDescriptor::ST_MouseOver, false, bAnimate);
+
+ mpPageUnderMouse = rpDescriptor;
+
+ if (mpPageUnderMouse)
+ SetState(mpPageUnderMouse, PageDescriptor::ST_MouseOver, true, bAnimate);
+
+ // Change the quick help text to display the name of the page under
+ // the mouse.
+ mpToolTip->SetPage(rpDescriptor);
+ }
}
-void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
+bool SlideSorterView::SetState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const PageDescriptor::State eState,
+ const bool bStateValue,
+ const bool bAnimate)
{
- if (::std::find (
- maVisibilityChangeListeners.begin(),
- maVisibilityChangeListeners.end(),
- rListener) == maVisibilityChangeListeners.end())
+ model::SharedPageDescriptor pDescriptor (rpDescriptor);
+ if ( ! pDescriptor)
+ return false;
+
+ const bool bModified (pDescriptor->SetState(eState, bStateValue));
+ if ( ! bModified)
+ return false;
+
+ // When the page object is not visible (i.e. not on the screen then
+ // nothing has to be painted.
+ if (pDescriptor->HasState(PageDescriptor::ST_Visible))
{
- maVisibilityChangeListeners.push_back(rListener);
+ // For most states a change of that state leads to visible
+ // difference and we have to request a repaint.
+ if (eState != PageDescriptor::ST_WasSelected)
+ RequestRepaint(pDescriptor);
}
+
+ ::boost::shared_ptr<ViewShell> pMainViewShell(mrSlideSorter.GetViewShellBase()->GetMainViewShell());
+ if (pMainViewShell
+ && pMainViewShell->GetShellType()!=ViewShell::ST_DRAW)
+ {
+ // Fade in or out the buttons.
+ if (eState == PageDescriptor::ST_MouseOver)
+ {
+ if (bStateValue)
+ GetButtonBar().RequestFadeIn(rpDescriptor, bAnimate);
+ else
+ GetButtonBar().RequestFadeOut(rpDescriptor, bAnimate);
+ }
+ }
+
+ return bModified;
}
-void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
+::boost::shared_ptr<PageObjectPainter> SlideSorterView::GetPageObjectPainter (void)
{
- maVisibilityChangeListeners.erase (
- ::std::find (
- maVisibilityChangeListeners.begin(),
- maVisibilityChangeListeners.end(),
- rListener));
+ if ( ! mpPageObjectPainter)
+ mpPageObjectPainter.reset(new PageObjectPainter(mrSlideSorter));
+ return mpPageObjectPainter;
+}
+
+
+
+
+::boost::shared_ptr<LayeredDevice> SlideSorterView::GetLayeredDevice (void) const
+{
+ return mpLayeredDevice;
}
+//===== SlideSorterView::DrawLock =============================================
+
+SlideSorterView::DrawLock::DrawLock (
+ view::SlideSorterView& rView,
+ const SharedSdWindow& rpWindow)
+ : mrView(rView),
+ mpWindow(rpWindow)
+{
+ if (mrView.mnLockRedrawSmph == 0)
+ mrView.maRedrawRegion.SetEmpty();
+ ++mrView.mnLockRedrawSmph;
+}
+
+
+
+
+SlideSorterView::DrawLock::DrawLock (SlideSorter& rSlideSorter)
+ : mrView(rSlideSorter.GetView()),
+ mpWindow(rSlideSorter.GetContentWindow())
+{
+ if (mrView.mnLockRedrawSmph == 0)
+ mrView.maRedrawRegion.SetEmpty();
+ ++mrView.mnLockRedrawSmph;
+}
+
+
+
+
+SlideSorterView::DrawLock::~DrawLock (void)
+{
+ OSL_ASSERT(mrView.mnLockRedrawSmph>0);
+ --mrView.mnLockRedrawSmph;
+ if (mrView.mnLockRedrawSmph == 0)
+ if (mpWindow)
+ {
+ mpWindow->Invalidate(mrView.maRedrawRegion);
+ mpWindow->Update();
+ }
+}
+
+
+
+
+void SlideSorterView::DrawLock::Dispose (void)
+{
+ mpWindow.reset();
+}
+
} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
new file mode 100644
index 000000000000..f338a998c56f
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -0,0 +1,1558 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsButtonBar.hxx"
+
+#include "SlideSorter.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "view/SlsTheme.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsToolTip.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsSlotManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
+#include "controller/SlsPageSelector.hxx"
+#include "controller/SlsAnimator.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "app.hrc"
+#include "drawdoc.hxx"
+#include <svx/svxids.hrc>
+#include <sfx2/dispatch.hxx>
+#include <vcl/bmpacc.hxx>
+#include <vcl/virdev.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <com/sun/star/presentation/XPresentation2.hpp>
+#include <boost/bind.hpp>
+
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::presentation::XPresentation2;
+
+namespace sd { namespace slidesorter { namespace view {
+
+/** Base class for the painter of the background bar onto which the buttons
+ are painted. It also provides some size information.
+*/
+class ButtonBar::BackgroundTheme
+{
+public:
+ BackgroundTheme(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons);
+ /** Set the preview bounding box, the maximal area in which to display
+ buttons. A call to this method triggers a call to Layout().
+ */
+ void SetPreviewBoundingBox (const Rectangle& rPreviewBoundingBox);
+ Button::IconSize GetIconSize (void) const;
+
+ virtual BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const = 0;
+ virtual Point GetBackgroundLocation (void) = 0;
+ virtual Rectangle GetButtonArea (void) = 0;
+
+protected:
+ ::boost::shared_ptr<Theme> mpTheme;
+ Rectangle maPreviewBoundingBox;
+ Size maMinimumLargeButtonAreaSize;
+ Size maMinimumMediumButtonAreaSize;
+ Size maMinimumSmallButtonAreaSize;
+ Button::IconSize meIconSize;
+
+ virtual void Layout (void) = 0;
+
+private:
+ void UpdateMinimumIconSizes(const ::std::vector<SharedButton>& rButtons);
+};
+
+
+namespace {
+ /** Rectangular button bar that covers the whole width of the preview.
+ */
+ class RectangleBackgroundTheme : public ButtonBar::BackgroundTheme
+ {
+ public:
+ RectangleBackgroundTheme(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons);
+ virtual BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const;
+ virtual Point GetBackgroundLocation (void);
+ virtual Rectangle GetButtonArea (void);
+ protected:
+ virtual void Layout (void);
+ private:
+ sal_Int32 mnBarHeight;
+ };
+
+ /** Button bar is composed of three images, the left and right end of
+ the bar and the center image. Buttons are only placed over the
+ center image. The center image is painted as is, it is not scaled.
+ */
+ class BitmapBackgroundTheme : public ButtonBar::BackgroundTheme
+ {
+ public:
+ BitmapBackgroundTheme(
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons);
+ virtual BitmapEx CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const;
+ virtual Point GetBackgroundLocation (void);
+ virtual Rectangle GetButtonArea (void);
+ protected:
+ virtual void Layout (void);
+ private:
+ Rectangle maButtonArea;
+ Point maBackgroundLocation;
+ };
+
+ /** The source mask is essentially multiplied with the given alpha value.
+ The result is writen to the result mask.
+ */
+ void AdaptTransparency (AlphaMask& rMask, const AlphaMask& rSourceMask, const double nAlpha)
+ {
+ BitmapWriteAccess* pBitmap = rMask.AcquireWriteAccess();
+ const BitmapReadAccess* pSourceBitmap = const_cast<AlphaMask&>(rSourceMask).AcquireReadAccess();
+
+ if (pBitmap!=NULL && pSourceBitmap!=NULL)
+ {
+ const sal_Int32 nWidth (pBitmap->Width());
+ const sal_Int32 nHeight (pBitmap->Height());
+
+ for (sal_Int32 nY = 0; nY<nHeight; ++nY)
+ for (sal_Int32 nX = 0; nX<nWidth; ++nX)
+ {
+ const sal_uInt8 nValue (255 - pSourceBitmap->GetPixel(nY, nX).GetBlueOrIndex());
+ const sal_uInt8 nNewValue (nValue * (1-nAlpha));
+ pBitmap->SetPixel(nY, nX, 255-nNewValue);
+ }
+ }
+ }
+
+} // end of anonymous namespace
+
+
+//===== ButtonBar::Lock =======================================================
+
+ButtonBar::Lock::Lock (SlideSorter& rSlideSorter)
+ : mrButtonBar(rSlideSorter.GetView().GetButtonBar())
+{
+ mrButtonBar.AcquireLock();
+}
+
+
+
+
+ButtonBar::Lock::~Lock (void)
+{
+ mrButtonBar.ReleaseLock();
+}
+
+
+
+
+//===== ButtonBar =============================================================
+
+ButtonBar::ButtonBar (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ maPageObjectSize(0,0),
+ maButtonBoundingBox(),
+ maBackgroundLocation(),
+ mpDescriptor(),
+ mbIsExcluded(false),
+ mpButtonUnderMouse(),
+ mpDownButton(),
+ maRegularButtons(),
+ maExcludedButtons(),
+ maNormalBackground(),
+ maButtonDownBackground(),
+ mbIsMouseOverBar(false),
+ mpBackgroundTheme(),
+ mnLockCount(0)
+{
+ HandleDataChangeEvent();
+}
+
+
+
+
+ButtonBar::~ButtonBar (void)
+{
+}
+
+
+
+
+void ButtonBar::ProcessButtonDownEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation)
+{
+ SetButtonUnderMouse(GetButtonAt(aMouseModelLocation));
+ if (mpButtonUnderMouse)
+ mpButtonUnderMouse->SetState(Button::State_Down);
+ mpDownButton = mpButtonUnderMouse;
+
+ mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
+}
+
+
+
+
+void ButtonBar::ProcessButtonUpEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation)
+{
+ SetButtonUnderMouse(GetButtonAt(aMouseModelLocation));
+ if (mpButtonUnderMouse)
+ {
+ mpButtonUnderMouse->SetState(Button::State_Hover);
+ if (mpButtonUnderMouse == mpDownButton)
+ {
+ // This is done only when the buttons are sufficiently visible.
+ if (mpDescriptor->GetVisualState().GetButtonAlpha()<0.7)
+ {
+ mpButtonUnderMouse->ProcessClick(mpDescriptor);
+ mbIsExcluded = mpDescriptor->HasState(model::PageDescriptor::ST_Excluded);
+ ProcessMouseMotionEvent (rpDescriptor, aMouseModelLocation, false);
+ }
+ }
+ }
+ mpDownButton.reset();
+ mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
+}
+
+
+
+
+void ButtonBar::ProcessMouseMotionEvent (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aMouseModelLocation,
+ const bool bIsMouseButtonDown)
+{
+ model::SharedPageDescriptor pOldDescriptor (mpDescriptor);
+ bool bPageHasChanged (false);
+ bool bButtonHasChanged (false);
+ bool bButtonStateHasChanged (false);
+
+ // Update the page object for which to manage the buttons.
+ bPageHasChanged = SetPage(rpDescriptor);
+ mbIsMouseOverBar = IsMouseOverBar(aMouseModelLocation);
+
+ // Update button under mouse.
+ if (rpDescriptor)
+ {
+ bButtonHasChanged = SetButtonUnderMouse(GetButtonAt(aMouseModelLocation));
+
+ if (mpButtonUnderMouse)
+ {
+ // When the mouse button is down, mark the button under the
+ // mouse only as pressed when it is the same button the mouse
+ // button was pressed over, and where the button release would
+ // lead to a click action.
+ if (bIsMouseButtonDown)
+ {
+ if (mpButtonUnderMouse==mpDownButton)
+ bButtonStateHasChanged = mpButtonUnderMouse->SetState(Button::State_Down);
+ }
+ else
+ bButtonStateHasChanged = mpButtonUnderMouse->SetState(Button::State_Hover);
+ }
+ }
+
+ // Show a quick help text when the mouse is over a button.
+ if (bButtonHasChanged)
+ {
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (pWindow)
+ {
+ if (mpButtonUnderMouse)
+ mrSlideSorter.GetView().GetToolTip().ShowHelpText(mpButtonUnderMouse->GetHelpText());
+ else
+ mrSlideSorter.GetView().GetToolTip().ShowDefaultHelpText();
+ }
+ }
+
+ if (bPageHasChanged || bButtonHasChanged || bButtonStateHasChanged)
+ {
+ if (pOldDescriptor)
+ mrSlideSorter.GetView().RequestRepaint(pOldDescriptor);
+ if (mpDescriptor && pOldDescriptor!=mpDescriptor)
+ mrSlideSorter.GetView().RequestRepaint(mpDescriptor);
+ }
+}
+
+
+
+
+void ButtonBar::ResetPage (void)
+{
+ SetPage(model::SharedPageDescriptor());
+}
+
+
+
+
+bool ButtonBar::SetPage (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if (mpDescriptor != rpDescriptor)
+ {
+ mpDescriptor = rpDescriptor;
+
+ if (mpDescriptor)
+ mbIsExcluded = mpDescriptor->HasState(model::PageDescriptor::ST_Excluded);
+ else
+ mbIsExcluded = false;
+ SetButtonUnderMouse();
+ mpDownButton.reset();
+
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+sal_Int32 ButtonBar::GetButtonCount (const bool bIsExcluded) const
+{
+ if (bIsExcluded)
+ return maExcludedButtons.size();
+ else
+ return maRegularButtons.size();
+}
+
+
+
+
+::boost::shared_ptr<Button> ButtonBar::GetButton (
+ const bool bIsExcluded,
+ const sal_Int32 nIndex) const
+{
+ const ::std::vector<boost::shared_ptr<Button> >& rButtons (bIsExcluded
+ ? maExcludedButtons
+ : maRegularButtons);
+
+ if (nIndex<0 || sal_uInt32(nIndex)>=rButtons.size())
+ {
+ OSL_ASSERT(nIndex<0 || sal_uInt32(nIndex)>=rButtons.size());
+ return ::boost::shared_ptr<Button>();
+ }
+ else
+ return rButtons[sal_uInt32(nIndex)];
+}
+
+
+
+
+SharedButton ButtonBar::GetButtonAt (const Point aModelLocation)
+{
+ if (IsMouseOverBar(aModelLocation))
+ {
+ const Point aLocalLocation (aModelLocation - mpDescriptor->GetBoundingBox().TopLeft());
+ ::std::vector<SharedButton>& rButtons (
+ mbIsExcluded ? maExcludedButtons : maRegularButtons);
+ for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex)
+ {
+ if (rButtons[sal_uInt32(nIndex)]->GetBoundingBox().IsInside(aLocalLocation))
+ {
+ if (rButtons[sal_uInt32(nIndex)]->IsEnabled())
+ return rButtons[sal_uInt32(nIndex)];
+ else
+ return SharedButton();
+ }
+ }
+ }
+
+ return SharedButton();
+}
+
+
+
+
+bool ButtonBar::IsMouseOverBar (void) const
+{
+ return mbIsMouseOverBar;
+}
+
+
+
+
+bool ButtonBar::SetButtonUnderMouse (const SharedButton& rButton)
+{
+ if (mpButtonUnderMouse != rButton)
+ {
+ if (mpButtonUnderMouse)
+ mpButtonUnderMouse->SetState(Button::State_Normal);
+
+ mpButtonUnderMouse = rButton;
+
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+void ButtonBar::Paint (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+
+ const double nButtonBarAlpha (rpDescriptor->GetVisualState().GetButtonBarAlpha());
+ if (nButtonBarAlpha >= 1)
+ return;
+
+ LayoutButtons(rpDescriptor->GetBoundingBox().GetSize());
+
+ const Point aOffset (rpDescriptor->GetBoundingBox().TopLeft());
+
+ // Paint the background.
+ PaintButtonBackground(rDevice, rpDescriptor, aOffset);
+
+ // Paint the buttons.
+ const ::std::vector<SharedButton>& rButtons (
+ rpDescriptor->HasState(model::PageDescriptor::ST_Excluded)
+ ? maExcludedButtons
+ : maRegularButtons);
+
+
+ const double nButtonAlpha (rpDescriptor->GetVisualState().GetButtonAlpha());
+ for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex)
+ rButtons[nIndex]->Paint(
+ rDevice,
+ aOffset,
+ nButtonAlpha,
+ mrSlideSorter.GetTheme());
+}
+
+
+
+
+bool ButtonBar::IsMouseOverButton (void) const
+{
+ return mpButtonUnderMouse;
+}
+
+
+
+
+void ButtonBar::PaintButtonBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor,
+ const Point aOffset)
+{
+ BitmapEx* pBitmap = NULL;
+ if (maButtonDownBackground.IsEmpty() || maNormalBackground.IsEmpty())
+ {
+ if (mpBackgroundTheme)
+ {
+ maButtonDownBackground = mpBackgroundTheme->CreateBackground(rDevice, true);
+ maNormalBackground = mpBackgroundTheme->CreateBackground(rDevice, false);
+ }
+ }
+ if (mpButtonUnderMouse && mpButtonUnderMouse->IsDown())
+ pBitmap = &maButtonDownBackground;
+ else
+ pBitmap = &maNormalBackground;
+ if (pBitmap != NULL)
+ {
+ AlphaMask aMask (pBitmap->GetSizePixel());
+ AdaptTransparency(
+ aMask,
+ pBitmap->GetAlpha(),
+ rpDescriptor->GetVisualState().GetButtonBarAlpha());
+ rDevice.DrawBitmapEx(maBackgroundLocation+aOffset, BitmapEx(pBitmap->GetBitmap(), aMask));
+ }
+}
+
+
+
+
+bool ButtonBar::IsMouseOverBar (const Point aModelLocation) const
+{
+ if ( ! mpDescriptor || ! mpDescriptor->GetBoundingBox().IsInside(aModelLocation))
+ return false;
+
+ if ( ! maButtonBoundingBox.IsInside(aModelLocation - mpDescriptor->GetBoundingBox().TopLeft()))
+ return false;
+
+ return true;
+}
+
+
+
+
+void ButtonBar::RequestLayout (void)
+{
+ maPageObjectSize = Size(0,0);
+}
+
+
+
+
+void ButtonBar::LayoutButtons (const Size aPageObjectSize)
+{
+ if (maPageObjectSize != aPageObjectSize)
+ {
+ maPageObjectSize = aPageObjectSize;
+
+ if (mpBackgroundTheme)
+ {
+ mpBackgroundTheme->SetPreviewBoundingBox(
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ Point(0,0),
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ LayoutButtons();
+ }
+
+ // Release the background bitmaps so that on the next paint
+ // they are created anew in the right size.
+ maNormalBackground.SetEmpty();
+ maButtonDownBackground.SetEmpty();
+ }
+}
+
+
+
+
+bool ButtonBar::LayoutButtons (void)
+{
+ const sal_Int32 nGap (mrSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ButtonGap));
+ const sal_Int32 nBorder (mrSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ButtonBorder));
+
+ const Button::IconSize eIconSize (mpBackgroundTheme->GetIconSize());
+
+ // Tell buttons which size they are.
+ for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex)
+ maExcludedButtons[nIndex]->SetIconSize(eIconSize);
+ for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex)
+ maRegularButtons[nIndex]->SetIconSize(eIconSize);
+
+ // Determine maximal height and total width of the buttons.
+ // Start with the buttons used for the excluded state.
+ sal_Int32 nMaximumHeight (0);
+ sal_Int32 nExcludedTotalWidth ((maExcludedButtons.size()-1) * nGap + 2*nBorder);
+ for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex)
+ {
+ const Size aSize (maExcludedButtons[nIndex]->GetSize());
+ if (aSize.Height() > nMaximumHeight)
+ nMaximumHeight = aSize.Height();
+ nExcludedTotalWidth += aSize.Width();
+ }
+
+ // Do the same for the regular buttons.
+ sal_Int32 nRegularTotalWidth ((maRegularButtons.size()-1) * nGap + 2*nBorder);
+ for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex)
+ {
+ const Size aSize (maRegularButtons[nIndex]->GetSize());
+ if (aSize.Height() > nMaximumHeight)
+ nMaximumHeight = aSize.Height();
+ nRegularTotalWidth += aSize.Width();
+ }
+ nMaximumHeight += 2*nBorder;
+
+ // Set up the bounding box of the button bar.
+ maButtonBoundingBox = mpBackgroundTheme->GetButtonArea();
+ maBackgroundLocation = mpBackgroundTheme->GetBackgroundLocation();
+ if (mrSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ButtonPaintType) == 1)
+ {
+ // Center the buttons.
+ maButtonBoundingBox.Left() += (maButtonBoundingBox.GetWidth() - nRegularTotalWidth)/2;
+ maButtonBoundingBox.Right() = maButtonBoundingBox.Left() + nRegularTotalWidth - 1;
+ }
+
+ // Place the buttons.
+ Rectangle aBox (maButtonBoundingBox);
+ aBox.Right() -= nBorder;
+ for (sal_Int32 nIndex=maRegularButtons.size()-1; nIndex>=0; --nIndex)
+ {
+ maRegularButtons[nIndex]->Place(aBox);
+ aBox.Right() = maRegularButtons[nIndex]->GetBoundingBox().Left() - nGap;
+ }
+
+ // For slides excluded from the show there is only one icon placed
+ // exactly like the second of the regular icons.
+ if (maRegularButtons.size()>=2 && maExcludedButtons.size()>=1)
+ {
+ aBox = maRegularButtons[1]->GetBoundingBox();
+ maExcludedButtons[0]->Place(aBox);
+ }
+
+ // We return true only when there is no inactive button.
+ for (sal_uInt32 nIndex=0; nIndex<maExcludedButtons.size(); ++nIndex)
+ if ( ! maExcludedButtons[nIndex]->IsActive())
+ return false;
+ for (sal_uInt32 nIndex=0; nIndex<maRegularButtons.size(); ++nIndex)
+ if ( ! maRegularButtons[nIndex]->IsActive())
+ return false;
+
+ return true;
+}
+
+
+
+
+void ButtonBar::RequestFadeIn (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate)
+{
+ if ( ! rpDescriptor)
+ return;
+ if (mnLockCount > 0)
+ return;
+
+ const double nMinAlpha (0);
+ if ( ! bAnimate)
+ {
+ rpDescriptor->GetVisualState().SetButtonAlpha(nMinAlpha);
+ rpDescriptor->GetVisualState().SetButtonBarAlpha(nMinAlpha);
+ }
+ else
+ StartFadeAnimation(rpDescriptor, nMinAlpha, true);
+}
+
+
+
+
+void ButtonBar::RequestFadeOut (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const bool bAnimate)
+{
+ if ( ! rpDescriptor)
+ return;
+ if (mnLockCount > 0)
+ return;
+
+ const double nMaxAlpha (1);
+ if ( ! bAnimate)
+ {
+ rpDescriptor->GetVisualState().SetButtonAlpha(nMaxAlpha);
+ rpDescriptor->GetVisualState().SetButtonBarAlpha(nMaxAlpha);
+ }
+ else
+ StartFadeAnimation(rpDescriptor, nMaxAlpha, false);
+}
+
+
+
+
+bool ButtonBar::IsVisible (const model::SharedPageDescriptor& rpDescriptor)
+{
+ const double nMaxAlpha (1);
+ return rpDescriptor && rpDescriptor->GetVisualState().GetButtonBarAlpha() < nMaxAlpha;
+}
+
+
+
+
+void ButtonBar::HandleDataChangeEvent (void)
+{
+ maExcludedButtons.clear();
+ maExcludedButtons.push_back(::boost::shared_ptr<Button>(new UnhideButton(mrSlideSorter)));
+
+ maRegularButtons.clear();
+ maRegularButtons.push_back(::boost::shared_ptr<Button>(new StartShowButton(mrSlideSorter)));
+ maRegularButtons.push_back(::boost::shared_ptr<Button>(new HideButton(mrSlideSorter)));
+ maRegularButtons.push_back(::boost::shared_ptr<Button>(new DuplicateButton(mrSlideSorter)));
+
+ mpBackgroundTheme.reset(
+ new BitmapBackgroundTheme(
+ mrSlideSorter.GetTheme(),
+ maRegularButtons));
+
+ // Force layout on next Paint().
+ maPageObjectSize = Size(0,0);
+}
+
+
+
+
+void ButtonBar::StartFadeAnimation (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const double nTargetAlpha,
+ const bool bFadeIn)
+{
+ model::SharedPageDescriptor pDescriptor (rpDescriptor);
+
+ const double nCurrentButtonAlpha (pDescriptor->GetVisualState().GetButtonAlpha());
+ const double nCurrentButtonBarAlpha (pDescriptor->GetVisualState().GetButtonBarAlpha());
+
+ // Stop a running animation.
+ const controller::Animator::AnimationId nId (
+ pDescriptor->GetVisualState().GetButtonAlphaAnimationId());
+ if (nId != controller::Animator::NotAnAnimationId)
+ mrSlideSorter.GetController().GetAnimator()->RemoveAnimation(nId);
+
+ // Prepare the blending functors that translate [0,1] animation
+ // times into alpha values of buttons and button bar.
+ const ::boost::function<double(double)> aButtonBlendFunctor (
+ ::boost::bind(
+ controller::AnimationFunction::Blend,
+ nCurrentButtonAlpha,
+ nTargetAlpha,
+ ::boost::bind(controller::AnimationFunction::Linear, _1)));
+ const ::boost::function<double(double)> aButtonBarBlendFunctor (
+ ::boost::bind(
+ controller::AnimationFunction::Blend,
+ nCurrentButtonBarAlpha,
+ nTargetAlpha,
+ ::boost::bind(controller::AnimationFunction::Linear, _1)));
+
+ // Delay the fade in a little bit when the buttons are not visible at
+ // all so that we do not leave a trail of half-visible buttons when the
+ // mouse is moved across the screen. No delay on fade out or when the
+ // buttons are already showing. Fade out is faster than fade in.
+ const double nDelay (nCurrentButtonBarAlpha>0 && nCurrentButtonBarAlpha<1
+ ? 0
+ : (mrSlideSorter.GetTheme()->GetIntegerValue(bFadeIn
+ ? Theme::Integer_ButtonFadeInDelay
+ : Theme::Integer_ButtonFadeOutDelay)));
+ const double nDuration (mrSlideSorter.GetTheme()->GetIntegerValue(bFadeIn
+ ? Theme::Integer_ButtonFadeInDuration
+ : Theme::Integer_ButtonFadeOutDuration));
+ pDescriptor->GetVisualState().SetButtonAlphaAnimationId(
+ mrSlideSorter.GetController().GetAnimator()->AddAnimation(
+ ::boost::bind(
+ controller::AnimationFunction::ApplyButtonAlphaChange,
+ pDescriptor,
+ ::boost::ref(mrSlideSorter.GetView()),
+ ::boost::bind(aButtonBlendFunctor, _1),
+ ::boost::bind(aButtonBarBlendFunctor, _1)),
+ nDelay,
+ nDuration,
+ ::boost::bind(
+ &model::VisualState::SetButtonAlphaAnimationId,
+ ::boost::ref(pDescriptor->GetVisualState()),
+ controller::Animator::NotAnAnimationId)
+ ));
+}
+
+
+
+
+void ButtonBar::AcquireLock (void)
+{
+ if (mnLockCount == 0 && mpDescriptor)
+ RequestFadeOut(mpDescriptor, true);
+
+ ++mnLockCount;
+}
+
+
+
+
+void ButtonBar::ReleaseLock (void)
+{
+ --mnLockCount;
+
+ if (mnLockCount == 0 && mpDescriptor)
+ RequestFadeIn(mpDescriptor, true);
+}
+
+
+
+
+//===== BackgroundTheme =====================================================
+
+ButtonBar::BackgroundTheme::BackgroundTheme (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons)
+ : mpTheme(rpTheme)
+{
+ UpdateMinimumIconSizes(rButtons);
+}
+
+
+
+
+void ButtonBar::BackgroundTheme::SetPreviewBoundingBox (const Rectangle& rPreviewBoundingBox)
+{
+ maPreviewBoundingBox = rPreviewBoundingBox;
+ Layout();
+}
+
+
+
+
+void ButtonBar::BackgroundTheme::UpdateMinimumIconSizes (
+ const ::std::vector<SharedButton>& rButtons)
+{
+ OSL_ASSERT(mpTheme);
+
+ sal_Int32 nMaximumHeightLarge (0);
+ sal_Int32 nMaximumHeightMedium (0);
+ sal_Int32 nMaximumHeightSmall (0);
+ const sal_Int32 nGap (mpTheme->GetIntegerValue(Theme::Integer_ButtonGap));
+ const sal_Int32 nBorder (mpTheme->GetIntegerValue(Theme::Integer_ButtonBorder));
+ sal_Int32 nTotalWidthLarge ((rButtons.size()-1) * nGap + 2*nBorder);
+ sal_Int32 nTotalWidthMedium ((rButtons.size()-1) * nGap + 2*nBorder);
+ sal_Int32 nTotalWidthSmall ((rButtons.size()-1) * nGap + 2*nBorder);
+ for (sal_uInt32 nIndex=0; nIndex<rButtons.size(); ++nIndex)
+ {
+ // Update large size.
+ Size aSize = rButtons[nIndex]->GetSize(Button::IconSize_Large);
+ if (aSize.Height() > nMaximumHeightLarge)
+ nMaximumHeightLarge = aSize.Height();
+ nTotalWidthLarge += aSize.Width();
+
+ // Update medium size.
+ aSize = rButtons[nIndex]->GetSize(Button::IconSize_Medium);
+ if (aSize.Height() > nMaximumHeightMedium)
+ nMaximumHeightMedium = aSize.Height();
+ nTotalWidthMedium += aSize.Width();
+
+ // Update small size.
+ aSize = rButtons[nIndex]->GetSize(Button::IconSize_Small);
+ if (aSize.Height() > nMaximumHeightSmall)
+ nMaximumHeightSmall = aSize.Height();
+ nTotalWidthSmall += aSize.Width();
+ }
+ maMinimumLargeButtonAreaSize = Size(nTotalWidthLarge, nMaximumHeightLarge+2*nBorder);
+ maMinimumMediumButtonAreaSize = Size(nTotalWidthMedium, nMaximumHeightMedium+2*nBorder);
+ maMinimumSmallButtonAreaSize = Size(nTotalWidthSmall, nMaximumHeightSmall+2*nBorder);
+}
+
+
+
+
+Button::IconSize ButtonBar::BackgroundTheme::GetIconSize (void) const
+{
+ return meIconSize;
+}
+
+
+
+
+//===== RectangleBackgroundTheme ============================================
+
+RectangleBackgroundTheme::RectangleBackgroundTheme (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons)
+ : BackgroundTheme(rpTheme, rButtons),
+ mnBarHeight(0)
+{
+}
+
+
+
+
+BitmapEx RectangleBackgroundTheme::CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const
+{
+ OSL_ASSERT(mpTheme);
+
+ // Setup background color.
+ Color aTopFillColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Fill1));
+ Color aTopBorderColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Border1));
+ Color aBottomFillColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Fill2));
+ Color aBottomBorderColor (mpTheme->GetGradientColor(
+ Theme::Gradient_ButtonBackground,
+ Theme::Border2));
+ if (bIsButtonDown)
+ {
+ aTopFillColor.DecreaseLuminance(50);
+ aTopBorderColor.DecreaseLuminance(50);
+ aBottomFillColor.DecreaseLuminance(50);
+ aBottomBorderColor.DecreaseLuminance(50);
+ }
+
+ const int nWidth (maPreviewBoundingBox.GetWidth()+2);
+ const int nHeight (mnBarHeight);
+ const int nCenter (nHeight / 2);
+
+ VirtualDevice aDevice (rTemplateDevice, 0, 8);
+ aDevice.SetOutputSizePixel(Size(nWidth,nHeight));
+
+ // Fill upper and lower half.
+ aDevice.SetLineColor();
+ aDevice.SetFillColor(aTopFillColor);
+ aDevice.DrawRect(Rectangle(0,0,nWidth-1,nCenter));
+ aDevice.SetFillColor(aBottomFillColor);
+ aDevice.DrawRect(Rectangle(0,nCenter,nWidth-1,nHeight-1));
+
+ // Draw border.
+ aDevice.SetFillColor();
+ aDevice.SetLineColor(aTopBorderColor);
+ aDevice.DrawLine(Point(0,nCenter),Point(0,0));
+ aDevice.DrawLine(Point(0,0), Point(nWidth-1,0));
+ aDevice.DrawLine(Point(nWidth-1,0),Point(nWidth-1,nCenter));
+ aDevice.SetLineColor(aBottomBorderColor);
+ aDevice.DrawLine(Point(0,nCenter),Point(0,nHeight-1));
+ aDevice.DrawLine(Point(0,nHeight-1), Point(nWidth-1,nHeight-1));
+ aDevice.DrawLine(Point(nWidth-1,nHeight-1),Point(nWidth-1,nCenter));
+
+ return aDevice.GetBitmapEx(Point(0,0), Size(nWidth,nHeight));
+}
+
+
+
+
+Point RectangleBackgroundTheme::GetBackgroundLocation (void)
+{
+ return Point(
+ maPreviewBoundingBox.Left()-1,
+ maPreviewBoundingBox.Bottom() - mnBarHeight + 2);
+}
+
+
+
+
+Rectangle RectangleBackgroundTheme::GetButtonArea (void)
+{
+ return Rectangle(
+ maPreviewBoundingBox.Left(),
+ maPreviewBoundingBox.Bottom() - mnBarHeight + 2,
+ maPreviewBoundingBox.Right(),
+ maPreviewBoundingBox.Bottom());
+}
+
+
+
+
+void RectangleBackgroundTheme::Layout (void)
+{
+ if (maPreviewBoundingBox.GetWidth() < maMinimumLargeButtonAreaSize.Width())
+ if (maPreviewBoundingBox.GetWidth() < maMinimumMediumButtonAreaSize.Width())
+ {
+ meIconSize = Button::IconSize_Small;
+ mnBarHeight = maMinimumSmallButtonAreaSize.Height();
+ }
+ else
+ {
+ meIconSize = Button::IconSize_Medium;
+ mnBarHeight = maMinimumMediumButtonAreaSize.Height();
+ }
+ else
+ {
+ meIconSize = Button::IconSize_Large;
+ mnBarHeight = maMinimumLargeButtonAreaSize.Height();
+ }
+}
+
+
+
+
+//===== BitmapBackgroundTheme =================================================
+
+BitmapBackgroundTheme::BitmapBackgroundTheme (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const ::std::vector<SharedButton>& rButtons)
+ : BackgroundTheme(rpTheme, rButtons),
+ maButtonArea(),
+ maBackgroundLocation()
+{
+}
+
+
+
+
+BitmapEx BitmapBackgroundTheme::CreateBackground (
+ const OutputDevice& rTemplateDevice,
+ const bool bIsButtonDown) const
+{
+ (void)rTemplateDevice;
+ (void)bIsButtonDown;
+
+ OSL_ASSERT(mpTheme);
+
+ // Get images.
+ switch (meIconSize)
+ {
+ case Button::IconSize_Large:
+ default:
+ return mpTheme->GetIcon(Theme::Icon_ButtonBarLarge);
+
+ case Button::IconSize_Medium:
+ return mpTheme->GetIcon(Theme::Icon_ButtonBarMedium);
+
+ case Button::IconSize_Small:
+ return mpTheme->GetIcon(Theme::Icon_ButtonBarSmall);
+ }
+}
+
+
+
+
+Point BitmapBackgroundTheme::GetBackgroundLocation (void)
+{
+ return maBackgroundLocation;
+}
+
+
+
+
+Rectangle BitmapBackgroundTheme::GetButtonArea (void)
+{
+ return maButtonArea;
+}
+
+
+
+
+void BitmapBackgroundTheme::Layout (void)
+{
+ Size aImageSize (mpTheme->GetIcon(Theme::Icon_ButtonBarLarge).GetSizePixel());
+ if (aImageSize.Width() >= maPreviewBoundingBox.GetWidth())
+ {
+ aImageSize = mpTheme->GetIcon(Theme::Icon_ButtonBarMedium).GetSizePixel();
+ if (aImageSize.Width() >= maPreviewBoundingBox.GetWidth())
+ {
+ meIconSize = Button::IconSize_Small;
+ aImageSize = mpTheme->GetIcon(Theme::Icon_ButtonBarSmall).GetSizePixel();
+ }
+ else
+ meIconSize = Button::IconSize_Medium;
+ }
+ else
+ {
+ meIconSize = Button::IconSize_Large;
+ }
+
+ maBackgroundLocation = Point(
+ maPreviewBoundingBox.Left()
+ + (maPreviewBoundingBox.GetWidth()-aImageSize.Width())/2,
+ maPreviewBoundingBox.Bottom() - aImageSize.Height());
+ maButtonArea = Rectangle(maBackgroundLocation, aImageSize);
+}
+
+
+
+
+//===== Button ================================================================
+
+Button::Button (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsHelpText)
+ : mrSlideSorter(rSlideSorter),
+ meState(State_Normal),
+ maBoundingBox(),
+ msHelpText(rsHelpText),
+ mbIsActive(false),
+ meIconSize(IconSize_Large)
+{
+}
+
+
+
+
+Button::~Button (void)
+{
+}
+
+
+
+
+bool Button::SetState (const State eState)
+{
+ if (meState != eState)
+ {
+ meState = eState;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+Button::State Button::GetState (void) const
+{
+ return meState;
+}
+
+
+
+
+Rectangle Button::GetBoundingBox (void) const
+{
+ if (mbIsActive)
+ return maBoundingBox;
+ else
+ return Rectangle();
+}
+
+
+
+
+::rtl::OUString Button::GetHelpText (void) const
+{
+ if (mbIsActive)
+ return msHelpText;
+ else
+ return ::rtl::OUString();
+}
+
+
+
+
+bool Button::IsDown (void) const
+{
+ return mbIsActive && meState==State_Down;
+}
+
+
+
+
+void Button::SetActiveState (const bool bIsActive)
+{
+ mbIsActive = bIsActive;
+}
+
+
+
+
+bool Button::IsActive (void) const
+{
+ return mbIsActive;
+}
+
+
+
+
+void Button::SetIconSize (const IconSize eIconSize)
+{
+ meIconSize = eIconSize;
+}
+
+
+
+
+Button::IconSize Button::GetIconSize (void) const
+{
+ return meIconSize;
+}
+
+
+
+
+bool Button::IsEnabled (void) const
+{
+ return true;
+}
+
+
+
+
+//===== TextButton ============================================================
+
+TextButton::TextButton (
+ SlideSorter& rSlideSorter,
+ const ::rtl::OUString& rsText,
+ const ::rtl::OUString& rsHelpText)
+ : Button(rSlideSorter, rsHelpText),
+ msText(rsText)
+{
+}
+
+
+
+
+void TextButton::Place (const Rectangle aButtonBarBox)
+{
+ maBoundingBox = aButtonBarBox;
+ SetActiveState(true);
+}
+
+
+
+
+void TextButton::Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const
+{
+ (void)nAlpha;
+
+ if (mbIsActive)
+ {
+ // Paint text over the button background.
+ if (meState == State_Normal)
+ rDevice.SetTextColor(rpTheme->GetColor(Theme::Color_ButtonText));
+ else
+ rDevice.SetTextColor(rpTheme->GetColor(Theme::Color_ButtonTextHover));
+ Rectangle aBox (maBoundingBox);
+ aBox += aOffset;
+ rDevice.DrawText(aBox, msText, TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER);
+ }
+}
+
+
+
+
+Size TextButton::GetSize (void) const
+{
+ return Size();
+}
+
+
+
+
+Size TextButton::GetSize (const Button::IconSize) const
+{
+ return Size();
+}
+
+
+
+
+//===== ImageButon ============================================================
+
+ImageButton::ImageButton (
+ SlideSorter& rSlideSorter,
+ const BitmapEx& rLargeIcon,
+ const BitmapEx& rLargeHoverIcon,
+ const BitmapEx& rMediumIcon,
+ const BitmapEx& rMediumHoverIcon,
+ const BitmapEx& rSmallIcon,
+ const BitmapEx& rSmallHoverIcon,
+ const ::rtl::OUString& rsHelpText)
+ : Button(rSlideSorter, rsHelpText),
+ maLargeIcon(rLargeIcon),
+ maLargeHoverIcon(rLargeHoverIcon.IsEmpty() ? rLargeIcon : rLargeHoverIcon),
+ maMediumIcon(rMediumIcon),
+ maMediumHoverIcon(rMediumHoverIcon.IsEmpty() ? rMediumIcon : rMediumHoverIcon),
+ maSmallIcon(rSmallIcon),
+ maSmallHoverIcon(rSmallHoverIcon.IsEmpty() ? rSmallIcon : rSmallHoverIcon)
+{
+}
+
+
+
+
+void ImageButton::Place (const Rectangle aButtonBarBox)
+{
+ const sal_Int32 nWidth (GetSize().Width());
+ maBoundingBox = Rectangle(
+ aButtonBarBox.Right() - nWidth,
+ aButtonBarBox.Top(),
+ aButtonBarBox.Right(),
+ aButtonBarBox.Bottom());
+ SetActiveState(aButtonBarBox.IsInside(maBoundingBox));
+}
+
+
+
+
+void ImageButton::Paint (
+ OutputDevice& rDevice,
+ const Point aOffset,
+ const double nAlpha,
+ const ::boost::shared_ptr<Theme>& rpTheme) const
+{
+ (void)rpTheme;
+
+ if ( ! mbIsActive)
+ return;
+
+ const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing());
+ rDevice.SetAntialiasing(nSavedAntialiasingMode | ANTIALIASING_ENABLE_B2DDRAW);
+
+ rDevice.SetLineColor();
+
+ // Choose icon.
+ BitmapEx aIcon;
+ switch (meIconSize)
+ {
+ case IconSize_Large:
+ default:
+ if (meState == State_Normal)
+ aIcon = maLargeIcon;
+ else
+ aIcon = maLargeHoverIcon;
+ break;
+
+ case IconSize_Medium:
+ if (meState == State_Normal)
+ aIcon = maMediumIcon;
+ else
+ aIcon = maMediumHoverIcon;
+ break;
+
+ case IconSize_Small:
+ if (meState == State_Normal)
+ aIcon = maSmallIcon;
+ else
+ aIcon = maSmallHoverIcon;
+ break;
+ }
+
+ // Paint icon.
+ if ( ! aIcon.IsEmpty())
+ {
+ AlphaMask aMask (aIcon.GetSizePixel());
+ AdaptTransparency(aMask, aIcon.GetAlpha(), nAlpha);
+ rDevice.DrawBitmapEx(
+ Point(
+ maBoundingBox.Left()
+ + aOffset.X()
+ + (maBoundingBox.GetWidth()-aIcon.GetSizePixel().Width())/2,
+ maBoundingBox.Top()
+ + aOffset.Y()
+ + (maBoundingBox.GetHeight()-aIcon.GetSizePixel().Height())/2),
+ BitmapEx(aIcon.GetBitmap(), aMask));
+ }
+
+ rDevice.SetAntialiasing(nSavedAntialiasingMode);
+}
+
+
+
+
+Size ImageButton::GetSize (void) const
+{
+ return GetSize(meIconSize);
+}
+
+
+
+
+Size ImageButton::GetSize (const Button::IconSize eIconSize) const
+{
+ switch (eIconSize)
+ {
+ case IconSize_Large:
+ default:
+ return maLargeIcon.GetSizePixel();
+
+ case IconSize_Medium:
+ return maMediumIcon.GetSizePixel();
+
+ case IconSize_Small:
+ return maSmallIcon.GetSizePixel();
+ }
+}
+
+
+
+
+//===== UnhideButton ==========================================================
+
+UnhideButton::UnhideButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BLarge),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BLargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BMedium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BMediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmall),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2BSmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command2B))
+{
+}
+
+
+
+
+void UnhideButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+ mrSlideSorter.GetController().GetSlotManager()->ChangeSlideExclusionState(
+ (rpDescriptor->HasState(model::PageDescriptor::ST_Selected)
+ ? model::SharedPageDescriptor()
+ : rpDescriptor),
+ false);
+}
+
+
+
+
+//===== StartSlideShowButton ==================================================
+
+StartShowButton::StartShowButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Large),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1LargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Medium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1MediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1Small),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command1SmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command1))
+{
+}
+
+
+
+
+bool StartShowButton::IsEnabled (void) const
+{
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell == NULL)
+ return false;
+ SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
+ if (pDispatcher == NULL)
+ return false;
+
+ const SfxPoolItem* pState = NULL;
+ const SfxItemState eState (pDispatcher->QueryState(SID_PRESENTATION, pState));
+ return (eState & SFX_ITEM_DISABLED) == 0;
+}
+
+
+
+
+void StartShowButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ // Hide the tool tip early, while the slide show still intializes.
+ mrSlideSorter.GetView().GetToolTip().SetPage(model::SharedPageDescriptor());
+
+ Reference< XPresentation2 > xPresentation(
+ mrSlideSorter.GetModel().GetDocument()->getPresentation());
+ if (xPresentation.is())
+ {
+ Sequence<PropertyValue> aProperties (1);
+ aProperties[0].Name = ::rtl::OUString::createFromAscii("FirstPage");
+ const ::rtl::OUString sName (rpDescriptor->GetPage()->GetName());
+ aProperties[0].Value = Any(sName);
+ xPresentation->startWithArguments(aProperties);
+ }
+}
+
+
+
+
+//===== HideButton ============================================================
+
+HideButton::HideButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Large),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2LargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Medium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2MediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2Small),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command2SmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command2))
+{
+}
+
+
+
+
+void HideButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+ mrSlideSorter.GetController().GetSlotManager()->ChangeSlideExclusionState(
+ (rpDescriptor->HasState(model::PageDescriptor::ST_Selected)
+ ? model::SharedPageDescriptor()
+ : rpDescriptor),
+ true);
+}
+
+
+
+
+//===== DuplicateButton =======================================================
+
+DuplicateButton::DuplicateButton (SlideSorter& rSlideSorter)
+ : ImageButton(
+ rSlideSorter,
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Large),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3LargeHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Medium),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3MediumHover),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3Small),
+ rSlideSorter.GetTheme()->GetIcon(Theme::Icon_Command3SmallHover),
+ rSlideSorter.GetTheme()->GetString(Theme::String_Command3))
+{
+}
+
+
+
+
+bool DuplicateButton::IsEnabled (void) const
+{
+ ViewShell* pViewShell = mrSlideSorter.GetViewShell();
+ if (pViewShell == NULL)
+ return false;
+ SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
+ if (pDispatcher == NULL)
+ return false;
+
+ const SfxPoolItem* pState = NULL;
+ const SfxItemState eState (pDispatcher->QueryState(
+ SID_DUPLICATE_PAGE,
+ pState));
+ return (eState & SFX_ITEM_DISABLED) == 0;
+}
+
+
+
+
+void DuplicateButton::ProcessClick (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if ( ! rpDescriptor)
+ return;
+
+ mrSlideSorter.GetView().SetPageUnderMouse(model::SharedPageDescriptor(),false);
+
+ // When the page under the button is not selected then set the
+ // selection to just this page.
+ if ( ! rpDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ {
+ mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
+ mrSlideSorter.GetController().GetPageSelector().SelectPage(rpDescriptor);
+ }
+ // Duplicate the selected pages. Insert the new pages right
+ // after the current selection and select them
+ if (mrSlideSorter.GetViewShell() != NULL
+ && mrSlideSorter.GetViewShell()->GetDispatcher() != NULL)
+ {
+ mrSlideSorter.GetViewShell()->GetDispatcher()->Execute(
+ SID_DUPLICATE_PAGE,
+ SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
+ }
+}
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsFontProvider.cxx b/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
index de4a42483a37..f81035e50be1 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
+++ b/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
@@ -112,7 +112,7 @@ FontProvider::SharedFontPointer FontProvider::GetFont (const OutputDevice& rDevi
{
// Initialize the font from the application style settings.
maFont.reset(new Font (Application::GetSettings().GetStyleSettings().GetAppFont()));
- maFont->SetTransparent(TRUE);
+ maFont->SetTransparent(sal_True);
maFont->SetWeight(WEIGHT_NORMAL);
// Transform the point size to pixel size.
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
new file mode 100644
index 000000000000..c62c32e7d841
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
@@ -0,0 +1,265 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlsFramePainter.hxx"
+#include <vcl/outdev.hxx>
+#include <vcl/bmpacc.hxx>
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+FramePainter::FramePainter (const BitmapEx& rShadowBitmap)
+ : maTopLeft(rShadowBitmap,-1,-1),
+ maTop(rShadowBitmap,0,-1),
+ maTopRight(rShadowBitmap,+1,-1),
+ maLeft(rShadowBitmap,-1,0),
+ maRight(rShadowBitmap,+1,0),
+ maBottomLeft(rShadowBitmap,-1,+1),
+ maBottom(rShadowBitmap,0,+1),
+ maBottomRight(rShadowBitmap,+1,+1),
+ maCenter(rShadowBitmap,0,0),
+ mbIsValid(false)
+{
+ if (rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height()
+ && (rShadowBitmap.GetSizePixel().Width()-1)%2 == 0
+ && ((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1)
+ {
+ mbIsValid = true;
+ }
+ else
+ {
+ OSL_ASSERT(rShadowBitmap.GetSizePixel().Width() == rShadowBitmap.GetSizePixel().Height());
+ OSL_ASSERT((rShadowBitmap.GetSizePixel().Width()-1)%2 == 0);
+ OSL_ASSERT(((rShadowBitmap.GetSizePixel().Width()-1)/2)%2 == 1);
+ }
+}
+
+
+
+
+FramePainter::~FramePainter (void)
+{
+}
+
+
+
+
+void FramePainter::PaintFrame (
+ OutputDevice& rDevice,
+ const Rectangle aBox) const
+{
+ if ( ! mbIsValid)
+ return;
+
+ // Paint the shadow.
+ maTopLeft.PaintCorner(rDevice, aBox.TopLeft());
+ maTopRight.PaintCorner(rDevice, aBox.TopRight());
+ maBottomLeft.PaintCorner(rDevice, aBox.BottomLeft());
+ maBottomRight.PaintCorner(rDevice, aBox.BottomRight());
+ maLeft.PaintSide(rDevice, aBox.TopLeft(), aBox.BottomLeft(), maTopLeft, maBottomLeft);
+ maRight.PaintSide(rDevice, aBox.TopRight(), aBox.BottomRight(), maTopRight, maBottomRight);
+ maTop.PaintSide(rDevice, aBox.TopLeft(), aBox.TopRight(), maTopLeft, maTopRight);
+ maBottom.PaintSide(rDevice, aBox.BottomLeft(), aBox.BottomRight(), maBottomLeft, maBottomRight);
+ maCenter.PaintCenter(rDevice,aBox);
+}
+
+
+
+
+void FramePainter::AdaptColor (
+ const Color aNewColor,
+ const bool bEraseCenter)
+{
+ // Get the source color.
+ if (maCenter.maBitmap.IsEmpty())
+ return;
+ BitmapReadAccess* pReadAccess = maCenter.maBitmap.GetBitmap().AcquireReadAccess();
+ if (pReadAccess == NULL)
+ return;
+ const Color aSourceColor = pReadAccess->GetColor(0,0);
+ maCenter.maBitmap.GetBitmap().ReleaseAccess(pReadAccess);
+
+ // Erase the center bitmap.
+ if (bEraseCenter)
+ maCenter.maBitmap.SetEmpty();
+
+ // Replace the color in all bitmaps.
+ maTopLeft.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maTop.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maTopRight.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maLeft.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maCenter.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maRight.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maBottomLeft.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maBottom.maBitmap.Replace(aSourceColor, aNewColor, 0);
+ maBottomRight.maBitmap.Replace(aSourceColor, aNewColor, 0);
+}
+
+
+
+
+//===== FramePainter::OffsetBitmap ============================================
+
+FramePainter::OffsetBitmap::OffsetBitmap (
+ const BitmapEx& rBitmap,
+ const sal_Int32 nHorizontalPosition,
+ const sal_Int32 nVerticalPosition)
+ : maBitmap(),
+ maOffset()
+{
+ OSL_ASSERT(nHorizontalPosition>=-1 && nHorizontalPosition<=+1);
+ OSL_ASSERT(nVerticalPosition>=-1 && nVerticalPosition<=+1);
+
+ const sal_Int32 nS (1);
+ const sal_Int32 nC (::std::max<sal_Int32>(0,(rBitmap.GetSizePixel().Width()-nS)/2));
+ const sal_Int32 nO (nC/2);
+
+ const Point aOrigin(
+ nHorizontalPosition<0 ? 0 : (nHorizontalPosition == 0 ? nC : nC+nS),
+ nVerticalPosition<0 ? 0 : (nVerticalPosition == 0 ? nC : nC+nS));
+ const Size aSize(
+ nHorizontalPosition==0 ? nS : nC,
+ nVerticalPosition==0 ? nS : nC);
+ maBitmap = BitmapEx(rBitmap, aOrigin, aSize);
+ if (maBitmap.IsEmpty())
+ return;
+ maOffset = Point(
+ nHorizontalPosition<0 ? -nO : nHorizontalPosition>0 ? -nO : 0,
+ nVerticalPosition<0 ? -nO : nVerticalPosition>0 ? -nO : 0);
+
+ // Enlarge the side bitmaps so that painting the frame requires less
+ // paint calls.
+ const sal_Int32 nSideBitmapSize (64);
+ if (nHorizontalPosition == 0 && nVerticalPosition == 0)
+ {
+ maBitmap.Scale(Size(nSideBitmapSize,nSideBitmapSize), BMP_SCALE_FAST);
+ }
+ else if (nHorizontalPosition == 0)
+ {
+ maBitmap.Scale(Size(nSideBitmapSize,aSize.Height()), BMP_SCALE_FAST);
+ }
+ else if (nVerticalPosition == 0)
+ {
+ maBitmap.Scale(Size(maBitmap.GetSizePixel().Width(), nSideBitmapSize), BMP_SCALE_FAST);
+ }
+}
+
+
+
+
+void FramePainter::OffsetBitmap::PaintCorner (
+ OutputDevice& rDevice,
+ const Point& rAnchor) const
+{
+ if ( ! maBitmap.IsEmpty())
+ rDevice.DrawBitmapEx(rAnchor+maOffset, maBitmap);
+}
+
+
+
+
+void FramePainter::OffsetBitmap::PaintSide (
+ OutputDevice& rDevice,
+ const Point& rAnchor1,
+ const Point& rAnchor2,
+ const OffsetBitmap& rCornerBitmap1,
+ const OffsetBitmap& rCornerBitmap2) const
+{
+ if (maBitmap.IsEmpty())
+ return;
+
+ const Size aBitmapSize (maBitmap.GetSizePixel());
+ if (rAnchor1.Y() == rAnchor2.Y())
+ {
+ // Side is horizontal.
+ const sal_Int32 nY (rAnchor1.Y() + maOffset.Y());
+ const sal_Int32 nLeft (
+ rAnchor1.X()
+ + rCornerBitmap1.maBitmap.GetSizePixel().Width()
+ + rCornerBitmap1.maOffset.X());
+ const sal_Int32 nRight (
+ rAnchor2.X()
+ + rCornerBitmap2.maOffset.X()\
+ - 1);
+ for (sal_Int32 nX=nLeft; nX<=nRight; nX+=aBitmapSize.Width())
+ {
+ rDevice.DrawBitmapEx(
+ Point(nX,nY),
+ Size(std::min(aBitmapSize.Width(),static_cast<long>(nRight-nX+1)),aBitmapSize.Height()),
+ maBitmap);
+ }
+ }
+ else if (rAnchor1.X() == rAnchor2.X())
+ {
+ // Side is vertical.
+ const sal_Int32 nX (rAnchor1.X() + maOffset.X());
+ const sal_Int32 nTop (
+ rAnchor1.Y()
+ + rCornerBitmap1.maBitmap.GetSizePixel().Height()
+ + rCornerBitmap1.maOffset.Y());
+ const sal_Int32 nBottom (
+ rAnchor2.Y()
+ + rCornerBitmap2.maOffset.Y()
+ - 1);
+ for (sal_Int32 nY=nTop; nY<=nBottom; nY+=aBitmapSize.Height())
+ {
+ rDevice.DrawBitmapEx(
+ Point(nX,nY),
+ Size(aBitmapSize.Width(), std::min(aBitmapSize.Height(), static_cast<long>(nBottom-nY+1))),
+ maBitmap);
+ }
+ }
+ else
+ {
+ // Diagonal sides indicatee an error.
+ OSL_ASSERT(false);
+ }
+}
+
+
+
+
+void FramePainter::OffsetBitmap::PaintCenter (
+ OutputDevice& rDevice,
+ const Rectangle& rBox) const
+{
+ const Size aBitmapSize (maBitmap.GetSizePixel());
+ for (sal_Int32 nY=rBox.Top(); nY<=rBox.Bottom(); nY+=aBitmapSize.Height())
+ for (sal_Int32 nX=rBox.Left(); nX<=rBox.Right(); nX+=aBitmapSize.Width())
+ rDevice.DrawBitmapEx(
+ Point(nX,nY),
+ Size(
+ ::std::min(aBitmapSize.Width(), rBox.Right()-nX+1),
+ std::min(aBitmapSize.Height(), rBox.Bottom()-nY+1)),
+ maBitmap);
+}
+
+
+
+} } } // end of namespace sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.hxx b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx
new file mode 100644
index 000000000000..96ccf51c6323
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_FRAME_PAINTER_HXX
+#define SD_SLIDESORTER_VIEW_FRAME_PAINTER_HXX
+
+#include <vcl/bitmapex.hxx>
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+class FramePainter
+{
+public:
+ FramePainter (const BitmapEx& rBitmap);
+ ~FramePainter (void);
+
+ /** Paint a border around the given box by using a set of bitmaps for
+ the corners and sides.
+ */
+ void PaintFrame (OutputDevice&rDevice, const Rectangle aBox) const;
+
+ /** Special functionality that takes the color from the center
+ bitmap and replaces that color in all bitmaps by the given new
+ color. Alpha values are not modified.
+ @param bClearCenterBitmap
+ When <TRUE/> then the center bitmap is erased.
+ */
+ void AdaptColor (const Color aNewColor, const bool bClearCenterBitmap);
+
+private:
+ /** Bitmap with offset that is used when the bitmap is painted. The bitmap
+ */
+ class OffsetBitmap {
+ public:
+ BitmapEx maBitmap;
+ Point maOffset;
+
+ /** Create one of the eight shadow bitmaps from one that combines
+ them all. This larger bitmap is expected to have dimension NxN
+ with N=1+2*M. Of this larger bitmap there are created four
+ corner bitmaps of size 2*M x 2*M and four side bitmaps of sizes
+ 1xM (top and bottom) and Mx1 (left and right). The corner
+ bitmaps have each one quadrant of size MxM that is painted under
+ the interior of the frame.
+ @param rBitmap
+ The larger bitmap of which the eight shadow bitmaps are cut
+ out from.
+ @param nHorizontalPosition
+ Valid values are -1 (left), 0 (center), and +1 (right).
+ @param nVerticalPosition
+ Valid values are -1 (top), 0 (center), and +1 (bottom).
+ */
+ OffsetBitmap (
+ const BitmapEx& rBitmap,
+ const sal_Int32 nHorizontalPosition,
+ const sal_Int32 nVerticalPosition);
+
+ /** Use the given device to paint the bitmap at the location that is
+ the sum of the given anchor and the internal offset.
+ */
+ void PaintCorner (OutputDevice& rDevice, const Point& rAnchor) const;
+
+ /** Use the given device to paint the bitmap stretched between the
+ two given locations. Offsets of the adjacent corner bitmaps and
+ the offset of the side bitmap are used to determine the area
+ that is to be filled with the side bitmap.
+ */
+ void PaintSide (
+ OutputDevice& rDevice,
+ const Point& rAnchor1,
+ const Point& rAnchor2,
+ const OffsetBitmap& rCornerBitmap1,
+ const OffsetBitmap& rCornerBitmap2) const;
+
+ /** Fill the given rectangle with the bitmap.
+ */
+ void PaintCenter (
+ OutputDevice& rDevice,
+ const Rectangle& rBox) const;
+ };
+ OffsetBitmap maTopLeft;
+ OffsetBitmap maTop;
+ OffsetBitmap maTopRight;
+ OffsetBitmap maLeft;
+ OffsetBitmap maRight;
+ OffsetBitmap maBottomLeft;
+ OffsetBitmap maBottom;
+ OffsetBitmap maBottomRight;
+ OffsetBitmap maCenter;
+ bool mbIsValid;
+};
+
+
+} } } // end of namespace sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
new file mode 100644
index 000000000000..5f322e65141d
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
@@ -0,0 +1,537 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsInsertAnimator.hxx"
+#include "controller/SlideSorterController.hxx"
+#include "controller/SlsAnimationFunction.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageEnumerationProvider.hxx"
+
+#include <set>
+#include <boost/bind.hpp>
+#include <boost/enable_shared_from_this.hpp>
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+
+class PageObjectRun;
+
+class AnimatorAccess
+{
+public:
+ virtual void AddRun (const ::boost::shared_ptr<PageObjectRun> pRun) = 0;
+ virtual void RemoveRun (const ::boost::shared_ptr<PageObjectRun> pRun) = 0;
+ virtual model::SlideSorterModel& GetModel (void) const = 0;
+ virtual view::SlideSorterView& GetView (void) const = 0;
+ virtual ::boost::shared_ptr<controller::Animator> GetAnimator (void) = 0;
+ virtual SharedSdWindow GetContentWindow (void) = 0;
+};
+
+
+/** Controller of the position offsets of all page objects in one row or one
+ column.
+*/
+class PageObjectRun : public ::boost::enable_shared_from_this<PageObjectRun>
+{
+public:
+ PageObjectRun (
+ AnimatorAccess& rAnimatorAccess,
+ const sal_Int32 nRunIndex,
+ const sal_Int32 nStartIndex,
+ const sal_Int32 nEndIndex);
+ ~PageObjectRun (void);
+
+ void operator () (const double nTime);
+
+ void UpdateOffsets(
+ const InsertPosition& rInsertPosition,
+ const view::Layouter& GetLayouter);
+ void ResetOffsets (const controller::Animator::AnimationMode eMode);
+
+ /// Index of the row or column that this run represents.
+ sal_Int32 mnRunIndex;
+ /// The index at which to make place for the insertion indicator (-1 for
+ /// no indicator).
+ sal_Int32 mnLocalInsertIndex;
+ /// Index of the first page in the run.
+ sal_Int32 mnStartIndex;
+ /// Index of the last page in the run.
+ sal_Int32 mnEndIndex;
+ /// Offset of each item in the run at the start of the current animation.
+ ::std::vector<Point> maStartOffset;
+ /// Target offset of each item in the run at the end of the current animation.
+ ::std::vector<Point> maEndOffset;
+ /// Time at which the current animation started.
+ double mnStartTime;
+
+ class Comparator
+ {
+ public: bool operator() (
+ const ::boost::shared_ptr<PageObjectRun>& rpRunA,
+ const ::boost::shared_ptr<PageObjectRun>& rpRunB) const
+ {
+ return rpRunA->mnRunIndex < rpRunB->mnRunIndex;
+ }
+ };
+private:
+ controller::Animator::AnimationId mnAnimationId;
+ AnimatorAccess& mrAnimatorAccess;
+ ::boost::function<double(double)> maAccelerationFunction;
+
+ Rectangle GetInnerBoundingBox (
+ const view::Layouter& rLayouter,
+ const sal_Int32 nIndex) const;
+ void RestartAnimation (void);
+};
+typedef ::boost::shared_ptr<PageObjectRun> SharedPageObjectRun;
+
+
+Point Blend (const Point& rPointA, const Point& rPointB, const double nT)
+{
+ return Point(
+ sal_Int32(rPointA.X() * (1-nT) + rPointB.X() * nT),
+ sal_Int32(rPointA.Y() * (1-nT) + rPointB.Y() * nT));
+}
+
+} // end of anonymous namespace
+
+
+
+class InsertAnimator::Implementation : public AnimatorAccess
+{
+public:
+ Implementation (SlideSorter& rSlideSorter);
+ virtual ~Implementation (void);
+
+ void SetInsertPosition (
+ const InsertPosition& rInsertPosition,
+ const controller::Animator::AnimationMode eAnimationMode);
+
+ virtual void AddRun (const ::boost::shared_ptr<PageObjectRun> pRun);
+ virtual void RemoveRun (const ::boost::shared_ptr<PageObjectRun> pRun);
+
+ virtual model::SlideSorterModel& GetModel (void) const { return mrModel; }
+ virtual view::SlideSorterView& GetView (void) const { return mrView; }
+ virtual ::boost::shared_ptr<controller::Animator> GetAnimator (void) { return mpAnimator; }
+ virtual SharedSdWindow GetContentWindow (void) { return mrSlideSorter.GetContentWindow(); }
+
+private:
+ model::SlideSorterModel& mrModel;
+ view::SlideSorterView& mrView;
+ SlideSorter& mrSlideSorter;
+ ::boost::shared_ptr<controller::Animator> mpAnimator;
+ typedef ::std::set<SharedPageObjectRun, PageObjectRun::Comparator> RunContainer;
+ RunContainer maRuns;
+ InsertPosition maInsertPosition;
+
+ void StopAnimation (void);
+ SharedPageObjectRun GetRun (
+ view::Layouter& rLayouter,
+ const InsertPosition& rInsertPosition,
+ const bool bCreate = true);
+ RunContainer::iterator FindRun (const sal_Int32 nRunIndex) const;
+};
+
+
+
+
+
+//===== InsertAnimator ========================================================
+
+InsertAnimator::InsertAnimator (SlideSorter& rSlideSorter)
+ : mpImplementation(new Implementation(rSlideSorter))
+{
+}
+
+
+
+
+void InsertAnimator::SetInsertPosition (const InsertPosition& rInsertPosition)
+{
+ mpImplementation->SetInsertPosition(rInsertPosition, controller::Animator::AM_Animated);
+}
+
+
+
+
+void InsertAnimator::Reset (const controller::Animator::AnimationMode eMode)
+{
+ mpImplementation->SetInsertPosition(InsertPosition(), eMode);
+}
+
+
+
+
+//===== InsertAnimator::Implementation ========================================
+
+InsertAnimator::Implementation::Implementation (SlideSorter& rSlideSorter)
+ : mrModel(rSlideSorter.GetModel()),
+ mrView(rSlideSorter.GetView()),
+ mrSlideSorter(rSlideSorter),
+ mpAnimator(rSlideSorter.GetController().GetAnimator()),
+ maRuns(),
+ maInsertPosition()
+{
+}
+
+
+
+
+InsertAnimator::Implementation::~Implementation (void)
+{
+ SetInsertPosition(InsertPosition(), controller::Animator::AM_Immediate);
+}
+
+
+
+
+void InsertAnimator::Implementation::SetInsertPosition (
+ const InsertPosition& rInsertPosition,
+ const controller::Animator::AnimationMode eMode)
+{
+ if (maInsertPosition == rInsertPosition)
+ return;
+
+ SharedPageObjectRun pOldRun (GetRun(mrView.GetLayouter(), maInsertPosition));
+ SharedPageObjectRun pCurrentRun (GetRun(mrView.GetLayouter(), rInsertPosition));
+ maInsertPosition = rInsertPosition;
+
+ // When the new insert position is in a different run then move the page
+ // objects in the old run to their default positions.
+ if (pOldRun != pCurrentRun)
+ {
+ if (pOldRun)
+ pOldRun->ResetOffsets(eMode);
+ }
+
+ if (pCurrentRun)
+ {
+ pCurrentRun->UpdateOffsets(rInsertPosition, mrView.GetLayouter());
+ }
+}
+
+
+
+
+SharedPageObjectRun InsertAnimator::Implementation::GetRun (
+ view::Layouter& rLayouter,
+ const InsertPosition& rInsertPosition,
+ const bool bCreate)
+{
+ const sal_Int32 nRow (rInsertPosition.GetRow());
+ if (nRow < 0)
+ return SharedPageObjectRun();
+
+ RunContainer::iterator iRun (maRuns.end());
+ if (rLayouter.GetColumnCount() == 1)
+ {
+ // There is only one run that contains all slides.
+ if (maRuns.empty() && bCreate)
+ maRuns.insert(SharedPageObjectRun(new PageObjectRun(
+ *this,
+ 0,
+ 0,
+ mrModel.GetPageCount()-1)));
+ iRun = maRuns.begin();
+ }
+ else
+ {
+ iRun = FindRun(nRow);
+ if (iRun == maRuns.end() && bCreate)
+ {
+ // Create a new run.
+ const sal_Int32 nStartIndex (rLayouter.GetIndex(nRow, 0));
+ const sal_Int32 nEndIndex (rLayouter.GetIndex(nRow, rLayouter.GetColumnCount()-1));
+ if (nStartIndex <= nEndIndex)
+ {
+ iRun = maRuns.insert(SharedPageObjectRun(new PageObjectRun(
+ *this,
+ nRow,
+ nStartIndex,
+ nEndIndex))).first;
+ OSL_ASSERT(iRun != maRuns.end());
+ }
+ }
+ }
+
+ if (iRun != maRuns.end())
+ return *iRun;
+ else
+ return SharedPageObjectRun();
+}
+
+
+
+
+InsertAnimator::Implementation::RunContainer::iterator
+ InsertAnimator::Implementation::FindRun (const sal_Int32 nRunIndex) const
+{
+ return std::find_if(
+ maRuns.begin(),
+ maRuns.end(),
+ ::boost::bind(
+ ::std::equal_to<sal_Int32>(),
+ ::boost::bind(&PageObjectRun::mnRunIndex, _1),
+ nRunIndex));
+}
+
+
+
+
+void InsertAnimator::Implementation::AddRun (const ::boost::shared_ptr<PageObjectRun> pRun)
+{
+ if (pRun)
+ {
+ maRuns.insert(pRun);
+ }
+ else
+ {
+ OSL_ASSERT(pRun);
+ }
+}
+
+
+
+
+
+void InsertAnimator::Implementation::RemoveRun (const ::boost::shared_ptr<PageObjectRun> pRun)
+{
+ if (pRun)
+ {
+ // Do not remove runs that show the space for the insertion indicator.
+ if (pRun->mnLocalInsertIndex == -1)
+ {
+ InsertAnimator::Implementation::RunContainer::iterator iRun (FindRun(pRun->mnRunIndex));
+ if (iRun != maRuns.end())
+ {
+ OSL_ASSERT(*iRun == pRun);
+ maRuns.erase(iRun);
+ }
+ }
+ }
+ else
+ {
+ OSL_ASSERT(pRun);
+ }
+}
+
+
+
+
+
+//===== PageObjectRun =========================================================
+
+PageObjectRun::PageObjectRun (
+ AnimatorAccess& rAnimatorAccess,
+ const sal_Int32 nRunIndex,
+ const sal_Int32 nStartIndex,
+ const sal_Int32 nEndIndex)
+ : mnRunIndex(nRunIndex),
+ mnLocalInsertIndex(-1),
+ mnStartIndex(nStartIndex),
+ mnEndIndex(nEndIndex),
+ maStartOffset(),
+ maEndOffset(),
+ mnStartTime(-1),
+ mnAnimationId(controller::Animator::NotAnAnimationId),
+ mrAnimatorAccess(rAnimatorAccess),
+ maAccelerationFunction(
+ controller::AnimationParametricFunction(
+ controller::AnimationBezierFunction (0.1,0.7)))
+{
+ maStartOffset.resize(nEndIndex - nStartIndex + 1);
+ maEndOffset.resize(nEndIndex - nStartIndex + 1);
+}
+
+
+
+
+PageObjectRun::~PageObjectRun (void)
+{
+}
+
+
+
+
+Rectangle PageObjectRun::GetInnerBoundingBox (
+ const view::Layouter& rLayouter,
+ const sal_Int32 nIndex) const
+{
+ model::SharedPageDescriptor pDescriptor (
+ mrAnimatorAccess.GetModel().GetPageDescriptor(nIndex));
+ if (pDescriptor)
+ if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ return rLayouter.GetPageObjectLayouter()->GetBoundingBox(
+ pDescriptor,
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem);
+ else
+ return rLayouter.GetPageObjectLayouter()->GetBoundingBox(
+ pDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem);
+ else
+ return Rectangle();
+}
+
+
+
+
+void PageObjectRun::UpdateOffsets(
+ const InsertPosition& rInsertPosition,
+ const view::Layouter& rLayouter)
+{
+ const bool bIsVertical (rLayouter.GetColumnCount()==1);
+ const sal_Int32 nLocalInsertIndex(bIsVertical
+ ? rInsertPosition.GetRow()
+ : rInsertPosition.GetColumn());
+ if (nLocalInsertIndex != mnLocalInsertIndex)
+ {
+ mnLocalInsertIndex = nLocalInsertIndex;
+
+ model::SlideSorterModel& rModel (mrAnimatorAccess.GetModel());
+ const sal_Int32 nRunLength (mnEndIndex - mnStartIndex + 1);
+ for (sal_Int32 nIndex=0; nIndex<nRunLength; ++nIndex)
+ {
+ model::SharedPageDescriptor pDescriptor(rModel.GetPageDescriptor(nIndex+mnStartIndex));
+ if (pDescriptor)
+ maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset();
+ maEndOffset[nIndex] = nIndex < mnLocalInsertIndex
+ ? rInsertPosition.GetLeadingOffset()
+ : rInsertPosition.GetTrailingOffset();
+ if (bIsVertical)
+ maEndOffset[nIndex].X() = 0;
+ else
+ maEndOffset[nIndex].Y() = 0;
+ }
+ RestartAnimation();
+ }
+}
+
+
+
+
+void PageObjectRun::ResetOffsets (const controller::Animator::AnimationMode eMode)
+{
+ mnLocalInsertIndex = -1;
+ const sal_Int32 nRunLength (mnEndIndex - mnStartIndex + 1);
+ model::SlideSorterModel& rModel (mrAnimatorAccess.GetModel());
+ view::SlideSorterView& rView (mrAnimatorAccess.GetView());
+ for (sal_Int32 nIndex=0; nIndex<nRunLength; ++nIndex)
+ {
+ model::SharedPageDescriptor pDescriptor(rModel.GetPageDescriptor(nIndex+mnStartIndex));
+ if (pDescriptor)
+ {
+ if (eMode == controller::Animator::AM_Animated)
+ maStartOffset[nIndex] = pDescriptor->GetVisualState().GetLocationOffset();
+ else
+ {
+ const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox());
+ pDescriptor->GetVisualState().SetLocationOffset(Point(0,0));
+ rView.RequestRepaint(aOldBoundingBox);
+ rView.RequestRepaint(pDescriptor);
+ }
+ }
+ maEndOffset[nIndex] = Point(0,0);
+ }
+ if (eMode == controller::Animator::AM_Animated)
+ RestartAnimation();
+ else
+ mrAnimatorAccess.RemoveRun(shared_from_this());
+}
+
+
+
+
+void PageObjectRun::RestartAnimation (void)
+{
+ // Stop the current animation.
+ if (mnAnimationId != controller::Animator::NotAnAnimationId)
+ {
+ mrAnimatorAccess.GetAnimator()->RemoveAnimation(mnAnimationId);
+ }
+
+ // Restart the animation.
+ mrAnimatorAccess.AddRun(shared_from_this());
+ mnAnimationId = mrAnimatorAccess.GetAnimator()->AddAnimation(
+ ::boost::ref(*this),
+ 0,
+ 300,
+ ::boost::bind(
+ &AnimatorAccess::RemoveRun,
+ ::boost::ref(mrAnimatorAccess),
+ shared_from_this()));
+}
+
+
+
+
+void PageObjectRun::operator () (const double nGlobalTime)
+{
+ if (mnStartTime < 0)
+ mnStartTime = nGlobalTime;
+
+ double nLocalTime (nGlobalTime - mnStartTime);
+ if (nLocalTime > 1.0)
+ nLocalTime = 1.0;
+ nLocalTime = maAccelerationFunction(nLocalTime);
+
+ model::SlideSorterModel& rModel (mrAnimatorAccess.GetModel());
+ view::SlideSorterView& rView (mrAnimatorAccess.GetView());
+ for (sal_Int32 nIndex=mnStartIndex; nIndex<=mnEndIndex; ++nIndex)
+ {
+ model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if ( ! pDescriptor)
+ continue;
+ const Rectangle aOldBoundingBox (pDescriptor->GetBoundingBox());
+ pDescriptor->GetVisualState().SetLocationOffset(
+ Blend(
+ maStartOffset[nIndex-mnStartIndex],
+ maEndOffset[nIndex-mnStartIndex],
+ nLocalTime));
+
+ // Request a repaint of the old and new bounding box (which largely overlap.)
+ rView.RequestRepaint(aOldBoundingBox);
+ rView.RequestRepaint(pDescriptor);
+ }
+
+ // Call Flush to make
+ // a) animations a bit more smooth and
+ // b) on Mac without the Flush a Reset of the page locations is not properly
+ // visualized when the mouse leaves the window during drag-and-drop.
+ mrAnimatorAccess.GetContentWindow()->Flush();
+}
+
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
new file mode 100644
index 000000000000..abaa5a43b215
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -0,0 +1,448 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsInsertionIndicatorOverlay.hxx"
+
+#include "SlideSorter.hxx"
+#include "model/SlsPageEnumeration.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include "cache/SlsPageCache.hxx"
+#include "SlsFramePainter.hxx"
+#include "SlsLayeredDevice.hxx"
+#include "DrawDocShell.hxx"
+#include "drawdoc.hxx"
+#include "sdpage.hxx"
+#include "sdmod.hxx"
+
+#include <vcl/virdev.hxx>
+#include <basegfx/range/b2drectangle.hxx>
+#include <basegfx/tools/canvastools.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+
+
+namespace {
+
+
+static const double gnPreviewOffsetScale = 1.0 / 8.0;
+
+
+
+Rectangle GrowRectangle (const Rectangle& rBox, const sal_Int32 nOffset)
+{
+ return Rectangle (
+ rBox.Left() - nOffset,
+ rBox.Top() - nOffset,
+ rBox.Right() + nOffset,
+ rBox.Bottom() + nOffset);
+}
+
+sal_Int32 RoundToInt (const double nValue) { return sal_Int32(::rtl::math::round(nValue)); }
+
+} // end of anonymous namespace
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+
+//===== InsertionIndicatorOverlay ===========================================
+
+const static sal_Int32 gnShadowBorder = 3;
+const static sal_Int32 gnSuperScaleFactor = 1;
+
+InsertionIndicatorOverlay::InsertionIndicatorOverlay (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ mbIsVisible(false),
+ mnLayerIndex(2),
+ mpLayerInvalidator(),
+ maLocation(),
+ maIcon(),
+ maIconOffset(),
+ mpShadowPainter(
+ new FramePainter(mrSlideSorter.GetTheme()->GetIcon(Theme::Icon_RawInsertShadow)))
+{
+}
+
+
+
+
+InsertionIndicatorOverlay::~InsertionIndicatorOverlay (void)
+{
+ Hide();
+}
+
+
+
+
+void InsertionIndicatorOverlay::Create (const controller::Transferable* pTransferable)
+{
+ if (pTransferable == NULL)
+ return;
+
+ sal_Int32 nSelectionCount (0);
+ if (pTransferable->HasPageBookmarks())
+ nSelectionCount = pTransferable->GetPageBookmarks().Count();
+ else
+ {
+ DrawDocShell* pDataDocShell = dynamic_cast<DrawDocShell*>(&pTransferable->GetDocShell());
+ if (pDataDocShell != NULL)
+ {
+ SdDrawDocument* pDataDocument = pDataDocShell->GetDoc();
+ if (pDataDocument != NULL)
+ nSelectionCount = pDataDocument->GetSdPageCount(PK_STANDARD);
+ }
+ }
+ Create(pTransferable->GetRepresentatives(), nSelectionCount);
+}
+
+
+
+
+void InsertionIndicatorOverlay::Create (
+ const ::std::vector<controller::Transferable::Representative>& rRepresentatives,
+ const sal_Int32 nSelectionCount)
+{
+ view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter());
+ ::boost::shared_ptr<view::PageObjectLayouter> pPageObjectLayouter (
+ rLayouter.GetPageObjectLayouter());
+ ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme());
+ const Size aOriginalPreviewSize (pPageObjectLayouter->GetSize(
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::WindowCoordinateSystem));
+
+ const double nPreviewScale (0.5);
+ const Size aPreviewSize (
+ RoundToInt(aOriginalPreviewSize.Width()*nPreviewScale),
+ RoundToInt(aOriginalPreviewSize.Height()*nPreviewScale));
+ const sal_Int32 nOffset (
+ RoundToInt(Min(aPreviewSize.Width(),aPreviewSize.Height()) * gnPreviewOffsetScale));
+
+ // Determine size and offset depending on the number of previews.
+ sal_Int32 nCount (rRepresentatives.size());
+ if (nCount > 0)
+ --nCount;
+ Size aIconSize(
+ aPreviewSize.Width() + 2 * gnShadowBorder + nCount*nOffset,
+ aPreviewSize.Height() + 2 * gnShadowBorder + nCount*nOffset);
+ maIconOffset = Point(gnShadowBorder, gnShadowBorder);
+
+ // Create virtual devices for bitmap and mask whose bitmaps later be
+ // combined to form the BitmapEx of the icon.
+ VirtualDevice aContent (
+ *mrSlideSorter.GetContentWindow(),
+ 0,
+ 0);
+ aContent.SetOutputSizePixel(aIconSize);
+
+ aContent.SetFillColor();
+ aContent.SetLineColor(pTheme->GetColor(Theme::Color_PreviewBorder));
+ const Point aOffset = PaintRepresentatives(aContent, aPreviewSize, nOffset, rRepresentatives);
+
+ PaintPageCount(aContent, nSelectionCount, aPreviewSize, aOffset);
+
+ maIcon = aContent.GetBitmapEx(Point(0,0), aIconSize);
+ maIcon.Scale(aIconSize);
+}
+
+
+
+
+void InsertionIndicatorOverlay::SelectRepresentatives (
+ model::PageEnumeration& rSelection,
+ ::std::vector<model::SharedPageDescriptor>& rDescriptors) const
+{
+ sal_Int32 nCount (0);
+ while (rSelection.HasMoreElements())
+ {
+ if (nCount++ >= 3)
+ break;
+ rDescriptors.push_back(rSelection.GetNextElement());
+ }
+}
+
+
+
+
+Point InsertionIndicatorOverlay::PaintRepresentatives (
+ OutputDevice& rContent,
+ const Size aPreviewSize,
+ const sal_Int32 nOffset,
+ const ::std::vector<controller::Transferable::Representative>& rRepresentatives) const
+{
+ const Point aOffset (0,rRepresentatives.size()==1 ? -nOffset : 0);
+
+ // Paint the pages.
+ Point aPageOffset (0,0);
+ double nTransparency (0);
+ const BitmapEx aExclusionOverlay (mrSlideSorter.GetTheme()->GetIcon(Theme::Icon_HideSlideOverlay));
+ for (sal_Int32 nIndex=2; nIndex>=0; --nIndex)
+ {
+ if (rRepresentatives.size() <= sal_uInt32(nIndex))
+ continue;
+ switch(nIndex)
+ {
+ case 0 :
+ aPageOffset = Point(0, nOffset);
+ nTransparency = 0.85;
+ break;
+ case 1:
+ aPageOffset = Point(nOffset, 0);
+ nTransparency = 0.75;
+ break;
+ case 2:
+ aPageOffset = Point(2*nOffset, 2*nOffset);
+ nTransparency = 0.65;
+ break;
+ }
+ aPageOffset += aOffset;
+ aPageOffset.X() += gnShadowBorder;
+ aPageOffset.Y() += gnShadowBorder;
+
+ // Paint the preview.
+ Bitmap aPreview (rRepresentatives[nIndex].maBitmap);
+ const Size aSuperSampleSize(
+ aPreviewSize.Width()*gnSuperScaleFactor,
+ aPreviewSize.Height()*gnSuperScaleFactor);
+ aPreview.Scale(aPreviewSize, BMP_SCALE_INTERPOLATE);
+ rContent.DrawBitmapEx(aPageOffset, aPreview);
+
+ // When the page is marked as excluded from the slide show then
+ // paint an overlay that visualizes this.
+ if (rRepresentatives[nIndex].mbIsExcluded)
+ {
+ const Region aSavedClipRegion (rContent.GetClipRegion());
+ rContent.IntersectClipRegion(Rectangle(aPageOffset, aPreviewSize));
+ // Paint bitmap tiled over the preview to mark it as excluded.
+ const sal_Int32 nIconWidth (aExclusionOverlay.GetSizePixel().Width());
+ const sal_Int32 nIconHeight (aExclusionOverlay.GetSizePixel().Height());
+ if (nIconWidth>0 && nIconHeight>0)
+ {
+ for (sal_Int32 nX=0; nX<aPreviewSize.Width(); nX+=nIconWidth)
+ for (sal_Int32 nY=0; nY<aPreviewSize.Height(); nY+=nIconHeight)
+ rContent.DrawBitmapEx(Point(nX,nY)+aPageOffset, aExclusionOverlay);
+ }
+ rContent.SetClipRegion(aSavedClipRegion);
+ }
+
+ // Tone down the bitmap. The further back the darker it becomes.
+ Rectangle aBox (
+ aPageOffset.X(),
+ aPageOffset.Y(),
+ aPageOffset.X()+aPreviewSize.Width()-1,
+ aPageOffset.Y()+aPreviewSize.Height()-1);
+ rContent.SetFillColor(COL_BLACK);
+ rContent.SetLineColor();
+ rContent.DrawTransparent(
+ ::basegfx::B2DPolyPolygon(::basegfx::tools::createPolygonFromRect(
+ ::basegfx::B2DRectangle(aBox.Left(), aBox.Top(), aBox.Right()+1, aBox.Bottom()+1),
+ 0,
+ 0)),
+ nTransparency);
+
+ // Draw border around preview.
+ Rectangle aBorderBox (GrowRectangle(aBox, 1));
+ rContent.SetLineColor(COL_GRAY);
+ rContent.SetFillColor();
+ rContent.DrawRect(aBorderBox);
+
+ // Draw shadow around preview.
+ mpShadowPainter->PaintFrame(rContent, aBorderBox);
+ }
+
+ return aPageOffset;
+}
+
+
+
+
+void InsertionIndicatorOverlay::PaintPageCount (
+ OutputDevice& rDevice,
+ const sal_Int32 nSelectionCount,
+ const Size aPreviewSize,
+ const Point aFirstPageOffset) const
+{
+ // Paint the number of slides.
+ ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme());
+ ::boost::shared_ptr<Font> pFont(Theme::GetFont(Theme::Font_PageCount, rDevice));
+ if (pFont)
+ {
+ ::rtl::OUString sNumber (::rtl::OUString::valueOf(nSelectionCount));
+
+ // Determine the size of the (painted) text and create a bounding
+ // box that centers the text on the first preview.
+ rDevice.SetFont(*pFont);
+ Rectangle aTextBox;
+ rDevice.GetTextBoundRect(aTextBox, sNumber);
+ Point aTextOffset (aTextBox.TopLeft());
+ Size aTextSize (aTextBox.GetSize());
+ // Place text inside the first page preview.
+ Point aTextLocation(aFirstPageOffset);
+ // Center the text.
+ aTextLocation += Point(
+ (aPreviewSize.Width()-aTextBox.GetWidth())/2,
+ (aPreviewSize.Height()-aTextBox.GetHeight())/2);
+ aTextBox = Rectangle(aTextLocation, aTextSize);
+
+ // Paint background, border and text.
+ static const sal_Int32 nBorder = 5;
+ rDevice.SetFillColor(pTheme->GetColor(Theme::Color_Selection));
+ rDevice.SetLineColor(pTheme->GetColor(Theme::Color_Selection));
+ rDevice.DrawRect(GrowRectangle(aTextBox, nBorder));
+
+ rDevice.SetFillColor();
+ rDevice.SetLineColor(pTheme->GetColor(Theme::Color_PageCountFontColor));
+ rDevice.DrawRect(GrowRectangle(aTextBox, nBorder-1));
+
+ rDevice.SetTextColor(pTheme->GetColor(Theme::Color_PageCountFontColor));
+ rDevice.DrawText(aTextBox.TopLeft()-aTextOffset, sNumber);
+ }
+}
+
+
+
+
+void InsertionIndicatorOverlay::SetLocation (const Point& rLocation)
+{
+ const Point aTopLeft (
+ rLocation - Point(
+ maIcon.GetSizePixel().Width()/2,
+ maIcon.GetSizePixel().Height()/2));
+ if (maLocation != aTopLeft)
+ {
+ const Rectangle aOldBoundingBox (GetBoundingBox());
+
+ maLocation = aTopLeft;
+
+ if (mpLayerInvalidator && IsVisible())
+ {
+ mpLayerInvalidator->Invalidate(aOldBoundingBox);
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+ }
+ }
+}
+
+
+
+
+void InsertionIndicatorOverlay::Paint (
+ OutputDevice& rDevice,
+ const Rectangle& rRepaintArea)
+{
+ (void)rRepaintArea;
+
+ if ( ! IsVisible())
+ return;
+
+ rDevice.DrawImage(maLocation, maIcon);
+}
+
+
+
+
+void InsertionIndicatorOverlay::SetLayerInvalidator (const SharedILayerInvalidator& rpInvalidator)
+{
+ mpLayerInvalidator = rpInvalidator;
+
+ if (mbIsVisible && mpLayerInvalidator)
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+}
+
+
+
+
+bool InsertionIndicatorOverlay::IsVisible (void) const
+{
+ return mbIsVisible;
+}
+
+
+
+
+void InsertionIndicatorOverlay::Show (void)
+{
+ if ( ! mbIsVisible)
+ {
+ mbIsVisible = true;
+
+ ::boost::shared_ptr<LayeredDevice> pLayeredDevice (
+ mrSlideSorter.GetView().GetLayeredDevice());
+ if (pLayeredDevice)
+ {
+ pLayeredDevice->RegisterPainter(shared_from_this(), mnLayerIndex);
+ if (mpLayerInvalidator)
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+ }
+ }
+}
+
+
+
+
+void InsertionIndicatorOverlay::Hide (void)
+{
+ if (mbIsVisible)
+ {
+ mbIsVisible = false;
+
+ ::boost::shared_ptr<LayeredDevice> pLayeredDevice (
+ mrSlideSorter.GetView().GetLayeredDevice());
+ if (pLayeredDevice)
+ {
+ if (mpLayerInvalidator)
+ mpLayerInvalidator->Invalidate(GetBoundingBox());
+ pLayeredDevice->RemovePainter(shared_from_this(), mnLayerIndex);
+ }
+ }
+}
+
+
+
+
+Rectangle InsertionIndicatorOverlay::GetBoundingBox (void) const
+{
+ return Rectangle(maLocation, maIcon.GetSizePixel());
+}
+
+
+
+
+Size InsertionIndicatorOverlay::GetSize (void) const
+{
+ return Size(
+ maIcon.GetSizePixel().Width() + 10,
+ maIcon.GetSizePixel().Height() + 10);
+}
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
new file mode 100644
index 000000000000..e3303278111f
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx
@@ -0,0 +1,565 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "SlsLayeredDevice.hxx"
+
+#include <vcl/window.hxx>
+#include <vcl/virdev.hxx>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+static const sal_Int32 gnMaximumLayerCount = 8;
+
+class LayerInvalidator : public ILayerInvalidator
+{
+public:
+ LayerInvalidator (
+ const ::boost::shared_ptr<LayeredDevice>& rpLayeredDevice,
+ const SharedSdWindow& rpTargetWindow,
+ const int nLayer)
+ : mpLayeredDevice(rpLayeredDevice),
+ mpTargetWindow(rpTargetWindow),
+ mnLayer(nLayer)
+ {
+ }
+
+ virtual void Invalidate (const Rectangle& rInvalidationBox)
+ {
+ mpLayeredDevice->Invalidate(rInvalidationBox, mnLayer);
+ mpTargetWindow->Invalidate(rInvalidationBox);
+ }
+
+private:
+ const ::boost::shared_ptr<LayeredDevice> mpLayeredDevice;
+ SharedSdWindow mpTargetWindow;
+ const int mnLayer;
+};
+
+void DeviceCopy (
+ OutputDevice& rTargetDevice,
+ OutputDevice& rSourceDevice,
+ const Rectangle& rBox)
+{
+ rTargetDevice.DrawOutDev(
+ rBox.TopLeft(),
+ rBox.GetSize(),
+ rBox.TopLeft(),
+ rBox.GetSize(),
+ rSourceDevice);
+}
+
+
+void ForAllRectangles (const Region& rRegion, ::boost::function<void(const Rectangle&)> aFunction)
+{
+ OSL_ASSERT(aFunction);
+
+ if (rRegion.GetRectCount() <= 1)
+ {
+ aFunction(rRegion.GetBoundRect());
+ }
+ else
+ {
+ Region aMutableRegionCopy (rRegion);
+ RegionHandle aHandle(aMutableRegionCopy.BeginEnumRects());
+ Rectangle aBox;
+ while (aMutableRegionCopy.GetNextEnumRect(aHandle, aBox))
+ aFunction(aBox);
+ aMutableRegionCopy.EndEnumRects(aHandle);
+ }
+}
+
+class Layer : private ::boost::noncopyable
+{
+public:
+ Layer (void);
+ ~Layer (void);
+
+ void Initialize (const SharedSdWindow& rpTargetWindow);
+ void InvalidateRectangle (const Rectangle& rInvalidationBox);
+ void InvalidateRegion (const Region& rInvalidationRegion);
+ void Validate (const MapMode& rMapMode);
+ void Repaint (
+ OutputDevice& rTargetDevice,
+ const Rectangle& rRepaintRectangle);
+ void Resize (const Size& rSize);
+ void AddPainter (const SharedILayerPainter& rpPainter);
+ void RemovePainter (const SharedILayerPainter& rpPainter);
+ bool HasPainter (void) const;
+ void Dispose (void);
+
+private:
+ ::boost::shared_ptr<VirtualDevice> mpLayerDevice;
+ ::std::vector<SharedILayerPainter> maPainters;
+ Region maInvalidationRegion;
+
+ void ValidateRectangle (const Rectangle& rBox);
+};
+typedef ::boost::shared_ptr<Layer> SharedLayer;
+
+
+} // end of anonymous namespace
+
+
+class LayeredDevice::LayerContainer : public ::std::vector<SharedLayer>
+{
+public:
+ LayerContainer (void) {}
+ ~LayerContainer (void) {}
+};
+
+
+
+
+//===== LayeredDevice =========================================================
+
+LayeredDevice::LayeredDevice (const SharedSdWindow& rpTargetWindow)
+ : mpTargetWindow(rpTargetWindow),
+ mpLayers(new LayerContainer()),
+ mpBackBuffer(new VirtualDevice(*mpTargetWindow)),
+ maSavedMapMode(rpTargetWindow->GetMapMode())
+{
+ mpBackBuffer->SetOutputSizePixel(mpTargetWindow->GetSizePixel());
+}
+
+
+
+
+LayeredDevice::~LayeredDevice (void)
+{
+}
+
+
+
+
+void LayeredDevice::Invalidate (
+ const Rectangle& rInvalidationArea,
+ const sal_Int32 nLayer)
+{
+ if (nLayer<0 || size_t(nLayer)>=mpLayers->size())
+ {
+ OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size());
+ return;
+ }
+
+ (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
+}
+
+
+
+
+void LayeredDevice::InvalidateAllLayers (const Rectangle& rInvalidationArea)
+{
+ for (sal_uInt32 nLayer=0; nLayer<mpLayers->size(); ++nLayer)
+ (*mpLayers)[nLayer]->InvalidateRectangle(rInvalidationArea);
+}
+
+
+
+
+void LayeredDevice::InvalidateAllLayers (const Region& rInvalidationRegion)
+{
+ for (sal_uInt32 nLayer=0; nLayer<mpLayers->size(); ++nLayer)
+ (*mpLayers)[nLayer]->InvalidateRegion(rInvalidationRegion);
+}
+
+
+
+
+void LayeredDevice::RegisterPainter (
+ const SharedILayerPainter& rpPainter,
+ const sal_Int32 nLayer)
+{
+ OSL_ASSERT(mpLayers);
+ if ( ! rpPainter)
+ {
+ OSL_ASSERT(rpPainter);
+ return;
+ }
+ if (nLayer<0 || nLayer>=gnMaximumLayerCount)
+ {
+ OSL_ASSERT(nLayer>=0 && nLayer<gnMaximumLayerCount);
+ return;
+ }
+
+ // Provide the layers.
+ if (sal_uInt32(nLayer) >= mpLayers->size())
+ {
+ const sal_Int32 nOldLayerCount (mpLayers->size());
+ mpLayers->resize(nLayer+1);
+
+ for (size_t nIndex=nOldLayerCount; nIndex<mpLayers->size(); ++nIndex)
+ (*mpLayers)[nIndex].reset(new Layer());
+ }
+
+ (*mpLayers)[nLayer]->AddPainter(rpPainter);
+ if (nLayer == 0)
+ (*mpLayers)[nLayer]->Initialize(mpTargetWindow);
+
+ rpPainter->SetLayerInvalidator(
+ SharedILayerInvalidator(new LayerInvalidator(shared_from_this(),mpTargetWindow,nLayer)));
+}
+
+
+
+
+void LayeredDevice::RemovePainter (
+ const SharedILayerPainter& rpPainter,
+ const sal_Int32 nLayer)
+{
+ if ( ! rpPainter)
+ {
+ OSL_ASSERT(rpPainter);
+ return;
+ }
+ if (nLayer<0 || size_t(nLayer)>=mpLayers->size())
+ {
+ OSL_ASSERT(nLayer>=0 && size_t(nLayer)<mpLayers->size());
+ return;
+ }
+
+ rpPainter->SetLayerInvalidator(SharedILayerInvalidator());
+
+ (*mpLayers)[nLayer]->RemovePainter(rpPainter);
+
+ // Remove top most layers that do not contain any painters.
+ while ( ! mpLayers->empty() && ! mpLayers->back()->HasPainter())
+ mpLayers->erase(mpLayers->end()-1);
+}
+
+
+
+
+bool LayeredDevice::HasPainter (const sal_Int32 nLayer)
+{
+ return nLayer>=0
+ && sal_uInt32(nLayer)<mpLayers->size()
+ && (*mpLayers)[nLayer]->HasPainter();
+}
+
+
+
+
+void LayeredDevice::Repaint (const Region& rRepaintRegion)
+{
+ // Validate the contents of all layers (that have their own devices.)
+ ::std::for_each(
+ mpLayers->begin(),
+ mpLayers->end(),
+ ::boost::bind(&Layer::Validate, _1, mpTargetWindow->GetMapMode()));
+
+ ForAllRectangles(rRepaintRegion, ::boost::bind(&LayeredDevice::RepaintRectangle, this, _1));
+}
+
+
+
+
+void LayeredDevice::RepaintRectangle (const Rectangle& rRepaintRectangle)
+{
+ if (mpLayers->size() == 0)
+ return;
+ else if (mpLayers->size() == 1)
+ {
+ // Just copy the main layer into the target device.
+ (*mpLayers)[0]->Repaint(*mpTargetWindow, rRepaintRectangle);
+ }
+ else
+ {
+ // Paint all layers first into the back buffer (to avoid flickering
+ // due to synchronous paints) and then copy that into the target
+ // device.
+ mpBackBuffer->SetMapMode(mpTargetWindow->GetMapMode());
+ ::std::for_each(
+ mpLayers->begin(),
+ mpLayers->end(),
+ ::boost::bind(&Layer::Repaint, _1, ::boost::ref(*mpBackBuffer), rRepaintRectangle));
+
+ DeviceCopy(*mpTargetWindow, *mpBackBuffer, rRepaintRectangle);
+ }
+}
+
+
+
+
+void LayeredDevice::Resize (void)
+{
+ const Size aSize (mpTargetWindow->GetSizePixel());
+ mpBackBuffer->SetOutputSizePixel(aSize);
+ ::std::for_each(mpLayers->begin(), mpLayers->end(), ::boost::bind(&Layer::Resize, _1, aSize));
+}
+
+
+
+
+void LayeredDevice::Dispose (void)
+{
+ ::std::for_each(mpLayers->begin(), mpLayers->end(), ::boost::bind(&Layer::Dispose, _1));
+ mpLayers->clear();
+}
+
+
+
+
+bool LayeredDevice::HandleMapModeChange (void)
+{
+ const MapMode& rMapMode (mpTargetWindow->GetMapMode());
+ if (maSavedMapMode == rMapMode)
+ return false;
+
+ const Rectangle aLogicWindowBox (
+ mpTargetWindow->PixelToLogic(Rectangle(Point(0,0), mpTargetWindow->GetSizePixel())));
+ if (maSavedMapMode.GetScaleX() != rMapMode.GetScaleX()
+ || maSavedMapMode.GetScaleY() != rMapMode.GetScaleY()
+ || maSavedMapMode.GetMapUnit() != rMapMode.GetMapUnit())
+ {
+ // When the scale has changed then we have to paint everything.
+ InvalidateAllLayers(aLogicWindowBox);
+ }
+ else if (maSavedMapMode.GetOrigin() != rMapMode.GetOrigin())
+ {
+ // Window has been scrolled. Adapt contents of backbuffers and
+ // layer devices.
+ const Point aDelta (rMapMode.GetOrigin() - maSavedMapMode.GetOrigin());
+ mpBackBuffer->CopyArea(
+ aLogicWindowBox.TopLeft(),
+ mpTargetWindow->PixelToLogic(Point(0,0), maSavedMapMode),
+ aLogicWindowBox.GetSize());
+
+ // Invalidate the area(s) that have been exposed.
+ const Rectangle aWindowBox (Point(0,0), mpTargetWindow->GetSizePixel());
+ if (aDelta.Y() < 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Left(),
+ aWindowBox.Bottom()+aDelta.Y(),
+ aWindowBox.Right(),
+ aWindowBox.Bottom())));
+ else if (aDelta.Y() > 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Left(),
+ aWindowBox.Top(),
+ aWindowBox.Right(),
+ aWindowBox.Top()+aDelta.Y())));
+ if (aDelta.X() < 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Right()+aDelta.X(),
+ aWindowBox.Top(),
+ aWindowBox.Right(),
+ aWindowBox.Bottom())));
+ else if (aDelta.X() > 0)
+ InvalidateAllLayers(mpTargetWindow->PixelToLogic(Rectangle(
+ aWindowBox.Left(),
+ aWindowBox.Top(),
+ aWindowBox.Left()+aDelta.X(),
+ aWindowBox.Bottom())));
+ }
+ else
+ {
+ // Can this happen? Lets trigger a warning when it does.
+ OSL_ASSERT(false);
+ }
+
+ maSavedMapMode = rMapMode;
+
+ return true;
+}
+
+
+
+
+//===== Layer =================================================================
+
+Layer::Layer (void)
+ : mpLayerDevice(),
+ maPainters(),
+ maInvalidationRegion()
+{
+}
+
+
+
+
+Layer::~Layer (void)
+{
+}
+
+
+
+
+void Layer::Initialize (const SharedSdWindow& rpTargetWindow)
+{
+#if 0
+ (void)rpTargetWindow;
+#else
+ if ( ! mpLayerDevice)
+ {
+ mpLayerDevice.reset(new VirtualDevice(*rpTargetWindow));
+ mpLayerDevice->SetOutputSizePixel(rpTargetWindow->GetSizePixel());
+ }
+#endif
+}
+
+
+
+
+void Layer::InvalidateRectangle (const Rectangle& rInvalidationBox)
+{
+ maInvalidationRegion.Union(rInvalidationBox);
+}
+
+
+
+
+void Layer::InvalidateRegion (const Region& rInvalidationRegion)
+{
+ maInvalidationRegion.Union(rInvalidationRegion);
+}
+
+
+
+
+void Layer::Validate (const MapMode& rMapMode)
+{
+ if (mpLayerDevice && ! maInvalidationRegion.IsEmpty())
+ {
+ Region aRegion (maInvalidationRegion);
+ maInvalidationRegion.SetEmpty();
+
+ mpLayerDevice->SetMapMode(rMapMode);
+ ForAllRectangles(
+ aRegion,
+ ::boost::bind(&Layer::ValidateRectangle, this, _1));
+ }
+}
+
+
+
+
+void Layer::ValidateRectangle (const Rectangle& rBox)
+{
+ if ( ! mpLayerDevice)
+ return;
+ const Region aSavedClipRegion (mpLayerDevice->GetClipRegion());
+ mpLayerDevice->IntersectClipRegion(rBox);
+
+ for (::std::vector<SharedILayerPainter>::const_iterator
+ iPainter(maPainters.begin()),
+ iEnd(maPainters.end());
+ iPainter!=iEnd;
+ ++iPainter)
+ {
+ (*iPainter)->Paint(*mpLayerDevice, rBox);
+ }
+
+ mpLayerDevice->SetClipRegion(aSavedClipRegion);
+}
+
+
+
+
+void Layer::Repaint (
+ OutputDevice& rTargetDevice,
+ const Rectangle& rRepaintRectangle)
+{
+ if (mpLayerDevice)
+ {
+ DeviceCopy(rTargetDevice, *mpLayerDevice, rRepaintRectangle);
+ }
+ else
+ {
+ ::std::for_each(
+ maPainters.begin(),
+ maPainters.end(),
+ ::boost::bind(&ILayerPainter::Paint,
+ _1,
+ ::boost::ref(rTargetDevice),
+ rRepaintRectangle));
+ }
+}
+
+
+
+
+void Layer::Resize (const Size& rSize)
+{
+ if (mpLayerDevice)
+ {
+ mpLayerDevice->SetOutputSizePixel(rSize);
+ maInvalidationRegion = Rectangle(Point(0,0), rSize);
+ }
+}
+
+
+
+
+void Layer::AddPainter (const SharedILayerPainter& rpPainter)
+{
+ OSL_ASSERT(::std::find(maPainters.begin(), maPainters.end(), rpPainter) == maPainters.end());
+
+ maPainters.push_back(rpPainter);
+}
+
+
+
+
+void Layer::RemovePainter (const SharedILayerPainter& rpPainter)
+{
+ const ::std::vector<SharedILayerPainter>::iterator iPainter (
+ ::std::find(maPainters.begin(), maPainters.end(), rpPainter));
+ if (iPainter != maPainters.end())
+ {
+ maPainters.erase(iPainter);
+ }
+ else
+ {
+ DBG_ASSERT(false,"LayeredDevice::RemovePainter called for painter that is not registered");
+ }
+}
+
+
+
+
+bool Layer::HasPainter (void) const
+{
+ return !maPainters.empty();
+}
+
+
+
+
+void Layer::Dispose (void)
+{
+ maPainters.clear();
+}
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
new file mode 100644
index 000000000000..8b2398221548
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_VIEW_LAYERED_DEVICE_HXX
+#define SD_SLIDESORTER_VIEW_LAYERED_DEVICE_HXX
+
+#include "view/SlsILayerPainter.hxx"
+#include "SlideSorter.hxx"
+
+#include <tools/gen.hxx>
+#include <vcl/region.hxx>
+#include <vcl/virdev.hxx>
+
+#include <boost/noncopyable.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <vector>
+
+class Window;
+
+namespace sd { namespace slidesorter { namespace view {
+
+/** A simple wrapper around an OutputDevice that provides support for
+ independent layers and buffering.
+ Each layer may contain any number of painters.
+*/
+class LayeredDevice
+ : public ::boost::enable_shared_from_this<LayeredDevice>
+
+{
+public:
+ LayeredDevice (const SharedSdWindow& rpTargetWindow);
+ ~LayeredDevice (void);
+
+ void Invalidate (
+ const Rectangle& rInvalidationBox,
+ const sal_Int32 nLayer);
+ void InvalidateAllLayers (
+ const Rectangle& rInvalidationBox);
+ void InvalidateAllLayers (
+ const Region& rInvalidationRegion);
+
+ void RegisterPainter (
+ const SharedILayerPainter& rPainter,
+ const sal_Int32 nLayer);
+
+ void RemovePainter (
+ const SharedILayerPainter& rPainter,
+ const sal_Int32 nLayer);
+
+ bool HasPainter (const sal_Int32 nLayer);
+
+ bool HandleMapModeChange (void);
+ void Repaint (const Region& rRepaintRegion);
+
+ void Resize (void);
+
+ void Dispose (void);
+
+private:
+ SharedSdWindow mpTargetWindow;
+ class LayerContainer;
+ ::boost::scoped_ptr<LayerContainer> mpLayers;
+ ::boost::scoped_ptr<VirtualDevice> mpBackBuffer;
+ MapMode maSavedMapMode;
+
+ void RepaintRectangle (const Rectangle& rRepaintRectangle);
+};
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index 698693b1be0d..66f22097993a 100644
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -29,38 +29,304 @@
#include "precompiled_sd.hxx"
#include "view/SlsLayouter.hxx"
-
-#include <vcl/outdev.hxx>
+#include "model/SlideSorterModel.hxx"
+#include "model/SlsPageDescriptor.hxx"
+#include "Window.hxx"
#include <rtl/math.hxx>
+#include <basegfx/numeric/ftools.hxx>
+
+namespace {
+ sal_Int32 RoundToInt (const double nValue)
+ {
+ return sal_Int32(::rtl::math::round(nValue));
+ }
+}
+
namespace sd { namespace slidesorter { namespace view {
-Layouter::Layouter (void)
- : mnRequestedLeftBorder(10),
- mnRequestedRightBorder(10),
- mnRequestedTopBorder(10),
- mnRequestedBottomBorder(10),
- mnLeftBorder(10),
- mnRightBorder(10),
- mnTopBorder(10),
- mnBottomBorder(10),
- mnLeftPageBorder(0),
- mnRightPageBorder(0),
- mnTopPageBorder(0),
- mnBottomPageBorder(0),
- mnVerticalGap (20),
- mnHorizontalGap (20),
- mnInsertionMarkerThickness (4),
- mnTotalVerticalGap(0),
- mnTotalHorizontalGap(0),
- mnMinimalWidth (100),
- mnPreferredWidth (200),
- mnMaximalWidth (300),
- mnMinimalColumnCount (1),
- mnMaximalColumnCount (5),
- mnColumnCount (1),
- maPageObjectModelSize (1,1),
- maPageObjectPixelSize (1,1)
+class Layouter::Implementation
+{
+public:
+ SharedSdWindow mpWindow;
+ sal_Int32 mnRequestedLeftBorder;
+ sal_Int32 mnRequestedRightBorder;
+ sal_Int32 mnRequestedTopBorder;
+ sal_Int32 mnRequestedBottomBorder;
+ sal_Int32 mnLeftBorder;
+ sal_Int32 mnRightBorder;
+ sal_Int32 mnTopBorder;
+ sal_Int32 mnBottomBorder;
+ sal_Int32 mnVerticalGap;
+ sal_Int32 mnHorizontalGap;
+ Size maMinimalSize;
+ Size maPreferredSize;
+ Size maMaximalSize;
+ sal_Int32 mnMinimalColumnCount;
+ sal_Int32 mnMaximalColumnCount;
+ sal_Int32 mnPageCount;
+ sal_Int32 mnColumnCount;
+ sal_Int32 mnRowCount;
+ /// The maximum number of columns. Can only be larger than the current
+ /// number of columns when there are not enough pages to fill all
+ /// available columns.
+ sal_Int32 mnMaxColumnCount;
+ /// The maximum number of rows. Can only be larger than the current
+ /// number of rows when there are not enough pages to fill all available
+ /// rows.
+ sal_Int32 mnMaxRowCount;
+ Size maPageObjectSize;
+ ::boost::shared_ptr<PageObjectLayouter> mpPageObjectLayouter;
+ ::boost::shared_ptr<view::Theme> mpTheme;
+
+ /** Specify how the gap between two page objects is associated with the
+ page objects.
+ */
+ enum GapMembership {
+ GM_NONE, // Gap is not associated with any page object.
+ GM_PREVIOUS, // The whole gap is associated with the previous page
+ // object (left or above the gap.)
+ GM_BOTH, // Half of the gap is associated with previous, half
+ // with the next page object.
+ GM_NEXT, // The whole gap is associated with the next page
+ // object (right or below the gap.)
+ GM_PAGE_BORDER
+ };
+
+ static Implementation* Create (
+ const Implementation& rImplementation,
+ const Layouter::Orientation eOrientation);
+
+ virtual Layouter::Orientation GetOrientation (void) const = 0;
+
+ bool Rearrange (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const sal_uInt32 nPageCount);
+
+ /** Calculate the row that the point with the given vertical coordinate
+ is over. The horizontal component is ignored.
+ @param nYPosition
+ Vertical position in model coordinates.
+ @param bIncludeBordersAndGaps
+ When this flag is <TRUE/> then the area of borders and gaps are
+ interpreted as belonging to one of the rows.
+ @param eGapMembership
+ Specifies to what row the gap areas belong. Here GM_NONE
+ corresponds to bIncludeBordersAndGaps being <FALSE/>. When
+ GM_BOTH is given then the upper half is associated to the row
+ above and the lower half to the row below. Values of
+ GM_PREVIOUS and GM_NEXT associate the whole gap area with the
+ row above or below respectively.
+ */
+ sal_Int32 GetRowAtPosition (
+ sal_Int32 nYPosition,
+ bool bIncludeBordersAndGaps,
+ GapMembership eGapMembership = GM_NONE) const;
+
+ /** Calculate the column that the point with the given horizontal
+ coordinate is over. The verical component is ignored.
+ @param nXPosition
+ Horizontal position in model coordinates.
+ @param bIncludeBordersAndGaps
+ When this flag is <TRUE/> then the area of borders and gaps are
+ interpreted as belonging to one of the columns.
+ @param eGapMembership
+ Specifies to what column the gap areas belong.
+ */
+ sal_Int32 GetColumnAtPosition (
+ sal_Int32 nXPosition,
+ bool bIncludeBordersAndGaps,
+ GapMembership eGapMembership = GM_NONE) const;
+
+ /** This method is typically called from GetRowAtPosition() and
+ GetColumnAtPosition() to handle a position that lies inside the gap
+ between two adjacent rows or columns.
+ @param nDistanceIntoGap
+ Vertical distance from the bottom of the upper row down into the
+ gap or or horizontal distance from the right edge right into the
+ gap.
+ @param eGapMemberhship
+ This value decides what areas in the gap belong to which (or no)
+ row or column.
+ @param nIndex
+ The row index of the upper row or the column index of the left
+ column.
+ @param nGap
+ Width or height of the gap in model coordiantes between the
+ page borders.
+ @return
+ Returns either the index of the upper row (as given as nRow), the
+ index of the lower row (nRow+1) or -1 to indicate that the
+ position belongs to no row.
+ */
+ sal_Int32 ResolvePositionInGap (
+ sal_Int32 nDistanceIntoGap,
+ GapMembership eGapMembership,
+ sal_Int32 nIndex,
+ sal_Int32 nGap) const;
+
+ /** Calculate the logical part of the insert position, i.e. the page
+ after whicht to insert.
+ */
+ virtual void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const = 0;
+
+ /** Calculate the geometrical part of the insert position, i.e. the
+ location of where to display the insertion indicator and the
+ distances about which the leading and trailing pages have to be
+ moved to make room for the indicator.
+ */
+ void CalculateGeometricPosition (
+ InsertPosition& rPosition,
+ const Size& rIndicatorSize,
+ const bool bIsVertical,
+ model::SlideSorterModel& rModel) const;
+
+ /** Return the bounding box of the preview or, when selected, of the page
+ object. Thus, it returns something like a visual bounding box.
+ */
+ Rectangle GetInnerBoundingBox (
+ model::SlideSorterModel& rModel,
+ const sal_Int32 nIndex) const;
+
+ Range GetValidHorizontalSizeRange (void) const;
+ Range GetValidVerticalSizeRange (void) const;
+
+ Range GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const;
+ sal_Int32 GetIndex (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const bool bClampToValidRange) const;
+
+ Rectangle GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap = false) const;
+
+ Rectangle GetPageObjectBox (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const;
+
+ Rectangle AddBorderAndGap (
+ const Rectangle& rBoundingBox,
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const;
+
+ Rectangle GetTotalBoundingBox (void) const;
+
+ virtual ~Implementation (void);
+
+protected:
+ Implementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ Implementation (const Implementation& rImplementation);
+
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize) = 0;
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize) = 0;
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const = 0;
+ Size GetTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const bool bCalculateWidth,
+ const bool bCalculateHeight) const;
+ void CalculateVerticalLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+};
+
+
+/** The vertical layouter has one column and as many rows as there are
+ pages.
+*/
+class VerticalImplementation : public Layouter::Implementation
+{
+public:
+ VerticalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ VerticalImplementation (const Implementation& rImplementation);
+
+ virtual Layouter::Orientation GetOrientation (void) const;
+
+ void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+
+protected:
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize);
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize);
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const;
+};
+
+
+/** The horizontal layouter has one row and as many columns as there are
+ pages.
+*/
+class HorizontalImplementation : public Layouter::Implementation
+{
+public:
+ HorizontalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ HorizontalImplementation (const Implementation& rImplementation);
+
+ virtual Layouter::Orientation GetOrientation (void) const;
+
+ void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+
+protected:
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize);
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize);
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const;
+};
+
+
+/** The number of columns of the grid layouter is defined via a control in
+ the slide sorter tool bar. The number of rows is calculated from the
+ number of columns and the number of pages.
+*/
+class GridImplementation : public Layouter::Implementation
+{
+public:
+ GridImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme);
+ GridImplementation (const Implementation& rImplementation);
+
+ virtual Layouter::Orientation GetOrientation (void) const;
+
+ void CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const;
+
+protected:
+ virtual void CalculateRowAndColumnCount (const Size& rWindowSize);
+ virtual void CalculateMaxRowAndColumnCount (const Size& rWindowSize);
+ virtual Size CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const;
+};
+
+
+
+
+//===== Layouter ==============================================================
+
+Layouter::Layouter (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<Theme>& rpTheme)
+ : mpImplementation(new GridImplementation(rpWindow, rpTheme)),
+ mpWindow(rpWindow)
{
}
@@ -72,39 +338,30 @@ Layouter::~Layouter (void)
}
-void Layouter::SetBorders (
- sal_Int32 nLeftBorder,
- sal_Int32 nRightBorder,
- sal_Int32 nTopBorder,
- sal_Int32 nBottomBorder)
+
+
+::boost::shared_ptr<PageObjectLayouter> Layouter::GetPageObjectLayouter (void) const
{
- if (nLeftBorder >= 0)
- mnRequestedLeftBorder.mnScreen = nLeftBorder;
- if (nRightBorder >= 0)
- mnRequestedRightBorder.mnScreen = nRightBorder;
- if (nTopBorder >= 0)
- mnRequestedTopBorder.mnScreen = nTopBorder;
- if (nBottomBorder >= 0)
- mnRequestedBottomBorder.mnScreen = nBottomBorder;
+ return mpImplementation->mpPageObjectLayouter;
}
-void Layouter::SetPageBorders (
+void Layouter::SetBorders (
sal_Int32 nLeftBorder,
sal_Int32 nRightBorder,
sal_Int32 nTopBorder,
sal_Int32 nBottomBorder)
{
if (nLeftBorder >= 0)
- mnLeftPageBorder.mnScreen = nLeftBorder;
+ mpImplementation->mnRequestedLeftBorder = nLeftBorder;
if (nRightBorder >= 0)
- mnRightPageBorder.mnScreen = nRightBorder;
+ mpImplementation->mnRequestedRightBorder = nRightBorder;
if (nTopBorder >= 0)
- mnTopPageBorder.mnScreen = nTopBorder;
+ mpImplementation->mnRequestedTopBorder = nTopBorder;
if (nBottomBorder >= 0)
- mnBottomPageBorder.mnScreen = nBottomBorder;
+ mpImplementation->mnRequestedBottomBorder = nBottomBorder;
}
@@ -116,389 +373,157 @@ void Layouter::SetColumnCount (
{
if (nMinimalColumnCount <= nMaximalColumnCount)
{
- mnMinimalColumnCount = nMinimalColumnCount;
- mnMaximalColumnCount = nMaximalColumnCount;
+ mpImplementation->mnMinimalColumnCount = nMinimalColumnCount;
+ mpImplementation->mnMaximalColumnCount = nMaximalColumnCount;
}
}
-bool Layouter::RearrangeHorizontal (
+bool Layouter::Rearrange (
+ const Orientation eOrientation,
const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice,
+ const Size& rPageSize,
const sal_uInt32 nPageCount)
{
- if (rWindowSize.Width() > 0
- && rWindowSize.Height() > 0
- && rPageObjectSize.Width() > 0
- && rPageObjectSize.Height() > 0)
- {
- mnTotalHorizontalGap.mnScreen = mnHorizontalGap.mnScreen
- + mnRightPageBorder.mnScreen + mnLeftPageBorder.mnScreen;
- mnTotalVerticalGap.mnScreen = mnVerticalGap.mnScreen
- + mnTopPageBorder.mnScreen + mnBottomPageBorder.mnScreen;
-
- // Calculate the column count.
- mnColumnCount = nPageCount;
-
- // Update the border values. The insertion marker has to have space.
- mnLeftBorder.mnScreen = mnRequestedLeftBorder.mnScreen;
- mnTopBorder.mnScreen = mnRequestedTopBorder.mnScreen;
- mnRightBorder.mnScreen = mnRequestedRightBorder.mnScreen;
- mnBottomBorder.mnScreen = mnRequestedBottomBorder.mnScreen;
- if (mnColumnCount > 1)
- {
- int nMinimumBorderWidth = mnInsertionMarkerThickness.mnScreen
- + mnHorizontalGap.mnScreen/2;
- if (mnLeftBorder.mnScreen < nMinimumBorderWidth)
- mnLeftBorder.mnScreen = nMinimumBorderWidth;
- if (mnRightBorder.mnScreen < nMinimumBorderWidth)
- mnRightBorder.mnScreen = nMinimumBorderWidth;
- }
- else
- {
- int nMinimumBorderHeight = mnInsertionMarkerThickness.mnScreen
- + mnVerticalGap.mnScreen/2;
- if (mnTopBorder.mnScreen < nMinimumBorderHeight)
- mnTopBorder.mnScreen = nMinimumBorderHeight;
- if (mnBottomBorder.mnScreen < nMinimumBorderHeight)
- mnBottomBorder.mnScreen = nMinimumBorderHeight;
- }
+ OSL_ASSERT(mpWindow);
- // Calculate the width of each page object.
- sal_uInt32 nTargetHeight = 0;
- sal_uInt32 nRowCount = 1;
- if (mnColumnCount > 0)
- nTargetHeight = (rWindowSize.Height()
- - mnTopBorder.mnScreen
- - mnBottomBorder.mnScreen
- - nRowCount * (mnTopPageBorder.mnScreen
- + mnBottomPageBorder.mnScreen)
- - (nRowCount-1) * mnTotalVerticalGap.mnScreen
- )
- / nRowCount;
- sal_uInt32 nMinimalHeight (
- mnMinimalWidth * rPageObjectSize.Height() / rPageObjectSize.Width());
- sal_uInt32 nMaximalHeight (
- mnMaximalWidth * rPageObjectSize.Height() / rPageObjectSize.Width());
- if (nTargetHeight < nMinimalHeight)
- nTargetHeight = nMinimalHeight;
- if (nTargetHeight > nMaximalHeight)
- nTargetHeight = nMaximalHeight;
-
- // Initialize the device with some arbitrary zoom factor just in
- // case that the current zoom factor is numerically instable when
- // used in a multiplication.
- MapMode aMapMode (pDevice->GetMapMode());
- aMapMode.SetScaleX (Fraction(1,1));
- aMapMode.SetScaleY (Fraction(1,1));
- pDevice->SetMapMode (aMapMode);
-
- // Calculate the resulting scale factor and the page object size in
- // pixels.
- maPageObjectModelSize = rPageObjectSize;
- int nPagePixelHeight (pDevice->LogicToPixel(maPageObjectModelSize).Height());
-
- // Adapt the layout of the given output device to the new layout of
- // page objects. The zoom factor is set so that the page objects in
- // one column fill the screen.
- Fraction aScaleFactor (nTargetHeight, nPagePixelHeight);
- SetZoom (aMapMode.GetScaleX() * aScaleFactor, pDevice);
-
- return true;
- }
- else
- return false;
+ if (eOrientation != mpImplementation->GetOrientation())
+ mpImplementation.reset(Implementation::Create(*mpImplementation, eOrientation));
+
+ return mpImplementation->Rearrange(rWindowSize, rPageSize, nPageCount);
}
-bool Layouter::RearrangeVertical (
- const Size& rWindowSize,
- const Size& rPageObjectSize,
- OutputDevice* pDevice)
+void Layouter::_SetZoom (double nZoomFactor)
{
- if (rWindowSize.Width() > 0
- && rWindowSize.Height() > 0
- && rPageObjectSize.Width() > 0
- && rPageObjectSize.Height() > 0)
- {
- mnTotalHorizontalGap.mnScreen = mnHorizontalGap.mnScreen
- + mnRightPageBorder.mnScreen + mnLeftPageBorder.mnScreen;
- mnTotalVerticalGap.mnScreen = mnVerticalGap.mnScreen
- + mnTopPageBorder.mnScreen + mnBottomPageBorder.mnScreen;
-
- // Calculate the column count.
- mnColumnCount = (rWindowSize.Width()
- - mnRequestedLeftBorder.mnScreen - mnRequestedRightBorder.mnScreen)
- / (mnPreferredWidth + mnTotalHorizontalGap.mnScreen);
- if (mnColumnCount < mnMinimalColumnCount)
- mnColumnCount = mnMinimalColumnCount;
- if (mnColumnCount > mnMaximalColumnCount)
- mnColumnCount = mnMaximalColumnCount;
-
- // Update the border values. The insertion marker has to have space.
- mnLeftBorder.mnScreen = mnRequestedLeftBorder.mnScreen;
- mnTopBorder.mnScreen = mnRequestedTopBorder.mnScreen;
- mnRightBorder.mnScreen = mnRequestedRightBorder.mnScreen;
- mnBottomBorder.mnScreen = mnRequestedBottomBorder.mnScreen;
- if (mnColumnCount > 1)
- {
- int nMinimumBorderWidth = mnInsertionMarkerThickness.mnScreen
- + mnHorizontalGap.mnScreen/2;
- if (mnLeftBorder.mnScreen < nMinimumBorderWidth)
- mnLeftBorder.mnScreen = nMinimumBorderWidth;
- if (mnRightBorder.mnScreen < nMinimumBorderWidth)
- mnRightBorder.mnScreen = nMinimumBorderWidth;
- }
- else
- {
- int nMinimumBorderHeight = mnInsertionMarkerThickness.mnScreen
- + mnVerticalGap.mnScreen/2;
- if (mnTopBorder.mnScreen < nMinimumBorderHeight)
- mnTopBorder.mnScreen = nMinimumBorderHeight;
- if (mnBottomBorder.mnScreen < nMinimumBorderHeight)
- mnBottomBorder.mnScreen = nMinimumBorderHeight;
- }
-
- // Calculate the width of each page object.
- sal_Int32 nTargetWidth = 0;
- if (mnColumnCount > 0)
- nTargetWidth = (rWindowSize.Width()
- - mnLeftBorder.mnScreen
- - mnRightBorder.mnScreen
- - mnColumnCount * (mnRightPageBorder.mnScreen
- + mnLeftPageBorder.mnScreen)
- - (mnColumnCount-1) * mnTotalHorizontalGap.mnScreen
- )
- / mnColumnCount;
- if (nTargetWidth < mnMinimalWidth)
- nTargetWidth = mnMinimalWidth;
- if (nTargetWidth > mnMaximalWidth)
- nTargetWidth = mnMaximalWidth;
-
- // Initialize the device with some arbitrary zoom factor just in
- // case that the current zoom factor is numerically instable when
- // used in a multiplication.
- MapMode aMapMode (pDevice->GetMapMode());
- aMapMode.SetScaleX (Fraction(1,1));
- aMapMode.SetScaleY (Fraction(1,1));
- pDevice->SetMapMode (aMapMode);
-
- // Calculate the resulting scale factor and the page object size in
- // pixels.
- maPageObjectModelSize = rPageObjectSize;
- int nPagePixelWidth (pDevice->LogicToPixel (maPageObjectModelSize).Width());
-
- // Adapt the layout of the given output device to the new layout of
- // page objects. The zoom factor is set so that the page objects in
- // one row fill the screen.
- Fraction aScaleFactor (nTargetWidth, nPagePixelWidth);
- SetZoom (aMapMode.GetScaleX() * aScaleFactor, pDevice);
-
- return true;
- }
- else
- return false;
+ _SetZoom(Fraction(nZoomFactor));
}
-void Layouter::SetZoom (Fraction nZoomFactor, OutputDevice* pDevice)
+void Layouter::_SetZoom (Fraction nZoomFactor)
{
- MapMode aMapMode (pDevice->GetMapMode());
+ OSL_ASSERT(mpWindow);
+
+ MapMode aMapMode (mpWindow->GetMapMode());
aMapMode.SetScaleX (nZoomFactor);
aMapMode.SetScaleY (nZoomFactor);
- maPageObjectPixelSize = pDevice->LogicToPixel (maPageObjectModelSize);
- pDevice->SetMapMode (aMapMode);
+ mpWindow->SetMapMode (aMapMode);
+}
- // Transform frequently used values from pixel to model coordinates.
- Size aTotalGap (pDevice->PixelToLogic (Size (
- mnTotalHorizontalGap.mnScreen,
- mnTotalVerticalGap.mnScreen)));
- mnTotalHorizontalGap.mnModel = aTotalGap.Width();
- mnTotalVerticalGap.mnModel = aTotalGap.Height();
- Size aGap (pDevice->PixelToLogic (Size (
- mnHorizontalGap.mnScreen,
- mnVerticalGap.mnScreen)));
- mnHorizontalGap.mnModel = aGap.Width();
- mnVerticalGap.mnModel = aGap.Height();
- Size aTopLeftBorder (pDevice->PixelToLogic (Size (
- mnLeftBorder.mnScreen,
- mnTopBorder.mnScreen)));
- mnLeftBorder.mnModel = aTopLeftBorder.Width();
- mnTopBorder.mnModel = aTopLeftBorder.Height();
+sal_Int32 Layouter::GetColumnCount (void) const
+{
+ return mpImplementation->mnColumnCount;
+}
- Size aBottomRightBorder (pDevice->PixelToLogic (Size (
- mnLeftBorder.mnScreen,
- mnTopBorder.mnScreen)));
- mnRightBorder.mnModel = aBottomRightBorder.Width();
- mnBottomBorder.mnModel = aBottomRightBorder.Height();
- Size aTopLeftPageBorder (pDevice->PixelToLogic (Size (
- mnLeftPageBorder.mnScreen,
- mnTopPageBorder.mnScreen)));
- mnLeftPageBorder.mnModel = aTopLeftPageBorder.Width();
- mnTopPageBorder.mnModel = aTopLeftPageBorder.Height();
- Size aBottomRightPageBorder (pDevice->PixelToLogic (Size (
- mnRightPageBorder.mnScreen,
- mnBottomPageBorder.mnScreen)));
- mnRightPageBorder.mnModel = aBottomRightPageBorder.Width();
- mnBottomPageBorder.mnModel = aBottomRightPageBorder.Height();
- mnInsertionMarkerThickness.mnModel = pDevice->PixelToLogic (
- Size(mnInsertionMarkerThickness.mnScreen,0)).Width();
+sal_Int32 Layouter::GetRowCount (void) const
+{
+ return mpImplementation->mnRowCount;
}
-sal_Int32 Layouter::GetColumnCount (void) const
+sal_Int32 Layouter::GetRow (const sal_Int32 nIndex) const
{
- return mnColumnCount;
+ return nIndex / mpImplementation->mnColumnCount;
}
-Size Layouter::GetPageObjectSize (void) const
+sal_Int32 Layouter::GetColumn (const sal_Int32 nIndex) const
{
- return maPageObjectModelSize;
+ return nIndex % mpImplementation->mnColumnCount;
}
-Rectangle Layouter::GetPageObjectBox (sal_Int32 nIndex) const
+sal_Int32 Layouter::GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) const
{
- int nColumn = nIndex % mnColumnCount;
- int nRow = nIndex / mnColumnCount;
- return Rectangle (
- Point (mnLeftBorder.mnModel
- + nColumn * maPageObjectModelSize.Width()
- + mnLeftPageBorder.mnModel
- + (nColumn>0 ? nColumn : 0) * mnTotalHorizontalGap.mnModel,
- mnTopBorder.mnModel
- + nRow * maPageObjectModelSize.Height()
- + mnTopPageBorder.mnModel
- + (nRow>0 ? nRow : 0) * mnTotalVerticalGap.mnModel),
- maPageObjectModelSize);
+ return mpImplementation->GetIndex(nRow,nColumn,true);
}
-Rectangle Layouter::GetPageBox (sal_Int32 nObjectCount) const
+Size Layouter::GetPageObjectSize (void) const
{
- sal_Int32 nHorizontalSize = 0;
- sal_Int32 nVerticalSize = 0;
- if (mnColumnCount > 0)
- {
- sal_Int32 nRowCount = (nObjectCount+mnColumnCount-1) / mnColumnCount;
- nHorizontalSize =
- mnLeftBorder.mnModel
- + mnRightBorder.mnModel
- + mnColumnCount * maPageObjectModelSize.Width()
- + mnLeftPageBorder.mnModel + mnRightPageBorder.mnModel;
- if (mnColumnCount > 1)
- nHorizontalSize
- += (mnColumnCount-1) * mnTotalHorizontalGap.mnModel;
- nVerticalSize =
- mnTopBorder.mnModel
- + mnBottomBorder.mnModel
- + nRowCount * maPageObjectModelSize.Height()
- + mnTopPageBorder.mnModel + mnBottomPageBorder.mnModel;
- if (nRowCount > 1)
- nVerticalSize += (nRowCount-1) * mnTotalVerticalGap.mnModel;
- }
+ return mpImplementation->maPageObjectSize;
+}
- return Rectangle (
- Point(0,0),
- Size (nHorizontalSize, nVerticalSize)
- );
+
+
+
+Rectangle Layouter::GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap) const
+{
+ return mpImplementation->GetPageObjectBox(nIndex, bIncludeBorderAndGap);
}
-Rectangle Layouter::GetInsertionMarkerBox (
- sal_Int32 nIndex,
- bool bVertical,
- bool bLeftOrTop) const
+Rectangle Layouter::GetTotalBoundingBox (void) const
{
- Rectangle aBox (GetPageObjectBox (nIndex));
+ return mpImplementation->GetTotalBoundingBox();
+}
+
+
+
+
+InsertPosition Layouter::GetInsertPosition (
+ const Point& rModelPosition,
+ const Size& rIndicatorSize,
+ model::SlideSorterModel& rModel) const
+{
+ InsertPosition aPosition;
+ mpImplementation->CalculateLogicalInsertPosition(
+ rModelPosition,
+ aPosition);
+ mpImplementation->CalculateGeometricPosition(
+ aPosition,
+ rIndicatorSize,
+ GetColumnCount()==1,
+ rModel);
+ return aPosition;
+}
- if (bVertical)
- {
- sal_Int32 nHorizontalInsertionMarkerOffset
- = (mnHorizontalGap.mnModel-mnInsertionMarkerThickness.mnModel) / 2;
- if (bLeftOrTop)
- {
- // Left.
- aBox.Left() -= mnLeftPageBorder.mnModel
- + mnHorizontalGap.mnModel
- - nHorizontalInsertionMarkerOffset;
- }
- else
- {
- // Right.
- aBox.Left() = aBox.Right()
- + mnRightPageBorder.mnModel
- + nHorizontalInsertionMarkerOffset;
- }
- aBox.Right() = aBox.Left() + mnInsertionMarkerThickness.mnModel;
- }
- else
- {
- sal_Int32 nVerticalInsertionMarkerOffset
- = (mnVerticalGap.mnModel - mnInsertionMarkerThickness.mnModel) / 2;
- if (bLeftOrTop)
- {
- // Above.
- aBox.Top() -= mnTopPageBorder.mnModel
- + mnVerticalGap.mnModel
- - nVerticalInsertionMarkerOffset;
- }
- else
- {
- // Below.
- aBox.Top() = aBox.Bottom()
- + mnBottomPageBorder.mnModel
- + nVerticalInsertionMarkerOffset;
- }
- aBox.Bottom() = aBox.Top() + mnInsertionMarkerThickness.mnModel;
- }
- return aBox;
+
+
+Range Layouter::GetValidHorizontalSizeRange (void) const
+{
+ return mpImplementation->GetValidHorizontalSizeRange();
}
-sal_Int32 Layouter::GetIndexOfFirstVisiblePageObject (
- const Rectangle& aVisibleArea) const
+Range Layouter::GetValidVerticalSizeRange (void) const
{
- sal_Int32 nRow = GetRowAtPosition (aVisibleArea.Top(), true, GM_BOTH);
- return nRow * mnColumnCount;
+ return mpImplementation->GetValidVerticalSizeRange();
}
-sal_Int32 Layouter::GetIndexOfLastVisiblePageObject (
- const Rectangle& aVisibleArea) const
+Range Layouter::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const
{
- sal_Int32 nRow = GetRowAtPosition (aVisibleArea.Bottom(),
- true, GM_BOTH);
- return (nRow+1) * mnColumnCount - 1;
+ return mpImplementation->GetRangeOfVisiblePageObjects(aVisibleArea);
}
@@ -506,128 +531,188 @@ sal_Int32 Layouter::GetIndexOfLastVisiblePageObject (
sal_Int32 Layouter::GetIndexAtPoint (
const Point& rPosition,
- bool bIncludePageBorders) const
+ const bool bIncludePageBorders,
+ const bool bClampToValidRange) const
{
- sal_Int32 nRow = GetRowAtPosition (rPosition.Y(),
- bIncludePageBorders,
- bIncludePageBorders ? GM_PAGE_BORDER : GM_NONE);
- sal_Int32 nColumn = GetColumnAtPosition (rPosition.X(),
- bIncludePageBorders,
- bIncludePageBorders ? GM_PAGE_BORDER : GM_NONE);
-
- if (nRow >= 0 && nColumn >= 0)
- return nRow * mnColumnCount + nColumn;
- else
- return -1;
+ const sal_Int32 nRow (
+ mpImplementation->GetRowAtPosition (
+ rPosition.Y(),
+ bIncludePageBorders,
+ bIncludePageBorders ? Implementation::GM_PAGE_BORDER : Implementation::GM_NONE));
+ const sal_Int32 nColumn (
+ mpImplementation->GetColumnAtPosition (
+ rPosition.X(),
+ bIncludePageBorders,
+ bIncludePageBorders ? Implementation::GM_PAGE_BORDER : Implementation::GM_NONE));
+
+ return mpImplementation->GetIndex(nRow,nColumn,bClampToValidRange);
}
-/** Calculation of the insertion index:
- 1. Determine the row. rPoint has to be in the row between upper and
- lower border. If it is in a horizontal gap or border an invalid
- insertion index (-1, which is a valid return value) will be returned.
- 2. Determine the column. Here both vertical borders and vertical gaps
- will yield valid return values. The horizontal positions between the
- center of page objects in column i and the center of page objects in
- column i+1 will return column i+1 as insertion index.
+//===== Layouter::Implementation ==============================================
- When there is only one column and bAllowVerticalPosition is true than
- take the vertical areas between rows into account as well.
-*/
-sal_Int32 Layouter::GetInsertionIndex (
- const Point& rPosition,
- bool bAllowVerticalPosition) const
+Layouter::Implementation* Layouter::Implementation::Create (
+ const Implementation& rImplementation,
+ const Layouter::Orientation eOrientation)
{
- sal_Int32 nIndex = -1;
+ switch (eOrientation)
+ {
+ case HORIZONTAL: return new HorizontalImplementation(rImplementation);
+ case VERTICAL: return new VerticalImplementation(rImplementation);
+ case GRID:
+ default: return new GridImplementation(rImplementation);
+ }
+}
- sal_Int32 nRow = GetRowAtPosition (rPosition.Y(), true,
- (mnColumnCount==1 && bAllowVerticalPosition) ? GM_BOTH : GM_BOTH);
- sal_Int32 nColumn = GetColumnAtPosition (rPosition.X(), true, GM_BOTH);
- if (nRow >= 0 && nColumn >= 0)
- nIndex = nRow * mnColumnCount + nColumn;
- return nIndex;
+
+Layouter::Implementation::Implementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : mpWindow(rpWindow),
+ mnRequestedLeftBorder(5),
+ mnRequestedRightBorder(5),
+ mnRequestedTopBorder(5),
+ mnRequestedBottomBorder(5),
+ mnLeftBorder(5),
+ mnRightBorder(5),
+ mnTopBorder(5),
+ mnBottomBorder(5),
+ mnVerticalGap (10 - 2*rpTheme->GetIntegerValue(Theme::Integer_FocusIndicatorWidth)),
+ mnHorizontalGap(10 - 2*rpTheme->GetIntegerValue(Theme::Integer_FocusIndicatorWidth)),
+ maMinimalSize(132,98),
+ maPreferredSize(200,150),
+ maMaximalSize(300,200),
+ mnMinimalColumnCount(1),
+ mnMaximalColumnCount(15),
+ mnPageCount(0),
+ mnColumnCount(1),
+ mnRowCount(0),
+ mnMaxColumnCount(0),
+ mnMaxRowCount(0),
+ maPageObjectSize(1,1),
+ mpPageObjectLayouter(),
+ mpTheme(rpTheme)
+{
}
-Layouter::DoublePoint
- Layouter::ConvertModelToLayouterCoordinates (
- const Point& rModelPoint) const
+Layouter::Implementation::Implementation (const Implementation& rImplementation)
+ : mpWindow(rImplementation.mpWindow),
+ mnRequestedLeftBorder(rImplementation.mnRequestedLeftBorder),
+ mnRequestedRightBorder(rImplementation.mnRequestedRightBorder),
+ mnRequestedTopBorder(rImplementation.mnRequestedTopBorder),
+ mnRequestedBottomBorder(rImplementation.mnRequestedBottomBorder),
+ mnLeftBorder(rImplementation.mnLeftBorder),
+ mnRightBorder(rImplementation.mnRightBorder),
+ mnTopBorder(rImplementation.mnTopBorder),
+ mnBottomBorder(rImplementation.mnBottomBorder),
+ mnVerticalGap(rImplementation.mnVerticalGap),
+ mnHorizontalGap(rImplementation.mnHorizontalGap),
+ maMinimalSize(rImplementation.maMinimalSize),
+ maPreferredSize(rImplementation.maPreferredSize),
+ maMaximalSize(rImplementation.maMaximalSize),
+ mnMinimalColumnCount(rImplementation.mnMinimalColumnCount),
+ mnMaximalColumnCount(rImplementation.mnMaximalColumnCount),
+ mnPageCount(rImplementation.mnPageCount),
+ mnColumnCount(rImplementation.mnColumnCount),
+ mnRowCount(rImplementation.mnRowCount),
+ mnMaxColumnCount(rImplementation.mnMaxColumnCount),
+ mnMaxRowCount(rImplementation.mnMaxRowCount),
+ maPageObjectSize(rImplementation.maPageObjectSize),
+ mpPageObjectLayouter(),
+ mpTheme(rImplementation.mpTheme)
{
- sal_Int32 nColumn = GetColumnAtPosition (rModelPoint.X(), true, GM_BOTH);
- sal_Int32 nColumnWidth
- = maPageObjectModelSize.Width() + mnTotalHorizontalGap.mnModel;
- sal_Int32 nDistanceIntoColumn =
- rModelPoint.X() - mnLeftBorder.mnModel - mnLeftPageBorder.mnModel
- - nColumn * nColumnWidth;
+}
+
+
- sal_Int32 nRow = GetRowAtPosition (rModelPoint.Y(), true, GM_BOTH);
- sal_Int32 nRowHeight
- = maPageObjectModelSize.Height() + mnTotalVerticalGap.mnModel;
- sal_Int32 nDistanceIntoRow =
- rModelPoint.Y() - mnTopBorder.mnModel - mnTopPageBorder.mnModel
- - nRow * nRowHeight;
- return DoublePoint (
- nColumn + double(nDistanceIntoColumn) / double(nColumnWidth),
- nRow + double(nDistanceIntoRow) / double(nRowHeight));
+Layouter::Implementation::~Implementation (void)
+{
}
-Point Layouter::ConvertLayouterToModelCoordinates (
- const DoublePoint & rLayouterPoint) const
+bool Layouter::Implementation::Rearrange (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const sal_uInt32 nPageCount)
{
- sal_Int32 nColumn = (sal_Int32) ::rtl::math::round(rLayouterPoint.first,
- 0,rtl_math_RoundingMode_Floor);
- sal_Int32 nColumnWidth
- = maPageObjectModelSize.Width() + mnTotalHorizontalGap.mnModel;
- sal_Int32 nDistanceIntoColumn
- = (sal_Int32)((rLayouterPoint.first - nColumn) * nColumnWidth);
+ mnPageCount = nPageCount;
- sal_Int32 nRow = (sal_Int32) ::rtl::math::round(rLayouterPoint.second,
- 0,rtl_math_RoundingMode_Floor);
- sal_Int32 nRowHeight
- = maPageObjectModelSize.Height() + mnTotalVerticalGap.mnModel;
- sal_Int32 nDistanceIntoRow
- = (sal_Int32)((rLayouterPoint.second - nRow) * nRowHeight);
+ // Return early when the window or the model have not yet been initialized.
+ if (rWindowSize.Width()<=0 || rWindowSize.Height()<=0)
+ return false;
+ if (rPreviewModelSize.Width()<=0 || rPreviewModelSize.Height()<=0)
+ return false;
- return Point (
- mnLeftBorder.mnModel + mnLeftPageBorder.mnModel
- + nColumn * nColumnWidth + nDistanceIntoColumn,
- mnTopBorder.mnModel + mnTopPageBorder.mnModel
- + nRow * nRowHeight + nDistanceIntoRow);
+ CalculateRowAndColumnCount(rWindowSize);
+
+ // Update the border values.
+ mnLeftBorder = mnRequestedLeftBorder;
+ mnTopBorder = mnRequestedTopBorder;
+ mnRightBorder = mnRequestedRightBorder;
+ mnBottomBorder = mnRequestedBottomBorder;
+ if (mnColumnCount > 1)
+ {
+ int nMinimumBorderWidth = mnHorizontalGap/2;
+ if (mnLeftBorder < nMinimumBorderWidth)
+ mnLeftBorder = nMinimumBorderWidth;
+ if (mnRightBorder < nMinimumBorderWidth)
+ mnRightBorder = nMinimumBorderWidth;
+ }
+ else
+ {
+ int nMinimumBorderHeight = mnVerticalGap/2;
+ if (mnTopBorder < nMinimumBorderHeight)
+ mnTopBorder = nMinimumBorderHeight;
+ if (mnBottomBorder < nMinimumBorderHeight)
+ mnBottomBorder = nMinimumBorderHeight;
+ }
+
+ mpPageObjectLayouter.reset(
+ new PageObjectLayouter(
+ mpTheme,
+ CalculateTargetSize(rWindowSize, rPreviewModelSize),
+ rPreviewModelSize,
+ mpWindow,
+ mnPageCount));
+ maPageObjectSize = mpPageObjectLayouter->GetSize(
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::WindowCoordinateSystem);
+
+ CalculateMaxRowAndColumnCount(rWindowSize);
+
+ return true;
}
-sal_Int32 Layouter::GetRowAtPosition (
+sal_Int32 Layouter::Implementation::GetRowAtPosition (
sal_Int32 nYPosition,
bool bIncludeBordersAndGaps,
GapMembership eGapMembership) const
{
sal_Int32 nRow = -1;
- const sal_Int32 nY = nYPosition
- - mnTopBorder.mnModel - mnTopPageBorder.mnModel;
+ const sal_Int32 nY = nYPosition - mnTopBorder;
if (nY >= 0)
{
// Vertical distance from one row to the next.
- const sal_Int32 nRowOffset (
- maPageObjectModelSize.Height() + mnTotalVerticalGap.mnModel);
+ const sal_Int32 nRowOffset (maPageObjectSize.Height() + mnVerticalGap);
// Calculate row consisting of page objects and gap below.
nRow = nY / nRowOffset;
- const sal_Int32 nDistanceIntoGap (
- (nY - nRow*nRowOffset) - maPageObjectModelSize.Height());
+ const sal_Int32 nDistanceIntoGap ((nY - nRow*nRowOffset) - maPageObjectSize.Height());
// When inside the gap below then nYPosition is not over a page
// object.
if (nDistanceIntoGap > 0)
@@ -635,8 +720,7 @@ sal_Int32 Layouter::GetRowAtPosition (
nDistanceIntoGap,
eGapMembership,
nRow,
- mnBottomPageBorder.mnModel,
- mnVerticalGap.mnModel);
+ mnVerticalGap);
}
else if (bIncludeBordersAndGaps)
{
@@ -651,20 +735,18 @@ sal_Int32 Layouter::GetRowAtPosition (
-sal_Int32 Layouter::GetColumnAtPosition (
+sal_Int32 Layouter::Implementation::GetColumnAtPosition (
sal_Int32 nXPosition,
bool bIncludeBordersAndGaps,
GapMembership eGapMembership) const
{
sal_Int32 nColumn = -1;
- sal_Int32 nX = nXPosition
- - mnLeftBorder.mnModel - mnLeftPageBorder.mnModel;
+ sal_Int32 nX = nXPosition - mnLeftBorder;
if (nX >= 0)
{
// Horizontal distance from one column to the next.
- const sal_Int32 nColumnOffset (
- maPageObjectModelSize.Width() + mnTotalHorizontalGap.mnModel);
+ const sal_Int32 nColumnOffset (maPageObjectSize.Width() + mnHorizontalGap);
// Calculate row consisting of page objects and gap below.
nColumn = nX / nColumnOffset;
@@ -673,8 +755,7 @@ sal_Int32 Layouter::GetColumnAtPosition (
else if (nColumn >= mnColumnCount)
nColumn = mnColumnCount-1;
- const sal_Int32 nDistanceIntoGap (
- (nX - nColumn*nColumnOffset) - maPageObjectModelSize.Width());
+ const sal_Int32 nDistanceIntoGap ((nX - nColumn*nColumnOffset) - maPageObjectSize.Width());
// When inside the gap at the right then nXPosition is not over a
// page object.
if (nDistanceIntoGap > 0)
@@ -682,8 +763,7 @@ sal_Int32 Layouter::GetColumnAtPosition (
nDistanceIntoGap,
eGapMembership,
nColumn,
- mnRightPageBorder.mnModel,
- mnHorizontalGap.mnModel);
+ mnHorizontalGap);
}
else if (bIncludeBordersAndGaps)
{
@@ -698,11 +778,10 @@ sal_Int32 Layouter::GetColumnAtPosition (
-sal_Int32 Layouter::ResolvePositionInGap (
+sal_Int32 Layouter::Implementation::ResolvePositionInGap (
sal_Int32 nDistanceIntoGap,
GapMembership eGapMembership,
sal_Int32 nIndex,
- sal_Int32 nLeftOrTopPageBorder,
sal_Int32 nGap) const
{
switch (eGapMembership)
@@ -715,7 +794,7 @@ sal_Int32 Layouter::ResolvePositionInGap (
case GM_BOTH:
{
// The lower half of the gap belongs to the next row or column.
- sal_Int32 nFirstHalfGapWidth = nLeftOrTopPageBorder + nGap / 2;
+ sal_Int32 nFirstHalfGapWidth = nGap / 2;
if (nDistanceIntoGap > nFirstHalfGapWidth)
nIndex ++;
break;
@@ -731,9 +810,9 @@ sal_Int32 Layouter::ResolvePositionInGap (
break;
case GM_PAGE_BORDER:
- if (nDistanceIntoGap > nLeftOrTopPageBorder)
+ if (nDistanceIntoGap > 0)
{
- if (nDistanceIntoGap > nLeftOrTopPageBorder + nGap)
+ if (nDistanceIntoGap > nGap)
{
// Inside the border of the next row or column.
nIndex ++;
@@ -756,6 +835,721 @@ sal_Int32 Layouter::ResolvePositionInGap (
+void Layouter::Implementation::CalculateGeometricPosition (
+ InsertPosition& rPosition,
+ const Size& rIndicatorSize,
+ const bool bIsVertical,
+ model::SlideSorterModel& rModel) const
+{
+ // 1. Determine right/bottom of the leading page and the left/top of the
+ // trailing page object and how to distribute the missing space.
+ sal_Int32 nLeadingLocation (0);
+ sal_Int32 nTrailingLocation (0);
+ bool bIsLeadingFixed (false);
+ bool bIsTrailingFixed (false);
+ sal_Int32 nSecondaryLocation (0);
+ const sal_Int32 nIndex (rPosition.GetIndex());
+
+ if (rPosition.IsAtRunStart())
+ {
+ // Place indicator at the top of the column.
+ const Rectangle aOuterBox (GetPageObjectBox(nIndex));
+ const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex));
+ if (bIsVertical)
+ {
+ nLeadingLocation = aOuterBox.Top();
+ nTrailingLocation = aInnerBox.Top();
+ nSecondaryLocation = aInnerBox.Center().X();
+ }
+ else
+ {
+ nLeadingLocation = aOuterBox.Left();
+ nTrailingLocation = aInnerBox.Left();
+ nSecondaryLocation = aInnerBox.Center().Y();
+ }
+ bIsLeadingFixed = true;
+ }
+ else if (rPosition.IsAtRunEnd())
+ {
+ // Place indicator at the bottom/right of the column/row.
+
+ const Rectangle aOuterBox (GetPageObjectBox(nIndex-1));
+ const Rectangle aInnerBox (GetInnerBoundingBox(rModel, nIndex-1));
+ if (bIsVertical)
+ {
+ nLeadingLocation = aInnerBox.Bottom();
+ nTrailingLocation = aOuterBox.Bottom();
+ nSecondaryLocation = aInnerBox.Center().X();
+ }
+ else
+ {
+ nLeadingLocation = aInnerBox.Right();
+ nTrailingLocation = aOuterBox.Right();
+ nSecondaryLocation = aInnerBox.Center().Y();
+ }
+ bIsTrailingFixed = true;
+ if ( ! rPosition.IsExtraSpaceNeeded())
+ bIsLeadingFixed = true;
+ }
+ else
+ {
+ // Place indicator between two rows/columns.
+ const Rectangle aBox1 (GetInnerBoundingBox(rModel, nIndex-1));
+ const Rectangle aBox2 (GetInnerBoundingBox(rModel, nIndex));
+ if (bIsVertical)
+ {
+ nLeadingLocation = aBox1.Bottom();
+ nTrailingLocation = aBox2.Top();
+ nSecondaryLocation = (aBox1.Center().X() + aBox2.Center().X()) / 2;
+ }
+ else
+ {
+ nLeadingLocation = aBox1.Right();
+ nTrailingLocation = aBox2.Left();
+ nSecondaryLocation = (aBox1.Center().Y() + aBox2.Center().Y()) / 2;
+ }
+ }
+
+ // 2. Calculate the location of the insert indicator and the offsets of
+ // leading and trailing pages.
+ const sal_Int32 nAvailableSpace (nTrailingLocation - nLeadingLocation);
+ const sal_Int32 nRequiredSpace (bIsVertical ? rIndicatorSize.Height():rIndicatorSize.Width());
+ const sal_Int32 nMissingSpace (::std::max(sal_Int32(0), nRequiredSpace - nAvailableSpace));
+ sal_Int32 nPrimaryLocation (0);
+ sal_Int32 nLeadingOffset (0);
+ sal_Int32 nTrailingOffset (0);
+ if (bIsLeadingFixed)
+ {
+ nPrimaryLocation = nLeadingLocation + nRequiredSpace/2;
+ if ( ! bIsTrailingFixed)
+ nTrailingOffset = nMissingSpace;
+ }
+ else if (bIsTrailingFixed)
+ {
+ nPrimaryLocation = nTrailingLocation - nRequiredSpace/2;
+ nLeadingOffset = -nMissingSpace;
+ }
+ else
+ {
+ nPrimaryLocation = (nLeadingLocation + nTrailingLocation) /2;
+ nLeadingOffset = -nMissingSpace/2;
+ nTrailingOffset = nMissingSpace + nLeadingOffset;
+ }
+
+ if (bIsVertical)
+ {
+ rPosition.SetGeometricalPosition(
+ Point(nSecondaryLocation, nPrimaryLocation),
+ Point(0, nLeadingOffset),
+ Point(0, nTrailingOffset));
+ }
+ else
+ {
+ rPosition.SetGeometricalPosition(
+ Point(nPrimaryLocation, nSecondaryLocation),
+ Point(nLeadingOffset, 0),
+ Point(nTrailingOffset, 0));
+ }
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetInnerBoundingBox (
+ model::SlideSorterModel& rModel,
+ const sal_Int32 nIndex) const
+{
+ model::SharedPageDescriptor pDescriptor (rModel.GetPageDescriptor(nIndex));
+ if ( ! pDescriptor)
+ return Rectangle();
+
+ const Point aLocation (pDescriptor->GetLocation(true));
+ if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ return mpPageObjectLayouter->GetBoundingBox(
+ aLocation,
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem);
+ else
+ return mpPageObjectLayouter->GetBoundingBox(
+ aLocation,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem);
+}
+
+
+
+
+Range Layouter::Implementation::GetValidHorizontalSizeRange (void) const
+{
+ return Range(
+ mnLeftBorder + maMinimalSize.Width() + mnRightBorder,
+ mnLeftBorder + maMaximalSize.Width() + mnRightBorder);
+}
+
+
+
+
+Range Layouter::Implementation::GetValidVerticalSizeRange (void) const
+{
+ return Range(
+ mnTopBorder + maMinimalSize.Height() + mnBottomBorder,
+ mnTopBorder + maMaximalSize.Height() + mnBottomBorder);
+}
+
+
+
+
+Range Layouter::Implementation::GetRangeOfVisiblePageObjects (const Rectangle& aVisibleArea) const
+{
+ const sal_Int32 nRow0 (GetRowAtPosition(aVisibleArea.Top(), true, GM_NEXT));
+ const sal_Int32 nCol0 (GetColumnAtPosition(aVisibleArea.Left(),true, GM_NEXT));
+ const sal_Int32 nRow1 (GetRowAtPosition(aVisibleArea.Bottom(), true, GM_PREVIOUS));
+ const sal_Int32 nCol1 (GetColumnAtPosition(aVisibleArea.Right(), true, GM_PREVIOUS));
+
+ // When start and end lie in different rows then the range may include
+ // slides outside (left or right of) the given area.
+ return Range(GetIndex(nRow0,nCol0,true), GetIndex(nRow1,nCol1,true));
+}
+
+
+
+
+Size Layouter::Implementation::GetTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize,
+ const bool bCalculateWidth,
+ const bool bCalculateHeight) const
+{
+ (void)rPreviewModelSize;
+
+ if (mnColumnCount<=0 || mnRowCount<=0)
+ return maPreferredSize;
+ if ( ! (bCalculateWidth || bCalculateHeight))
+ {
+ OSL_ASSERT(bCalculateWidth || bCalculateHeight);
+ return maPreferredSize;
+ }
+
+ // Calculate the width of each page object.
+ Size aTargetSize (0,0);
+ if (bCalculateWidth)
+ aTargetSize.setWidth(
+ (rWindowSize.Width() - mnLeftBorder - mnRightBorder
+ - (mnColumnCount-1) * mnHorizontalGap)
+ / mnColumnCount);
+ else if (bCalculateHeight)
+ aTargetSize.setHeight(
+ (rWindowSize.Height() - mnTopBorder - mnBottomBorder
+ - (mnRowCount-1) * mnVerticalGap)
+ / mnRowCount);
+
+ if (bCalculateWidth)
+ {
+ if (aTargetSize.Width() < maMinimalSize.Width())
+ aTargetSize.setWidth(maMinimalSize.Width());
+ else if (aTargetSize.Width() > maMaximalSize.Width())
+ aTargetSize.setWidth(maMaximalSize.Width());
+ }
+ else if (bCalculateHeight)
+ {
+ if (aTargetSize.Height() < maMinimalSize.Height())
+ aTargetSize.setHeight(maMinimalSize.Height());
+ else if (aTargetSize.Height() > maMaximalSize.Height())
+ aTargetSize.setHeight(maMaximalSize.Height());
+ }
+
+ return aTargetSize;
+}
+
+
+
+
+sal_Int32 Layouter::Implementation::GetIndex (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const bool bClampToValidRange) const
+{
+ if (nRow >= 0 && nColumn >= 0)
+ {
+ const sal_Int32 nIndex (nRow * mnColumnCount + nColumn);
+ if (nIndex >= mnPageCount)
+ if (bClampToValidRange)
+ return mnPageCount-1;
+ else
+ return -1;
+ else
+ return nIndex;
+ }
+ else if (bClampToValidRange)
+ return 0;
+ else
+ return -1;
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetPageObjectBox (
+ const sal_Int32 nIndex,
+ const bool bIncludeBorderAndGap) const
+{
+ const sal_Int32 nRow (nIndex / mnColumnCount);
+ const sal_Int32 nColumn (nIndex % mnColumnCount);
+
+ const Rectangle aBoundingBox (GetPageObjectBox(nRow,nColumn));
+ if (bIncludeBorderAndGap)
+ return AddBorderAndGap(aBoundingBox, nRow, nColumn);
+ else
+ return aBoundingBox;
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetPageObjectBox (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const
+{
+ return Rectangle(
+ Point (mnLeftBorder
+ + nColumn * maPageObjectSize.Width()
+ + (nColumn>0 ? nColumn : 0) * mnHorizontalGap,
+ mnTopBorder
+ + nRow * maPageObjectSize.Height()
+ + (nRow>0 ? nRow : 0) * mnVerticalGap),
+ maPageObjectSize);
+}
+
+
+
+
+
+Rectangle Layouter::Implementation::AddBorderAndGap (
+ const Rectangle& rBoundingBox,
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn) const
+{
+ Rectangle aBoundingBox (rBoundingBox);
+
+ if (nColumn == 0)
+ aBoundingBox.Left() = 0;
+ else
+ aBoundingBox.Left() -= mnHorizontalGap/2;
+ if (nColumn == mnColumnCount-1)
+ aBoundingBox.Right() += mnRightBorder;
+ else
+ aBoundingBox.Right() += mnHorizontalGap/2;
+ if (nRow == 0)
+ aBoundingBox.Top() = 0;
+ else
+ aBoundingBox.Top() -= mnVerticalGap/2;
+ if (nRow == mnRowCount-1)
+ aBoundingBox.Bottom() += mnBottomBorder;
+ else
+ aBoundingBox.Bottom() += mnVerticalGap/2;
+ return aBoundingBox;
+}
+
+
+
+
+Rectangle Layouter::Implementation::GetTotalBoundingBox (void) const
+{
+ sal_Int32 nHorizontalSize = 0;
+ sal_Int32 nVerticalSize = 0;
+ if (mnColumnCount > 0)
+ {
+ sal_Int32 nRowCount = (mnPageCount+mnColumnCount-1) / mnColumnCount;
+ nHorizontalSize =
+ mnLeftBorder
+ + mnRightBorder
+ + mnColumnCount * maPageObjectSize.Width();
+ if (mnColumnCount > 1)
+ nHorizontalSize += (mnColumnCount-1) * mnHorizontalGap;
+ nVerticalSize =
+ mnTopBorder
+ + mnBottomBorder
+ + nRowCount * maPageObjectSize.Height();
+ if (nRowCount > 1)
+ nVerticalSize += (nRowCount-1) * mnVerticalGap;
+ }
+
+ return Rectangle (
+ Point(0,0),
+ Size (nHorizontalSize, nVerticalSize)
+ );
+}
+
+
+
+
+void Layouter::Implementation::CalculateVerticalLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ const sal_Int32 nY = rModelPosition.Y() - mnTopBorder + maPageObjectSize.Height()/2;
+ const sal_Int32 nRowHeight (maPageObjectSize.Height() + mnVerticalGap);
+ const sal_Int32 nRow (::std::min(mnPageCount, nY / nRowHeight));
+ rPosition.SetLogicalPosition (
+ nRow,
+ 0,
+ nRow,
+ (nRow == 0),
+ (nRow == mnRowCount),
+ (nRow >= mnMaxRowCount));
+}
+
+
+
+
+//===== HorizontalImplementation ================================================
+
+HorizontalImplementation::HorizontalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : Implementation(rpWindow, rpTheme)
+{
+}
+
+
+
+
+HorizontalImplementation::HorizontalImplementation (const Implementation& rImplementation)
+ : Implementation(rImplementation)
+{
+}
+
+
+
+
+Layouter::Orientation HorizontalImplementation::GetOrientation (void) const
+{
+ return Layouter::HORIZONTAL;
+}
+
+
+
+
+void HorizontalImplementation::CalculateRowAndColumnCount (const Size& rWindowSize)
+{
+ (void)rWindowSize;
+
+ // Row and column count are fixed (for a given page count.)
+ mnColumnCount = mnPageCount;
+ mnRowCount = 1;
+}
+
+
+
+
+void HorizontalImplementation::CalculateMaxRowAndColumnCount (const Size& rWindowSize)
+{
+ mnMaxColumnCount = (rWindowSize.Width() - mnLeftBorder - mnRightBorder)
+ / (maPageObjectSize.Width() + mnHorizontalGap);
+ mnMaxRowCount = 1;
+}
+
+
+
+
+Size HorizontalImplementation::CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const
+{
+ return Implementation::GetTargetSize(rWindowSize, rPreviewModelSize, false, true);
+}
+
+
+
+
+void HorizontalImplementation::CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ const sal_Int32 nX = rModelPosition.X() - mnLeftBorder + maPageObjectSize.Width()/2;
+ const sal_Int32 nColumnWidth (maPageObjectSize.Width() + mnHorizontalGap);
+ const sal_Int32 nColumn (::std::min(mnPageCount, nX / nColumnWidth));
+ rPosition.SetLogicalPosition (
+ 0,
+ nColumn,
+ nColumn,
+ (nColumn == 0),
+ (nColumn == mnColumnCount),
+ (nColumn >= mnMaxColumnCount));
+}
+
+
+
+
+//===== VerticalImplementation ================================================
+
+VerticalImplementation::VerticalImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : Implementation(rpWindow, rpTheme)
+{
+}
+
+
+
+
+VerticalImplementation::VerticalImplementation (const Implementation& rImplementation)
+ : Implementation(rImplementation)
+{
+}
+
+
+
+
+Layouter::Orientation VerticalImplementation::GetOrientation (void) const
+{
+ return Layouter::VERTICAL;
+}
+
+
+
+
+void VerticalImplementation::CalculateRowAndColumnCount (const Size& rWindowSize)
+{
+ (void)rWindowSize;
+
+ // Row and column count are fixed (for a given page count.)
+ mnRowCount = mnPageCount;
+ mnColumnCount = 1;
+
+}
+
+
+
+
+void VerticalImplementation::CalculateMaxRowAndColumnCount (const Size& rWindowSize)
+{
+ mnMaxRowCount = (rWindowSize.Height() - mnTopBorder - mnBottomBorder)
+ / (maPageObjectSize.Height() + mnVerticalGap);
+ mnMaxColumnCount = 1;
+}
+
+
+
+
+Size VerticalImplementation::CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const
+{
+ return Implementation::GetTargetSize(rWindowSize, rPreviewModelSize, true, false);
+}
+
+
+
+
+void VerticalImplementation::CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ return CalculateVerticalLogicalInsertPosition(rModelPosition, rPosition);
+}
+
+
+
+
+//===== GridImplementation ================================================
+
+GridImplementation::GridImplementation (
+ const SharedSdWindow& rpWindow,
+ const ::boost::shared_ptr<view::Theme>& rpTheme)
+ : Implementation(rpWindow, rpTheme)
+{
+}
+
+
+
+
+GridImplementation::GridImplementation (const Implementation& rImplementation)
+ : Implementation(rImplementation)
+{
+}
+
+
+
+
+Layouter::Orientation GridImplementation::GetOrientation (void) const
+{
+ return Layouter::GRID;
+}
+
+
+
+
+void GridImplementation::CalculateRowAndColumnCount (const Size& rWindowSize)
+{
+ // Calculate the column count.
+ mnColumnCount
+ = (rWindowSize.Width() - mnRequestedLeftBorder - mnRequestedRightBorder)
+ / (maPreferredSize.Width() + mnHorizontalGap);
+ if (mnColumnCount < mnMinimalColumnCount)
+ mnColumnCount = mnMinimalColumnCount;
+ if (mnColumnCount > mnMaximalColumnCount)
+ mnColumnCount = mnMaximalColumnCount;
+ mnRowCount = (mnPageCount + mnColumnCount-1)/mnColumnCount;
+}
+
+
+
+
+void GridImplementation::CalculateMaxRowAndColumnCount (const Size& rWindowSize)
+{
+ mnMaxColumnCount = (rWindowSize.Width() - mnLeftBorder - mnRightBorder)
+ / (maPageObjectSize.Width() + mnHorizontalGap);
+ mnMaxRowCount = (rWindowSize.Height() - mnTopBorder - mnBottomBorder)
+ / (maPageObjectSize.Height() + mnVerticalGap);
+}
+
+
+
+
+
+Size GridImplementation::CalculateTargetSize (
+ const Size& rWindowSize,
+ const Size& rPreviewModelSize) const
+{
+ return Implementation::GetTargetSize(rWindowSize, rPreviewModelSize, true, true);
+}
+
+
+
+
+void GridImplementation::CalculateLogicalInsertPosition (
+ const Point& rModelPosition,
+ InsertPosition& rPosition) const
+{
+ if (mnColumnCount == 1)
+ {
+ CalculateVerticalLogicalInsertPosition(rModelPosition, rPosition);
+ }
+ else
+ {
+ // Handle the general case of more than one column.
+ sal_Int32 nRow (::std::min(
+ mnRowCount-1,
+ GetRowAtPosition (rModelPosition.Y(), true, GM_BOTH)));
+ const sal_Int32 nX = rModelPosition.X() - mnLeftBorder + maPageObjectSize.Width()/2;
+ const sal_Int32 nColumnWidth (maPageObjectSize.Width() + mnHorizontalGap);
+ sal_Int32 nColumn (::std::min(mnColumnCount, nX / nColumnWidth));
+ sal_Int32 nIndex (nRow * mnColumnCount + nColumn);
+ bool bIsAtRunEnd (nColumn == mnColumnCount);
+
+ if (nIndex >= mnPageCount)
+ {
+ nIndex = mnPageCount;
+ nRow = mnRowCount-1;
+ nColumn = ::std::min(::std::min(mnPageCount, mnColumnCount), nColumn);
+ bIsAtRunEnd = true;
+ }
+
+ rPosition.SetLogicalPosition (
+ nRow,
+ nColumn,
+ nIndex,
+ (nColumn == 0),
+ bIsAtRunEnd,
+ (nColumn >= mnMaxColumnCount));
+ }
+}
+
+
+
+
+//===== InsertPosition ========================================================
+
+InsertPosition::InsertPosition (void)
+ : mnRow(-1),
+ mnColumn(-1),
+ mnIndex(-1),
+ mbIsAtRunStart(false),
+ mbIsAtRunEnd(false),
+ mbIsExtraSpaceNeeded(false),
+ maLocation(0,0),
+ maLeadingOffset(0,0),
+ maTrailingOffset(0,0)
+{
+}
+
+
+
+
+InsertPosition& InsertPosition::operator= (const InsertPosition& rInsertPosition)
+{
+ if (this != &rInsertPosition)
+ {
+ mnRow = rInsertPosition.mnRow;
+ mnColumn = rInsertPosition.mnColumn;
+ mnIndex = rInsertPosition.mnIndex;
+ mbIsAtRunStart = rInsertPosition.mbIsAtRunStart;
+ mbIsAtRunEnd = rInsertPosition.mbIsAtRunEnd;
+ mbIsExtraSpaceNeeded = rInsertPosition.mbIsExtraSpaceNeeded;
+ maLocation = rInsertPosition.maLocation;
+ maLeadingOffset = rInsertPosition.maLeadingOffset;
+ maTrailingOffset = rInsertPosition.maTrailingOffset;
+ }
+ return *this;
+}
+
+
+
+
+bool InsertPosition::operator== (const InsertPosition& rInsertPosition) const
+{
+ // Do not compare the geometrical information (maLocation).
+ return mnRow==rInsertPosition.mnRow
+ && mnColumn==rInsertPosition.mnColumn
+ && mnIndex==rInsertPosition.mnIndex
+ && mbIsAtRunStart==rInsertPosition.mbIsAtRunStart
+ && mbIsAtRunEnd==rInsertPosition.mbIsAtRunEnd
+ && mbIsExtraSpaceNeeded==rInsertPosition.mbIsExtraSpaceNeeded;
+}
+
+
+
+
+bool InsertPosition::operator!= (const InsertPosition& rInsertPosition) const
+{
+ return !operator==(rInsertPosition);
+}
+
+
+
+
+void InsertPosition::SetLogicalPosition (
+ const sal_Int32 nRow,
+ const sal_Int32 nColumn,
+ const sal_Int32 nIndex,
+ const bool bIsAtRunStart,
+ const bool bIsAtRunEnd,
+ const bool bIsExtraSpaceNeeded)
+{
+ mnRow = nRow;
+ mnColumn = nColumn;
+ mnIndex = nIndex;
+ mbIsAtRunStart = bIsAtRunStart;
+ mbIsAtRunEnd = bIsAtRunEnd;
+ mbIsExtraSpaceNeeded = bIsExtraSpaceNeeded;
+}
+
+
+
+
+void InsertPosition::SetGeometricalPosition(
+ const Point aLocation,
+ const Point aLeadingOffset,
+ const Point aTrailingOffset)
+{
+ maLocation = aLocation;
+ maLeadingOffset = aLeadingOffset;
+ maTrailingOffset = aTrailingOffset;
+}
+
+
+
} } } // end of namespace ::sd::slidesorter::namespace
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
new file mode 100644
index 000000000000..d798fa27accb
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
@@ -0,0 +1,287 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsPageObjectLayouter.hxx"
+
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlsFontProvider.hxx"
+#include "view/SlsTheme.hxx"
+#include "tools/IconCache.hxx"
+#include "Window.hxx"
+#include "res_bmp.hrc"
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+const static sal_Int32 gnLeftPageNumberOffset = 2;
+const static sal_Int32 gnRightPageNumberOffset = 5;
+const static sal_Int32 gnOuterBorderWidth = 5;
+const static sal_Int32 gnInfoAreaMinWidth = 26;
+}
+
+PageObjectLayouter::PageObjectLayouter (
+ const ::boost::shared_ptr<Theme>& rpTheme,
+ const Size& rPageObjectWindowSize,
+ const Size& rPageSize,
+ const SharedSdWindow& rpWindow,
+ const sal_Int32 nPageCount)
+ : mpWindow(rpWindow),
+ maPageObjectSize(rPageObjectWindowSize.Width(), rPageObjectWindowSize.Height()),
+ mnModelToWindowScale(1),
+ maPageObjectBoundingBox(),
+ maPageNumberAreaBoundingBox(),
+ maPreviewBoundingBox(),
+ maTransitionEffectBoundingBox(),
+ maTransitionEffectIcon(IconCache::Instance().GetIcon(BMP_FADE_EFFECT_INDICATOR)),
+ mpPageNumberFont(Theme::GetFont(Theme::Font_PageNumber, *rpWindow))
+{
+ const Size aPageNumberAreaSize (GetPageNumberAreaSize(nPageCount));
+
+ const int nMaximumBorderWidth (gnOuterBorderWidth);
+ const int nFocusIndicatorWidth (rpTheme->GetIntegerValue(Theme::Integer_FocusIndicatorWidth));
+
+ maPreviewBoundingBox = CalculatePreviewBoundingBox(
+ maPageObjectSize,
+ Size(rPageSize.Width(), rPageSize.Height()),
+ aPageNumberAreaSize.Width(),
+ nFocusIndicatorWidth);
+ maFocusIndicatorBoundingBox = Rectangle(Point(0,0), maPageObjectSize);
+ maPageObjectBoundingBox = Rectangle(
+ Point(
+ nFocusIndicatorWidth,
+ nFocusIndicatorWidth),
+ Size(
+ maPageObjectSize.Width()-2*nFocusIndicatorWidth,
+ maPageObjectSize.Height()-2*nFocusIndicatorWidth));
+
+ maPageNumberAreaBoundingBox = Rectangle(
+ Point(
+ std::max(gnLeftPageNumberOffset,
+ sal_Int32(maPreviewBoundingBox.Left()
+ - gnRightPageNumberOffset
+ - aPageNumberAreaSize.Width())),
+ nMaximumBorderWidth),
+ aPageNumberAreaSize);
+
+ const Size aIconSize (maTransitionEffectIcon.GetSizePixel());
+ maTransitionEffectBoundingBox = Rectangle(
+ Point(
+ (maPreviewBoundingBox.Left() - aIconSize.Width()) / 2,
+ maPreviewBoundingBox.Bottom() - aIconSize.Height()),
+ aIconSize);
+}
+
+
+
+
+PageObjectLayouter::~PageObjectLayouter(void)
+{
+}
+
+
+
+
+Rectangle PageObjectLayouter::CalculatePreviewBoundingBox (
+ Size& rPageObjectSize,
+ const Size& rPageSize,
+ const sal_Int32 nPageNumberAreaWidth,
+ const sal_Int32 nFocusIndicatorWidth)
+{
+ const sal_Int32 nIconWidth (maTransitionEffectIcon.GetSizePixel().Width());
+ const sal_Int32 nLeftAreaWidth (
+ ::std::max(
+ gnInfoAreaMinWidth,
+ gnRightPageNumberOffset
+ + ::std::max(
+ nPageNumberAreaWidth,
+ nIconWidth)));
+ sal_Int32 nPreviewWidth;
+ sal_Int32 nPreviewHeight;
+ const double nPageAspectRatio (double(rPageSize.Width()) / double(rPageSize.Height()));
+ if (rPageObjectSize.Height() == 0)
+ {
+ // Calculate height so that the preview fills the available
+ // horizontal space completely while observing the aspect ratio of
+ // the preview.
+ nPreviewWidth = rPageObjectSize.Width()
+ - nLeftAreaWidth - gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ nPreviewHeight = ::basegfx::fround(nPreviewWidth / nPageAspectRatio);
+ rPageObjectSize.setHeight(nPreviewHeight + 2*gnOuterBorderWidth + 2*nFocusIndicatorWidth + 1);
+ }
+ else if (rPageObjectSize.Width() == 0)
+ {
+ // Calculate the width of the page object so that the preview fills
+ // the available vertical space completely while observing the
+ // aspect ratio of the preview.
+ nPreviewHeight = rPageObjectSize.Height() - 2*gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ nPreviewWidth = ::basegfx::fround(nPreviewHeight * nPageAspectRatio);
+ rPageObjectSize.setWidth(nPreviewWidth
+ + nLeftAreaWidth + gnOuterBorderWidth + 2*nFocusIndicatorWidth + 1);
+
+ }
+ else
+ {
+ // The size of the page object is given. Calculate the size of the
+ // preview.
+ nPreviewWidth = rPageObjectSize.Width()
+ - nLeftAreaWidth - gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ nPreviewHeight = rPageObjectSize.Height()
+ - gnOuterBorderWidth - 2*nFocusIndicatorWidth - 1;
+ if (double(nPreviewWidth)/double(nPreviewHeight) > nPageAspectRatio)
+ nPreviewWidth = ::basegfx::fround(nPreviewHeight * nPageAspectRatio);
+ else
+ nPreviewHeight = ::basegfx::fround(nPreviewWidth / nPageAspectRatio);
+ }
+ // When the preview does not fill the available space completely then
+ // place it flush right and vertically centered.
+ const int nLeft (rPageObjectSize.Width()
+ - gnOuterBorderWidth - nPreviewWidth - nFocusIndicatorWidth - 1);
+ const int nTop ((rPageObjectSize.Height() - nPreviewHeight)/2);
+ return Rectangle(
+ nLeft,
+ nTop,
+ nLeft + nPreviewWidth,
+ nTop + nPreviewHeight);
+}
+
+
+
+
+Rectangle PageObjectLayouter::GetBoundingBox (
+ const model::SharedPageDescriptor& rpPageDescriptor,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem)
+{
+ OSL_ASSERT(rpPageDescriptor);
+ Point aLocation (rpPageDescriptor ? rpPageDescriptor->GetLocation() : Point(0,0));
+ return GetBoundingBox(aLocation, ePart, eCoordinateSystem);
+}
+
+
+
+
+Rectangle PageObjectLayouter::GetBoundingBox (
+ const Point& rPageObjectLocation,
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem)
+{
+ Rectangle aBoundingBox;
+ switch (ePart)
+ {
+ case FocusIndicator:
+ aBoundingBox = maFocusIndicatorBoundingBox;
+ break;
+
+ case PageObject:
+ case MouseOverIndicator:
+ aBoundingBox = maPageObjectBoundingBox;
+ break;
+
+ case Preview:
+ aBoundingBox = maPreviewBoundingBox;
+ break;
+
+ case PageNumber:
+ aBoundingBox = maPageNumberAreaBoundingBox;
+ break;
+
+ case Name:
+ aBoundingBox = maPageNumberAreaBoundingBox;
+ break;
+
+ case TransitionEffectIndicator:
+ aBoundingBox = maTransitionEffectBoundingBox;
+ break;
+ }
+
+ // Adapt coordinates to the requested coordinate system.
+ Point aLocation (rPageObjectLocation);
+ if (eCoordinateSystem == WindowCoordinateSystem)
+ aLocation += mpWindow->GetMapMode().GetOrigin();
+
+ return Rectangle(
+ aBoundingBox.TopLeft() + aLocation,
+ aBoundingBox.BottomRight() + aLocation);
+}
+
+
+
+
+Size PageObjectLayouter::GetSize (
+ const Part ePart,
+ const CoordinateSystem eCoordinateSystem)
+{
+ return GetBoundingBox(Point(0,0), ePart, eCoordinateSystem).GetSize();
+}
+
+
+
+
+Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount)
+{
+ OSL_ASSERT(mpWindow);
+
+ // Set the correct font.
+ Font aOriginalFont (mpWindow->GetFont());
+ if (mpPageNumberFont)
+ mpWindow->SetFont(*mpPageNumberFont);
+
+ String sPageNumberTemplate;
+ if (nPageCount < 10)
+ sPageNumberTemplate = String::CreateFromAscii("9");
+ else if (nPageCount < 100)
+ sPageNumberTemplate = String::CreateFromAscii("99");
+ else if (nPageCount < 200)
+ // Just for the case that 1 is narrower than 9.
+ sPageNumberTemplate = String::CreateFromAscii("199");
+ else if (nPageCount < 1000)
+ sPageNumberTemplate = String::CreateFromAscii("999");
+ else
+ sPageNumberTemplate = String::CreateFromAscii("9999");
+ // More then 9999 pages are not handled.
+
+ const Size aSize (
+ mpWindow->GetTextWidth(sPageNumberTemplate),
+ mpWindow->GetTextHeight());
+
+ mpWindow->SetFont(aOriginalFont);
+
+ return aSize;
+}
+
+
+
+
+Image PageObjectLayouter::GetTransitionEffectIcon (void) const
+{
+ return maTransitionEffectIcon;
+}
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
new file mode 100644
index 000000000000..cb78c1a12f71
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -0,0 +1,584 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsPageObjectPainter.hxx"
+
+#include "model/SlsPageDescriptor.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsPageObjectLayouter.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include "view/SlsButtonBar.hxx"
+#include "SlsFramePainter.hxx"
+#include "cache/SlsPageCache.hxx"
+#include "controller/SlsProperties.hxx"
+#include "Window.hxx"
+#include "sdpage.hxx"
+#include "sdresid.hxx"
+#include <vcl/svapp.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/virdev.hxx>
+#include <boost/scoped_ptr.hpp>
+
+using namespace ::drawinglayer::primitive2d;
+
+namespace sd { namespace slidesorter { namespace view {
+
+namespace {
+
+sal_uInt8 Blend (
+ const sal_uInt8 nValue1,
+ const sal_uInt8 nValue2,
+ const double nWeight)
+{
+ const double nValue (nValue1*(1-nWeight) + nValue2 * nWeight);
+ if (nValue < 0)
+ return 0;
+ else if (nValue > 255)
+ return 255;
+ else
+ return (sal_uInt8)nValue;
+}
+
+sal_uInt8 ClampColorChannel (const double nValue)
+{
+ if (nValue <= 0)
+ return 0;
+ else if (nValue >= 255)
+ return 255;
+ else
+ return sal_uInt8(nValue);
+}
+
+sal_uInt8 CalculateColorChannel(
+ const double nColor1,
+ const double nColor2,
+ const double nAlpha1,
+ const double nAlpha2,
+ const double nAlpha0)
+{
+ if (nAlpha0 == 0)
+ return 0;
+
+ const double nColor0 ((nAlpha1*nColor1 + nAlpha1*nAlpha2*nColor1 + nAlpha2*nColor2) / nAlpha0);
+ return ClampColorChannel(255 * nColor0);
+}
+
+} // end of anonymous namespace
+
+
+
+
+//===== PageObjectPainter =====================================================
+
+PageObjectPainter::PageObjectPainter (
+ const SlideSorter& rSlideSorter)
+ : mrLayouter(rSlideSorter.GetView().GetLayouter()),
+ mpPageObjectLayouter(),
+ mpCache(rSlideSorter.GetView().GetPreviewCache()),
+ mpProperties(rSlideSorter.GetProperties()),
+ mpTheme(rSlideSorter.GetTheme()),
+ mpPageNumberFont(Theme::GetFont(Theme::Font_PageNumber, *rSlideSorter.GetContentWindow())),
+ mpShadowPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_RawShadow))),
+ mpFocusBorderPainter(new FramePainter(mpTheme->GetIcon(Theme::Icon_FocusBorder))),
+ maNormalBackground(),
+ maSelectionBackground(),
+ maFocusedSelectionBackground(),
+ maMouseOverBackground(),
+ maMouseOverFocusedBackground(),
+ msUnhideString(mpTheme->GetString(Theme::String_Unhide)),
+ mrButtonBar(rSlideSorter.GetView().GetButtonBar())
+{
+ // Replace the color (not the alpha values) in the focus border with a
+ // color derived from the current selection color.
+ Color aColor (mpTheme->GetColor(Theme::Color_Selection));
+ sal_uInt16 nHue, nSat, nBri;
+ aColor.RGBtoHSB(nHue, nSat, nBri);
+ aColor = Color::HSBtoRGB(nHue, 28, 65);
+ mpFocusBorderPainter->AdaptColor(aColor, true);
+}
+
+
+
+
+PageObjectPainter::~PageObjectPainter (void)
+{
+}
+
+
+
+
+void PageObjectPainter::PaintPageObject (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ // The page object layouter is quite volatile. It may have been replaced
+ // since the last call. Update it now.
+ mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
+ if ( ! mpPageObjectLayouter)
+ {
+ OSL_ASSERT(mpPageObjectLayouter);
+ return;
+ }
+
+ // Turn off antialiasing to avoid the bitmaps from being shifted by
+ // fractions of a pixel and thus show blurry edges.
+ const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing());
+ rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW);
+
+ PaintBackground(rDevice, rpDescriptor);
+ PaintPreview(rDevice, rpDescriptor);
+ PaintPageNumber(rDevice, rpDescriptor);
+ PaintTransitionEffect(rDevice, rpDescriptor);
+ mrButtonBar.Paint(rDevice, rpDescriptor);
+
+ rDevice.SetAntialiasing(nSavedAntialiasingMode);
+}
+
+
+
+
+void PageObjectPainter::NotifyResize (const bool bForce)
+{
+ (void)bForce;
+ maNormalBackground.SetEmpty();
+ maSelectionBackground.SetEmpty();
+ maFocusedSelectionBackground.SetEmpty();
+ maFocusedBackground.SetEmpty();
+ maMouseOverBackground.SetEmpty();
+ maMouseOverFocusedBackground.SetEmpty();
+ maMouseOverSelectedAndFocusedBackground.SetEmpty();
+}
+
+
+
+
+void PageObjectPainter::SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme)
+{
+ mpTheme = rpTheme;
+ NotifyResize(true);
+}
+
+
+
+
+void PageObjectPainter::PaintBackground (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor)
+{
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ const Bitmap& rBackground (GetBackgroundForState(rpDescriptor, rDevice));
+ rDevice.DrawBitmap(aBox.TopLeft(), rBackground);
+
+ // Fill the interior of the preview area with the default background
+ // color of the page.
+ SdPage* pPage = rpDescriptor->GetPage();
+ if (pPage != NULL)
+ {
+ rDevice.SetFillColor(pPage->GetPageBackgroundColor(NULL));
+ rDevice.SetLineColor(pPage->GetPageBackgroundColor(NULL));
+ const Rectangle aPreviewBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ rDevice.DrawRect(aPreviewBox);
+ }
+}
+
+
+
+
+void PageObjectPainter::PaintPreview (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const
+{
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ if (mpCache != NULL)
+ {
+ const SdrPage* pPage = rpDescriptor->GetPage();
+ mpCache->SetPreciousFlag(pPage, true);
+
+ const Bitmap aPreview (GetPreviewBitmap(rpDescriptor, &rDevice));
+ if ( ! aPreview.IsEmpty())
+ {
+ if (aPreview.GetSizePixel() != aBox.GetSize())
+ rDevice.DrawBitmap(aBox.TopLeft(), aBox.GetSize(), aPreview);
+ else
+ rDevice.DrawBitmap(aBox.TopLeft(), aPreview);
+ }
+ }
+}
+
+
+
+
+Bitmap PageObjectPainter::CreateMarkedPreview (
+ const Size& rSize,
+ const Bitmap& rPreview,
+ const BitmapEx& rOverlay,
+ const OutputDevice* pReferenceDevice) const
+{
+ ::boost::scoped_ptr<VirtualDevice> pDevice;
+ if (pReferenceDevice != NULL)
+ pDevice.reset(new VirtualDevice(*pReferenceDevice));
+ else
+ pDevice.reset(new VirtualDevice());
+ pDevice->SetOutputSizePixel(rSize);
+
+ pDevice->DrawBitmap(Point(0,0), rSize, rPreview);
+
+ // Paint bitmap tiled over the preview to mark it as excluded.
+ const sal_Int32 nIconWidth (rOverlay.GetSizePixel().Width());
+ const sal_Int32 nIconHeight (rOverlay.GetSizePixel().Height());
+ if (nIconWidth>0 && nIconHeight>0)
+ {
+ for (sal_Int32 nX=0; nX<rSize.Width(); nX+=nIconWidth)
+ for (sal_Int32 nY=0; nY<rSize.Height(); nY+=nIconHeight)
+ pDevice->DrawBitmapEx(Point(nX,nY), rOverlay);
+ }
+ return pDevice->GetBitmap(Point(0,0), rSize);
+}
+
+
+
+
+Bitmap PageObjectPainter::GetPreviewBitmap (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice* pReferenceDevice) const
+{
+ const SdrPage* pPage = rpDescriptor->GetPage();
+ const bool bIsExcluded (rpDescriptor->HasState(model::PageDescriptor::ST_Excluded));
+
+ if (bIsExcluded)
+ {
+ Bitmap aMarkedPreview (mpCache->GetMarkedPreviewBitmap(pPage,false));
+ const Rectangle aPreviewBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ if (aMarkedPreview.IsEmpty() || aMarkedPreview.GetSizePixel()!=aPreviewBox.GetSize())
+ {
+ aMarkedPreview = CreateMarkedPreview(
+ aPreviewBox.GetSize(),
+ mpCache->GetPreviewBitmap(pPage,true),
+ mpTheme->GetIcon(Theme::Icon_HideSlideOverlay),
+ pReferenceDevice);
+ mpCache->SetMarkedPreviewBitmap(pPage, aMarkedPreview);
+ }
+ return aMarkedPreview;
+ }
+ else
+ {
+ return mpCache->GetPreviewBitmap(pPage,false);
+ }
+}
+
+
+
+
+void PageObjectPainter::PaintPageNumber (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const
+{
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::PageNumber,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ // Determine the color of the page number.
+ Color aPageNumberColor (mpTheme->GetColor(Theme::Color_PageNumberDefault));
+ if (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ||
+ rpDescriptor->HasState(model::PageDescriptor::ST_Selected))
+ {
+ // Page number is painted on background for hover or selection or
+ // both. Each of these background colors has a predefined luminance
+ // which is compatible with the PageNumberHover color.
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHover));
+ }
+ else
+ {
+ const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
+ const sal_Int32 nBackgroundLuminance (aBackgroundColor.GetLuminance());
+ // When the background color is black then this is interpreted as
+ // high contrast mode and the font color is set to white.
+ if (nBackgroundLuminance == 0)
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberHighContrast));
+ else
+ {
+ // Compare luminance of default page number color and background
+ // color. When the two are similar then use a darker
+ // (preferred) or brighter font color.
+ const sal_Int32 nFontLuminance (aPageNumberColor.GetLuminance());
+ if (abs(nBackgroundLuminance - nFontLuminance) < 60)
+ {
+ if (nBackgroundLuminance > nFontLuminance-30)
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberBrightBackground));
+ else
+ aPageNumberColor = Color(mpTheme->GetColor(Theme::Color_PageNumberDarkBackground));
+ }
+ }
+ }
+
+ // Paint the page number.
+ OSL_ASSERT(rpDescriptor->GetPage()!=NULL);
+ const sal_Int32 nPageNumber ((rpDescriptor->GetPage()->GetPageNum() - 1) / 2 + 1);
+ const String sPageNumber (String::CreateFromInt32(nPageNumber));
+ rDevice.SetFont(*mpPageNumberFont);
+ rDevice.SetTextColor(aPageNumberColor);
+ rDevice.DrawText(aBox, sPageNumber, TEXT_DRAW_RIGHT | TEXT_DRAW_VCENTER);
+}
+
+
+
+
+void PageObjectPainter::PaintTransitionEffect (
+ OutputDevice& rDevice,
+ const model::SharedPageDescriptor& rpDescriptor) const
+{
+ const SdPage* pPage = rpDescriptor->GetPage();
+ if (pPage!=NULL && pPage->getTransitionType() > 0)
+ {
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ rpDescriptor,
+ PageObjectLayouter::TransitionEffectIndicator,
+ PageObjectLayouter::ModelCoordinateSystem));
+
+ rDevice.DrawBitmapEx(
+ aBox.TopLeft(),
+ mpPageObjectLayouter->GetTransitionEffectIcon().GetBitmapEx());
+ }
+}
+
+
+
+
+Bitmap& PageObjectPainter::GetBackgroundForState (
+ const model::SharedPageDescriptor& rpDescriptor,
+ const OutputDevice& rReferenceDevice)
+{
+ enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 };
+ const int eState =
+ (rpDescriptor->HasState(model::PageDescriptor::ST_Selected) ? Selected : None)
+ | (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ? MouseOver : None)
+ | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None);
+
+ switch (eState)
+ {
+ case MouseOver | Selected | Focused:
+ return GetBackground(
+ maMouseOverSelectedAndFocusedBackground,
+ Theme::Gradient_MouseOverSelectedAndFocusedPage,
+ rReferenceDevice,
+ true);
+
+ case MouseOver | Selected:
+ case MouseOver:
+ return GetBackground(
+ maMouseOverBackground,
+ Theme::Gradient_MouseOverPage,
+ rReferenceDevice,
+ false);
+
+ case MouseOver | Focused:
+ return GetBackground(
+ maMouseOverFocusedBackground,
+ Theme::Gradient_MouseOverPage,
+ rReferenceDevice,
+ true);
+
+ case Selected | Focused:
+ return GetBackground(
+ maFocusedSelectionBackground,
+ Theme::Gradient_SelectedAndFocusedPage,
+ rReferenceDevice,
+ true);
+
+ case Selected:
+ return GetBackground(
+ maSelectionBackground,
+ Theme::Gradient_SelectedPage,
+ rReferenceDevice,
+ false);
+
+ case Focused:
+ return GetBackground(
+ maFocusedBackground,
+ Theme::Gradient_FocusedPage,
+ rReferenceDevice,
+ true);
+
+ case None:
+ default:
+ return GetBackground(
+ maNormalBackground,
+ Theme::Gradient_NormalPage,
+ rReferenceDevice,
+ false);
+ }
+}
+
+
+
+
+Bitmap& PageObjectPainter::GetBackground(
+ Bitmap& rBackground,
+ Theme::GradientColorType eType,
+ const OutputDevice& rReferenceDevice,
+ const bool bHasFocusBorder)
+{
+ if (rBackground.IsEmpty())
+ rBackground = CreateBackgroundBitmap(rReferenceDevice, eType, bHasFocusBorder);
+ return rBackground;
+}
+
+
+
+
+Bitmap PageObjectPainter::CreateBackgroundBitmap(
+ const OutputDevice& rReferenceDevice,
+ const Theme::GradientColorType eColorType,
+ const bool bHasFocusBorder) const
+{
+ const Size aSize (mpPageObjectLayouter->GetSize(
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::WindowCoordinateSystem));
+ const Rectangle aPageObjectBox (mpPageObjectLayouter->GetBoundingBox(
+ Point(0,0),
+ PageObjectLayouter::PageObject,
+ PageObjectLayouter::ModelCoordinateSystem));
+ VirtualDevice aBitmapDevice (rReferenceDevice);
+ aBitmapDevice.SetOutputSizePixel(aSize);
+
+ // Fill the background with the background color of the slide sorter.
+ const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
+ OSL_TRACE("filling background of page object bitmap with color %x", aBackgroundColor.GetColor());
+ aBitmapDevice.SetFillColor(aBackgroundColor);
+ aBitmapDevice.SetLineColor(aBackgroundColor);
+ aBitmapDevice.DrawRect(Rectangle(Point(0,0), aSize));
+
+ // Paint the slide area with a linear gradient that starts some pixels
+ // below the top and ends some pixels above the bottom.
+ const Color aTopColor(mpTheme->GetGradientColor(eColorType, Theme::Fill1));
+ const Color aBottomColor(mpTheme->GetGradientColor(eColorType, Theme::Fill2));
+ if (aTopColor != aBottomColor)
+ {
+ const sal_Int32 nHeight (aPageObjectBox.GetHeight());
+ const sal_Int32 nDefaultConstantSize(nHeight/4);
+ const sal_Int32 nMinimalGradientSize(40);
+ const sal_Int32 nY1 (
+ ::std::max<sal_Int32>(
+ 0,
+ ::std::min<sal_Int32>(
+ nDefaultConstantSize,
+ (nHeight - nMinimalGradientSize)/2)));
+ const sal_Int32 nY2 (nHeight-nY1);
+ const sal_Int32 nTop (aPageObjectBox.Top());
+ for (sal_Int32 nY=0; nY<nHeight; ++nY)
+ {
+ if (nY<=nY1)
+ aBitmapDevice.SetLineColor(aTopColor);
+ else if (nY>=nY2)
+ aBitmapDevice.SetLineColor(aBottomColor);
+ else
+ {
+ Color aColor (aTopColor);
+ aColor.Merge(aBottomColor, 255 * (nY2-nY) / (nY2-nY1));
+ aBitmapDevice.SetLineColor(aColor);
+ }
+ aBitmapDevice.DrawLine(
+ Point(aPageObjectBox.Left(), nY+nTop),
+ Point(aPageObjectBox.Right(), nY+nTop));
+ }
+ }
+ else
+ {
+ aBitmapDevice.SetFillColor(aTopColor);
+ aBitmapDevice.DrawRect(aPageObjectBox);
+ }
+
+ // Paint the simple border and, for some backgrounds, the focus border.
+ if (bHasFocusBorder)
+ mpFocusBorderPainter->PaintFrame(aBitmapDevice, aPageObjectBox);
+ else
+ PaintBorder(aBitmapDevice, eColorType, aPageObjectBox);
+
+ // Get bounding box of the preview around which a shadow is painted.
+ // Compensate for the border around the preview.
+ const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
+ Point(0,0),
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::ModelCoordinateSystem));
+ Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1);
+ mpShadowPainter->PaintFrame(aBitmapDevice, aFrameBox);
+
+ return aBitmapDevice.GetBitmap (Point(0,0),aSize);
+}
+
+
+
+
+void PageObjectPainter::PaintBorder (
+ OutputDevice& rDevice,
+ const Theme::GradientColorType eColorType,
+ const Rectangle& rBox) const
+{
+ rDevice.SetFillColor();
+ const sal_Int32 nBorderWidth (1);
+ for (int nIndex=0; nIndex<nBorderWidth; ++nIndex)
+ {
+ const int nDelta (nIndex);
+ rDevice.SetLineColor(mpTheme->GetGradientColor(eColorType, Theme::Border2));
+ rDevice.DrawLine(
+ Point(rBox.Left()-nDelta, rBox.Top()-nDelta),
+ Point(rBox.Left()-nDelta, rBox.Bottom()+nDelta));
+ rDevice.DrawLine(
+ Point(rBox.Left()-nDelta, rBox.Bottom()+nDelta),
+ Point(rBox.Right()+nDelta, rBox.Bottom()+nDelta));
+ rDevice.DrawLine(
+ Point(rBox.Right()+nDelta, rBox.Bottom()+nDelta),
+ Point(rBox.Right()+nDelta, rBox.Top()-nDelta));
+
+ rDevice.SetLineColor(mpTheme->GetGradientColor(eColorType, Theme::Border1));
+ rDevice.DrawLine(
+ Point(rBox.Left()-nDelta, rBox.Top()-nDelta),
+ Point(rBox.Right()+nDelta, rBox.Top()-nDelta));
+ }
+}
+
+
+
+} } } // end of namespace sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
deleted file mode 100644
index af9d85cf1b82..000000000000
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_sd.hxx"
-
-#include "view/SlsPageObjectViewContact.hxx"
-
-#include "model/SlsPageDescriptor.hxx"
-#include "controller/SlsPageObjectFactory.hxx"
-
-#include <svx/svdopage.hxx>
-#include <tools/debug.hxx>
-
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-
-using namespace ::sdr::contact;
-
-namespace sd { namespace slidesorter { namespace view {
-
-
-PageObjectViewContact::PageObjectViewContact (
- SdrPageObj& rPageObj,
- const model::SharedPageDescriptor& rpDescriptor)
- : ViewContactOfPageObj (rPageObj),
- mbInDestructor(false),
- mpDescriptor(rpDescriptor)
-{
-}
-
-PageObjectViewContact::~PageObjectViewContact (void)
-{
- // remember that this instance is in destruction
- mbInDestructor = true;
-}
-
-
-
-ViewObjectContact&
- PageObjectViewContact::CreateObjectSpecificViewObjectContact(
- ObjectContact& rObjectContact)
-{
- OSL_ASSERT(mpDescriptor.get()!=NULL);
-
- ViewObjectContact* pResult
- = mpDescriptor->GetPageObjectFactory().CreateViewObjectContact (
- rObjectContact,
- *this);
- DBG_ASSERT (pResult!=NULL,
- "PageObjectViewContact::CreateObjectSpecificViewObjectContact() was not able to create object.");
- return *pResult;
-}
-
-const SdrPage* PageObjectViewContact::GetPage (void) const
-{
- // when this instance itself is in destruction, do no longer
- // provide the referenced page to VOC childs of this OC. This
- // happens e.g. in destructor which destroys all child-VOCs which
- // may in their implementation still reference their VC from
- // their own destructor
- if (!mbInDestructor)
- return GetReferencedPage();
- else
- return NULL;
-}
-
-void PageObjectViewContact::ActionChanged (void)
-{
- ViewContactOfPageObj::ActionChanged();
-}
-
-SdrPageObj& PageObjectViewContact::GetPageObject (void) const
-{
- return ViewContactOfPageObj::GetPageObj();
-}
-
-drawinglayer::primitive2d::Primitive2DSequence PageObjectViewContact::createViewIndependentPrimitive2DSequence() const
-{
- // ceate graphical visualisation data. Since this is the view-independent version which should not be used,
- // create a replacement graphic visualisation here. Use GetLastBoundRect to access the model data directly
- // which is aOutRect for SdrPageObj.
- OSL_ASSERT(mpDescriptor.get()!=NULL);
- Rectangle aModelRectangle(GetPageObj().GetLastBoundRect());
- const SvBorder aBorder(mpDescriptor->GetModelBorder());
-
- aModelRectangle.Left() -= aBorder.Left();
- aModelRectangle.Right() += aBorder.Right();
- aModelRectangle.Top() -= aBorder.Top();
- aModelRectangle.Bottom() += aBorder.Bottom();
-
- const basegfx::B2DRange aModelRange(aModelRectangle.Left(), aModelRectangle.Top(), aModelRectangle.Right(), aModelRectangle.Bottom());
- const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aModelRange));
- const basegfx::BColor aYellow(1.0, 1.0, 0.0);
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aYellow));
-
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
-}
-
-} } } // end of namespace ::sd::slidesorter::view
-
-// eof
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
deleted file mode 100644
index 311d7eb39827..000000000000
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
+++ /dev/null
@@ -1,1402 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_sd.hxx"
-
-#include "view/SlsPageObjectViewObjectContact.hxx"
-
-#include "controller/SlsProperties.hxx"
-#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewContact.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsFontProvider.hxx"
-#include "model/SlsPageDescriptor.hxx"
-#include "cache/SlsPageCache.hxx"
-#include "cache/SlsPageCacheManager.hxx"
-#include "res_bmp.hrc"
-#include "tools/IconCache.hxx"
-#include "PreviewRenderer.hxx"
-
-#include "sdpage.hxx"
-#include "sdresid.hxx"
-#include "glob.hrc"
-#include "drawdoc.hxx"
-#include <svx/sdr/contact/displayinfo.hxx>
-#include <svx/sdr/contact/viewcontact.hxx>
-#include <svx/svdopage.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/xlndsit.hxx>
-#include <svx/xlnclit.hxx>
-#include <svx/svdoutl.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include <vcl/bitmap.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/virdev.hxx>
-#include <vcl/lineinfo.hxx>
-#include <tools/color.hxx>
-#include <boost/shared_ptr.hpp>
-#include <com/sun/star/uno/Exception.hpp>
-#include <vcl/svapp.hxx>
-#include <tools/diagnose_ex.h>
-
-using namespace ::sdr::contact;
-using namespace ::sd::slidesorter::model;
-
-using drawinglayer::primitive2d::Primitive2DReference;
-using drawinglayer::primitive2d::Primitive2DSequence;
-
-namespace sd { namespace slidesorter { namespace view {
-
-
-const sal_Int32 PageObjectViewObjectContact::mnSelectionIndicatorOffset = 2;
-const sal_Int32 PageObjectViewObjectContact::mnSelectionIndicatorThickness = 3;
-const sal_Int32 PageObjectViewObjectContact::mnFocusIndicatorOffset = 3;
-const sal_Int32 PageObjectViewObjectContact::mnFadeEffectIndicatorOffset = 9;
-const sal_Int32 PageObjectViewObjectContact::mnFadeEffectIndicatorSize = 14;
-const sal_Int32 PageObjectViewObjectContact::mnPageNumberOffset = 9;
-const sal_Int32 PageObjectViewObjectContact::mnMouseOverEffectOffset = 3;
-const sal_Int32 PageObjectViewObjectContact::mnMouseOverEffectThickness = 1;
-
-PageObjectViewObjectContact::PageObjectViewObjectContact (
- ObjectContact& rObjectContact,
- ViewContact& rViewContact,
- const ::boost::shared_ptr<cache::PageCache>& rpCache,
- const ::boost::shared_ptr<controller::Properties>& rpProperties)
- : ViewObjectContactOfPageObj(rObjectContact, rViewContact),
- mbInDestructor(false),
- mxCurrentPageContents(),
- mpCache(rpCache),
- mpProperties(rpProperties)
-{
- SharedPageDescriptor pDescriptor (GetPageDescriptor());
- OSL_ASSERT(pDescriptor.get()!=NULL);
- if (pDescriptor.get() != NULL)
- pDescriptor->SetViewObjectContact(this);
-}
-
-
-
-
-PageObjectViewObjectContact::~PageObjectViewObjectContact (void)
-{
- mbInDestructor = true;
-
- GetPageDescriptor()->SetViewObjectContact(NULL);
-
- if (mpCache.get() != NULL)
- {
- const SdrPage* pPage = GetPage();
-
- if(pPage)
- {
- mpCache->ReleasePreviewBitmap(GetPage());
- }
- }
-}
-
-
-
-
-void PageObjectViewObjectContact::SetCache (const ::boost::shared_ptr<cache::PageCache>& rpCache)
-{
- mpCache = rpCache;
-}
-
-
-
-
-Rectangle PageObjectViewObjectContact::GetBoundingBox (
- OutputDevice& rDevice,
- BoundingBoxType eType,
- CoordinateSystem eCoordinateSystem) const
-{
- // Most of the bounding boxes are based on the bounding box of the preview.
- // SdrPageObj is a SdrObject, so use SdrObject::aOutRect as model data
- const PageObjectViewContact& rPaObVOC(static_cast<PageObjectViewContact&>(GetViewContact()));
- Rectangle aBoundingBox(rPaObVOC.GetPageObject().GetLastBoundRect());
-
- CoordinateSystem eCurrentCoordinateSystem (ModelCoordinateSystem);
- switch(eType)
- {
- case PageObjectBoundingBox:
- {
- const SvBorder aPageDescriptorBorder(GetPageDescriptor()->GetModelBorder());
- aBoundingBox.Left() -= aPageDescriptorBorder.Left();
- aBoundingBox.Top() -= aPageDescriptorBorder.Top();
- aBoundingBox.Right() += aPageDescriptorBorder.Right();
- aBoundingBox.Bottom() += aPageDescriptorBorder.Bottom();
- break;
- }
- case PreviewBoundingBox:
- {
- // The aBoundingBox already has the right value.
- break;
- }
- case MouseOverIndicatorBoundingBox:
- {
- const sal_Int32 nBorderWidth (mnMouseOverEffectOffset+mnMouseOverEffectThickness);
- const Size aBorderSize (rDevice.PixelToLogic(Size(nBorderWidth,nBorderWidth)));
- aBoundingBox.Left() -= aBorderSize.Width();
- aBoundingBox.Top() -= aBorderSize.Height();
- aBoundingBox.Right() += aBorderSize.Width();
- aBoundingBox.Bottom() += aBorderSize.Height();
- break;
- }
- case FocusIndicatorBoundingBox:
- {
- const sal_Int32 nBorderWidth (mnFocusIndicatorOffset+1);
- const Size aBorderSize (rDevice.PixelToLogic(Size(nBorderWidth,nBorderWidth)));
- aBoundingBox.Left() -= aBorderSize.Width();
- aBoundingBox.Top() -= aBorderSize.Height();
- aBoundingBox.Right() += aBorderSize.Width();
- aBoundingBox.Bottom() += aBorderSize.Height();
- break;
- }
- case SelectionIndicatorBoundingBox:
- {
- const sal_Int32 nBorderWidth(mnSelectionIndicatorOffset+mnSelectionIndicatorThickness);
- const Size aBorderSize (rDevice.PixelToLogic(Size(nBorderWidth,nBorderWidth)));
- aBoundingBox.Left() -= aBorderSize.Width();
- aBoundingBox.Top() -= aBorderSize.Height();
- aBoundingBox.Right() += aBorderSize.Width();
- aBoundingBox.Bottom() += aBorderSize.Height();
- break;
- }
- case PageNumberBoundingBox:
- {
- Size aModelOffset = rDevice.PixelToLogic(Size(mnPageNumberOffset,mnPageNumberOffset));
- Size aNumberSize (GetPageDescriptor()->GetPageNumberAreaModelSize());
- aBoundingBox = Rectangle (
- Point (
- aBoundingBox.Left() - aModelOffset.Width() - aNumberSize.Width(),
- aBoundingBox.Top()),
- aNumberSize);
- break;
- }
-
- case NameBoundingBox:
- break;
-
- case FadeEffectIndicatorBoundingBox:
- Size aModelOffset = rDevice.PixelToLogic(Size (0, mnFadeEffectIndicatorOffset));
- // Flush left just outside the selection rectangle.
- aBoundingBox = Rectangle (
- Point (
- aBoundingBox.Left(),
- aBoundingBox.Bottom() + aModelOffset.Height()
- ),
- rDevice.PixelToLogic (
- IconCache::Instance().GetIcon(BMP_FADE_EFFECT_INDICATOR).GetSizePixel())
- );
- break;
- }
-
- // Make sure the bounding box uses the requested coordinate system.
- if (eCurrentCoordinateSystem != eCoordinateSystem)
- {
- if (eCoordinateSystem == ModelCoordinateSystem)
- aBoundingBox = Rectangle(
- rDevice.PixelToLogic(aBoundingBox.TopLeft()),
- rDevice.PixelToLogic(aBoundingBox.GetSize()));
- else
- aBoundingBox = Rectangle(
- rDevice.LogicToPixel(aBoundingBox.TopLeft()),
- rDevice.LogicToPixel(aBoundingBox.GetSize()));
- }
- return aBoundingBox;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// example implementation for primitive usage for PageObjectViewObjectContact
-
-} } } // end of namespace ::sd::slidesorter::view
-
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
-#include <sd_primitivetypes2d.hxx>
-#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
-#include <drawinglayer/primitive2d/textprimitive2d.hxx>
-#include <drawinglayer/geometry/viewinformation2d.hxx>
-#include <svx/sdr/contact/objectcontact.hxx>
-
-namespace sd { namespace slidesorter { namespace view {
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// All primitives for SdrPageObject visualisation are based on one range which describes
-// the size of the inner rectangle for PagePreview visualisation. Use a common implementation
-// class for all derived SdPageObjectPrimitives. The SdPageObjectBasePrimitive itself
-// is pure virtual
-
-class SdPageObjectBasePrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D
-{
-private:
- // the inner range of the SdPageObject visualisation
- basegfx::B2DRange maRange;
-
-public:
- // constructor and destructor
- SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange);
- virtual ~SdPageObjectBasePrimitive();
-
- // data access
- const basegfx::B2DRange& getPageObjectRange() const { return maRange; }
-
- // compare operator
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-};
-
-SdPageObjectBasePrimitive::SdPageObjectBasePrimitive(const basegfx::B2DRange& rRange)
-: drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(),
- maRange(rRange)
-{
-}
-
-SdPageObjectBasePrimitive::~SdPageObjectBasePrimitive()
-{
-}
-
-bool SdPageObjectBasePrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive))
- {
- const SdPageObjectBasePrimitive& rCompare = static_cast< const SdPageObjectBasePrimitive& >(rPrimitive);
- return (getPageObjectRange() == rCompare.getPageObjectRange());
- }
-
- return false;
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for selected visualisation
-
-class SdPageObjectPageBitmapPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- // the bitmap containing the PagePreview
- BitmapEx maBitmapEx;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectPageBitmapPrimitive(
- const basegfx::B2DRange& rRange,
- const BitmapEx& rBitmapEx);
- ~SdPageObjectPageBitmapPrimitive();
-
- // data access
- const BitmapEx& getBitmapEx() const { return maBitmapEx; }
-
- // compare operator
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-Primitive2DSequence SdPageObjectPageBitmapPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- // add bitmap primitive
- // to avoid scaling, use the Bitmap pixel size as primitive size
- basegfx::B2DHomMatrix aBitmapTransform;
- const Size aBitmapSize(getBitmapEx().GetSizePixel());
- const basegfx::B2DVector aBitmapSizeLogic(rViewInformation.getInverseObjectToViewTransformation() *
- basegfx::B2DVector(aBitmapSize.getWidth() - 1, aBitmapSize.getHeight() - 1));
-
- // short form for scale and translate transformation
- aBitmapTransform.set(0L, 0L, aBitmapSizeLogic.getX());
- aBitmapTransform.set(1L, 1L, aBitmapSizeLogic.getY());
- aBitmapTransform.set(0L, 2L, getPageObjectRange().getMinX());
- aBitmapTransform.set(1L, 2L, getPageObjectRange().getMinY());
-
- // add a BitmapPrimitive2D to the result
- const Primitive2DReference xReference(
- new drawinglayer::primitive2d::BitmapPrimitive2D(getBitmapEx(), aBitmapTransform));
- return Primitive2DSequence(&xReference, 1);
-}
-
-SdPageObjectPageBitmapPrimitive::SdPageObjectPageBitmapPrimitive(
- const basegfx::B2DRange& rRange,
- const BitmapEx& rBitmapEx)
-: SdPageObjectBasePrimitive(rRange),
- maBitmapEx(rBitmapEx)
-{
-}
-
-SdPageObjectPageBitmapPrimitive::~SdPageObjectPageBitmapPrimitive()
-{
-}
-
-bool SdPageObjectPageBitmapPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(SdPageObjectBasePrimitive::operator==(rPrimitive))
- {
- const SdPageObjectPageBitmapPrimitive& rCompare = static_cast< const SdPageObjectPageBitmapPrimitive& >(rPrimitive);
- return (getBitmapEx() == rCompare.getBitmapEx());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectPageBitmapPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTPAGEBITMAPPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for selected visualisation
-
-class SdPageObjectSelectPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- /// Gap between border of page object and inside of selection rectangle.
- static const sal_Int32 mnSelectionIndicatorOffset;
-
- /// Thickness of the selection rectangle.
- static const sal_Int32 mnSelectionIndicatorThickness;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectSelectPrimitive(const basegfx::B2DRange& rRange);
- ~SdPageObjectSelectPrimitive();
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorOffset(1);
-const sal_Int32 SdPageObjectSelectPrimitive::mnSelectionIndicatorThickness(3);
-
-Primitive2DSequence SdPageObjectSelectPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- Primitive2DSequence xRetval(2);
-
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // PaintSelectionIndicator replacement. Grow by offset first
- basegfx::B2DRange aDiscreteOuterRange(aAdaptedInnerRange);
- aDiscreteOuterRange.grow(mnSelectionIndicatorOffset * aDiscretePixel.getX());
-
- // Remember inner border. Make it one bigger in top left since polygons
- // do not paint their lower-right corners. Since this is the inner polygon,
- // the top-left corders are the ones to grow here
- const basegfx::B2DRange aDiscreteInnerRange(
- aDiscreteOuterRange.getMinimum() + aDiscretePixel,
- aDiscreteOuterRange.getMaximum() - aDiscretePixel);
-
- // grow by line width
- aDiscreteOuterRange.grow((mnSelectionIndicatorThickness - 1) * aDiscretePixel.getX());
-
- // create a PolyPolygon from those ranges. For the outer polygon, round edges by
- // giving a relative radius to the polygon creator (use mnSelectionIndicatorThickness here, too)
- const double fPixelFactor(aDiscretePixel.getX() * (mnSelectionIndicatorThickness + 2.5));
- const double fRelativeRadiusX(fPixelFactor / ::std::max(aDiscreteOuterRange.getWidth(), 1.0));
- const double fRelativeRadiusY(fPixelFactor / ::std::max(aDiscreteOuterRange.getHeight(), 1.0));
- basegfx::B2DPolyPolygon aFramePolyPolygon;
- const basegfx::B2DPolygon aRoundedOuterPolygon(basegfx::tools::createPolygonFromRect(aDiscreteOuterRange, fRelativeRadiusX, fRelativeRadiusY));
-
- aFramePolyPolygon.append(aRoundedOuterPolygon);
- aFramePolyPolygon.append(basegfx::tools::createPolygonFromRect(aDiscreteInnerRange));
-
- // add colored PolyPolygon
- const svtools::ColorConfig aColorConfig;
- const basegfx::BColor aFrameColor(Application::GetSettings().GetStyleSettings().GetMenuHighlightColor().getBColor());
-
- xRetval[0] = Primitive2DReference(
- new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(aFramePolyPolygon, aFrameColor));
-
- // add aRoundedOuterPolygon again as non-filled line polygon to get the roundungs
- // painted correctly
- xRetval[1] = Primitive2DReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aRoundedOuterPolygon, aFrameColor));
-
- return xRetval;
-}
-
-SdPageObjectSelectPrimitive::SdPageObjectSelectPrimitive(const basegfx::B2DRange& rRange)
-: SdPageObjectBasePrimitive(rRange)
-{
-}
-
-SdPageObjectSelectPrimitive::~SdPageObjectSelectPrimitive()
-{
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectSelectPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTSELECTPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for border around bitmap visualisation
-
-class SdPageObjectBorderPrimitive : public SdPageObjectBasePrimitive
-{
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectBorderPrimitive(const basegfx::B2DRange& rRange);
- ~SdPageObjectBorderPrimitive();
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-Primitive2DSequence SdPageObjectBorderPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // Paint_Border replacement. (use aBorderColor)
- const svtools::ColorConfig aColorConfig;
- const basegfx::BColor aBorderColor(Color(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor).getBColor());
-
- const Primitive2DReference xReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(basegfx::tools::createPolygonFromRect(aAdaptedInnerRange), aBorderColor));
- return Primitive2DSequence(&xReference, 1);
-}
-
-SdPageObjectBorderPrimitive::SdPageObjectBorderPrimitive(const basegfx::B2DRange& rRange)
-: SdPageObjectBasePrimitive(rRange)
-{
-}
-
-SdPageObjectBorderPrimitive::~SdPageObjectBorderPrimitive()
-{
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectBorderPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTBORDERPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for focus visualisation
-
-class SdPageObjectFocusPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- /// Gap between border of page object and inside of focus rectangle.
- static const sal_Int32 mnFocusIndicatorOffset;
- const bool mbContrastToSelected;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectFocusPrimitive(const basegfx::B2DRange& rRange, const bool bContrast);
- ~SdPageObjectFocusPrimitive();
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-const sal_Int32 SdPageObjectFocusPrimitive::mnFocusIndicatorOffset(2);
-
-Primitive2DSequence SdPageObjectFocusPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- Primitive2DSequence xRetval(2);
-
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // Paint_FocusIndicator replacement. (black and white).
- // imitate Paint_DottedRectangle: First paint a white rectangle and above it a black dotted one
- basegfx::B2DRange aFocusIndicatorRange(aAdaptedInnerRange);
- aFocusIndicatorRange.grow(mnFocusIndicatorOffset * aDiscretePixel.getX());
-
- // create polygon
- const basegfx::B2DPolygon aIndicatorPolygon(basegfx::tools::createPolygonFromRect(aFocusIndicatorRange));
-
- const StyleSettings& rStyleSettings(Application::GetSettings().GetStyleSettings());
-
- // "background" rectangle
- const Color aBackgroundColor(mbContrastToSelected ? rStyleSettings.GetMenuHighlightColor() : rStyleSettings.GetWindowColor());
- xRetval[0] = Primitive2DReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aIndicatorPolygon, Color(COL_WHITE).getBColor()));
-
- // dotted black rectangle with same geometry
- ::std::vector< double > aDotDashArray;
-
- const sal_Int32 nFocusIndicatorWidth (3);
- aDotDashArray.push_back(nFocusIndicatorWidth *aDiscretePixel.getX());
- aDotDashArray.push_back(nFocusIndicatorWidth * aDiscretePixel.getX());
-
- // prepare line and stroke attributes
- const Color aLineColor(mbContrastToSelected ? rStyleSettings.GetMenuHighlightTextColor() : rStyleSettings.GetWindowTextColor());
- const drawinglayer::attribute::LineAttribute aLineAttribute(aLineColor.getBColor());
- const drawinglayer::attribute::StrokeAttribute aStrokeAttribute(
- aDotDashArray, 2.0 * nFocusIndicatorWidth * aDiscretePixel.getX());
-
-
- xRetval[1] = Primitive2DReference(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(aIndicatorPolygon, aLineAttribute, aStrokeAttribute));
-
- return xRetval;
-}
-
-SdPageObjectFocusPrimitive::SdPageObjectFocusPrimitive(const basegfx::B2DRange& rRange, const bool bContrast)
- : SdPageObjectBasePrimitive(rRange),
- mbContrastToSelected(bContrast)
-{
-}
-
-SdPageObjectFocusPrimitive::~SdPageObjectFocusPrimitive()
-{
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectFocusPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTFOCUSPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// SdPageObjectPrimitive for fade effect visualisation
-
-class SdPageObjectFadeNameNumberPrimitive : public SdPageObjectBasePrimitive
-{
-private:
- /// Size of width and height of the fade effect indicator in pixels.
- static const sal_Int32 mnFadeEffectIndicatorOffset;
-
- /// Size of width and height of the comments indicator in pixels.
- static const sal_Int32 mnCommentsIndicatorOffset;
-
- /// Gap between border of page object and number rectangle.
- static const sal_Int32 mnPageNumberOffset;
-
- /// the indicator bitmaps. Static since it is usable outside this primitive
- /// for size comparisons
- static BitmapEx* mpFadeEffectIconBitmap;
- static BitmapEx* mpCommentsIconBitmap;
-
- /// page name, number and needed infos
- String maPageName;
- sal_uInt32 mnPageNumber;
- Font maPageNameFont;
- Size maPageNumberAreaModelSize;
-
- // bitfield
- bool mbShowFadeEffectIcon : 1;
- bool mbShowCommentsIcon : 1;
- bool mbExcluded : 1;
-
- // private helpers
- const BitmapEx& getFadeEffectIconBitmap() const;
-
-protected:
- // method which is to be used to implement the local decomposition of a 2D primitive.
- virtual Primitive2DSequence create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- // constructor and destructor
- SdPageObjectFadeNameNumberPrimitive(
- const basegfx::B2DRange& rRange,
- const String& rPageName,
- sal_uInt32 nPageNumber,
- const Font& rPageNameFont,
- const Size& rPageNumberAreaModelSize,
- bool bShowFadeEffectIcon,
- bool bShowCommentsIcon,
- bool bExcluded);
- ~SdPageObjectFadeNameNumberPrimitive();
-
- // data access
- const String& getPageName() const { return maPageName; }
- sal_uInt32 getPageNumber() const { return mnPageNumber; }
- const Font& getPageNameFont() const { return maPageNameFont; }
- const Size& getPageNumberAreaModelSize() const { return maPageNumberAreaModelSize; }
- bool getShowFadeEffectIcon() const { return mbShowFadeEffectIcon; }
- bool getShowCommentsIcon() const { return mbShowCommentsIcon; }
- bool getExcluded() const { return mbExcluded; }
-
- // compare operator
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- // provide unique ID
- DeclPrimitrive2DIDBlock()
-};
-
-const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnFadeEffectIndicatorOffset(9);
-const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnPageNumberOffset(9);
-BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpFadeEffectIconBitmap = 0;
-
-const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() const
-{
- if(mpFadeEffectIconBitmap == NULL)
- {
- // prepare FadeEffectIconBitmap on demand
- const sal_uInt16 nIconId(BMP_FADE_EFFECT_INDICATOR);
- const BitmapEx aFadeEffectIconBitmap(IconCache::Instance().GetIcon(nIconId).GetBitmapEx());
- const_cast< SdPageObjectFadeNameNumberPrimitive* >(this)->mpFadeEffectIconBitmap = new BitmapEx(aFadeEffectIconBitmap);
- }
-
- return *mpFadeEffectIconBitmap;
-}
-
-
-const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnCommentsIndicatorOffset(9);
-BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpCommentsIconBitmap = 0;
-
-Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- const xub_StrLen nTextLength(getPageName().Len());
- const sal_uInt32 nCount(
- (getShowFadeEffectIcon() ? 1 : 0) + // FadeEffect icon
- (nTextLength ? 1 : 0) + // PageName
- 1 + // PageNumber (always)
- (getExcluded() ? 2 : 0) // PageNumber crossed out
- );
- sal_uInt32 nInsert(0);
- Primitive2DSequence xRetval(nCount);
-
- // since old Width/Height calculations always added a single pixel value,
- // it is necessary to create a inner range which is one display unit less
- // at the bottom right.
- const basegfx::B2DVector aDiscretePixel(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aAdaptedInnerRange(
- getPageObjectRange().getMinX(), getPageObjectRange().getMinY(),
- getPageObjectRange().getMaxX() - aDiscretePixel.getX(), getPageObjectRange().getMaxY() - aDiscretePixel.getY());
-
- // preapre TextLayouter
- drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
- aTextLayouter.setFont(getPageNameFont());
-
- // get font attributes
- basegfx::B2DVector aTextSizeAttribute;
- const drawinglayer::attribute::FontAttribute aFontAttribute(
- drawinglayer::primitive2d::getFontAttributeFromVclFont(
- aTextSizeAttribute,
- getPageNameFont(),
- false,
- false));
-
- // prepare locale; this may need some more information in the future
- const ::com::sun::star::lang::Locale aLocale;
-
- // prepare font color from System
- const basegfx::BColor aFontColor(Application::GetSettings().GetStyleSettings().GetFontColor().getBColor());
-
- if(getShowFadeEffectIcon())
- {
- // prepare fFadeEffect Sizes
- const basegfx::B2DVector aFadeEffectBitmapSizeLogic(rViewInformation.getInverseObjectToViewTransformation() *
- basegfx::B2DVector(
- getFadeEffectIconBitmap().GetSizePixel().getWidth() - 1,
- getFadeEffectIconBitmap().GetSizePixel().getHeight() - 1));
-
- // Paint_FadeEffectIndicator replacement.
- // create transformation. To avoid bitmap scaling, use bitmap size as size
- basegfx::B2DHomMatrix aBitmapTransform;
-
- // short form for scale and translate transformation
- aBitmapTransform.set(0L, 0L, aFadeEffectBitmapSizeLogic.getX());
- aBitmapTransform.set(1L, 1L, aFadeEffectBitmapSizeLogic.getY());
- aBitmapTransform.set(0L, 2L, aAdaptedInnerRange.getMinX());
- aBitmapTransform.set(1L, 2L, aAdaptedInnerRange.getMaxY() + ((mnFadeEffectIndicatorOffset + 1) * aDiscretePixel.getX()));
-
- xRetval[nInsert++] = Primitive2DReference(
- new drawinglayer::primitive2d::BitmapPrimitive2D(getFadeEffectIconBitmap(), aBitmapTransform));
- }
-
- if(nTextLength)
- {
- // prepare fFadeEffect Sizes since it consumes from text size
- const basegfx::B2DVector aFadeEffectBitmapSizeLogic(rViewInformation.getInverseObjectToViewTransformation() *
- basegfx::B2DVector(
- getFadeEffectIconBitmap().GetSizePixel().getWidth() - 1,
- getFadeEffectIconBitmap().GetSizePixel().getHeight() - 1));
-
- // Paint_PageName replacement. Get text size
- const double fTextWidth(aTextLayouter.getTextWidth(getPageName(), 0, nTextLength));
- const double fTextHeight(getPageNameFont().GetHeight());
- const double fFadeEffectWidth(aFadeEffectBitmapSizeLogic.getX() * 2.0);
- const double fFadeEffectTextGap(((mnFadeEffectIndicatorOffset + 2) * aDiscretePixel.getX()));
- String aPageName(getPageName());
-
- // calculate text start position
- double fStartX(
- aAdaptedInnerRange.getMaxX()
- - fTextWidth
- + (aDiscretePixel.getX() * 3.0));
- const double fStartY(
- aAdaptedInnerRange.getMaxY()
- + fTextHeight
- + fFadeEffectTextGap);
- const bool bNeedClipping(fStartX < aAdaptedInnerRange.getMinX() + fFadeEffectWidth);
-
- // if text is too big, clip it
- if(bNeedClipping)
- {
- // new left start
- fStartX = aAdaptedInnerRange.getMinX() + fFadeEffectWidth;
-
- // find out how many characters to use
- const double fAvailableLength(aAdaptedInnerRange.getWidth() - fFadeEffectWidth);
- static const String aThreePoints(String::CreateFromAscii("..."));
- const double fWidthThreePoints(aTextLayouter.getTextWidth(aThreePoints, 0, aThreePoints.Len()));
- xub_StrLen a(1);
-
- for(; a < (xub_StrLen)nTextLength; a++)
- {
- const double fSnippetLength(aTextLayouter.getTextWidth(aPageName, 0, a));
-
- if(fSnippetLength + fWidthThreePoints > fAvailableLength)
- {
- break;
- }
- }
-
- // build new string
- aPageName = String(aPageName, 0, a - 1);
- aPageName += aThreePoints;
- }
-
- // fill text matrix
- basegfx::B2DHomMatrix aTextMatrix;
-
- aTextMatrix.set(0, 0, aTextSizeAttribute.getX());
- aTextMatrix.set(1, 1, aTextSizeAttribute.getY());
- aTextMatrix.set(0, 2, fStartX);
- aTextMatrix.set(1, 2, fStartY);
-
- // prepare DXTextArray (can be empty one)
- const ::std::vector< double > aDXArray;
-
- // create Text primitive and add to target
- xRetval[nInsert++] = Primitive2DReference(
- new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aTextMatrix,
- aPageName,
- 0,
- aPageName.Len(),
- aDXArray,
- aFontAttribute,
- aLocale,
- aFontColor));
- }
-
- {
- // Paint_PageNumber replacement. Get the range where it shall be centered and prepare the string
- const double fLeft(aAdaptedInnerRange.getMinX() - (mnPageNumberOffset * aDiscretePixel.getX()) - getPageNumberAreaModelSize().Width());
- const double fTop(aAdaptedInnerRange.getMinY());
- const basegfx::B2DRange aNumberRange(fLeft, fTop,
- fLeft + getPageNumberAreaModelSize().Width(), fTop + getPageNumberAreaModelSize().Height());
- const String aPageNumber(String::CreateFromInt32(getPageNumber()));
- const xub_StrLen nNumberLen(aPageNumber.Len());
-
- // Get text size
- const double fTextWidth(aTextLayouter.getTextWidth(aPageNumber, 0, nNumberLen));
- const double fTextHeight(getPageNameFont().GetHeight());
-
- // get text start postion
- const double fStartX(aNumberRange.getCenterX() - (fTextWidth / 2.0));
- const double fStartY(aNumberRange.getMinY() + fTextHeight + aDiscretePixel.getX());
-
- // fill text matrix
- basegfx::B2DHomMatrix aTextMatrix;
-
- aTextMatrix.set(0, 0, aTextSizeAttribute.getX());
- aTextMatrix.set(1, 1, aTextSizeAttribute.getY());
- aTextMatrix.set(0, 2, fStartX);
- aTextMatrix.set(1, 2, fStartY);
-
- // prepare DXTextArray (can be empty one)
- const ::std::vector< double > aDXArray;
-
- // create Text primitive
- xRetval[nInsert++] = Primitive2DReference(
- new drawinglayer::primitive2d::TextSimplePortionPrimitive2D(
- aTextMatrix,
- aPageNumber,
- 0,
- nNumberLen,
- aDXArray,
- aFontAttribute,
- aLocale,
- aFontColor));
-
- if(getExcluded())
- {
- // create a box with strikethrough from top left to bottom right
- const basegfx::BColor aActiveColor(Application::GetSettings().GetStyleSettings().GetActiveColor().getBColor());
- basegfx::B2DPolygon aStrikethrough;
-
- aStrikethrough.append(aNumberRange.getMinimum());
- aStrikethrough.append(aNumberRange.getMaximum());
-
- xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
- basegfx::tools::createPolygonFromRect(aNumberRange), aActiveColor));
-
- xRetval[nInsert++] = Primitive2DReference(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
- aStrikethrough, aActiveColor));
- }
- }
-
- return xRetval;
-}
-
-SdPageObjectFadeNameNumberPrimitive::SdPageObjectFadeNameNumberPrimitive(
- const basegfx::B2DRange& rRange,
- const String& rPageName,
- sal_uInt32 nPageNumber,
- const Font& rPageNameFont,
- const Size& rPageNumberAreaModelSize,
- bool bShowFadeEffectIcon,
- bool bShowCommentsIcon,
- bool bExcluded)
-: SdPageObjectBasePrimitive(rRange),
- maPageName(rPageName),
- mnPageNumber(nPageNumber),
- maPageNameFont(rPageNameFont),
- maPageNumberAreaModelSize(rPageNumberAreaModelSize),
- mbShowFadeEffectIcon(bShowFadeEffectIcon),
- mbShowCommentsIcon(bShowCommentsIcon),
- mbExcluded(bExcluded)
-{
-}
-
-SdPageObjectFadeNameNumberPrimitive::~SdPageObjectFadeNameNumberPrimitive()
-{
-}
-
-bool SdPageObjectFadeNameNumberPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(SdPageObjectBasePrimitive::operator==(rPrimitive))
- {
- const SdPageObjectFadeNameNumberPrimitive& rCompare = static_cast< const SdPageObjectFadeNameNumberPrimitive& >(rPrimitive);
-
- return (getPageName() == rCompare.getPageName()
- && getPageNumber() == rCompare.getPageNumber()
- && getPageNameFont() == rCompare.getPageNameFont()
- && getPageNumberAreaModelSize() == rCompare.getPageNumberAreaModelSize()
- && getShowFadeEffectIcon() == rCompare.getShowFadeEffectIcon()
- && getExcluded() == rCompare.getExcluded());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(SdPageObjectFadeNameNumberPrimitive, PRIMITIVE2D_ID_SDPAGEOBJECTFADENAMENUMBERPRIMITIVE)
-
-///////////////////////////////////////////////////////////////////////////////////////////////
-// createPrimitive2DSequence
-//
-// This method will replace the whole painting mechanism. Task is no longer to paint stuff to an OutDev,
-// but to provide the necessary geometrical information using primitives.
-
-Primitive2DSequence PageObjectViewObjectContact::createPrimitive2DSequence(const sdr::contact::DisplayInfo& rDisplayInfo) const
-{
- // OutputDevice* pDevice = rDisplayInfo.GetDIOutputDevice();
- OutputDevice* pDevice = GetObjectContact().TryToGetOutputDevice();
-
- // get primitive vector from parent class. Do remember the contents for later use; this
- // is done to create the page content renderer (see PagePrimitiveExtractor in svx) at the
- // original object and to setup the draw hierarchy there so that changes to VCs of displayed
- // objects will lead to InvalidatePartOfView-calls which will be forwarded from the helper-OC
- // to this VOC in calling a ActionChanged().
- //
- // This already produces the displayable page content as a primitive sequence, complete with
- // embedding in the page visualizer, clipping if needed and object and aspect ratio
- // preparations. It would thus be the base for creating the cached visualisation, too,
- // by just painting extactly this primitive sequence.
- //
- // Currently, this slows down PagePane display heavily. Reason is that the current mechanism
- // to react on a SdrObject change in an edit view is to react on the ModelChange and to completely
- // reset the PagePane (delete SdrPageObjs, re-create and layout them). This works, but kicks
- // the complete sequence of primitive creation at VOCs and VCs and their buffering out of
- // memory each time. So there are two choices:
- //
- // 1, disable getting the sequence of primtives
- // -> invalidate uses ModelChange
- // -> cache repaint uses complete view creation and repainting
- //
- // 2, create and use the sequence of primitives
- // -> invalidate would not need ModelChange, no destroy/recreate of SdrObjects, no rearrange,
- // the invalidate and the following repaint would exactly update the SdrPages involved and
- // use the DrawingLayer provided ActionChanged() invalidations over the VOCs and VCs
- // -> cache repaint could use the here offered sequence of primitives to re-create the bitmap
- // (just hand over the local member to the cache)
- //
- // For the moment i will use (1) and disable primitive creation for SdrPageObj contents here
-
- // const_cast< PageObjectViewObjectContact* >(this)->mxCurrentPageContents = ViewObjectContactOfPageObj::createPrimitive2DSequence(rDisplayInfo);
-
- // assert when this call is issued indirectly from the destructor of
- // this instance. This is not allowed and needs to be looked at
-#ifdef DBG_UTIL
- if(mbInDestructor)
- {
- OSL_ENSURE(false, "Higher call inside PageObjectViewObjectContact in destructor (!)");
- }
-#endif
-
- // Check if buffering can and shall be done.
- if (pDevice != NULL
- && !GetObjectContact().isOutputToPrinter()
- && !GetObjectContact().isOutputToRecordingMetaFile()
- && !mbInDestructor)
- {
- // get inner and outer logic rectangles. Use model data directly for creation. Do NOT use getBoundRect()/
- // getSnapRect() functionality; these will use the sequence of primitives in the long run itself. SdrPageObj
- // is a SdrObject, so use SdrObject::aOutRect as model data. Access using GetLastBoundRect() to not execute anything
- PageObjectViewContact& rPaObVOC(static_cast< PageObjectViewContact& >(GetViewContact()));
- const Rectangle aInnerLogic(rPaObVOC.GetPageObject().GetLastBoundRect());
-
- // get BitmapEx from cache. Do exactly the same as Paint_Preview() to avoid a repaint loop
- // caused by slightly different pixel sizes of what the cache sees as pixel size and what is
- // calculated here in discrete coordinates. This includes to not use LogicToPiyel on the Rectangle,
- // but to do the same as the GetBoundingBox() implementation
- const Rectangle aInnerPixel(Rectangle(pDevice->LogicToPixel(aInnerLogic.TopLeft()), pDevice->LogicToPixel(aInnerLogic.GetSize())));
- BitmapEx aBitmapEx(const_cast< PageObjectViewObjectContact* >(this)->GetPreview(rDisplayInfo, aInnerPixel));
-
- // prepare inner range
- const basegfx::B2DRange aInnerRange(aInnerLogic.Left(), aInnerLogic.Top(), aInnerLogic.Right(), aInnerLogic.Bottom());
-
- // provide default parameters
- String aPageName;
- Font aPageNameFont;
- sal_uInt32 nPageNumber(0);
- Size aPageNumberAreaModelSize;
- bool bShowFadeEffectIcon(false);
- bool bShowCommentsIcon(false);
- bool bExcluded(false);
-
- if(GetPage())
- {
- const SdPage* pPage = static_cast<const SdPage*>(GetPage());
-
- // decide if fade effect indicator will be painted
- if(pPage->getTransitionType() > 0)
- {
- bShowFadeEffectIcon = true;
- }
-
- bShowCommentsIcon = !pPage->getAnnotations().empty();
-
- // prepare PageName, PageNumber, font and AreaModelSize
- aPageName = pPage->GetName();
- aPageNameFont = *FontProvider::Instance().GetFont(*pDevice);
- nPageNumber = ((pPage->GetPageNum() - 1) / 2) + 1;
- aPageNumberAreaModelSize = GetPageDescriptor()->GetPageNumberAreaModelSize();
-
- if(!aPageName.Len())
- {
- aPageName = String(SdResId(STR_PAGE));
- aPageName += String::CreateFromInt32(nPageNumber);
- }
-
- // decide if page is excluded
- bExcluded = pPage->IsExcluded();
- }
-
- // create specialized primitives for focus, select and PagePreview itself
- const bool bCreateBitmap(!aBitmapEx.IsEmpty());
- const bool bCreateFocused(GetPageDescriptor()->IsFocused());
- const bool bCreateSelected(GetPageDescriptor()->IsSelected());
-
- const sal_uInt32 nCount(
- (bCreateBitmap ? 1 : 0) + // bitmap itself
- 1 + // border around bitmap (always)
- 1 + // FadeEffect, PageName and PageNumber visualisation (always)
- (bCreateFocused ? 1 : 0) + // create focused
- (bCreateSelected ? 1 : 0) // create selected
- );
- sal_uInt32 nInsert(0);
- Primitive2DSequence xRetval(nCount);
-
- if(bCreateBitmap)
- {
- // add selection indicator if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectPageBitmapPrimitive(aInnerRange, aBitmapEx));
- }
-
- if(true)
- {
- // add border (always)
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectBorderPrimitive(aInnerRange));
- }
-
- if(true)
- {
- // add fade effext, page name and number if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFadeNameNumberPrimitive(
- aInnerRange,
- aPageName,
- nPageNumber,
- aPageNameFont,
- aPageNumberAreaModelSize,
- bShowFadeEffectIcon,
- bShowCommentsIcon,
- bExcluded));
- }
-
- if(bCreateSelected)
- {
- // add selection indicator if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectSelectPrimitive(aInnerRange));
- }
-
- if(bCreateFocused)
- {
- // add focus indicator if used
- xRetval[nInsert++] = Primitive2DReference(new SdPageObjectFocusPrimitive(aInnerRange, bCreateSelected));
- }
-
- return xRetval;
- }
- else
- {
- // Call parent. Output to printer or metafile will use vector data, not cached bitmaps
- return ViewObjectContactOfPageObj::createPrimitive2DSequence(rDisplayInfo);
- }
-}
-
-BitmapEx PageObjectViewObjectContact::CreatePreview (const DisplayInfo& /*rDisplayInfo*/)
-{
- const SdPage* pPage = static_cast<const SdPage*>(GetPage());
- OutputDevice* pDevice = GetObjectContact().TryToGetOutputDevice();
-
- if(pDevice)
- {
- Rectangle aPreviewPixelBox (GetBoundingBox(*pDevice,PreviewBoundingBox,PixelCoordinateSystem));
-
- PreviewRenderer aRenderer (pDevice);
- Image aPreview (aRenderer.RenderPage(
- pPage,
- aPreviewPixelBox.GetSize(),
- String()));
-
- return aPreview.GetBitmapEx();
- }
- else
- {
- return BitmapEx();
- }
-}
-
-
-
-
-BitmapEx PageObjectViewObjectContact::GetPreview (
- const DisplayInfo& rDisplayInfo,
- const Rectangle& rNewSizePixel)
-{
- BitmapEx aBitmap;
-
- try
- {
- // assert when this call is issued indirectly from the destructor of
- // this instance. This is not allowed and needs to be looked at
- OSL_ENSURE(!mbInDestructor, "Higher call inside PageObjectViewObjectContact in destructor (!)");
-
- if (!mbInDestructor)
- {
- if (mpCache != NULL)
- {
- aBitmap = mpCache->GetPreviewBitmap(
- GetPage(),
- rNewSizePixel.GetSize());
- mpCache->SetPreciousFlag(GetPage(), true);
- }
- else
- aBitmap = CreatePreview(rDisplayInfo);
- }
- }
- catch (const ::com::sun::star::uno::Exception&)
- {
- DBG_UNHANDLED_EXCEPTION();
- }
-
- return aBitmap;
-}
-
-
-
-
-const SdrPage* PageObjectViewObjectContact::GetPage (void) const
-{
- return static_cast<PageObjectViewContact&>(GetViewContact()).GetPage();
-}
-
-
-
-
-void PageObjectViewObjectContact::ActionChanged (void)
-{
- // Even when we are called from destructor we still have to invalide
- // the preview bitmap in the cache.
- const SdrPage* pPage = GetPage();
-
- if(pPage)
- {
- SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
- if (mpCache!=NULL && pPage!=NULL && pDocument!=NULL)
- {
- cache::PageCacheManager::Instance()->InvalidatePreviewBitmap(
- pDocument->getUnoModel(),
- pPage);
- }
- }
-
- // call parent
- ViewObjectContactOfPageObj::ActionChanged();
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// helper MouseOverEffectPrimitive
-//
-// Used to allow view-dependent primitive definition. For that purpose, the
-// initially created primitive (here: in createMouseOverEffectPrimitive2DSequence())
-// always has to be view-independent, but the decomposition is made view-dependent.
-// Very simple primitive which just remembers the discrete data and applies
-// it at decomposition time.
-
-class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BufferedDecompositionPrimitive2D
-{
-private:
- basegfx::B2DRange maLogicRange;
- sal_uInt32 mnDiscreteOffset;
- sal_uInt32 mnDiscreteWidth;
- basegfx::BColor maRGBColor;
-
-protected:
- virtual drawinglayer::primitive2d::Primitive2DSequence create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-
-public:
- MouseOverEffectPrimitive(
- const basegfx::B2DRange& rLogicRange,
- sal_uInt32 nDiscreteOffset,
- sal_uInt32 nDiscreteWidth,
- const basegfx::BColor& rRGBColor)
- : drawinglayer::primitive2d::BufferedDecompositionPrimitive2D(),
- maLogicRange(rLogicRange),
- mnDiscreteOffset(nDiscreteOffset),
- mnDiscreteWidth(nDiscreteWidth),
- maRGBColor(rRGBColor)
- {}
-
- // data access
- const basegfx::B2DRange& getLogicRange() const { return maLogicRange; }
- sal_uInt32 getDiscreteOffset() const { return mnDiscreteOffset; }
- sal_uInt32 getDiscreteWidth() const { return mnDiscreteWidth; }
- const basegfx::BColor& getRGBColor() const { return maRGBColor; }
-
- virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
-
- DeclPrimitrive2DIDBlock()
-};
-
-drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::create2DDecomposition(
- const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
-{
- // get logic sizes in object coordinate system
- const double fDiscreteWidth((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
- const double fOffset(fDiscreteWidth * getDiscreteOffset());
- const double fWidth(fDiscreteWidth * getDiscreteWidth());
-
- // create range (one pixel less to get a good fitting)
- basegfx::B2DRange aRange(
- getLogicRange().getMinimum(),
- getLogicRange().getMaximum() - basegfx::B2DTuple(fDiscreteWidth, fDiscreteWidth));
-
- // grow range
- aRange.grow(fOffset - (fWidth * 0.5));
-
- // create fat line with parameters. The formerly hand-painted edge
- // roundings will now be done using rounded edges of this fat line
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
- const drawinglayer::attribute::LineAttribute aLineAttribute(getRGBColor(), fWidth);
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
- aPolygon,
- aLineAttribute));
-
- return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
-}
-
-bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
-{
- if(drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::operator==(rPrimitive))
- {
- const MouseOverEffectPrimitive& rCompare = static_cast< const MouseOverEffectPrimitive& >(rPrimitive);
-
- return (getLogicRange() == rCompare.getLogicRange()
- && getDiscreteOffset() == rCompare.getDiscreteOffset()
- && getDiscreteWidth() == rCompare.getDiscreteWidth()
- && getRGBColor() == rCompare.getRGBColor());
- }
-
- return false;
-}
-
-ImplPrimitrive2DIDBlock(MouseOverEffectPrimitive, PRIMITIVE2D_ID_SDMOUSEOVEREFFECTPRIMITIVE)
-
-//////////////////////////////////////////////////////////////////////////////
-
-drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::createMouseOverEffectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
-
- if(GetPageDescriptor()->IsSelected() && mpProperties.get() && mpProperties->IsShowSelection())
- {
- // When the selection frame is visualized the mouse over frame is not
- // visible and does not have to be created.
- }
- else
- {
- const PageObjectViewContact& rPaObVOC(static_cast<PageObjectViewContact&>(GetViewContact()));
- const Rectangle aBoundingBox(rPaObVOC.GetPageObject().GetLastBoundRect());
- const basegfx::B2DRange aLogicRange(aBoundingBox.Left(), aBoundingBox.Top(), aBoundingBox.Right(), aBoundingBox.Bottom());
- const basegfx::BColor aSelectionColor(mpProperties->GetSelectionColor().getBColor());
- const drawinglayer::primitive2d::Primitive2DReference aReference(
- new MouseOverEffectPrimitive(
- aLogicRange,
- mnMouseOverEffectOffset,
- mnMouseOverEffectThickness,
- aSelectionColor));
-
- aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
- }
-
- return aRetval;
-}
-
-
-
-
-SvBorder PageObjectViewObjectContact::CalculatePageModelBorder (
- OutputDevice* pDevice,
- int nPageCount)
-{
- SvBorder aModelBorder;
-
- if (pDevice != NULL)
- {
- // 1. Initialize the border with the values that do not depend on
- // the device.
- Size aTopLeftBorders (pDevice->PixelToLogic (Size (
- mnPageNumberOffset+1,
- mnSelectionIndicatorOffset + mnSelectionIndicatorThickness)));
- Size aBottomRightBorders (pDevice->PixelToLogic (Size (
- mnSelectionIndicatorOffset + mnSelectionIndicatorThickness,
- mnFadeEffectIndicatorOffset)));
- aModelBorder = SvBorder (
- aTopLeftBorders.Width(),
- aTopLeftBorders.Height(),
- aBottomRightBorders.Width(),
- aBottomRightBorders.Height());
-
-
- // 2. Add the device dependent values.
-
- // Calculate the area of the page number.
- Size aPageNumberModelSize (
- CalculatePageNumberAreaModelSize (pDevice, nPageCount));
-
- // Update the border.
- aModelBorder.Left() += aPageNumberModelSize.Width();
- // The height of the page number area is the same as the height of
- // the page name area.
- aModelBorder.Bottom() += aPageNumberModelSize.Height();
- }
-
- return aModelBorder;
-}
-
-
-
-
-Size PageObjectViewObjectContact::CalculatePageNumberAreaModelSize (
- OutputDevice* pDevice,
- int nPageCount)
-{
- // Set the correct font.
- Font aOriginalFont (pDevice->GetFont());
- pDevice->SetFont(*FontProvider::Instance().GetFont(*pDevice));
-
- String sPageNumberTemplate;
- if (nPageCount < 10)
- sPageNumberTemplate = String::CreateFromAscii("9");
- else if (nPageCount < 100)
- sPageNumberTemplate = String::CreateFromAscii("99");
- else if (nPageCount < 200)
- // Just for the case that 1 is narrower than 9.
- sPageNumberTemplate = String::CreateFromAscii("199");
- else if (nPageCount < 1000)
- sPageNumberTemplate = String::CreateFromAscii("999");
- else
- sPageNumberTemplate = String::CreateFromAscii("9999");
- // More then 9999 pages are not handled.
-
- Size aSize (
- pDevice->GetTextWidth (sPageNumberTemplate),
- pDevice->GetTextHeight ());
-
- pDevice->SetFont (aOriginalFont);
-
- return aSize;
-}
-
-
-
-
-model::SharedPageDescriptor
- PageObjectViewObjectContact::GetPageDescriptor (void) const
-{
- PageObjectViewContact& rViewContact (
- static_cast<PageObjectViewContact&>(GetViewContact()));
- PageObject& rPageObject (
- static_cast<PageObject&>(rViewContact.GetPageObject()));
- return rPageObject.GetDescriptor();
-}
-
-
-
-} } } // end of namespace ::sd::slidesorter::view
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsResource.hxx b/sd/source/ui/slidesorter/view/SlsResource.hxx
new file mode 100644
index 000000000000..9ba3e33b2422
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsResource.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_SLIDESORTER_RESOURCE_HXX
+#define SD_SLIDESORTER_RESOURCE_HXX
+
+#include "view/SlsResource.hrc"
+#include "sdresid.hxx"
+#include <tools/rc.hxx>
+
+namespace sd { namespace slidesorter { namespace view {
+
+class LocalResource : public Resource
+{
+public:
+ LocalResource (const sal_uInt16 nResourceId) : Resource(SdResId(nResourceId)){}
+ ~LocalResource (void) { FreeResource(); }
+};
+
+
+} } } // end of namespace ::sd::slidesorter::view
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsResource.src b/sd/source/ui/slidesorter/view/SlsResource.src
new file mode 100644
index 000000000000..13f6cd08c775
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsResource.src
@@ -0,0 +1,314 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "view/SlsResource.hrc"
+
+Resource RID_SLIDESORTER_ICONS
+{
+ Image IMAGE_COMMAND1_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large.png" ; };
+ };
+ Image IMAGE_COMMAND1_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND1_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND1_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command1_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_COMMAND2_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large.png" ; };
+ };
+ Image IMAGE_COMMAND2_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND2_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_COMMAND2B_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large.png" ; };
+ };
+ Image IMAGE_COMMAND2B_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND2B_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND2B_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command2b_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_COMMAND3_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large.png" ; };
+ };
+ Image IMAGE_COMMAND3_LARGE_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large_hover.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium_hover.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL_HOVER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small_hover.png" ; };
+ };
+
+ Image IMAGE_COMMAND3_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_LARGE_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_large_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_MEDIUM_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_medium_hover_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small_hc.png" ; };
+ };
+ Image IMAGE_COMMAND3_SMALL_HOVER_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command3_small_hover_hc.png" ; };
+ };
+
+
+ Image IMAGE_BUTTONBAR_LARGE
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_large.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_MEDIUM
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_medium.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_SMALL
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_small.png" ; };
+ };
+
+ Image IMAGE_BUTTONBAR_LARGE_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_large_hc.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_MEDIUM_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_medium_hc.png" ; };
+ };
+ Image IMAGE_BUTTONBAR_SMALL_HC
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_command_background_small_hc.png" ; };
+ };
+
+
+
+ Image IMAGE_SHADOW
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_shadow.png" ; };
+ };
+
+ Image IMAGE_INSERT_SHADOW
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_insert_shadow.png" ; };
+ };
+
+ Image IMAGE_HIDE_SLIDE_OVERLAY
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_hide_slide_overlay.png" ; };
+ };
+
+ Image IMAGE_FOCUS_BORDER
+ {
+ ImageBitmap = Bitmap { File = "slide_sorter_focus_border.png" ; };
+ };
+
+
+ String STRING_DRAG_AND_DROP_PAGES
+ {
+ Text [ en-US ] = "Drag and Drop Pages" ;
+ };
+
+ String STRING_DRAG_AND_DROP_SLIDES
+ {
+ Text [ en-US ] = "Drag and Drop Slides" ;
+ };
+
+ String STRING_COMMAND1
+ {
+ Text [ en-US ] = "Start Slide Show" ;
+ };
+
+ String STRING_COMMAND2_A
+ {
+ Text [ en-US ] = "Hide Slide" ;
+ };
+
+ String STRING_COMMAND2_B
+ {
+ Text [ en-US ] = "Show Slide" ;
+ };
+
+ String STRING_COMMAND3
+ {
+ Text [ en-US ] = "Duplicate Slide" ;
+ };
+};
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
new file mode 100644
index 000000000000..5cc06eadae04
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -0,0 +1,536 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsTheme.hxx"
+#include "SlsResource.hxx"
+#include "controller/SlsProperties.hxx"
+#include "sdresid.hxx"
+#include <tools/color.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/image.hxx>
+#include <vcl/svapp.hxx>
+#include <svtools/colorcfg.hxx>
+
+namespace sd { namespace slidesorter { namespace view {
+
+const static ColorData Black = 0x000000;
+const static ColorData White = 0xffffff;
+
+
+
+ColorData ChangeLuminance (const ColorData aColorData, const int nValue)
+{
+ Color aColor (aColorData);
+ if (nValue > 0)
+ aColor.IncreaseLuminance(nValue);
+ else
+ aColor.DecreaseLuminance(-nValue);
+ return aColor.GetColor();
+}
+
+ColorData HGBAdapt (
+ const ColorData aColorData,
+ const sal_Int32 nNewSaturation,
+ const sal_Int32 nNewBrightness)
+{
+ sal_uInt16 nHue (0);
+ sal_uInt16 nSaturation (0);
+ sal_uInt16 nBrightness (0);
+ Color(aColorData).RGBtoHSB(nHue, nSaturation, nBrightness);
+ return Color::HSBtoRGB(
+ nHue,
+ nNewSaturation>=0 ? nNewSaturation : nSaturation,
+ nNewBrightness>=0 ? nNewBrightness : nBrightness);
+}
+
+
+
+
+Theme::Theme (const ::boost::shared_ptr<controller::Properties>& rpProperties)
+ : mbIsHighContrastMode(false),
+ maBackgroundColor(rpProperties->GetBackgroundColor().GetColor()),
+ maPageBackgroundColor(COL_WHITE),
+ maGradients(),
+ maIcons(),
+ maColor(),
+ maIntegerValues()
+{
+ {
+ LocalResource aResource (RID_SLIDESORTER_ICONS);
+
+ maStrings.resize(_StringType_Size_);
+ maStrings[String_DragAndDropPages] = String(SdResId(STRING_DRAG_AND_DROP_PAGES));
+ maStrings[String_DragAndDropSlides] = String(SdResId(STRING_DRAG_AND_DROP_SLIDES));
+ maStrings[String_Command1] = String(SdResId(STRING_COMMAND1));
+ maStrings[String_Command2] = String(SdResId(STRING_COMMAND2_A));
+ maStrings[String_Command2B] = String(SdResId(STRING_COMMAND2_B));
+ maStrings[String_Command3] = String(SdResId(STRING_COMMAND3));
+
+ maColor.resize(_ColorType_Size_);
+ maColor[Color_Background] = maBackgroundColor;
+ maColor[Color_ButtonBackground] = Black;
+ maColor[Color_ButtonText] = 0xc0c0c0;
+ maColor[Color_ButtonTextHover] = White;
+ maColor[Color_PageNumberDefault] = 0x0808080;
+ maColor[Color_PageNumberHover] = 0x4c4c4c;
+ maColor[Color_PageNumberHighContrast] = White;
+ maColor[Color_PageNumberBrightBackground] = 0x333333;
+ maColor[Color_PageNumberDarkBackground] = 0xcccccc;
+ maColor[Color_PreviewBorder] = 0x949599;
+
+ maIntegerValues.resize(_IntegerValueType_Size_);
+ maIntegerValues[Integer_ButtonCornerRadius] = 3;
+ maIntegerValues[Integer_ButtonMaxAlpha] = 0;
+ maIntegerValues[Integer_ButtonBarMaxAlpha] = 0;
+ maIntegerValues[Integer_ButtonPaintType] = 1;
+ maIntegerValues[Integer_ButtonBorder] = 4;
+ maIntegerValues[Integer_ButtonGap] = 0;
+ maIntegerValues[Integer_ButtonFadeInDelay] = 800;
+ maIntegerValues[Integer_ButtonFadeInDuration] = 100;
+ maIntegerValues[Integer_ButtonFadeOutDelay] = 0;
+ maIntegerValues[Integer_ButtonFadeOutDuration] = 100;
+ maIntegerValues[Integer_ToolTipDelay] = 1000;
+ maIntegerValues[Integer_FocusIndicatorWidth] = 3;
+ }
+
+ Update(rpProperties);
+}
+
+
+
+
+void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpProperties)
+{
+ const bool bSavedHighContrastMode (mbIsHighContrastMode);
+ mbIsHighContrastMode = rpProperties->IsHighContrastModeActive();
+
+ // Set up colors.
+ maBackgroundColor = rpProperties->GetBackgroundColor().GetColor();
+ maPageBackgroundColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor;
+
+ maColor[Color_Background] = maBackgroundColor;
+
+ maGradients.resize(_GradientColorType_Size_);
+
+ maColor[Color_Background] = maBackgroundColor;
+ const ColorData aSelectionColor (rpProperties->GetSelectionColor().GetColor());
+ maColor[Color_Selection] = aSelectionColor;
+ if (Color(aSelectionColor).IsBright())
+ maColor[Color_PageCountFontColor] = Black;
+ else
+ maColor[Color_PageCountFontColor] = White;
+
+ // Set up gradients.
+ SetGradient(Gradient_SelectedPage, aSelectionColor, 50, 50, +100,+100, +50,+25);
+ SetGradient(Gradient_MouseOverPage, aSelectionColor, 75, 75, +100,+100, +50,+25);
+ SetGradient(Gradient_SelectedAndFocusedPage, aSelectionColor, 50, 50, +100,+100, -50,-75);
+ SetGradient(Gradient_MouseOverSelectedAndFocusedPage, aSelectionColor, 75, 75, +100,+100, -50,-75);
+ SetGradient(Gradient_FocusedPage, aSelectionColor, -1,-1, 0,0, -50,-75);
+
+ SetGradient(Gradient_ButtonBackground, Black, -1,-1, 0,0, 0,0);
+ SetGradient(Gradient_NormalPage, maBackgroundColor, -1,-1, 0,0, 0,0);
+
+ // The focused gradient needs special handling because its fill color is
+ // like that of the NormalPage gradient.
+ GetGradient(Gradient_FocusedPage).maFillColor1 = GetGradient(Gradient_NormalPage).maFillColor1;
+ GetGradient(Gradient_FocusedPage).maFillColor2 = GetGradient(Gradient_NormalPage).maFillColor2;
+
+ // Set up icons.
+ if (bSavedHighContrastMode != mbIsHighContrastMode || maIcons.empty())
+ {
+ LocalResource aResource (RID_SLIDESORTER_ICONS);
+
+ maIcons.resize(_IconType_Size_);
+ if (mbIsHighContrastMode)
+ {
+ InitializeIcon(Icon_RawShadow, IMAGE_SHADOW);
+ InitializeIcon(Icon_RawInsertShadow, IMAGE_INSERT_SHADOW);
+ InitializeIcon(Icon_HideSlideOverlay, IMAGE_HIDE_SLIDE_OVERLAY);
+
+ InitializeIcon(Icon_ButtonBarLarge, IMAGE_BUTTONBAR_LARGE_HC);
+ InitializeIcon(Icon_ButtonBarMedium, IMAGE_BUTTONBAR_MEDIUM_HC);
+ InitializeIcon(Icon_ButtonBarSmall, IMAGE_BUTTONBAR_SMALL_HC);
+
+ InitializeIcon(Icon_Command1Large, IMAGE_COMMAND1_LARGE_HC);
+ InitializeIcon(Icon_Command1LargeHover, IMAGE_COMMAND1_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command1Medium, IMAGE_COMMAND1_MEDIUM_HC);
+ InitializeIcon(Icon_Command1MediumHover, IMAGE_COMMAND1_MEDIUM_HOVER_HC);
+ InitializeIcon(Icon_Command1Small, IMAGE_COMMAND1_SMALL_HC);
+ InitializeIcon(Icon_Command1SmallHover, IMAGE_COMMAND1_SMALL_HOVER_HC);
+
+ InitializeIcon(Icon_Command2Large, IMAGE_COMMAND2_LARGE_HC);
+ InitializeIcon(Icon_Command2LargeHover, IMAGE_COMMAND2_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command2Medium, IMAGE_COMMAND2_MEDIUM_HC);
+ InitializeIcon(Icon_Command2MediumHover, IMAGE_COMMAND2_MEDIUM_HOVER_HC);
+ InitializeIcon(Icon_Command2Small, IMAGE_COMMAND2_SMALL_HC);
+ InitializeIcon(Icon_Command2SmallHover, IMAGE_COMMAND2_SMALL_HOVER_HC);
+
+ InitializeIcon(Icon_Command2BLarge, IMAGE_COMMAND2B_LARGE_HC);
+ InitializeIcon(Icon_Command2BLargeHover, IMAGE_COMMAND2B_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command2BMedium, IMAGE_COMMAND2B_MEDIUM_HC);
+ InitializeIcon(Icon_Command2BMediumHover, IMAGE_COMMAND2B_MEDIUM_HOVER_HC);
+ InitializeIcon(Icon_Command2BSmall, IMAGE_COMMAND2B_SMALL_HC);
+ InitializeIcon(Icon_Command2BSmallHover, IMAGE_COMMAND2B_SMALL_HOVER_HC);
+
+ InitializeIcon(Icon_Command3Large, IMAGE_COMMAND3_LARGE_HC);
+ InitializeIcon(Icon_Command3LargeHover, IMAGE_COMMAND3_LARGE_HOVER_HC);
+ InitializeIcon(Icon_Command3Medium, IMAGE_COMMAND3_SMALL_HC);
+ InitializeIcon(Icon_Command3MediumHover, IMAGE_COMMAND3_SMALL_HOVER_HC);
+ InitializeIcon(Icon_Command3Small, IMAGE_COMMAND3_SMALL_HC);
+ InitializeIcon(Icon_Command3SmallHover, IMAGE_COMMAND3_SMALL_HOVER_HC);
+ }
+ else
+ {
+ InitializeIcon(Icon_RawShadow, IMAGE_SHADOW);
+ InitializeIcon(Icon_RawInsertShadow, IMAGE_INSERT_SHADOW);
+ InitializeIcon(Icon_HideSlideOverlay, IMAGE_HIDE_SLIDE_OVERLAY);
+
+ InitializeIcon(Icon_ButtonBarLarge, IMAGE_BUTTONBAR_LARGE);
+ InitializeIcon(Icon_ButtonBarMedium, IMAGE_BUTTONBAR_MEDIUM);
+ InitializeIcon(Icon_ButtonBarSmall, IMAGE_BUTTONBAR_SMALL);
+
+ InitializeIcon(Icon_Command1Large, IMAGE_COMMAND1_LARGE);
+ InitializeIcon(Icon_Command1LargeHover, IMAGE_COMMAND1_LARGE_HOVER);
+ InitializeIcon(Icon_Command1Medium, IMAGE_COMMAND1_MEDIUM);
+ InitializeIcon(Icon_Command1MediumHover, IMAGE_COMMAND1_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command1Small, IMAGE_COMMAND1_SMALL);
+ InitializeIcon(Icon_Command1SmallHover, IMAGE_COMMAND1_SMALL_HOVER);
+
+ InitializeIcon(Icon_Command2Large, IMAGE_COMMAND2_LARGE);
+ InitializeIcon(Icon_Command2LargeHover, IMAGE_COMMAND2_LARGE_HOVER);
+ InitializeIcon(Icon_Command2Medium, IMAGE_COMMAND2_MEDIUM);
+ InitializeIcon(Icon_Command2MediumHover, IMAGE_COMMAND2_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command2Small, IMAGE_COMMAND2_SMALL);
+ InitializeIcon(Icon_Command2SmallHover, IMAGE_COMMAND2_SMALL_HOVER);
+
+ InitializeIcon(Icon_Command2BLarge, IMAGE_COMMAND2B_LARGE);
+ InitializeIcon(Icon_Command2BLargeHover, IMAGE_COMMAND2B_LARGE_HOVER);
+ InitializeIcon(Icon_Command2BMedium, IMAGE_COMMAND2B_MEDIUM);
+ InitializeIcon(Icon_Command2BMediumHover, IMAGE_COMMAND2B_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command2BSmall, IMAGE_COMMAND2B_SMALL);
+ InitializeIcon(Icon_Command2BSmallHover, IMAGE_COMMAND2B_SMALL_HOVER);
+
+ InitializeIcon(Icon_Command3Large, IMAGE_COMMAND3_LARGE);
+ InitializeIcon(Icon_Command3LargeHover, IMAGE_COMMAND3_LARGE_HOVER);
+ InitializeIcon(Icon_Command3Medium, IMAGE_COMMAND3_MEDIUM);
+ InitializeIcon(Icon_Command3MediumHover, IMAGE_COMMAND3_MEDIUM_HOVER);
+ InitializeIcon(Icon_Command3Small, IMAGE_COMMAND3_SMALL);
+ InitializeIcon(Icon_Command3SmallHover, IMAGE_COMMAND3_SMALL_HOVER);
+ }
+ InitializeIcon(Icon_FocusBorder, IMAGE_FOCUS_BORDER);
+ }
+}
+
+
+
+
+::boost::shared_ptr<Font> Theme::GetFont (
+ const FontType eType,
+ const OutputDevice& rDevice)
+{
+ ::boost::shared_ptr<Font> pFont;
+
+ switch (eType)
+ {
+ case Font_PageNumber:
+ pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont()));
+ pFont->SetTransparent(sal_True);
+ pFont->SetWeight(WEIGHT_BOLD);
+ break;
+
+ case Font_PageCount:
+ pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont()));
+ pFont->SetTransparent(sal_True);
+ pFont->SetWeight(WEIGHT_NORMAL);
+ {
+ const Size aSize (pFont->GetSize());
+ pFont->SetSize(Size(aSize.Width()*5/3, aSize.Height()*5/3));
+ }
+ break;
+
+ case Font_Button:
+ pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont()));
+ pFont->SetTransparent(sal_True);
+ pFont->SetWeight(WEIGHT_BOLD);
+ {
+ const Size aSize (pFont->GetSize());
+ pFont->SetSize(Size(aSize.Width()*4/3, aSize.Height()*4/3));
+ }
+ break;
+ }
+
+ if (pFont)
+ {
+ // Transform the point size to pixel size.
+ const MapMode aFontMapMode (MAP_POINT);
+ const Size aFontSize (rDevice.LogicToPixel(pFont->GetSize(), aFontMapMode));
+
+ // Transform the font size to the logical coordinates of the device.
+ pFont->SetSize(rDevice.PixelToLogic(aFontSize));
+ }
+
+ return pFont;
+}
+
+
+
+
+ColorData Theme::GetColor (const ColorType eType)
+{
+ if (eType>=0 && sal_uInt32(eType)<maColor.size())
+ return maColor[eType];
+ else
+ return 0;
+}
+
+
+
+
+void Theme::SetColor (
+ const ColorType eType,
+ const ColorData aData)
+{
+ if (eType>=0 && sal_uInt32(eType)<maColor.size())
+ maColor[eType] = aData;
+}
+
+
+
+
+ColorData Theme::GetGradientColor (
+ const GradientColorType eType,
+ const GradientColorClass eClass)
+{
+ GradientDescriptor& rDescriptor (GetGradient(eType));
+
+ switch (eClass)
+ {
+ case Border1: return rDescriptor.maBorderColor1;
+ case Border2: return rDescriptor.maBorderColor2;
+ case Fill1: return rDescriptor.maFillColor1;
+ case Fill2: return rDescriptor.maFillColor2;
+ default: OSL_ASSERT(false); // fall through
+ case Base: return rDescriptor.maBaseColor;
+ }
+}
+
+
+
+
+sal_Int32 Theme::GetGradientOffset (
+ const GradientColorType eType,
+ const GradientColorClass eClass)
+{
+ GradientDescriptor& rDescriptor (GetGradient(eType));
+
+ switch (eClass)
+ {
+ case Border1: return rDescriptor.mnBorderOffset1;
+ case Border2: return rDescriptor.mnBorderOffset2;
+ case Fill1: return rDescriptor.mnFillOffset1;
+ case Fill2: return rDescriptor.mnFillOffset2;
+ default: OSL_ASSERT(false); // fall through
+ case Base: return 0;
+ }
+}
+
+
+
+
+void Theme::SetGradient (
+ const GradientColorType eType,
+ const ColorData aBaseColor,
+ const sal_Int32 nSaturationOverride,
+ const sal_Int32 nBrightnessOverride,
+ const sal_Int32 nFillStartOffset,
+ const sal_Int32 nFillEndOffset,
+ const sal_Int32 nBorderStartOffset,
+ const sal_Int32 nBorderEndOffset)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+
+ rGradient.maBaseColor = aBaseColor;
+
+ rGradient.mnSaturationOverride = nSaturationOverride;
+ rGradient.mnBrightnessOverride = nBrightnessOverride;
+ const ColorData aColor (nSaturationOverride>=0 || nBrightnessOverride>=0
+ ? HGBAdapt(aBaseColor, nSaturationOverride, nBrightnessOverride)
+ : aBaseColor);
+
+ rGradient.maFillColor1 = ChangeLuminance(aColor, nFillStartOffset);
+ rGradient.maFillColor2 = ChangeLuminance(aColor, nFillEndOffset);
+ rGradient.maBorderColor1 = ChangeLuminance(aColor, nBorderStartOffset);
+ rGradient.maBorderColor2 = ChangeLuminance(aColor, nBorderEndOffset);
+
+ rGradient.mnFillOffset1 = nFillStartOffset;
+ rGradient.mnFillOffset2 = nFillEndOffset;
+ rGradient.mnBorderOffset1 = nBorderStartOffset;
+ rGradient.mnBorderOffset2 = nBorderEndOffset;
+}
+
+
+
+
+sal_Int32 Theme::GetGradientSaturationOverride (const GradientColorType eType)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ return rGradient.mnSaturationOverride;
+}
+
+
+
+
+sal_Int32 Theme::GetGradientBrightnessOverride (const GradientColorType eType)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ return rGradient.mnBrightnessOverride;
+}
+
+
+
+
+void Theme::SetGradientSaturationOverride (const GradientColorType eType, const sal_Int32 nValue)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ SetGradient(
+ eType,
+ rGradient.maBaseColor,
+ nValue,
+ rGradient.mnBrightnessOverride,
+ rGradient.mnFillOffset1,
+ rGradient.mnFillOffset2,
+ rGradient.mnBorderOffset1,
+ rGradient.mnBorderOffset2);
+}
+
+
+
+
+void Theme::SetGradientBrightnessOverride (const GradientColorType eType, const sal_Int32 nValue)
+{
+ GradientDescriptor& rGradient (GetGradient(eType));
+ SetGradient(eType,
+ rGradient.maBaseColor,
+ rGradient.mnSaturationOverride,
+ nValue,
+ rGradient.mnFillOffset1,
+ rGradient.mnFillOffset2,
+ rGradient.mnBorderOffset1,
+ rGradient.mnBorderOffset2);
+}
+
+
+
+
+const BitmapEx& Theme::GetIcon (const IconType eType)
+{
+ if (eType>=0 && size_t(eType)<maIcons.size())
+ return maIcons[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size());
+ return maIcons[0];
+ }
+}
+
+
+
+
+sal_Int32 Theme::GetIntegerValue (const IntegerValueType eType) const
+{
+ if (eType>=0 && size_t(eType)<maIntegerValues.size())
+ return maIntegerValues[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIntegerValues.size());
+ return 0;
+ }
+}
+
+
+
+
+void Theme::SetIntegerValue (const IntegerValueType eType, const sal_Int32 nValue)
+{
+ if (eType>=0 && size_t(eType)<maIntegerValues.size())
+ maIntegerValues[eType] = nValue;
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIntegerValues.size());
+ }
+}
+
+
+
+
+::rtl::OUString Theme::GetString (const StringType eType) const
+{
+ if (eType>=0 && size_t(eType)<maStrings.size())
+ return maStrings[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maStrings.size());
+ return ::rtl::OUString();
+ }
+}
+
+
+
+
+Theme::GradientDescriptor& Theme::GetGradient (const GradientColorType eType)
+{
+ if (eType>=0 && size_t(eType)<maGradients.size())
+ return maGradients[eType];
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maGradients.size());
+ return maGradients[0];
+ }
+}
+
+
+
+
+void Theme::InitializeIcon (const IconType eType, sal_uInt16 nResourceId)
+{
+ if (eType>=0 && size_t(eType)<maIcons.size())
+ {
+ const BitmapEx aIcon (Image(SdResId(nResourceId)).GetBitmapEx());
+ maIcons[eType] = aIcon;
+ }
+ else
+ {
+ OSL_ASSERT(eType>=0 && size_t(eType)<maIcons.size());
+ }
+}
+
+
+
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
new file mode 100644
index 000000000000..211760ef2002
--- /dev/null
+++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
@@ -0,0 +1,230 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_sd.hxx"
+
+#include "view/SlsToolTip.hxx"
+#include "view/SlideSorterView.hxx"
+#include "view/SlsLayouter.hxx"
+#include "view/SlsTheme.hxx"
+#include "sdpage.hxx"
+#include "sdresid.hxx"
+#include "glob.hrc"
+#include <vcl/help.hxx>
+
+using ::rtl::OUString;
+
+namespace sd { namespace slidesorter { namespace view {
+
+ToolTip::ToolTip (SlideSorter& rSlideSorter)
+ : mrSlideSorter(rSlideSorter),
+ msDefaultHelpText(),
+ msCurrentHelpText(),
+ mnHelpWindowHandle(0),
+ maTimer()
+{
+ maTimer.SetTimeout(rSlideSorter.GetTheme()->GetIntegerValue(Theme::Integer_ToolTipDelay));
+ maTimer.SetTimeoutHdl(LINK(this, ToolTip, DelayTrigger));
+}
+
+
+
+
+ToolTip::~ToolTip (void)
+{
+ maTimer.Stop();
+ Hide();
+}
+
+
+
+
+void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor)
+{
+ if (mpDescriptor != rpDescriptor)
+ {
+ maTimer.Stop();
+ Hide();
+
+ mpDescriptor = rpDescriptor;
+
+ if (mpDescriptor)
+ {
+ SdPage* pPage = mpDescriptor->GetPage();
+ OUString sHelpText;
+ if (pPage != NULL)
+ sHelpText = pPage->GetName();
+ else
+ {
+ OSL_ASSERT(mpDescriptor->GetPage() != NULL);
+ }
+ if (sHelpText.getLength() == 0)
+ {
+ sHelpText = String(SdResId(STR_PAGE));
+ sHelpText += String::CreateFromInt32(mpDescriptor->GetPageIndex()+1);
+ }
+
+ msDefaultHelpText = sHelpText;
+ msCurrentHelpText = sHelpText;
+ Show(false);
+ }
+ else
+ {
+ msDefaultHelpText = OUString();
+ msCurrentHelpText = OUString();
+ }
+ }
+}
+
+
+
+
+void ToolTip::ShowDefaultHelpText (const ::rtl::OUString& rsHelpText)
+{
+ if (msDefaultHelpText != rsHelpText)
+ {
+ const bool bIsVisible (Hide());
+
+ msDefaultHelpText = rsHelpText;
+ msCurrentHelpText = rsHelpText;
+
+ Show(bIsVisible);
+ }
+}
+
+
+
+
+void ToolTip::ShowDefaultHelpText (void)
+{
+ if (msCurrentHelpText != msDefaultHelpText)
+ {
+ const bool bIsVisible (Hide());
+
+ msCurrentHelpText = msDefaultHelpText;
+
+ Show(bIsVisible);
+ }
+}
+
+
+
+
+void ToolTip::ShowHelpText (const ::rtl::OUString& rsHelpText)
+{
+ if (msCurrentHelpText != rsHelpText)
+ {
+ const bool bIsVisible (Hide());
+
+ msCurrentHelpText = rsHelpText;
+
+ Show(bIsVisible);
+ }
+}
+
+
+
+
+void ToolTip::Show (const bool bNoDelay)
+{
+ if (bNoDelay)
+ DoShow();
+ else
+ maTimer.Start();
+}
+
+
+
+
+void ToolTip::DoShow (void)
+{
+ if (maTimer.IsActive())
+ {
+ // The delay timer is active. Wait for it to trigger the showing of
+ // the tool tip.
+ return;
+ }
+
+ SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
+ if (msCurrentHelpText.getLength()>0 && pWindow)
+ {
+ Rectangle aBox (
+ mrSlideSorter.GetView().GetLayouter().GetPageObjectLayouter()->GetBoundingBox(
+ mpDescriptor,
+ PageObjectLayouter::Preview,
+ PageObjectLayouter::WindowCoordinateSystem));
+
+ // Do not show the help text when the (lower edge of the ) preview
+ // is not visible. The tool tip itself may still be outside the
+ // window.
+ if (aBox.Bottom() >= pWindow->GetSizePixel().Height())
+ return;
+
+ ::Window* pParent (pWindow.get());
+ while (pParent!=NULL && pParent->GetParent()!=NULL)
+ pParent = pParent->GetParent();
+ const Point aOffset (pWindow->GetWindowExtentsRelative(pParent).TopLeft());
+
+ // We do not know how high the tool tip will be but want its top
+ // edge not its bottom to be at a specific position (a little below
+ // the preview). Therefore we use a little trick and place the tool
+ // tip at the top of a rectangle that is placed below the preview.
+ aBox.Move(aOffset.X(), aOffset.Y() + aBox.GetHeight() + 3);
+ mnHelpWindowHandle = Help::ShowTip(
+ pWindow.get(),
+ aBox,
+ msCurrentHelpText,
+ QUICKHELP_CENTER | QUICKHELP_TOP);
+ }
+}
+
+
+
+
+bool ToolTip::Hide (void)
+{
+ if (mnHelpWindowHandle>0)
+ {
+ Help::HideTip(mnHelpWindowHandle);
+ mnHelpWindowHandle = 0;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
+IMPL_LINK(ToolTip, DelayTrigger, void*, EMPTYARG)
+{
+ DoShow();
+
+ return 0;
+}
+
+} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
index be9a7c2c23b7..76da9c1a4f15 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
@@ -25,18 +25,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
#include "precompiled_sd.hxx"
#include "SlsViewCacheContext.hxx"
+#include "SlideSorter.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "view/SlideSorterView.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
#include "sdpage.hxx"
#include "Window.hxx"
#include "drawdoc.hxx"
@@ -49,11 +47,9 @@
namespace sd { namespace slidesorter { namespace view {
-ViewCacheContext::ViewCacheContext (
- model::SlideSorterModel& rModel,
- SlideSorterView& rView)
- : mrModel(rModel),
- mrView(rView)
+ViewCacheContext::ViewCacheContext (SlideSorter& rSlideSorter)
+ : mrModel(rSlideSorter.GetModel()),
+ mrSlideSorter(rSlideSorter)
{
}
@@ -69,22 +65,17 @@ ViewCacheContext::~ViewCacheContext (void)
void ViewCacheContext::NotifyPreviewCreation (
cache::CacheKey aKey,
- const ::boost::shared_ptr<BitmapEx>& rPreview)
+ const Bitmap&)
{
- (void)rPreview;
const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
if (pDescriptor.get() != NULL)
{
- // Use direct view-invalidate here and no ActionChanged() at the VC
- // since the VC is a PageObjectViewObjectContact and in its ActionChanged()
- // implementation invalidates the cache entry again.
- view::PageObjectViewObjectContact* pContact = pDescriptor->GetViewObjectContact();
- if (pContact != NULL)
- pContact->GetObjectContact().InvalidatePartOfView(pContact->getObjectRange());
+ // Force a repaint that will trigger their re-creation.
+ mrSlideSorter.GetView().RequestRepaint(pDescriptor);
}
else
{
- OSL_ASSERT(pDescriptor.get() != NULL);
+ OSL_ASSERT(pDescriptor);
}
}
@@ -93,7 +84,7 @@ void ViewCacheContext::NotifyPreviewCreation (
bool ViewCacheContext::IsIdle (void)
{
- sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mrView.GetWindow()));
+ sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mrSlideSorter.GetContentWindow().get()));
if (nIdleState == tools::IdleDetection::IDET_IDLE)
return true;
else
@@ -105,7 +96,8 @@ bool ViewCacheContext::IsIdle (void)
bool ViewCacheContext::IsVisible (cache::CacheKey aKey)
{
- return GetDescriptor(aKey)->IsVisible();
+ const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
+ return pDescriptor && pDescriptor->HasState(model::PageDescriptor::ST_Visible);
}
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
index 25911b9ae80f..886e36c82210 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
@@ -36,9 +36,11 @@ namespace sd { namespace slidesorter { namespace model {
class SlideSorterModel;
} } }
-namespace sd { namespace slidesorter { namespace view {
+namespace sd { namespace slidesorter {
+class SlideSorter;
+} }
-class SlideSorterView;
+namespace sd { namespace slidesorter { namespace view {
/** The cache context for the SlideSorter as used by Draw and Impress. See
the base class for documentation of the individual methods.
@@ -46,11 +48,9 @@ class SlideSorterView;
class ViewCacheContext : public cache::CacheContext
{
public:
- ViewCacheContext (
- model::SlideSorterModel& rModel,
- SlideSorterView& rView);
+ ViewCacheContext (SlideSorter& rSlideSorter);
virtual ~ViewCacheContext (void);
- virtual void NotifyPreviewCreation (cache::CacheKey aKey, const ::boost::shared_ptr<BitmapEx>& rPreview);
+ virtual void NotifyPreviewCreation (cache::CacheKey aKey, const Bitmap& rPreview);
virtual bool IsIdle (void);
virtual bool IsVisible (cache::CacheKey aKey);
virtual const SdrPage* GetPage (cache::CacheKey aKey);
@@ -60,7 +60,7 @@ public:
private:
model::SlideSorterModel& mrModel;
- SlideSorterView& mrView;
+ SlideSorter& mrSlideSorter;
model::SharedPageDescriptor GetDescriptor (cache::CacheKey aKey);
};
diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
deleted file mode 100644
index 2e22e85803f6..000000000000
--- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
+++ /dev/null
@@ -1,609 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "precompiled_sd.hxx"
-
-#include "view/SlsViewOverlay.hxx"
-
-#include "SlideSorter.hxx"
-#include "model/SlideSorterModel.hxx"
-#include "model/SlsPageDescriptor.hxx"
-#include "model/SlsPageEnumeration.hxx"
-#include "view/SlideSorterView.hxx"
-#include "SlideSorterViewShell.hxx"
-#include "view/SlsLayouter.hxx"
-#include "view/SlsPageObject.hxx"
-#include "view/SlsPageObjectViewObjectContact.hxx"
-#include "ViewShell.hxx"
-#include "ViewShellBase.hxx"
-#include "UpdateLockManager.hxx"
-
-#include "Window.hxx"
-#include "sdpage.hxx"
-
-#include <basegfx/range/b2drectangle.hxx>
-#include <basegfx/range/b2drange.hxx>
-#include <basegfx/range/b2irange.hxx>
-#include <basegfx/matrix/b2dhommatrix.hxx>
-#include <basegfx/polygon/b2dpolygon.hxx>
-#include <basegfx/polygon/b2dpolygontools.hxx>
-#include <basegfx/polygon/b2dpolypolygontools.hxx>
-#include <basegfx/matrix/b2dhommatrixtools.hxx>
-
-#include <svx/sdr/overlay/overlaymanager.hxx>
-#include <svx/svdpagv.hxx>
-#include <svx/sdrpagewindow.hxx>
-#include <vcl/svapp.hxx>
-
-#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
-#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
-
-using namespace ::sdr::overlay;
-
-namespace {
- const static sal_Int32 gnSubstitutionStripeLength (3);
-}
-
-namespace sd { namespace slidesorter { namespace view {
-
-//===== ViewOverlay =========================================================
-
-ViewOverlay::ViewOverlay (SlideSorter& rSlideSorter)
- : mrSlideSorter(rSlideSorter),
- maSelectionRectangleOverlay(*this),
- maMouseOverIndicatorOverlay(*this),
- maInsertionIndicatorOverlay(*this),
- maSubstitutionOverlay(*this)
-{
-}
-
-
-
-
-ViewOverlay::~ViewOverlay (void)
-{
-}
-
-
-
-
-SelectionRectangleOverlay& ViewOverlay::GetSelectionRectangleOverlay (void)
-{
- return maSelectionRectangleOverlay;
-}
-
-
-
-
-MouseOverIndicatorOverlay& ViewOverlay::GetMouseOverIndicatorOverlay (void)
-{
- return maMouseOverIndicatorOverlay;
-}
-
-
-
-
-InsertionIndicatorOverlay& ViewOverlay::GetInsertionIndicatorOverlay (void)
-{
- return maInsertionIndicatorOverlay;
-}
-
-
-
-
-SubstitutionOverlay& ViewOverlay::GetSubstitutionOverlay (void)
-{
- return maSubstitutionOverlay;
-}
-
-
-
-
-SlideSorter& ViewOverlay::GetSlideSorter (void) const
-{
- return mrSlideSorter;
-}
-
-
-
-
-OverlayManager* ViewOverlay::GetOverlayManager (void) const
-{
- OverlayManager* pOverlayManager = NULL;
-
- SlideSorterView& rView (mrSlideSorter.GetView());
- SdrPageView* pPageView = rView.GetSdrPageView();
- if (pPageView != NULL && pPageView->PageWindowCount()>0)
- {
- SdrPageWindow* pPageWindow = pPageView->GetPageWindow(0);
- if (pPageWindow != NULL)
- pOverlayManager = pPageWindow->GetOverlayManager();
- }
-
- return pOverlayManager;
-}
-
-
-
-
-//===== OverlayBase =========================================================
-
-OverlayBase::OverlayBase (ViewOverlay& rViewOverlay)
- : OverlayObject(Color(0,0,0)),
- mrViewOverlay(rViewOverlay)
-{
- setVisible(false);
-}
-
-
-
-
-OverlayBase::~OverlayBase (void)
-{
- OSL_ENSURE(!getOverlayManager(), "Please call RemoveRegistration() in the derived class; it's too late to call it in the base class since virtual methods will be missing when called in the destructor.");
-}
-
-
-
-
-void OverlayBase::EnsureRegistration (void)
-{
- if (getOverlayManager() == NULL)
- {
- OverlayManager* pOverlayManager = mrViewOverlay.GetOverlayManager();
- if (pOverlayManager != NULL)
- pOverlayManager->add(*this);
- }
-}
-
-
-
-
-void OverlayBase::RemoveRegistration()
-{
- OverlayManager* pOverlayManager = getOverlayManager();
- if (pOverlayManager != NULL)
- pOverlayManager->remove(*this);
-}
-
-
-
-
-//===== SubstitutionOverlay =================================================
-
-SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase(rViewOverlay),
- maPosition(0,0),
- maShapes()
-{
- allowAntiAliase(false);
-}
-
-
-
-
-SubstitutionOverlay::~SubstitutionOverlay (void)
-{
- RemoveRegistration();
-}
-
-
-
-
-void SubstitutionOverlay::Create (
- model::PageEnumeration& rSelection,
- const Point& rPosition)
-{
- EnsureRegistration();
-
- maPosition = rPosition;
-
- maShapes.clear();
- while (rSelection.HasMoreElements())
- {
- const Rectangle aBox (rSelection.GetNextElement()->GetPageObject()->GetCurrentBoundRect());
- basegfx::B2DRectangle aB2DBox(
- aBox.Left(),
- aBox.Top(),
- aBox.Right(),
- aBox.Bottom());
- maShapes.append(basegfx::tools::createPolygonFromRect(aB2DBox), 4);
- }
-
- setVisible(maShapes.count() > 0);
- // The selection indicator may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
-}
-
-
-
-
-void SubstitutionOverlay::Clear (void)
-{
- maShapes.clear();
- setVisible(false);
-}
-
-
-
-
-void SubstitutionOverlay::Move (const Point& rOffset)
-{
- const basegfx::B2DHomMatrix aTranslation(basegfx::tools::createTranslateB2DHomMatrix(rOffset.X(), rOffset.Y()));
-
- maShapes.transform(aTranslation);
- maPosition += rOffset;
-
- objectChange();
-}
-
-
-
-
-void SubstitutionOverlay::SetPosition (const Point& rPosition)
-{
- Move(rPosition - GetPosition());
-}
-
-
-
-
-Point SubstitutionOverlay::GetPosition (void) const
-{
- return maPosition;
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence SubstitutionOverlay::createOverlayObjectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
- const sal_uInt32 nCount(maShapes.count());
-
- if(nCount && getOverlayManager())
- {
- aRetval.realloc(nCount);
- const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
- const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
-
- for(sal_uInt32 a(0); a < nCount; a++)
- {
- aRetval[a] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
- maShapes.getB2DPolygon(a),
- aRGBColorA,
- aRGBColorB,
- gnSubstitutionStripeLength));
- }
- }
-
- return aRetval;
-}
-
-void SubstitutionOverlay::stripeDefinitionHasChanged()
-{
- // react on OverlayManager's stripe definition change
- objectChange();
-}
-
-
-//===== SelectionRectangleOverlay ===========================================
-
-SelectionRectangleOverlay::SelectionRectangleOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase (rViewOverlay),
- maAnchor(0,0),
- maSecondCorner(0,0)
-{
-}
-
-
-
-SelectionRectangleOverlay::~SelectionRectangleOverlay()
-{
- RemoveRegistration();
-}
-
-
-
-
-Rectangle SelectionRectangleOverlay::GetSelectionRectangle (void)
-{
- return Rectangle(maAnchor, maSecondCorner);
-}
-
-
-
-
-void SelectionRectangleOverlay::Start (const Point& rAnchor)
-{
- EnsureRegistration();
- setVisible(false);
- maAnchor = rAnchor;
-}
-
-
-
-
-void SelectionRectangleOverlay::Update (const Point& rSecondCorner)
-{
- maSecondCorner = rSecondCorner;
- setVisible(true);
- // The selection rectangle may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence SelectionRectangleOverlay::createOverlayObjectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval;
- const basegfx::B2DRange aRange(maAnchor.X(), maAnchor.Y(), maSecondCorner.X(), maSecondCorner.Y());
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
-
- if(aPolygon.count())
- {
- const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
- const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
- const drawinglayer::primitive2d::Primitive2DReference xReference(
- new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
- aPolygon,
- aRGBColorA,
- aRGBColorB,
- gnSubstitutionStripeLength));
-
- aRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- }
-
- return aRetval;
-}
-
-void SelectionRectangleOverlay::stripeDefinitionHasChanged()
-{
- // react on OverlayManager's stripe definition change
- objectChange();
-}
-
-
-
-
-//===== InsertionIndicatorOverlay ===========================================
-
-InsertionIndicatorOverlay::InsertionIndicatorOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase (rViewOverlay),
- mnInsertionIndex(-1),
- maBoundingBox()
-{
-}
-
-
-
-
-InsertionIndicatorOverlay::~InsertionIndicatorOverlay()
-{
- RemoveRegistration();
-}
-
-
-
-
-void InsertionIndicatorOverlay::SetPositionAndSize (const Rectangle& aNewBoundingBox)
-{
- EnsureRegistration();
- maBoundingBox = aNewBoundingBox;
- setVisible( ! maBoundingBox.IsEmpty());
- // The insertion indicator may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
-}
-
-
-
-
-void InsertionIndicatorOverlay::SetPosition (const Point& rPoint)
-{
- static const bool bAllowHorizontalInsertMarker = true;
- Layouter& rLayouter (mrViewOverlay.GetSlideSorter().GetView().GetLayouter());
- USHORT nPageCount
- = (USHORT)mrViewOverlay.GetSlideSorter().GetModel().GetPageCount();
-
- sal_Int32 nInsertionIndex = rLayouter.GetInsertionIndex (rPoint,
- bAllowHorizontalInsertMarker);
- if (nInsertionIndex >= nPageCount)
- nInsertionIndex = nPageCount-1;
- sal_Int32 nDrawIndex = nInsertionIndex;
-
- bool bVertical = false;
- bool bLeftOrTop = false;
- if (nInsertionIndex >= 0)
- {
- // Now that we know where to insert, we still have to determine
- // where to draw the marker. There are two decisions to make:
- // 1. Draw a vertical or a horizontal insert marker.
- // The horizontal one may only be chosen when there is only one
- // column.
- // 2. The vertical (standard) insert marker may be painted left to
- // the insert page or right of the previous one. When both pages
- // are in the same row this makes no difference. Otherwise the
- // posiotions are at the left and right ends of two rows.
-
- Point aPageCenter (rLayouter.GetPageObjectBox (
- nInsertionIndex).Center());
-
- if (bAllowHorizontalInsertMarker
- && rLayouter.GetColumnCount() == 1)
- {
- bVertical = false;
- bLeftOrTop = (rPoint.Y() <= aPageCenter.Y());
- }
- else
- {
- bVertical = true;
- bLeftOrTop = (rPoint.X() <= aPageCenter.X());
- }
-
- // Add one when the mark was painted below or to the right of the
- // page object.
- if ( ! bLeftOrTop)
- nInsertionIndex += 1;
- }
-
- mnInsertionIndex = nInsertionIndex;
-
- Rectangle aBox;
- if (mnInsertionIndex >= 0)
- aBox = rLayouter.GetInsertionMarkerBox (
- nDrawIndex,
- bVertical,
- bLeftOrTop);
- SetPositionAndSize (aBox);
-}
-
-
-
-
-sal_Int32 InsertionIndicatorOverlay::GetInsertionPageIndex (void) const
-{
- return mnInsertionIndex;
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence InsertionIndicatorOverlay::createOverlayObjectPrimitive2DSequence()
-{
- drawinglayer::primitive2d::Primitive2DSequence aRetval(2);
- const basegfx::B2DRange aRange(maBoundingBox.Left(), maBoundingBox.Top(), maBoundingBox.Right(), maBoundingBox.Bottom());
- const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
- const basegfx::BColor aRGBColor(Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetFontColor().getBColor());
-
- aRetval[0] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
- basegfx::B2DPolyPolygon(aPolygon),
- aRGBColor));
- aRetval[1] = drawinglayer::primitive2d::Primitive2DReference(
- new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
- aPolygon,
- aRGBColor));
-
- return aRetval;
-}
-
-
-
-
-//===== MouseOverIndicatorOverlay ===========================================
-
-MouseOverIndicatorOverlay::MouseOverIndicatorOverlay (ViewOverlay& rViewOverlay)
- : OverlayBase (rViewOverlay),
- mpPageUnderMouse()
-{
-}
-
-
-
-
-MouseOverIndicatorOverlay::~MouseOverIndicatorOverlay (void)
-{
- RemoveRegistration();
-}
-
-
-
-
-void MouseOverIndicatorOverlay::SetSlideUnderMouse (
- const model::SharedPageDescriptor& rpDescriptor)
-{
- ViewShellBase* pBase = mrViewOverlay.GetSlideSorter().GetViewShellBase();
- if (pBase==NULL || ! pBase->GetUpdateLockManager()->IsLocked())
- {
- model::SharedPageDescriptor pDescriptor;
- if ( ! mpPageUnderMouse.expired())
- {
- try
- {
- pDescriptor = model::SharedPageDescriptor(mpPageUnderMouse);
- }
- catch (::boost::bad_weak_ptr)
- {
- }
- }
-
- if (pDescriptor != rpDescriptor)
- {
- // Switch to the new (possibly empty) descriptor.
- mpPageUnderMouse = rpDescriptor;
-
- EnsureRegistration();
-
- // Show the indicator when a valid page descriptor is given.
- setVisible( ! mpPageUnderMouse.expired());
- // The mouse over indicator may have been visible already so call
- // objectChange() to enforce an update.
- objectChange();
- }
- }
-}
-
-
-
-
-drawinglayer::primitive2d::Primitive2DSequence MouseOverIndicatorOverlay::createOverlayObjectPrimitive2DSequence()
-{
- view::PageObjectViewObjectContact* pContact = GetViewObjectContact();
-
- if(pContact)
- {
- return pContact->createMouseOverEffectPrimitive2DSequence();
- }
-
- return drawinglayer::primitive2d::Primitive2DSequence();
-}
-
-
-
-
-view::PageObjectViewObjectContact* MouseOverIndicatorOverlay::GetViewObjectContact (void) const
-{
- if ( ! mpPageUnderMouse.expired())
- {
- model::SharedPageDescriptor pDescriptor (mpPageUnderMouse);
- return pDescriptor->GetViewObjectContact();
- }
- return NULL;
-}
-
-
-
-
-} } } // end of namespace ::sd::slidesorter::view
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/makefile.mk b/sd/source/ui/slidesorter/view/makefile.mk
index 388139b1cee9..3c5fc39c3ede 100644..100755
--- a/sd/source/ui/slidesorter/view/makefile.mk
+++ b/sd/source/ui/slidesorter/view/makefile.mk
@@ -35,6 +35,8 @@ ENABLE_EXCEPTIONS=TRUE
AUTOSEG=true
PRJINC=..$/..
+IMGLST_SRS=$(SRS)$/$(TARGET).srs
+
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
@@ -42,18 +44,24 @@ PRJINC=..$/..
# --- Files --------------------------------------------------------
-SLOFILES = \
- $(SLO)$/SlsFontProvider.obj \
- $(SLO)$/SlsPageObject.obj \
- $(SLO)$/SlsPageObjectViewContact.obj \
- $(SLO)$/SlsPageObjectViewObjectContact.obj \
- $(SLO)$/SlsLayouter.obj \
- $(SLO)$/SlideSorterView.obj \
- $(SLO)$/SlsViewCacheContext.obj \
- $(SLO)$/SlsViewOverlay.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/SlsPageObjectViewObjectContact.obj
+SRS1NAME=$(TARGET)
+SRC1FILES = \
+ SlsResource.src
+
+SLOFILES = \
+ $(SLO)$/SlideSorterView.obj \
+ $(SLO)$/SlsButtonBar.obj \
+ $(SLO)$/SlsFontProvider.obj \
+ $(SLO)$/SlsFramePainter.obj \
+ $(SLO)$/SlsInsertAnimator.obj \
+ $(SLO)$/SlsInsertionIndicatorOverlay.obj\
+ $(SLO)$/SlsLayeredDevice.obj \
+ $(SLO)$/SlsLayouter.obj \
+ $(SLO)$/SlsPageObjectLayouter.obj \
+ $(SLO)$/SlsPageObjectPainter.obj \
+ $(SLO)$/SlsTheme.obj \
+ $(SLO)$/SlsToolTip.obj \
+ $(SLO)$/SlsViewCacheContext.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 94c41db85f5d..9c23272c2838 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -128,7 +128,7 @@ TableDesignPane::TableDesignPane( ::Window* pParent, ViewShellBase& rBase, bool
pValueSet->SetSelectHdl (LINK(this, TableDesignPane, implValueSetHdl));
mxControls[FL_STYLE_OPTIONS].reset( new FixedLine( pControlParent, SdResId( FL_STYLE_OPTIONS + 1 ) ) );
- USHORT i;
+ sal_uInt16 i;
for( i = CB_HEADER_ROW; i <= CB_BANDED_COLUMNS; ++i )
{
CheckBox *pCheckBox = new CheckBox( pControlParent, SdResId( i+1 ) );
@@ -389,7 +389,7 @@ void TableDesignPane::updateLayout()
Size aSize( mxControls[nId]->GetSizePixel() );
aSize.Width() = aPaneSize.Width() - aOffset.X() - mxControls[nId]->GetPosPixel().X();
mxControls[nId]->SetSizePixel( aSize );
- mxControls[nId]->SetPaintTransparent(TRUE);
+ mxControls[nId]->SetPaintTransparent(sal_True);
mxControls[nId]->SetBackground();
}
aValueSetSize = Size( pValueSet->GetSizePixel().Width(), nStylesHeight - mxControls[FL_TABLE_STYLES]->GetSizePixel().Height() - mnOrgOffsetY[FL_TABLE_STYLES] );
@@ -420,10 +420,10 @@ void TableDesignPane::updateLayout()
int nVisibleRowCount = (aValueSetSize.Height()+2) / aItemSize.Height();
- pValueSet->SetLineCount ( (nRowCount < nVisibleRowCount) ? (USHORT)nRowCount : 0 );
+ pValueSet->SetLineCount ( (nRowCount < nVisibleRowCount) ? (sal_uInt16)nRowCount : 0 );
- pValueSet->SetColCount ((USHORT)nColumnCount);
- pValueSet->SetLineCount ((USHORT)nRowCount);
+ pValueSet->SetColCount ((sal_uInt16)nColumnCount);
+ pValueSet->SetLineCount ((sal_uInt16)nRowCount);
if( !mbModal )
{
@@ -477,7 +477,7 @@ void TableDesignPane::updateControls()
const bool bHasTable = mxSelectedTable.is();
const OUString* pPropNames = getPropertyNames();
- for( USHORT i = CB_HEADER_ROW; i <= CB_BANDED_COLUMNS; ++i )
+ for( sal_uInt16 i = CB_HEADER_ROW; i <= CB_BANDED_COLUMNS; ++i )
{
sal_Bool bUse = gDefaults[i-CB_HEADER_ROW];
if( bHasTable ) try
@@ -488,15 +488,15 @@ void TableDesignPane::updateControls()
{
OSL_FAIL("sd::TableDesignPane::updateControls(), exception caught!");
}
- static_cast< CheckBox* >( mxControls[i].get() )->Check( bUse ? TRUE : FALSE );
- mxControls[i]->Enable(bHasTable ? TRUE : FALSE );
+ static_cast< CheckBox* >( mxControls[i].get() )->Check( bUse ? sal_True : sal_False );
+ mxControls[i]->Enable(bHasTable ? sal_True : sal_False );
}
FillDesignPreviewControl();
updateLayout();
- USHORT nSelection = 0;
+ sal_uInt16 nSelection = 0;
if( mxSelectedTable.is() )
{
Reference< XNamed > xNamed( mxSelectedTable->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "TableTemplate" ) ) ), UNO_QUERY );
@@ -512,7 +512,7 @@ void TableDesignPane::updateControls()
{
if( aNames[nIndex] == sStyleName )
{
- nSelection = (USHORT)nIndex+1;
+ nSelection = (sal_uInt16)nIndex+1;
break;
}
}
@@ -810,7 +810,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle,
sal_Int32* pDiff = &border_diffs[0];
// draw top border
- for( USHORT nLine = 0; nLine < 4; ++nLine )
+ for( sal_uInt16 nLine = 0; nLine < 4; ++nLine )
{
const SvxBorderLine* pBorderLine = xCellInfo->maBorder.GetLine(nLine);
if( !pBorderLine || ((pBorderLine->GetOutWidth() == 0) && (pBorderLine->GetInWidth()==0)) )
@@ -824,7 +824,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle,
boost::shared_ptr< CellInfo > xBorderInfo( aMatrix[nBorderCol][nBorderRow] );
if( xBorderInfo.get() )
{
- const USHORT nOtherLine = nLine ^ 1;
+ const sal_uInt16 nOtherLine = nLine ^ 1;
const SvxBorderLine* pBorderLine2 = xBorderInfo->maBorder.GetLine(nOtherLine^1);
if( pBorderLine2 && pBorderLine2->HasPriority(*pBorderLine) )
continue; // other border line wins
@@ -854,7 +854,7 @@ void TableDesignPane::FillDesignPreviewControl()
{
ValueSet* pValueSet = static_cast< ValueSet* >( mxControls[CT_TABLE_STYLES].get() );
- USHORT nSelectedItem = pValueSet->GetSelectItemId();
+ sal_uInt16 nSelectedItem = pValueSet->GetSelectItemId();
pValueSet->Clear();
try
{
@@ -884,7 +884,7 @@ void TableDesignPane::FillDesignPreviewControl()
{
Reference< XIndexAccess > xTableStyle( mxTableFamily->getByIndex( nIndex ), UNO_QUERY );
if( xTableStyle.is() )
- pValueSet->InsertItem( sal::static_int_cast<USHORT>( nIndex + 1 ), Image( CreateDesignPreview( xTableStyle, aSettings, bIsPageDark ) ) );
+ pValueSet->InsertItem( sal::static_int_cast<sal_uInt16>( nIndex + 1 ), Image( CreateDesignPreview( xTableStyle, aSettings, bIsPageDark ) ) );
}
catch( Exception& )
{
@@ -926,9 +926,9 @@ short TableDesignDialog::Execute()
if( mpDesignPane->isOptionsChanged() )
mpDesignPane->ApplyOptions();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// ====================================================================
diff --git a/sd/source/ui/table/TableDesignPane.src b/sd/source/ui/table/TableDesignPane.src
index 9ce9470ffa2b..c30bf49f6248 100644
--- a/sd/source/ui/table/TableDesignPane.src
+++ b/sd/source/ui/table/TableDesignPane.src
@@ -112,6 +112,7 @@ Control DLG_TABLEDESIGNPANE
ModalDialog DLG_TABLEDESIGNPANE
{
+ HelpID = "sd:ModalDialog:DLG_TABLEDESIGNPANE";
OutputSize = TRUE;
SVLook = TRUE ;
Moveable = TRUE ;
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 624c08b7fc2b..e6f393e3adb7 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -187,7 +187,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
}
if( pPickObj )
- mpView->ReplaceObjectAtView(pPickObj, *pPV, pObj, TRUE );
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pObj, sal_True );
else
mpView->InsertObjectAtView(pObj, *pPV, SDRINSERT_SETDEFLAYER);
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index c039e0b2998b..b828449df361 100644..100755
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -36,7 +36,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/dispatch.hxx>
-
+#include <sfx2/msgpool.hxx>
#include <svl/whiter.hxx>
#include <svl/itempool.hxx>
#include <svx/svdomedia.hxx>
@@ -158,7 +158,7 @@ void TableObjectBar::Execute( SfxRequest& rReq )
SfxBindings* pBindings = &mpViewSh->GetViewFrame()->GetBindings();
rtl::Reference< sdr::SelectionController > xController( mpView->getSelectionController() );
- ULONG nSlotId = rReq.GetSlot();
+ sal_uLong nSlotId = rReq.GetSlot();
if( xController.is() )
{
switch( nSlotId )
@@ -167,7 +167,7 @@ void TableObjectBar::Execute( SfxRequest& rReq )
case SID_TABLE_INSERT_COL_DLG:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, nSlotId) : 0);
+ ::std::auto_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
@@ -176,10 +176,10 @@ void TableObjectBar::Execute( SfxRequest& rReq )
else
nSlotId = SID_TABLE_INSERT_COL;
- rReq.AppendItem( SfxInt16Item( (USHORT)nSlotId, (sal_uInt16)pDlg->getInsertCount() ) );
+ rReq.AppendItem( SfxInt16Item( (sal_uInt16)nSlotId, (sal_uInt16)pDlg->getInsertCount() ) );
rReq.AppendItem( SfxBoolItem( SID_TABLE_PARAM_INSERT_AFTER, !pDlg->isInsertBefore() ) );
- rReq.SetSlot( (USHORT)nSlotId );
+ rReq.SetSlot( (sal_uInt16)nSlotId );
}
}
}
diff --git a/sd/source/ui/toolpanel/ControlContainer.cxx b/sd/source/ui/toolpanel/ControlContainer.cxx
index d792f0c346ca..dfb4b18a6e8b 100644..100755
--- a/sd/source/ui/toolpanel/ControlContainer.cxx
+++ b/sd/source/ui/toolpanel/ControlContainer.cxx
@@ -99,7 +99,7 @@ sal_uInt32 ControlContainer::AddControl (::std::auto_ptr<TreeNode> pControl)
void ControlContainer::SetExpansionState (
- UINT32 nIndex,
+ sal_uInt32 nIndex,
ExpansionState aState)
{
::osl::MutexGuard aGuard (maMutex);
@@ -178,7 +178,7 @@ void ControlContainer::SetExpansionState (
}
// Update the expansion state of all controls.
- for (UINT32 i=0; i<GetControlCount(); i=GetNextIndex(i))
+ for (sal_uInt32 i=0; i<GetControlCount(); i=GetNextIndex(i))
{
TreeNode* pControl = GetControl(i);
bResizeNecessary |= pControl->Expand(i == mnActiveControlIndex);
@@ -219,14 +219,6 @@ sal_uInt32 ControlContainer::GetControlIndex (TreeNode* pControlToExpand) const
-sal_uInt32 ControlContainer::GetActiveControlIndex (void) const
-{
- return mnActiveControlIndex;
-}
-
-
-
-
void ControlContainer::ListHasChanged (void)
{
}
@@ -246,7 +238,7 @@ sal_uInt32 ControlContainer::GetVisibleControlCount (void) const
{
sal_uInt32 nCount (0);
- UINT32 nIndex;
+ sal_uInt32 nIndex;
sal_uInt32 nAllCount (maControlList.size());
for (nIndex=0; nIndex<nAllCount; nIndex=GetNextIndex(nIndex,true))
{
@@ -376,53 +368,6 @@ sal_uInt32 ControlContainer::GetNextIndex (
-sal_uInt32 ControlContainer::GetFirstIndex (bool bIncludeHidden)
-{
- sal_uInt32 nIndex = 0;
-
- if (maControlList.size() == 0)
- {
- // The list is empty so there is no first element.
- nIndex = maControlList.size();
- }
- else if ( ! bIncludeHidden
- && ! maControlList[nIndex]->GetWindow()->IsVisible())
- {
- // The first element is not visible. Go the next visible one.
- nIndex = GetNextIndex (nIndex, bIncludeHidden, false);
- }
-
- return nIndex;
-}
-
-
-
-
-sal_uInt32 ControlContainer::GetLastIndex (bool bIncludeHidden)
-{
- sal_uInt32 nIndex;
-
- if (maControlList.size() == 0)
- {
- // The list is empty so there is no last element.
- nIndex = maControlList.size();
- }
- else
- {
- nIndex = maControlList.size() - 1;
- if ( ! bIncludeHidden
- && ! maControlList[nIndex]->GetWindow()->IsVisible())
- {
- // The last element is not visible. Go the previous visible one.
- nIndex = GetPreviousIndex (nIndex, bIncludeHidden, false);
- }
- }
- return nIndex;
-}
-
-
-
-
void ControlContainer::SetMultiSelection (bool bFlag)
{
mbMultiSelection = bFlag;
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index 6b09a54fc400..f9eaec1e7016 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -122,8 +122,8 @@ TYPEINIT1(LayoutMenu, SfxShell);
struct snewfoil_value_info
{
- USHORT mnBmpResId;
- USHORT mnStrResId;
+ sal_uInt16 mnBmpResId;
+ sal_uInt16 mnStrResId;
WritingMode meWritingMode;
AutoLayout maAutoLayout;
};
@@ -221,7 +221,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
| ::sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL
| ::sd::tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER);
- SetSmartHelpId(SmartId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS));
+ Window::SetHelpId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS);
SetAccessibleName(SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE));
Link aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler));
@@ -231,7 +231,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:VerticalTextState")));
// Add this new object as shell to the shell factory.
- GetShellManager()->AddSubShell(HID_SD_TASK_PANE_PREVIEW_LAYOUTS,this,this);
+ GetShellManager()->AddSubShell(SHELLID_SD_TASK_PANE_PREVIEW_LAYOUTS,this,this);
}
@@ -288,8 +288,8 @@ Size LayoutMenu::GetPreferredSize (void)
Size aItemSize = CalcItemSizePixel (Size());
Size aPreferredWindowSize = CalcWindowSizePixel (
aItemSize,
- (USHORT)mnPreferredColumnCount,
- (USHORT)CalculateRowCount (aItemSize,mnPreferredColumnCount));
+ (sal_uInt16)mnPreferredColumnCount,
+ (sal_uInt16)CalculateRowCount (aItemSize,mnPreferredColumnCount));
return aPreferredWindowSize;
}
@@ -482,8 +482,8 @@ void LayoutMenu::Resize (void)
int nRowCount = CalculateRowCount (aItemSize, nColumnCount);
- SetColCount ((USHORT)nColumnCount);
- SetLineCount ((USHORT)nRowCount);
+ SetColCount ((sal_uInt16)nColumnCount);
+ SetLineCount ((sal_uInt16)nRowCount);
}
}
@@ -500,7 +500,7 @@ void LayoutMenu::MouseButtonDown (const MouseEvent& rEvent)
if (rEvent.IsRight())
{
ReleaseMouse();
- USHORT nIndex = GetItemId (rEvent.GetPosPixel());
+ sal_uInt16 nIndex = GetItemId (rEvent.GetPosPixel());
if (nIndex > 0)
SelectItem(nIndex);
}
@@ -712,7 +712,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
SfxRequest aRequest (mrBase.GetViewFrame(), SID_ASSIGN_LAYOUT);
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATPAGE, ((*iPage)->GetPageNum()-1)/2));
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
- pMainViewShell->ExecuteSlot (aRequest, BOOL(FALSE));
+ pMainViewShell->ExecuteSlot (aRequest, sal_Bool(sal_False));
}
}
while(false);
@@ -722,7 +722,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
SfxRequest LayoutMenu::CreateRequest (
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
AutoLayout aLayout)
{
SfxRequest aRequest (mrBase.GetViewFrame(), nSlotId);
@@ -730,10 +730,10 @@ SfxRequest LayoutMenu::CreateRequest (
do
{
SdrLayerAdmin& rLayerAdmin (mrBase.GetDocument()->GetLayerAdmin());
- BYTE aBackground (rLayerAdmin.GetLayerID(
- String(SdResId(STR_LAYER_BCKGRND)), FALSE));
- BYTE aBackgroundObject (rLayerAdmin.GetLayerID(
- String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
+ sal_uInt8 aBackground (rLayerAdmin.GetLayerID(
+ String(SdResId(STR_LAYER_BCKGRND)), sal_False));
+ sal_uInt8 aBackgroundObject (rLayerAdmin.GetLayerID(
+ String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False));
ViewShell* pViewShell = mrBase.GetMainViewShell().get();
if (pViewShell == NULL)
break;
@@ -829,7 +829,7 @@ void LayoutMenu::Fill (void)
void LayoutMenu::Clear (void)
{
- for (USHORT nId=1; nId<=GetItemCount(); nId++)
+ for (sal_uInt16 nId=1; nId<=GetItemCount(); nId++)
delete static_cast<AutoLayout*>(GetItemData(nId));
ValueSet::Clear();
}
@@ -881,7 +881,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
// When the command event was not caused by a mouse
// event (for example a key press instead) then show the
// popup menu at the center of the current item.
- if (GetSelectItemId() != (USHORT)-1)
+ if (GetSelectItemId() != (sal_uInt16)-1)
{
Rectangle aBBox (GetItemRect(GetSelectItemId()));
Point aPosition (aBBox.Center());
@@ -933,8 +933,8 @@ void LayoutMenu::UpdateSelection (void)
break;
// Find the entry of the menu for to the layout.
- USHORT nItemCount (GetItemCount());
- for (USHORT nId=1; nId<=nItemCount; nId++)
+ sal_uInt16 nItemCount (GetItemCount());
+ for (sal_uInt16 nId=1; nId<=nItemCount; nId++)
{
if (*static_cast<AutoLayout*>(GetItemData(nId)) == aLayout)
{
diff --git a/sd/source/ui/toolpanel/LayoutMenu.hxx b/sd/source/ui/toolpanel/LayoutMenu.hxx
index f393916a453a..1b1af8ceff3e 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.hxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.hxx
@@ -215,7 +215,7 @@ private:
Layout of the page to insert or to assign.
*/
SfxRequest CreateRequest (
- USHORT nSlotId,
+ sal_uInt16 nSlotId,
AutoLayout aLayout);
/** Select the layout that is used by the current page.
diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx
index dac84d70d9ff..7c44d2c6a3fd 100644
--- a/sd/source/ui/toolpanel/ScrollPanel.cxx
+++ b/sd/source/ui/toolpanel/ScrollPanel.cxx
@@ -42,25 +42,6 @@
namespace sd { namespace toolpanel {
ScrollPanel::ScrollPanel (
- TreeNode* pParent)
- : Control (pParent->GetWindow(), WB_DIALOGCONTROL),
- TreeNode(pParent),
- maScrollWindow(this, WB_DIALOGCONTROL),
- maVerticalScrollBar(this, WB_VERT),
- maHorizontalScrollBar(this, WB_HORZ),
- maScrollBarFiller(this),
- maScrollWindowFiller(&maScrollWindow),
- mbIsRearrangePending(true),
- mbIsLayoutPending(true),
- mnChildrenWidth(0),
- mnVerticalBorder(2),
- mnVerticalGap(3),
- mnHorizontalBorder(2)
-{
- Construct();
-}
-
-ScrollPanel::ScrollPanel (
::Window& i_rParentWindow)
: Control (&i_rParentWindow, WB_DIALOGCONTROL),
TreeNode(NULL),
@@ -100,10 +81,10 @@ void ScrollPanel::Construct()
// Initialize the scroll bars.
maVerticalScrollBar.SetScrollHdl (
LINK(this, ScrollPanel, ScrollBarHandler));
- maVerticalScrollBar.EnableDrag (TRUE);
+ maVerticalScrollBar.EnableDrag (sal_True);
maHorizontalScrollBar.SetScrollHdl (
LINK(this, ScrollPanel, ScrollBarHandler));
- maHorizontalScrollBar.EnableDrag (TRUE);
+ maHorizontalScrollBar.EnableDrag (sal_True);
}
@@ -138,7 +119,7 @@ ScrollPanel::~ScrollPanel (void)
TitledControl* ScrollPanel::AddControl (
::std::auto_ptr<TreeNode> pControl,
const String& rTitle,
- ULONG nHelpId)
+ const rtl::OString& rHelpId)
{
// We are interested only in the title. The control itself is
// managed by the content object.
@@ -148,7 +129,7 @@ TitledControl* ScrollPanel::AddControl (
rTitle,
TitledControlStandardClickHandler(GetControlContainer(), ControlContainer::ES_TOGGLE),
TitleBar::TBT_SUB_CONTROL_HEADLINE);
- pTitledControl->GetTitleBar()->SetHelpId(nHelpId);
+ pTitledControl->GetTitleBar()->SetHelpId(rHelpId);
AddControl(::std::auto_ptr<TreeNode>(pTitledControl));
@@ -676,14 +657,14 @@ IMPL_LINK(ScrollPanel, ScrollBarHandler, ScrollBar*, EMPTYARG)
long ScrollPanel::Notify( NotifyEvent& rNEvt )
{
- long nRet = FALSE;
+ long nRet = sal_False;
if( rNEvt.GetType() == EVENT_COMMAND )
{
// note: dynamic_cast is not possible as GetData() returns a void*
CommandEvent* pCmdEvent = reinterpret_cast< CommandEvent* >(rNEvt.GetData());
DBG_ASSERT( pCmdEvent!=0 &&
- ( pCmdEvent->IsMouseEvent() == TRUE ||
- pCmdEvent->IsMouseEvent() == FALSE ),
+ ( pCmdEvent->IsMouseEvent() == sal_True ||
+ pCmdEvent->IsMouseEvent() == sal_False ),
"Invalid CommandEvent" );
if (pCmdEvent)
switch (pCmdEvent->GetCommand())
diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx
index 3bca73aa25e3..0ae489a77c27 100644
--- a/sd/source/ui/toolpanel/SubToolPanel.cxx
+++ b/sd/source/ui/toolpanel/SubToolPanel.cxx
@@ -43,35 +43,6 @@ namespace sd { namespace toolpanel {
SubToolPanel::SubToolPanel (
- TreeNode* pParent)
- : Control (pParent->GetWindow(), WB_DIALOGCONTROL),
- TreeNode(pParent),
- maWindowFiller(this),
- mbIsRearrangePending(true),
- mbIsLayoutPending(true),
- mnChildrenWidth(0),
- mnVerticalBorder(0),
- mnVerticalGap(3),
- mnHorizontalBorder(2)
-{
- SetAccessibleName (
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")));
- mpControlContainer->SetMultiSelection (true);
-
- SetBorderStyle (WINDOW_BORDER_NORMAL);
- SetMapMode (MapMode(MAP_PIXEL));
-
- // To reduce flickering during repaints make the container windows
- // transparent and rely on their children to paint the whole area.
- SetBackground(Wallpaper());
- maWindowFiller.SetBackground(
- Application::GetSettings().GetStyleSettings().GetWindowColor());
-}
-
-
-
-
-SubToolPanel::SubToolPanel (
Window& i_rParentWindow)
: Control (&i_rParentWindow, WB_DIALOGCONTROL),
TreeNode(NULL),
diff --git a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
index ad2bdaf709bc..ed65ec99b27b 100644
--- a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
@@ -217,7 +217,7 @@ TaskPaneShellManager* TreeNode::GetShellManager (void)
::Window* pWindow = GetWindow();
if (pWindow != NULL)
{
- xAccessible = pWindow->GetAccessible(FALSE);
+ xAccessible = pWindow->GetAccessible(sal_False);
if ( ! xAccessible.is())
{
::com::sun::star::uno::Reference<
diff --git a/sd/source/ui/toolpanel/TestMenu.cxx b/sd/source/ui/toolpanel/TestMenu.cxx
index 5ed76e024086..c0b210d7284f 100644
--- a/sd/source/ui/toolpanel/TestMenu.cxx
+++ b/sd/source/ui/toolpanel/TestMenu.cxx
@@ -98,8 +98,8 @@ Size ColorMenu::GetPreferredSize (void)
Size aItemSize = maSet.CalcItemSizePixel (Size());
Size aPreferredWindowSize = maSet.CalcWindowSizePixel (
aItemSize,
- (USHORT)mnPreferredColumnCount,
- (USHORT)CalculateRowCount (aItemSize, (USHORT)mnPreferredColumnCount));
+ (sal_uInt16)mnPreferredColumnCount,
+ (sal_uInt16)CalculateRowCount (aItemSize, (sal_uInt16)mnPreferredColumnCount));
return aPreferredWindowSize;
}
@@ -194,9 +194,9 @@ void ColorMenu::Resize (void)
else if (nColumnCount > 4)
nColumnCount = 4;
- USHORT nRowCount = (USHORT)CalculateRowCount (aItemSize, nColumnCount);
+ sal_uInt16 nRowCount = (sal_uInt16)CalculateRowCount (aItemSize, nColumnCount);
- maSet.SetColCount ((USHORT)nColumnCount);
+ maSet.SetColCount ((sal_uInt16)nColumnCount);
maSet.SetLineCount (nRowCount);
}
}
@@ -230,7 +230,7 @@ void ColorMenu::Fill (void)
maSet.Clear();
maSet.SetItemWidth (30);
maSet.SetItemHeight (30);
- USHORT i = 0;
+ sal_uInt16 i = 0;
maSet.InsertItem (++i, rSettings.GetFaceColor());
maSet.SetItemText (i, String::CreateFromAscii("FaceColor"));
maSet.InsertItem (++i, rSettings.GetCheckedColor());
diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx
index b33ba1c89d73..cd4c0649237f 100644
--- a/sd/source/ui/toolpanel/TestPanel.cxx
+++ b/sd/source/ui/toolpanel/TestPanel.cxx
@@ -130,7 +130,7 @@ TestPanel::TestPanel (::Window& i_rParent)
::std::auto_ptr<TreeNode>(new Wrapper (
pScrollPanel, Size (200,300), pBox, true)),
String::CreateFromAscii ("First ListBox"),
- 0);
+ "");
pBox = new ListBox (pScrollPanel->GetWindow());
for (i=1; i<=20; i++)
@@ -144,7 +144,7 @@ TestPanel::TestPanel (::Window& i_rParent)
::std::auto_ptr<TreeNode>(new Wrapper (
pScrollPanel, Size (200,300), pBox, true)),
String::CreateFromAscii ("Second ListBox"),
- 0);
+ "");
AddControl (::std::auto_ptr<TreeNode>(pScrollPanel));
@@ -154,7 +154,7 @@ TestPanel::TestPanel (::Window& i_rParent)
::std::auto_ptr<TreeNode>(new Wrapper (
this, Size (100,30), pButton, false)),
String::CreateFromAscii ("Button Area"),
- 0);
+ "");
}
diff --git a/sd/source/ui/toolpanel/TitleBar.cxx b/sd/source/ui/toolpanel/TitleBar.cxx
index 4e4d6da5ecea..acca7ec917d0 100644
--- a/sd/source/ui/toolpanel/TitleBar.cxx
+++ b/sd/source/ui/toolpanel/TitleBar.cxx
@@ -70,7 +70,7 @@ TitleBar::TitleBar ( ::Window* pParent, const String& rsTitle, TitleBarType eTyp
, mpDevice(new VirtualDevice (*this))
, mbIsExpandable (bIsExpandable)
{
- EnableMapMode (FALSE);
+ EnableMapMode (sal_False);
SetBackground (Wallpaper());
@@ -254,7 +254,7 @@ Image TitleBar::GetExpansionIndicator (void) const
Image aIndicator;
if (mbIsExpandable)
{
- USHORT nResourceId = 0;
+ sal_uInt16 nResourceId = 0;
switch (meType)
{
case TBT_SUB_CONTROL_HEADLINE:
@@ -304,7 +304,7 @@ void TitleBar::PaintFocusIndicator (const Rectangle& rTextBox)
if (mbFocused)
{
Rectangle aTextPixelBox (mpDevice->LogicToPixel (rTextBox));
- mpDevice->EnableMapMode (FALSE);
+ mpDevice->EnableMapMode (sal_False);
Rectangle aBox (rTextBox);
aBox.Top() -= 1;
aBox.Bottom() += 1;
@@ -321,7 +321,7 @@ void TitleBar::PaintFocusIndicator (const Rectangle& rTextBox)
mpDevice->SetLineColor (COL_BLACK);
mpDevice->DrawPolyLine (Polygon(aTextPixelBox), aDottedStyle);
- mpDevice->EnableMapMode (FALSE);
+ mpDevice->EnableMapMode (sal_False);
}
else
HideFocus ();
@@ -366,7 +366,7 @@ void TitleBar::PaintText (const Rectangle& rTextBox)
-USHORT TitleBar::GetTextStyle (void)
+sal_uInt16 TitleBar::GetTextStyle (void)
{
if(IsEnabled())
{
@@ -397,9 +397,9 @@ void TitleBar::PaintBackground (const Rectangle& rTitleBarBox)
if (mbExpanded)
{
// Make the color a little bit darker.
- aColor.SetRed(UINT8(((UINT16)aColor.GetRed()) * 8 / 10));
- aColor.SetGreen(UINT8(((UINT16)aColor.GetGreen()) * 8 / 10));
- aColor.SetBlue(UINT8(((UINT16)aColor.GetBlue()) * 8 / 10));
+ aColor.SetRed(sal_uInt8(((sal_uInt16)aColor.GetRed()) * 8 / 10));
+ aColor.SetGreen(sal_uInt8(((sal_uInt16)aColor.GetGreen()) * 8 / 10));
+ aColor.SetBlue(sal_uInt8(((sal_uInt16)aColor.GetBlue()) * 8 / 10));
}
mpDevice->SetFillColor (aColor);
diff --git a/sd/source/ui/toolpanel/ToolPanel.cxx b/sd/source/ui/toolpanel/ToolPanel.cxx
index 48866034be47..584de24f7d82 100644
--- a/sd/source/ui/toolpanel/ToolPanel.cxx
+++ b/sd/source/ui/toolpanel/ToolPanel.cxx
@@ -94,7 +94,7 @@ namespace sd { namespace toolpanel
Reference< XAccessible > SAL_CALL ToolPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException)
{
ToolPanelGuard aGuard( *this );
- Reference< XAccessible > xAccessible( m_pControl->GetWindow()->GetAccessible( FALSE ) );
+ Reference< XAccessible > xAccessible( m_pControl->GetWindow()->GetAccessible( sal_False ) );
if ( !xAccessible.is() )
{
xAccessible.set( m_pControl->CreateAccessibleObject( i_rParentAccessible ) );
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index 00c4f2edfad4..4b2918583cd0 100644
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -513,13 +513,18 @@ ToolPanelViewShell::ToolPanelViewShell( SfxViewFrame* pFrame, ViewShellBase& rVi
SetName( String( RTL_CONSTASCII_USTRINGPARAM( "ToolPanelViewShell" ) ) );
- // Some recent changes to the toolpanel make it necessary to create the
- // accessibility object now. Creating it on demand would lead to a
- // pointer cycle in the tree of accessibility objects and would lead
- // e.g. the accerciser AT tool into an infinite loop.
- // It would be nice to get rid of this workaround in the future.
+ // enforce the creation of the Accessible object here.
+ // In some not-always-to-reproduce situations, creating the accessible on demand only leads to some
+ // cycliy parenthood references between the involved objects, which make some AT tools (accerciser, in particular)
+ // loop (which is /not/ a bug in the tool, of course).
+ // However, since those situations were not reproducible anymore, we deliberately leave the Accessible creation
+ // (which originally was intended as a workaround) herein. Better to be safe ...
+ // Note that this is not a performance problem: The implementation of the ToolPanelDeck's Accessible
+ // is separated from the implementation of its AccessibleContext (which even is in a separate library) - we only
+ // create the former here, the latter is still created on demand, when somebody requests it.
+ // #i113671# / 2010-09-17 / frank.schoenheit@oracle.com
if (mpContentWindow.get())
- mpContentWindow->SetAccessible(mpImpl->CreateAccessible(*mpContentWindow));
+ mpContentWindow->GetAccessible( sal_True );
// For accessibility we have to shortly hide the content window. This
// triggers the construction of a new accessibility object for the new
@@ -608,18 +613,6 @@ SdPage* ToolPanelViewShell::getCurrentPage() const
}
// ---------------------------------------------------------------------------------------------------------------------
-void ToolPanelViewShell::Execute( SfxRequest& )
-{
- OSL_ENSURE( false, "ToolPanelViewShell::Execute: not to be called! (right?)" );
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-void ToolPanelViewShell::GetState( SfxItemSet& )
-{
- OSL_ENSURE( false, "ToolPanelViewShell::GetState: not to be called! (right?)" );
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
TaskPaneShellManager& ToolPanelViewShell::GetSubShellManager() const
{
return *mpSubShellManager.get();
@@ -642,12 +635,7 @@ DockingWindow* ToolPanelViewShell::GetDockingWindow()
Reference< XAccessible > ToolPanelViewShell::CreateAccessibleDocumentView( ::sd::Window* i_pWindow )
{
ENSURE_OR_RETURN( i_pWindow, "ToolPanelViewShell::CreateAccessibleDocumentView: illegal window!", NULL );
- // As said above, we have to create the accessibility object
- // (unconditionally) in the constructor, not here on demand, or
- // otherwise we would create a cycle in the tree of accessible objects
- // which could lead to infinite loops in AT tools.
- // return mpImpl->CreateAccessible( *i_pWindow );
- return Reference<XAccessible>();
+ return mpImpl->CreateAccessible( *i_pWindow );
}
// ---------------------------------------------------------------------------------------------------------------------
@@ -694,10 +682,10 @@ namespace
struct PanelFactory
{
ControlFactoryFactory pFactory;
- ULONG nHelpID;
- PanelFactory( const ControlFactoryFactory i_pFactory, const ULONG i_nHelpID )
+ rtl::OString sHelpID;
+ PanelFactory( const ControlFactoryFactory i_pFactory, const rtl::OString& i_nHelpID )
:pFactory( i_pFactory )
- ,nHelpID( i_nHelpID )
+ ,sHelpID( i_nHelpID )
{
}
};
@@ -735,7 +723,7 @@ Reference< XUIElement > ToolPanelViewShell::CreatePanelUIElement( const Referenc
::std::auto_ptr< TreeNode > pNode( pControlFactory->CreateControl( mpImpl->GetToolPanelDeck().GetPanelWindowAnchor() ) );
ENSURE_OR_THROW( ( pNode.get() != NULL ) && ( pNode->GetWindow() != NULL ),
"illegal node returned by the control factory" );
- pNode->GetWindow()->SetHelpId( aPanelFactory.nHelpID );
+ pNode->GetWindow()->SetHelpId( aPanelFactory.sHelpID );
// create an XToolPanel
Reference< XToolPanel > xPanel( new ToolPanel( pNode ) );
@@ -894,7 +882,7 @@ void ToolPanelViewShell_Impl::ConnectToDockingWindow()
// ---------------------------------------------------------------------------------------------------------------------
Reference< XAccessible > ToolPanelViewShell_Impl::CreateAccessible( ::sd::Window& i_rWindow )
{
- Reference< XAccessible > xAccessible( GetToolPanelDeck().GetAccessible( FALSE ) );
+ Reference< XAccessible > xAccessible( GetToolPanelDeck().GetAccessible( sal_False ) );
if ( !xAccessible.is() )
{
// determine the XAccessible which is the parent of the to-be-created object
@@ -902,7 +890,7 @@ Reference< XAccessible > ToolPanelViewShell_Impl::CreateAccessible( ::sd::Window
OSL_ENSURE( pAccessibleParent, "ToolPanelViewShell_Impl::CreateAccessible: illegal accessible parent provided by the sd::Window!" );
GetToolPanelDeck().SetAccessibleParentWindow( pAccessibleParent );
- xAccessible = GetToolPanelDeck().GetAccessible( TRUE );
+ xAccessible = GetToolPanelDeck().GetAccessible( sal_True );
ENSURE_OR_RETURN( xAccessible.is(), "ToolPanelViewShell_Impl::CreateAccessible: illegal ToolPanelDeck accessible!", NULL );
OSL_ENSURE( xAccessible->getAccessibleContext().is()
&& xAccessible->getAccessibleContext()->getAccessibleParent() == pAccessibleParent->GetAccessible(),
diff --git a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx
index 4f1df32fc695..4f1df32fc695 100644..100755
--- a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx
+++ b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx
diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx
index 322649b9a408..e26251dc1e76 100644..100755
--- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx
@@ -120,12 +120,12 @@ void CurrentMasterPagesSelector::LateInit (void)
void CurrentMasterPagesSelector::Fill (ItemList& rItemList)
{
- USHORT nPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD);
+ sal_uInt16 nPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD);
SdPage* pMasterPage;
// Remember the names of the master pages that have been inserted to
// avoid double insertion.
::std::set<String> aMasterPageNames;
- for (USHORT nIndex=0; nIndex<nPageCount; nIndex++)
+ for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++)
{
pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD);
if (pMasterPage == NULL)
@@ -173,10 +173,10 @@ void CurrentMasterPagesSelector::UpdateSelection (void)
{
// Iterate over all pages and for the selected ones put the name of
// their master page into a set.
- USHORT nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
+ sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
SdPage* pPage;
::std::set<String> aNames;
- USHORT nIndex;
+ sal_uInt16 nIndex;
bool bLoop (true);
for (nIndex=0; nIndex<nPageCount && bLoop; nIndex++)
{
@@ -204,7 +204,7 @@ void CurrentMasterPagesSelector::UpdateSelection (void)
}
// Find the items for the master pages in the set.
- USHORT nItemCount (mpPageSet->GetItemCount());
+ sal_uInt16 nItemCount (mpPageSet->GetItemCount());
for (nIndex=1; nIndex<=nItemCount && bLoop; nIndex++)
{
String sName (mpPageSet->GetItemText (nIndex));
@@ -233,7 +233,7 @@ void CurrentMasterPagesSelector::Execute (SfxRequest& rRequest)
// Removing the precious flag so that the following call to
// RemoveUnnessesaryMasterPages() will remove this master page.
pMasterPage->SetPrecious(false);
- mrDocument.RemoveUnnecessaryMasterPages(pMasterPage, FALSE, TRUE);
+ mrDocument.RemoveUnnecessaryMasterPages(pMasterPage, sal_False, sal_True);
}
}
break;
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index c8f3cde1253f..e3fec0e9f04f 100644
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -80,13 +80,13 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// present. This is not the case when we are called during the
// creation of the slide master page because then the notes master
// page is not there.
- USHORT nSourceMasterPageCount = pSourceDocument->GetMasterPageCount();
+ sal_uInt16 nSourceMasterPageCount = pSourceDocument->GetMasterPageCount();
if (nSourceMasterPageCount%2 == 0)
// There should be 1 handout page + n slide masters + n notes
// masters = 2*n+1. An even value indicates that a new slide
// master but not yet the notes master has been inserted.
break;
- USHORT nIndex = pMasterPage->GetPageNum();
+ sal_uInt16 nIndex = pMasterPage->GetPageNum();
if (nSourceMasterPageCount <= nIndex+1)
break;
// Get the slide master page.
@@ -103,8 +103,8 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Check if a master page with the same name as that of the given
// master page already exists.
bool bPageExists (false);
- USHORT nMasterPageCount(rTargetDocument.GetMasterSdPageCount(PK_STANDARD));
- for (USHORT nMaster=0; nMaster<nMasterPageCount; nMaster++)
+ sal_uInt16 nMasterPageCount(rTargetDocument.GetMasterSdPageCount(PK_STANDARD));
+ for (sal_uInt16 nMaster=0; nMaster<nMasterPageCount; nMaster++)
{
SdPage* pCandidate = static_cast<SdPage*>(
rTargetDocument.GetMasterSdPage (nMaster, PK_STANDARD));
@@ -136,7 +136,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
PK_STANDARD);
if (pSlide == NULL)
break;
- pSlide->SetAutoLayout(AUTOLAYOUT_TITLE, TRUE);
+ pSlide->SetAutoLayout(AUTOLAYOUT_TITLE, sal_True);
// Create a copy of the master page and the associated notes
// master page and insert them into our document.
@@ -154,9 +154,9 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
rTargetDocument.GetSdPageCount(PK_STANDARD)-1,
pNewMasterPage->GetName(),
&rTargetDocument,
- FALSE, // Connect the new master page with the new slide but
+ sal_False, // Connect the new master page with the new slide but
// do not modify other (master) pages.
- TRUE);
+ sal_True);
}
while (false);
@@ -184,7 +184,7 @@ SdPage* DocumentHelper::GetSlideForMasterPage (SdPage* pMasterPage)
{
// In most cases a new slide has just been inserted so start with
// the last page.
- USHORT nPageIndex (pDocument->GetSdPageCount(PK_STANDARD)-1);
+ sal_uInt16 nPageIndex (pDocument->GetSdPageCount(PK_STANDARD)-1);
bool bFound (false);
while ( ! bFound)
{
@@ -291,14 +291,14 @@ void DocumentHelper::ProvideStyles (
// Add an undo action for the copied style sheets.
if( !aCreatedStyles.empty() )
{
- SfxUndoManager* pUndoManager = rTargetDocument.GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = rTargetDocument.GetDocSh()->GetUndoManager();
if (pUndoManager != NULL)
{
SdMoveStyleSheetsUndoAction* pMovStyles =
new SdMoveStyleSheetsUndoAction (
&rTargetDocument,
aCreatedStyles,
- TRUE);
+ sal_True);
pUndoManager->AddUndoAction (pMovStyles);
}
}
@@ -340,7 +340,7 @@ void DocumentHelper::AssignMasterPageToPageList (
if (aCleanedList.size() == 0)
return;
- SfxUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager();
if( pUndoMgr )
pUndoMgr->EnterListAction(String(SdResId(STR_UNDO_SET_PRESLAYOUT)), String());
@@ -369,7 +369,7 @@ void DocumentHelper::AssignMasterPageToPageList (
SdPage* DocumentHelper::AddMasterPage (
SdDrawDocument& rTargetDocument,
SdPage* pMasterPage,
- USHORT nInsertionIndex)
+ sal_uInt16 nInsertionIndex)
{
SdPage* pClonedMasterPage = NULL;
@@ -400,9 +400,9 @@ SdPage* DocumentHelper::AddMasterPage (
pClonedMasterPage->GetUppBorder(),
pClonedMasterPage->GetRgtBorder(),
pClonedMasterPage->GetLwrBorder());
- pClonedMasterPage->ScaleObjects(aNewSize, aBorders, TRUE);
+ pClonedMasterPage->ScaleObjects(aNewSize, aBorders, sal_True);
pClonedMasterPage->SetSize(aNewSize);
- pClonedMasterPage->CreateTitleAndLayout(TRUE);
+ pClonedMasterPage->CreateTitleAndLayout(sal_True);
}
}
@@ -445,22 +445,22 @@ void DocumentHelper::AssignMasterPageToPage (
pDocument->GetDocSh()->GetUndoManager()->AddUndoAction(
new SdBackgroundObjUndoAction(
*pDocument, *pPage, pPage->getSdrPageProperties().GetItemSet()),
- TRUE);
+ sal_True);
pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE));
pDocument->SetMasterPage (
(pPage->GetPageNum()-1)/2,
rsBaseLayoutName,
pDocument,
- FALSE,
- FALSE);
+ sal_False,
+ sal_False);
}
else
{
// Find first slide that uses the master page.
SdPage* pSlide = NULL;
- USHORT nPageCount = pDocument->GetSdPageCount(PK_STANDARD);
- for (USHORT nPage=0; nPage<nPageCount&&pSlide==NULL; nPage++)
+ sal_uInt16 nPageCount = pDocument->GetSdPageCount(PK_STANDARD);
+ for (sal_uInt16 nPage=0; nPage<nPageCount&&pSlide==NULL; nPage++)
{
SdrPage* pCandidate = pDocument->GetSdPage(nPage,PK_STANDARD);
if (pCandidate != NULL
@@ -479,15 +479,15 @@ void DocumentHelper::AssignMasterPageToPage (
(pSlide->GetPageNum()-1)/2,
rsBaseLayoutName,
pDocument,
- FALSE,
- FALSE);
+ sal_False,
+ sal_False);
}
else
{
// 3. Replace the master page A by a copy of the given master
// page B.
pDocument->RemoveUnnecessaryMasterPages (
- pPage, FALSE);
+ pPage, sal_False);
}
}
}
@@ -526,7 +526,7 @@ SdPage* DocumentHelper::ProvideMasterPage (
// Search for a master page with the same name as the given one in
// the target document.
const XubString sMasterPageLayoutName (pMasterPage->GetLayoutName());
- for (USHORT nIndex=0,nCount=rTargetDocument.GetMasterPageCount(); nIndex<nCount; ++nIndex)
+ for (sal_uInt16 nIndex=0,nCount=rTargetDocument.GetMasterPageCount(); nIndex<nCount; ++nIndex)
{
SdPage* pCandidate = static_cast<SdPage*>(rTargetDocument.GetMasterPage(nIndex));
if (pCandidate!=NULL
@@ -545,7 +545,7 @@ SdPage* DocumentHelper::ProvideMasterPage (
// Determine the position where the new master pages are inserted.
// By default they are inserted at the end. When we assign to a
// master page then insert after the last of the (selected) pages.
- USHORT nInsertionIndex = rTargetDocument.GetMasterPageCount();
+ sal_uInt16 nInsertionIndex = rTargetDocument.GetMasterPageCount();
if (rpPageList->front()->IsMasterPage())
{
nInsertionIndex = rpPageList->back()->GetPageNum();
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.hxx b/sd/source/ui/toolpanel/controls/DocumentHelper.hxx
index c699819885f1..cd2c45e0c0ea 100644..100755
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.hxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.hxx
@@ -85,7 +85,7 @@ private:
static SdPage* AddMasterPage (
SdDrawDocument& rTargetDocument,
SdPage* pMasterPage,
- USHORT nInsertionIndex);
+ sal_uInt16 nInsertionIndex);
static SdPage* ProvideMasterPage (
SdDrawDocument& rTargetDocument,
SdPage* pMasterPage,
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
index 92afcff4f826..3daf7d49d6db 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
@@ -189,7 +189,7 @@ private:
const String& sFileName,
SfxObjectShellLock& rxDocumentShell);
- Image GetPreviewSubstitution (USHORT nId, PreviewSize ePreviewSize);
+ Image GetPreviewSubstitution (sal_uInt16 nId, PreviewSize ePreviewSize);
void CleanContainer (void);
};
@@ -1066,7 +1066,7 @@ SdDrawDocument* MasterPageContainer::Implementation::GetDocument (void)
Image MasterPageContainer::Implementation::GetPreviewSubstitution (
- USHORT nId,
+ sal_uInt16 nId,
PreviewSize ePreviewSize)
{
const ::osl::MutexGuard aGuard (maMutex);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx
index 661a26bd68b8..661a26bd68b8 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
index da8ede52027d..8e834b222d3e 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
@@ -307,9 +307,9 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
{
SfxApplication* pSfxApp = SFX_APP();
SfxItemSet* pSet = new SfxAllItemSet (pSfxApp->GetPool());
- pSet->Put (SfxBoolItem (SID_TEMPLATE, TRUE));
- pSet->Put (SfxBoolItem (SID_PREVIEW, TRUE));
- if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, TRUE, pSet))
+ pSet->Put (SfxBoolItem (SID_TEMPLATE, sal_True));
+ pSet->Put (SfxBoolItem (SID_PREVIEW, sal_True));
+ if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, sal_True, pSet))
{
mxDocumentShell = NULL;
}
@@ -356,7 +356,7 @@ SdPage* DefaultPageObjectProvider::operator () (SdDrawDocument* pContainerDocume
if (pContainerDocument != NULL)
{
sal_Int32 nIndex (0);
- SdPage* pLocalSlide = pContainerDocument->GetSdPage((USHORT)nIndex, PK_STANDARD);
+ SdPage* pLocalSlide = pContainerDocument->GetSdPage((sal_uInt16)nIndex, PK_STANDARD);
if (pLocalSlide!=NULL && pLocalSlide->TRG_HasMasterPage())
pLocalMasterPage = dynamic_cast<SdPage*>(&pLocalSlide->TRG_GetMasterPage());
}
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
index 3aec7fd8ceab..5cb89bab3e38 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx
@@ -158,7 +158,7 @@ bool MasterPageContainerQueue::RequestPreview (const SharedMasterPageDescriptor&
PreviewCreationRequest::CompareToken(rpDescriptor->maToken)));
// When a request for the same token exists then the lowest of the
// two priorities is used.
- if (HasRequest(rpDescriptor->maToken))
+ if (iRequest != mpRequestQueue->end())
if (iRequest->mnPriority < nPriority)
{
mpRequestQueue->erase(iRequest);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx
index 2cab5d31edc5..2cab5d31edc5 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx
diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
index 9c994f42f3c4..8351ed29de3f 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
@@ -195,8 +195,8 @@ void MasterPageObserver::Implementation::RegisterDocument (
{
// Gather the names of all the master pages in the given document.
MasterPageContainer::mapped_type aMasterPageSet;
- USHORT nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD);
- for (USHORT nIndex=0; nIndex<nMasterPageCount; nIndex++)
+ sal_uInt16 nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD);
+ for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD);
if (pMasterPage != NULL)
@@ -331,9 +331,9 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages (
SdDrawDocument& rDocument)
{
// Create a set of names of the master pages used by the given document.
- USHORT nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD);
+ sal_uInt16 nMasterPageCount = rDocument.GetMasterSdPageCount(PK_STANDARD);
::std::set<String> aCurrentMasterPages;
- for (USHORT nIndex=0; nIndex<nMasterPageCount; nIndex++)
+ for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD);
if (pMasterPage != NULL)
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx b/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx
index c12321f15d38..4b772bf143cf 100644
--- a/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx
@@ -46,6 +46,7 @@
#include "sdresid.hxx"
#include "helpids.h"
#include <svtools/valueset.hxx>
+#include "app.hrc"
namespace sd { namespace toolpanel { namespace controls {
@@ -73,9 +74,9 @@ void MasterPagesPanel::impl_construct( ViewShellBase& rBase )
rBase,
pContainer));
pSelector->LateInit();
- pSelector->SetSmartHelpId( SmartId(HID_SD_TASK_PANE_PREVIEW_CURRENT) );
+ pSelector->SetHelpId( HID_SD_TASK_PANE_PREVIEW_CURRENT );
GetShellManager()->AddSubShell(
- HID_SD_TASK_PANE_PREVIEW_CURRENT,
+ SHELLID_SD_TASK_PANE_PREVIEW_CURRENT,
pSelector.get(),
pSelector->GetWindow());
AddControl (
@@ -90,9 +91,9 @@ void MasterPagesPanel::impl_construct( ViewShellBase& rBase )
rBase,
pContainer));
pSelector->LateInit();
- pSelector->SetSmartHelpId( SmartId(HID_SD_TASK_PANE_PREVIEW_RECENT) );
+ pSelector->SetHelpId( HID_SD_TASK_PANE_PREVIEW_RECENT );
GetShellManager()->AddSubShell(
- HID_SD_TASK_PANE_PREVIEW_RECENT,
+ SHELLID_SD_TASK_PANE_PREVIEW_RECENT,
pSelector.get(),
pSelector->GetWindow());
AddControl (
@@ -108,9 +109,9 @@ void MasterPagesPanel::impl_construct( ViewShellBase& rBase )
*pDrawViewShell,
pContainer));
pSelector->LateInit();
- pSelector->SetSmartHelpId( SmartId(HID_SD_TASK_PANE_PREVIEW_ALL) );
+ pSelector->SetHelpId( HID_SD_TASK_PANE_PREVIEW_ALL );
GetShellManager()->AddSubShell(
- HID_SD_TASK_PANE_PREVIEW_ALL,
+ SHELLID_SD_TASK_PANE_PREVIEW_ALL,
pSelector.get(),
pSelector->GetWindow());
AddControl (
@@ -129,9 +130,9 @@ MasterPagesPanel::~MasterPagesPanel (void)
OSL_ENSURE( pShellManager, "MasterPagesPanel::~MasterPagesPanel: no shell manager anymore - cannot remove sub shells!" );
if ( pShellManager )
{
- pShellManager->RemoveSubShell( HID_SD_TASK_PANE_PREVIEW_CURRENT );
- pShellManager->RemoveSubShell( HID_SD_TASK_PANE_PREVIEW_RECENT );
- pShellManager->RemoveSubShell( HID_SD_TASK_PANE_PREVIEW_ALL );
+ pShellManager->RemoveSubShell( SHELLID_SD_TASK_PANE_PREVIEW_CURRENT );
+ pShellManager->RemoveSubShell( SHELLID_SD_TASK_PANE_PREVIEW_RECENT );
+ pShellManager->RemoveSubShell( SHELLID_SD_TASK_PANE_PREVIEW_ALL );
}
}
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
index 2096c7368457..816b581e3eda 100644
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
@@ -269,7 +269,7 @@ IMPL_LINK(MasterPagesSelector, RightClickHandler, MouseEvent*, pEvent)
mpPageSet->ReleaseMouse();
if (GetDispatcher() != NULL && pEvent != NULL)
{
- USHORT nIndex = mpPageSet->GetItemId (pEvent->GetPosPixel());
+ sal_uInt16 nIndex = mpPageSet->GetItemId (pEvent->GetPosPixel());
if (nIndex > 0)
mpPageSet->SelectItem (nIndex);
}
@@ -285,7 +285,7 @@ IMPL_LINK(MasterPagesSelector, ContextMenuCallback, CommandEvent*, pEvent)
// center.
if (GetShellManager() != NULL)
GetShellManager()->MoveToTop (this);
- const USHORT nIndex = mpPageSet->GetSelectItemId();
+ const sal_uInt16 nIndex = mpPageSet->GetSelectItemId();
if (nIndex > 0 && pEvent!=NULL)
{
// The position of the upper left corner of the context menu is
@@ -327,7 +327,7 @@ SdPage* MasterPagesSelector::GetSelectedMasterPage (void)
const ::osl::MutexGuard aGuard (maMutex);
SdPage* pMasterPage = NULL;
- USHORT nIndex = mpPageSet->GetSelectItemId();
+ sal_uInt16 nIndex = mpPageSet->GetSelectItemId();
UserData* pData = GetUserData(nIndex);
if (pData != NULL)
{
@@ -347,7 +347,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
if (pMasterPage == NULL)
return;
- USHORT nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
+ sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
if (nPageCount == 0)
return;
@@ -357,7 +357,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
String sFullLayoutName (pMasterPage->GetLayoutName());
::sd::slidesorter::SharedPageSelection pPageList (
new ::sd::slidesorter::SlideSorterViewShell::PageSelection());
- for (USHORT nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
+ for (sal_uInt16 nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
{
SdPage* pPage = mrDocument.GetSdPage (nPageIndex, PK_STANDARD);
if (pPage != NULL
@@ -431,9 +431,9 @@ void MasterPagesSelector::NotifyContainerChangeEvent (const MasterPageContainerC
if (nIndex >= 0)
{
mpPageSet->SetItemImage (
- (USHORT)nIndex,
+ (sal_uInt16)nIndex,
mpContainer->GetPreviewForToken(rEvent.maChildToken));
- mpPageSet->Invalidate(mpPageSet->GetItemRect((USHORT)nIndex));
+ mpPageSet->Invalidate(mpPageSet->GetItemRect((sal_uInt16)nIndex));
}
}
break;
@@ -468,7 +468,7 @@ MasterPagesSelector::UserData* MasterPagesSelector::GetUserData (int nIndex) con
const ::osl::MutexGuard aGuard (maMutex);
if (nIndex>0 && static_cast<unsigned int>(nIndex)<=mpPageSet->GetItemCount())
- return reinterpret_cast<UserData*>(mpPageSet->GetItemData((USHORT)nIndex));
+ return reinterpret_cast<UserData*>(mpPageSet->GetItemData((sal_uInt16)nIndex));
else
return NULL;
}
@@ -485,7 +485,7 @@ void MasterPagesSelector::SetUserData (int nIndex, UserData* pData)
UserData* pOldData = GetUserData(nIndex);
if (pOldData!=NULL && pOldData!=pData)
delete pOldData;
- mpPageSet->SetItemData((USHORT)nIndex, pData);
+ mpPageSet->SetItemData((sal_uInt16)nIndex, pData);
}
}
@@ -568,7 +568,7 @@ void MasterPagesSelector::Execute (SfxRequest& rRequest)
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
if (pDispatcher != NULL)
{
- USHORT nIndex = mpPageSet->GetSelectItemId();
+ sal_uInt16 nIndex = mpPageSet->GetSelectItemId();
pDispatcher->Execute(SID_MASTERPAGE, SFX_CALLMODE_SYNCHRON);
mpPageSet->SelectItem (nIndex);
mrBase.GetDrawController().setCurrentPage(xSelectedMaster);
@@ -605,7 +605,7 @@ void MasterPagesSelector::GetState (SfxItemSet& rItemSet)
void MasterPagesSelector::SetItem (
- USHORT nIndex,
+ sal_uInt16 nIndex,
MasterPageContainer::Token aToken)
{
const ::osl::MutexGuard aGuard (maMutex);
@@ -654,7 +654,7 @@ void MasterPagesSelector::SetItem (
void MasterPagesSelector::AddTokenToIndexEntry (
- USHORT nIndex,
+ sal_uInt16 nIndex,
MasterPageContainer::Token aToken)
{
const ::osl::MutexGuard aGuard (maMutex);
@@ -666,7 +666,7 @@ void MasterPagesSelector::AddTokenToIndexEntry (
void MasterPagesSelector::RemoveTokenToIndexEntry (
- USHORT nIndex,
+ sal_uInt16 nIndex,
MasterPageContainer::Token aNewToken)
{
const ::osl::MutexGuard aGuard (maMutex);
@@ -692,7 +692,7 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
{
const ::osl::MutexGuard aGuard (maMutex);
- for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
+ for (sal_uInt16 nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
if (pData != NULL)
@@ -712,7 +712,7 @@ void MasterPagesSelector::UpdateAllPreviews (void)
{
const ::osl::MutexGuard aGuard (maMutex);
- for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
+ for (sal_uInt16 nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
if (pData != NULL)
@@ -735,7 +735,7 @@ void MasterPagesSelector::ClearPageSet (void)
{
const ::osl::MutexGuard aGuard (maMutex);
- for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
+ for (sal_uInt16 nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
if (pData != NULL)
@@ -747,11 +747,11 @@ void MasterPagesSelector::ClearPageSet (void)
-void MasterPagesSelector::SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode )
+void MasterPagesSelector::SetHelpId( const rtl::OString& aId )
{
const ::osl::MutexGuard aGuard (maMutex);
- mpPageSet->SetSmartHelpId( aId, aMode );
+ mpPageSet->SetHelpId( aId );
}
@@ -807,7 +807,7 @@ void MasterPagesSelector::UpdateItemList (::std::auto_ptr<ItemList> pNewItemList
ItemList::const_iterator iCurrentItem (maCurrentItemList.begin());
ItemList::const_iterator iNewEnd (pNewItemList->end());
ItemList::const_iterator iCurrentEnd (maCurrentItemList.end());
- USHORT nIndex (1);
+ sal_uInt16 nIndex (1);
// Update existing items.
for ( ; iNewItem!=iNewEnd && iCurrentItem!=iCurrentEnd; ++iNewItem, ++iCurrentItem,++nIndex)
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
index 3e3eb9b9fe99..24a78cddb0ba 100644
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
@@ -88,7 +88,7 @@ public:
static SdPage* AddMasterPage (
SdDrawDocument* pTargetDocument,
SdPage* pMasterPage,
- USHORT nInsertionIndex);
+ sal_uInt16 nInsertionIndex);
virtual Size GetPreferredSize (void);
virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
@@ -122,7 +122,8 @@ public:
*/
void ClearPageSet (void);
- void SetSmartHelpId( const SmartId& aId, SmartIdUpdateMode aMode = SMART_SET_SMART );
+ using SfxShell::SetHelpId;
+ void SetHelpId( const rtl::OString& aId );
/** Mark the preview that belongs to the given index as not up-to-date
anymore with respect to page content or preview size.
@@ -152,7 +153,7 @@ protected:
eventually. Filled by InvalidatePreview() and operated upon by
UpdatePreviews().
*/
- ::std::queue<USHORT> maPreviewUpdateQueue;
+ ::std::queue<sal_uInt16> maPreviewUpdateQueue;
virtual SdPage* GetSelectedMasterPage (void);
@@ -221,13 +222,13 @@ private:
DECL_LINK(ContainerChangeListener, MasterPageContainerChangeEvent*);
void SetItem (
- USHORT nIndex,
+ sal_uInt16 nIndex,
MasterPageContainer::Token aToken);
void AddTokenToIndexEntry (
- USHORT nIndex,
+ sal_uInt16 nIndex,
MasterPageContainer::Token aToken);
void RemoveTokenToIndexEntry (
- USHORT nIndex,
+ sal_uInt16 nIndex,
MasterPageContainer::Token aToken);
};
diff --git a/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx b/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx
index b1c6350ecf4a..63420f7630cd 100644..100755
--- a/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx
+++ b/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx
@@ -142,12 +142,12 @@ void PreviewValueSet::Command (const CommandEvent& rEvent)
void PreviewValueSet::Rearrange (bool bForceRequestResize)
{
- USHORT nOldColumnCount (GetColCount());
- USHORT nOldRowCount (GetLineCount());
+ sal_uInt16 nOldColumnCount (GetColCount());
+ sal_uInt16 nOldRowCount (GetLineCount());
- USHORT nNewColumnCount (CalculateColumnCount (
+ sal_uInt16 nNewColumnCount (CalculateColumnCount (
GetOutputSizePixel().Width()));
- USHORT nNewRowCount (CalculateRowCount (nNewColumnCount));
+ sal_uInt16 nNewRowCount (CalculateRowCount (nNewColumnCount));
SetColCount(nNewColumnCount);
SetLineCount(nNewRowCount);
@@ -169,7 +169,7 @@ void PreviewValueSet::SetContextMenuCallback (const Link& rLink)
-USHORT PreviewValueSet::CalculateColumnCount (int nWidth) const
+sal_uInt16 PreviewValueSet::CalculateColumnCount (int nWidth) const
{
int nColumnCount = 0;
if (nWidth > 0)
@@ -180,13 +180,13 @@ USHORT PreviewValueSet::CalculateColumnCount (int nWidth) const
else if (mnMaxColumnCount>0 && nColumnCount>mnMaxColumnCount)
nColumnCount = mnMaxColumnCount;
}
- return (USHORT)nColumnCount;
+ return (sal_uInt16)nColumnCount;
}
-USHORT PreviewValueSet::CalculateRowCount (USHORT nColumnCount) const
+sal_uInt16 PreviewValueSet::CalculateRowCount (sal_uInt16 nColumnCount) const
{
int nRowCount = 0;
int nItemCount = GetItemCount();
@@ -197,7 +197,7 @@ USHORT PreviewValueSet::CalculateRowCount (USHORT nColumnCount) const
nRowCount = 1;
}
- return (USHORT)nRowCount;
+ return (sal_uInt16)nRowCount;
}
diff --git a/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx b/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx
index 2c693f20866f..1f8555d7733c 100644..100755
--- a/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx
+++ b/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx
@@ -88,8 +88,8 @@ private:
const int mnBorderHeight;
const int mnMaxColumnCount;
- USHORT CalculateColumnCount (int nWidth) const;
- USHORT CalculateRowCount (USHORT nColumnCount) const;
+ sal_uInt16 CalculateColumnCount (int nWidth) const;
+ sal_uInt16 CalculateRowCount (sal_uInt16 nColumnCount) const;
};
} } } // end of namespace ::sd::toolpanel::controls
diff --git a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx
index 83bc417def0b..f1f918c8d6b7 100644..100755
--- a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx
@@ -91,8 +91,8 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList)
{
// Create a set of names of the master pages used by the document.
MasterPageObserver::MasterPageNameSet aCurrentNames;
- USHORT nMasterPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD);
- USHORT nIndex;
+ sal_uInt16 nMasterPageCount = mrDocument.GetMasterSdPageCount(PK_STANDARD);
+ sal_uInt16 nIndex;
for (nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD);
@@ -130,7 +130,7 @@ void RecentMasterPagesSelector::AssignMasterPageToPageList (
SdPage* pMasterPage,
const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList)
{
- USHORT nSelectedItemId = mpPageSet->GetSelectItemId();
+ sal_uInt16 nSelectedItemId = mpPageSet->GetSelectItemId();
MasterPagesSelector::AssignMasterPageToPageList(pMasterPage, rpPageList);
diff --git a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx
index 592cfd0cf914..592cfd0cf914 100644..100755
--- a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx
+++ b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx
diff --git a/sd/source/ui/tools/IconCache.cxx b/sd/source/ui/tools/IconCache.cxx
index 2c91c20e72a2..45bdc504036a 100644..100755
--- a/sd/source/ui/tools/IconCache.cxx
+++ b/sd/source/ui/tools/IconCache.cxx
@@ -51,17 +51,17 @@ private:
*/
static IconCache* mpInstance;
- typedef ::boost::unordered_map<USHORT,Image> ImageContainer;
+ typedef ::boost::unordered_map<sal_uInt16,Image> ImageContainer;
ImageContainer maContainer;
- Image GetIcon (USHORT nResourceId);
+ Image GetIcon (sal_uInt16 nResourceId);
};
IconCache* IconCache::Implementation::mpInstance = NULL;
-Image IconCache::Implementation::GetIcon (USHORT nResourceId)
+Image IconCache::Implementation::GetIcon (sal_uInt16 nResourceId)
{
Image aResult;
ImageContainer::iterator iImage;
@@ -110,7 +110,7 @@ IconCache& IconCache::Instance (void)
-Image IconCache::GetIcon (USHORT nResourceId)
+Image IconCache::GetIcon (sal_uInt16 nResourceId)
{
return mpImpl->GetIcon (nResourceId);
}
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index fe895f519f64..ea735df54c6b 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -44,6 +44,11 @@
#include <tools/link.hxx>
#include <vcl/svapp.hxx>
#include <tools/diagnose_ex.h>
+#include <svx/sdr/contact/viewobjectcontact.hxx>
+#include <svx/sdr/contact/viewcontact.hxx>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
namespace sd {
@@ -51,6 +56,26 @@ namespace sd {
const int PreviewRenderer::snSubstitutionTextSize = 11;
const int PreviewRenderer::snFrameWidth = 1;
+namespace {
+ /** This incarnation of the ViewObjectContactRedirector filters away all
+ PageObj objects, unconditionally.
+ */
+ class ViewRedirector : public ::sdr::contact::ViewObjectContactRedirector
+ {
+ public:
+ ViewRedirector (void);
+ virtual ~ViewRedirector (void);
+ virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo);
+ };
+}
+
+
+
+
+//===== PreviewRenderer =======================================================
+
PreviewRenderer::PreviewRenderer (
OutputDevice* pTemplate,
const bool bHasFrame)
@@ -67,7 +92,10 @@ PreviewRenderer::PreviewRenderer (
mpPreviewDevice->SetBackground(pTemplate->GetBackground());
}
else
- mpPreviewDevice->SetBackground(Wallpaper(COL_WHITE));
+ {
+ mpPreviewDevice->SetBackground(Wallpaper(
+ Application::GetSettings().GetStyleSettings().GetWindowColor()));
+ }
}
@@ -86,7 +114,8 @@ Image PreviewRenderer::RenderPage (
const SdPage* pPage,
const sal_Int32 nWidth,
const String& rSubstitutionText,
- const bool bObeyHighContrastMode)
+ const bool bObeyHighContrastMode,
+ const bool bDisplayPresentationObjects)
{
if (pPage != NULL)
{
@@ -96,7 +125,12 @@ Image PreviewRenderer::RenderPage (
const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
const sal_Int32 nHeight (sal::static_int_cast<sal_Int32>(
(nWidth - 2*nFrameWidth) / nAspectRatio + 2*nFrameWidth + 0.5));
- return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText, bObeyHighContrastMode);
+ return RenderPage (
+ pPage,
+ Size(nWidth,nHeight),
+ rSubstitutionText,
+ bObeyHighContrastMode,
+ bDisplayPresentationObjects);
}
else
return Image();
@@ -109,7 +143,8 @@ Image PreviewRenderer::RenderPage (
const SdPage* pPage,
Size aPixelSize,
const String& rSubstitutionText,
- const bool bObeyHighContrastMode)
+ const bool bObeyHighContrastMode,
+ const bool bDisplayPresentationObjects)
{
Image aPreview;
@@ -117,10 +152,10 @@ Image PreviewRenderer::RenderPage (
{
try
{
- if (Initialize (pPage, aPixelSize, bObeyHighContrastMode))
+ if (Initialize(pPage, aPixelSize, bObeyHighContrastMode))
{
- PaintPage (pPage);
- PaintSubstitutionText (rSubstitutionText);
+ PaintPage(pPage, bDisplayPresentationObjects);
+ PaintSubstitutionText(rSubstitutionText);
PaintFrame();
Size aSize (mpPreviewDevice->GetOutputSizePixel());
@@ -155,17 +190,17 @@ Image PreviewRenderer::RenderSubstitution (
mpPreviewDevice->SetOutputSizePixel(rPreviewPixelSize);
// Adjust contrast mode.
- bool bUseContrast = Application::GetSettings().GetStyleSettings().
- GetHighContrastMode();
+ const bool bUseContrast (
+ Application::GetSettings().GetStyleSettings().GetHighContrastMode());
mpPreviewDevice->SetDrawMode (bUseContrast
? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR);
- // Set a map mode makes a typical substitution text completely
+ // Set a map mode that makes a typical substitution text completely
// visible.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
aMapMode.SetMapUnit(MAP_100TH_MM);
- double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0);
+ const double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0);
aMapMode.SetScaleX(nFinalScale);
aMapMode.SetScaleY(nFinalScale);
const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
@@ -174,21 +209,21 @@ Image PreviewRenderer::RenderSubstitution (
mpPreviewDevice->SetMapMode (aMapMode);
// Clear the background.
- Rectangle aPaintRectangle (
+ const Rectangle aPaintRectangle (
Point(0,0),
mpPreviewDevice->GetOutputSizePixel());
- mpPreviewDevice->EnableMapMode(FALSE);
+ mpPreviewDevice->EnableMapMode(sal_False);
mpPreviewDevice->SetLineColor();
svtools::ColorConfig aColorConfig;
mpPreviewDevice->SetFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
mpPreviewDevice->DrawRect (aPaintRectangle);
- mpPreviewDevice->EnableMapMode(TRUE);
+ mpPreviewDevice->EnableMapMode(sal_True);
// Paint substitution text and a frame around it.
PaintSubstitutionText (rSubstitutionText);
PaintFrame();
- Size aSize (mpPreviewDevice->GetOutputSizePixel());
+ const Size aSize (mpPreviewDevice->GetOutputSizePixel());
aPreview = mpPreviewDevice->GetBitmap (
mpPreviewDevice->PixelToLogic(Point(0,0)),
mpPreviewDevice->PixelToLogic(aSize));
@@ -262,6 +297,8 @@ bool PreviewRenderer::Initialize (
rOutliner.SetDefaultLanguage(pDocument->GetLanguage(EE_CHAR_LANGUAGE));
mpView->SetApplicationBackgroundColor(
Color(aColorConfig.GetColorValue(svtools::APPBACKGROUND).nColor));
+ mpPreviewDevice->SetBackground(Wallpaper(aPageBackgroundColor));
+ mpPreviewDevice->Erase();
bSuccess = true;
}
@@ -281,7 +318,9 @@ void PreviewRenderer::Cleanup (void)
-void PreviewRenderer::PaintPage (const SdPage* pPage)
+void PreviewRenderer::PaintPage (
+ const SdPage* pPage,
+ const bool bDisplayPresentationObjects)
{
// Paint the page.
Rectangle aPaintRectangle (Point(0,0), pPage->GetSize());
@@ -289,18 +328,22 @@ void PreviewRenderer::PaintPage (const SdPage* pPage)
// Turn off online spelling and redlining.
SdrOutliner* pOutliner = NULL;
- ULONG nOriginalControlWord = 0;
+ sal_uLong nSavedControlWord (0);
if (mpDocShellOfView!=NULL && mpDocShellOfView->GetDoc()!=NULL)
{
pOutliner = &mpDocShellOfView->GetDoc()->GetDrawOutliner();
- nOriginalControlWord = pOutliner->GetControlWord();
- pOutliner->SetControlWord(
- (nOriginalControlWord & ~EE_CNTRL_ONLINESPELLING));
+ nSavedControlWord = pOutliner->GetControlWord();
+ pOutliner->SetControlWord((nSavedControlWord & ~EE_CNTRL_ONLINESPELLING));
}
+ // Use a special redirector to prevent PresObj shapes from being painted.
+ boost::scoped_ptr<ViewRedirector> pRedirector;
+ if ( ! bDisplayPresentationObjects)
+ pRedirector.reset(new ViewRedirector());
+
try
{
- mpView->CompleteRedraw (mpPreviewDevice.get(), aRegion);
+ mpView->CompleteRedraw(mpPreviewDevice.get(), aRegion, pRedirector.get());
}
catch (const ::com::sun::star::uno::Exception&)
{
@@ -309,7 +352,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage)
// Restore the previous online spelling and redlining states.
if (pOutliner != NULL)
- pOutliner->SetControlWord(nOriginalControlWord);
+ pOutliner->SetControlWord(nSavedControlWord);
}
@@ -331,7 +374,7 @@ void PreviewRenderer::PaintSubstitutionText (const String& rSubstitutionText)
Point(0,0),
mpPreviewDevice->PixelToLogic(
mpPreviewDevice->GetOutputSizePixel()));
- USHORT nTextStyle =
+ sal_uInt16 nTextStyle =
TEXT_DRAW_CENTER
| TEXT_DRAW_VCENTER
| TEXT_DRAW_MULTILINE
@@ -354,11 +397,11 @@ void PreviewRenderer::PaintFrame (void)
Rectangle aPaintRectangle (
Point(0,0),
mpPreviewDevice->GetOutputSizePixel());
- mpPreviewDevice->EnableMapMode(FALSE);
+ mpPreviewDevice->EnableMapMode(sal_False);
mpPreviewDevice->SetLineColor(maFrameColor);
mpPreviewDevice->SetFillColor();
mpPreviewDevice->DrawRect(aPaintRectangle);
- mpPreviewDevice->EnableMapMode(TRUE);
+ mpPreviewDevice->EnableMapMode(sal_True);
}
}
@@ -372,23 +415,26 @@ void PreviewRenderer::SetupOutputSize (
// First set the map mode to some arbitrary scale that is numerically
// stable.
MapMode aMapMode (mpPreviewDevice->GetMapMode());
- aMapMode.SetMapUnit(MAP_100TH_MM);
- double nInitialScale = 1;
- aMapMode.SetScaleX (Fraction(nInitialScale));
- aMapMode.SetScaleY (Fraction(nInitialScale));
- aMapMode.SetOrigin (Point(0,0));
+ aMapMode.SetMapUnit(MAP_PIXEL);
// Adapt it to the desired width.
const Size aPageModelSize (rPage.GetSize());
- const Size aOutputSize = mpPreviewDevice->LogicToPixel(rPage.GetSize(), aMapMode);
- const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
- const double nFinalScale (nInitialScale * (rFramePixelSize.Width()-2*nFrameWidth)
- / aOutputSize.Width());
- aMapMode.SetScaleX (nFinalScale);
- aMapMode.SetScaleY (nFinalScale);
- aMapMode.SetOrigin (mpPreviewDevice->PixelToLogic(
- Point(nFrameWidth,nFrameWidth),aMapMode));
-
+ if (aPageModelSize.Width()>0 || aPageModelSize.Height()>0)
+ {
+ const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
+ aMapMode.SetScaleX(
+ Fraction(rFramePixelSize.Width()-2*nFrameWidth-1, aPageModelSize.Width()));
+ aMapMode.SetScaleY(
+ Fraction(rFramePixelSize.Height()-2*nFrameWidth-1, aPageModelSize.Height()));
+ aMapMode.SetOrigin(mpPreviewDevice->PixelToLogic(Point(nFrameWidth,nFrameWidth),aMapMode));
+ }
+ else
+ {
+ // We should never get here.
+ OSL_ASSERT(false);
+ aMapMode.SetScaleX(1.0);
+ aMapMode.SetScaleY(1.0);
+ }
mpPreviewDevice->SetMapMode (aMapMode);
mpPreviewDevice->SetOutputSizePixel(rFramePixelSize);
}
@@ -415,10 +461,17 @@ void PreviewRenderer::ProvideView (DrawDocShell* pDocShell)
{
mpView.reset (new DrawView (pDocShell, mpPreviewDevice.get(), NULL));
}
- mpView->SetPreviewRenderer( sal_True );
- mpView->SetBordVisible(FALSE);
- mpView->SetPageBorderVisible(FALSE);
- mpView->SetPageVisible(TRUE);
+ mpView->SetPreviewRenderer(true);
+#if 1
+ mpView->SetPageVisible(false);
+ mpView->SetPageBorderVisible(true);
+ mpView->SetBordVisible(false);
+#else
+ // This works in the slide sorter but prevents the master page
+ // background being painted in the list of current master pages in the
+ // task manager.
+ mpView->SetPagePaintingAllowed(false);
+#endif
}
@@ -500,6 +553,58 @@ void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
+
+//===== ViewRedirector ========================================================
+
+namespace {
+
+ViewRedirector::ViewRedirector (void)
+{
+}
+
+
+
+
+ViewRedirector::~ViewRedirector (void)
+{
+}
+
+
+
+
+drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedPrimitive2DSequence(
+ const sdr::contact::ViewObjectContact& rOriginal,
+ const sdr::contact::DisplayInfo& rDisplayInfo)
+{
+ SdrObject* pObject = rOriginal.GetViewContact().TryToGetSdrObject();
+
+ if (pObject==NULL || pObject->GetPage() == NULL)
+ {
+ // not a SdrObject visualisation (maybe e.g. page) or no page
+ return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+ rOriginal,
+ rDisplayInfo);
+ }
+
+ const bool bDoCreateGeometry (pObject->GetPage()->checkVisibility( rOriginal, rDisplayInfo, true));
+
+ if ( ! bDoCreateGeometry
+ && (pObject->GetObjInventor() != SdrInventor || pObject->GetObjIdentifier() != OBJ_PAGE))
+ {
+ return drawinglayer::primitive2d::Primitive2DSequence();
+ }
+
+ if (pObject->IsEmptyPresObj())
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
+ return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
+ rOriginal,
+ rDisplayInfo);
+}
+
+} // end of anonymous namespace
+
+
} // end of namespace ::sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 9f2ec7e3964b..89108df710d1 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -814,14 +814,16 @@ sal_Bool DrawController::convertFastPropertyValue (
else if (mxSubController.is())
{
rConvertedValue = rValue;
- rOldValue = mxSubController->getFastPropertyValue(nHandle);
- bResult = (rOldValue != rConvertedValue);
- /* bResult = mpSubController->convertFastPropertyValue(
- rConvertedValue,
- rOldValue,
- nHandle,
- rValue);
- */
+ try
+ {
+ rOldValue = mxSubController->getFastPropertyValue(nHandle);
+ bResult = (rOldValue != rConvertedValue);
+ }
+ catch(beans::UnknownPropertyException aException)
+ {
+ // The prperty is unknown and thus an illegal argument to this method.
+ throw com::sun::star::lang::IllegalArgumentException();
+ }
}
return bResult;
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index d711b5a497aa..6c68569c3d2d 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -144,7 +144,7 @@ Reference<drawing::XLayer> SdUnoDrawView::getActiveLayer (void) throw ()
// From the model get the current SdrLayer object via the layer admin.
SdrLayerAdmin& rLayerAdmin = pSdModel->GetLayerAdmin ();
- SdrLayer* pLayer = rLayerAdmin.GetLayer (mrView.GetActiveLayer(), TRUE);
+ SdrLayer* pLayer = rLayerAdmin.GetLayer (mrView.GetActiveLayer(), sal_True);
if (pLayer == NULL)
break;
diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx
index f55db2e12f90..3e4866dc9b03 100644
--- a/sd/source/ui/unoidl/SdUnoSlideView.cxx
+++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx
@@ -36,7 +36,7 @@
#include "SlideSorter.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
-#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
@@ -105,7 +105,6 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection)
}
}
}
- rSlideSorterController.GetSelectionManager()->MakeSelectionVisible();
return bOk;
}
@@ -162,19 +161,30 @@ void SAL_CALL SdUnoSlideView::removeSelectionChangeListener (
//----- XDrawView -------------------------------------------------------------
void SAL_CALL SdUnoSlideView::setCurrentPage (
- const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& )
- throw(::com::sun::star::uno::RuntimeException)
+ const css::uno::Reference<css::drawing::XDrawPage>& rxDrawPage)
+ throw(css::uno::RuntimeException)
{
+ Reference<beans::XPropertySet> xProperties (rxDrawPage, UNO_QUERY);
+ if (xProperties.is())
+ {
+ sal_uInt16 nPageNumber(0);
+ if (xProperties->getPropertyValue(::rtl::OUString::createFromAscii("Number")) >>= nPageNumber)
+ {
+ mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(
+ nPageNumber-1,
+ true);
+ }
+ }
}
-::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
+css::uno::Reference<css::drawing::XDrawPage > SAL_CALL
SdUnoSlideView::getCurrentPage (void)
- throw(::com::sun::star::uno::RuntimeException)
+ throw(css::uno::RuntimeException)
{
- return Reference<drawing::XDrawPage>();
+ return mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage();
}
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 72bd79398488..a5c9680f2f6e 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -245,11 +245,11 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
SdOptionsPrintItem aOptionsPrintItem( ATTR_OPTIONS_PRINT );
- SfxPrinter* pPrinter = pDocSh->GetPrinter( FALSE );
+ SfxPrinter* pPrinter = pDocSh->GetPrinter( sal_False );
if( pPrinter )
{
SdOptionsPrintItem* pPrinterOptions = NULL;
- if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, FALSE, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET)
+ if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, sal_False, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET)
aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint();
}
else
@@ -466,7 +466,7 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
{
if( static_cast<sal_Int16>( aPrintOpts.GetHandoutPages() ) != nValue )
{
- aPrintOpts.SetHandoutPages( static_cast< UINT16 >( nValue ) );
+ aPrintOpts.SetHandoutPages( static_cast< sal_uInt16 >( nValue ) );
bOptionsChanged = true;
}
bOk = sal_True;
@@ -731,16 +731,16 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
pDoc->SetSummationOfParagraphs( bIsSummationOfParagraphs );
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
nCntrl = rOutl.GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
rOutl.SetControlWord( nCntrl | nSum );
- ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE );
+ ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
{
nCntrl = pOutl->GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
pOutl->SetControlWord( nCntrl | nSum );
}
- pOutl = pDocument->GetInternalOutliner( FALSE );
+ pOutl = pDocument->GetInternalOutliner( sal_False );
if( pOutl )
{
nCntrl = pOutl->GetControlWord() &~ EE_CNTRL_ULSPACESUMMATION;
@@ -758,19 +758,19 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
{
bOk = sal_True;
- pDoc->SetCharCompressType( (UINT16)nCharCompressType );
+ pDoc->SetCharCompressType( (sal_uInt16)nCharCompressType );
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE );
- rOutl.SetAsianCompressionMode( (UINT16)nCharCompressType );
- ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
+ rOutl.SetAsianCompressionMode( (sal_uInt16)nCharCompressType );
+ ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
{
- pOutl->SetAsianCompressionMode( (UINT16)nCharCompressType );
+ pOutl->SetAsianCompressionMode( (sal_uInt16)nCharCompressType );
}
- pOutl = pDocument->GetInternalOutliner( FALSE );
+ pOutl = pDocument->GetInternalOutliner( sal_False );
if( pOutl )
{
- pOutl->SetAsianCompressionMode( (UINT16)nCharCompressType );
+ pOutl->SetAsianCompressionMode( (sal_uInt16)nCharCompressType );
}
}
break;
@@ -785,14 +785,14 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
pDoc->SetKernAsianPunctuation( bAsianPunct );
SdDrawDocument* pDocument = pDocSh->GetDoc();
- SdrOutliner& rOutl = pDocument->GetDrawOutliner( FALSE );
+ SdrOutliner& rOutl = pDocument->GetDrawOutliner( sal_False );
rOutl.SetKernAsianPunctuation( bAsianPunct );
- ::sd::Outliner* pOutl = pDocument->GetOutliner( FALSE );
+ ::sd::Outliner* pOutl = pDocument->GetOutliner( sal_False );
if( pOutl )
{
pOutl->SetKernAsianPunctuation( bAsianPunct );
}
- pOutl = pDocument->GetInternalOutliner( FALSE );
+ pOutl = pDocument->GetInternalOutliner( sal_False );
if( pOutl )
{
pOutl->SetKernAsianPunctuation( bAsianPunct );
@@ -867,7 +867,7 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
if( bOptionsChanged )
{
if( !pPrinter )
- pPrinter = pDocSh->GetPrinter( TRUE );
+ pPrinter = pDocSh->GetPrinter( sal_True );
SfxItemSet aNewOptions( pPrinter->GetOptions() );
aNewOptions.Put( aOptionsPrintItem );
pPrinter->SetOptions( aNewOptions );
@@ -888,11 +888,11 @@ void DocumentSettings::_getPropertyValues( const PropertyMapEntry** ppEntries, A
SdOptionsPrintItem aOptionsPrintItem( ATTR_OPTIONS_PRINT );
- SfxPrinter* pPrinter = pDocSh->GetPrinter( FALSE );
+ SfxPrinter* pPrinter = pDocSh->GetPrinter( sal_False );
if( pPrinter )
{
SdOptionsPrintItem* pPrinterOptions = NULL;
- if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, FALSE, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET)
+ if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, sal_False, (const SfxPoolItem**) &pPrinterOptions) == SFX_ITEM_SET)
aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint();
}
else
diff --git a/sd/source/ui/unoidl/detreg.cxx b/sd/source/ui/unoidl/detreg.cxx
index 05f8862b1162..2cf653f3f3df 100644..100755
--- a/sd/source/ui/unoidl/detreg.cxx
+++ b/sd/source/ui/unoidl/detreg.cxx
@@ -49,30 +49,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void* ,
- void* pRegistryKey )
-{
- Reference< ::registry::XRegistryKey >
- xKey( reinterpret_cast< ::registry::XRegistryKey* >( pRegistryKey ) ) ;
-
- ::rtl::OUString aDelimiter( RTL_CONSTASCII_USTRINGPARAM("/") );
- ::rtl::OUString aUnoServices( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") );
-
- // Eigentliche Implementierung und ihre Services registrieren
- sal_Int32 i;
- Reference< ::registry::XRegistryKey > xNewKey;
-
- xNewKey = xKey->createKey( aDelimiter + SdFilterDetect::impl_getStaticImplementationName() +
- aUnoServices );
-
- Sequence< ::rtl::OUString > aServices = SdFilterDetect::impl_getStaticSupportedServiceNames();
- for(i = 0; i < aServices.getLength(); i++ )
- xNewKey->createKey( aServices.getConstArray()[i] );
-
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index 254f8eaceb99..709b1a5f00ca 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -304,115 +304,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-static void SAL_CALL writeInfo(
- registry::XRegistryKey * pRegistryKey,
- const OUString & rImplementationName,
- const uno::Sequence< OUString > & rServices )
-{
- uno::Reference< registry::XRegistryKey > xNewKey(
- pRegistryKey->createKey(
- OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + rImplementationName + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ) );
-
- for( sal_Int32 i = 0; i < rServices.getLength(); i++ )
- xNewKey->createKey( rServices.getConstArray()[i]);
-}
-
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
- void * ,
- void * pRegistryKey )
-{
- if( pRegistryKey )
- {
- try
- {
- registry::XRegistryKey *pKey = reinterpret_cast< registry::XRegistryKey * >( pRegistryKey );
-
- writeInfo( pKey, SdHtmlOptionsDialog_getImplementationName(), SdHtmlOptionsDialog_getSupportedServiceNames() );
- writeInfo( pKey, SdDrawingDocument_getImplementationName(), SdDrawingDocument_getSupportedServiceNames() );
- writeInfo( pKey, SdPresentationDocument_getImplementationName(), SdPresentationDocument_getSupportedServiceNames() );
- writeInfo( pKey, SdUnoModule_getImplementationName(), SdUnoModule_getSupportedServiceNames() );
- writeInfo( pKey, sd::RandomNode__getImplementationName(), sd::RandomNode_getSupportedServiceNames() );
- writeInfo(
- pKey,
- sd::framework::Configuration_getImplementationName(),
- sd::framework::Configuration_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::ConfigurationController_getImplementationName(),
- sd::framework::ConfigurationController_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::ModuleController_getImplementationName(),
- sd::framework::ModuleController_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::BasicPaneFactory_getImplementationName(),
- sd::framework::BasicPaneFactory_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::BasicToolBarFactory_getImplementationName(),
- sd::framework::BasicToolBarFactory_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::BasicViewFactory_getImplementationName(),
- sd::framework::BasicViewFactory_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::TaskPanelFactory_getImplementationName(),
- sd::framework::TaskPanelFactory_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::toolpanel::ToolPanelFactory_getImplementationName(),
- sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::ResourceId_getImplementationName(),
- sd::framework::ResourceId_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::framework::PresentationFactoryProvider_getImplementationName(),
- sd::framework::PresentationFactoryProvider_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::presenter::SlideRenderer_getImplementationName(),
- sd::presenter::SlideRenderer_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::presenter::PresenterCanvas_getImplementationName(),
- sd::presenter::PresenterCanvas_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::presenter::PresenterTextViewService_getImplementationName(),
- sd::presenter::PresenterTextViewService_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::presenter::PresenterHelperService_getImplementationName(),
- sd::presenter::PresenterHelperService_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::presenter::PresenterPreviewCache_getImplementationName(),
- sd::presenter::PresenterPreviewCache_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::slidesorter::SlideSorterService_getImplementationName(),
- sd::slidesorter::SlideSorterService_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::SlideLayoutController_getImplementationName(),
- sd::SlideLayoutController_getSupportedServiceNames());
- writeInfo(
- pKey,
- sd::InsertSlideController_getImplementationName(),
- sd::InsertSlideController_getSupportedServiceNames());
- }
- catch (registry::InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_True;
-}
-
SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName,
void * pServiceManager,
diff --git a/sd/source/ui/unoidl/sddetect.cxx b/sd/source/ui/unoidl/sddetect.cxx
index dcc3e57b31a8..b3b149c666f7 100644
--- a/sd/source/ui/unoidl/sddetect.cxx
+++ b/sd/source/ui/unoidl/sddetect.cxx
@@ -176,7 +176,7 @@ SdFilterDetect::~SdFilterDetect()
SfxApplication* pApp = SFX_APP();
SfxAllItemSet *pSet = new SfxAllItemSet( pApp->GetPool() );
TransformParameters( SID_OPENDOC, lDescriptor, *pSet );
- SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE );
+ SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False );
bWasReadOnly = pItem && pItem->GetValue();
@@ -204,8 +204,8 @@ SdFilterDetect::~SdFilterDetect()
else
{
// ctor of SfxMedium uses owner transition of ItemSet
- SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet );
- aMedium.UseInteractionHandler( TRUE );
+ SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet );
+ aMedium.UseInteractionHandler( sal_True );
if ( aPreselectedFilterName.Len() )
pFilter = SfxFilter::GetFilterByName( aPreselectedFilterName );
else if( aTypeName.Len() )
@@ -221,7 +221,7 @@ SdFilterDetect::~SdFilterDetect()
xStream = aMedium.GetInputStream();
xContent = aMedium.GetContent();
bReadOnly = aMedium.IsReadOnly();
- BOOL bIsStorage = aMedium.IsStorage();
+ sal_Bool bIsStorage = aMedium.IsStorage();
if (aMedium.GetError() == SVSTREAM_OK)
{
@@ -269,7 +269,7 @@ SdFilterDetect::~SdFilterDetect()
String sFilterName;
if ( pFilter )
sFilterName = pFilter->GetName();
- aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : FALSE, &sFilterName );
+ aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : sal_False, &sFilterName );
}
catch( lang::WrappedTargetException& aWrap )
{
@@ -287,20 +287,16 @@ SdFilterDetect::~SdFilterDetect()
if ( !bRepairPackage )
{
// ask the user whether he wants to try to repair
- RequestPackageReparation* pRequest = new RequestPackageReparation( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pRequest );
-
- xInteraction->handle( xRequest );
-
- bRepairAllowed = pRequest->isApproved();
+ RequestPackageReparation aRequest( aDocumentTitle );
+ xInteraction->handle( aRequest.GetRequest() );
+ bRepairAllowed = aRequest.isApproved();
}
if ( !bRepairAllowed )
{
// repair either not allowed or not successful
- NotifyBrokenPackage* pNotifyRequest = new NotifyBrokenPackage( aDocumentTitle );
- uno::Reference< task::XInteractionRequest > xRequest ( pNotifyRequest );
- xInteraction->handle( xRequest );
+ NotifyBrokenPackage aNotifyRequest( aDocumentTitle );
+ xInteraction->handle( aNotifyRequest.GetRequest() );
}
}
@@ -341,7 +337,7 @@ SdFilterDetect::~SdFilterDetect()
}
else
{
- SotStorageRef aStorage = new SotStorage ( pStm, FALSE );
+ SotStorageRef aStorage = new SotStorage ( pStm, sal_False );
if ( !aStorage->GetError() )
{
String aStreamName = UniString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "PowerPoint Document" ) );
@@ -366,7 +362,7 @@ SdFilterDetect::~SdFilterDetect()
const String aFileName( aMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
GraphicDescriptor aDesc( *pStm, &aFileName );
GraphicFilter* pGrfFilter = GraphicFilter::GetGraphicFilter();
- if( !aDesc.Detect( FALSE ) )
+ if( !aDesc.Detect( sal_False ) )
{
pFilter = 0;
if( SvtModuleOptions().IsImpress() )
diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx
index 8c3b5a68924d..9841bc014542 100644
--- a/sd/source/ui/unoidl/unocpres.hxx
+++ b/sd/source/ui/unoidl/unocpres.hxx
@@ -59,7 +59,7 @@ private:
// for xComponent
::osl::Mutex aDisposeContainerMutex;
::cppu::OInterfaceContainerHelper aDisposeListeners;
- BOOL bDisposing;
+ sal_Bool bDisposing;
public:
SdXCustomPresentation() throw();
diff --git a/sd/source/ui/unoidl/unodoc.cxx b/sd/source/ui/unoidl/unodoc.cxx
index dd2102ffb2cf..b3b69e8b8f24 100644..100755
--- a/sd/source/ui/unoidl/unodoc.cxx
+++ b/sd/source/ui/unoidl/unodoc.cxx
@@ -69,7 +69,7 @@ uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance(
SfxObjectShell* pShell =
new ::sd::GraphicDocShell(
- _nCreationFlags, FALSE, DOCUMENT_TYPE_DRAW );
+ _nCreationFlags, sal_False, DOCUMENT_TYPE_DRAW );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
@@ -98,7 +98,7 @@ uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance
SfxObjectShell* pShell =
new ::sd::DrawDocShell(
- _nCreationFlags, FALSE, DOCUMENT_TYPE_IMPRESS );
+ _nCreationFlags, sal_False, DOCUMENT_TYPE_IMPRESS );
return uno::Reference< uno::XInterface >( pShell->GetModel() );
}
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 0eff267a13aa..bbbfc8c14c55 100644..100755
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -559,7 +559,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::insertNewByIndex( sal
SdrLayerAdmin& rLA=mpModel->mpDoc->GetLayerAdmin();
const sal_Int32 nMax=rLA.GetLayerCount();
if (nIndex>nMax) nIndex=nMax;
- xLayer = GetLayer (rLA.NewLayer(aLayerName,(USHORT)nIndex));
+ xLayer = GetLayer (rLA.NewLayer(aLayerName,(sal_uInt16)nIndex));
mpModel->SetModified();
}
return xLayer;
@@ -682,7 +682,7 @@ uno::Any SAL_CALL SdLayerManager::getByName( const OUString& aName )
throw lang::DisposedException();
SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin();
- SdrLayer* pLayer = rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), FALSE );
+ SdrLayer* pLayer = rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), sal_False );
if( pLayer == NULL )
throw container::NoSuchElementException();
@@ -724,7 +724,7 @@ sal_Bool SAL_CALL SdLayerManager::hasByName( const OUString& aName ) throw(uno::
SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin();
- return NULL != rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), FALSE );
+ return NULL != rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), sal_False );
}
// XElementAccess
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 1a41057c6434..a85b486a6780 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -466,8 +466,8 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, sal_Bool bDuplicate
{
sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SdPage* pStandardPage = NULL;
@@ -1543,8 +1543,8 @@ sal_Int32 ImplPDFGetBookmarkPage( const String& rBookmark, SdDrawDocument& rDoc
aBookmark = rBookmark.Copy( 1 );
// is the bookmark a page ?
- BOOL bIsMasterPage;
- USHORT nPgNum = rDoc.GetPageByName( aBookmark, bIsMasterPage );
+ sal_Bool bIsMasterPage;
+ sal_uInt16 nPgNum = rDoc.GetPageByName( aBookmark, bIsMasterPage );
SdrObject* pObj = NULL;
if ( nPgNum == SDRPAGE_NOTFOUND )
@@ -1855,7 +1855,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() );
::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
- Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (USHORT)nPageNumber - 1, ePageKind )->GetSize() );
+ Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
Region aRegion( aVisArea );
Point aOrigin;
@@ -1881,7 +1881,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
if( xModel == mpDocShell->GetModel() )
{
- pView->ShowSdrPage( mpDoc->GetSdPage( (USHORT)nPageNumber - 1, ePageKind ));
+ pView->ShowSdrPage( mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind ));
SdrPageView* pPV = pView->GetSdrPageView();
if( pOldSdView )
@@ -2081,7 +2081,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
rBookmarks.clear();
//---> #i56629, #i40318
//get the page name, will be used as outline element in PDF bookmark pane
- String aPageName = mpDoc->GetSdPage( (USHORT)nPageNumber - 1 , PK_STANDARD )->GetName();
+ String aPageName = mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1 , PK_STANDARD )->GetName();
if( aPageName.Len() > 0 )
{
// insert the bookmark to this page into the NamedDestinations
@@ -2658,7 +2658,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
bUnique = sal_True;
for( sal_Int32 nMaster = 1; nMaster < nMPageCount; nMaster++ )
{
- SdPage* pPage = (SdPage*)mpDoc->GetMasterPage((USHORT)nMaster);
+ SdPage* pPage = (SdPage*)mpDoc->GetMasterPage((sal_uInt16)nMaster);
if( pPage && pPage->GetName() == aPrefix )
{
bUnique = sal_False;
@@ -2695,7 +2695,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
pPage->GetRgtBorder(),
pPage->GetLwrBorder() );
pMPage->SetLayoutName( aLayoutName );
- mpDoc->InsertMasterPage(pMPage, (USHORT)nInsertPos);
+ mpDoc->InsertMasterPage(pMPage, (sal_uInt16)nInsertPos);
{
// ensure default MasterPage fill
@@ -2713,7 +2713,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
pRefNotesPage->GetRgtBorder(),
pRefNotesPage->GetLwrBorder() );
pMNotesPage->SetLayoutName( aLayoutName );
- mpDoc->InsertMasterPage(pMNotesPage, (USHORT)nInsertPos + 1);
+ mpDoc->InsertMasterPage(pMNotesPage, (sal_uInt16)nInsertPos + 1);
pMNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, sal_True, sal_True);
mpModel->SetModified();
}
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index e904098fa1fa..ebb75d0043e4 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -609,7 +609,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
if(!(aValue >>= nVerb))
throw lang::IllegalArgumentException();
- pInfo->mnVerb = (USHORT)nVerb;
+ pInfo->mnVerb = (sal_uInt16)nVerb;
break;
}
case WID_DIMCOLOR:
@@ -789,7 +789,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName,
{
SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL;
// is the bookmark a page?
- BOOL bIsMasterPage;
+ sal_Bool bIsMasterPage;
if(pDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage ) != SDRPAGE_NOTFOUND)
{
aString = SdDrawPage::getPageApiNameFromUiName( pInfo->GetBookmark() );
@@ -1421,7 +1421,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
case presentation::ClickAction_VERB:
if( nFound & FOUND_VERB )
{
- pInfo->mnVerb = (USHORT)nVerb;
+ pInfo->mnVerb = (sal_uInt16)nVerb;
bOk = sal_True;
}
break;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 096af6d322c9..879128104a5c 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -534,7 +534,7 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
}
else
{
- pPresObj = GetPage()->CreatePresObj( eObjKind, FALSE, aRect, sal_True );
+ pPresObj = GetPage()->CreatePresObj( eObjKind, sal_False, aRect, sal_True );
}
if( pPresObj )
@@ -669,7 +669,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -712,7 +712,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
sal_Bool bVisible = sal_False;
if( ! ( aValue >>= bVisible ) )
throw lang::IllegalArgumentException();
- GetPage()->SetExcluded( bVisible == FALSE );
+ GetPage()->SetExcluded( bVisible == sal_False );
break;
}
case WID_PAGE_SOUNDFILE :
@@ -768,7 +768,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
{
SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE), bVisible);
+ aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False), bVisible);
pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
}
}
@@ -788,7 +788,7 @@ void SAL_CALL SdGenericDrawPage::setPropertyValue( const OUString& aPropertyName
{
SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE), bVisible);
+ aVisibleLayers.Set(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False), bVisible);
pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
}
}
@@ -1094,7 +1094,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
{
Point aPoint;
Size aSize( GetPage()->GetSize() );
- pMetaFile->AddAction( (MetaAction*) new MetaFillColorAction( COL_WHITE, TRUE ), 0 );
+ pMetaFile->AddAction( (MetaAction*) new MetaFillColorAction( COL_WHITE, sal_True ), 0 );
pMetaFile->AddAction( (MetaAction*) new MetaRectAction( Rectangle( aPoint, aSize ) ), 1 );
pMetaFile->SetPrefMapMode( MAP_100TH_MM );
pMetaFile->SetPrefSize( aSize );
@@ -1132,7 +1132,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
aBitmap ) )
{
SvMemoryStream aMemStream;
- aBitmap.GetBitmap().Write( aMemStream, FALSE, FALSE );
+ aBitmap.GetBitmap().Write( aMemStream, sal_False, sal_False );
uno::Sequence<sal_Int8> aSeq( (sal_Int8*)aMemStream.GetData(), aMemStream.Tell() );
aAny <<= aSeq;
}
@@ -1143,7 +1143,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
case WID_PAGE_VISIBLE :
{
- sal_Bool bVisible = GetPage()->IsExcluded() == FALSE;
+ sal_Bool bVisible = GetPage()->IsExcluded() == sal_False;
aAny <<= Any( &bVisible, ::getBooleanCppuType() );
break;
}
@@ -1184,7 +1184,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
{
SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE));
+ aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False));
}
else
{
@@ -1203,7 +1203,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
{
SdrLayerAdmin& rLayerAdmin = pDoc->GetLayerAdmin();
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
- aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
+ aAny <<= (sal_Bool)aVisibleLayers.IsSet(rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False));
}
else
{
@@ -1671,7 +1671,7 @@ void SdGenericDrawPage::SetLftBorder( sal_Int32 nValue )
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -1695,7 +1695,7 @@ void SdGenericDrawPage::SetRgtBorder( sal_Int32 nValue )
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -1719,7 +1719,7 @@ void SdGenericDrawPage::SetUppBorder( sal_Int32 nValue )
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -1743,7 +1743,7 @@ void SdGenericDrawPage::SetLwrBorder( sal_Int32 nValue )
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -1781,7 +1781,7 @@ static void refreshpage( SdDrawDocument* pDoc, const PageKind ePageKind )
pDoc->SetMaxObjSize(aViewSize);
- pViewSh->InitWindows(aPageOrg, aViewSize, Point(-1, -1), TRUE);
+ pViewSh->InitWindows(aPageOrg, aViewSize, Point(-1, -1), sal_True);
pViewSh->UpdateScrollBars();
}
@@ -1798,7 +1798,7 @@ void SdGenericDrawPage::SetWidth( sal_Int32 nWidth )
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -1827,7 +1827,7 @@ void SdGenericDrawPage::SetHeight( sal_Int32 nHeight )
SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
const PageKind ePageKind = GetPage()->GetPageKind();
- USHORT i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = pDoc->GetMasterSdPageCount(ePageKind);
for (i = 0; i < nPageCnt; i++)
{
SdPage* pPage = pDoc->GetMasterSdPage(i, ePageKind);
@@ -2318,7 +2318,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
GetPage()->SetName( aName );
- USHORT nNotesPageNum = (GetPage()->GetPageNum()-1)>>1;
+ sal_uInt16 nNotesPageNum = (GetPage()->GetPageNum()-1)>>1;
if( GetModel()->GetDoc()->GetSdPageCount( PK_NOTES ) > nNotesPageNum )
{
SdPage* pNotesPage = GetModel()->GetDoc()->GetSdPage( nNotesPageNum, PK_NOTES );
@@ -2337,7 +2337,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
EditMode eMode = pDrawViewSh->GetEditMode();
if( eMode == EM_PAGE )
{
- BOOL bLayer = pDrawViewSh->IsLayerModeActive();
+ sal_Bool bLayer = pDrawViewSh->IsLayerModeActive();
pDrawViewSh->ChangeEditMode( eMode, !bLayer );
pDrawViewSh->ChangeEditMode( eMode, bLayer );
@@ -3061,7 +3061,7 @@ void SAL_CALL SdMasterPage::setName( const OUString& aName )
EditMode eMode = pDrawViewSh->GetEditMode();
if( eMode == EM_MASTERPAGE )
{
- BOOL bLayer = pDrawViewSh->IsLayerModeActive();
+ sal_Bool bLayer = pDrawViewSh->IsLayerModeActive();
pDrawViewSh->ChangeEditMode( eMode, !bLayer );
pDrawViewSh->ChangeEditMode( eMode, bLayer );
diff --git a/sd/source/ui/unoidl/unopool.cxx b/sd/source/ui/unoidl/unopool.cxx
index 0d53ab9bd3c1..8e216f9acdf4 100644..100755
--- a/sd/source/ui/unoidl/unopool.cxx
+++ b/sd/source/ui/unoidl/unopool.cxx
@@ -88,7 +88,7 @@ void SdUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEnt
if( rValue >>= aLocale )
mpDrawModel->SetLanguage(
SdUnoGetLanguage( aLocale ),
- (const USHORT)pEntry->mnHandle );
+ (const sal_uInt16)pEntry->mnHandle );
}
}
SvxUnoDrawPool::putAny( pPool, pEntry, rValue );
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 283b2b30468e..cb895b16b1f7 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -615,8 +615,8 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( uno::Refere
{
if( nStartPos <= nTextLen && nEndPos <= nTextLen )
{
- ESelection aSelection( (USHORT)pConvertPara[nStartPos], (USHORT)pConvertPos[nStartPos],
- (USHORT)pConvertPara[nEndPos], (USHORT)pConvertPos[nEndPos] );
+ ESelection aSelection( (sal_uInt16)pConvertPara[nStartPos], (sal_uInt16)pConvertPos[nStartPos],
+ (sal_uInt16)pConvertPara[nEndPos], (sal_uInt16)pConvertPos[nEndPos] );
SvxUnoTextRange *pRange;
SvxUnoTextBase* pParent = SvxUnoTextBase::getImplementation( xParent );
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index c321bd4de391..3ccbf373dc7e 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -154,7 +154,7 @@ namespace {
return GetBoolValue("PageContentType", sal_Int32(3));
}
- ULONG GetOutputQuality (void) const
+ sal_uLong GetOutputQuality (void) const
{
sal_Int32 nQuality = static_cast<sal_Int32>(mrProperties.getIntValue( "Quality", sal_Int32(0) ));
return nQuality;
@@ -328,7 +328,7 @@ namespace {
{}
const Printer* mpPrinter;
- ULONG mnDrawMode;
+ sal_uLong mnDrawMode;
::rtl::OUString msTimeDate;
::rtl::OUString msPageString;
Size maPrintSize;
@@ -437,9 +437,10 @@ namespace {
aOpt.GetModuleName( mbImpress ? SvtModuleOptions::E_SIMPRESS : SvtModuleOptions::E_SDRAW ) );
AddDialogControl( vcl::PrinterOptionsHelper::getGroupControlOpt(
aAppGroupname,
- rtl::OUString()
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) )
) );
+ uno::Sequence< rtl::OUString > aHelpIds;
if( mbImpress )
{
vcl::PrinterOptionsHelper::UIControlOptions aPrintOpt;
@@ -450,9 +451,11 @@ namespace {
aPrintOpt )
);
+ aHelpIds.realloc( 1 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageContentType:ListBox" ) );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
String( SdResId( _STR_IMPRESS_PRINT_UI_CONTENT ) ),
- CreateChoice(_STR_IMPRESS_PRINT_UI_CONTENT_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "PageContentType" ) ),
CreateChoice(_STR_IMPRESS_PRINT_UI_CONTENT_CHOICES),
0,
@@ -460,28 +463,32 @@ namespace {
)
);
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:SlidesPerPage:ListBox" ) );
vcl::PrinterOptionsHelper::UIControlOptions
aContentOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PageContentType" ) ), 1 );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
String( SdResId( _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE ) ),
- CreateChoice(_STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPage" ) ),
GetSlidesPerPageSequence(),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ Sequence< sal_Bool >(),
aContentOpt
)
);
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:SlidesPerPageOrder:ListBox" ) );
vcl::PrinterOptionsHelper::UIControlOptions
aSlidesPerPageOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPage" ) ), -1, sal_True );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
String( SdResId( _STR_IMPRESS_PRINT_UI_ORDER ) ),
- CreateChoice(_STR_IMPRESS_PRINT_UI_ORDER_CHOICES_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "SlidesPerPageOrder" ) ),
CreateChoice(_STR_IMPRESS_PRINT_UI_ORDER_CHOICES),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ Sequence< sal_Bool >(),
aSlidesPerPageOpt )
);
}
@@ -494,7 +501,7 @@ namespace {
{
AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_NAME) ),
- String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_NAME_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintName" ) ),
sal_False
)
@@ -504,7 +511,7 @@ namespace {
{
AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
String( SdResId(_STR_DRAW_PRINT_UI_IS_PRINT_NAME) ),
- String( SdResId(_STR_DRAW_PRINT_UI_IS_PRINT_NAME_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintName" ) ),
sal_False
)
@@ -513,7 +520,7 @@ namespace {
AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_DATE) ),
- String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_DATE_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintDateTime" ) ),
sal_False
)
@@ -523,7 +530,7 @@ namespace {
{
AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN) ),
- String( SdResId(_STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN_HELP) ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrintHidden" ) ),
sal_False
)
@@ -533,9 +540,13 @@ namespace {
AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_QUALITY) ), rtl::OUString() ) );
+ aHelpIds.realloc( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Quality:RadioButton:0" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Quality:RadioButton:1" ) );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Quality:RadioButton:2" ) );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
rtl::OUString(),
- CreateChoice(_STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "Quality" ) ),
CreateChoice(_STR_IMPRESS_PRINT_UI_QUALITY_CHOICES),
0
@@ -545,6 +556,11 @@ namespace {
AddDialogControl( vcl::PrinterOptionsHelper::getSubgroupControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS) ), rtl::OUString() ) );
+ aHelpIds.realloc( 4 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:0" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:1" ) );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:2" ) );
+ aHelpIds[3] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageOptions:RadioButton:3" ) );
if( mbImpress )
{
// FIXME: additional dependency on PrintProspect = false
@@ -552,11 +568,12 @@ namespace {
aPageOptionsOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PageContentType" ) ), 0 );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
rtl::OUString(),
- CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "PageOptions" ) ),
CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ Sequence< sal_Bool >(),
aPageOptionsOpt
)
);
@@ -567,11 +584,12 @@ namespace {
aPageOptionsOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), sal_False );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
rtl::OUString(),
- CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "PageOptions" ) ),
CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "Radio" ) ),
+ Sequence< sal_Bool >(),
aPageOptionsOpt
)
);
@@ -586,7 +604,7 @@ namespace {
// brochure printing
AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE) ),
- String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE_HELP) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ),
sal_False,
aBrochureOpt
@@ -596,13 +614,16 @@ namespace {
vcl::PrinterOptionsHelper::UIControlOptions
aIncludeOpt( OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspect" ) ), -1, sal_False );
aIncludeOpt.maGroupHint = OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutPage" ) );
+ aHelpIds.realloc( 1 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintProspectInclude:ListBox" ) );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE) ),
- CreateChoice(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST_HELP),
+ aHelpIds,
OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintProspectInclude" ) ),
CreateChoice(_STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST),
0,
OUString( RTL_CONSTASCII_USTRINGPARAM( "List" ) ),
+ Sequence< sal_Bool >(),
aIncludeOpt
)
);
@@ -612,7 +633,7 @@ namespace {
aPaperTrayOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OptionsPageOptGroup" ) );
AddDialogControl( vcl::PrinterOptionsHelper::getBoolControlOpt(
String( SdResId(_STR_IMPRESS_PRINT_UI_PAPER_TRAY) ),
- String( SdResId(_STR_IMPRESS_PRINT_UI_PAPER_TRAY_HELP) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" ) ),
OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintPaperFromSetup" ) ),
sal_False,
aPaperTrayOpt
@@ -630,8 +651,12 @@ namespace {
// create a choice for the content to create
rtl::OUString aPrintRangeName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
+ aHelpIds.realloc( 3 );
+ aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
+ aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
+ aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" ) );
AddDialogControl( vcl::PrinterOptionsHelper::getChoiceControlOpt( rtl::OUString(),
- CreateChoice(_STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE_HELP),
+ aHelpIds,
aPrintRangeName,
CreateChoice(mbImpress
? _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE
@@ -641,7 +666,7 @@ namespace {
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True );
AddDialogControl( vcl::PrinterOptionsHelper::getEditControlOpt( rtl::OUString(),
- rtl::OUString(),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PageRange:Edit" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),
rtl::OUString(),
aPageRangeOpt )
@@ -657,7 +682,7 @@ namespace {
maProperties.push_back( aVal );
}
- Sequence<rtl::OUString> CreateChoice (const USHORT nResourceId) const
+ Sequence<rtl::OUString> CreateChoice (const sal_uInt16 nResourceId) const
{
SdResId aResourceId (nResourceId);
ResStringArray aChoiceStrings (aResourceId);
@@ -705,9 +730,9 @@ namespace {
const bool bPrintMarkedOnly,
const ::rtl::OUString& rsPageString,
const Point& rPageStringOffset,
- const ULONG nDrawMode,
+ const sal_uLong nDrawMode,
const Orientation eOrientation,
- const USHORT nPaperTray)
+ const sal_uInt16 nPaperTray)
: mePageKind(ePageKind),
maMap(rMapMode),
mbPrintMarkedOnly(bPrintMarkedOnly),
@@ -730,9 +755,9 @@ namespace {
const SetOfByte& rVisibleLayers,
const SetOfByte& rPrintableLayers) const = 0;
- ULONG GetDrawMode (void) const { return mnDrawMode; }
+ sal_uLong GetDrawMode (void) const { return mnDrawMode; }
Orientation GetOrientation (void) const { return meOrientation; }
- USHORT GetPaperTray (void) const { return mnPaperTray; }
+ sal_uInt16 GetPaperTray (void) const { return mnPaperTray; }
protected:
const PageKind mePageKind;
@@ -740,9 +765,9 @@ namespace {
const bool mbPrintMarkedOnly;
const ::rtl::OUString msPageString;
const Point maPageStringOffset;
- const ULONG mnDrawMode;
+ const sal_uLong mnDrawMode;
const Orientation meOrientation;
- const USHORT mnPaperTray;
+ const sal_uInt16 mnPaperTray;
};
@@ -755,15 +780,15 @@ namespace {
{
public:
RegularPrinterPage (
- const USHORT nPageIndex,
+ const sal_uInt16 nPageIndex,
const PageKind ePageKind,
const MapMode& rMapMode,
const bool bPrintMarkedOnly,
const ::rtl::OUString& rsPageString,
const Point& rPageStringOffset,
- const ULONG nDrawMode,
+ const sal_uLong nDrawMode,
const Orientation eOrientation,
- const USHORT nPaperTray)
+ const sal_uInt16 nPaperTray)
: PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, rsPageString,
rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
mnPageIndex(nPageIndex)
@@ -799,7 +824,7 @@ namespace {
}
private:
- const USHORT mnPageIndex;
+ const sal_uInt16 mnPageIndex;
};
@@ -812,15 +837,15 @@ namespace {
{
public:
TiledPrinterPage (
- const USHORT nPageIndex,
+ const sal_uInt16 nPageIndex,
const PageKind ePageKind,
const sal_Int32 nGap,
const bool bPrintMarkedOnly,
const ::rtl::OUString& rsPageString,
const Point& rPageStringOffset,
- const ULONG nDrawMode,
+ const sal_uLong nDrawMode,
const Orientation eOrientation,
- const USHORT nPaperTray)
+ const sal_uInt16 nPaperTray)
: PrinterPage(ePageKind, MapMode(), bPrintMarkedOnly, rsPageString,
rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
mnPageIndex(nPageIndex),
@@ -884,7 +909,7 @@ namespace {
}
private:
- const USHORT mnPageIndex;
+ const sal_uInt16 mnPageIndex;
const sal_Int32 mnGap;
};
@@ -895,16 +920,16 @@ namespace {
{
public:
BookletPrinterPage (
- const USHORT nFirstPageIndex,
- const USHORT nSecondPageIndex,
+ const sal_uInt16 nFirstPageIndex,
+ const sal_uInt16 nSecondPageIndex,
const Point& rFirstOffset,
const Point& rSecondOffset,
const PageKind ePageKind,
const MapMode& rMapMode,
const bool bPrintMarkedOnly,
- const ULONG nDrawMode,
+ const sal_uLong nDrawMode,
const Orientation eOrientation,
- const USHORT nPaperTray)
+ const sal_uInt16 nPaperTray)
: PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, ::rtl::OUString(),
Point(), nDrawMode, eOrientation, nPaperTray),
mnFirstPageIndex(nFirstPageIndex),
@@ -959,8 +984,8 @@ namespace {
}
private:
- const USHORT mnFirstPageIndex;
- const USHORT mnSecondPageIndex;
+ const sal_uInt16 mnFirstPageIndex;
+ const sal_uInt16 mnSecondPageIndex;
const Point maFirstOffset;
const Point maSecondOffset;
};
@@ -974,14 +999,14 @@ namespace {
{
public:
HandoutPrinterPage (
- const USHORT nHandoutPageIndex,
- const ::std::vector<USHORT>& rPageIndices,
+ const sal_uInt16 nHandoutPageIndex,
+ const ::std::vector<sal_uInt16>& rPageIndices,
const MapMode& rMapMode,
const ::rtl::OUString& rsPageString,
const Point& rPageStringOffset,
- const ULONG nDrawMode,
+ const sal_uLong nDrawMode,
const Orientation eOrientation,
- const USHORT nPaperTray)
+ const sal_uInt16 nPaperTray)
: PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString,
rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
mnHandoutPageIndex(nHandoutPageIndex),
@@ -1017,7 +1042,7 @@ namespace {
// Connect page objects with pages.
std::vector<SdrPageObj*>::iterator aPageObjIter (aHandoutPageObjects.begin());
- for (std::vector<USHORT>::const_iterator
+ for (std::vector<sal_uInt16>::const_iterator
iPageIndex(maPageIndices.begin()),
iEnd(maPageIndices.end());
iPageIndex!=iEnd && aPageObjIter!=aHandoutPageObjects.end();
@@ -1106,8 +1131,8 @@ namespace {
}
private:
- const USHORT mnHandoutPageIndex;
- const ::std::vector<USHORT> maPageIndices;
+ const sal_uInt16 mnHandoutPageIndex;
+ const ::std::vector<sal_uInt16> maPageIndices;
};
@@ -1124,9 +1149,9 @@ namespace {
const MapMode& rMapMode,
const ::rtl::OUString& rsPageString,
const Point& rPageStringOffset,
- const ULONG nDrawMode,
+ const sal_uLong nDrawMode,
const Orientation eOrientation,
- const USHORT nPaperTray)
+ const sal_uInt16 nPaperTray)
: PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString,
rPageStringOffset, nDrawMode, eOrientation, nPaperTray),
mpParaObject(pParaObject)
@@ -1159,13 +1184,13 @@ namespace {
// Get and set up the outliner.
const Rectangle aOutRect (rPrinter.GetPageOffset(), rPrinter.GetOutputSize());
Outliner* pOutliner = rDocument.GetInternalOutliner();
- const USHORT nSavedOutlMode (pOutliner->GetMode());
- const BOOL bSavedUpdateMode (pOutliner->GetUpdateMode());
+ const sal_uInt16 nSavedOutlMode (pOutliner->GetMode());
+ const sal_Bool bSavedUpdateMode (pOutliner->GetUpdateMode());
const Size aSavedPaperSize (pOutliner->GetPaperSize());
pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
pOutliner->SetPaperSize(aOutRect.GetSize());
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
pOutliner->Clear();
pOutliner->SetText(*mpParaObject);
@@ -1246,6 +1271,7 @@ public:
return;
bool bIsValueChanged = processProperties( rOptions );
+ bool bIsPaperChanged = false;
// The RenderDevice property is handled specially: its value is
// stored in mpPrinter instead of being retrieved on demand.
@@ -1257,14 +1283,21 @@ public:
VCLXDevice* pDevice = VCLXDevice::GetImplementation(xRenderDevice);
OutputDevice* pOut = pDevice ? pDevice->GetOutputDevice() : NULL;
mpPrinter = dynamic_cast<Printer*>(pOut);
+ Size aPageSizePixel = mpPrinter ? mpPrinter->GetPaperSizePixel() : Size();
+ if( aPageSizePixel != maPrinterPageSizePixel )
+ {
+ bIsPaperChanged = true;
+ maPrinterPageSizePixel = aPageSizePixel;
+ }
}
if (bIsValueChanged)
{
if ( ! mpOptions )
mpOptions.reset(new PrintOptions(*this, maSlidesPerPage));
- PreparePages();
}
+ if( bIsValueChanged || bIsPaperChanged )
+ PreparePages();
}
@@ -1340,9 +1373,9 @@ public:
return;
const Orientation eSavedOrientation (rPrinter.GetOrientation());
- const ULONG nSavedDrawMode (rPrinter.GetDrawMode());
+ const sal_uLong nSavedDrawMode (rPrinter.GetDrawMode());
const MapMode aSavedMapMode (rPrinter.GetMapMode());
- const USHORT nSavedPaperBin (rPrinter.GetPaperBin());
+ const sal_uInt16 nSavedPaperBin (rPrinter.GetPaperBin());
// Set page orientation.
@@ -1394,6 +1427,7 @@ private:
ViewShellBase& mrBase;
bool mbIsDisposed;
Printer* mpPrinter;
+ Size maPrinterPageSizePixel;
::boost::scoped_ptr<PrintOptions> mpOptions;
::std::vector< ::boost::shared_ptr< ::sd::PrinterPage> > maPrinterPages;
::boost::scoped_ptr<DrawView> mpPrintView;
@@ -1471,15 +1505,15 @@ private:
mpPrinter->SetMapMode(aMap);
::Outliner& rOutliner = mrBase.GetDocument()->GetDrawOutliner();
- const ULONG nSavedControlWord (rOutliner.GetControlWord());
- ULONG nCntrl = nSavedControlWord;
+ const sal_uLong nSavedControlWord (rOutliner.GetControlWord());
+ sal_uLong nCntrl = nSavedControlWord;
nCntrl &= ~EE_CNTRL_MARKFIELDS;
nCntrl &= ~EE_CNTRL_ONLINESPELLING;
rOutliner.SetControlWord( nCntrl );
// When in outline view then apply all pending changes to the model.
if (pShell->ISA(OutlineViewShell))
- static_cast<OutlineViewShell*>(pShell)->PrepareClose (FALSE, FALSE);
+ static_cast<OutlineViewShell*>(pShell)->PrepareClose (sal_False, sal_False);
// Collect some frequently used data.
if (mpOptions->IsDate())
@@ -1489,7 +1523,7 @@ private:
}
if (mpOptions->IsTime())
- aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time(), FALSE, FALSE );
+ aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time(), sal_False, sal_False );
aInfo.maPrintSize = aInfo.mpPrinter->GetOutputSize();
maPrintSize = awt::Size(
aInfo.mpPrinter->GetPaperSize().Width(),
@@ -1628,7 +1662,7 @@ private:
// const bool bPrintExcluded (mpOptions->IsPrintExcluded());
bool bContainsTransparency = false;
- for (USHORT
+ for (sal_uInt16
nIndex=0,
nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
nIndex < nCount && !bContainsTransparency;
@@ -1664,7 +1698,7 @@ private:
if ( ! rInfo.maSelection.IsSelected(nPageIndex))
return NULL;
SdPage* pPage = mrBase.GetDocument()->GetSdPage(
- sal::static_int_cast<USHORT>(nPageIndex),
+ sal::static_int_cast<sal_uInt16>(nPageIndex),
ePageKind);
if (pPage == NULL)
return NULL;
@@ -1705,16 +1739,16 @@ private:
Link aOldLink;
Outliner* pOutliner = mrBase.GetDocument()->GetInternalOutliner();
pOutliner->Init(OUTLINERMODE_OUTLINEVIEW);
- const USHORT nSavedOutlMode (pOutliner->GetMode());
- const BOOL bSavedUpdateMode (pOutliner->GetUpdateMode());
+ const sal_uInt16 nSavedOutlMode (pOutliner->GetMode());
+ const sal_Bool bSavedUpdateMode (pOutliner->GetUpdateMode());
const Size aSavedPaperSize (pOutliner->GetPaperSize());
const MapMode aSavedMapMode (pOutliner->GetRefMapMode());
pOutliner->SetPaperSize(aOutRect.GetSize());
- pOutliner->SetUpdateMode(TRUE);
+ pOutliner->SetUpdateMode(sal_True);
long nPageH = aOutRect.GetHeight();
- for (USHORT
+ for (sal_uInt16
nIndex=0,
nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
nIndex < nCount;
@@ -1776,7 +1810,7 @@ private:
pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT)); // Untertitel vorhanden?
}
- ULONG nParaCount1 = pOutliner->GetParagraphCount();
+ sal_uLong nParaCount1 = pOutliner->GetParagraphCount();
if (pTextObj!=NULL
&& !pTextObj->IsEmptyPresObj()
@@ -1791,7 +1825,7 @@ private:
for (sal_Int32 nPara=nParaCount1; nPara<nParaCount2; ++nPara)
{
Paragraph* pP = pOutliner->GetParagraph(nPara);
- if (pP!=NULL && pOutliner->GetDepth((USHORT)nPara) > 0)
+ if (pP!=NULL && pOutliner->GetDepth((sal_uInt16)nPara) > 0)
pOutliner->SetDepth(pP, 0);
}
}
@@ -1803,9 +1837,9 @@ private:
// the current page.
if (nH > nPageH && pPara!=NULL)
{
- ULONG nCnt = pOutliner->GetAbsPos(
+ sal_uLong nCnt = pOutliner->GetAbsPos(
pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 ) );
- ULONG nParaPos = pOutliner->GetAbsPos( pPara );
+ sal_uLong nParaPos = pOutliner->GetAbsPos( pPara );
nCnt -= nParaPos;
pPara = pOutliner->GetParagraph( ++nParaPos );
if ( nCnt && pPara )
@@ -1846,7 +1880,7 @@ private:
const bool bScalePage (mpOptions->IsPageSize());
- USHORT nPaperBin;
+ sal_uInt16 nPaperBin;
if ( ! mpOptions->IsPaperBin())
nPaperBin = rHandoutPage.GetPaperBin();
else
@@ -1909,15 +1943,15 @@ private:
++nShapeCount;
}
- const USHORT nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
- const USHORT nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0;
+ const sal_uInt16 nPageCount = mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
+ const sal_uInt16 nHandoutPageCount = nShapeCount ? (nPageCount + nShapeCount - 1) / nShapeCount : 0;
pViewShell->SetPrintedHandoutPageCount( nHandoutPageCount );
mrBase.GetDocument()->setHandoutPageCount( nHandoutPageCount );
// Distribute pages to handout pages.
- ::std::vector<USHORT> aPageIndices;
+ ::std::vector<sal_uInt16> aPageIndices;
std::vector<SdPage*> aPagesVector;
- for (USHORT
+ for (sal_uInt16
nIndex=0,
nCount= nPageCount,
nHandoutPageIndex=0;
@@ -1997,7 +2031,7 @@ private:
pViewShell->WriteFrameViewData();
Point aPtZero;
- for (USHORT
+ for (sal_uInt16
nIndex=0,
nCount=mrBase.GetDocument()->GetSdPageCount(PK_STANDARD);
nIndex < nCount;
@@ -2121,8 +2155,8 @@ private:
}
// create vector of pages to print
- ::std::vector< USHORT > aPageVector;
- for (USHORT
+ ::std::vector< sal_uInt16 > aPageVector;
+ for (sal_uInt16
nIndex=0,
nCount=mrBase.GetDocument()->GetSdPageCount(ePageKind);
nIndex < nCount;
@@ -2134,14 +2168,14 @@ private:
}
// create pairs of pages to print on each page
- typedef ::std::vector< ::std::pair< USHORT, USHORT > > PairVector;
+ typedef ::std::vector< ::std::pair< sal_uInt16, sal_uInt16 > > PairVector;
PairVector aPairVector;
if ( ! aPageVector.empty())
{
sal_uInt32 nFirstIndex = 0, nLastIndex = aPageVector.size() - 1;
if( aPageVector.size() & 1 )
- aPairVector.push_back( ::std::make_pair( (USHORT) 65535, aPageVector[ nFirstIndex++ ] ) );
+ aPairVector.push_back( ::std::make_pair( (sal_uInt16) 65535, aPageVector[ nFirstIndex++ ] ) );
else
aPairVector.push_back( ::std::make_pair( aPageVector[ nLastIndex-- ], aPageVector[ nFirstIndex++ ] ) );
@@ -2164,7 +2198,7 @@ private:
if ((!bIsIndexOdd && mpOptions->IsPrintFrontPage())
|| (bIsIndexOdd && mpOptions->IsPrintBackPage()))
{
- const ::std::pair<USHORT, USHORT> aPair (aPairVector[nIndex]);
+ const ::std::pair<sal_uInt16, sal_uInt16> aPair (aPairVector[nIndex]);
Point aSecondOffset (aOffset);
if (rInfo.meOrientation == ORIENTATION_LANDSCAPE)
aSecondOffset.X() += aAdjustedPrintSize.Width() / 2;
@@ -2200,7 +2234,7 @@ private:
const PageKind ePageKind,
const PrintInfo& rInfo)
{
- USHORT nPaperBin;
+ sal_uInt16 nPaperBin;
if ( ! mpOptions->IsPaperBin())
nPaperBin = rPage.GetPaperBin();
else
@@ -2209,7 +2243,7 @@ private:
maPrinterPages.push_back(
::boost::shared_ptr<PrinterPage>(
new TiledPrinterPage(
- sal::static_int_cast<USHORT>(nPageIndex),
+ sal::static_int_cast<sal_uInt16>(nPageIndex),
ePageKind,
500,
rInfo.mbPrintMarkedOnly,
@@ -2234,7 +2268,7 @@ private:
{
const Point aPageOffset (rInfo.mpPrinter->GetPageOffset());
- USHORT nPaperBin;
+ sal_uInt16 nPaperBin;
if ( ! mpOptions->IsPaperBin())
nPaperBin = rPage.GetPaperBin();
else
@@ -2259,7 +2293,7 @@ private:
maPrinterPages.push_back(
::boost::shared_ptr<PrinterPage>(
new RegularPrinterPage(
- sal::static_int_cast<USHORT>(nPageIndex),
+ sal::static_int_cast<sal_uInt16>(nPageIndex),
ePageKind,
aMap,
rInfo.mbPrintMarkedOnly,
@@ -2295,7 +2329,7 @@ private:
maPrinterPages.push_back(
::boost::shared_ptr<PrinterPage>(
new RegularPrinterPage(
- sal::static_int_cast<USHORT>(nPageIndex),
+ sal::static_int_cast<sal_uInt16>(nPageIndex),
ePageKind,
aMap,
rInfo.mbPrintMarkedOnly,
diff --git a/sd/source/ui/view/DocumentRenderer.hrc b/sd/source/ui/view/DocumentRenderer.hrc
index 3dd57429dd13..aad07d909def 100644..100755
--- a/sd/source/ui/view/DocumentRenderer.hrc
+++ b/sd/source/ui/view/DocumentRenderer.hrc
@@ -30,48 +30,33 @@
#define _STR_IMPRESS_PRINT_UI_PRINT_CONTENT 2
#define _STR_IMPRESS_PRINT_UI_PRINT_GROUP 3
#define _STR_IMPRESS_PRINT_UI_CONTENT 4
-#define _STR_IMPRESS_PRINT_UI_CONTENT_HELP 5
#define _STR_IMPRESS_PRINT_UI_CONTENT_CHOICES 6
#define _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE 7
#define _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES 8
-#define _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP 9
#define _STR_IMPRESS_PRINT_UI_ORDER 10
#define _STR_IMPRESS_PRINT_UI_ORDER_CHOICES 11
-#define _STR_IMPRESS_PRINT_UI_ORDER_CHOICES_HELP 12
#define _STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT 13
#define _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME 14
-#define _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME_HELP 15
#define _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE 16
-#define _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE_HELP 17
#define _STR_IMPRESS_PRINT_UI_IS_PRINT_TIME 18
-#define _STR_IMPRESS_PRINT_UI_IS_PRINT_TIME_HELP 19
#define _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN 20
-#define _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN_HELP 21
#define _STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP 22
#define _STR_IMPRESS_PRINT_UI_QUALITY 23
#define _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES 24
-#define _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP 25
#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS 26
#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES 27
#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_DRAW 28
-#define _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP 29
#define _STR_IMPRESS_PRINT_UI_BROCHURE 30
-#define _STR_IMPRESS_PRINT_UI_BROCHURE_HELP 31
#define _STR_IMPRESS_PRINT_UI_PAGE_SIDES 32
#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE 33
-#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_HELP 34
#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST 35
-#define _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST_HELP 36
#define _STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP 37
#define _STR_IMPRESS_PRINT_UI_PAPER_TRAY 38
-#define _STR_IMPRESS_PRINT_UI_PAPER_TRAY_HELP 39
#define _STR_IMPRESS_PRINT_UI_PAGE_RANGE 40
#define _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE 41
-#define _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE_HELP 42
#define _STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE 43
#define _STR_DRAW_PRINT_UI_IS_PRINT_NAME 44
-#define _STR_DRAW_PRINT_UI_IS_PRINT_NAME_HELP 45
diff --git a/sd/source/ui/view/DocumentRenderer.src b/sd/source/ui/view/DocumentRenderer.src
index abd82ea0d397..df4e2a30de02 100755
--- a/sd/source/ui/view/DocumentRenderer.src
+++ b/sd/source/ui/view/DocumentRenderer.src
@@ -46,14 +46,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
{
Text [ en-US ] = "Document";
};
- StringArray _STR_IMPRESS_PRINT_UI_CONTENT_HELP
- {
- ItemList [ en-US ] =
- {
- < "Select which parts of the document should be printed"; >;
- < "Select which parts of the document should be printed"; >;
- };
- };
StringArray _STR_IMPRESS_PRINT_UI_CONTENT_CHOICES
{
ItemList [ en-US ] =
@@ -81,14 +73,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
< "9" ; > ;
};
};
- StringArray _STR_IMPRESS_PRINT_UI_SLIDESPERPAGE_CHOICES_HELP
- {
- ItemList [ en-US ] =
- {
- < "Select how many slides to print per page." ; >;
- < "Select how many slides to print per page." ; >;
- };
- };
String _STR_IMPRESS_PRINT_UI_ORDER
{
Text [ en-US ] = "Order" ;
@@ -101,15 +85,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
< "Top to bottom, then right" ; > ;
};
};
- StringArray _STR_IMPRESS_PRINT_UI_ORDER_CHOICES_HELP
- {
- ItemList [ en-US ] =
- {
- < "Specify how to arrange slides on the printed page." ; > ;
- < "Arrange slides horizontally" ; > ;
- < "Arrange slides vertically" ; > ;
- };
- };
String _STR_IMPRESS_PRINT_UI_INCLUDE_CONTENT
{
Text [ en-US ] = "~Contents";
@@ -118,35 +93,18 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
{
Text [ en-US ] = "~Slide name";
};
- String _STR_IMPRESS_PRINT_UI_IS_PRINT_NAME_HELP
- {
- Text [ en-US ] = "Specifies whether to print the page name of a document.";
- };
String _STR_DRAW_PRINT_UI_IS_PRINT_NAME
{
Text [ en-US ] = "P~age name";
};
- String _STR_DRAW_PRINT_UI_IS_PRINT_NAME_HELP
- {
- Text [ en-US ] = "Specifies whether to print the page name of a document.";
- };
String _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE
{
Text [ en-US ] = "~Date and time";
};
- String _STR_IMPRESS_PRINT_UI_IS_PRINT_DATE_HELP
- {
- Text [ en-US ] = "Specifies whether to print the current date and time.";
- };
String _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN
{
Text [ en-US ] = "Hidden pages";
};
- String _STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN_HELP
- {
- Text [ en-US ] = "Specifies whether to print the pages that are currently hidden from the application.";
- };
-
String _STR_IMPRESS_PRINT_UI_OUTPUT_OPTIONS_GROUP
{
Text [ en-US ] = "Output options";
@@ -164,17 +122,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
< "Black & white" ; > ;
};
};
- StringArray _STR_IMPRESS_PRINT_UI_QUALITY_CHOICES_HELP
- {
- ItemList [ en-US ] =
- {
- < "Specify how to treat colors in the printout."; >;
- < "Specifies that you want to print in original colors." ; > ;
- < "Specifies that you want to print colors as grayscale." ; > ;
- < "Specifies that you want to print in black and white." ; > ;
- };
- };
-
String _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS
{
Text [ en-US ] = "~Size";
@@ -199,24 +146,10 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
< "Tile sheet of paper with repeated pages" ; > ;
};
};
- StringArray _STR_IMPRESS_PRINT_UI_PAGE_OPTIONS_CHOICES_HELP
- {
- ItemList [ en-US ] =
- {
- < "Specify how to scale slides in the printout."; >;
- < "Specifies that you do not want to further scale pages when printing." ; > ;
- < "Specifies whether to scale down objects that are beyond the margins of the current printer so they fit on the paper in the printer." ; > ;
- < "Specifies that pages are to be printed in tiled format. If the pages or slides are smaller than the paper, several pages or slides will be printed on one page of paper." ; > ;
- };
- };
String _STR_IMPRESS_PRINT_UI_BROCHURE
{
Text [en-US] = "Brochure";
};
- String _STR_IMPRESS_PRINT_UI_BROCHURE_HELP
- {
- Text [en-US] = "Select the \"Brochure\" option to print the document in brochure format.";
- };
String _STR_IMPRESS_PRINT_UI_PAGE_SIDES
{
Text [ en-US ] = "Page sides";
@@ -225,10 +158,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
{
Text [ en-US ] = "Include";
};
- String _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_HELP
- {
- Text [ en-US ] = "Select which pages of a brochure to print.";
- };
StringArray _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST
{
ItemList [ en-US ] =
@@ -238,15 +167,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
< "Back sides / left pages" ; > ;
};
};
- StringArray _STR_IMPRESS_PRINT_UI_BROCHURE_INCLUDE_LIST_HELP
- {
- ItemList [ en-US ] =
- {
- < "Print all pages of a brochure." ; > ;
- < "Print only front pages of a brochure." ; > ;
- < "Print only back pages of a brochure." ; > ;
- };
- };
String _STR_IMPRESS_PRINT_UI_PAPER_TRAY_GROUP
{
@@ -256,10 +176,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
{
Text [ en-US ] = "~Use only paper tray from printer preferences";
};
- String _STR_IMPRESS_PRINT_UI_PAPER_TRAY_HELP
- {
- Text [ en-US ] = "Determines that the paper tray to be used is the one defined in the printer setup.";
- };
String _STR_IMPRESS_PRINT_UI_PAGE_RANGE
{
Text [en-US] = "Print range";
@@ -274,16 +190,6 @@ Resource _STR_IMPRESS_PRINT_UI_OPTIONS
};
};
- StringArray _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE_HELP
- {
- ItemList [ en-US ] =
- {
- < "Print the whole document."; >;
- < "Print a specified range of the document."; >;
- < "Print only the currently selected content."; >;
- };
- };
-
StringArray _STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE
{
ItemList [ en-US ] =
diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx
index c4f0dbb8d380..ffd717fec19d 100644..100755
--- a/sd/source/ui/view/GraphicObjectBar.cxx
+++ b/sd/source/ui/view/GraphicObjectBar.cxx
@@ -129,14 +129,14 @@ void GraphicObjectBar::Execute( SfxRequest& rReq )
void GraphicObjectBar::GetFilterState( SfxItemSet& rSet )
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if( rMarkList.GetMarkCount() == 1 )
{
SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj && pObj->ISA( SdrGrafObj ) && ( ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) )
- bEnable = TRUE;
+ bEnable = sal_True;
}
if( !bEnable )
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index ec01fd057303..ca182e9680ba 100644
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -46,12 +46,6 @@ TYPEINIT1(GraphicViewShellBase, ViewShellBase);
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new GraphicViewShellBase object has been constructed.
-/*
-SFX_IMPL_VIEWFACTORY(GraphicViewShellBase, SdResId(STR_DEFAULTVIEW))
-{
- SFX_VIEW_REGISTRATION(GraphicDocShell);
-}
-*/
SfxViewFactory* GraphicViewShellBase::pFactory;
SfxViewShell* GraphicViewShellBase::CreateInstance (
SfxViewFrame *pFrame, SfxViewShell *pOldView)
@@ -60,7 +54,7 @@ SfxViewShell* GraphicViewShellBase::CreateInstance (
pBase->LateInit(framework::FrameworkHelper::msDrawViewURL);
return pBase;
}
-void GraphicViewShellBase::RegisterFactory( USHORT nPrio )
+void GraphicViewShellBase::RegisterFactory( sal_uInt16 nPrio )
{
pFactory = new SfxViewFactory(
&CreateInstance,&InitFactory,nPrio,"Default");
@@ -97,7 +91,7 @@ GraphicViewShellBase::~GraphicViewShellBase (void)
void GraphicViewShellBase::Execute (SfxRequest& rRequest)
{
- USHORT nSlotId = rRequest.GetSlot();
+ sal_uInt16 nSlotId = rRequest.GetSlot();
switch (nSlotId)
{
diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx b/sd/source/ui/view/ImpressViewShellBase.cxx
index fd039bcccc67..5ed10762b5d1 100644
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -46,12 +46,6 @@ TYPEINIT1(ImpressViewShellBase, ViewShellBase);
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new ImpressViewShellBase object has been constructed.
-/*
-SFX_IMPL_VIEWFACTORY(ImpressViewShellBase, SdResId(STR_DEFAULTVIEW))
-{
- SFX_VIEW_REGISTRATION(DrawDocShell);
-}
-*/
SfxViewFactory* ImpressViewShellBase::pFactory;
SfxViewShell* ImpressViewShellBase::CreateInstance (
SfxViewFrame *pFrame, SfxViewShell *pOldView)
@@ -60,7 +54,7 @@ SfxViewShell* ImpressViewShellBase::CreateInstance (
pBase->LateInit(::rtl::OUString());
return pBase;
}
-void ImpressViewShellBase::RegisterFactory( USHORT nPrio )
+void ImpressViewShellBase::RegisterFactory( sal_uInt16 nPrio )
{
pFactory = new SfxViewFactory(
&CreateInstance,&InitFactory,nPrio,"Default");
@@ -99,7 +93,7 @@ ImpressViewShellBase::~ImpressViewShellBase (void)
void ImpressViewShellBase::Execute (SfxRequest& rRequest)
{
- USHORT nSlotId = rRequest.GetSlot();
+ sal_uInt16 nSlotId = rRequest.GetSlot();
switch (nSlotId)
{
diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx
index d2d9bf767fa2..25ab35f4df67 100644..100755
--- a/sd/source/ui/view/MediaObjectBar.cxx
+++ b/sd/source/ui/view/MediaObjectBar.cxx
@@ -99,7 +99,7 @@ MediaObjectBar::~MediaObjectBar()
void MediaObjectBar::GetState( SfxItemSet& rSet )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
@@ -141,7 +141,7 @@ void MediaObjectBar::Execute( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
- if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, FALSE, &pItem ) ) )
+ if( !pArgs || ( SFX_ITEM_SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, sal_False, &pItem ) ) )
pItem = NULL;
if( pItem )
diff --git a/sd/source/ui/view/OutlineViewShellBase.cxx b/sd/source/ui/view/OutlineViewShellBase.cxx
index c2035eb896d7..795426a84cbd 100644
--- a/sd/source/ui/view/OutlineViewShellBase.cxx
+++ b/sd/source/ui/view/OutlineViewShellBase.cxx
@@ -44,12 +44,6 @@ TYPEINIT1(OutlineViewShellBase, ViewShellBase);
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new OutlineViewShellBase object has been constructed.
-/*
-SFX_IMPL_VIEWFACTORY(OutlineViewShellBase, SdResId(STR_DEFAULTVIEW))
-{
- SFX_VIEW_REGISTRATION(DrawDocShell);
-}
-*/
SfxViewFactory* OutlineViewShellBase::pFactory;
SfxViewShell* OutlineViewShellBase::CreateInstance (
SfxViewFrame *pFrame, SfxViewShell *pOldView)
@@ -58,7 +52,7 @@ SfxViewShell* OutlineViewShellBase::CreateInstance (
pBase->LateInit(framework::FrameworkHelper::msOutlineViewURL);
return pBase;
}
-void OutlineViewShellBase::RegisterFactory( USHORT nPrio )
+void OutlineViewShellBase::RegisterFactory( sal_uInt16 nPrio )
{
pFactory = new SfxViewFactory(
&CreateInstance,&InitFactory,nPrio,"Outline");
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 3a00103479ef..5d133e2dcb60 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -145,7 +145,7 @@ private:
|*
\************************************************************************/
-Outliner::Outliner( SdDrawDocument* pDoc, USHORT nMode )
+Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
: SdrOutliner( &pDoc->GetItemPool(), nMode ),
mpImpl(new Implementation()),
meMode(SEARCH),
@@ -155,13 +155,13 @@ Outliner::Outliner( SdDrawDocument* pDoc, USHORT nMode )
mpDrawDocument(pDoc),
mnConversionLanguage(LANGUAGE_NONE),
mnIgnoreCurrentPageChangesLevel(0),
- mbStringFound(FALSE),
+ mbStringFound(sal_False),
mbMatchMayExist(false),
mnPageCount(0),
mnObjectCount(0),
- mbEndOfSearch(FALSE),
- mbFoundObject(FALSE),
- mbError(FALSE),
+ mbEndOfSearch(sal_False),
+ mbFoundObject(sal_False),
+ mbError(sal_False),
mbDirectionIsForward(true),
mbRestrictSearchToSelection(false),
maMarkListCopy(),
@@ -173,7 +173,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, USHORT nMode )
mpParaObj(NULL),
meStartViewMode(PK_STANDARD),
meStartEditMode(EM_PAGE),
- mnStartPageIndex((USHORT)-1),
+ mnStartPageIndex((sal_uInt16)-1),
mpStartEditedObject(NULL),
maStartSelection(),
mpSearchItem(NULL),
@@ -192,13 +192,13 @@ Outliner::Outliner( SdDrawDocument* pDoc, USHORT nMode )
SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
SetForbiddenCharsTable( pDoc->GetForbiddenCharsTable() );
- ULONG nCntrl = GetControlWord();
+ sal_uLong nCntrl = GetControlWord();
nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
nCntrl |= EE_CNTRL_URLSFXEXECUTE;
nCntrl |= EE_CNTRL_MARKFIELDS;
nCntrl |= EE_CNTRL_AUTOCORRECT;
- BOOL bOnlineSpell = false;
+ sal_Bool bOnlineSpell = false;
DrawDocShell* pDocSh = mpDrawDocument->GetDocSh();
@@ -290,13 +290,13 @@ void Outliner::PrepareSpelling (void)
if (mpViewShell.get() != NULL)
{
- mbStringFound = FALSE;
+ mbStringFound = sal_False;
mbWholeDocumentProcessed = false;
// Supposed that we are not located at the very beginning/end of
// the document then there may be a match in the document
// prior/after the current position.
- mbMatchMayExist = TRUE;
+ mbMatchMayExist = sal_True;
maObjectIterator = ::sd::outliner::Iterator();
maSearchStartPosition = ::sd::outliner::Iterator();
@@ -367,7 +367,7 @@ void Outliner::EndSpelling (void)
mpImpl->ReleaseOutlinerView();
}
- SetUpdateMode(TRUE);
+ SetUpdateMode(sal_True);
}
// Before clearing the modify flag use it as a hint that
@@ -375,9 +375,9 @@ void Outliner::EndSpelling (void)
if(IsModified())
{
if(mpView && mpView->ISA(OutlineView))
- static_cast<OutlineView*>(mpView)->PrepareClose(FALSE);
+ static_cast<OutlineView*>(mpView)->PrepareClose(sal_False);
if(mpDrawDocument && !mpDrawDocument->IsChanged())
- mpDrawDocument->SetChanged(TRUE);
+ mpDrawDocument->SetChanged(sal_True);
}
// now clear the modify flag to have a specified state of
@@ -397,7 +397,7 @@ void Outliner::EndSpelling (void)
-BOOL Outliner::SpellNextDocument (void)
+sal_Bool Outliner::SpellNextDocument (void)
{
if (mpViewShell->ISA(OutlineViewShell))
{
@@ -409,8 +409,8 @@ BOOL Outliner::SpellNextDocument (void)
else
{
if (mpView->ISA(OutlineView))
- ((OutlineView*)mpView)->PrepareClose(FALSE);
- mpDrawDocument->GetDocSh()->SetWaitCursor( TRUE );
+ ((OutlineView*)mpView)->PrepareClose(sal_False);
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True );
Initialize (true);
@@ -420,11 +420,11 @@ BOOL Outliner::SpellNextDocument (void)
pOutlinerView->SetWindow(mpWindow);
ProvideNextTextObject ();
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
ClearModifyFlag();
}
- return mbEndOfSearch ? FALSE : TRUE;
+ return mbEndOfSearch ? sal_False : sal_True;
}
@@ -484,11 +484,11 @@ BOOL Outliner::SpellNextDocument (void)
*/
bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
{
- BOOL bEndOfSearch = TRUE;
+ sal_Bool bEndOfSearch = sal_True;
if (mbViewShellValid)
{
- mpDrawDocument->GetDocSh()->SetWaitCursor( TRUE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True );
if (mbPrepareSpellingPending)
PrepareSpelling();
ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
@@ -522,11 +522,11 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
meMode = SEARCH;
mpSearchItem = pSearchItem;
- mbFoundObject = FALSE;
+ mbFoundObject = sal_False;
Initialize ( ! mpSearchItem->GetBackward());
- USHORT nCommand = mpSearchItem->GetCommand();
+ sal_uInt16 nCommand = mpSearchItem->GetCommand();
if (nCommand == SVX_SEARCHCMD_REPLACE_ALL)
bEndOfSearch = SearchAndReplaceAll ();
else
@@ -537,11 +537,11 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
if(!mbStringFound)
RestoreStartPosition ();
else
- mnStartPageIndex = (USHORT)-1;
+ mnStartPageIndex = (sal_uInt16)-1;
}
}
else
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
}
return bEndOfSearch;
@@ -685,7 +685,7 @@ bool Outliner::SearchAndReplaceOnce (void)
pOutlinerView->StartSearchAndReplace(*mpSearchItem);
// Search for the next match.
- ULONG nMatchCount = 0;
+ sal_uLong nMatchCount = 0;
if (mpSearchItem->GetCommand() != SVX_SEARCHCMD_REPLACE_ALL)
nMatchCount = pOutlinerView->StartSearchAndReplace(*mpSearchItem);
@@ -709,7 +709,7 @@ bool Outliner::SearchAndReplaceOnce (void)
"SearchAndReplace without valid view!" );
if ( ! GetEditEngine().HasView( &pOutlinerView->GetEditView() ) )
{
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
return true;
}
@@ -720,7 +720,7 @@ bool Outliner::SearchAndReplaceOnce (void)
}
else if (mpViewShell->ISA(OutlineViewShell))
{
- mpDrawDocument->GetDocSh()->SetWaitCursor (FALSE);
+ mpDrawDocument->GetDocSh()->SetWaitCursor (sal_False);
// The following loop is executed more then once only when a
// wrap arround search is done.
while (true)
@@ -741,7 +741,7 @@ bool Outliner::SearchAndReplaceOnce (void)
}
}
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
return mbEndOfSearch;
}
@@ -771,7 +771,7 @@ void Outliner::DetectChange (void)
if (pPageView != NULL)
mpView->UnmarkAllObj (pPageView);
mpView->SdrEndTextEdit();
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
if (pOutlinerView != NULL)
pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
@@ -817,7 +817,7 @@ void Outliner::DetectChange (void)
bool Outliner::DetectSelectionChange (void)
{
bool bSelectionHasChanged = false;
- ULONG nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
+ sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
// If mpObj is NULL then we have not yet found our first match.
// Detecting a change makes no sense.
@@ -890,7 +890,7 @@ void Outliner::RememberStartPosition (void)
}
else
{
- mnStartPageIndex = (USHORT)-1;
+ mnStartPageIndex = (sal_uInt16)-1;
}
}
@@ -902,7 +902,7 @@ void Outliner::RestoreStartPosition (void)
bool bRestore = true;
// Take a negative start page index as inidicator that restoring the
// start position is not requested.
- if (mnStartPageIndex == (USHORT)-1 )
+ if (mnStartPageIndex == (sal_uInt16)-1 )
bRestore = false;
// Dont't resore when the view shell is not valid.
if (mpViewShell == NULL)
@@ -974,7 +974,7 @@ void Outliner::ProvideNextTextObject (void)
{
DBG_UNHANDLED_EXCEPTION();
}
- SetUpdateMode(FALSE);
+ SetUpdateMode(sal_False);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
if (pOutlinerView != NULL)
pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
@@ -1047,7 +1047,7 @@ void Outliner::EndOfSearch (void)
if ( ! mbMatchMayExist)
{
ShowEndOfSearchDialog ();
- mbEndOfSearch = TRUE;
+ mbEndOfSearch = sal_True;
}
// Ask the user whether to wrap arround and continue the search or
// to terminate.
@@ -1112,7 +1112,7 @@ bool Outliner::ShowWrapArroundDialog (void)
if (mpSearchItem != NULL)
{
// When searching display the dialog only for single find&replace.
- USHORT nCommand = mpSearchItem->GetCommand();
+ sal_uInt16 nCommand = mpSearchItem->GetCommand();
bShowDialog = (nCommand==SVX_SEARCHCMD_REPLACE)
|| (nCommand==SVX_SEARCHCMD_FIND);
}
@@ -1123,9 +1123,9 @@ bool Outliner::ShowWrapArroundDialog (void)
if (bShowDialog)
{
// The question text depends on the search direction.
- BOOL bImpress = mpDrawDocument!=NULL
+ sal_Bool bImpress = mpDrawDocument!=NULL
&& mpDrawDocument->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
- USHORT nStringId;
+ sal_uInt16 nStringId;
if (mbDirectionIsForward)
nStringId = bImpress
? STR_SAR_WRAP_FORWARD
@@ -1142,7 +1142,7 @@ bool Outliner::ShowWrapArroundDialog (void)
WB_YES_NO | WB_DEF_YES,
String(SdResId(nStringId)));
aQuestionBox.SetImage (QueryBox::GetStandardImage());
- USHORT nBoxResult = ShowModalMessageBox(aQuestionBox);
+ sal_uInt16 nBoxResult = ShowModalMessageBox(aQuestionBox);
bDoWrapArround = (nBoxResult == BUTTONID_YES);
}
@@ -1192,8 +1192,8 @@ void Outliner::PrepareSpellCheck (void)
if (eState == EE_SPELL_NOLANGUAGE)
{
- mbError = TRUE;
- mbEndOfSearch = TRUE;
+ mbError = sal_True;
+ mbEndOfSearch = sal_True;
ErrorBox aErrorBox (NULL,
WB_OK,
String(SdResId(STR_NOLANGUAGE)));
@@ -1215,7 +1215,7 @@ void Outliner::PrepareSpellCheck (void)
}
}
- EnterEditMode( FALSE );
+ EnterEditMode( sal_False );
}
}
@@ -1231,7 +1231,7 @@ void Outliner::PrepareSearchAndReplace (void)
EnterEditMode ();
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
// Start seach at the right end of the current object's text
// depending on the search direction.
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
@@ -1250,7 +1250,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
if (pDrawViewShell.get()!=NULL && ePageKind != pDrawViewShell->GetPageKind())
{
// Restore old edit mode.
- pDrawViewShell->ChangeEditMode(mpImpl->meOriginalEditMode, FALSE);
+ pDrawViewShell->ChangeEditMode(mpImpl->meOriginalEditMode, sal_False);
SetStatusEventHdl(Link());
::rtl::OUString sViewURL;
@@ -1309,7 +1309,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
-void Outliner::SetPage (EditMode eEditMode, USHORT nPageIndex)
+void Outliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex)
{
if ( ! mbRestrictSearchToSelection)
{
@@ -1318,7 +1318,7 @@ void Outliner::SetPage (EditMode eEditMode, USHORT nPageIndex)
OSL_ASSERT(pDrawViewShell.get()!=NULL);
if (pDrawViewShell.get() != NULL)
{
- pDrawViewShell->ChangeEditMode(eEditMode, FALSE);
+ pDrawViewShell->ChangeEditMode(eEditMode, sal_False);
pDrawViewShell->SwitchPage(nPageIndex);
}
}
@@ -1327,7 +1327,7 @@ void Outliner::SetPage (EditMode eEditMode, USHORT nPageIndex)
-void Outliner::EnterEditMode (BOOL bGrabFocus)
+void Outliner::EnterEditMode (sal_Bool bGrabFocus)
{
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
if (mbViewShellValid && pOutlinerView != NULL)
@@ -1356,8 +1356,8 @@ void Outliner::EnterEditMode (BOOL bGrabFocus)
// Turn on the edit mode for the text object.
mpView->SdrBeginTextEdit(mpTextObj, pPV, mpWindow, sal_True, this, pOutlinerView, sal_True, sal_True, bGrabFocus);
- SetUpdateMode(TRUE);
- mbFoundObject = TRUE;
+ SetUpdateMode(sal_True);
+ mbFoundObject = sal_True;
}
}
@@ -1373,7 +1373,7 @@ void Outliner::EnterEditMode (BOOL bGrabFocus)
IMPL_LINK_INLINE_START( Outliner, SpellError, void *, nLang )
{
mbError = true;
- String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(ULONG)nLang ) );
+ String aError( SvtLanguageTable::GetLanguageString( (LanguageType)(sal_uLong)nLang ) );
ErrorHandler::HandleError(* new StringErrorInfo(
ERRCODE_SVX_LINGU_LANGUAGENOTEXISTS, aError) );
return 0;
@@ -1395,7 +1395,7 @@ ESelection Outliner::GetSearchStartPosition (void)
{
// Retrieve the position after the last character in the last
// paragraph.
- USHORT nParagraphCount = static_cast<USHORT>(GetParagraphCount());
+ sal_uInt16 nParagraphCount = static_cast<sal_uInt16>(GetParagraphCount());
if (nParagraphCount == 0)
aPosition = ESelection();
else
@@ -1420,7 +1420,7 @@ bool Outliner::HasNoPreviousMatch (void)
// Detect whether the cursor stands at the beginning
// resp. at the end of the text.
- return pOutlinerView->GetSelection().IsEqual(GetSearchStartPosition ()) == TRUE;
+ return pOutlinerView->GetSelection().IsEqual(GetSearchStartPosition ()) == sal_True;
}
@@ -1460,7 +1460,7 @@ SdrObject* Outliner::SetObject (
const ::sd::outliner::IteratorPosition& rPosition)
{
SetViewMode (rPosition.mePageKind);
- SetPage (rPosition.meEditMode, (USHORT)rPosition.mnPageIndex);
+ SetPage (rPosition.meEditMode, (sal_uInt16)rPosition.mnPageIndex);
mnText = rPosition.mnText;
return rPosition.mxObject.get();
}
@@ -1502,17 +1502,17 @@ void Outliner::SetViewShell (const ::boost::shared_ptr<ViewShell>& rpViewShell)
void Outliner::HandleChangedSelection (void)
{
maMarkListCopy.clear();
- mbRestrictSearchToSelection = (mpView->AreObjectsMarked()==TRUE);
+ mbRestrictSearchToSelection = (mpView->AreObjectsMarked()==sal_True);
if (mbRestrictSearchToSelection)
{
// Make a copy of the current mark list.
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
+ sal_uLong nCount = rMarkList.GetMarkCount();
if (nCount > 0)
{
maMarkListCopy.clear();
maMarkListCopy.reserve (nCount);
- for (ULONG i=0; i<nCount; i++)
+ for (sal_uLong i=0; i<nCount; i++)
maMarkListCopy.push_back (rMarkList.GetMark(i)->GetMarkedSdrObj ());
}
else
@@ -1525,10 +1525,10 @@ void Outliner::HandleChangedSelection (void)
-void Outliner::StartConversion( INT16 nSourceLanguage, INT16 nTargetLanguage,
- const Font *pTargetFont, INT32 nOptions, BOOL bIsInteractive )
+void Outliner::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
+ const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive )
{
- BOOL bMultiDoc = mpViewShell->ISA(DrawViewShell);
+ sal_Bool bMultiDoc = mpViewShell->ISA(DrawViewShell);
meMode = TEXT_CONVERSION;
mbDirectionIsForward = true;
@@ -1564,12 +1564,12 @@ void Outliner::PrepareConversion (void)
if( HasConvertibleTextPortion( mnConversionLanguage ) )
{
SetUpdateMode(sal_False);
- mbStringFound = TRUE;
- mbMatchMayExist = TRUE;
+ mbStringFound = sal_True;
+ mbMatchMayExist = sal_True;
EnterEditMode ();
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
// Start seach at the right end of the current object's text
// depending on the search direction.
}
@@ -1592,12 +1592,12 @@ void Outliner::BeginConversion (void)
if (mpViewShell != NULL)
{
- mbStringFound = FALSE;
+ mbStringFound = sal_False;
// Supposed that we are not located at the very beginning/end of the
// document then there may be a match in the document prior/after
// the current position.
- mbMatchMayExist = TRUE;
+ mbMatchMayExist = sal_True;
maObjectIterator = ::sd::outliner::Iterator();
maSearchStartPosition = ::sd::outliner::Iterator();
@@ -1626,7 +1626,7 @@ sal_Bool Outliner::ConvertNextDocument()
if( mpViewShell && mpViewShell->ISA(OutlineViewShell) )
return false;
- mpDrawDocument->GetDocSh()->SetWaitCursor( TRUE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True );
Initialize ( true );
@@ -1638,7 +1638,7 @@ sal_Bool Outliner::ConvertNextDocument()
}
ProvideNextTextObject ();
- mpDrawDocument->GetDocSh()->SetWaitCursor( FALSE );
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
ClearModifyFlag();
// for text conversion we automaticly wrap around one
@@ -1659,7 +1659,7 @@ sal_Bool Outliner::ConvertNextDocument()
-USHORT Outliner::ShowModalMessageBox (Dialog& rMessageBox)
+sal_uInt16 Outliner::ShowModalMessageBox (Dialog& rMessageBox)
{
// We assume that the parent of the given messge box is NULL, i.e. it is
// modal with respect to the top application window. However, this
@@ -1690,13 +1690,13 @@ USHORT Outliner::ShowModalMessageBox (Dialog& rMessageBox)
if (pChildWindow != NULL)
pSearchDialog = pChildWindow->GetWindow();
if (pSearchDialog != NULL)
- pSearchDialog->EnableInput(FALSE,TRUE);
+ pSearchDialog->EnableInput(sal_False,sal_True);
- USHORT nResult = rMessageBox.Execute();
+ sal_uInt16 nResult = rMessageBox.Execute();
// Unlock the search dialog.
if (pSearchDialog != NULL)
- pSearchDialog->EnableInput(TRUE,TRUE);
+ pSearchDialog->EnableInput(sal_True,sal_True);
return nResult;
}
@@ -1768,12 +1768,12 @@ void Outliner::Implementation::ProvideOutlinerView (
}
else
mpOutlineView->SetWindow(pWindow);
- ULONG nStat = mpOutlineView->GetControlWord();
+ sal_uLong nStat = mpOutlineView->GetControlWord();
nStat &= ~EV_CNTRL_AUTOSCROLL;
mpOutlineView->SetControlWord(nStat);
if (bInsert)
rOutliner.InsertView( mpOutlineView );
- rOutliner.SetUpdateMode(FALSE);
+ rOutliner.SetUpdateMode(sal_False);
mpOutlineView->SetOutputArea (Rectangle (Point(), Size(1, 1)));
rOutliner.SetPaperSize( Size(1, 1) );
rOutliner.SetText( String(), rOutliner.GetParagraph( 0 ) );
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 8778ee8f8c9d..aa89f3699d9c 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -717,11 +717,11 @@ void ViewIteratorImpl::SetPage (sal_Int32 nPageIndex)
{
if (maPosition.meEditMode == EM_PAGE)
mpPage = mpDocument->GetSdPage (
- (USHORT)nPageIndex,
+ (sal_uInt16)nPageIndex,
maPosition.mePageKind);
else
mpPage = mpDocument->GetMasterSdPage (
- (USHORT)nPageIndex,
+ (sal_uInt16)nPageIndex,
maPosition.mePageKind);
}
else
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx
index 2db726e80b0c..d131aec83d76 100644
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -53,12 +53,6 @@ TYPEINIT1(PresentationViewShellBase, ViewShellBase);
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new PresentationViewShellBase object has been constructed.
-/*
-SFX_IMPL_VIEWFACTORY(PresentationViewShellBase, SdResId(STR_DEFAULTVIEW))
-{
- SFX_VIEW_REGISTRATION(DrawDocShell);
-}
-*/
SfxViewFactory* PresentationViewShellBase::pFactory;
SfxViewShell* PresentationViewShellBase::CreateInstance (
SfxViewFrame *_pFrame, SfxViewShell *pOldView)
@@ -68,7 +62,7 @@ SfxViewShell* PresentationViewShellBase::CreateInstance (
pBase->LateInit(framework::FrameworkHelper::msPresentationViewURL);
return pBase;
}
-void PresentationViewShellBase::RegisterFactory( USHORT nPrio )
+void PresentationViewShellBase::RegisterFactory( sal_uInt16 nPrio )
{
pFactory = new SfxViewFactory(
&CreateInstance,&InitFactory,nPrio,"FullScreenPresentation");
@@ -119,7 +113,6 @@ PresentationViewShellBase::~PresentationViewShellBase (void)
-
void PresentationViewShellBase::InitializeFramework (void)
{
com::sun::star::uno::Reference<com::sun::star::frame::XController>
diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx b/sd/source/ui/view/SlideSorterViewShellBase.cxx
index 21e5e21756a2..98a762aa4811 100644
--- a/sd/source/ui/view/SlideSorterViewShellBase.cxx
+++ b/sd/source/ui/view/SlideSorterViewShellBase.cxx
@@ -44,12 +44,6 @@ TYPEINIT1(SlideSorterViewShellBase, ViewShellBase);
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new SlideSorterViewShellBase object has been constructed.
-/*
-SFX_IMPL_VIEWFACTORY(SlideSorterViewShellBase, SdResId(STR_DEFAULTVIEW))
-{
- SFX_VIEW_REGISTRATION(DrawDocShell);
-}
-*/
SfxViewFactory* SlideSorterViewShellBase::pFactory;
SfxViewShell* SlideSorterViewShellBase::CreateInstance (
SfxViewFrame *pFrame, SfxViewShell *pOldView)
@@ -62,7 +56,7 @@ SfxViewShell* SlideSorterViewShellBase::CreateInstance (
-void SlideSorterViewShellBase::RegisterFactory( USHORT nPrio )
+void SlideSorterViewShellBase::RegisterFactory( sal_uInt16 nPrio )
{
pFactory = new SfxViewFactory(
&CreateInstance,&InitFactory,nPrio,"SlideSorter");
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 55a9f171ca51..e62aa1635414 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -343,8 +343,8 @@ private:
::std::auto_ptr<LayouterLock> mpSynchronousLayouterLock;
::std::auto_ptr<LayouterLock> mpAsynchronousLayouterLock;
::std::auto_ptr<ViewShellManager::UpdateLock> mpViewShellManagerLock;
- ULONG mnPendingUpdateCall;
- ULONG mnPendingSetValidCall;
+ sal_uLong mnPendingUpdateCall;
+ sal_uLong mnPendingSetValidCall;
ToolBarRules maToolBarRules;
::rtl::OUString GetToolBarResourceName (const ::rtl::OUString& rsBaseName) const;
diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx
index 47958e7806c2..dd3c114a34b5 100644
--- a/sd/source/ui/view/ViewClipboard.cxx
+++ b/sd/source/ui/view/ViewClipboard.cxx
@@ -104,12 +104,12 @@ SdPage* ViewClipboard::GetFirstMasterPage (const SdTransferable& rTransferable)
for (int nIndex=0; nIndex<nBookmarkCount; nIndex++)
{
String sName (*(String*) pBookmarks->GetObject(nIndex));
- BOOL bIsMasterPage;
+ sal_Bool bIsMasterPage;
- // SdPage* GetMasterSdPage(USHORT nPgNum, PageKind ePgKind);
- // USHORT GetMasterSdPageCount(PageKind ePgKind) const;
+ // SdPage* GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind);
+ // sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const;
- USHORT nBMPage = pDocument->GetPageByName (
+ sal_uInt16 nBMPage = pDocument->GetPageByName (
sName, bIsMasterPage);
if ( ! bIsMasterPage)
{
@@ -171,7 +171,7 @@ void ViewClipboard::AssignMasterPage (
// appended again by SetMasterPage() to the given name. Don't ask.
String sLayoutSuffix (RTL_CONSTASCII_USTRINGPARAM(SD_LT_SEPARATOR));
sLayoutSuffix.Append (SdResId(STR_LAYOUT_OUTLINE));
- USHORT nLength = sLayoutSuffix.Len();
+ sal_uInt16 nLength = sLayoutSuffix.Len();
String sLayoutName (pMasterPage->GetLayoutName());
if (String(sLayoutName, sLayoutName.Len()-nLength, nLength).Equals (
sLayoutSuffix))
@@ -181,24 +181,24 @@ void ViewClipboard::AssignMasterPage (
pPage->GetPageNum() / 2,
sLayoutName,
pSourceDocument,
- FALSE, // Exchange the master page of only the target page.
- FALSE // Keep unused master pages.
+ sal_False, // Exchange the master page of only the target page.
+ sal_False // Keep unused master pages.
);
}
-USHORT ViewClipboard::DetermineInsertPosition (
+sal_uInt16 ViewClipboard::DetermineInsertPosition (
const SdTransferable& )
{
SdDrawDocument* pDoc = mrView.GetDoc();
- USHORT nPgCnt = pDoc->GetSdPageCount( PK_STANDARD );
+ sal_uInt16 nPgCnt = pDoc->GetSdPageCount( PK_STANDARD );
// Insert position is the behind the last selected page or behind the
// last page when the selection is empty.
- USHORT nInsertPos = pDoc->GetSdPageCount( PK_STANDARD ) * 2 + 1;
- for( USHORT nPage = 0; nPage < nPgCnt; nPage++ )
+ sal_uInt16 nInsertPos = pDoc->GetSdPageCount( PK_STANDARD ) * 2 + 1;
+ for( sal_uInt16 nPage = 0; nPage < nPgCnt; nPage++ )
{
SdPage* pPage = pDoc->GetSdPage( nPage, PK_STANDARD );
@@ -212,14 +212,14 @@ USHORT ViewClipboard::DetermineInsertPosition (
-USHORT ViewClipboard::InsertSlides (
+sal_uInt16 ViewClipboard::InsertSlides (
const SdTransferable& rTransferable,
- USHORT nInsertPosition)
+ sal_uInt16 nInsertPosition)
{
SdDrawDocument* pDoc = mrView.GetDoc();
- USHORT nInsertPgCnt = 0;
- BOOL bMergeMasterPages = !rTransferable.HasSourceDoc( pDoc );
+ sal_uInt16 nInsertPgCnt = 0;
+ sal_Bool bMergeMasterPages = !rTransferable.HasSourceDoc( pDoc );
// Prepare the insertion.
const List* pBookmarkList;
@@ -230,7 +230,7 @@ USHORT ViewClipboard::InsertSlides (
// pages are inserted.
pBookmarkList = &rTransferable.GetPageBookmarks();
pDataDocSh = rTransferable.GetPageDocShell();
- nInsertPgCnt = (USHORT)pBookmarkList->Count();
+ nInsertPgCnt = (sal_uInt16)pBookmarkList->Count();
}
else
{
@@ -247,7 +247,7 @@ USHORT ViewClipboard::InsertSlides (
{
const SolarMutexGuard aGuard;
::sd::Window* pWin = mrView.GetViewShell()->GetActiveWindow();
- const BOOL bWait = pWin && pWin->IsWait();
+ const sal_Bool bWait = pWin && pWin->IsWait();
if( bWait )
pWin->LeaveWait();
@@ -255,14 +255,14 @@ USHORT ViewClipboard::InsertSlides (
pDoc->InsertBookmarkAsPage(
const_cast<List*>(pBookmarkList),
NULL,
- FALSE,
- FALSE,
+ sal_False,
+ sal_False,
nInsertPosition,
(&rTransferable == SD_MOD()->pTransferDrag),
pDataDocSh,
- TRUE,
+ sal_True,
bMergeMasterPages,
- FALSE);
+ sal_False);
if( bWait )
pWin->EnterWait();
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 061ba1a17292..fe631fc3c574 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -242,12 +242,6 @@ TYPEINIT1(ViewShellBase, SfxViewShell);
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new ViewShellBase object has been constructed.
-/*
-SFX_IMPL_VIEWFACTORY(ViewShellBase, SdResId(STR_DEFAULTVIEW))
-{
- SFX_VIEW_REGISTRATION(DrawDocShell);
-}
-*/
SfxViewFactory* ViewShellBase::pFactory;
SfxViewShell* ViewShellBase::CreateInstance (
SfxViewFrame *pFrame, SfxViewShell *pOldView)
@@ -256,7 +250,7 @@ SfxViewShell* ViewShellBase::CreateInstance (
pBase->LateInit(OUString());
return pBase;
}
-void ViewShellBase::RegisterFactory( USHORT nPrio )
+void ViewShellBase::RegisterFactory( sal_uInt16 nPrio )
{
pFactory = new SfxViewFactory(
&CreateInstance,&InitFactory,nPrio,"Default");
@@ -346,8 +340,8 @@ ViewShellBase::~ViewShellBase (void)
void ViewShellBase::LateInit (const ::rtl::OUString& rsDefaultView)
{
- StartListening(*GetViewFrame(),TRUE);
- StartListening(*GetDocShell(),TRUE);
+ StartListening(*GetViewFrame(),sal_True);
+ StartListening(*GetDocShell(),sal_True);
mpImpl->LateInit();
InitializeFramework();
@@ -557,7 +551,7 @@ void ViewShellBase::Rearrange (void)
OSL_TRACE("Rearrange: window missing");
}
- GetViewFrame()->Resize(TRUE);
+ GetViewFrame()->Resize(sal_True);
}
@@ -587,7 +581,7 @@ Reference<view::XRenderable> ViewShellBase::GetRenderable (void)
-SfxPrinter* ViewShellBase::GetPrinter (BOOL bCreate)
+SfxPrinter* ViewShellBase::GetPrinter (sal_Bool bCreate)
{
OSL_ASSERT(mpImpl.get()!=NULL);
@@ -597,9 +591,9 @@ SfxPrinter* ViewShellBase::GetPrinter (BOOL bCreate)
-USHORT ViewShellBase::SetPrinter (
+sal_uInt16 ViewShellBase::SetPrinter (
SfxPrinter* pNewPrinter,
- USHORT nDiffFlags,
+ sal_uInt16 nDiffFlags,
bool bIsAPI)
{
OSL_ASSERT(mpImpl.get()!=NULL);
@@ -615,7 +609,7 @@ USHORT ViewShellBase::SetPrinter (
pNewPrinter->SetMapMode(aMap);
Size aNewSize = pNewPrinter->GetOutputSize();
- BOOL bScaleAll = FALSE;
+ sal_Bool bScaleAll = sal_False;
if ( bIsAPI )
{
WarningBox aWarnBox (
@@ -650,15 +644,6 @@ USHORT ViewShellBase::SetPrinter (
-PrintDialog* ViewShellBase::CreatePrintDialog (::Window *pParent)
-{
- (void)pParent;
- return NULL;
-}
-
-
-
-
SfxTabPage* ViewShellBase::CreatePrintOptionsPage(
::Window *pParent,
const SfxItemSet &rOptions)
@@ -671,39 +656,6 @@ SfxTabPage* ViewShellBase::CreatePrintOptionsPage(
-USHORT ViewShellBase::Print(SfxProgress&, BOOL bIsAPI, PrintDialog* pDlg)
-{
- (void)bIsAPI;
- (void)pDlg;
- return 0;
-}
-
-
-
-
-ErrCode ViewShellBase::DoPrint (
- SfxPrinter* pPrinter,
- PrintDialog* pPrintDialog,
- BOOL bSilent, BOOL bIsAPI )
-{
- (void)pPrinter;
- (void)pPrintDialog;
- (void)bSilent;
- (void)bIsAPI;
- return 0;
-}
-
-
-
-
-void ViewShellBase::PreparePrint (PrintDialog* pPrintDialog)
-{
- SfxViewShell::PreparePrint (pPrintDialog);
-}
-
-
-
-
void ViewShellBase::UIActivating( SfxInPlaceClient* pClient )
{
mpImpl->ShowViewTabBar(false);
@@ -745,7 +697,7 @@ SvBorder ViewShellBase::GetBorder (bool )
void ViewShellBase::Execute (SfxRequest& rRequest)
{
- USHORT nSlotId = rRequest.GetSlot();
+ sal_uInt16 nSlotId = rRequest.GetSlot();
switch (nSlotId)
{
@@ -889,7 +841,7 @@ void ViewShellBase::ReadUserDataSequence (
-void ViewShellBase::Activate (BOOL bIsMDIActivate)
+void ViewShellBase::Activate (sal_Bool bIsMDIActivate)
{
SfxViewShell::Activate(bIsMDIActivate);
@@ -907,7 +859,7 @@ void ViewShellBase::Activate (BOOL bIsMDIActivate)
-void ViewShellBase::Deactivate (BOOL bIsMDIActivate)
+void ViewShellBase::Deactivate (sal_Bool bIsMDIActivate)
{
SfxViewShell::Deactivate(bIsMDIActivate);
}
@@ -929,11 +881,11 @@ void ViewShellBase::SetZoomFactor (
-USHORT ViewShellBase::PrepareClose (BOOL bUI, BOOL bForBrowsing)
+sal_uInt16 ViewShellBase::PrepareClose (sal_Bool bUI, sal_Bool bForBrowsing)
{
- USHORT nResult = SfxViewShell::PrepareClose (bUI, bForBrowsing);
+ sal_uInt16 nResult = SfxViewShell::PrepareClose (bUI, bForBrowsing);
- if (nResult == TRUE)
+ if (nResult == sal_True)
{
mpImpl->mbIsClosing = true;
@@ -949,7 +901,7 @@ USHORT ViewShellBase::PrepareClose (BOOL bUI, BOOL bForBrowsing)
-void ViewShellBase::WriteUserData (String& rString, BOOL bBrowse)
+void ViewShellBase::WriteUserData (String& rString, sal_Bool bBrowse)
{
SfxViewShell::WriteUserData (rString, bBrowse);
@@ -962,7 +914,7 @@ void ViewShellBase::WriteUserData (String& rString, BOOL bBrowse)
-void ViewShellBase::ReadUserData (const String& rString, BOOL bBrowse)
+void ViewShellBase::ReadUserData (const String& rString, sal_Bool bBrowse)
{
SfxViewShell::ReadUserData (rString, bBrowse);
@@ -1327,9 +1279,9 @@ void ViewShellBase::Implementation::ProcessRestoreEditingViewSlot (void)
void ViewShellBase::Implementation::ShowViewTabBar (bool bShow)
{
if (mpViewTabBar.is()
- && (mpViewTabBar->GetTabControl()->IsVisible()==TRUE) != bShow)
+ && (mpViewTabBar->GetTabControl()->IsVisible()==sal_True) != bShow)
{
- mpViewTabBar->GetTabControl()->Show(bShow ? TRUE : FALSE);
+ mpViewTabBar->GetTabControl()->Show(bShow ? sal_True : sal_False);
mrBase.Rearrange();
}
}
@@ -1405,8 +1357,8 @@ void ViewShellBase::Implementation::SetPaneVisibility (
// Determine the new visibility state.
const SfxItemSet* pArguments = rRequest.GetArgs();
- BOOL bShowChildWindow;
- USHORT nSlotId = rRequest.GetSlot();
+ sal_Bool bShowChildWindow;
+ sal_uInt16 nSlotId = rRequest.GetSlot();
if (pArguments != NULL)
bShowChildWindow = static_cast<const SfxBoolItem&>(
pArguments->Get(nSlotId)).GetValue();
@@ -1593,7 +1545,7 @@ void ViewShellBase::Implementation::ProcessTaskPaneSlot (SfxRequest& rRequest)
{
// Set the visibility state of the toolpanel and one of its top
// level panels.
- BOOL bShowToolPanel = TRUE;
+ sal_Bool bShowToolPanel = sal_True;
toolpanel::PanelId nPanelId (
toolpanel::PID_UNKNOWN);
bool bPanelIdGiven = false;
@@ -1605,14 +1557,14 @@ void ViewShellBase::Implementation::ProcessTaskPaneSlot (SfxRequest& rRequest)
if ((pArgs->Count() == 1) || (pArgs->Count() == 2))
{
SFX_REQUEST_ARG (rRequest, pIsPanelVisible,
- SfxBoolItem, ID_VAL_ISVISIBLE, FALSE);
+ SfxBoolItem, ID_VAL_ISVISIBLE, sal_False);
if (pIsPanelVisible != NULL)
bShowToolPanel = pIsPanelVisible->GetValue();
}
if (pArgs->Count() == 2)
{
SFX_REQUEST_ARG (rRequest, pPanelId, SfxUInt32Item,
- ID_VAL_PANEL_INDEX, FALSE);
+ ID_VAL_PANEL_INDEX, sal_False);
if (pPanelId != NULL)
{
nPanelId = static_cast<
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index a51ee7f09273..1d6f52adbed9 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -110,18 +110,18 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
{
SdDrawDocument* pDocument = mrViewShell.GetDoc();
SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers;
- BOOL bHandoutMode = FALSE;
+ sal_Bool bHandoutMode = sal_False;
SdPage* pHandoutMPage = NULL;
String aNewName;
String aOldName;
AutoLayout aNewAutoLayout;
- BOOL bBVisible;
- BOOL bBObjsVisible;
+ sal_Bool bBVisible;
+ sal_Bool bBObjsVisible;
const SfxItemSet* pArgs = rRequest.GetArgs();
if (pCurrentPage != NULL && pCurrentPage->TRG_HasMasterPage())
@@ -143,14 +143,14 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
// dialog. We could select that layout in the
// layout panel instead.
/*
- SFX_REQUEST_ARG (rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
+ SFX_REQUEST_ARG (rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, sal_False);
eNewAutoLayout = (AutoLayout) pNewAutoLayout->GetValue
();
*/
}
// Make the layout menu visible in the tool pane.
- SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, TRUE);
+ SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, sal_True);
SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX,
::sd::toolpanel::PID_LAYOUT);
SfxViewFrame* pFrame = mrViewShell.GetViewFrame();
@@ -176,10 +176,10 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
}
else if (pArgs->Count() == 4)
{
- SFX_REQUEST_ARG (rRequest, pNewName, SfxStringItem, ID_VAL_PAGENAME, FALSE);
- SFX_REQUEST_ARG (rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- SFX_REQUEST_ARG (rRequest, pBVisible, SfxBoolItem, ID_VAL_ISPAGEBACK, FALSE);
- SFX_REQUEST_ARG (rRequest, pBObjsVisible, SfxBoolItem, ID_VAL_ISPAGEOBJ, FALSE);
+ SFX_REQUEST_ARG (rRequest, pNewName, SfxStringItem, ID_VAL_PAGENAME, sal_False);
+ SFX_REQUEST_ARG (rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, sal_False);
+ SFX_REQUEST_ARG (rRequest, pBVisible, SfxBoolItem, ID_VAL_ISPAGEBACK, sal_False);
+ SFX_REQUEST_ARG (rRequest, pBObjsVisible, SfxBoolItem, ID_VAL_ISPAGEOBJ, sal_False);
AutoLayout aLayout ((AutoLayout)pNewAutoLayout->GetValue ());
if (aLayout >= AUTOLAYOUT__START
&& aLayout < AUTOLAYOUT__END)
@@ -197,7 +197,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
}
if (ePageKind == PK_HANDOUT)
{
- bHandoutMode = TRUE;
+ bHandoutMode = sal_True;
pHandoutMPage = pDocument->GetMasterSdPage(0, PK_HANDOUT);
}
}
@@ -211,7 +211,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
SdPage* pUndoPage =
bHandoutMode ? pHandoutMPage : pCurrentPage;
- SfxUndoManager* pUndoManager = mrViewShell.GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pUndoManager = mrViewShell.GetDocSh()->GetUndoManager();
DBG_ASSERT(pUndoManager, "No UNDO MANAGER ?!?");
if( pUndoManager )
@@ -219,7 +219,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
String aComment( SdResId(STR_UNDO_MODIFY_PAGE) );
pUndoManager->EnterListAction(aComment, aComment);
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
- pUndoManager, pDocument, pUndoPage, aNewName, aNewAutoLayout, bBVisible, bBObjsVisible);
+ pDocument, pUndoPage, aNewName, aNewAutoLayout, bBVisible, bBObjsVisible);
pUndoManager->AddUndoAction(pAction);
// Clear the selection because the selectec object may be removed as
@@ -234,34 +234,34 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
if (ePageKind == PK_STANDARD)
{
- USHORT nPage = (pCurrentPage->GetPageNum()-1) / 2;
+ sal_uInt16 nPage = (pCurrentPage->GetPageNum()-1) / 2;
SdPage* pNotesPage = pDocument->GetSdPage(nPage, PK_NOTES);
if (pNotesPage != NULL)
pNotesPage->SetName(aNewName);
}
}
- pCurrentPage->SetAutoLayout(aNewAutoLayout, TRUE);
+ pCurrentPage->SetAutoLayout(aNewAutoLayout, sal_True);
- aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
aVisibleLayers.Set(aBckgrnd, bBVisible);
aVisibleLayers.Set(aBckgrndObj, bBObjsVisible);
pCurrentPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
}
else
{
- pHandoutMPage->SetAutoLayout(aNewAutoLayout, TRUE);
+ pHandoutMPage->SetAutoLayout(aNewAutoLayout, sal_True);
}
mrViewShell.GetViewFrame()->GetDispatcher()->Execute(SID_SWITCHPAGE,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
- BOOL bSetModified = TRUE;
+ sal_Bool bSetModified = sal_True;
if (pArgs && pArgs->Count() == 1)
{
- bSetModified = (BOOL) ((SfxBoolItem&) pArgs->Get(SID_MODIFYPAGE)).GetValue();
+ bSetModified = (sal_Bool) ((SfxBoolItem&) pArgs->Get(SID_MODIFYPAGE)).GetValue();
}
pUndoManager->AddUndoAction( new UndoAutoLayoutPosAndSize( *pUndoPage ) );
@@ -278,8 +278,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind ePageKind )
{
- const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATPAGE, FALSE, TYPE(SfxUInt32Item) ) );
- const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATLAYOUT, FALSE, TYPE(SfxUInt32Item) ) );
+ const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATPAGE, sal_False, TYPE(SfxUInt32Item) ) );
+ const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATLAYOUT, sal_False, TYPE(SfxUInt32Item) ) );
SdDrawDocument* pDocument = mrViewShell.GetDoc();
if( !pDocument )
@@ -288,7 +288,7 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP
SdPage* pPage = 0;
if( pWhatPage )
{
- pPage = pDocument->GetSdPage(static_cast<USHORT>(pWhatPage->GetValue()), ePageKind);
+ pPage = pDocument->GetSdPage(static_cast<sal_uInt16>(pWhatPage->GetValue()), ePageKind);
}
if( pPage == 0 )
@@ -304,8 +304,8 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP
// Transform the given request into the four argument form that is
// understood by ProcessModifyPageSlot().
SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin());
- BYTE aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE));
- BYTE aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE));
+ sal_uInt8 aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False));
+ sal_uInt8 aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False));
SetOfByte aVisibleLayers;
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index cdedb01ee7e0..4d34950ad9f6 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -230,8 +230,10 @@ private:
DECL_LINK(WindowEventHandler, VclWindowEvent*);
+#ifdef VERBOSE
void DumpShellStack (const ShellStack& rStack);
void DumpSfxShellStack (void);
+#endif
/** To be called before a shell is taken fom the SFX shell stack. This
method deactivates an active text editing to avoid problems with
@@ -907,7 +909,7 @@ void ViewShellManager::Implementation::UpdateShellStack (void)
// Remember the undo manager from the top-most shell on the stack.
SfxShell* pTopMostShell = mrBase.GetSubShell(0);
- SfxUndoManager* pUndoManager = (pTopMostShell!=NULL)
+ ::svl::IUndoManager* pUndoManager = (pTopMostShell!=NULL)
? pTopMostShell->GetUndoManager()
: NULL;
@@ -922,7 +924,7 @@ void ViewShellManager::Implementation::UpdateShellStack (void)
// 3. Get SFX shell stack.
ShellStack aSfxShellStack;
- USHORT nIndex (0);
+ sal_uInt16 nIndex (0);
while (mrBase.GetSubShell(nIndex)!=NULL)
++nIndex;
aSfxShellStack.reserve(nIndex);
@@ -1008,7 +1010,7 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
// Remember the undo manager from the top-most shell on the stack.
SfxShell* pTopMostShell = mrBase.GetSubShell(0);
- SfxUndoManager* pUndoManager = (pTopMostShell!=NULL)
+ ::svl::IUndoManager* pUndoManager = (pTopMostShell!=NULL)
? pTopMostShell->GetUndoManager()
: NULL;
@@ -1019,7 +1021,7 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
// 0.Make sure that the given shell is on the stack. This is a
// preparation for the following assertion.
- for (USHORT nIndex=0; true; nIndex++)
+ for (sal_uInt16 nIndex=0; true; nIndex++)
{
SfxShell* pShellOnStack = mrBase.GetSubShell(nIndex);
if (pShellOnStack == NULL)
@@ -1037,7 +1039,7 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
{
// 1. Deactivate our shells on the stack before they are removed so
// that during the Deactivation() calls the stack is still intact.
- for (USHORT nIndex=0; true; nIndex++)
+ for (sal_uInt16 nIndex=0; true; nIndex++)
{
SfxShell* pShellOnStack = mrBase.GetSubShell(nIndex);
Deactivate(pShellOnStack);
@@ -1180,7 +1182,7 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent*,
break;
}
}
- return TRUE;
+ return sal_True;
}
@@ -1314,6 +1316,7 @@ void ViewShellManager::Implementation::Shutdown (void)
+#ifdef VERBOSE
void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack)
{
ShellStack::const_reverse_iterator iEntry;
@@ -1332,7 +1335,7 @@ void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack)
void ViewShellManager::Implementation::DumpSfxShellStack (void)
{
ShellStack aSfxShellStack;
- USHORT nIndex (0);
+ sal_uInt16 nIndex (0);
while (mrBase.GetSubShell(nIndex)!=NULL)
++nIndex;
aSfxShellStack.reserve(nIndex);
@@ -1340,7 +1343,7 @@ void ViewShellManager::Implementation::DumpSfxShellStack (void)
aSfxShellStack.push_back(mrBase.GetSubShell(nIndex));
DumpShellStack(aSfxShellStack);
}
-
+#endif
@@ -1365,7 +1368,7 @@ void ViewShellManager::Implementation::Deactivate (SfxShell* pShell)
}
// Now we can deactivate the shell.
- pShell->Deactivate(TRUE);
+ pShell->Deactivate(sal_True);
}
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index 270ace5928c2..49d3a6bd4baf 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -199,7 +199,7 @@ void ViewTabBar::disposing (void)
{
const SolarMutexGuard aSolarGuard;
// Set all references to the one tab page to NULL and delete the page.
- for (USHORT nIndex=0; nIndex<mpTabControl->GetPageCount(); ++nIndex)
+ for (sal_uInt16 nIndex=0; nIndex<mpTabControl->GetPageCount(); ++nIndex)
mpTabControl->SetTabPage(nIndex, NULL);
mpTabPage.reset();
mpTabControl.reset();
@@ -454,7 +454,7 @@ bool ViewTabBar::ActivatePage (void)
pIPClient = dynamic_cast<Client*>(mpViewShellBase->GetIPClient());
if (pIPClient==NULL || ! pIPClient->IsObjectInPlaceActive())
{
- USHORT nIndex (mpTabControl->GetCurPageId() - 1);
+ sal_uInt16 nIndex (mpTabControl->GetCurPageId() - 1);
if (nIndex < maTabBarButtons.size())
{
xConfigurationController->requestResourceActivation(
@@ -553,7 +553,7 @@ void ViewTabBar::AddTabBarButton (
if (nPosition>=0
&& nPosition<=mpTabControl->GetPageCount())
{
- USHORT nIndex ((USHORT)nPosition);
+ sal_uInt16 nIndex ((sal_uInt16)nPosition);
// Insert the button into our local array.
maTabBarButtons.insert(maTabBarButtons.begin()+nIndex, rButton);
@@ -568,7 +568,7 @@ void ViewTabBar::AddTabBarButton (
void ViewTabBar::RemoveTabBarButton (
const ::com::sun::star::drawing::framework::TabBarButton& rButton)
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
for (nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex)
{
if (IsEqual(maTabBarButtons[nIndex], rButton))
@@ -629,7 +629,7 @@ void ViewTabBar::UpdateActiveButton (void)
if (xView.is())
{
Reference<XResourceId> xViewId (xView->getResourceId());
- for (USHORT nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex)
+ for (sal_uInt16 nIndex=0; nIndex<maTabBarButtons.size(); ++nIndex)
{
if (maTabBarButtons[nIndex].ResourceId->compareTo(xViewId) == 0)
{
@@ -647,8 +647,8 @@ void ViewTabBar::UpdateActiveButton (void)
void ViewTabBar::UpdateTabBarButtons (void)
{
TabBarButtonList::const_iterator iTab;
- USHORT nPageCount (mpTabControl->GetPageCount());
- USHORT nIndex;
+ sal_uInt16 nPageCount (mpTabControl->GetPageCount());
+ sal_uInt16 nIndex;
for (iTab=maTabBarButtons.begin(),nIndex=1; iTab!=maTabBarButtons.end(); ++iTab,++nIndex)
{
// Create a new tab when there are not enough.
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 8553401c8608..7aaac3e01326 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -157,10 +157,10 @@ void DrawView::ModelHasChanged()
|*
\************************************************************************/
-BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
- BOOL bReplaceAll)
+sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
+ sal_Bool bReplaceAll)
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
// wird eine Masterpage bearbeitet?
if ( mpDrawViewShell && mpDrawViewShell->GetEditMode() == EM_MASTERPAGE )
@@ -175,11 +175,11 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
// Textedit
String aTemplateName(aLayoutName);
- UINT32 nInv = pEditObject->GetObjInventor();
+ sal_uInt32 nInv = pEditObject->GetObjInventor();
if (nInv == SdrInventor)
{
- UINT16 eObjKind = pEditObject->GetObjIdentifier();
+ sal_uInt16 eObjKind = pEditObject->GetObjIdentifier();
PresObjKind ePresObjKind = rPage.GetPresObjKind(pEditObject);
if ( ePresObjKind == PRESOBJ_TITLE ||
@@ -199,7 +199,7 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
pSheet->GetItemSet().Put(aTempSet);
pSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
- bOk = TRUE;
+ bOk = sal_True;
}
else if (eObjKind == OBJ_OUTLINETEXT)
{
@@ -209,8 +209,8 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
List* pList = (List*)pOV->CreateSelectionList();
aTemplateName += String(SdResId(STR_LAYOUT_OUTLINE));
- pOutliner->SetUpdateMode(FALSE);
- mpDocSh->SetWaitCursor( TRUE );
+ pOutliner->SetUpdateMode(sal_False);
+ mpDocSh->SetWaitCursor( sal_True );
// Platzhalter durch Vorlagennamen ersetzen
String aComment(SdResId(STR_UNDO_CHANGE_PRES_OBJECT));
@@ -222,8 +222,8 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
Paragraph* pPara = (Paragraph*)pList->Last();
while (pPara)
{
- ULONG nParaPos = pOutliner->GetAbsPos( pPara );
- sal_Int16 nDepth = pOutliner->GetDepth( (USHORT) nParaPos );
+ sal_uLong nParaPos = pOutliner->GetAbsPos( pPara );
+ sal_Int16 nDepth = pOutliner->GetDepth( (sal_uInt16) nParaPos );
String aName(rPage.GetLayoutName());
aName += (sal_Unicode)(' ');
aName += String::CreateFromInt32( (nDepth <= 0) ? 1 : nDepth + 1 );
@@ -263,17 +263,17 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
pPara = (Paragraph*)pList->Prev();
if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON &&
- pOutliner->GetDepth( (USHORT) pOutliner->GetAbsPos( (Paragraph*) pList->First() ) ) > 0 )
+ pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos( (Paragraph*) pList->First() ) ) > 0 )
pPara = pOutliner->GetParagraph( 0 ); // Put NumBulletItem in outline level 1
}
- mpDocSh->SetWaitCursor( FALSE );
- pOV->GetOutliner()->SetUpdateMode(TRUE);
+ mpDocSh->SetWaitCursor( sal_False );
+ pOV->GetOutliner()->SetUpdateMode(sal_True);
mpDocSh->GetUndoManager()->LeaveListAction();
delete pList;
- bOk = TRUE;
+ bOk = sal_True;
}
else
{
@@ -285,15 +285,15 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
{
// Selection
const SdrMarkList& rList = GetMarkedObjectList();
- ULONG nMarkCount = rList.GetMarkCount();
- for (ULONG nMark = 0; nMark < nMarkCount; nMark++)
+ sal_uLong nMarkCount = rList.GetMarkCount();
+ for (sal_uLong nMark = 0; nMark < nMarkCount; nMark++)
{
SdrObject* pObject = rList.GetMark(nMark)->GetMarkedSdrObj();
- UINT32 nInv = pObject->GetObjInventor();
+ sal_uInt32 nInv = pObject->GetObjInventor();
if (nInv == SdrInventor)
{
- UINT16 eObjKind = pObject->GetObjIdentifier();
+ sal_uInt16 eObjKind = pObject->GetObjIdentifier();
PresObjKind ePresObjKind = rPage.GetPresObjKind(pObject);
String aTemplateName(aLayoutName);
@@ -314,13 +314,13 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
pSheet->GetItemSet().Put(aTempSet,false);
pSheet->Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
- bOk = TRUE;
+ bOk = sal_True;
}
else if (eObjKind == OBJ_OUTLINETEXT)
{
// Presentation object outline
aTemplateName += String(SdResId(STR_LAYOUT_OUTLINE));
- for (USHORT nLevel = 9; nLevel > 0; nLevel--)
+ for (sal_uInt16 nLevel = 9; nLevel > 0; nLevel--)
{
String aName(rPage.GetLayoutName());
aName += (sal_Unicode)(' ');
@@ -371,7 +371,7 @@ BOOL DrawView::SetAttributes(const SfxItemSet& rSet,
nWhich = aWhichIter.NextWhich();
}
- bOk = TRUE;
+ bOk = sal_True;
}
}
}
@@ -434,7 +434,7 @@ void DrawView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
|*
\************************************************************************/
-void DrawView::BlockPageOrderChangedHint(BOOL bBlock)
+void DrawView::BlockPageOrderChangedHint(sal_Bool bBlock)
{
if (bBlock)
mnPOCHSmph++;
@@ -452,19 +452,19 @@ void DrawView::BlockPageOrderChangedHint(BOOL bBlock)
|*
\************************************************************************/
-BOOL DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+sal_Bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr)
{
- BOOL bResult = TRUE;
+ sal_Bool bResult = sal_True;
// wird eine Masterpage bearbeitet?
if (mpDrawViewShell && mpDrawViewShell->GetEditMode() == EM_MASTERPAGE)
{
- if (IsPresObjSelected(FALSE, TRUE))
+ if (IsPresObjSelected(sal_False, sal_True))
{
InfoBox(mpDrawViewShell->GetActiveWindow(),
String(SdResId(STR_ACTION_NOTPOSSIBLE))).Execute();
- bResult = FALSE;
+ bResult = sal_False;
}
else
{
@@ -492,7 +492,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::co
mpVDev = NULL;
}
- BOOL bStandardPaint = TRUE;
+ sal_Bool bStandardPaint = sal_True;
SdDrawDocument* pDoc = mpDocShell->GetDoc();
if( pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS)
@@ -505,7 +505,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::co
{
if( pShowWindow == pOutDev )
PresPaint(rReg);
- bStandardPaint = FALSE;
+ bStandardPaint = sal_False;
}
}
}
@@ -537,7 +537,7 @@ void DrawView::PresPaint(const Region& rRegion)
|* erschienene Animationsobjekte in der Diashow)
\************************************************************************/
-BOOL DrawView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
+sal_Bool DrawView::IsObjMarkable(SdrObject* pObj, SdrPageView* pPV) const
{
return FmFormView::IsObjMarkable(pObj, pPV);;
}
@@ -589,11 +589,11 @@ void DrawView::DeleteMarked()
SdPage* pPage = 0;
bool bResetLayout = false;
- const ULONG nMarkCount = GetMarkedObjectList().GetMarkCount();
+ const sal_uLong nMarkCount = GetMarkedObjectList().GetMarkCount();
if( nMarkCount )
{
SdrMarkList aList( GetMarkedObjectList() );
- for (ULONG nMark = 0; nMark < nMarkCount; nMark++)
+ for (sal_uLong nMark = 0; nMark < nMarkCount; nMark++)
{
SdrObject* pObj = aList.GetMark(nMark)->GetMarkedSdrObj();
if( pObj && !pObj->IsEmptyPresObj() && pObj->GetUserCall() )
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index b8c6924f79e7..19c6c0e57fdb 100644..100755
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -126,7 +126,7 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
{
SfxItemSet aAttrSet( mpView->GetDoc()->GetPool() );
mpView->GetAttributes( aAttrSet );
- rSet.Put(aAttrSet, FALSE); // <- FALSE, damit DontCare-Status uebernommen wird
+ rSet.Put(aAttrSet, sal_False); // <- sal_False, damit DontCare-Status uebernommen wird
FunctionReference xFunc( mpViewSh->GetCurrentFunction() );
@@ -134,13 +134,13 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
{
if(xFunc->ISA(FuSelection))
{
- USHORT nEditMode = static_cast<FuSelection*>(xFunc.get())->GetEditMode();
- rSet.Put(SfxBoolItem(nEditMode, TRUE));
+ sal_uInt16 nEditMode = static_cast<FuSelection*>(xFunc.get())->GetEditMode();
+ rSet.Put(SfxBoolItem(nEditMode, sal_True));
}
else if (xFunc->ISA(FuConstructBezierPolygon))
{
- USHORT nEditMode = static_cast<FuConstructBezierPolygon*>(xFunc.get())->GetEditMode();
- rSet.Put(SfxBoolItem(nEditMode, TRUE));
+ sal_uInt16 nEditMode = static_cast<FuConstructBezierPolygon*>(xFunc.get())->GetEditMode();
+ rSet.Put(SfxBoolItem(nEditMode, sal_True));
}
}
@@ -188,8 +188,8 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
switch (eSegm)
{
case SDRPATHSEGMENT_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CONVERT); break;
- case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,FALSE)); break; // Button reingedrueckt = Kurve
- case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,TRUE)); break;
+ case SDRPATHSEGMENT_LINE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_False)); break; // Button reingedrueckt = Kurve
+ case SDRPATHSEGMENT_CURVE : rSet.Put(SfxBoolItem(SID_BEZIER_CONVERT,sal_True)); break;
default: break;
}
}
@@ -205,9 +205,9 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
switch (eSmooth)
{
case SDRPATHSMOOTH_DONTCARE : break;
- case SDRPATHSMOOTH_ANGULAR : rSet.Put(SfxBoolItem(SID_BEZIER_EDGE, TRUE)); break;
- case SDRPATHSMOOTH_ASYMMETRIC: rSet.Put(SfxBoolItem(SID_BEZIER_SMOOTH,TRUE)); break;
- case SDRPATHSMOOTH_SYMMETRIC : rSet.Put(SfxBoolItem(SID_BEZIER_SYMMTR,TRUE)); break;
+ case SDRPATHSMOOTH_ANGULAR : rSet.Put(SfxBoolItem(SID_BEZIER_EDGE, sal_True)); break;
+ case SDRPATHSMOOTH_ASYMMETRIC: rSet.Put(SfxBoolItem(SID_BEZIER_SMOOTH,sal_True)); break;
+ case SDRPATHSMOOTH_SYMMETRIC : rSet.Put(SfxBoolItem(SID_BEZIER_SYMMTR,sal_True)); break;
}
}
if (!pIPPEC || !pIPPEC->IsOpenCloseMarkedObjectsPossible())
@@ -220,8 +220,8 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
switch (eClose)
{
case SDROBJCLOSED_DONTCARE: rSet.InvalidateItem(SID_BEZIER_CLOSE); break;
- case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,FALSE)); break;
- case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,TRUE)); break;
+ case SDROBJCLOSED_OPEN : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_False)); break;
+ case SDROBJCLOSED_CLOSED : rSet.Put(SfxBoolItem(SID_BEZIER_CLOSE,sal_True)); break;
default: break;
}
}
@@ -242,7 +242,7 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
void BezierObjectBar::Execute(SfxRequest& rReq)
{
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch (nSId)
{
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 8fa63b3297fd..a6a8f378a9f1 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -167,7 +167,7 @@ TextObjectBar::~TextObjectBar()
void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SfxItemSet aAttrSet( mpView->GetDoc()->GetPool() );
SvtLanguageOptions aLangOpt;
sal_Bool bDisableParagraphTextDirection = !aLangOpt.IsCTLFontEnabled();
@@ -177,7 +177,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
while ( nWhich )
{
- USHORT nSlotId = SfxItemPool::IsWhich(nWhich)
+ sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
? GetPool().GetSlotId(nWhich)
: nWhich;
@@ -189,9 +189,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
case SID_ATTR_CHAR_POSTURE:
{
SvxScriptSetItem aSetItem( nSlotId, GetPool() );
- aSetItem.GetItemSet().Put( aAttrSet, FALSE );
+ aSetItem.GetItemSet().Put( aAttrSet, sal_False );
- USHORT nScriptType = mpView->GetScriptType();
+ sal_uInt16 nScriptType = mpView->GetScriptType();
if( (nSlotId == SID_ATTR_CHAR_FONT) || (nSlotId == SID_ATTR_CHAR_FONTHEIGHT) )
{
@@ -243,10 +243,10 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
case SID_OUTLINE_UP:
case SID_OUTLINE_DOWN:
{
- BOOL bDisableLeft = TRUE;
- BOOL bDisableRight = TRUE;
- BOOL bDisableUp = TRUE;
- BOOL bDisableDown = TRUE;
+ sal_Bool bDisableLeft = sal_True;
+ sal_Bool bDisableRight = sal_True;
+ sal_Bool bDisableUp = sal_True;
+ sal_Bool bDisableDown = sal_True;
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
if (mpView->ISA(OutlineView))
@@ -255,7 +255,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
mpViewShell->GetActiveWindow());
}
- BOOL bOutlineViewSh = mpViewShell->ISA(OutlineViewShell);
+ sal_Bool bOutlineViewSh = mpViewShell->ISA(OutlineViewShell);
if (pOLV &&
( pOLV->GetOutliner()->GetMode() == OUTLINERMODE_OUTLINEOBJECT || bOutlineViewSh ) )
@@ -266,7 +266,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
Paragraph* pPara = (Paragraph*) pList->First();
// find out if we are a OutlineView
- BOOL bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode());
+ sal_Bool bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode());
// This is ONLY for OutlineViews
if(bIsOutlineView)
@@ -276,7 +276,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if(pOutl->GetAbsPos(pPara) > 1 || ( pOutl->HasParaFlag(pPara,PARAFLAG_ISPAGE) && pOutl->GetAbsPos(pPara) > 0 ) )
{
// Nicht ganz oben
- bDisableUp = FALSE;
+ bDisableUp = sal_False;
}
}
else
@@ -285,25 +285,25 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if(pOutl->GetAbsPos(pPara) > 0)
{
// Nicht ganz oben
- bDisableUp = FALSE;
+ bDisableUp = sal_False;
}
}
while (pPara)
{
- sal_Int16 nDepth = pOutl->GetDepth( (USHORT) pOutl->GetAbsPos( pPara ) );
+ sal_Int16 nDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE )) )
{
// Nicht minimale Tiefe
- bDisableLeft = FALSE;
+ bDisableLeft = sal_False;
}
if( (nDepth < pOLV->GetOutliner()->GetMaxDepth() && ( !bOutlineViewSh || pOutl->GetAbsPos(pPara) != 0 )) ||
(bOutlineViewSh && (nDepth <= 0) && pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE ) && pOutl->GetAbsPos(pPara) != 0) )
{
// Nicht maximale Tiefe und nicht ganz oben
- bDisableRight = FALSE;
+ bDisableRight = sal_False;
}
pPara = static_cast<Paragraph*>( pList->Next() );
@@ -313,7 +313,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
( pOutl->GetParagraphCount() > 1 || !bOutlineViewSh) )
{
// Nicht letzter Absatz
- bDisableDown = FALSE;
+ bDisableDown = sal_False;
}
// disable when first para and 2nd is not a title
@@ -325,7 +325,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
&& !pOutl->HasParaFlag( pOutl->GetParagraph(1), PARAFLAG_ISPAGE ) )
{
// Needs to be disabled
- bDisableDown = TRUE;
+ bDisableDown = sal_True;
}
delete pList;
@@ -352,13 +352,13 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
else
{
- BOOL bLeftToRight = TRUE;
+ sal_Bool bLeftToRight = sal_True;
SdrOutliner* pOutl = mpView->GetTextEditOutliner();
if( pOutl )
{
if( pOutl->IsVertical() )
- bLeftToRight = FALSE;
+ bLeftToRight = sal_False;
}
else
bLeftToRight = ( (const SvxWritingModeItem&) aAttrSet.Get( SDRATTR_TEXTDIRECTION ) ).GetValue() == com::sun::star::text::WritingMode_LR_TB;
@@ -412,7 +412,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
- rSet.Put( aAttrSet, FALSE ); // <- FALSE, damit DontCare-Status uebernommen wird
+ rSet.Put( aAttrSet, sal_False ); // <- sal_False, damit DontCare-Status uebernommen wird
// die sind im Gliederungsmodus disabled
@@ -440,17 +440,17 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
ESelection aSel = pOLV->GetSelection();
aSel.Adjust();
- ULONG nStartPara = aSel.nStartPara;
- ULONG nEndPara = aSel.nEndPara;
+ sal_uLong nStartPara = aSel.nStartPara;
+ sal_uLong nEndPara = aSel.nEndPara;
if( !aSel.HasRange() )
{
nStartPara = 0;
nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
}
long nUpper = 0L;
- for( ULONG nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
- const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( (USHORT)nPara );
+ const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( (sal_uInt16)nPara );
const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) rItems.Get( EE_PARA_ULSPACE );
nUpper = Max( nUpper, (long)rItem.GetUpper() );
}
@@ -469,16 +469,16 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
switch( eAdj )
{
case SVX_ADJUST_LEFT:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_LEFT, sal_True ) );
break;
case SVX_ADJUST_CENTER:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_CENTER, sal_True ) );
break;
case SVX_ADJUST_RIGHT:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_RIGHT, sal_True ) );
break;
case SVX_ADJUST_BLOCK:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_ADJUST_BLOCK, sal_True ) );
break;
default:
break;
@@ -503,13 +503,13 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
break;
case FRMDIR_HORI_LEFT_TOP:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, TRUE ) );
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, sal_True ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, sal_False ) );
break;
case FRMDIR_HORI_RIGHT_TOP:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, FALSE ) );
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_LEFT_TO_RIGHT, sal_False ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_RIGHT_TO_LEFT, sal_True ) );
break;
// The case for the superordinate object is missing.
@@ -539,26 +539,26 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
if (aBulletState.GetValue() != 0)
{
- rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, TRUE));
+ rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, sal_True));
}
else
{
- rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, FALSE));
+ rSet.Put(SfxBoolItem(FN_NUM_BULLET_ON, sal_False));
}
}
*/
- USHORT nLineSpace = (USHORT) ( (const SvxLineSpacingItem&) aAttrSet.
+ sal_uInt16 nLineSpace = (sal_uInt16) ( (const SvxLineSpacingItem&) aAttrSet.
Get( EE_PARA_SBL ) ).GetPropLineSpace();
switch( nLineSpace )
{
case 100:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_10, sal_True ) );
break;
case 150:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_15, sal_True ) );
break;
case 200:
- rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_ATTR_PARA_LINESPACE_20, sal_True ) );
break;
}
}
@@ -568,9 +568,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
if( eEsc == SVX_ESCAPEMENT_SUPERSCRIPT )
- rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, sal_True ) );
else if( eEsc == SVX_ESCAPEMENT_SUBSCRIPT )
- rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_SET_SUB_SCRIPT, sal_True ) );
}
/*************************************************************************
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index b0a9fd98e527..78357508e71c 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -95,15 +95,15 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pPoolItem = NULL;
- USHORT nSlot = rReq.GetSlot();
- BOOL bOutlineMode = FALSE;
+ sal_uInt16 nSlot = rReq.GetSlot();
+ sal_Bool bOutlineMode = sal_False;
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
if (mpView->ISA(OutlineView))
{
- bOutlineMode = TRUE;
+ bOutlineMode = sal_True;
pOLV = static_cast<OutlineView*>(mpView)
->GetViewByWindow(mpViewShell->GetActiveWindow());
@@ -149,14 +149,14 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
ESelection aSel = pOLV->GetSelection();
aSel.Adjust();
- ULONG nStartPara = aSel.nStartPara;
- ULONG nEndPara = aSel.nEndPara;
+ sal_uLong nStartPara = aSel.nStartPara;
+ sal_uLong nEndPara = aSel.nEndPara;
if( !aSel.HasRange() )
{
nStartPara = 0;
nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
}
- for( ULONG nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
SfxStyleSheet* pStyleSheet = NULL;
if (pOLV->GetOutliner() != NULL)
@@ -164,8 +164,8 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if (pStyleSheet != NULL)
{
SfxItemSet aAttr( pStyleSheet->GetItemSet() );
- SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( (USHORT) nPara ) );
- aAttr.Put( aTmpSet, FALSE ); // FALSE= InvalidItems nicht als Default, sondern als "Loecher" betrachten
+ SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( (sal_uInt16) nPara ) );
+ aAttr.Put( aTmpSet, sal_False ); // sal_False= InvalidItems nicht als Default, sondern als "Loecher" betrachten
const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aAttr.Get( EE_PARA_ULSPACE );
SvxULSpaceItem* pNewItem = (SvxULSpaceItem*) rItem.Clone();
@@ -177,7 +177,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nUpper -= 100;
nUpper = Max( (long) nUpper, 0L );
}
- pNewItem->SetUpper( (USHORT) nUpper );
+ pNewItem->SetUpper( (sal_uInt16) nUpper );
long nLower = pNewItem->GetLower();
if( nSlot == SID_PARASPACE_INCREASE )
@@ -187,12 +187,12 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nLower -= 100;
nLower = Max( (long) nLower, 0L );
}
- pNewItem->SetLower( (USHORT) nLower );
+ pNewItem->SetLower( (sal_uInt16) nLower );
SfxItemSet aNewAttrs( aAttr );
aNewAttrs.Put( *pNewItem );
delete pNewItem;
- pOLV->GetOutliner()->SetParaAttribs( (USHORT)nPara, aNewAttrs );
+ pOLV->GetOutliner()->SetParaAttribs( (sal_uInt16)nPara, aNewAttrs );
}
}
}
@@ -218,7 +218,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nUpper -= 100;
nUpper = Max( (long) nUpper, 0L );
}
- pNewItem->SetUpper( (USHORT) nUpper );
+ pNewItem->SetUpper( (sal_uInt16) nUpper );
long nLower = pNewItem->GetLower();
if( nSlot == SID_PARASPACE_INCREASE )
@@ -228,7 +228,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nLower -= 100;
nLower = Max( (long) nLower, 0L );
}
- pNewItem->SetLower( (USHORT) nLower );
+ pNewItem->SetLower( (sal_uInt16) nLower );
aNewAttrs.Put( *pNewItem );
delete pNewItem;
@@ -241,7 +241,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
Invalidate();
// Um die Preview (im Gliederungsmodus) zu aktualisieren muss
// der Slot invalidiert werden:
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
break;
@@ -254,7 +254,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
// Ensure bold/italic etc. icon state updates
Invalidate();
// trigger preview refresh
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
rReq.Done();
}
@@ -269,7 +269,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
// Ensure bold/italic etc. icon state updates
Invalidate();
// trigger preview refresh
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
rReq.Done();
}
@@ -282,7 +282,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
pOLV->AdjustHeight( -1 );
// trigger preview refresh
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
rReq.Done();
}
@@ -295,7 +295,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
pOLV->AdjustHeight( 1 );
// trigger preview refresh
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
rReq.Done();
}
@@ -313,7 +313,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
rReq.Done( aAttr );
mpView->SetAttributes( aAttr );
Invalidate();
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
break;
@@ -489,7 +489,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
if( pArgs )
{
- if( SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_FONTINFO, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_FONTINFO, sal_True, &pPoolItem ) )
aNewAttr.Put( *pPoolItem );
}
else
@@ -501,7 +501,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
if( pArgs )
{
- if( SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_FONTHEIGHT, TRUE, &pPoolItem ) )
+ if( SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_FONTHEIGHT, sal_True, &pPoolItem ) )
aNewAttr.Put( *pPoolItem );
}
else
@@ -511,7 +511,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
break;
case SID_ATTR_CHAR_COLOR:
{
- if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_COLOR, TRUE, &pPoolItem ) )
+ if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( EE_CHAR_COLOR, sal_True, &pPoolItem ) )
aNewAttr.Put( *pPoolItem );
}
break;
@@ -551,8 +551,8 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
sal_Bool bLeftToRight = nSlot == SID_ATTR_PARA_LEFT_TO_RIGHT;
- USHORT nAdjust = SVX_ADJUST_LEFT;
- if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, TRUE, &pPoolItem ) )
+ sal_uInt16 nAdjust = SVX_ADJUST_LEFT;
+ if( SFX_ITEM_ON == aEditAttr.GetItemState(EE_PARA_JUST, sal_True, &pPoolItem ) )
nAdjust = ( (SvxAdjustItem*)pPoolItem)->GetEnumValue();
if( bLeftToRight )
@@ -579,7 +579,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
nSlot == SID_ATTR_CHAR_WEIGHT )
{
// #i78017 establish the same behaviour as in Writer
- USHORT nScriptType = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
+ sal_uInt16 nScriptType = SCRIPTTYPE_LATIN | SCRIPTTYPE_ASIAN | SCRIPTTYPE_COMPLEX;
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptType = mpView->GetScriptType();
@@ -599,7 +599,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
// Um die Preview (im Gliederungsmodus) zu aktualisieren muss
// der Slot invalidiert werden:
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
+ mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, sal_True, sal_False );
}
break;
}
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index c2810502dc2f..f31c56f5bc2c 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -105,7 +105,7 @@ using namespace com::sun::star;
namespace sd {
-void DrawViewShell::Activate(BOOL bIsMDIActivate)
+void DrawViewShell::Activate(sal_Bool bIsMDIActivate)
{
ViewShell::Activate(bIsMDIActivate);
}
@@ -137,7 +137,7 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
|*
\************************************************************************/
-void DrawViewShell::Deactivate(BOOL bIsMDIActivate)
+void DrawViewShell::Deactivate(sal_Bool bIsMDIActivate)
{
ViewShell::Deactivate(bIsMDIActivate);
}
@@ -173,7 +173,7 @@ void DrawViewShell::SelectionHasChanged (void)
Invalidate();
//Update3DWindow(); // 3D-Controller
- SfxBoolItem aItem( SID_3D_STATE, TRUE );
+ SfxBoolItem aItem( SID_3D_STATE, sal_True );
GetViewFrame()->GetDispatcher()->Execute(
SID_3D_STATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -188,8 +188,8 @@ void DrawViewShell::SelectionHasChanged (void)
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
{
@@ -202,7 +202,7 @@ void DrawViewShell::SelectionHasChanged (void)
}
ViewShellBase& rBase = GetViewShellBase();
- rBase.SetVerbs(0);
+ rBase.SetVerbs( uno::Sequence< embed::VerbDescriptor >() );
try
{
@@ -278,7 +278,7 @@ void DrawViewShell::SelectionHasChanged (void)
// Invalidate for every subshell
GetViewShellBase().GetViewShellManager()->InvalidateAllSubShells(this);
- mpDrawView->UpdateSelectionClipboard( FALSE );
+ mpDrawView->UpdateSelectionClipboard( sal_False );
GetViewShellBase().GetDrawController().FireSelectionChangeListener();
}
@@ -294,7 +294,7 @@ void DrawViewShell::SetZoom( long nZoom )
{
// Make sure that the zoom factor will not be recalculated on
// following window resizings.
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
ViewShell::SetZoom( nZoom );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
@@ -322,16 +322,16 @@ void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect )
|*
\************************************************************************/
-USHORT DrawViewShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 DrawViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
- if ( ViewShell::PrepareClose(bUI, bForBrowsing) != TRUE )
- return FALSE;
+ if ( ViewShell::PrepareClose(bUI, bForBrowsing) != sal_True )
+ return sal_False;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( bRet && HasCurrentFunction() )
{
- USHORT nID = GetCurrentFunction()->GetSlotID();
+ sal_uInt16 nID = GetCurrentFunction()->GetSlotID();
if (nID == SID_TEXTEDIT || nID == SID_ATTR_CHAR)
{
mpDrawView->SdrEndTextEdit();
@@ -359,7 +359,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
{
ViewShellManager::UpdateLock aLock (GetViewShellBase().GetViewShellManager());
- USHORT nActualPageNum = 0;
+ sal_uInt16 nActualPageNum = 0;
GetViewShellBase().GetDrawController().FireChangeEditMode (eEMode == EM_MASTERPAGE);
GetViewShellBase().GetDrawController().FireChangeLayerMode (bIsLayerModeActive);
@@ -408,9 +408,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
SdPage* pPage;
String aPageName;
- USHORT nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
+ sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
- for (USHORT i = 0; i < nPageCnt; i++)
+ for (sal_uInt16 i = 0; i < nPageCnt; i++)
{
pPage = GetDoc()->GetSdPage(i, mePageKind);
aPageName = pPage->GetName();
@@ -432,7 +432,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
* MASTERPAGE
******************************************************************/
GetViewFrame()->SetChildWindow(
- AnimationChildWindow::GetChildWindowId(), FALSE );
+ AnimationChildWindow::GetChildWindowId(), sal_False );
if (!mpActualPage)
{
@@ -441,10 +441,10 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
}
maTabControl.Clear();
- USHORT nActualMasterPageNum = 0;
- USHORT nMasterPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind);
+ sal_uInt16 nActualMasterPageNum = 0;
+ sal_uInt16 nMasterPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind);
- for (USHORT i = 0; i < nMasterPageCnt; i++)
+ for (sal_uInt16 i = 0; i < nMasterPageCnt; i++)
{
SdPage* pMaster = GetDoc()->GetMasterSdPage(i, mePageKind);
String aLayoutName(pMaster->GetLayoutName());
@@ -534,11 +534,11 @@ long DrawViewShell::GetHCtrlWidth()
|*
\************************************************************************/
-SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, BOOL bIsFirst)
+SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, sal_Bool bIsFirst)
{
Ruler* pRuler;
WinBits aWBits;
- USHORT nFlags = SVXRULER_SUPPORT_OBJECT;
+ sal_uInt16 nFlags = SVXRULER_SUPPORT_OBJECT;
if ( bIsFirst )
{
@@ -555,10 +555,10 @@ SvxRuler* DrawViewShell::CreateHRuler (::sd::Window* pWin, BOOL bIsFirst)
pRuler->SetSourceUnit(pWin->GetMapMode().GetMapUnit());
// Metric ...
- UINT16 nMetric = (UINT16)GetDoc()->GetUIUnit();
+ sal_uInt16 nMetric = (sal_uInt16)GetDoc()->GetUIUnit();
if( nMetric == 0xffff )
- nMetric = (UINT16)GetViewShellBase().GetViewFrame()->GetDispatcher()->GetModule()->GetFieldUnit();
+ nMetric = (sal_uInt16)GetViewShellBase().GetViewFrame()->GetDispatcher()->GetModule()->GetFieldUnit();
pRuler->SetUnit( FieldUnit( nMetric ) );
@@ -582,17 +582,17 @@ SvxRuler* DrawViewShell::CreateVRuler(::sd::Window* pWin)
{
Ruler* pRuler;
WinBits aWBits = WB_VSCROLL | WB_3DLOOK | WB_BORDER;
- USHORT nFlags = SVXRULER_SUPPORT_OBJECT;
+ sal_uInt16 nFlags = SVXRULER_SUPPORT_OBJECT;
pRuler = new Ruler(*this, GetParentWindow(), pWin, nFlags,
GetViewFrame()->GetBindings(), aWBits);
pRuler->SetSourceUnit(pWin->GetMapMode().GetMapUnit());
// Metric same as HRuler, use document setting
- UINT16 nMetric = (UINT16)GetDoc()->GetUIUnit();
+ sal_uInt16 nMetric = (sal_uInt16)GetDoc()->GetUIUnit();
if( nMetric == 0xffff )
- nMetric = (UINT16)GetViewShellBase().GetViewFrame()->GetDispatcher()->GetModule()->GetFieldUnit();
+ nMetric = (sal_uInt16)GetViewShellBase().GetViewFrame()->GetDispatcher()->GetModule()->GetFieldUnit();
pRuler->SetUnit( FieldUnit( nMetric ) );
@@ -687,11 +687,11 @@ SdPage* DrawViewShell::getCurrentPage() const
if (meEditMode == EM_PAGE)
{
- return GetDoc()->GetSdPage((USHORT)nCurrentPage, mePageKind);
+ return GetDoc()->GetSdPage((sal_uInt16)nCurrentPage, mePageKind);
}
else // EM_MASTERPAGE
{
- return GetDoc()->GetMasterSdPage((USHORT)nCurrentPage, mePageKind);
+ return GetDoc()->GetMasterSdPage((sal_uInt16)nCurrentPage, mePageKind);
}
}
@@ -707,10 +707,10 @@ void DrawViewShell::ResetActualPage()
if (!GetDoc())
return;
- USHORT nCurrentPage = maTabControl.GetCurPageId() - 1;
- USHORT nPageCount = (meEditMode == EM_PAGE)?GetDoc()->GetSdPageCount(mePageKind):GetDoc()->GetMasterSdPageCount(mePageKind);
+ sal_uInt16 nCurrentPage = maTabControl.GetCurPageId() - 1;
+ sal_uInt16 nPageCount = (meEditMode == EM_PAGE)?GetDoc()->GetSdPageCount(mePageKind):GetDoc()->GetMasterSdPageCount(mePageKind);
if (nPageCount > 0)
- nCurrentPage = Min((USHORT)(nPageCount - 1), nCurrentPage);
+ nCurrentPage = Min((sal_uInt16)(nPageCount - 1), nCurrentPage);
else
nCurrentPage = 0;
@@ -723,7 +723,7 @@ void DrawViewShell::ResetActualPage()
SdPage* pPage = NULL;
String aPageName;
- for (USHORT i = 0; i < nPageCount; i++)
+ for (sal_uInt16 i = 0; i < nPageCount; i++)
{
pPage = GetDoc()->GetSdPage(i, mePageKind);
aPageName = pPage->GetName();
@@ -739,10 +739,10 @@ void DrawViewShell::ResetActualPage()
{
SdPage* pActualPage = GetDoc()->GetMasterSdPage(nCurrentPage, mePageKind);
maTabControl.Clear();
- USHORT nActualMasterPageNum = 0;
+ sal_uInt16 nActualMasterPageNum = 0;
- USHORT nMasterPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind);
- for (USHORT i = 0; i < nMasterPageCnt; i++)
+ sal_uInt16 nMasterPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind);
+ for (sal_uInt16 i = 0; i < nMasterPageCnt; i++)
{
SdPage* pMaster = GetDoc()->GetMasterSdPage(i, mePageKind);
String aLayoutName(pMaster->GetLayoutName());
@@ -779,8 +779,8 @@ ErrCode DrawViewShell::DoVerb(long nVerb)
SdrMark* pMark = rMarkList.GetMark(0);
SdrObject* pObj = pMark->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nSdrObjKind = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier();
if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
{
@@ -799,9 +799,9 @@ ErrCode DrawViewShell::DoVerb(long nVerb)
|*
\************************************************************************/
-BOOL DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
+sal_Bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
{
- BOOL bActivated = FALSE;
+ sal_Bool bActivated = sal_False;
if ( !GetDocSh()->IsUIActive() )
{
@@ -827,7 +827,7 @@ BOOL DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
void LclResetFlag (bool& rbFlag) {rbFlag = false;}
-BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
+sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
/** Under some circumstances there are nested calls to SwitchPage() and
may crash the application (activation of form controls when the
@@ -836,7 +836,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
would jump to the wrong page anyway.)
*/
if (mbIsInSwitchPage)
- return FALSE;
+ return sal_False;
mbIsInSwitchPage = true;
comphelper::ScopeGuard aGuard (::boost::bind(LclResetFlag, ::boost::ref(mbIsInSwitchPage)));
@@ -848,10 +848,10 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
::std::mem_fun(&DrawViewShell::SwitchPage),
this,
nSelectedPage));
- return FALSE;
+ return sal_False;
}
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
// With the current implementation of FuSlideShow there is a problem
// when it dsplays the show in a window: When the show is stopped it
@@ -869,7 +869,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
{
// Make sure that the given page index points to an existing page. Move
// the index into the valid range if necessary.
- USHORT nPageCount = (meEditMode == EM_PAGE)
+ sal_uInt16 nPageCount = (meEditMode == EM_PAGE)
? GetDoc()->GetSdPageCount(mePageKind)
: GetDoc()->GetMasterSdPageCount(mePageKind);
if (nSelectedPage >= nPageCount)
@@ -880,7 +880,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
{
ModifyGuard aGuard2( GetDoc() );
- bOK = TRUE;
+ bOK = sal_True;
if (mpActualPage)
{
@@ -902,7 +902,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
&& sPageText == maTabControl.GetPageText(nSelectedPage+1))
{
// this slide is already visible
- return TRUE;
+ return sal_True;
}
}
}
@@ -924,7 +924,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
&& pNewPage->GetName() == maTabControl.GetPageText(nSelectedPage+1))
{
// this slide is already visible
- return TRUE;
+ return sal_True;
}
}
}
@@ -944,8 +944,8 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
SdPage* pMaster = GetDoc()->GetMasterSdPage(nSelectedPage, mePageKind);
// Passt die selektierte Seite zur MasterPage?
- USHORT nPageCount = GetDoc()->GetSdPageCount(mePageKind);
- for (USHORT i = 0; i < nPageCount; i++)
+ sal_uInt16 nPageCount = GetDoc()->GetSdPageCount(mePageKind);
+ for (sal_uInt16 i = 0; i < nPageCount; i++)
{
SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
if(pPage && pPage->IsSelected() && pMaster == &(pPage->TRG_GetMasterPage()))
@@ -958,7 +958,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
if (!mpActualPage)
{
// Die erste Seite nehmen, welche zur MasterPage passt
- for (USHORT i = 0; i < nPageCount; i++)
+ for (sal_uInt16 i = 0; i < nPageCount; i++)
{
SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
if(pPage && pMaster == &(pPage->TRG_GetMasterPage()))
@@ -970,10 +970,10 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
}
}
- for (USHORT i = 0; i < GetDoc()->GetSdPageCount(mePageKind); i++)
+ for (sal_uInt16 i = 0; i < GetDoc()->GetSdPageCount(mePageKind); i++)
{
// Alle Seiten deselektieren
- GetDoc()->SetSelected( GetDoc()->GetSdPage(i, mePageKind), FALSE);
+ GetDoc()->SetSelected( GetDoc()->GetSdPage(i, mePageKind), sal_False);
}
if (!mpActualPage)
@@ -984,7 +984,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
// diese Seite auch selektieren (mpActualPage zeigt immer auf Zeichenseite,
// nie auf eine Masterpage)
- GetDoc()->SetSelected(mpActualPage, TRUE);
+ GetDoc()->SetSelected(mpActualPage, sal_True);
rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) );
if( !xSlideshow.is() || !xSlideshow->isRunning() || ( xSlideshow->getAnimationMode() != ANIMATIONMODE_SHOW ) )
@@ -1001,7 +1001,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
/**********************************************************************
* PAGEMODE
**********************************************************************/
- GetDoc()->SetSelected(mpActualPage, TRUE);
+ GetDoc()->SetSelected(mpActualPage, sal_True);
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
@@ -1093,7 +1093,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
if( !pMaster ) // Falls es diese Page nicht geben sollte
pMaster = GetDoc()->GetMasterSdPage(0, mePageKind);
- USHORT nNum = pMaster->GetPageNum();
+ sal_uInt16 nNum = pMaster->GetPageNum();
mpDrawView->ShowSdrPage(mpDrawView->GetModel()->GetMasterPage(nNum));
GetViewShellBase().GetDrawController().FireSwitchCurrentPage(pMaster);
@@ -1155,12 +1155,12 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
// Damit der Navigator (und das Effekte-Window) das mitbekommt (/-men)
SfxBindings& rBindings = GetViewFrame()->GetBindings();
- rBindings.Invalidate(SID_NAVIGATOR_PAGENAME, TRUE, FALSE);
- rBindings.Invalidate(SID_STATUS_PAGE, TRUE, FALSE);
- rBindings.Invalidate(SID_DELETE_MASTER_PAGE, TRUE, FALSE);
- rBindings.Invalidate(SID_DELETE_PAGE, TRUE, FALSE);
- rBindings.Invalidate(SID_ASSIGN_LAYOUT,TRUE,FALSE);
- rBindings.Invalidate(SID_INSERTPAGE,TRUE,FALSE);
+ rBindings.Invalidate(SID_NAVIGATOR_PAGENAME, sal_True, sal_False);
+ rBindings.Invalidate(SID_STATUS_PAGE, sal_True, sal_False);
+ rBindings.Invalidate(SID_DELETE_MASTER_PAGE, sal_True, sal_False);
+ rBindings.Invalidate(SID_DELETE_PAGE, sal_True, sal_False);
+ rBindings.Invalidate(SID_ASSIGN_LAYOUT,sal_True,sal_False);
+ rBindings.Invalidate(SID_INSERTPAGE,sal_True,sal_False);
UpdatePreview( mpActualPage );
mpDrawView->AdjustMarkHdl();
@@ -1176,12 +1176,12 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
|*
\************************************************************************/
-BOOL DrawViewShell::IsSwitchPageAllowed() const
+sal_Bool DrawViewShell::IsSwitchPageAllowed() const
{
bool bOK = true;
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell!=NULL && !pFormShell->PrepareClose (FALSE))
+ if (pFormShell!=NULL && !pFormShell->PrepareClose (sal_False))
bOK = false;
return bOK;
@@ -1202,8 +1202,8 @@ void DrawViewShell::ResetActualLayer()
// remember old layer cound and current layer id
// this is needed when one layer is renamed to
// restore current layer
- USHORT nOldLayerCnt = pLayerBar->GetPageCount();
- USHORT nOldLayerId = pLayerBar->GetCurPageId();
+ sal_uInt16 nOldLayerCnt = pLayerBar->GetPageCount();
+ sal_uInt16 nOldLayerId = pLayerBar->GetCurPageId();
/*************************************************************
* Update fuer LayerTab
@@ -1217,11 +1217,11 @@ void DrawViewShell::ResetActualLayer()
String aLayoutLayer( SdResId(STR_LAYER_LAYOUT) );
String aControlsLayer( SdResId(STR_LAYER_CONTROLS) );
String aMeasureLinesLayer( SdResId(STR_LAYER_MEASURELINES) );
- USHORT nActiveLayer = SDRLAYER_NOTFOUND;
+ sal_uInt16 nActiveLayer = SDRLAYER_NOTFOUND;
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
- USHORT nLayerCnt = rLayerAdmin.GetLayerCount();
+ sal_uInt16 nLayerCnt = rLayerAdmin.GetLayerCount();
- for ( USHORT nLayer = 0; nLayer < nLayerCnt; nLayer++ )
+ for ( sal_uInt16 nLayer = 0; nLayer < nLayerCnt; nLayer++ )
{
aName = rLayerAdmin.GetLayer(nLayer)->GetName();
@@ -1317,8 +1317,8 @@ sal_Int8 DrawViewShell::AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer )
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer )
{
if( nPage != SDRPAGE_NOTFOUND )
nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum();
@@ -1339,8 +1339,8 @@ sal_Int8 DrawViewShell::ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
if( nPage != SDRPAGE_NOTFOUND )
nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 3c2dff7872c5..e4950bd79910 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -115,7 +115,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
DeactivateCurrentFunction();
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
// Slot wird gemapped (ToolboxImages/-Slots)
MapSlot( nSId );
@@ -167,49 +167,49 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
if( rReq.GetArgs() )
{
- BOOL bMergeUndo = FALSE;
- SfxUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
+ sal_Bool bMergeUndo = sal_False;
+ ::svl::IUndoManager* pUndoManager = GetDocSh()->GetUndoManager();
// Anpassungen Start/EndWidth
if(nSId == SID_ATTR_LINE_WIDTH)
{
SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
+ sal_uLong nCount = rMarkList.GetMarkCount();
- INT32 nNewLineWidth = ((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue();
+ sal_Int32 nNewLineWidth = ((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue();
- for (ULONG i=0; i<nCount; i++)
+ for (sal_uLong i=0; i<nCount; i++)
{
SfxItemSet aAttr(GetDoc()->GetPool());
pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
aAttr.Put(pObj->GetMergedItemSet());
- INT32 nActLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue();
+ sal_Int32 nActLineWidth = ((const XLineWidthItem&)aAttr.Get(XATTR_LINEWIDTH)).GetValue();
if(nActLineWidth != nNewLineWidth)
{
- BOOL bSetItemSet(FALSE);
+ sal_Bool bSetItemSet(sal_False);
// do this for SFX_ITEM_DEFAULT and for SFX_ITEM_SET
if(SFX_ITEM_DONTCARE != aAttr.GetItemState(XATTR_LINESTARTWIDTH))
{
- INT32 nValAct = ((const XLineStartWidthItem&)aAttr.Get(XATTR_LINESTARTWIDTH)).GetValue();
- INT32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
+ sal_Int32 nValAct = ((const XLineStartWidthItem&)aAttr.Get(XATTR_LINESTARTWIDTH)).GetValue();
+ sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
if(nValNew < 0)
nValNew = 0;
- bSetItemSet = TRUE;
+ bSetItemSet = sal_True;
aAttr.Put(XLineStartWidthItem(nValNew));
}
// do this for SFX_ITEM_DEFAULT and for SFX_ITEM_SET
if(SFX_ITEM_DONTCARE != aAttr.GetItemState(XATTR_LINEENDWIDTH))
{
- INT32 nValAct = ((const XLineEndWidthItem&)aAttr.Get(XATTR_LINEENDWIDTH)).GetValue();
- INT32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
+ sal_Int32 nValAct = ((const XLineEndWidthItem&)aAttr.Get(XATTR_LINEENDWIDTH)).GetValue();
+ sal_Int32 nValNew = nValAct + (((nNewLineWidth - nActLineWidth) * 15) / 10);
if(nValNew < 0)
nValNew = 0;
- bSetItemSet = TRUE;
+ bSetItemSet = sal_True;
aAttr.Put(XLineEndWidthItem(nValNew));
}
@@ -224,11 +224,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
// Ggf. werden transparente Objekte wei?gefuellt
SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
+ sal_uLong nCount = rMarkList.GetMarkCount();
const bool bUndo = mpDrawView->IsUndoEnabled();
- for (ULONG i=0; i<nCount; i++)
+ for (sal_uLong i=0; i<nCount; i++)
{
SfxItemSet aAttr(GetDoc()->GetPool());
pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
@@ -249,7 +249,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
// daher hart attributieren: Fuellung setzen
if (!bMergeUndo)
{
- bMergeUndo = TRUE;
+ bMergeUndo = sal_True;
pUndoManager->EnterListAction( String(), String() );
mpDrawView->BegUndo();
}
@@ -311,12 +311,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
// const SfxPoolItem* pItem = rReq.GetArg( SID_HYPHENATION );
// ^-- Soll so nicht benutzt werden (Defaults sind falsch) !
- SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_HYPHENATION, FALSE);
+ SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, SID_HYPHENATION, sal_False);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
- BOOL bValue = ( (const SfxBoolItem*) pItem)->GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem*) pItem)->GetValue();
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
}
@@ -324,7 +324,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
OSL_FAIL(" Kein Wert fuer Silbentrennung!");
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
- BOOL bValue = TRUE;
+ sal_Bool bValue = sal_True;
aSet.Put( SfxBoolItem( EE_PARA_HYPHENATE, bValue ) );
mpDrawView->SetAttributes( aSet );
}
@@ -358,13 +358,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
xMasterPagesSupplier->getMasterPages());
if (xMasterPages.is())
{
- USHORT nIndex = GetCurPageId();
+ sal_uInt16 nIndex = GetCurPageId();
xMasterPages->insertNewByIndex (nIndex);
// Create shapes for the default layout.
SdPage* pMasterPage = GetDoc()->GetMasterSdPage(
nIndex, PK_STANDARD);
- pMasterPage->CreateTitleAndLayout (TRUE,TRUE);
+ pMasterPage->CreateTitleAndLayout (sal_True,sal_True);
}
}
@@ -385,7 +385,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
mpDrawView->SdrEndTextEdit();
}
- USHORT nPage = maTabControl.GetCurPageId() - 1;
+ sal_uInt16 nPage = maTabControl.GetCurPageId() - 1;
mpActualPage = GetDoc()->GetSdPage(nPage, mePageKind);
::sd::ViewShell::mpImpl->ProcessModifyPageSlot (
rReq,
@@ -422,7 +422,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
mpDrawView->SdrEndTextEdit();
}
- USHORT nPageId = maTabControl.GetCurPageId();
+ sal_uInt16 nPageId = maTabControl.GetCurPageId();
SdPage* pCurrentPage = ( GetEditMode() == EM_PAGE )
? GetDoc()->GetSdPage( nPageId - 1, GetPageKind() )
: GetDoc()->GetMasterSdPage( nPageId - 1, GetPageKind() );
@@ -484,13 +484,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs)
if (pArgs->Count () == 3)
{
- SFX_REQUEST_ARG (rReq, pWidth, SfxUInt32Item, ID_VAL_PAGEWIDTH, FALSE);
- SFX_REQUEST_ARG (rReq, pHeight, SfxUInt32Item, ID_VAL_PAGEHEIGHT, FALSE);
- SFX_REQUEST_ARG (rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS, FALSE);
+ SFX_REQUEST_ARG (rReq, pWidth, SfxUInt32Item, ID_VAL_PAGEWIDTH, sal_False);
+ SFX_REQUEST_ARG (rReq, pHeight, SfxUInt32Item, ID_VAL_PAGEHEIGHT, sal_False);
+ SFX_REQUEST_ARG (rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS, sal_False);
Size aSize (pWidth->GetValue (), pHeight->GetValue ());
- SetupPage (aSize, 0, 0, 0, 0, TRUE, FALSE, pScaleAll->GetValue ());
+ SetupPage (aSize, 0, 0, 0, 0, sal_True, sal_False, pScaleAll->GetValue ());
rReq.Ignore ();
break;
}
@@ -507,17 +507,17 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs)
if (pArgs->Count () == 5)
{
- SFX_REQUEST_ARG (rReq, pLeft, SfxUInt32Item, ID_VAL_PAGELEFT, FALSE);
- SFX_REQUEST_ARG (rReq, pRight, SfxUInt32Item, ID_VAL_PAGERIGHT, FALSE);
- SFX_REQUEST_ARG (rReq, pUpper, SfxUInt32Item, ID_VAL_PAGETOP, FALSE);
- SFX_REQUEST_ARG (rReq, pLower, SfxUInt32Item, ID_VAL_PAGEBOTTOM, FALSE);
- SFX_REQUEST_ARG (rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS, FALSE);
+ SFX_REQUEST_ARG (rReq, pLeft, SfxUInt32Item, ID_VAL_PAGELEFT, sal_False);
+ SFX_REQUEST_ARG (rReq, pRight, SfxUInt32Item, ID_VAL_PAGERIGHT, sal_False);
+ SFX_REQUEST_ARG (rReq, pUpper, SfxUInt32Item, ID_VAL_PAGETOP, sal_False);
+ SFX_REQUEST_ARG (rReq, pLower, SfxUInt32Item, ID_VAL_PAGEBOTTOM, sal_False);
+ SFX_REQUEST_ARG (rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS, sal_False);
Size aEmptySize (0, 0);
SetupPage (aEmptySize, pLeft->GetValue (), pRight->GetValue (),
pUpper->GetValue (), pLower->GetValue (),
- FALSE, TRUE, pScaleAll->GetValue ());
+ sal_False, sal_True, pScaleAll->GetValue ());
rReq.Ignore ();
break;
}
@@ -533,7 +533,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs && pArgs->Count () == 1 )
{
- SFX_REQUEST_ARG (rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER, FALSE);
+ SFX_REQUEST_ARG (rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER, sal_False);
if (CHECK_RANGE (5, pScale->GetValue (), 3000))
{
SetZoom (pScale->GetValue ());
@@ -558,7 +558,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM, FALSE);
+ SFX_REQUEST_ARG (rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM, sal_False);
if (CHECK_RANGE (10, pScale->GetValue (), 1000))
{
SetZoom (pScale->GetValue ());
@@ -583,7 +583,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ATTR_ZOOM:
{
const SfxItemSet* pArgs = rReq.GetArgs();
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
if ( pArgs )
{
@@ -643,7 +643,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( rReq.GetSlot() == SID_CHANGEBEZIER )
{
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->ConvertMarkedToPathObj(FALSE);
+ mpDrawView->ConvertMarkedToPathObj(sal_False);
}
else
{
@@ -652,7 +652,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->ConvertMarkedToPolyObj(FALSE);
+ mpDrawView->ConvertMarkedToPolyObj(sal_False);
}
}
@@ -684,7 +684,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->ConvertMarkedToPathObj(TRUE);
+ mpDrawView->ConvertMarkedToPathObj(sal_True);
Invalidate(SID_CONVERT_TO_CONTOUR);
}
@@ -788,24 +788,24 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
::Outliner* pOutl = mpDrawView->GetTextEditOutliner();
if (pOutl)
{
- pOutl->RemoveFields(TRUE, (TypeId) SvxURLField::StaticType());
+ pOutl->RemoveFields(sal_True, (TypeId) SvxURLField::StaticType());
}
pSet = new SfxItemSet( GetPool(), EE_ITEMS_START, EE_ITEMS_END );
- mpDrawView->SetAttributes( *pSet, TRUE );
+ mpDrawView->SetAttributes( *pSet, sal_True );
}
else
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nCount = rMarkList.GetMarkCount();
+ sal_uLong nCount = rMarkList.GetMarkCount();
// In diese Liste werden fuer jedes Praesentationsobjekt ein SfxItemSet
// der harten Attribute sowie der UserCall eingetragen, da diese beim nachfolgenden
- // mpDrawView->SetAttributes( *pSet, TRUE ) verloren gehen und spaeter restauriert
+ // mpDrawView->SetAttributes( *pSet, sal_True ) verloren gehen und spaeter restauriert
// werden muessen
List* pAttrList = new List();
SdPage* pPresPage = (SdPage*) mpDrawView->GetSdrPageView()->GetPage();
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < nCount; i++ )
{
@@ -821,9 +821,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
pSet = new SfxItemSet( GetPool() );
- mpDrawView->SetAttributes( *pSet, TRUE );
+ mpDrawView->SetAttributes( *pSet, sal_True );
- ULONG j = 0;
+ sal_uLong j = 0;
for ( i = 0; i < nCount; i++ )
{
@@ -834,11 +834,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
pSheet = mpActualPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
if (pSheet)
- pObj->SetStyleSheet(pSheet, FALSE);
+ pObj->SetStyleSheet(pSheet, sal_False);
}
else if(pObj->GetObjIdentifier() == OBJ_OUTLINETEXT)
{
- for (USHORT nLevel = 1; nLevel < 10; nLevel++)
+ for (sal_uInt16 nLevel = 1; nLevel < 10; nLevel++)
{
pSheet = mpActualPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
DBG_ASSERT(pSheet, "Vorlage fuer Gliederungsobjekt nicht gefunden");
@@ -848,7 +848,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( nLevel == 1 )
// Textrahmen hoert auf StyleSheet der Ebene1
- pObj->NbcSetStyleSheet(pSheet, FALSE);
+ pObj->NbcSetStyleSheet(pSheet, sal_False);
}
}
@@ -888,11 +888,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
SdrPageView* pPV;
Point aMPos = GetActiveWindow()->PixelToLogic( maMousePos );
- USHORT nHitLog = (USHORT) GetActiveWindow()->PixelToLogic( Size(
+ sal_uInt16 nHitLog = (sal_uInt16) GetActiveWindow()->PixelToLogic( Size(
FuPoor::HITPIX, 0 ) ).Width();
- USHORT nHelpLine;
+ sal_uInt16 nHelpLine;
- mbMousePosFreezed = FALSE;
+ mbMousePosFreezed = sal_False;
if( mpDrawView->PickHelpLine( aMPos, nHitLog, *GetActiveWindow(), nHelpLine, pPV) )
{
@@ -975,7 +975,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdPage* DrawViewShell::CreateOrDuplicatePage (
SfxRequest& rRequest,
PageKind ePageKind,
- SdPage* pPage)
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition)
{
SdPage* pNewPage = NULL;
if (ePageKind == PK_STANDARD && meEditMode != EM_MASTERPAGE)
@@ -984,7 +985,7 @@ SdPage* DrawViewShell::CreateOrDuplicatePage (
{
mpDrawView->SdrEndTextEdit();
}
- pNewPage = ViewShell::CreateOrDuplicatePage (rRequest, ePageKind, pPage);
+ pNewPage = ViewShell::CreateOrDuplicatePage (rRequest, ePageKind, pPage, nInsertPosition);
}
return pNewPage;
}
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 0d763d0dea71..6503e70066d1 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -131,7 +131,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
CheckLineTo (rReq);
// End text edit mode for some requests.
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_OUTPUT_QUALITY_COLOR:
@@ -147,7 +147,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
}
- // USHORT nSlot = rReq.GetSlot();
+ // sal_uInt16 nSlot = rReq.GetSlot();
switch (nSlot)
{
case SID_SWITCHPAGE: // BASIC
@@ -155,13 +155,13 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
// switch page in running slide show
if(SlideShow::IsRunning(GetViewShellBase()) && rReq.GetArgs())
{
- SFX_REQUEST_ARG(rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
+ SFX_REQUEST_ARG(rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, sal_False);
SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber((sal_Int32)((pWhatPage->GetValue()-1)>>1));
}
else
{
const SfxItemSet *pArgs = rReq.GetArgs ();
- USHORT nSelectedPage = 0;
+ sal_uInt16 nSelectedPage = 0;
if (! pArgs)
{
@@ -169,8 +169,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
else if (pArgs->Count () == 2)
{
- SFX_REQUEST_ARG (rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
- SFX_REQUEST_ARG (rReq, pWhatKind, SfxUInt32Item, ID_VAL_WHATKIND, FALSE);
+ SFX_REQUEST_ARG (rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, sal_False);
+ SFX_REQUEST_ARG (rReq, pWhatKind, SfxUInt32Item, ID_VAL_WHATKIND, sal_False);
sal_Int32 nWhatPage = (sal_Int32)pWhatPage->GetValue ();
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
@@ -219,11 +219,11 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_SWITCHLAYER: // BASIC
{
const SfxItemSet *pArgs = rReq.GetArgs ();
- USHORT nCurPage = GetLayerTabControl()->GetCurPageId ();
+ sal_uInt16 nCurPage = GetLayerTabControl()->GetCurPageId ();
if( pArgs && pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pWhatLayer, SfxUInt32Item, ID_VAL_WHATLAYER, FALSE);
+ SFX_REQUEST_ARG (rReq, pWhatLayer, SfxUInt32Item, ID_VAL_WHATLAYER, sal_False);
if( pWhatLayer )
nCurPage = (short) pWhatLayer->GetValue ();
}
@@ -242,8 +242,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if ( pArgs && pArgs->Count () == 2)
{
- SFX_REQUEST_ARG (rReq, pIsActive, SfxBoolItem, ID_VAL_ISACTIVE, FALSE);
- SFX_REQUEST_ARG (rReq, pWhatKind, SfxUInt32Item, ID_VAL_WHATKIND, FALSE);
+ SFX_REQUEST_ARG (rReq, pIsActive, SfxBoolItem, ID_VAL_ISACTIVE, sal_False);
+ SFX_REQUEST_ARG (rReq, pWhatKind, SfxUInt32Item, ID_VAL_WHATKIND, sal_False);
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
if (CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT))
@@ -270,8 +270,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if ( pArgs && pArgs->Count () == 2)
{
- SFX_REQUEST_ARG (rReq, pWhatLayerMode, SfxBoolItem, ID_VAL_ISACTIVE, FALSE);
- SFX_REQUEST_ARG (rReq, pWhatLayer, SfxUInt32Item, ID_VAL_WHATLAYER, FALSE);
+ SFX_REQUEST_ARG (rReq, pWhatLayerMode, SfxBoolItem, ID_VAL_ISACTIVE, sal_False);
+ SFX_REQUEST_ARG (rReq, pWhatLayer, SfxUInt32Item, ID_VAL_WHATLAYER, sal_False);
sal_Int32 nWhatLayer = (sal_Int32)pWhatLayer->GetValue ();
if (CHECK_RANGE (EM_PAGE, nWhatLayer, EM_MASTERPAGE))
@@ -368,7 +368,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_RELOAD:
{
- USHORT nId = Svx3DChildWindow::GetChildWindowId();
+ sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
SfxViewFrame* pFrame = GetViewFrame();
try
@@ -419,7 +419,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
{
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pBookmark, SfxStringItem, SID_JUMPTOMARK, FALSE);
+ SFX_REQUEST_ARG(rReq, pBookmark, SfxStringItem, SID_JUMPTOMARK, sal_False);
if (pBookmark)
{
@@ -462,7 +462,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
{
const SfxPoolItem* pItem;
if (rReq.GetArgs()->GetItemState(
- SID_ATTR_YEAR2000, TRUE, &pItem) == SFX_ITEM_SET)
+ SID_ATTR_YEAR2000, sal_True, &pItem) == SFX_ITEM_SET)
pFormShell->SetY2KState (
static_cast<const SfxUInt16Item*>(pItem)->GetValue());
}
@@ -538,8 +538,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
long nRight = Max(0L, rLRSpace.GetRight() + aPagePos.X() +
aPageSize.Width() - aViewSize.Width());
- USHORT nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
- USHORT i;
+ sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
+ sal_uInt16 i;
for ( i = 0; i < nPageCnt; i++)
{
SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
@@ -596,8 +596,8 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
long nLower = Max(0L, rULSpace.GetLower() + aPagePos.Y() +
aPageSize.Height() - aViewSize.Height());
- USHORT nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
- USHORT i;
+ sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
+ sal_uInt16 i;
for ( i = 0; i < nPageCnt; i++)
{
SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
@@ -678,7 +678,7 @@ void DrawViewShell::ExecRuler(SfxRequest& rReq)
{
if( mpDrawView->IsTextEdit() )
{
- USHORT nId = SID_ATTR_PARA_LRSPACE;
+ sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
const SvxLRSpaceItem& rItem = (const SvxLRSpaceItem&)
pArgs->Get( nId );
@@ -827,7 +827,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
rSet.Put( rItem );
const SvxLRSpaceItem& rLRSpaceItem = (const SvxLRSpaceItem&) aEditAttr.Get( EE_PARA_LRSPACE );
- USHORT nId = SID_ATTR_PARA_LRSPACE;
+ sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
SvxLRSpaceItem aLRSpaceItem( rLRSpaceItem.GetLeft(),
rLRSpaceItem.GetRight(), rLRSpaceItem.GetTxtLeft(),
rLRSpaceItem.GetTxtFirstLineOfst(), nId );
@@ -876,8 +876,8 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
rSet.DisableItem( SID_RULER_OBJECT );
// Seitenraender werden gelocked
- aProtect.SetSizeProtect( TRUE );
- aProtect.SetPosProtect( TRUE );
+ aProtect.SetSizeProtect( sal_True );
+ aProtect.SetPosProtect( sal_True );
}
if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SFX_ITEM_AVAILABLE )
@@ -892,7 +892,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet)
rSet.DisableItem( EE_PARA_TABS );
rSet.DisableItem( SID_RULER_TEXT_RIGHT_TO_LEFT );
- if( mpDrawView->IsResizeAllowed(TRUE) )
+ if( mpDrawView->IsResizeAllowed(sal_True) )
{
Rectangle aResizeRect( maMarkRect );
@@ -961,9 +961,9 @@ void DrawViewShell::GetSnapItemState( SfxItemSet &rSet )
{
SdrPageView* pPV;
Point aMPos = GetActiveWindow()->PixelToLogic(maMousePos);
- USHORT nHitLog = (USHORT) GetActiveWindow()->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) GetActiveWindow()->PixelToLogic(
Size(FuPoor::HITPIX,0)).Width();
- USHORT nHelpLine;
+ sal_uInt16 nHelpLine;
if ( mpDrawView->PickHelpLine(aMPos, nHitLog, *GetActiveWindow(), nHelpLine, pPV) )
{
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 34f547d21349..e9ca32594cd7 100644..100755
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -94,7 +94,7 @@ using namespace ::com::sun::star::drawing;
void DrawViewShell::DeleteActualPage()
{
- USHORT nPage = maTabControl.GetCurPageId() - 1;
+ sal_uInt16 nPage = maTabControl.GetCurPageId() - 1;
mpDrawView->SdrEndTextEdit();
@@ -124,13 +124,13 @@ void DrawViewShell::DeleteActualLayer()
String aString(SdResId(STR_ASK_DELETE_LAYER));
// Platzhalter ersetzen
- USHORT nPos = aString.Search(sal_Unicode('$'));
+ sal_uInt16 nPos = aString.Search(sal_Unicode('$'));
aString.Erase(nPos, 1);
aString.Insert(rName, nPos);
if (QueryBox(GetActiveWindow(), WB_YES_NO, aString).Execute() == RET_YES)
{
- const SdrLayer* pLayer = rAdmin.GetLayer(rName, FALSE);
+ const SdrLayer* pLayer = rAdmin.GetLayer(rName, sal_False);
mpDrawView->DeleteLayer( pLayer->GetName() );
// damit TabBar und Window neu gezeichnet werden;
@@ -150,9 +150,9 @@ void DrawViewShell::DeleteActualLayer()
|*
\************************************************************************/
-BOOL DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
+sal_Bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( !IsInputLocked() || ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE ) )
{
@@ -177,7 +177,7 @@ BOOL DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
// look for a new candidate, a successor of pOldObj
SdrObjListIter aIter(*pActualPage, IM_DEEPNOGROUPS);
- BOOL bDidVisitOldObject(FALSE);
+ sal_Bool bDidVisitOldObject(sal_False);
while(aIter.IsMore() && !pCandidate)
{
@@ -197,7 +197,7 @@ BOOL DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
if(pObj == pOldObj)
{
- bDidVisitOldObject = TRUE;
+ bDidVisitOldObject = sal_True;
}
}
}
@@ -245,13 +245,13 @@ void DrawViewShell::StartRulerDrag (
if ( rRuler.GetExtraRect().IsInside(rMEvt.GetPosPixel()) )
{
mpDrawView->BegSetPageOrg(aWPos);
- mbIsRulerDrag = TRUE;
+ mbIsRulerDrag = sal_True;
}
else
{
// #i34536# if no guide-lines are visible yet, that show them
if( ! mpDrawView->IsHlplVisible())
- mpDrawView->SetHlplVisible( TRUE );
+ mpDrawView->SetHlplVisible( sal_True );
SdrHelpLineKind eKind;
@@ -263,7 +263,7 @@ void DrawViewShell::StartRulerDrag (
eKind = SDRHELPLINE_VERTICAL;
mpDrawView->BegDragHelpLine(aWPos, eKind);
- mbIsRulerDrag = TRUE;
+ mbIsRulerDrag = sal_True;
}
}
@@ -283,7 +283,7 @@ void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt,
// the contex menu is closed by VCL asynchronously which in the end
// would work on deleted objects or the context menu has no parent anymore)
SfxInPlaceClient* pIPClient = GetViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && PopupMenu::IsInExecute() )
return;
@@ -314,7 +314,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) )
{
- BOOL bInsideOtherWindow = FALSE;
+ sal_Bool bInsideOtherWindow = sal_False;
if (mpContentWindow.get() != NULL)
{
@@ -323,7 +323,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
Point aPos = mpContentWindow->GetPointerPosPixel();
if ( aOutputArea.IsInside(aPos) )
- bInsideOtherWindow = TRUE;
+ bInsideOtherWindow = sal_True;
}
if (! GetActiveWindow()->HasFocus ())
@@ -411,9 +411,9 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
}
( (SvxBmpMask*) GetViewFrame()->GetChildWindow( SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
- SetColor( Color( (BYTE) ( nRed / fDiv + .5 ),
- (BYTE) ( nGreen / fDiv + .5 ),
- (BYTE) ( nBlue / fDiv + .5 ) ) );
+ SetColor( Color( (sal_uInt8) ( nRed / fDiv + .5 ),
+ (sal_uInt8) ( nGreen / fDiv + .5 ),
+ (sal_uInt8) ( nBlue / fDiv + .5 ) ) );
}
}
}
@@ -456,7 +456,7 @@ void DrawViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
}
GetActiveWindow()->ReleaseMouse();
- mbIsRulerDrag = FALSE;
+ mbIsRulerDrag = sal_False;
}
else
ViewShell::MouseButtonUp(rMEvt, pWin);
@@ -476,7 +476,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
// deactivate the inplace client without any problem regarding parent
// windows and code on the stack.
SfxInPlaceClient* pIPClient = GetViewShell()->GetIPClient();
- BOOL bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
+ sal_Bool bIsOleActive = ( pIPClient && pIPClient->IsObjectInPlaceActive() );
if ( bIsOleActive && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ))
{
// Deactivate OLE object
@@ -504,7 +504,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
if( GetActiveWindow() )
aPos = GetActiveWindow()->PixelToLogic( rCEvt.GetMousePosPixel() );
- if( !mpDrawView->InsertData( aDataHelper, aPos, nDnDAction, FALSE ) )
+ if( !mpDrawView->InsertData( aDataHelper, aPos, nDnDAction, sal_False ) )
{
INetBookmark aINetBookmark( aEmptyStr, aEmptyStr );
@@ -523,18 +523,18 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
else if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !bNativeShow &&
pWin != NULL && !mpDrawView->IsAction() && !SD_MOD()->GetWaterCan() )
{
- USHORT nSdResId = 0; // ResourceID fuer Popup-Menue
- BOOL bGraphicShell = this->ISA(GraphicViewShell);
+ sal_uInt16 nSdResId = 0; // ResourceID fuer Popup-Menue
+ sal_Bool bGraphicShell = this->ISA(GraphicViewShell);
// Ist ein Fangobjekt unter dem Mauszeiger?
SdrPageView* pPV;
Point aMPos = pWin->PixelToLogic( maMousePos );
- USHORT nHitLog = (USHORT) GetActiveWindow()->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) GetActiveWindow()->PixelToLogic(
Size(FuPoor::HITPIX, 0 ) ).Width();
- USHORT nHelpLine;
+ sal_uInt16 nHelpLine;
// fuer Klebepunkt
SdrObject* pObj = NULL;
- USHORT nPickId = 0;
+ sal_uInt16 nPickId = 0;
// fuer Feldbefehl
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
const SvxFieldItem* pFldItem = NULL;
@@ -583,10 +583,10 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
SvxFieldItem aFieldItem( *pField, EE_FEATURE_FIELD );
// Feld selektieren, so dass es beim Insert geloescht wird
ESelection aSel = pOLV->GetSelection();
- BOOL bSel = TRUE;
+ sal_Bool bSel = sal_True;
if( aSel.nStartPos == aSel.nEndPos )
{
- bSel = FALSE;
+ bSel = sal_False;
aSel.nEndPos++;
}
pOLV->SetSelection( aSel );
@@ -657,8 +657,8 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
}
else
{
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nId = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
if (nInv == SdrInventor)
{
@@ -813,7 +813,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
//open context menu at that point
GetViewFrame()->GetDispatcher()->ExecutePopup(SdResId(nSdResId),GetActiveWindow(),&aMenuPos);
}
- mbMousePosFreezed = FALSE;
+ mbMousePosFreezed = sal_False;
}
}
else
@@ -838,7 +838,7 @@ void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect,
RulerLine pVLines[2];
long nHOffs = 0L;
long nVOffs = 0L;
- USHORT nCnt;
+ sal_uInt16 nCnt;
if (mpHorizontalRuler.get() != NULL)
mpHorizontalRuler->SetLines();
@@ -917,7 +917,7 @@ void DrawViewShell::UnlockInput()
void DrawViewShell::ShowSnapLineContextMenu (
SdrPageView& rPageView,
- const USHORT nSnapLineIndex,
+ const sal_uInt16 nSnapLineIndex,
const Point& rMouseLocation)
{
const SdrHelpLine& rHelpLine (rPageView.GetHelpLines()[nSnapLineIndex]);
@@ -944,9 +944,9 @@ void DrawViewShell::ShowSnapLineContextMenu (
String(SdResId(STR_POPUP_DELETE_SNAPLINE)));
}
- pMenu->RemoveDisabledEntries(FALSE, FALSE);
+ pMenu->RemoveDisabledEntries(sal_False, sal_False);
- const USHORT nResult = pMenu->Execute(
+ const sal_uInt16 nResult = pMenu->Execute(
GetActiveWindow(),
Rectangle(rMouseLocation, Size(10,10)),
POPUPMENU_EXECUTE_DOWN);
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 71b852ff0328..7c62e2d7bbe1 100644..100755
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -50,7 +50,7 @@
#include "res_bmp.hrc"
#include "glob.hrc"
#include "app.hrc"
-
+#include "helpids.h"
#include "optsitem.hxx"
#include "app.hxx"
#include "FrameView.hxx"
@@ -90,9 +90,9 @@ void DrawViewShell::ModelHasChanged()
{
Invalidate();
// Damit der Navigator auch einen aktuellen Status bekommt
- GetViewFrame()->GetBindings().Invalidate( SID_NAVIGATOR_STATE, TRUE, FALSE );
+ GetViewFrame()->GetBindings().Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False );
- SfxBoolItem aItem( SID_3D_STATE, TRUE );
+ SfxBoolItem aItem( SID_3D_STATE, sal_True );
GetViewFrame()->GetDispatcher()->Execute(
SID_3D_STATE, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -147,11 +147,11 @@ void DrawViewShell::ArrangeGUIElements (void)
OSL_ASSERT (GetViewShell()!=NULL);
Client* pIPClient = static_cast<Client*>(GetViewShell()->GetIPClient());
- BOOL bClientActive = FALSE;
+ sal_Bool bClientActive = sal_False;
if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
- bClientActive = TRUE;
+ bClientActive = sal_True;
- BOOL bInPlaceActive = GetViewFrame()->GetFrame().IsInPlace();
+ sal_Bool bInPlaceActive = GetViewFrame()->GetFrame().IsInPlace();
if ( mbZoomOnPage && !bInPlaceActive && !bClientActive )
{
@@ -271,7 +271,7 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
// Definition:
// grosse Handles: 9
// kleine Handles: 7
- USHORT nTmp = mpDrawView->GetMarkHdlSizePixel();
+ sal_uInt16 nTmp = mpDrawView->GetMarkHdlSizePixel();
//DBG_ASSERT(nTmp != 7, "HandleSize != 7 oder 9");
if( nTmp == 9 && !pView->IsBigHandles() )
mpDrawView->SetMarkHdlSizePixel( 7 );
@@ -311,7 +311,7 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
if ( mpDrawView->GetActiveLayer() != pView->GetActiveLayer() )
mpDrawView->SetActiveLayer( pView->GetActiveLayer() );
- USHORT nSelectedPage = 0;
+ sal_uInt16 nSelectedPage = 0;
if (mePageKind != PK_HANDOUT)
{
@@ -319,7 +319,7 @@ void DrawViewShell::ReadFrameViewData(FrameView* pView)
}
EditMode eNewEditMode = pView->GetViewShEditMode(mePageKind);
- BOOL bNewLayerMode = pView->IsLayerMode();
+ sal_Bool bNewLayerMode = pView->IsLayerMode();
ChangeEditMode(eNewEditMode, bNewLayerMode);
SwitchPage(nSelectedPage);
@@ -498,7 +498,7 @@ void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin)
void DrawViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY)
{
ViewShell::SetZoomFactor(rZoomX, rZoomY);
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
Point aOrigin = GetActiveWindow()->GetViewOrigin();
GetActiveWindow()->SetWinViewPos(aOrigin);
}
@@ -530,7 +530,7 @@ Size DrawViewShell::GetOptimalSizePixel() const
// 1:1 Darstellung
MapMode aMapMode(MAP_100TH_MM);
aSize = GetActiveWindow()->LogicToPixel( pPage->GetSize(), aMapMode );
- const_cast< DrawViewShell* >(this)->mbZoomOnPage = TRUE;
+ const_cast< DrawViewShell* >(this)->mbZoomOnPage = sal_True;
}
}
}
@@ -549,7 +549,7 @@ void DrawViewShell::HidePage()
{
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
if (pFormShell != NULL)
- pFormShell->PrepareClose (FALSE);
+ pFormShell->PrepareClose (sal_False);
}
@@ -593,20 +593,20 @@ void DrawViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence
if (mePageKind == PK_NOTES)
{
SetHelpId( SID_NOTESMODE );
- GetActiveWindow()->SetHelpId( SID_NOTESMODE );
- GetActiveWindow()->SetUniqueId( SID_NOTESMODE );
+ GetActiveWindow()->SetHelpId( CMD_SID_NOTESMODE );
+ GetActiveWindow()->SetUniqueId( CMD_SID_NOTESMODE );
}
else if (mePageKind == PK_HANDOUT)
{
SetHelpId( SID_HANDOUTMODE );
- GetActiveWindow()->SetHelpId( SID_HANDOUTMODE );
- GetActiveWindow()->SetUniqueId( SID_HANDOUTMODE );
+ GetActiveWindow()->SetHelpId( CMD_SID_HANDOUTMODE );
+ GetActiveWindow()->SetUniqueId( CMD_SID_HANDOUTMODE );
}
else
{
SetHelpId( SD_IF_SDDRAWVIEWSHELL );
- GetActiveWindow()->SetHelpId( SD_IF_SDDRAWVIEWSHELL );
- GetActiveWindow()->SetUniqueId( SD_IF_SDDRAWVIEWSHELL );
+ GetActiveWindow()->SetHelpId( HID_SDDRAWVIEWSHELL );
+ GetActiveWindow()->SetUniqueId( HID_SDDRAWVIEWSHELL );
}
}
@@ -704,8 +704,8 @@ void DrawViewShell::SetActiveTabLayerIndex (int nIndex)
if (nIndex>=0 && nIndex<pBar->GetPageCount())
{
// Tell the draw view and the tab control of the new active layer.
- mpDrawView->SetActiveLayer (pBar->GetPageText (pBar->GetPageId ((USHORT)nIndex)));
- pBar->SetCurPageId (pBar->GetPageId ((USHORT)nIndex));
+ mpDrawView->SetActiveLayer (pBar->GetPageText (pBar->GetPageId ((sal_uInt16)nIndex)));
+ pBar->SetCurPageId (pBar->GetPageId ((sal_uInt16)nIndex));
}
}
}
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 4674a3f04acc..b178aa5fef1c 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -99,12 +99,12 @@ void DrawViewShell::ExecFormText(SfxRequest& rReq)
if ( mpDrawView->IsTextEdit() )
mpDrawView->SdrEndTextEdit();
- if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, TRUE, &pItem) ==
+ if ( rSet.GetItemState(XATTR_FORMTXTSTDFORM, sal_True, &pItem) ==
SFX_ITEM_SET &&
((const XFormTextStdFormItem*) pItem)->GetValue() != XFTFORM_NONE )
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
SvxFontWorkDialog* pDlg = (SvxFontWorkDialog*)GetViewFrame()->
GetChildWindow(nId)->GetWindow();
@@ -137,7 +137,7 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
const SdrObject* pObj = NULL;
SvxFontWorkDialog* pDlg = NULL;
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
if ( GetViewFrame()->HasChildWindow(nId) )
pDlg = (SvxFontWorkDialog*)(GetViewFrame()->GetChildWindow(nId)->GetWindow());
@@ -190,7 +190,7 @@ void DrawViewShell::ExecAnimationWin( SfxRequest& rReq )
CheckLineTo (rReq);
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
@@ -199,7 +199,7 @@ void DrawViewShell::ExecAnimationWin( SfxRequest& rReq )
case SID_ANIMATOR_CREATE:
{
AnimationWindow* pAnimWin;
- USHORT nId = AnimationChildWindow::GetChildWindowId();
+ sal_uInt16 nId = AnimationChildWindow::GetChildWindowId();
pAnimWin = static_cast<AnimationWindow*>(
GetViewFrame()->GetChildWindow(nId)->GetWindow());
@@ -233,10 +233,10 @@ void DrawViewShell::ExecAnimationWin( SfxRequest& rReq )
void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet )
{
// Hier koennten Buttons etc. disabled werden
- UINT16 nValue;
+ sal_uInt16 nValue;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if( nMarkCount == 0 )
nValue = 0;
@@ -245,14 +245,14 @@ void DrawViewShell::GetAnimationWinState( SfxItemSet& rSet )
else // 1 Objekt
{
const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nId = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
// 1 selektiertes Gruppenobjekt
if( nInv == SdrInventor && nId == OBJ_GRUP )
nValue = 3;
else if( nInv == SdrInventor && nId == OBJ_GRAF ) // Anim. GIF ?
{
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
if( ( (SdrGrafObj*) pObj )->IsAnimated() )
nCount = ( (SdrGrafObj*) pObj )->GetGraphic().GetAnimation().Count();
@@ -278,52 +278,52 @@ void DrawViewShell::SetChildWindowState( SfxItemSet& rSet )
// Stati der SfxChild-Windows (Animator, Fontwork etc.)
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_FONTWORK ) )
{
- USHORT nId = SvxFontWorkChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(SID_FONTWORK, GetViewFrame()->HasChildWindow(nId)));
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_COLOR_CONTROL ) )
{
- USHORT nId = SvxColorChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxColorChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(SID_COLOR_CONTROL, GetViewFrame()->HasChildWindow(nId)));
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ANIMATION_OBJECTS ) )
{
- USHORT nId = AnimationChildWindow::GetChildWindowId();
+ sal_uInt16 nId = AnimationChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_ANIMATION_OBJECTS, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_NAVIGATOR ) )
{
- USHORT nId = SID_NAVIGATOR;
+ sal_uInt16 nId = SID_NAVIGATOR;
rSet.Put( SfxBoolItem( SID_NAVIGATOR, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BMPMASK ) )
{
- USHORT nId = SvxBmpMaskChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_BMPMASK, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GALLERY ) )
{
- USHORT nId = GalleryChildWindow::GetChildWindowId();
+ sal_uInt16 nId = GalleryChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_GALLERY, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_IMAP ) )
{
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_IMAP, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_LAYER_DIALOG_WIN ) )
{
- USHORT nId = LayerDialogChildWindow::GetChildWindowId();
+ sal_uInt16 nId = LayerDialogChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_LAYER_DIALOG_WIN, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_3D_WIN ) )
{
- USHORT nId = Svx3DChildWindow::GetChildWindowId();
+ sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_3D_WIN, GetViewFrame()->HasChildWindow( nId ) ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_AVMEDIA_PLAYER ) )
{
- USHORT nId = ::avmedia::MediaPlayer::GetChildWindowId();
+ sal_uInt16 nId = ::avmedia::MediaPlayer::GetChildWindowId();
rSet.Put( SfxBoolItem( SID_AVMEDIA_PLAYER, GetViewFrame()->HasChildWindow( nId ) ) );
}
}
@@ -359,7 +359,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
if ( pObj && !mpDrawView->IsTextEdit() )
{
SdrGrafObj* pNewObj = (SdrGrafObj*) pObj->Clone();
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
if( pNewObj->IsLinkedGraphic() )
{
@@ -371,7 +371,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
else
{
delete pNewObj;
- bCont = FALSE;
+ bCont = sal_False;
}
}
@@ -386,7 +386,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
{
SdrPageView* pPV = mpDrawView->GetSdrPageView();
- pNewObj->SetEmptyPresObj( FALSE );
+ pNewObj->SetEmptyPresObj( sal_False );
pNewObj->SetGraphic( ( (SvxBmpMask*) GetViewFrame()->GetChildWindow(
SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
Mask( pNewObj->GetGraphic() ) );
@@ -412,9 +412,9 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
const SdrObject* pObj = NULL;
- USHORT nId = SvxBmpMaskChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId();
SvxBmpMask* pDlg = NULL;
- BOOL bEnable = FALSE;
+ sal_Bool bEnable = sal_False;
if ( GetViewFrame()->HasChildWindow( nId ) )
{
@@ -429,7 +429,7 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
// valid graphic object?
if( pObj && pObj->ISA( SdrGrafObj ) && !( (SdrGrafObj*) pObj )->IsEPS() && !mpDrawView->IsTextEdit() )
- bEnable = TRUE;
+ bEnable = sal_True;
// put value
rSet.Put( SfxBoolItem( SID_BMPMASK_EXEC, bEnable ) );
@@ -443,7 +443,7 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
void DrawViewShell::FuTemp04(SfxRequest& rReq)
{
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
case SID_FONTWORK:
@@ -611,13 +611,13 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq)
case SID_CONVERT_TO_3D_LATHE_FAST:
{
// Der Aufruf ist ausreichend. Die Initialisierung per Start3DCreation und CreateMirrorPolygons
- // ist nicht mehr noetig, falls der Parameter TRUE uebergeben wird. Dann wird sofort und
+ // ist nicht mehr noetig, falls der Parameter sal_True uebergeben wird. Dann wird sofort und
// ohne Benutzereingriff ein gekippter Rotationskoerper mit einer Achse links neben dem
// Umschliessenden Rechteck der slektierten Objekte gezeichnet.
mpDrawView->SdrEndTextEdit();
if(GetActiveWindow())
GetActiveWindow()->EnterWait();
- mpDrawView->End3DCreation(TRUE);
+ mpDrawView->End3DCreation(sal_True);
Cancel();
rReq.Ignore();
if(GetActiveWindow())
@@ -695,11 +695,11 @@ void DrawViewShell::FuTemp04(SfxRequest& rReq)
{
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
- BYTE aLayerId;
+ sal_uInt8 aLayerId;
if (nSId == SID_DISPLAY_MASTER_BACKGROUND)
- aLayerId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
+ aLayerId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
else
- aLayerId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ aLayerId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
aVisibleLayers.Set(aLayerId, !aVisibleLayers.IsSet(aLayerId));
pPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
}
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index d896ccb07c86..5d69c6580ec5 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -36,6 +36,7 @@
#include <svx/svdouno.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/flditem.hxx>
+#include <editeng/outlobj.hxx>
#include <svx/svxids.hrc>
#include <svx/svdpagv.hxx>
#include <svx/clipfmtitem.hxx>
@@ -225,7 +226,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
ViewShell::GetMenuState(rSet);
- BOOL bDisableVerticalText = !SvtLanguageOptions().IsVerticalTextEnabled();
+ sal_Bool bDisableVerticalText = !SvtLanguageOptions().IsVerticalTextEnabled();
if ( bDisableVerticalText )
{
@@ -235,10 +236,10 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_DRAW_TEXT_VERTICAL );
}
- bool bConvertToPathPossible = mpDrawView->IsConvertToPathObjPossible(FALSE);
+ bool bConvertToPathPossible = mpDrawView->IsConvertToPathObjPossible(sal_False);
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- const ULONG nMarkCount = rMarkList.GetMarkCount();
+ const sal_uLong nMarkCount = rMarkList.GetMarkCount();
//format paintbrush
FuFormatPaintBrush::GetMenuState( *this, rSet );
@@ -247,16 +248,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
SetChildWindowState( rSet );
// Images der Toolboxen mappen (nur Zoom)
- UpdateToolboxImages( rSet, FALSE );
+ UpdateToolboxImages( rSet, sal_False );
if(HasCurrentFunction())
{
- USHORT nSId = GetCurrentFunction()->GetSlotID();
+ sal_uInt16 nSId = GetCurrentFunction()->GetSlotID();
- rSet.Put( SfxBoolItem( nSId, TRUE ) );
+ rSet.Put( SfxBoolItem( nSId, sal_True ) );
// Bewirkt ein uncheck eines simulierten Slots
- USHORT nId = GetIdBySubId( nSId );
+ sal_uInt16 nId = GetIdBySubId( nSId );
// Images der Toolboxen mappen
UpdateToolboxImages( rSet );
@@ -305,7 +306,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if(bDisable)
{
- rSet.DisableItem(SID_EXPAND_PAGE);
+ rSet.DisableItem(SID_ASSIGN_LAYOUT);
}
}
@@ -320,9 +321,26 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
- if(pObj && !pObj->IsEmptyPresObj())
+ if (pObj!=NULL )
{
- bDisable = false;
+ if( !pObj->IsEmptyPresObj() )
+ {
+ bDisable = false;
+ }
+ else
+ {
+ // check if the object is in edit, than its temporarely not empty
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ if( pTextObj )
+ {
+ OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
+ if( pParaObj )
+ {
+ delete pParaObj;
+ bDisable = false;
+ }
+ }
+ }
}
}
}
@@ -381,15 +399,15 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) )
{
- BOOL bDisable = TRUE;
- USHORT nCount = GetDoc()->GetSdPageCount( PK_STANDARD );
+ sal_Bool bDisable = sal_True;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD );
- for( USHORT i = 0; i < nCount && bDisable; i++ )
+ for( sal_uInt16 i = 0; i < nCount && bDisable; i++ )
{
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD);
if( !pPage->IsExcluded() )
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable || GetDocSh()->IsPreview())
@@ -435,12 +453,12 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
else
{
// Horizontale Ausrichtung
- USHORT nHorz = mpDrawView->GetMarkedGluePointsAlign( FALSE );
+ sal_uInt16 nHorz = mpDrawView->GetMarkedGluePointsAlign( sal_False );
rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_CENTER, nHorz == SDRHORZALIGN_CENTER ) );
rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_LEFT, nHorz == SDRHORZALIGN_LEFT ) );
rSet.Put( SfxBoolItem( SID_GLUE_HORZALIGN_RIGHT, nHorz == SDRHORZALIGN_RIGHT ) );
// Vertikale Ausrichtung
- USHORT nVert = mpDrawView->GetMarkedGluePointsAlign( TRUE );
+ sal_uInt16 nVert = mpDrawView->GetMarkedGluePointsAlign( sal_True );
rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_CENTER, nVert == SDRVERTALIGN_CENTER ) );
rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_TOP, nVert == SDRVERTALIGN_TOP ) );
rSet.Put( SfxBoolItem( SID_GLUE_VERTALIGN_BOTTOM, nVert == SDRVERTALIGN_BOTTOM ) );
@@ -484,16 +502,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
if (!mpDrawView->IsFrameDragSingles())
- rSet.Put(SfxBoolItem(SID_BEZIER_EDIT, TRUE));
+ rSet.Put(SfxBoolItem(SID_BEZIER_EDIT, sal_True));
else
- rSet.Put(SfxBoolItem(SID_BEZIER_EDIT, FALSE));
+ rSet.Put(SfxBoolItem(SID_BEZIER_EDIT, sal_False));
if(dynamic_cast<FuEditGluePoints*>( GetCurrentFunction().get()))
- rSet.Put(SfxBoolItem(SID_GLUE_EDITMODE, TRUE));
+ rSet.Put(SfxBoolItem(SID_GLUE_EDITMODE, sal_True));
else
- rSet.Put(SfxBoolItem(SID_GLUE_EDITMODE, FALSE));
+ rSet.Put(SfxBoolItem(SID_GLUE_EDITMODE, sal_False));
- if( !mpDrawView->IsMirrorAllowed( TRUE, TRUE ) )
+ if( !mpDrawView->IsMirrorAllowed( sal_True, sal_True ) )
{
rSet.DisableItem( SID_HORIZONTAL );
rSet.DisableItem( SID_VERTICAL );
@@ -543,12 +561,12 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if ( !mpDrawView->IsGroupEntered() )
{
rSet.DisableItem( SID_LEAVE_GROUP );
- rSet.Put( SfxBoolItem( SID_LEAVE_ALL_GROUPS, FALSE ) );
+ rSet.Put( SfxBoolItem( SID_LEAVE_ALL_GROUPS, sal_False ) );
rSet.ClearItem( SID_LEAVE_ALL_GROUPS );
rSet.DisableItem( SID_LEAVE_ALL_GROUPS );
}
else
- rSet.Put( SfxBoolItem( SID_LEAVE_ALL_GROUPS, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_LEAVE_ALL_GROUPS, sal_True ) );
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_THESAURUS ) )
{
@@ -603,14 +621,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// create listener
mpClipEvtLstnr = new TransferableClipboardListener( LINK( this, DrawViewShell, ClipboardChanged ) );
mpClipEvtLstnr->acquire();
- mpClipEvtLstnr->AddRemoveListener( GetActiveWindow(), TRUE );
+ mpClipEvtLstnr->AddRemoveListener( GetActiveWindow(), sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( GetActiveWindow() ) );
mbPastePossible = ( aDataHelper.GetFormatCount() != 0 );
}
else
- mbPastePossible = FALSE;
+ mbPastePossible = sal_False;
}
if( !mbPastePossible )
@@ -642,10 +660,10 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
return;
}
- if( !( mpDrawView->IsConvertToPolyObjPossible(FALSE) || mpDrawView->IsVectorizeAllowed() ) )
+ if( !( mpDrawView->IsConvertToPolyObjPossible(sal_False) || mpDrawView->IsVectorizeAllowed() ) )
rSet.DisableItem(SID_CHANGEPOLYGON);
- if( !( mpDrawView->IsConvertToPolyObjPossible(FALSE) || mpDrawView->IsConvertToContourPossible() ) )
+ if( !( mpDrawView->IsConvertToPolyObjPossible(sal_False) || mpDrawView->IsConvertToContourPossible() ) )
rSet.DisableItem(SID_CONVERT_TO_CONTOUR);
if ( !mpDrawView->IsConvertTo3DObjPossible() )
@@ -731,19 +749,19 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
/**********************************************************************
* Seiten-Modus
**********************************************************************/
- rSet.Put(SfxBoolItem(SID_PAGEMODE, TRUE));
- rSet.Put(SfxBoolItem(SID_MASTERPAGE, FALSE));
- rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, FALSE));
- rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, FALSE));
- rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_PAGEMODE, sal_True));
+ rSet.Put(SfxBoolItem(SID_MASTERPAGE, sal_False));
+ rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, sal_False));
+ rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, sal_False));
+ rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, sal_False));
if (mePageKind == PK_STANDARD &&
rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_AVAILABLE)
{
// Gibt es eine Seite mit dem AutoLayout "Titel"?
- BOOL bDisable = TRUE;
- USHORT i = 0;
- USHORT nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
+ sal_Bool bDisable = sal_True;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
while (i < nCount && bDisable)
{
@@ -751,7 +769,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if (pPage->GetAutoLayout() == AUTOLAYOUT_TITLE)
{
- bDisable = FALSE;
+ bDisable = sal_False;
}
i++;
@@ -763,7 +781,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
else
{
- rSet.Put(SfxBoolItem(SID_TITLE_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_TITLE_MASTERPAGE, sal_False));
}
}
else
@@ -778,28 +796,28 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
else
{
- rSet.Put(SfxBoolItem(SID_PAGEMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_MASTERPAGE, TRUE));
+ rSet.Put(SfxBoolItem(SID_PAGEMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_MASTERPAGE, sal_True));
/**********************************************************************
* Hintergrundseiten-Modus
**********************************************************************/
if (mePageKind == PK_STANDARD)
{
- rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, TRUE));
- rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, FALSE));
- rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, sal_True));
+ rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, sal_False));
+ rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, sal_False));
if (rSet.GetItemState(SID_TITLE_MASTERPAGE) == SFX_ITEM_AVAILABLE)
{
- BOOL bCheck = FALSE;
- BOOL bDisable = TRUE;
+ sal_Bool bCheck = sal_False;
+ sal_Bool bDisable = sal_True;
if( pPageView )
{
SdPage* pMPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
- USHORT i = 0;
- USHORT nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
// Referenziert eine Seite mit dem AutoLayout "Titel" die
// aktuelle MasterPage?
@@ -811,7 +829,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if (pPage->GetAutoLayout() == AUTOLAYOUT_TITLE)
{
// Eine Seite hat das AutoLayout "Titel"
- bDisable = FALSE;
+ bDisable = sal_False;
SdPage& rRefMPage = (SdPage&)(pPage->TRG_GetMasterPage());
@@ -819,7 +837,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
// Eine Seite mit dem AutoLayout "Titel"
// referenziert die aktuelle MasterPage
- bCheck = TRUE;
+ bCheck = sal_True;
}
}
@@ -829,7 +847,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if (bCheck)
{
- rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, sal_False));
}
rSet.Put(SfxBoolItem(SID_TITLE_MASTERPAGE, bCheck));
@@ -843,17 +861,17 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
else if (mePageKind == PK_NOTES)
{
- rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, sal_False));
rSet.DisableItem(SID_TITLE_MASTERPAGE);
- rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, TRUE));
- rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, sal_True));
+ rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, sal_False));
}
else if (mePageKind == PK_HANDOUT)
{
- rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, FALSE));
+ rSet.Put(SfxBoolItem(SID_SLIDE_MASTERPAGE, sal_False));
rSet.DisableItem(SID_TITLE_MASTERPAGE);
- rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, FALSE));
- rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, TRUE));
+ rSet.Put(SfxBoolItem(SID_NOTES_MASTERPAGE, sal_False));
+ rSet.Put(SfxBoolItem(SID_HANDOUT_MASTERPAGE, sal_True));
}
}
@@ -881,10 +899,10 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// darf der aktuelle Layer geloescht werden?
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DELETE_LAYER ) )
{
- USHORT nCurrentLayer = GetLayerTabControl()->GetCurPageId();
+ sal_uInt16 nCurrentLayer = GetLayerTabControl()->GetCurPageId();
const String& rName = GetLayerTabControl()->GetPageText(nCurrentLayer);
- BOOL bDisableIt = !IsLayerModeActive();
+ sal_Bool bDisableIt = !IsLayerModeActive();
bDisableIt |= (rName == String(SdResId(STR_LAYER_LAYOUT)));
bDisableIt |= (rName == String(SdResId(STR_LAYER_BCKGRND)));
bDisableIt |= (rName == String(SdResId(STR_LAYER_BCKGRNDOBJ)));
@@ -904,25 +922,25 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView();
- // Sonderbehandlung für SID_OUTLINE_BULLET wenn Objekte
+ // Sonderbehandlung f�r SID_OUTLINE_BULLET wenn Objekte
// mit unterschiedlichen arten von NumBullet Items markiert
// sind
- BOOL bHasOutliner = FALSE;
- BOOL bHasOther = FALSE;
- for(ULONG nNum = 0; nNum < nMarkCount; nNum++)
+ sal_Bool bHasOutliner = sal_False;
+ sal_Bool bHasOther = sal_False;
+ for(sal_uLong nNum = 0; nNum < nMarkCount; nNum++)
{
SdrObject* pObj = rMarkList.GetMark(nNum)->GetMarkedSdrObj();
if( pObj->GetObjInventor() == SdrInventor )
{
if( pObj->GetObjIdentifier() == OBJ_OUTLINETEXT )
{
- bHasOutliner = TRUE;
+ bHasOutliner = sal_True;
if(bHasOther)
break;
}
else
{
- bHasOther = TRUE;
+ bHasOther = sal_True;
if(bHasOutliner)
break;
}
@@ -951,7 +969,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_INSERT_PLUGIN );
rSet.DisableItem( SID_INSERT_SOUND );
rSet.DisableItem( SID_INSERT_VIDEO );
- rSet.DisableItem( SID_INSERT_APPLET );
rSet.DisableItem( SID_INSERT_FLOATINGFRAME );
rSet.DisableItem( SID_INSERT_MATH );
rSet.DisableItem( SID_INSERT_DIAGRAM );
@@ -961,7 +978,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_SIZE_ALL );
rSet.DisableItem( SID_SIZE_PAGE_WIDTH );
rSet.DisableItem( SID_SIZE_PAGE );
-// rSet.DisableItem( SID_INSERTPAGE );
rSet.DisableItem( SID_DUPLICATE_PAGE );
rSet.DisableItem( SID_ZOOM_TOOLBOX );
}
@@ -992,7 +1008,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// EditText aktiv
if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != NULL)
{
- USHORT nCurrentSId = SID_ATTR_CHAR;
+ sal_uInt16 nCurrentSId = SID_ATTR_CHAR;
if(HasCurrentFunction())
{
@@ -1003,7 +1019,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
nCurrentSId != SID_ATTR_CHAR_VERTICAL )
nCurrentSId = SID_ATTR_CHAR;
- rSet.Put( SfxBoolItem( nCurrentSId, TRUE ) );
+ rSet.Put( SfxBoolItem( nCurrentSId, sal_True ) );
// Kurzform von UpdateToolboxImages()
rSet.Put( TbxImageItem( SID_DRAWTBX_TEXT, nCurrentSId ) );
@@ -1017,11 +1033,11 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
if (GetDoc()->GetOnlineSpell())
{
- rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, TRUE));
+ rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, sal_True));
}
else
{
- rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, FALSE));
+ rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, sal_False));
}
}
@@ -1052,7 +1068,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_INSERT_PLUGIN );
rSet.DisableItem( SID_INSERT_SOUND );
rSet.DisableItem( SID_INSERT_VIDEO );
- rSet.DisableItem( SID_INSERT_APPLET );
rSet.DisableItem( SID_INSERT_FLOATINGFRAME );
rSet.DisableItem( SID_INSERT_MATH );
@@ -1355,20 +1370,20 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
// get marklist
SdrMarkList aMarkList = mpDrawView->GetMarkedObjectList();
- BOOL bFoundBitmap = FALSE;
- BOOL bFoundMetafile = FALSE;
- BOOL bFoundObjNoLine = FALSE;
- BOOL bFoundObjNoArea = FALSE;
- BOOL bFoundNoGraphicObj = FALSE;
- BOOL bFoundAny = FALSE;
+ sal_Bool bFoundBitmap = sal_False;
+ sal_Bool bFoundMetafile = sal_False;
+ sal_Bool bFoundObjNoLine = sal_False;
+ sal_Bool bFoundObjNoArea = sal_False;
+ sal_Bool bFoundNoGraphicObj = sal_False;
+ sal_Bool bFoundAny = sal_False;
bool bFoundTable = false;
// const int nMarkCount = (int) aMarkList.GetMarkCount();
- for (ULONG i=0; i < nMarkCount && !bFoundAny; i++)
+ for (sal_uLong i=0; i < nMarkCount && !bFoundAny; i++)
{
SdrObject* pObj= aMarkList.GetMark(i)->GetMarkedSdrObj();
- UINT16 nId = pObj->GetObjIdentifier();
- UINT32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
if(nInv == SdrInventor)
{
@@ -1381,42 +1396,42 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
case OBJ_FREELINE :
case OBJ_EDGE:
case OBJ_CARC :
- bFoundObjNoArea = TRUE;
- bFoundNoGraphicObj = TRUE;
+ bFoundObjNoArea = sal_True;
+ bFoundNoGraphicObj = sal_True;
break;
case OBJ_OLE2 :
- bFoundObjNoLine = TRUE;
- bFoundObjNoArea = TRUE;
- bFoundNoGraphicObj = TRUE;
+ bFoundObjNoLine = sal_True;
+ bFoundObjNoArea = sal_True;
+ bFoundNoGraphicObj = sal_True;
break;
case OBJ_GRAF :
bSingleGraphicSelected = nMarkCount == 1;
switch ( ((SdrGrafObj*)pObj)->GetGraphicType() )
{
case GRAPHIC_BITMAP :
- bFoundBitmap = TRUE;
+ bFoundBitmap = sal_True;
break;
case GRAPHIC_GDIMETAFILE :
- bFoundMetafile = TRUE;
+ bFoundMetafile = sal_True;
break;
default:
break;
}
- // #i25616# bFoundObjNoLine = TRUE;
- // #i25616# bFoundObjNoArea = TRUE;
+ // #i25616# bFoundObjNoLine = sal_True;
+ // #i25616# bFoundObjNoArea = sal_True;
break;
case OBJ_TABLE:
bFoundTable = true;
break;
default :
- bFoundAny = TRUE;
+ bFoundAny = sal_True;
}
}
else if(nInv == E3dInventor)
{
// 3D objects
- bFoundAny = TRUE;
+ bFoundAny = sal_True;
}
}
@@ -1502,7 +1517,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
//highlight selected custom shape
{
- USHORT nCurrentSId = 0;
+ sal_uInt16 nCurrentSId = 0;
if(HasCurrentFunction())
nCurrentSId = GetCurrentFunction()->GetSlotID();
@@ -1526,7 +1541,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if ( bDisableEditHyperlink )
rSet.DisableItem( SID_OPEN_HYPERLINK );
-#if defined WIN || defined WNT || defined UNX
+#if defined WNT || defined UNX
if( !mxScannerManager.is() )
{
rSet.DisableItem( SID_TWAIN_SELECT );
@@ -1534,11 +1549,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
#endif
-// Fuer Win16
-#ifndef SOLAR_JAVA
- rSet.DisableItem( SID_INSERT_APPLET );
-#endif
-
// Set the state of two entries in the 'Slide' context sub-menu
// concerning the visibility of master page background and master page
// shapes.
@@ -1551,8 +1561,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
- BYTE aBackgroundId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aObjectId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBackgroundId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aObjectId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_BACKGROUND,
aVisibleLayers.IsSet(aBackgroundId)));
rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_OBJECTS,
@@ -1566,25 +1576,25 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet)
{
//draview
- rSet.Put(SfxBoolItem(SID_DIAMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_OUTLINEMODE, FALSE));
+ rSet.Put(SfxBoolItem(SID_DIAMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_OUTLINEMODE, sal_False));
if (mePageKind == PK_NOTES)
{
- rSet.Put(SfxBoolItem(SID_DRAWINGMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_NOTESMODE, TRUE));
- rSet.Put(SfxBoolItem(SID_HANDOUTMODE, FALSE));
+ rSet.Put(SfxBoolItem(SID_DRAWINGMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_NOTESMODE, sal_True));
+ rSet.Put(SfxBoolItem(SID_HANDOUTMODE, sal_False));
}
else if (mePageKind == PK_HANDOUT)
{
- rSet.Put(SfxBoolItem(SID_DRAWINGMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_NOTESMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_HANDOUTMODE, TRUE));
+ rSet.Put(SfxBoolItem(SID_DRAWINGMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_NOTESMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_HANDOUTMODE, sal_True));
}
else
{
- rSet.Put(SfxBoolItem(SID_DRAWINGMODE, TRUE));
- rSet.Put(SfxBoolItem(SID_NOTESMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_HANDOUTMODE, FALSE));
+ rSet.Put(SfxBoolItem(SID_DRAWINGMODE, sal_True));
+ rSet.Put(SfxBoolItem(SID_NOTESMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_HANDOUTMODE, sal_False));
}
// Removed [GetDocSh()->GetCurrentFunction() ||] from the following
@@ -1640,7 +1650,7 @@ void DrawViewShell::GetState (SfxItemSet& rSet)
{
// Iterate over all requested items in the set.
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index 62f19d5b2930..b12c10e276e7 100644
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
@@ -188,7 +188,6 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
case SID_INSERT_PLUGIN:
case SID_INSERT_SOUND:
case SID_INSERT_VIDEO:
- case SID_INSERT_APPLET:
case SID_INSERT_FLOATINGFRAME:
case SID_INSERT_MATH:
case SID_INSERT_DIAGRAM:
@@ -205,7 +204,7 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
case SID_COPYOBJECTS:
{
- if ( mpDrawView->IsPresObjSelected(FALSE, TRUE) )
+ if ( mpDrawView->IsPresObjSelected(sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
@@ -248,7 +247,7 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
case SID_ZOOM_OUT:
case SID_ZOOM_PANNING:
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
SetCurrentFunction( FuZoom::Create(this, GetActiveWindow(), mpDrawView, GetDoc(), rReq) );
// Beendet sich selbst, kein Cancel() notwendig!
Invalidate( SID_ZOOM_TOOLBOX );
@@ -342,7 +341,7 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
case SID_CONNECTION_NEW_ROUTING:
{
SfxItemSet aDefAttr( GetPool(), SDRATTR_EDGELINE1DELTA, SDRATTR_EDGELINE3DELTA );
- GetView()->SetAttributes( aDefAttr, TRUE ); // (ReplaceAll)
+ GetView()->SetAttributes( aDefAttr, sal_True ); // (ReplaceAll)
Cancel();
rReq.Done();
@@ -376,7 +375,7 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
case SID_TWAIN_TRANSFER:
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if( mxScannerManager.is() )
{
@@ -387,7 +386,7 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
if( aContexts.getLength() )
{
mxScannerManager->startScan( aContexts.getConstArray()[ 0 ], mxScannerListener );
- bDone = TRUE;
+ bDone = sal_True;
}
}
catch( ... )
@@ -398,9 +397,9 @@ void DrawViewShell::FuTemp01(SfxRequest& rReq)
if( !bDone )
{
#ifndef UNX
- const USHORT nId = STR_TWAIN_NO_SOURCE;
+ const sal_uInt16 nId = STR_TWAIN_NO_SOURCE;
#else
- const USHORT nId = STR_TWAIN_NO_SOURCE_UNX;
+ const sal_uInt16 nId = STR_TWAIN_NO_SOURCE_UNX;
#endif
::sd::Window* pWindow = GetActiveWindow();
@@ -503,7 +502,7 @@ void DrawViewShell::ScannerEvent( const ::com::sun::star::lang::EventObject& )
aPnt += Point( pPage->GetLftBorder(), pPage->GetUppBorder() );
Rectangle aRect( aPnt, aBmpSize );
SdrGrafObj* pGrafObj = NULL;
- BOOL bInsertNewObject = TRUE;
+ sal_Bool bInsertNewObject = sal_True;
if( GetView()->AreObjectsMarked() )
{
@@ -520,8 +519,8 @@ void DrawViewShell::ScannerEvent( const ::com::sun::star::lang::EventObject& )
if( pGrafObj->IsEmptyPresObj() )
{
- bInsertNewObject = FALSE;
- pGrafObj->SetEmptyPresObj(FALSE);
+ bInsertNewObject = sal_False;
+ pGrafObj->SetEmptyPresObj(sal_False);
pGrafObj->SetOutlinerParaObject(NULL);
pGrafObj->SetGraphic( Graphic( aScanBmp ) );
}
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index bcaac6d8b866..c1b3cbf249f1 100644..100755
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -97,12 +97,12 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
if ( pArgs )
{
- const UINT32 nFormats = ( (SfxUInt32Item&) pArgs->Get( SID_GALLERY_FORMATS ) ).GetValue();
+ const sal_uInt32 nFormats = ( (SfxUInt32Item&) pArgs->Get( SID_GALLERY_FORMATS ) ).GetValue();
GalleryExplorer* pGal = SVX_GALLERY();
if ( pGal )
{
- GetDocSh()->SetWaitCursor( TRUE );
+ GetDocSh()->SetWaitCursor( sal_True );
// Graphik einfuegen
if (nFormats & SGA_FORMAT_GRAPHIC)
@@ -155,7 +155,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
SdrGrafObj* pGrafObj = NULL;
- BOOL bInsertNewObject = TRUE;
+ sal_Bool bInsertNewObject = sal_True;
if ( mpDrawView->AreObjectsMarked() )
{
@@ -179,10 +179,10 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
* Das leere Graphik-Objekt bekommt eine neue
* Graphik
******************************************/
- bInsertNewObject = FALSE;
+ bInsertNewObject = sal_False;
SdrGrafObj* pNewGrafObj = (SdrGrafObj*) pGrafObj->Clone();
- pNewGrafObj->SetEmptyPresObj(FALSE);
+ pNewGrafObj->SetEmptyPresObj(sal_False);
pNewGrafObj->SetOutlinerParaObject(NULL);
pNewGrafObj->SetGraphic(aGraphic);
@@ -217,7 +217,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON, &aMediaURLItem, 0L );
}
- GetDocSh()->SetWaitCursor( FALSE );
+ GetDocSh()->SetWaitCursor( sal_False );
}
}
}
@@ -268,7 +268,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pFillStyle, SfxUInt32Item, ID_VAL_STYLE, FALSE);
+ SFX_REQUEST_ARG (rReq, pFillStyle, SfxUInt32Item, ID_VAL_STYLE, sal_False);
if (CHECK_RANGE (XFILL_NONE, (sal_Int32)pFillStyle->GetValue (), XFILL_BITMAP))
{
pAttr->ClearItem (XATTR_FILLSTYLE);
@@ -288,7 +288,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pLineStyle, SfxUInt32Item, ID_VAL_STYLE, FALSE);
+ SFX_REQUEST_ARG (rReq, pLineStyle, SfxUInt32Item, ID_VAL_STYLE, sal_False);
if (CHECK_RANGE (XLINE_NONE, (sal_Int32)pLineStyle->GetValue (), XLINE_DASH))
{
pAttr->ClearItem (XATTR_LINESTYLE);
@@ -308,7 +308,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pLineWidth, SfxUInt32Item, ID_VAL_WIDTH, FALSE);
+ SFX_REQUEST_ARG (rReq, pLineWidth, SfxUInt32Item, ID_VAL_WIDTH, sal_False);
pAttr->ClearItem (XATTR_LINEWIDTH);
pAttr->Put (XLineWidthItem (pLineWidth->GetValue ()), XATTR_LINEWIDTH);
rBindings.Invalidate (SID_ATTR_LINE_WIDTH);
@@ -322,15 +322,15 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 3)
{
- SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, FALSE);
- SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, FALSE);
- SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, FALSE);
+ SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, sal_False);
+ SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, sal_False);
+ SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, sal_False);
pAttr->ClearItem (XATTR_FILLCOLOR);
pAttr->ClearItem (XATTR_FILLSTYLE);
- pAttr->Put (XFillColorItem (-1, Color ((BYTE) pRed->GetValue (),
- (BYTE) pGreen->GetValue (),
- (BYTE) pBlue->GetValue ())),
+ pAttr->Put (XFillColorItem (-1, Color ((sal_uInt8) pRed->GetValue (),
+ (sal_uInt8) pGreen->GetValue (),
+ (sal_uInt8) pBlue->GetValue ())),
XATTR_FILLCOLOR);
pAttr->Put (XFillStyleItem (XFILL_SOLID), XATTR_FILLSTYLE);
rBindings.Invalidate (SID_ATTR_FILL_COLOR);
@@ -345,14 +345,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 3)
{
- SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, FALSE);
- SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, FALSE);
- SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, FALSE);
+ SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, sal_False);
+ SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, sal_False);
+ SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, sal_False);
pAttr->ClearItem (XATTR_LINECOLOR);
- pAttr->Put (XLineColorItem (-1, Color ((BYTE) pRed->GetValue (),
- (BYTE) pGreen->GetValue (),
- (BYTE) pBlue->GetValue ())),
+ pAttr->Put (XLineColorItem (-1, Color ((sal_uInt8) pRed->GetValue (),
+ (sal_uInt8) pGreen->GetValue (),
+ (sal_uInt8) pBlue->GetValue ())),
XATTR_LINECOLOR);
rBindings.Invalidate (SID_ATTR_LINE_COLOR);
break;
@@ -366,16 +366,16 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
- SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, FALSE);
- SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, FALSE);
- SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
+ SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, sal_False);
+ SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, sal_False);
+ SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, sal_False);
XGradientList *pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
- Color aColor ((BYTE) pRed->GetValue (),
- (BYTE) pGreen->GetValue (),
- (BYTE) pBlue->GetValue ());
+ Color aColor ((sal_uInt8) pRed->GetValue (),
+ (sal_uInt8) pGreen->GetValue (),
+ (sal_uInt8) pBlue->GetValue ());
long i;
pAttr->ClearItem (XATTR_FILLGRADIENT);
@@ -426,16 +426,16 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
- SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, FALSE);
- SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, FALSE);
- SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
+ SFX_REQUEST_ARG (rReq, pRed, SfxUInt32Item, ID_VAL_RED, sal_False);
+ SFX_REQUEST_ARG (rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN, sal_False);
+ SFX_REQUEST_ARG (rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE, sal_False);
XHatchList *pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
- Color aColor ((BYTE) pRed->GetValue (),
- (BYTE) pGreen->GetValue (),
- (BYTE) pBlue->GetValue ());
+ Color aColor ((sal_uInt8) pRed->GetValue (),
+ (sal_uInt8) pGreen->GetValue (),
+ (sal_uInt8) pBlue->GetValue ());
long i;
pAttr->ClearItem (XATTR_FILLHATCH);
@@ -480,13 +480,13 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 7)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
- SFX_REQUEST_ARG (rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE, FALSE);
- SFX_REQUEST_ARG (rReq, pDots, SfxUInt32Item, ID_VAL_DOTS, FALSE);
- SFX_REQUEST_ARG (rReq, pDotLen, SfxUInt32Item, ID_VAL_DOTLEN, FALSE);
- SFX_REQUEST_ARG (rReq, pDashes, SfxUInt32Item, ID_VAL_DASHES, FALSE);
- SFX_REQUEST_ARG (rReq, pDashLen, SfxUInt32Item, ID_VAL_DASHLEN, FALSE);
- SFX_REQUEST_ARG (rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
+ SFX_REQUEST_ARG (rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE, sal_False);
+ SFX_REQUEST_ARG (rReq, pDots, SfxUInt32Item, ID_VAL_DOTS, sal_False);
+ SFX_REQUEST_ARG (rReq, pDotLen, SfxUInt32Item, ID_VAL_DOTLEN, sal_False);
+ SFX_REQUEST_ARG (rReq, pDashes, SfxUInt32Item, ID_VAL_DASHES, sal_False);
+ SFX_REQUEST_ARG (rReq, pDashLen, SfxUInt32Item, ID_VAL_DASHLEN, sal_False);
+ SFX_REQUEST_ARG (rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE, sal_False);
if (CHECK_RANGE (XDASH_RECT, (sal_Int32)pStyle->GetValue (), XDASH_ROUNDRELATIVE))
{
@@ -528,14 +528,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 8)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
- SFX_REQUEST_ARG (rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE, FALSE);
- SFX_REQUEST_ARG (rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE, FALSE);
- SFX_REQUEST_ARG (rReq, pBorder, SfxUInt32Item, ID_VAL_BORDER, FALSE);
- SFX_REQUEST_ARG (rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X, FALSE);
- SFX_REQUEST_ARG (rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y, FALSE);
- SFX_REQUEST_ARG (rReq, pStart, SfxUInt32Item, ID_VAL_STARTINTENS, FALSE);
- SFX_REQUEST_ARG (rReq, pEnd, SfxUInt32Item, ID_VAL_ENDINTENS, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
+ SFX_REQUEST_ARG (rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE, sal_False);
+ SFX_REQUEST_ARG (rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE, sal_False);
+ SFX_REQUEST_ARG (rReq, pBorder, SfxUInt32Item, ID_VAL_BORDER, sal_False);
+ SFX_REQUEST_ARG (rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X, sal_False);
+ SFX_REQUEST_ARG (rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y, sal_False);
+ SFX_REQUEST_ARG (rReq, pStart, SfxUInt32Item, ID_VAL_STARTINTENS, sal_False);
+ SFX_REQUEST_ARG (rReq, pEnd, SfxUInt32Item, ID_VAL_ENDINTENS, sal_False);
if (CHECK_RANGE (XGRAD_LINEAR, (sal_Int32)pStyle->GetValue (), XGRAD_RECT) &&
CHECK_RANGE (0, (sal_Int32)pAngle->GetValue (), 360) &&
@@ -603,10 +603,10 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
- SFX_REQUEST_ARG (rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE, FALSE);
- SFX_REQUEST_ARG (rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE, FALSE);
- SFX_REQUEST_ARG (rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
+ SFX_REQUEST_ARG (rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE, sal_False);
+ SFX_REQUEST_ARG (rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE, sal_False);
+ SFX_REQUEST_ARG (rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE, sal_False);
if (CHECK_RANGE (XHATCH_SINGLE, (sal_Int32)pStyle->GetValue (), XHATCH_TRIPLE) &&
CHECK_RANGE (0, (sal_Int32)pAngle->GetValue (), 360))
@@ -662,7 +662,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
XGradientList *pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
@@ -696,7 +696,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, FALSE);
+ SFX_REQUEST_ARG (rReq, pName, SfxStringItem, ID_VAL_INDEX, sal_False);
XHatchList *pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
@@ -777,7 +777,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
void DrawViewShell::AttrState (SfxItemSet& rSet)
{
SfxWhichIter aIter (rSet);
- USHORT nWhich = aIter.FirstWhich ();
+ sal_uInt16 nWhich = aIter.FirstWhich ();
SfxItemSet aAttr( GetDoc()->GetPool() );
mpDrawView->GetAttributes( aAttr );
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 48f5d5b0c3d9..954b2104f24f 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -60,6 +60,7 @@
#include <sfx2/dispatch.hxx>
#include <svtools/cliplistener.hxx>
#include <svx/float3d.hxx>
+#include "helpids.h"
#include "view/viewoverlaymanager.hxx"
#include "app.hrc"
@@ -93,7 +94,7 @@ static const ::rtl::OUString MASTER_VIEW_TOOL_BAR_NAME(
namespace sd {
-BOOL DrawViewShell::mbPipette = FALSE;
+sal_Bool DrawViewShell::mbPipette = sal_False;
// ------------------------
// - ScannerEventListener -
@@ -166,7 +167,7 @@ DrawViewShell::~DrawViewShell()
// Remove references to items within Svx3DWin
// (maybe do a listening sometime in Svx3DWin)
- USHORT nId = Svx3DChildWindow::GetChildWindowId();
+ sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
SfxChildWindow* pWindow = GetViewFrame() ? GetViewFrame()->GetChildWindow(nId) : NULL;
if(pWindow)
{
@@ -184,25 +185,25 @@ DrawViewShell::~DrawViewShell()
DisposeFunctions();
SdPage* pPage;
- USHORT aPageCnt = GetDoc()->GetSdPageCount(mePageKind);
+ sal_uInt16 aPageCnt = GetDoc()->GetSdPageCount(mePageKind);
- for (USHORT i = 0; i < aPageCnt; i++)
+ for (sal_uInt16 i = 0; i < aPageCnt; i++)
{
pPage = GetDoc()->GetSdPage(i, mePageKind);
if (pPage == mpActualPage)
{
- GetDoc()->SetSelected(pPage, TRUE);
+ GetDoc()->SetSelected(pPage, sal_True);
}
else
{
- GetDoc()->SetSelected(pPage, FALSE);
+ GetDoc()->SetSelected(pPage, sal_False);
}
}
if ( mpClipEvtLstnr )
{
- mpClipEvtLstnr->AddRemoveListener( GetActiveWindow(), FALSE );
+ mpClipEvtLstnr->AddRemoveListener( GetActiveWindow(), sal_False );
mpClipEvtLstnr->ClearCallbackLink(); // prevent callback if another thread is waiting
mpClipEvtLstnr->release();
}
@@ -225,11 +226,11 @@ DrawViewShell::~DrawViewShell()
void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
{
mpActualPage = 0;
- mbMousePosFreezed = FALSE;
+ mbMousePosFreezed = sal_False;
mbReadOnly = GetDocSh()->IsReadOnly();
mpSlotArray = 0;
mpClipEvtLstnr = 0;
- mbPastePossible = FALSE;
+ mbPastePossible = sal_False;
mbIsLayerModeActive = false;
mpFrameView->Connect();
@@ -241,7 +242,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
// Ungerader Eintrag: gemappter Slot
// Achtung: Anpassen von GetIdBySubId() !!!
// Reihenfolge (insbesondere Zoom) darf nicht geaendert werden !!!
- mpSlotArray = new USHORT[ SLOTARRAY_COUNT ];
+ mpSlotArray = new sal_uInt16[ SLOTARRAY_COUNT ];
mpSlotArray[ 0 ] = SID_OBJECT_CHOOSE_MODE;
mpSlotArray[ 1 ] = SID_OBJECT_ROTATE;
mpSlotArray[ 2 ] = SID_OBJECT_ALIGN;
@@ -273,7 +274,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
mpDrawView = new DrawView(pDocSh, GetActiveWindow(), this);
mpView = mpDrawView; // Pointer der Basisklasse ViewShell
- mpDrawView->SetSwapAsynchron(TRUE); // Asynchrones Laden von Graphiken
+ mpDrawView->SetSwapAsynchron(sal_True); // Asynchrones Laden von Graphiken
// We do not read the page kind from the frame view anymore so we have
// to set it in order to resync frame view and this view.
@@ -333,16 +334,16 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
if( eDocType == DOCUMENT_TYPE_DRAW )
{
SetHelpId( SD_IF_SDGRAPHICVIEWSHELL );
- GetActiveWindow()->SetHelpId( SD_IF_SDGRAPHICVIEWSHELL );
- GetActiveWindow()->SetUniqueId( SD_IF_SDGRAPHICVIEWSHELL );
+ GetActiveWindow()->SetHelpId( HID_SDGRAPHICVIEWSHELL );
+ GetActiveWindow()->SetUniqueId( HID_SDGRAPHICVIEWSHELL );
}
else
{
if (mePageKind == PK_NOTES)
{
SetHelpId( SID_NOTESMODE );
- GetActiveWindow()->SetHelpId( SID_NOTESMODE );
- GetActiveWindow()->SetUniqueId( SID_NOTESMODE );
+ GetActiveWindow()->SetHelpId( CMD_SID_NOTESMODE );
+ GetActiveWindow()->SetUniqueId( CMD_SID_NOTESMODE );
// AutoLayouts muessen erzeugt sein
GetDoc()->StopWorkStartupDelay();
@@ -350,8 +351,8 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
else if (mePageKind == PK_HANDOUT)
{
SetHelpId( SID_HANDOUTMODE );
- GetActiveWindow()->SetHelpId( SID_HANDOUTMODE );
- GetActiveWindow()->SetUniqueId( SID_HANDOUTMODE );
+ GetActiveWindow()->SetHelpId( CMD_SID_HANDOUTMODE );
+ GetActiveWindow()->SetUniqueId( CMD_SID_HANDOUTMODE );
// AutoLayouts muessen erzeugt sein
GetDoc()->StopWorkStartupDelay();
@@ -359,26 +360,26 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
else
{
SetHelpId( SD_IF_SDDRAWVIEWSHELL );
- GetActiveWindow()->SetHelpId( SD_IF_SDDRAWVIEWSHELL );
- GetActiveWindow()->SetUniqueId( SD_IF_SDDRAWVIEWSHELL );
+ GetActiveWindow()->SetHelpId( HID_SDDRAWVIEWSHELL );
+ GetActiveWindow()->SetUniqueId( HID_SDDRAWVIEWSHELL );
}
}
// Selektionsfunktion starten
SfxRequest aReq(SID_OBJECT_SELECT, 0, GetDoc()->GetItemPool());
FuPermanent(aReq);
- mpDrawView->SetFrameDragSingles(TRUE);
+ mpDrawView->SetFrameDragSingles(sal_True);
if (pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED)
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
}
else
{
- mbZoomOnPage = TRUE;
+ mbZoomOnPage = sal_True;
}
- mbIsRulerDrag = FALSE;
+ mbIsRulerDrag = sal_False;
String aName( RTL_CONSTASCII_USTRINGPARAM("DrawViewShell"));
SetName (aName);
@@ -510,12 +511,12 @@ void DrawViewShell::SetupPage (Size &rSize,
long nRight,
long nUpper,
long nLower,
- BOOL bSize,
- BOOL bMargin,
- BOOL bScaleAll)
+ sal_Bool bSize,
+ sal_Bool bMargin,
+ sal_Bool bScaleAll)
{
- USHORT nPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind);
- USHORT i;
+ sal_uInt16 nPageCnt = GetDoc()->GetMasterSdPageCount(mePageKind);
+ sal_uInt16 i;
for (i = 0; i < nPageCnt; i++)
{
@@ -588,7 +589,7 @@ void DrawViewShell::SetupPage (Size &rSize,
if ( mePageKind == PK_STANDARD )
{
SdPage* pHandoutPage = GetDoc()->GetSdPage(0, PK_HANDOUT);
- pHandoutPage->CreateTitleAndLayout(TRUE);
+ pHandoutPage->CreateTitleAndLayout(sal_True);
}
long nWidth = mpActualPage->GetSize().Width();
@@ -597,7 +598,7 @@ void DrawViewShell::SetupPage (Size &rSize,
Point aPageOrg(nWidth, nHeight / 2);
Size aSize( nWidth * 3, nHeight * 2);
- InitWindows(aPageOrg, aSize, Point(-1, -1), TRUE);
+ InitWindows(aPageOrg, aSize, Point(-1, -1), sal_True);
Point aVisAreaPos;
@@ -640,7 +641,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
else
{
SvxZoomItem* pZoomItem;
- UINT16 nZoom = (UINT16) GetActiveWindow()->GetZoom();
+ sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom();
if( mbZoomOnPage )
pZoomItem = new SvxZoomItem( SVX_ZOOM_WHOLEPAGE, nZoom );
@@ -648,7 +649,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
pZoomItem = new SvxZoomItem( SVX_ZOOM_PERCENT, nZoom );
// Bereich einschraenken
- USHORT nZoomValues = SVX_ZOOM_ENABLE_ALL;
+ sal_uInt16 nZoomValues = SVX_ZOOM_ENABLE_ALL;
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
if( ( pPageView && pPageView->GetObjList()->GetObjCount() == 0 ) )
@@ -672,7 +673,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
else
{
sd::Window * pActiveWindow = GetActiveWindow();
- SvxZoomSliderItem aZoomItem( (UINT16) pActiveWindow->GetZoom(), (USHORT)pActiveWindow->GetMinZoom(), (USHORT)pActiveWindow->GetMaxZoom() ) ;
+ SvxZoomSliderItem aZoomItem( (sal_uInt16) pActiveWindow->GetZoom(), (sal_uInt16)pActiveWindow->GetMinZoom(), (sal_uInt16)pActiveWindow->GetMaxZoom() ) ;
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
if( pPageView )
@@ -769,13 +770,13 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
SdrLayer* pLayer = NULL;
SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
- bool bOneLayer = TRUE;
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
+ bool bOneLayer = true;
// Use the first ten selected shapes as a (hopefully
// representative) sample of all shapes of the current page.
// Detect whether they belong to the same layer.
- for( ULONG j = 0; j < nMarkCount && bOneLayer && j < 10; j++ )
+ for( sal_uLong j = 0; j < nMarkCount && bOneLayer && j < 10; j++ )
{
pObj = rMarkList.GetMark( j )->GetMarkedSdrObj();
if( pObj )
@@ -783,7 +784,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
nLayer = pObj->GetLayer();
if( j != 0 && nLayer != nOldLayer )
- bOneLayer = FALSE;
+ bOneLayer = sal_False;
nOldLayer = nLayer;
}
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 62284abda129..d3fec090aef7 100644..100755
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -32,7 +32,7 @@
#include <comphelper/processfactory.hxx>
#include <svx/svdlayer.hxx>
#include <svx/svxids.hrc>
-
+#include <sfx2/msgpool.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/hlnkitem.hxx>
#include <tools/urlobj.hxx>
@@ -86,7 +86,7 @@ namespace sd {
void DrawViewShell::FuTemp02(SfxRequest& rReq)
{
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
case SID_INSERTLAYER:
@@ -97,13 +97,13 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
}
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
- USHORT nLayerCnt = rLayerAdmin.GetLayerCount();
- USHORT nLayer = nLayerCnt - 2 + 1;
+ sal_uInt16 nLayerCnt = rLayerAdmin.GetLayerCount();
+ sal_uInt16 nLayer = nLayerCnt - 2 + 1;
String aLayerName ( SdResId(STR_LAYER) ), aLayerTitle, aLayerDesc;
aLayerName += String::CreateFromInt32( (sal_Int32)nLayer );
- BOOL bIsVisible = FALSE;
- BOOL bIsLocked = FALSE;
- BOOL bIsPrintable = FALSE;
+ sal_Bool bIsVisible = sal_False;
+ sal_Bool bIsLocked = sal_False;
+ sal_Bool bIsPrintable = sal_False;
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -123,16 +123,16 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
AbstractSdInsertLayerDlg* pDlg = pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, true, String( SdResId( STR_INSERTLAYER ) ) ) : 0;
if( pDlg )
{
- pDlg->SetHelpId( SID_INSERTLAYER );
+ pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() );
// Ueberpruefung auf schon vorhandene Namen
- BOOL bLoop = TRUE;
+ sal_Bool bLoop = sal_True;
while( bLoop && pDlg->Execute() == RET_OK )
{
pDlg->GetAttr( aNewAttr );
aLayerName = ((SdAttrLayerName &) aNewAttr.Get (ATTR_LAYER_NAME)).GetValue ();
- if( rLayerAdmin.GetLayer( aLayerName, FALSE )
+ if( rLayerAdmin.GetLayer( aLayerName, sal_False )
|| aLayerName.Len()==0 )
{
// Name ist schon vorhanden
@@ -143,7 +143,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
aWarningBox.Execute();
}
else
- bLoop = FALSE;
+ bLoop = sal_False;
}
if( bLoop ) // wurde abgebrochen
{
@@ -174,10 +174,10 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
}
else
{
- SFX_REQUEST_ARG (rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME, FALSE);
- SFX_REQUEST_ARG (rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE, FALSE);
- SFX_REQUEST_ARG (rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED, FALSE);
- SFX_REQUEST_ARG (rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE, FALSE);
+ SFX_REQUEST_ARG (rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME, sal_False);
+ SFX_REQUEST_ARG (rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE, sal_False);
+ SFX_REQUEST_ARG (rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED, sal_False);
+ SFX_REQUEST_ARG (rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE, sal_False);
aLayerName = pLayerName->GetValue ();
bIsVisible = pIsVisible->GetValue ();
@@ -188,7 +188,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
String aPrevLayer = mpDrawView->GetActiveLayer();
String aName;
SdrLayer* pLayer;
- USHORT nPrevLayer = 0;
+ sal_uInt16 nPrevLayer = 0;
nLayerCnt = rLayerAdmin.GetLayerCount();
for ( nLayer = 0; nLayer < nLayerCnt; nLayer++ )
@@ -198,12 +198,12 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
if ( aPrevLayer == aName )
{
- nPrevLayer = Max(nLayer, (USHORT) 4);
+ nPrevLayer = Max(nLayer, (sal_uInt16) 4);
}
}
mpDrawView->InsertNewLayer(aLayerName, nPrevLayer + 1);
- pLayer = rLayerAdmin.GetLayer(aLayerName, FALSE);
+ pLayer = rLayerAdmin.GetLayer(aLayerName, sal_False);
if( pLayer )
{
pLayer->SetTitle( aLayerTitle );
@@ -218,7 +218,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
ResetActualLayer();
- GetDoc()->SetChanged(TRUE);
+ GetDoc()->SetChanged(sal_True);
GetViewFrame()->GetDispatcher()->Execute(SID_SWITCHLAYER,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
@@ -236,9 +236,9 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
}
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
- USHORT nCurPage = GetLayerTabControl()->GetCurPageId();
+ sal_uInt16 nCurPage = GetLayerTabControl()->GetCurPageId();
String aLayerName( GetLayerTabControl()->GetPageText(nCurPage) );
- SdrLayer* pLayer = rLayerAdmin.GetLayer(aLayerName, FALSE);
+ SdrLayer* pLayer = rLayerAdmin.GetLayer(aLayerName, sal_False);
String aLayerTitle( pLayer->GetTitle() );
String aLayerDesc( pLayer->GetDescription() );
@@ -247,10 +247,10 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
String aOldLayerTitle( aLayerTitle );
String aOldLayerDesc( aLayerDesc );
- BOOL bIsVisible, bIsLocked, bIsPrintable;
- BOOL bOldIsVisible = bIsVisible = mpDrawView->IsLayerVisible(aLayerName);
- BOOL bOldIsLocked = bIsLocked = mpDrawView->IsLayerLocked(aLayerName);
- BOOL bOldIsPrintable = bIsPrintable = mpDrawView->IsLayerPrintable(aLayerName);
+ sal_Bool bIsVisible, bIsLocked, bIsPrintable;
+ sal_Bool bOldIsVisible = bIsVisible = mpDrawView->IsLayerVisible(aLayerName);
+ sal_Bool bOldIsLocked = bIsLocked = mpDrawView->IsLayerLocked(aLayerName);
+ sal_Bool bOldIsPrintable = bIsPrintable = mpDrawView->IsLayerPrintable(aLayerName);
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -286,17 +286,17 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
AbstractSdInsertLayerDlg* pDlg = pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, bDelete, String( SdResId( STR_MODIFYLAYER ) ) ) : 0;
if( pDlg )
{
- pDlg->SetHelpId( SID_MODIFYLAYER );
+ pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() );
// Ueberpruefung auf schon vorhandene Namen
- BOOL bLoop = TRUE;
- USHORT nRet = 0;
+ sal_Bool bLoop = sal_True;
+ sal_uInt16 nRet = 0;
while( bLoop && ( (nRet = pDlg->Execute()) == RET_OK ) )
{
pDlg->GetAttr( aNewAttr );
aLayerName = ((SdAttrLayerName &) aNewAttr.Get (ATTR_LAYER_NAME)).GetValue ();
- if( (rLayerAdmin.GetLayer( aLayerName, FALSE ) &&
+ if( (rLayerAdmin.GetLayer( aLayerName, sal_False ) &&
aLayerName != aOldLayerName) || aLayerName.Len()==0 )
{
// Name ist schon vorhanden
@@ -307,7 +307,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
aWarningBox.Execute();
}
else
- bLoop = FALSE;
+ bLoop = sal_False;
}
switch (nRet)
{
@@ -331,10 +331,10 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
}
else if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG (rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME, FALSE);
- SFX_REQUEST_ARG (rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE, FALSE);
- SFX_REQUEST_ARG (rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED, FALSE);
- SFX_REQUEST_ARG (rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE, FALSE);
+ SFX_REQUEST_ARG (rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME, sal_False);
+ SFX_REQUEST_ARG (rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE, sal_False);
+ SFX_REQUEST_ARG (rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED, sal_False);
+ SFX_REQUEST_ARG (rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE, sal_False);
aLayerName = pLayerName->GetValue ();
bIsVisible = pIsVisible->GetValue ();
@@ -349,7 +349,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
break;
}
- SfxUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
SdLayerModifyUndoAction* pAction = new SdLayerModifyUndoAction(
GetDoc(),
pLayer,
@@ -426,8 +426,8 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
SfxFrameItem aFrm( SID_DOCFRAME, pFrame );
SfxStringItem aReferer( SID_REFERER, aReferName );
- SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, FALSE );
- SfxBoolItem aBrowsing( SID_BROWSE, TRUE );
+ SfxBoolItem aNewView( SID_OPEN_NEW_VIEW, sal_False );
+ SfxBoolItem aBrowsing( SID_BROWSE, sal_True );
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if (pViewFrm)
@@ -495,7 +495,7 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
case SID_INSERT_FLD_PAGES:
case SID_INSERT_FLD_FILE:
{
- USHORT nMul = 1;
+ sal_uInt16 nMul = 1;
SvxFieldItem* pFieldItem = 0;
switch( nSId )
@@ -579,19 +579,19 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
{
Outliner* pOutl = GetDoc()->GetInternalOutliner();
pOutl->Init( OUTLINERMODE_TEXTOBJECT );
- USHORT nOutlMode = pOutl->GetMode();
+ sal_uInt16 nOutlMode = pOutl->GetMode();
pOutl->SetStyleSheet( 0, NULL );
pOutl->QuickInsertField( *pFieldItem, ESelection() );
OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject();
SdrRectObj* pRectObj = new SdrRectObj( OBJ_TEXT );
- pRectObj->SetMergedItem(SdrTextAutoGrowWidthItem(TRUE));
+ pRectObj->SetMergedItem(SdrTextAutoGrowWidthItem(sal_True));
pOutl->UpdateFields();
- pOutl->SetUpdateMode( TRUE );
+ pOutl->SetUpdateMode( sal_True );
Size aSize( pOutl->CalcTextSize() );
aSize.Width() *= nMul;
- pOutl->SetUpdateMode( FALSE );
+ pOutl->SetUpdateMode( sal_False );
Point aPos;
Rectangle aRect( aPos, GetActiveWindow()->GetOutputSizePixel() );
@@ -717,9 +717,9 @@ void DrawViewShell::FuTemp02(SfxRequest& rReq)
};
};
-bool DrawViewShell::RenameSlide( USHORT nPageId, const String & rName )
+bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const String & rName )
{
- BOOL bOutDummy;
+ sal_Bool bOutDummy;
if( GetDoc()->GetPageByName( rName, bOutDummy ) != SDRPAGE_NOTFOUND )
return false;
@@ -733,13 +733,13 @@ bool DrawViewShell::RenameSlide( USHORT nPageId, const String & rName )
// Undo
SdPage* pUndoPage = pPageToRename;
SdrLayerAdmin & rLayerAdmin = GetDoc()->GetLayerAdmin();
- BYTE nBackground = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), FALSE );
- BYTE nBgObj = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), FALSE );
+ sal_uInt8 nBackground = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), sal_False );
+ sal_uInt8 nBgObj = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), sal_False );
SetOfByte aVisibleLayers = mpActualPage->TRG_GetMasterPageVisibleLayers();
- SfxUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
+ ::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
- pManager, GetDoc(), pUndoPage, rName, pUndoPage->GetAutoLayout(),
+ GetDoc(), pUndoPage, rName, pUndoPage->GetAutoLayout(),
aVisibleLayers.IsSet( nBackground ),
aVisibleLayers.IsSet( nBgObj ));
pManager->AddUndoAction( pAction );
@@ -761,7 +761,7 @@ bool DrawViewShell::RenameSlide( USHORT nPageId, const String & rName )
GetDoc()->RenameLayoutTemplate( pPageToRename->GetLayoutName(), rName );
}
- bool bSuccess = ( FALSE != rName.Equals( pPageToRename->GetName()));
+ bool bSuccess = ( sal_False != rName.Equals( pPageToRename->GetName()));
if( bSuccess )
{
@@ -769,10 +769,10 @@ bool DrawViewShell::RenameSlide( USHORT nPageId, const String & rName )
maTabControl.SetPageText( nPageId, rName );
// set document to modified state
- GetDoc()->SetChanged( TRUE );
+ GetDoc()->SetChanged( sal_True );
// inform navigator about change
- SfxBoolItem aItem( SID_NAVIGATOR_INIT, TRUE );
+ SfxBoolItem aItem( SID_NAVIGATOR_INIT, sal_True );
GetViewFrame()->GetDispatcher()->Execute(
SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
@@ -820,12 +820,12 @@ void DrawViewShell::ModifyLayer (
{
if( pLayer )
{
- const USHORT nPageCount = GetLayerTabControl()->GetPageCount();
- USHORT nCurPage = 0;
- USHORT nPos;
+ const sal_uInt16 nPageCount = GetLayerTabControl()->GetPageCount();
+ sal_uInt16 nCurPage = 0;
+ sal_uInt16 nPos;
for( nPos = 0; nPos < nPageCount; nPos++ )
{
- USHORT nId = GetLayerTabControl()->GetPageId( nPos );
+ sal_uInt16 nId = GetLayerTabControl()->GetPageId( nPos );
if( pLayer->GetName() == GetLayerTabControl()->GetPageText( nId ) )
{
nCurPage = nId;
@@ -840,7 +840,7 @@ void DrawViewShell::ModifyLayer (
mpDrawView->SetLayerLocked( rLayerName, bIsLocked);
mpDrawView->SetLayerPrintable(rLayerName, bIsPrintable);
- GetDoc()->SetChanged(TRUE);
+ GetDoc()->SetChanged(sal_True);
GetLayerTabControl()->SetPageText(nCurPage, rLayerName);
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 7540a9b4149b..5b6477ca29db 100644..100755
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -78,12 +78,12 @@ namespace sd {
void DrawViewShell::FuTemp03(SfxRequest& rReq)
{
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
case SID_GROUP: // BASIC
{
- if ( mpDrawView->IsPresObjSelected( TRUE, TRUE, TRUE ) )
+ if ( mpDrawView->IsPresObjSelected( sal_True, sal_True, sal_True ) )
{
::sd::Window* pWindow = GetActiveWindow();
InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
@@ -133,7 +133,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
}
SfxBindings& rBindings = GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_NAVIGATOR_STATE, TRUE, FALSE );
+ rBindings.Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False );
rBindings.Invalidate( SID_CONTEXT );
Cancel();
@@ -168,7 +168,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
}
SfxBindings& rBindings = GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_NAVIGATOR_STATE, TRUE, FALSE );
+ rBindings.Invalidate( SID_NAVIGATOR_STATE, sal_True, sal_False );
rBindings.Invalidate( SID_CONTEXT );
Cancel();
@@ -302,10 +302,10 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
case SID_DISMANTLE: // BASIC
{
- if ( mpDrawView->IsDismantlePossible(FALSE) )
+ if ( mpDrawView->IsDismantlePossible(sal_False) )
{
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->DismantleMarkedObjects(FALSE);
+ mpDrawView->DismantleMarkedObjects(sal_False);
}
Cancel();
rReq.Done ();
@@ -341,21 +341,21 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
WaitObject aWait( (Window*)GetActiveWindow() );
mpDrawView->Break3DObj();
}
- else if ( mpDrawView->IsDismantlePossible(TRUE) )
+ else if ( mpDrawView->IsDismantlePossible(sal_True) )
{
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->DismantleMarkedObjects(TRUE);
+ mpDrawView->DismantleMarkedObjects(sal_True);
}
else if ( mpDrawView->IsImportMtfPossible() )
{
WaitObject aWait( (Window*)GetActiveWindow() );
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nAnz=rMarkList.GetMarkCount();
+ sal_uLong nAnz=rMarkList.GetMarkCount();
// Summe der Metaobjekte aller sel. Metafiles erm.
- ULONG nCount = 0;
- for(ULONG nm=0; nm<nAnz; nm++)
+ sal_uLong nCount = 0;
+ for(sal_uLong nm=0; nm<nAnz; nm++)
{
SdrMark* pM=rMarkList.GetMark(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
@@ -411,7 +411,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
}
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->ConvertMarkedObjTo3D(TRUE);
+ mpDrawView->ConvertMarkedObjTo3D(sal_True);
}
}
@@ -571,7 +571,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
SfxStringItem aStyleNameItem( SID_STYLE_EDIT, pStyleSheet->GetName() );
aSet.Put(aStyleNameItem);
- SfxUInt16Item aStyleFamilyItem( SID_STYLE_FAMILY, (UINT16)pStyleSheet->GetFamily() );
+ SfxUInt16Item aStyleFamilyItem( SID_STYLE_FAMILY, (sal_uInt16)pStyleSheet->GetFamily() );
aSet.Put(aStyleFamilyItem);
rReq.SetArgs(aSet);
@@ -593,7 +593,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
case SID_IMAP:
{
SvxIMapDlg* pDlg;
- USHORT nId = SvxIMapDlgChildWindow::GetChildWindowId();
+ sal_uInt16 nId = SvxIMapDlgChildWindow::GetChildWindowId();
GetViewFrame()->ToggleChildWindow( nId );
GetViewFrame()->GetBindings().Invalidate( SID_IMAP );
@@ -641,9 +641,9 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
|*
\************************************************************************/
-USHORT DrawViewShell::GetIdBySubId( USHORT nSId )
+sal_uInt16 DrawViewShell::GetIdBySubId( sal_uInt16 nSId )
{
- USHORT nMappedSId = 0;
+ sal_uInt16 nMappedSId = 0;
switch( nSId )
{
case SID_OBJECT_ROTATE:
@@ -793,7 +793,6 @@ USHORT DrawViewShell::GetIdBySubId( USHORT nSId )
case SID_INSERT_PLUGIN:
case SID_INSERT_SOUND:
case SID_INSERT_VIDEO:
- case SID_INSERT_APPLET:
case SID_INSERT_TABLE:
{
nMappedSId = SID_DRAWTBX_INSERT;
@@ -842,13 +841,13 @@ USHORT DrawViewShell::GetIdBySubId( USHORT nSId )
|*
\************************************************************************/
-void DrawViewShell::MapSlot( USHORT nSId )
+void DrawViewShell::MapSlot( sal_uInt16 nSId )
{
- USHORT nMappedSId = GetIdBySubId( nSId );
+ sal_uInt16 nMappedSId = GetIdBySubId( nSId );
if( nMappedSId > 0 )
{
- USHORT nID = GetArrayId( nMappedSId ) + 1;
+ sal_uInt16 nID = GetArrayId( nMappedSId ) + 1;
mpSlotArray[ nID ] = nSId;
}
}
@@ -859,11 +858,11 @@ void DrawViewShell::MapSlot( USHORT nSId )
|*
\************************************************************************/
-void DrawViewShell::UpdateToolboxImages( SfxItemSet &rSet, BOOL bPermanent )
+void DrawViewShell::UpdateToolboxImages( SfxItemSet &rSet, sal_Bool bPermanent )
{
if( !bPermanent )
{
- USHORT nId = GetArrayId( SID_ZOOM_TOOLBOX ) + 1;
+ sal_uInt16 nId = GetArrayId( SID_ZOOM_TOOLBOX ) + 1;
rSet.Put( TbxImageItem( SID_ZOOM_TOOLBOX, mpSlotArray[nId] ) );
nId = GetArrayId( SID_DRAWTBX_INSERT ) + 1;
@@ -877,7 +876,7 @@ void DrawViewShell::UpdateToolboxImages( SfxItemSet &rSet, BOOL bPermanent )
}
else
{
- for( USHORT nId = 0; nId < SLOTARRAY_COUNT; nId += 2 )
+ for( sal_uInt16 nId = 0; nId < SLOTARRAY_COUNT; nId += 2 )
{
rSet.Put( TbxImageItem( mpSlotArray[nId], mpSlotArray[nId+1] ) );
}
@@ -890,10 +889,10 @@ void DrawViewShell::UpdateToolboxImages( SfxItemSet &rSet, BOOL bPermanent )
|*
\************************************************************************/
-USHORT DrawViewShell::GetMappedSlot( USHORT nSId )
+sal_uInt16 DrawViewShell::GetMappedSlot( sal_uInt16 nSId )
{
- USHORT nSlot = 0;
- USHORT nId = GetArrayId( nSId );
+ sal_uInt16 nSlot = 0;
+ sal_uInt16 nId = GetArrayId( nSId );
if( nId != USHRT_MAX )
nSlot = mpSlotArray[ nId+1 ];
@@ -913,9 +912,9 @@ USHORT DrawViewShell::GetMappedSlot( USHORT nSId )
|*
\************************************************************************/
-USHORT DrawViewShell::GetArrayId( USHORT nSId )
+sal_uInt16 DrawViewShell::GetArrayId( sal_uInt16 nSId )
{
- for( USHORT i = 0; i < SLOTARRAY_COUNT; i += 2 )
+ for( sal_uInt16 i = 0; i < SLOTARRAY_COUNT; i += 2 )
{
if( mpSlotArray[ i ] == nSId )
return( i );
diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx
index 6f446b16937f..6d46b298b3ec 100644..100755
--- a/sd/source/ui/view/drviewsd.cxx
+++ b/sd/source/ui/view/drviewsd.cxx
@@ -67,13 +67,13 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
{
CheckLineTo (rReq);
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
case SID_NAVIGATOR_INIT:
{
- USHORT nId = SID_NAVIGATOR;
+ sal_uInt16 nId = SID_NAVIGATOR;
SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
if( pWindow )
{
@@ -121,7 +121,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
case PAGE_NEXT:
{
// Sprung zu naechster Seite
- USHORT nSdPage = (mpActualPage->GetPageNum() - 1) / 2;
+ sal_uInt16 nSdPage = (mpActualPage->GetPageNum() - 1) / 2;
if (nSdPage < GetDoc()->GetSdPageCount(mpActualPage->GetPageKind()) - 1)
{
@@ -133,7 +133,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
case PAGE_PREVIOUS:
{
// Sprung zu vorheriger Seite
- USHORT nSdPage = (mpActualPage->GetPageNum() - 1) / 2;
+ sal_uInt16 nSdPage = (mpActualPage->GetPageNum() - 1) / 2;
if (nSdPage > 0)
{
@@ -158,7 +158,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
SfxStringItem aReferer(SID_REFERER, GetDocSh()->GetMedium()->GetName());
SfxViewFrame* pFrame = GetViewFrame();
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
- SfxBoolItem aBrowseItem(SID_BROWSE, TRUE);
+ SfxBoolItem aBrowseItem(SID_BROWSE, sal_True);
pFrame->GetDispatcher()->
Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
@@ -183,11 +183,11 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet )
{
- UINT32 nState = NAVSTATE_NONE;
- USHORT nCurrentPage = 0;
- USHORT nFirstPage = 0;
- USHORT nLastPage;
- BOOL bEndless = FALSE;
+ sal_uInt32 nState = NAVSTATE_NONE;
+ sal_uInt16 nCurrentPage = 0;
+ sal_uInt16 nFirstPage = 0;
+ sal_uInt16 nLastPage;
+ sal_Bool bEndless = sal_False;
String aPageName;
rtl::Reference< SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) );
@@ -196,9 +196,9 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet )
// pen activated?
nState |= xSlideshow->isDrawingPossible() ? NAVBTN_PEN_CHECKED : NAVBTN_PEN_UNCHECKED;
- nCurrentPage = (USHORT)xSlideshow->getCurrentPageNumber();
- nFirstPage = (USHORT)xSlideshow->getFirstPageNumber();
- nLastPage = (USHORT)xSlideshow->getLastPageNumber();
+ nCurrentPage = (sal_uInt16)xSlideshow->getCurrentPageNumber();
+ nFirstPage = (sal_uInt16)xSlideshow->getFirstPageNumber();
+ nLastPage = (sal_uInt16)xSlideshow->getLastPageNumber();
bEndless = xSlideshow->isEndless();
// Get the page for the current page number.
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 74dbd463ba86..b26c3452675b 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -162,7 +162,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if (SlideShow::IsRunning(GetViewShellBase()))
return;
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
if( HasCurrentFunction() &&
( nSId == SID_TEXTEDIT || nSId == SID_ATTR_CHAR || nSId == SID_TEXT_FITTOSIZE ||
@@ -174,7 +174,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if( pFuText )
{
- pFuText->SetPermanent(TRUE);
+ pFuText->SetPermanent(sal_True);
xFunc->ReceiveRequest( rReq );
MapSlot( nSId );
@@ -193,8 +193,8 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
}
CheckLineTo (rReq);
- USHORT nOldSId = 0;
- BOOL bPermanent = FALSE;
+ sal_uInt16 nOldSId = 0;
+ sal_Bool bPermanent = sal_False;
if( !mpDrawView )
return;
@@ -232,7 +232,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
(nSId == SID_TEXTEDIT || nSId == SID_ATTR_CHAR || nSId == SID_TEXT_FITTOSIZE ||
nSId == SID_ATTR_CHAR_VERTICAL || nSId == SID_TEXT_FITTOSIZE_VERTICAL )))
{
- bPermanent = TRUE;
+ bPermanent = sal_True;
}
GetCurrentFunction()->Deactivate();
@@ -329,6 +329,16 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
short nSlotId = rReq.GetSlot();
+ if( nSlotId == SID_OBJECT_ROTATE )
+ {
+ // togle rotation
+ if( nOldSId == nSlotId )
+ {
+ nSlotId = SID_OBJECT_SELECT;
+ rReq.SetSlot( nSlotId );
+ }
+ }
+
if (nSlotId == SID_OBJECT_CROOK_ROTATE ||
nSlotId == SID_OBJECT_CROOK_SLANT ||
nSlotId == SID_OBJECT_CROOK_STRETCH)
@@ -347,22 +357,22 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
// Implizite Wandlung in Bezier
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->ConvertMarkedToPathObj(FALSE);
+ mpDrawView->ConvertMarkedToPathObj(sal_False);
}
}
}
else if (nSlotId == SID_OBJECT_SHEAR)
{
- ULONG i = 0;
+ sal_uLong i = 0;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nMarkCnt = rMarkList.GetMarkCount();
- BOOL b3DObjMarked = FALSE;
+ sal_uLong nMarkCnt = rMarkList.GetMarkCount();
+ sal_Bool b3DObjMarked = sal_False;
while (i < nMarkCnt && !b3DObjMarked)
{
if (rMarkList.GetMark(i)->GetMarkedSdrObj()->ISA(E3dObject))
{
- b3DObjMarked = TRUE;
+ b3DObjMarked = sal_True;
}
else
{
@@ -384,7 +394,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
// Implizite Wandlung in Bezier
WaitObject aWait( (Window*)GetActiveWindow() );
- mpDrawView->ConvertMarkedToPathObj(FALSE);
+ mpDrawView->ConvertMarkedToPathObj(sal_False);
}
}
}
@@ -548,7 +558,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if(HasOldFunction())
{
- USHORT nSlotId = GetOldFunction()->GetSlotID();
+ sal_uInt16 nSlotId = GetOldFunction()->GetSlotID();
GetOldFunction()->Deactivate();
SetOldFunction(0);
@@ -577,7 +587,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
// select first object
GetView()->UnmarkAllObj();
- GetView()->MarkNextObj(TRUE);
+ GetView()->MarkNextObj(sal_True);
// ...and make it visible
if(GetView()->AreObjectsMarked())
@@ -659,7 +669,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if( !mpDrawView )
return;
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
// Slot wird evtl. gemapped (ToolboxImages/-Slots)
MapSlot( nSId );
@@ -687,7 +697,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_DRAWTBX_CONNECTORS:
case SID_DRAWTBX_INSERT:
{
- USHORT nMappedSlot = GetMappedSlot( nSId );
+ sal_uInt16 nMappedSlot = GetMappedSlot( nSId );
if( nMappedSlot > 0 )
{
SfxRequest aReq( nMappedSlot, 0, GetDoc()->GetItemPool() );
@@ -763,7 +773,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_CUT:
{
- if ( mpDrawView->IsPresObjSelected(FALSE, TRUE, FALSE, TRUE) )
+ if ( mpDrawView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
@@ -785,7 +795,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_COPY:
{
- if ( mpDrawView->IsPresObjSelected(FALSE, TRUE, FALSE, TRUE) )
+ if ( mpDrawView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
@@ -827,11 +837,11 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
WaitObject aWait( (Window*)GetActiveWindow() );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( GetActiveWindow() ) );
const SfxItemSet* pReqArgs = rReq.GetArgs();
- UINT32 nFormat = 0;
+ sal_uInt32 nFormat = 0;
if( pReqArgs )
{
- SFX_REQUEST_ARG( rReq, pIsActive, SfxUInt32Item, SID_CLIPBOARD_FORMAT_ITEMS, FALSE );
+ SFX_REQUEST_ARG( rReq, pIsActive, SfxUInt32Item, SID_CLIPBOARD_FORMAT_ITEMS, sal_False );
nFormat = pIsActive->GetValue();
}
@@ -842,7 +852,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if( !mpDrawView->InsertData( aDataHelper,
GetActiveWindow()->PixelToLogic( Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ),
- nAction, FALSE, nFormat ) )
+ nAction, sal_False, nFormat ) )
{
INetBookmark aINetBookmark( aEmptyStr, aEmptyStr );
@@ -873,7 +883,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
pOLV->PostKeyEvent(aKEvt);
}
}
- else if ( mpDrawView->IsPresObjSelected(FALSE, TRUE, FALSE, TRUE) )
+ else if ( mpDrawView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
@@ -924,7 +934,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if ( pReqArgs )
{
- SFX_REQUEST_ARG (rReq, pIsActive, SfxBoolItem, SID_MASTERPAGE, FALSE);
+ SFX_REQUEST_ARG (rReq, pIsActive, SfxBoolItem, SID_MASTERPAGE, sal_False);
mbIsLayerModeActive = pIsActive->GetValue ();
}
@@ -941,9 +951,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
nSId == SID_SLIDE_MASTERPAGE)
{
// Gibt es eine Seite mit dem AutoLayout "Titel"?
- BOOL bFound = FALSE;
- USHORT i = 0;
- USHORT nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
+ sal_Bool bFound = sal_False;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
while (i < nCount && !bFound)
{
@@ -951,12 +961,12 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if (nSId == SID_TITLE_MASTERPAGE && pPage->GetAutoLayout() == AUTOLAYOUT_TITLE)
{
- bFound = TRUE;
+ bFound = sal_True;
SwitchPage((pPage->GetPageNum() - 1) / 2);
}
else if (nSId == SID_SLIDE_MASTERPAGE && pPage->GetAutoLayout() != AUTOLAYOUT_TITLE)
{
- bFound = TRUE;
+ bFound = sal_True;
SwitchPage((pPage->GetPageNum() - 1) / 2);
}
@@ -1045,17 +1055,17 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
const SfxItemSet* pReqArgs = rReq.GetArgs();
// Remember old ruler state
- BOOL bOldHasRuler(HasRuler());
+ sal_Bool bOldHasRuler(HasRuler());
if ( pReqArgs )
{
- SFX_REQUEST_ARG (rReq, pIsActive, SfxBoolItem, SID_RULER, FALSE);
+ SFX_REQUEST_ARG (rReq, pIsActive, SfxBoolItem, SID_RULER, sal_False);
SetRuler (pIsActive->GetValue ());
}
else SetRuler (!HasRuler());
// Did ruler state change? Tell that to SdOptions, too.
- BOOL bHasRuler(HasRuler());
+ sal_Bool bHasRuler(HasRuler());
if(bOldHasRuler != bHasRuler)
{
@@ -1119,7 +1129,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_SIZE_REAL: // BASIC
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
SetZoom( 100 );
Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
@@ -1134,7 +1144,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_ZOOM_IN: // BASIC
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
SetZoom( Max( (long) ( GetActiveWindow()->GetZoom() / 2 ), (long) GetActiveWindow()->GetMinZoom() ) );
Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
@@ -1154,7 +1164,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if (aVisAreaSize.Height()!=0 && aVisAreaSize.Width()!=0)
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
SetZoomRect(aVisArea);
Invalidate( SID_ZOOM_IN );
Invalidate( SID_ZOOM_OUT );
@@ -1169,7 +1179,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
// --> Wird als Objektzoom im Programm angeboten
case SID_SIZE_OPTIMAL: // BASIC
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
if ( mpDrawView->AreObjectsMarked() )
{
maMarkRect = mpDrawView->GetAllMarkedRect();
@@ -1199,7 +1209,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
// --> Wird als Optimal im Programm angeboten
case SID_SIZE_ALL: // BASIC
{
- mbZoomOnPage = FALSE;
+ mbZoomOnPage = sal_False;
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
if( pPageView )
@@ -1298,14 +1308,14 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_AUTOSPELL_CHECK:
{
- BOOL bOnlineSpell = !GetDoc()->GetOnlineSpell();
+ sal_Bool bOnlineSpell = !GetDoc()->GetOnlineSpell();
GetDoc()->SetOnlineSpell(bOnlineSpell);
::Outliner* pOL = mpDrawView->GetTextEditOutliner();
if (pOL)
{
- ULONG nCntrl = pOL->GetControlWord();
+ sal_uLong nCntrl = pOL->GetControlWord();
if (bOnlineSpell)
nCntrl |= EE_CNTRL_ONLINESPELLING;
@@ -1364,7 +1374,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
mpDrawView->BegUndo(String(SdResId(STR_UNDO_COLORRESOLUTION)));
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- for (ULONG i=0; i<rMarkList.GetMarkCount(); i++)
+ for (sal_uLong i=0; i<rMarkList.GetMarkCount(); i++)
{
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
@@ -1460,13 +1470,13 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_UNDO :
{
// moved implementation to BaseClass
- ImpSidUndo(TRUE, rReq);
+ ImpSidUndo(sal_True, rReq);
}
break;
case SID_REDO :
{
// moved implementation to BaseClass
- ImpSidRedo(TRUE, rReq);
+ ImpSidRedo(sal_True, rReq);
}
break;
@@ -1501,7 +1511,7 @@ void DrawViewShell::InsertURLField(const String& rURL, const String& rText,
{
Outliner* pOutl = GetDoc()->GetInternalOutliner();
pOutl->Init( OUTLINERMODE_TEXTOBJECT );
- USHORT nOutlMode = pOutl->GetMode();
+ sal_uInt16 nOutlMode = pOutl->GetMode();
SvxURLField aURLField(rURL, rText, SVXURLFORMAT_REPR);
aURLField.SetTargetFrame(rTarget);
@@ -1512,9 +1522,9 @@ void DrawViewShell::InsertURLField(const String& rURL, const String& rText,
SdrRectObj* pRectObj = new SdrRectObj(OBJ_TEXT);
pOutl->UpdateFields();
- pOutl->SetUpdateMode( TRUE );
+ pOutl->SetUpdateMode( sal_True );
Size aSize(pOutl->CalcTextSize());
- pOutl->SetUpdateMode( FALSE );
+ pOutl->SetUpdateMode( sal_False );
Point aPos;
@@ -1548,7 +1558,7 @@ void DrawViewShell::InsertURLField(const String& rURL, const String& rText,
void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
const String& rTarget, const Point* pPos)
{
- BOOL bNewObj = TRUE;
+ sal_Bool bNewObj = sal_True;
const OUString sTargetURL( ::URIHelper::SmartRel2Abs( INetURLObject( GetDocSh()->GetMedium()->GetBaseURL() ), rURL, URIHelper::GetMaybeFileHdl(), true, false,
INetURLObject::WAS_ENCODED,
@@ -1561,7 +1571,7 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
// change first marked object
if( (FmFormInventor == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == OBJ_FM_BUTTON) )
{
- bNewObj = FALSE;
+ bNewObj = sal_False;
SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( pMarkedObj );
@@ -1583,7 +1593,7 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
else
{
// add url as interaction for first selected shape
- bNewObj = FALSE;
+ bNewObj = sal_False;
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pMarkedObj, true);
pInfo->meClickAction = presentation::ClickAction_DOCUMENT;
@@ -1630,7 +1640,7 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
aPos.Y() -= aSize.Height() / 2;
pUnoCtrl->SetLogicRect(Rectangle(aPos, aSize));
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
OSL_ASSERT (GetViewShell()!=NULL);
SfxInPlaceClient* pIpClient = GetViewShell()->GetIPClient();
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index a7912a89e44a..d0a0d89fc8a2 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -200,16 +200,16 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTPUT_QUALITY_BLACKWHITE ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_OUTPUT_QUALITY_CONTRAST ) )
{
- const ULONG nMode = (sal_Int32)GetActiveWindow()->GetDrawMode();
- rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_COLOR, (BOOL)((ULONG)OUTPUT_DRAWMODE_COLOR == nMode) ) );
- rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_GRAYSCALE, (BOOL)((ULONG)OUTPUT_DRAWMODE_GRAYSCALE == nMode) ) );
- rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_BLACKWHITE, (BOOL)((ULONG)OUTPUT_DRAWMODE_BLACKWHITE == nMode) ) );
- rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_CONTRAST, (BOOL)((ULONG)OUTPUT_DRAWMODE_CONTRAST == nMode) ) );
+ const sal_uLong nMode = (sal_Int32)GetActiveWindow()->GetDrawMode();
+ rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_COLOR, (sal_Bool)((sal_uLong)OUTPUT_DRAWMODE_COLOR == nMode) ) );
+ rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_GRAYSCALE, (sal_Bool)((sal_uLong)OUTPUT_DRAWMODE_GRAYSCALE == nMode) ) );
+ rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_BLACKWHITE, (sal_Bool)((sal_uLong)OUTPUT_DRAWMODE_BLACKWHITE == nMode) ) );
+ rSet.Put( SfxBoolItem( SID_OUTPUT_QUALITY_CONTRAST, (sal_Bool)((sal_uLong)OUTPUT_DRAWMODE_CONTRAST == nMode) ) );
}
if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) )
{
- rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, sal_True ) );
}
if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ATTR_YEAR2000) )
@@ -217,7 +217,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
if (pFormShell != NULL)
{
- UINT16 nState = 0;
+ sal_uInt16 nState = 0;
if (pFormShell->GetY2KState(nState))
rSet.Put( SfxUInt16Item( SID_ATTR_YEAR2000, nState ) );
else
@@ -287,14 +287,14 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
void DrawViewShell::GetAttrState( SfxItemSet& rSet )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
- BOOL bAttr = FALSE;
+ sal_Bool bAttr = sal_False;
SfxAllItemSet aAllSet( *rSet.GetPool() );
while ( nWhich )
{
- USHORT nSlotId = SfxItemPool::IsWhich(nWhich)
+ sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
? GetPool().GetSlotId(nWhich)
: nWhich;
switch ( nSlotId )
@@ -311,7 +311,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_ATTR_LINE_COLOR:
case SID_ATTR_TEXT_FITTOSIZE:
{
- bAttr = TRUE;
+ bAttr = sal_True;
}
break;
@@ -321,7 +321,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
mpDrawView->GetAttributes( aAttrs );
if( aAttrs.GetItemState( EE_PARA_HYPHENATE ) >= SFX_ITEM_AVAILABLE )
{
- BOOL bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
+ sal_Bool bValue = ( (const SfxBoolItem&) aAttrs.Get( EE_PARA_HYPHENATE ) ).GetValue();
rSet.Put( SfxBoolItem( SID_HYPHENATION, bValue ) );
}
}
@@ -384,7 +384,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
{
ISfxTemplateCommon* pTemplateCommon = SFX_APP()->GetCurrentTemplateCommon(GetViewFrame()->GetBindings());
if (pTemplateCommon && pTemplateCommon->GetActualFamily() == SD_STYLE_FAMILY_PSEUDO)
- rSet.Put(SfxBoolItem(nWhich,FALSE));
+ rSet.Put(SfxBoolItem(nWhich,sal_False));
else
{
SfxBoolItem aItem(nWhich, SD_MOD()->GetWaterCan());
@@ -460,10 +460,10 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
{
pSet = new SfxItemSet( GetDoc()->GetPool() );
mpDrawView->GetAttributes( *pSet );
- rSet.Put( *pSet, FALSE );
+ rSet.Put( *pSet, sal_False );
}
- rSet.Put( aAllSet, FALSE );
+ rSet.Put( aAllSet, sal_False );
// Flaechen und/oder Linienattribute wurden geaendert
if( bAttr && pSet )
@@ -496,7 +496,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
|*
\************************************************************************/
-String DrawViewShell::GetSelectionText(BOOL bCompleteWords)
+String DrawViewShell::GetSelectionText(sal_Bool bCompleteWords)
{
String aStrSelection;
::Outliner* pOl = mpDrawView->GetTextEditOutliner();
@@ -528,9 +528,9 @@ String DrawViewShell::GetSelectionText(BOOL bCompleteWords)
|*
\************************************************************************/
-BOOL DrawViewShell::HasSelection(BOOL bText) const
+sal_Bool DrawViewShell::HasSelection(sal_Bool bText) const
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (bText)
{
@@ -538,12 +538,12 @@ BOOL DrawViewShell::HasSelection(BOOL bText) const
if (pOlView && pOlView->GetSelected().Len() != 0)
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else if (mpDrawView->GetMarkedObjectList().GetMarkCount() != 0)
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
return bReturn;
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index 9b33f3b60427..5928ddba641e 100644..100755
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -90,13 +90,13 @@ void DrawViewShell::ExecIMap( SfxRequest& rReq )
void DrawViewShell::GetIMapState( SfxItemSet& rSet )
{
- BOOL bDisable = TRUE;
+ sal_Bool bDisable = sal_True;
if( GetViewFrame()->HasChildWindow( SvxIMapDlgChildWindow::GetChildWindowId() ) )
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
const SdrObject* pObj = NULL;
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount == 1 )
{
@@ -107,7 +107,7 @@ void DrawViewShell::GetIMapState( SfxItemSet& rSet )
&& pImageMapDialog!=NULL
&& ( pImageMapDialog->GetEditingObject() == (void*) pObj ) )
{
- bDisable = FALSE;
+ bDisable = sal_False;
}
}
}
@@ -127,8 +127,8 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
if(HasCurrentFunction(SID_PRESENTATION))
return;
- BOOL bDefault = FALSE;
- USHORT nSlot = rReq.GetSlot();
+ sal_Bool bDefault = sal_False;
+ sal_uInt16 nSlot = rReq.GetSlot();
SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
@@ -226,7 +226,7 @@ void DrawViewShell::ExecOptionsBar( SfxRequest& rReq )
break;
default:
- bDefault = TRUE;
+ bDefault = sal_True;
break;
}
@@ -269,7 +269,7 @@ void DrawViewShell::GetOptionsBarState( SfxItemSet& rSet )
rSet.Put( SfxBoolItem( SID_SNAP_POINTS, mpDrawView->IsOPntSnap() ) );
rSet.Put( SfxBoolItem( SID_QUICKEDIT, mpDrawView->IsQuickTextEditMode() ) );
- rSet.Put( SfxBoolItem( SID_PICK_THROUGH, (BOOL)
+ rSet.Put( SfxBoolItem( SID_PICK_THROUGH, (sal_Bool)
mpDrawView->GetModel()->IsPickThroughTransparentTextFrames() ) );
rSet.Put( SfxBoolItem( SID_BIG_HANDLES, mpFrameView->IsBigHandles() ) );
diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx
index 758ed5f49f18..fffb35d155bf 100644..100755
--- a/sd/source/ui/view/drviewsh.cxx
+++ b/sd/source/ui/view/drviewsh.cxx
@@ -64,9 +64,9 @@ namespace sd {
|*
\************************************************************************/
-BOOL DrawViewShell::GotoBookmark(const String& rBookmark)
+sal_Bool DrawViewShell::GotoBookmark(const String& rBookmark)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
::sd::DrawDocShell* pDocSh = GetDocSh();
if( pDocSh )
{
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index bb011c5af2fb..26054a73e689 100644..100755
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -80,13 +80,13 @@ void DrawViewShell::ExecEffectWin( SfxRequest& rReq )
{
CheckLineTo (rReq);
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
case SID_3D_INIT:
{
- USHORT nId = Svx3DChildWindow::GetChildWindowId();
+ sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
if( pWindow )
{
@@ -119,7 +119,7 @@ void DrawViewShell::ExecEffectWin( SfxRequest& rReq )
\************************************************************************/
void DrawViewShell::Update3DWindow()
{
- USHORT nId = Svx3DChildWindow::GetChildWindowId();
+ sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
SfxChildWindow* pWindow = GetViewFrame()->GetChildWindow( nId );
if( pWindow )
{
@@ -136,7 +136,7 @@ void DrawViewShell::Update3DWindow()
void DrawViewShell::AssignFrom3DWindow()
{
- USHORT nId = Svx3DChildWindow::GetChildWindowId();
+ sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
SfxChildWindow* pWin = GetViewFrame()->GetChildWindow( nId );
if( pWin )
{
@@ -158,12 +158,12 @@ void DrawViewShell::AssignFrom3DWindow()
// Nur TextAttribute zuweisen
SfxItemSet aTextSet( GetDoc()->GetPool(),
EE_ITEMS_START, EE_ITEMS_END, 0 );
- aTextSet.Put( aSet, FALSE );
+ aTextSet.Put( aSet, sal_False );
GetView()->SetAttributes( aTextSet );
// Text in 3D umwandeln
- USHORT nSId = SID_CONVERT_TO_3D;
- SfxBoolItem aItem( nSId, TRUE );
+ sal_uInt16 nSId = SID_CONVERT_TO_3D;
+ SfxBoolItem aItem( nSId, sal_True );
GetViewFrame()->GetDispatcher()->Execute(
nSId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 59634aff8cde..ad4c67927abb 100644..100755
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -77,7 +77,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
// Einfachselektion
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- ULONG nMarkCount = rMarkList.GetMarkCount();
+ sal_uLong nMarkCount = rMarkList.GetMarkCount();
if ( nMarkCount == 1 )
{
@@ -124,8 +124,8 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) )
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nId = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
SdrObjTransformInfoRec aInfoRec;
pObj->TakeObjInfo( aInfoRec );
@@ -207,7 +207,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem( SID_CONNECTION_DLG );
else
{
- BOOL bDisable = TRUE;
+ sal_Bool bDisable = sal_True;
SfxItemSet aAttrSet( GetDoc()->GetPool() );
GetView()->GetAttributes( aAttrSet );
@@ -220,7 +220,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
long nVal3 = ( ( const SdrEdgeLine3DeltaItem& ) aAttrSet.Get( SDRATTR_EDGELINE3DELTA ) ).GetValue();
{
if( nVal1 != 0 || nVal2 != 0 || nVal3 != 0 )
- bDisable = FALSE;
+ bDisable = sal_False;
}
}
if( bDisable )
@@ -228,7 +228,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
}
if ( nInv == E3dInventor ||
- (!mpDrawView->IsConvertToPathObjPossible(FALSE) &&
+ (!mpDrawView->IsConvertToPathObjPossible(sal_False) &&
!mpDrawView->IsShearAllowed() &&
!mpDrawView->IsDistortAllowed()) )
{
@@ -256,12 +256,12 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DISMANTLE ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_BREAK ) )
{
- if ( !mpDrawView->IsDismantlePossible(FALSE) )
+ if ( !mpDrawView->IsDismantlePossible(sal_False) )
{
rSet.DisableItem( SID_DISMANTLE );
}
- if ( !mpDrawView->IsDismantlePossible(TRUE) &&
+ if ( !mpDrawView->IsDismantlePossible(sal_True) &&
!mpDrawView->IsImportMtfPossible() &&
!mpDrawView->IsBreak3DObjPossible() )
{
@@ -318,36 +318,36 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem( SID_MODIFY_FIELD );
{
- BOOL bText = FALSE;
- BOOL bLine = FALSE;
- BOOL bGroup = FALSE;
- BOOL bGraf = FALSE;
- BOOL bDrawObj = FALSE;
- BOOL b3dObj = FALSE;
+ sal_Bool bText = sal_False;
+ sal_Bool bLine = sal_False;
+ sal_Bool bGroup = sal_False;
+ sal_Bool bGraf = sal_False;
+ sal_Bool bDrawObj = sal_False;
+ sal_Bool b3dObj = sal_False;
bool bTable = false;
- BOOL bMeasureObj = FALSE;
- BOOL bEdgeObj = FALSE; // Connector
- BOOL bE3dCompoundObject = FALSE;
+ sal_Bool bMeasureObj = sal_False;
+ sal_Bool bEdgeObj = sal_False; // Connector
+ sal_Bool bE3dCompoundObject = sal_False;
- for( ULONG i = 0;
+ for( sal_uLong i = 0;
i < nMarkCount && !bText && i < 50;
i++ )
{
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
- UINT32 nInv = pObj->GetObjInventor();
- UINT16 nId = pObj->GetObjIdentifier();
+ sal_uInt32 nInv = pObj->GetObjInventor();
+ sal_uInt16 nId = pObj->GetObjIdentifier();
if (nInv == SdrInventor)
{
switch (nId)
{
- case OBJ_TEXT: bText = TRUE; break;
+ case OBJ_TEXT: bText = sal_True; break;
- case OBJ_LINE: bLine = TRUE; break;
+ case OBJ_LINE: bLine = sal_True; break;
- case OBJ_EDGE: bEdgeObj = TRUE; break;
+ case OBJ_EDGE: bEdgeObj = sal_True; break;
- case OBJ_MEASURE: bMeasureObj = TRUE; break;
+ case OBJ_MEASURE: bMeasureObj = sal_True; break;
case OBJ_RECT:
case OBJ_CIRC:
@@ -357,11 +357,11 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
case OBJ_PATHLINE:
case OBJ_SECT:
case OBJ_CARC:
- case OBJ_CCUT: bDrawObj = TRUE; break;
+ case OBJ_CCUT: bDrawObj = sal_True; break;
- case OBJ_GRUP: bGroup = TRUE; break;
+ case OBJ_GRUP: bGroup = sal_True; break;
- case OBJ_GRAF: bGraf = TRUE; break;
+ case OBJ_GRAF: bGraf = sal_True; break;
case OBJ_TABLE: bTable = true; break;
}
@@ -369,9 +369,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
else if (nInv == E3dInventor)
{
if(pObj->ISA(E3dScene))
- b3dObj = TRUE;
+ b3dObj = sal_True;
else if(pObj->ISA(E3dCompoundObject))
- bE3dCompoundObject = TRUE;
+ bE3dCompoundObject = sal_True;
}
}
/* Kann wohl raus, da jedes(?) Objekt Text enthalten kann
@@ -398,7 +398,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
}
if (b3dObj ||
- (!mpDrawView->IsConvertToPathObjPossible(FALSE) &&
+ (!mpDrawView->IsConvertToPathObjPossible(sal_False) &&
!mpDrawView->IsShearAllowed() &&
!mpDrawView->IsDistortAllowed()) )
{
@@ -444,24 +444,24 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
}
}
- if ( !mpDrawView->IsDismantlePossible(FALSE) )
+ if ( !mpDrawView->IsDismantlePossible(sal_False) )
{
rSet.DisableItem( SID_DISMANTLE );
}
- if ( !mpDrawView->IsDismantlePossible(TRUE) &&
+ if ( !mpDrawView->IsDismantlePossible(sal_True) &&
!mpDrawView->IsImportMtfPossible() &&
!mpDrawView->IsBreak3DObjPossible() )
{
rSet.DisableItem( SID_BREAK );
}
- if ( !mpDrawView->IsCombinePossible(FALSE) )
+ if ( !mpDrawView->IsCombinePossible(sal_False) )
{
rSet.DisableItem( SID_COMBINE );
rSet.DisableItem(SID_POLY_MERGE);
rSet.DisableItem(SID_POLY_SUBSTRACT);
rSet.DisableItem(SID_POLY_INTERSECT);
}
- if ( !mpDrawView->IsCombinePossible(TRUE) )
+ if ( !mpDrawView->IsCombinePossible(sal_True) )
{
rSet.DisableItem( SID_CONNECT );
}
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index a79e6a7efa9d..22ef286bbd10 100644..100755
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -77,14 +77,14 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
{
EndListening(*pDrawDoc);
- EnableExtendedKeyInputDispatcher(FALSE);
- EnableExtendedMouseEventDispatcher(FALSE);
- EnableExtendedCommandEventDispatcher(FALSE);
-
- SetGridFront( FALSE );
- SetHlplFront( FALSE );
- SetOConSnap( FALSE );
- SetFrameDragSingles( TRUE );
+ EnableExtendedKeyInputDispatcher(sal_False);
+ EnableExtendedMouseEventDispatcher(sal_False);
+ EnableExtendedCommandEventDispatcher(sal_False);
+
+ SetGridFront( sal_False );
+ SetHlplFront( sal_False );
+ SetOConSnap( sal_False );
+ SetFrameDragSingles( sal_True );
SetSlidesPerRow(4);
if( NULL == pFrameView )
@@ -96,7 +96,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
/**********************************************************************
* Das Dokument wurde geladen, ist eine FrameView vorhanden?
**********************************************************************/
- ULONG nSdViewShellCount = 0;
+ sal_uLong nSdViewShellCount = 0;
ViewShellBase* pBase = NULL;
SfxViewShell* pSfxViewSh = NULL;
SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell);
@@ -231,8 +231,8 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
SetGridCoarse( Size( 1000, 1000 ) );
SetSnapGridWidth(Fraction(1000, 1), Fraction(1000, 1));
SetActiveLayer( String( SdResId(STR_LAYER_LAYOUT) ) );
- mbNoColors = TRUE;
- mbNoAttribs = FALSE;
+ mbNoColors = sal_True;
+ mbNoAttribs = sal_False;
maVisArea = Rectangle( Point(), Size(0, 0) );
mePageKind = PK_STANDARD;
mePageKindOnLoad = PK_STANDARD;
@@ -242,11 +242,11 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
meNotesEditMode = EM_PAGE;
meHandoutEditMode = EM_MASTERPAGE;
SetViewShEditModeOnLoad(EM_PAGE);
- mbLayerMode = FALSE;
- SetEliminatePolyPoints(FALSE);
- mbBigHandles = FALSE;
- mbDoubleClickTextEdit = FALSE;
- mbClickChangeRotation = FALSE;
+ mbLayerMode = sal_False;
+ SetEliminatePolyPoints(sal_False);
+ mbBigHandles = sal_False;
+ mbDoubleClickTextEdit = sal_False;
+ mbClickChangeRotation = sal_False;
mnSlidesPerRow = 4;
{
@@ -443,8 +443,8 @@ static OUString createHelpLinesString( const SdrHelpLineList& rHelpLines )
{
::rtl::OUStringBuffer aLines;
- const USHORT nCount = rHelpLines.GetCount();
- for( USHORT nHlpLine = 0; nHlpLine < nCount; nHlpLine++ )
+ const sal_uInt16 nCount = rHelpLines.GetCount();
+ for( sal_uInt16 nHlpLine = 0; nHlpLine < nCount; nHlpLine++ )
{
const SdrHelpLine& rHelpLine = rHelpLines[nHlpLine];
const Point& rPos = rHelpLine.GetPos();
@@ -704,9 +704,9 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
{
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
- SetSelectedPage( (USHORT)nInt16 );
+ SetSelectedPage( (sal_uInt16)nInt16 );
- SetSelectedPageOnLoad( (USHORT)nInt16 );
+ SetSelectedPageOnLoad( (sal_uInt16)nInt16 );
}
}
else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsLayerMode ) ) )
@@ -741,7 +741,7 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
{
if( pValue->Value >>= nInt16 )
{
- SetSlidesPerRow( (USHORT)nInt16 );
+ SetSlidesPerRow( (sal_uInt16)nInt16 );
}
}
else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeStandard ) ) )
@@ -1048,7 +1048,7 @@ ViewShell::ShellType FrameView::GetViewShellTypeOnLoad (void) const
-void FrameView::SetSelectedPage(USHORT nPage)
+void FrameView::SetSelectedPage(sal_uInt16 nPage)
{
mnSelectedPage = nPage;
}
@@ -1056,7 +1056,7 @@ void FrameView::SetSelectedPage(USHORT nPage)
-USHORT FrameView::GetSelectedPage (void) const
+sal_uInt16 FrameView::GetSelectedPage (void) const
{
return mnSelectedPage;
}
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 42e0ff3481aa..366d16fa760e 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -92,7 +92,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
DeactivateCurrentFunction();
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
@@ -132,7 +132,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
if (pArgs && pArgs->Count () == 1 )
{
- SFX_REQUEST_ARG (rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER, FALSE);
+ SFX_REQUEST_ARG (rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER, sal_False);
if (CHECK_RANGE (5, pScale->GetValue (), 3000))
{
SetZoom (pScale->GetValue ());
@@ -232,10 +232,10 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_SELECTALL:
{
::Outliner* pOutl = pOlView->GetOutliner();
- ULONG nParaCount = pOutl->GetParagraphCount();
+ sal_uLong nParaCount = pOutl->GetParagraphCount();
if (nParaCount > 0)
{
- pOutlinerView->SelectRange( 0, (USHORT) nParaCount );
+ pOutlinerView->SelectRange( 0, (sal_uInt16) nParaCount );
}
Cancel();
}
@@ -261,7 +261,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_COLORVIEW:
{
::Outliner* pOutl = pOutlinerView->GetOutliner();
- ULONG nCntrl = pOutl->GetControlWord();
+ sal_uLong nCntrl = pOutl->GetControlWord();
if ( !(nCntrl & EE_CNTRL_NOCOLORS) )
{
@@ -337,7 +337,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
DeactivateCurrentFunction();
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
- USHORT nSId = rReq.GetSlot();
+ sal_uInt16 nSId = rReq.GetSlot();
switch( nSId )
{
@@ -419,7 +419,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
case SID_SET_DEFAULT:
{
- pOutlinerView->RemoveAttribs(TRUE); // TRUE = also paragraph attributes
+ pOutlinerView->RemoveAttribs(sal_True); // sal_True = also paragraph attributes
Cancel();
rReq.Done();
}
@@ -557,10 +557,10 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
//pOLV->DeleteSelected(); <-- unfortunately missing!
// select field, so it gets deleted on Insert
ESelection aSel = pOutlinerView->GetSelection();
- BOOL bSel = TRUE;
+ sal_Bool bSel = sal_True;
if( aSel.nStartPos == aSel.nEndPos )
{
- bSel = FALSE;
+ bSel = sal_False;
aSel.nEndPos++;
}
pOutlinerView->SetSelection( aSel );
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index fca35482a20f..e5f588165f5b 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -33,7 +33,7 @@
#include "ViewShellImplementation.hxx"
#include <memory>
-
+#include "helpids.h"
#include "app.hrc"
#include <svx/hyperdlg.hxx>
#include <svx/zoomslideritem.hxx>
@@ -145,13 +145,13 @@ TYPEINIT1( OutlineViewShell, ViewShell );
void OutlineViewShell::Construct(DrawDocShell* )
{
- BOOL bModified = GetDoc()->IsChanged();
+ sal_Bool bModified = GetDoc()->IsChanged();
meShellType = ST_OUTLINE;
Size aSize(29700, 21000);
Point aWinPos (0, 0);
Point aViewOrigin(0, 0);
- GetActiveWindow()->SetMinZoomAutoCalc(FALSE);
+ GetActiveWindow()->SetMinZoomAutoCalc(sal_False);
GetActiveWindow()->SetMinZoom( MIN_ZOOM );
GetActiveWindow()->SetMaxZoom( MAX_ZOOM );
InitWindows(aViewOrigin, aSize, aWinPos);
@@ -166,7 +166,7 @@ void OutlineViewShell::Construct(DrawDocShell* )
ReadFrameViewData(mpFrameView);
::Outliner* pOutl = pOlView->GetOutliner();
- pOutl->SetUpdateMode(TRUE);
+ pOutl->SetUpdateMode(sal_True);
if (!bModified)
{
@@ -179,8 +179,8 @@ void OutlineViewShell::Construct(DrawDocShell* )
SetName (aName);
SetHelpId( SD_IF_SDOUTLINEVIEWSHELL );
- GetActiveWindow()->SetHelpId( SD_IF_SDOUTLINEVIEWSHELL );
- GetActiveWindow()->SetUniqueId( SD_IF_SDOUTLINEVIEWSHELL );
+ GetActiveWindow()->SetHelpId( HID_SDOUTLINEVIEWSHELL );
+ GetActiveWindow()->SetUniqueId( HID_SDOUTLINEVIEWSHELL );
}
@@ -251,7 +251,7 @@ OutlineViewShell::~OutlineViewShell()
if ( pClipEvtLstnr )
{
- pClipEvtLstnr->AddRemoveListener( GetActiveWindow(), FALSE );
+ pClipEvtLstnr->AddRemoveListener( GetActiveWindow(), sal_False );
pClipEvtLstnr->ClearCallbackLink(); // prevent callback if another thread is waiting
pClipEvtLstnr->release();
}
@@ -304,7 +304,7 @@ void OutlineViewShell::ArrangeGUIElements ()
::sd::Window* pWindow = mpContentWindow.get();
if (pWindow != NULL)
{
- pWindow->SetMinZoomAutoCalc(FALSE);
+ pWindow->SetMinZoomAutoCalc(sal_False);
// change OuputArea of the OutlinerView
@@ -338,7 +338,7 @@ void OutlineViewShell::ArrangeGUIElements ()
void OutlineViewShell::ExecCtrl(SfxRequest &rReq)
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch ( nSlot )
{
case SID_MAIL_SCROLLBODY_PAGEDOWN:
@@ -384,7 +384,7 @@ void OutlineViewShell::RemoveWindow (::sd::Window* pWin)
|* Activate(): during the first invocation the fields get updated
|*
\************************************************************************/
-void OutlineViewShell::Activate( BOOL bIsMDIActivate )
+void OutlineViewShell::Activate( sal_Bool bIsMDIActivate )
{
if ( ! mbInitialized)
{
@@ -410,7 +410,7 @@ void OutlineViewShell::Activate( BOOL bIsMDIActivate )
|* Deactivate()
|*
\************************************************************************/
-void OutlineViewShell::Deactivate( BOOL bIsMDIActivate )
+void OutlineViewShell::Deactivate( sal_Bool bIsMDIActivate )
{
pOlView->DisconnectFromApplication();
@@ -454,7 +454,7 @@ void OutlineViewShell::GetCtrlState(SfxItemSet &rSet)
rSet.Put( SfxBoolItem( SID_READONLY_MODE, GetDocSh()->IsReadOnly() ) );
if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) )
- rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, TRUE ) );
+ rSet.Put( SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, sal_True ) );
if ( SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_TRANSLITERATE_HALFWIDTH) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_TRANSLITERATE_FULLWIDTH) ||
@@ -494,8 +494,8 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
if( rReq.GetSlot() == SID_STYLE_FAMILY && rReq.GetArgs())
GetDocSh()->SetStyleFamily(((SfxUInt16Item&)rReq.GetArgs()->Get( SID_STYLE_FAMILY )).GetValue());
- BOOL bPreviewState = FALSE;
- ULONG nSlot = rReq.GetSlot();
+ sal_Bool bPreviewState = sal_False;
+ sal_uLong nSlot = rReq.GetSlot();
std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
if( pOlView && (
@@ -528,7 +528,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
pOlView->DoCut();
}
rReq.Done();
- bPreviewState = TRUE;
+ bPreviewState = sal_True;
}
break;
@@ -543,7 +543,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
pOlView->DoCopy();
}
rReq.Done();
- bPreviewState = TRUE;
+ bPreviewState = sal_True;
}
break;
@@ -560,7 +560,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
pOlView->DoPaste();
}
rReq.Done();
- bPreviewState = TRUE;
+ bPreviewState = sal_True;
}
break;
@@ -584,7 +584,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
}
}
rReq.Done();
- bPreviewState = TRUE;
+ bPreviewState = sal_True;
}
break;
@@ -683,7 +683,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
}
rReq.Done();
- bPreviewState = TRUE;
+ bPreviewState = sal_True;
}
break;
@@ -691,13 +691,13 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
case SID_UNDO :
{
OutlineViewPageChangesGuard aGuard2(pOlView);
- ImpSidUndo(FALSE, rReq);
+ ImpSidUndo(sal_False, rReq);
}
break;
case SID_REDO :
{
OutlineViewPageChangesGuard aGuard2(pOlView);
- ImpSidRedo(FALSE, rReq);
+ ImpSidRedo(sal_False, rReq);
}
break;
@@ -791,11 +791,11 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// Style catalog must not be called
rSet.DisableItem( SID_STYLE_CATALOG );
- rSet.Put(SfxBoolItem(SID_DIAMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_DRAWINGMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_OUTLINEMODE, TRUE));
- rSet.Put(SfxBoolItem(SID_NOTESMODE, FALSE));
- rSet.Put(SfxBoolItem(SID_HANDOUTMODE, FALSE));
+ rSet.Put(SfxBoolItem(SID_DIAMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_DRAWINGMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_OUTLINEMODE, sal_True));
+ rSet.Put(SfxBoolItem(SID_NOTESMODE, sal_False));
+ rSet.Put(SfxBoolItem(SID_HANDOUTMODE, sal_False));
if (!mpZoomList->IsNextPossible())
{
@@ -823,14 +823,14 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// allow 'Select All'?
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SELECTALL ) )
{
- ULONG nParaCount = pOutl->GetParagraphCount();
- BOOL bDisable = nParaCount == 0;
+ sal_uLong nParaCount = pOutl->GetParagraphCount();
+ sal_Bool bDisable = nParaCount == 0;
if (!bDisable && nParaCount == 1)
{
String aTest( pOutl->GetText( pOutl->GetParagraph( 0 ) ) );
if (aTest.Len() == 0)
{
- bDisable = TRUE;
+ bDisable = sal_True;
}
}
if (bDisable)
@@ -848,38 +848,38 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
else
{
// Enable color view?
- ULONG nCntrl = pOutl->GetControlWord();
- BOOL bNoColor = FALSE;
+ sal_uLong nCntrl = pOutl->GetControlWord();
+ sal_Bool bNoColor = sal_False;
if (nCntrl & EE_CNTRL_NOCOLORS)
- bNoColor = TRUE;
+ bNoColor = sal_True;
rSet.Put( SfxBoolItem( SID_COLORVIEW, bNoColor ) );
}
// Buttons of toolbar
// first the selection dependent ones: COLLAPSE, EXPAND
- BOOL bDisableCollapse = TRUE;
- BOOL bDisableExpand = TRUE;
- BOOL bUnique = TRUE;
+ sal_Bool bDisableCollapse = sal_True;
+ sal_Bool bDisableExpand = sal_True;
+ sal_Bool bUnique = sal_True;
OutlinerView* pOutlinerView = pOlView->GetViewByWindow(GetActiveWindow());
List* pList = pOutlinerView->CreateSelectionList();
Paragraph* pPara = (Paragraph*)pList->First();
sal_Int16 nDepth;
- sal_Int16 nTmpDepth = pOutl->GetDepth( (USHORT) pOutl->GetAbsPos( pPara ) );
+ sal_Int16 nTmpDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
bool bPage = pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE );
while (pPara)
{
- nDepth = pOutl->GetDepth( (USHORT) pOutl->GetAbsPos( pPara ) );
+ nDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
if( nDepth != nTmpDepth )
- bUnique = FALSE;
+ bUnique = sal_False;
if( bPage != pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
- bUnique = FALSE;
+ bUnique = sal_False;
if (!pOutl->IsExpanded(pPara) && pOutl->HasChilds(pPara))
- bDisableExpand = FALSE;
+ bDisableExpand = sal_False;
if (pOutl->IsExpanded(pPara) && pOutl->HasChilds(pPara))
- bDisableCollapse = FALSE;
+ bDisableCollapse = sal_False;
pPara = (Paragraph*)pList->Next();
}
@@ -898,7 +898,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
String aTest(((SfxStringItem&)aSet.Get(SID_STATUS_LAYOUT)).GetValue());
if (aTest.Len() == 0)
{
- bUnique = FALSE;
+ bUnique = sal_False;
rSet.DisableItem(SID_PRESENTATION_TEMPLATES);
}
@@ -906,27 +906,27 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem( SID_PRESENTATIONOBJECT );
// now the selection independent ones: COLLAPSE_ALL, EXPAND_ALL
- BOOL bDisableCollapseAll = TRUE;
- BOOL bDisableExpandAll = TRUE;
+ sal_Bool bDisableCollapseAll = sal_True;
+ sal_Bool bDisableExpandAll = sal_True;
// does the selection contain something collapsable/expandable?
if (!bDisableCollapse)
- bDisableCollapseAll = FALSE;
+ bDisableCollapseAll = sal_False;
if (!bDisableExpand)
- bDisableExpandAll = FALSE;
+ bDisableExpandAll = sal_False;
// otherwise look through all paragraphs
if (bDisableCollapseAll || bDisableExpandAll)
{
- ULONG nParaPos = 0;
+ sal_uLong nParaPos = 0;
pPara = pOutl->GetParagraph( nParaPos );
while (pPara && (bDisableCollapseAll || bDisableExpandAll))
{
if (!pOutl->IsExpanded(pPara) && pOutl->HasChilds(pPara))
- bDisableExpandAll = FALSE;
+ bDisableExpandAll = sal_False;
if (pOutl->IsExpanded(pPara) && pOutl->HasChilds(pPara))
- bDisableCollapseAll = FALSE;
+ bDisableCollapseAll = sal_False;
pPara = pOutl->GetParagraph( ++nParaPos );
}
@@ -944,7 +944,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// create listener
pClipEvtLstnr = new TransferableClipboardListener( LINK( this, OutlineViewShell, ClipboardChanged ) );
pClipEvtLstnr->acquire();
- pClipEvtLstnr->AddRemoveListener( GetActiveWindow(), TRUE );
+ pClipEvtLstnr->AddRemoveListener( GetActiveWindow(), sal_True );
// get initial state
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( GetActiveWindow() ) );
@@ -968,7 +968,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if (pOlView->GetOutliner()->IsModified())
{
- GetDoc()->SetChanged(TRUE);
+ GetDoc()->SetChanged(sal_True);
}
// the status has to be set here because of overloading
@@ -985,11 +985,11 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{
if (GetDoc()->GetOnlineSpell())
{
- rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, TRUE));
+ rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, sal_True));
}
else
{
- rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, FALSE));
+ rSet.Put(SfxBoolItem(SID_AUTOSPELL_CHECK, sal_False));
}
}
@@ -1009,9 +1009,9 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_EXPAND_PAGE))
{
- BOOL bDisable = TRUE;
- USHORT i = 0;
- USHORT nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
+ sal_Bool bDisable = sal_True;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
pOlView->SetSelectedPages();
while (i < nCount && bDisable)
@@ -1022,9 +1022,26 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
- if (pObj && !pObj->IsEmptyPresObj())
+ if (pObj!=NULL )
{
- bDisable = FALSE;
+ if( !pObj->IsEmptyPresObj() )
+ {
+ bDisable = false;
+ }
+ else
+ {
+ // check if the object is in edit, than its temporarely not empty
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ if( pTextObj )
+ {
+ OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
+ if( pParaObj )
+ {
+ delete pParaObj;
+ bDisable = false;
+ }
+ }
+ }
}
}
@@ -1039,9 +1056,9 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_SUMMARY_PAGE))
{
- BOOL bDisable = TRUE;
- USHORT i = 0;
- USHORT nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
+ sal_Bool bDisable = sal_True;
+ sal_uInt16 i = 0;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
pOlView->SetSelectedPages();
while (i < nCount && bDisable)
@@ -1054,7 +1071,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
if (pObj && !pObj->IsEmptyPresObj())
{
- bDisable = FALSE;
+ bDisable = sal_False;
}
}
@@ -1089,15 +1106,15 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// is starting the presentation possible?
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) )
{
- BOOL bDisable = TRUE;
- USHORT nCount = GetDoc()->GetSdPageCount( PK_STANDARD );
+ sal_Bool bDisable = sal_True;
+ sal_uInt16 nCount = GetDoc()->GetSdPageCount( PK_STANDARD );
- for( USHORT i = 0; i < nCount && bDisable; i++ )
+ for( sal_uInt16 i = 0; i < nCount && bDisable; i++ )
{
SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD);
if( !pPage->IsExcluded() )
- bDisable = FALSE;
+ bDisable = sal_False;
}
if( bDisable || GetDocSh()->IsPreview())
{
@@ -1133,7 +1150,7 @@ long OutlineViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
pOutlinerView->HideCursor();
pOutlinerView->Scroll(-nDelta, 0);
- pOutlinerView->ShowCursor(FALSE);
+ pOutlinerView->ShowCursor(sal_False);
pOlView->InvalidateSlideNumberArea();
return 0;
@@ -1157,7 +1174,7 @@ long OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
pOutlinerView->HideCursor();
pOutlinerView->Scroll(0, -nDelta);
- pOutlinerView->ShowCursor(FALSE);
+ pOutlinerView->ShowCursor(sal_False);
pOlView->InvalidateSlideNumberArea();
@@ -1171,10 +1188,10 @@ long OutlineViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
|*
\************************************************************************/
-USHORT OutlineViewShell::PrepareClose( BOOL bUI, BOOL bForBrowsing )
+sal_uInt16 OutlineViewShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
{
- if( ViewShell::PrepareClose(bUI, bForBrowsing) != TRUE )
- return FALSE;
+ if( ViewShell::PrepareClose(bUI, bForBrowsing) != sal_True )
+ return sal_False;
return pOlView == NULL || pOlView->PrepareClose(bUI);
}
@@ -1290,19 +1307,16 @@ void OutlineViewShell::ReadFrameViewData(FrameView* pView)
{
::Outliner* pOutl = pOlView->GetOutliner();
- if ( pView->IsNoAttribs() )
- pOutl->SetFlatMode( TRUE );
- else
- pOutl->SetFlatMode( FALSE );
+ pOutl->SetFlatMode( static_cast<bool>(pView->IsNoAttribs()) );
- ULONG nCntrl = pOutl->GetControlWord();
+ sal_uLong nCntrl = pOutl->GetControlWord();
if ( pView->IsNoColors() )
pOutl->SetControlWord(nCntrl | EE_CNTRL_NOCOLORS);
else
pOutl->SetControlWord(nCntrl & ~EE_CNTRL_NOCOLORS);
- USHORT nPage = mpFrameView->GetSelectedPage();
+ sal_uInt16 nPage = mpFrameView->GetSelectedPage();
pLastPage = GetDoc()->GetSdPage( nPage, PK_STANDARD );
pOlView->SetActualPage(pLastPage);
}
@@ -1319,10 +1333,10 @@ void OutlineViewShell::WriteFrameViewData()
{
::Outliner* pOutl = pOlView->GetOutliner();
- ULONG nCntrl = pOutl->GetControlWord();
- BOOL bNoColor = FALSE;
+ sal_uLong nCntrl = pOutl->GetControlWord();
+ sal_Bool bNoColor = sal_False;
if (nCntrl & EE_CNTRL_NOCOLORS)
- bNoColor = TRUE;
+ bNoColor = sal_True;
mpFrameView->SetNoColors(bNoColor);
mpFrameView->SetNoAttribs( pOutl->IsFlatMode() );
SdPage* pActualPage = pOlView->GetActualPage();
@@ -1354,12 +1368,12 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOM ) )
{
SvxZoomItem* pZoomItem;
- UINT16 nZoom = (UINT16) GetActiveWindow()->GetZoom();
+ sal_uInt16 nZoom = (sal_uInt16) GetActiveWindow()->GetZoom();
pZoomItem = new SvxZoomItem( SVX_ZOOM_PERCENT, nZoom );
// limit area
- USHORT nZoomValues = SVX_ZOOM_ENABLE_ALL;
+ sal_uInt16 nZoomValues = SVX_ZOOM_ENABLE_ALL;
nZoomValues &= ~SVX_ZOOM_ENABLE_OPTIMAL;
nZoomValues &= ~SVX_ZOOM_ENABLE_WHOLEPAGE;
nZoomValues &= ~SVX_ZOOM_ENABLE_PAGEWIDTH;
@@ -1378,7 +1392,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
else
{
sd::Window * pActiveWindow = GetActiveWindow();
- SvxZoomSliderItem aZoomItem( (UINT16) pActiveWindow->GetZoom(), (USHORT)pActiveWindow->GetMinZoom(), (USHORT)pActiveWindow->GetMaxZoom() ) ;
+ SvxZoomSliderItem aZoomItem( (sal_uInt16) pActiveWindow->GetZoom(), (sal_uInt16)pActiveWindow->GetMinZoom(), (sal_uInt16)pActiveWindow->GetMaxZoom() ) ;
aZoomItem.AddSnappingPoint(100);
rSet.Put( aZoomItem );
}
@@ -1387,7 +1401,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
// page view and layout
- USHORT nPageCount = GetDoc()->GetSdPageCount( PK_STANDARD );
+ sal_uInt16 nPageCount = GetDoc()->GetSdPageCount( PK_STANDARD );
String aPageStr, aLayoutStr;
::sd::Window* pWin = GetActiveWindow();
@@ -1409,7 +1423,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
if( pFirstPara == pLastPara )
{
// how many pages are we before the selected page?
- ULONG nPos = 0L;
+ sal_uLong nPos = 0L;
while( pFirstPara )
{
pFirstPara = pOlView->GetPrevTitle( pFirstPara );
@@ -1420,11 +1434,11 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
if( nPos >= GetDoc()->GetSdPageCount( PK_STANDARD ) )
nPos = 0;
- SdrPage* pPage = GetDoc()->GetSdPage( (USHORT) nPos, PK_STANDARD );
+ SdrPage* pPage = GetDoc()->GetSdPage( (sal_uInt16) nPos, PK_STANDARD );
aPageStr = String(SdResId( STR_SD_PAGE ));
aPageStr += sal_Unicode(' ');
- aPageStr += String::CreateFromInt32( (sal_Int32)(nPos + 1) ); // ULONG -> sal_Int32
+ aPageStr += String::CreateFromInt32( (sal_Int32)(nPos + 1) ); // sal_uLong -> sal_Int32
aPageStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( " / " ));
aPageStr += String::CreateFromInt32( nPageCount );
@@ -1479,9 +1493,9 @@ void OutlineViewShell::Command( const CommandEvent& rCEvt, ::sd::Window* pWin )
|*
\************************************************************************/
-BOOL OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
+sal_Bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
OutlineViewPageChangesGuard aGuard(pOlView);
if (pWin == NULL && HasCurrentFunction())
@@ -1553,7 +1567,7 @@ Size OutlineViewShell::GetOptimalSizePixel() const
|*
\************************************************************************/
-String OutlineViewShell::GetSelectionText(BOOL bCompleteWords)
+String OutlineViewShell::GetSelectionText(sal_Bool bCompleteWords)
{
String aStrSelection;
::Outliner* pOl = pOlView->GetOutliner();
@@ -1586,9 +1600,9 @@ String OutlineViewShell::GetSelectionText(BOOL bCompleteWords)
|*
\************************************************************************/
-BOOL OutlineViewShell::HasSelection(BOOL bText) const
+sal_Bool OutlineViewShell::HasSelection(sal_Bool bText) const
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (bText)
{
@@ -1596,7 +1610,7 @@ BOOL OutlineViewShell::HasSelection(BOOL bText) const
if (pOutlinerView && pOutlinerView->GetSelected().Len() != 0)
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
@@ -1613,12 +1627,12 @@ BOOL OutlineViewShell::HasSelection(BOOL bText) const
void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
{
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
SfxAllItemSet aAllSet( *rSet.GetPool() );
while ( nWhich )
{
- USHORT nSlotId = SfxItemPool::IsWhich(nWhich)
+ sal_uInt16 nSlotId = SfxItemPool::IsWhich(nWhich)
? GetPool().GetSlotId(nWhich)
: nWhich;
@@ -1701,7 +1715,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
nWhich = aIter.NextWhich();
}
- rSet.Put( aAllSet, FALSE );
+ rSet.Put( aAllSet, sal_False );
}
@@ -1751,104 +1765,7 @@ SdPage* OutlineViewShell::GetActualPage()
}
-/*************************************************************************
-|*
-|* Retrieve range of marked pages
-|*
-\************************************************************************/
-
-String OutlineViewShell::GetPageRangeString()
-{
- ::sd::Window* pWin = GetActiveWindow();
- OutlinerView* pActiveView = pOlView->GetViewByWindow(pWin);
- ::Outliner* pOutl = pActiveView->GetOutliner();
- List* pSelList = (List*)pActiveView->CreateSelectionList();
- Paragraph* pPara = (Paragraph*)pSelList->First();
-
- String aStrPageRange;
- BOOL bFirstPageNo = TRUE;
- BOOL bOpenRange = FALSE;
- USHORT nLastPage = 0;
- USHORT nLastUsedPage = (USHORT)-1;
-
- USHORT nPageCount = 0;
- for( USHORT n = 0; n< GetDoc()->GetPageCount(); n++ )
- if( ( (SdPage*)GetDoc()->GetPage( n ) )->GetPageKind() == PK_STANDARD )
- nPageCount++;
-
- while ( pPara )
- {
- if ( !pOutl->HasParaFlag(pPara, PARAFLAG_ISPAGE) )
- {
- pPara = pOlView->GetPrevTitle(pPara);
- }
- USHORT nPageToSelect = 0;
- while(pPara)
- {
- pPara = pOlView->GetPrevTitle(pPara);
- if (pPara)
- nPageToSelect++;
- }
-
- if( bFirstPageNo )
- {
- bFirstPageNo = FALSE;
- aStrPageRange = String::CreateFromInt32( sal_Int32( nPageToSelect+1 ) );
- nLastUsedPage = nPageToSelect;
- nPageCount--;
- }
- else
- {
- if( nPageToSelect != nLastPage )
- {
- if( nPageToSelect == nLastPage+1 )
- {
- bOpenRange = TRUE;
- nPageCount--;
- }
- else
- {
- if( bOpenRange )
- {
- if( nLastPage == nLastUsedPage+1 )
- aStrPageRange.Append( sal_Unicode(',') );
- else
- aStrPageRange.Append( sal_Unicode('-') );
-
- aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nLastPage+1 ) ) );
- }
- aStrPageRange.Append( sal_Unicode(',') );
- aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nPageToSelect+1 ) ) );
- nLastUsedPage = nPageToSelect;
- bOpenRange = FALSE;
- nPageCount--;
- }
- }
- }
-
- nLastPage = nPageToSelect;
- pPara = (Paragraph*)pSelList->Next();
- }
-
- if( bOpenRange )
- {
- if( nLastPage == nLastUsedPage+1 )
- aStrPageRange.Append( sal_Unicode(',') );
- else
- aStrPageRange.Append( sal_Unicode('-') );
-
- aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nLastPage+1 ) ) );
- }
-
- if( nPageCount == 0 )
- aStrPageRange.Erase();
-
- delete pSelList; // has been created only for us
-
- return aStrPageRange;
-}
-
-void OutlineViewShell::UpdatePreview( SdPage* pPage, BOOL )
+void OutlineViewShell::UpdatePreview( SdPage* pPage, sal_Bool )
{
const bool bNewPage = pPage != pLastPage;
pLastPage = pPage;
@@ -1888,13 +1805,13 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
{
DBG_ASSERT( pOlView->isRecordingUndo(), "sd::OutlineViewShell::UpdateTitleObject(), no undo for model change!?" );
pTO = pOlView->CreateTitleTextObject(pPage);
- bNewObject = TRUE;
+ bNewObject = sal_True;
}
// if we have a title object and a text, set the text
if( pTO )
{
- pOPO = pOutliner->CreateParaObject( (USHORT) pOutliner->GetAbsPos( pPara ), 1 );
+ pOPO = pOutliner->CreateParaObject( (sal_uInt16) pOutliner->GetAbsPos( pPara ), 1 );
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
pOPO->SetVertical( pTO->IsVerticalWriting() );
if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) )
@@ -1909,7 +1826,7 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
pOlView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoObjectSetText(*pTO,0));
pTO->SetOutlinerParaObject( pOPO );
- pTO->SetEmptyPresObj( FALSE );
+ pTO->SetEmptyPresObj( sal_False );
pTO->ActionChanged();
}
}
@@ -1929,7 +1846,7 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
if( pOlView->isRecordingUndo() )
pOlView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoObjectSetText(*pTO,0));
pPage->RestoreDefaultText( pTO );
- pTO->SetEmptyPresObj(TRUE);
+ pTO->SetEmptyPresObj(sal_True);
pTO->ActionChanged();
}
}
@@ -1964,7 +1881,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
OutlinerParaObject* pOPO = NULL;
SdrTextObj* pTO = NULL;
- BOOL bNewObject = FALSE;
+ sal_Bool bNewObject = sal_False;
sal_uInt16 eOutlinerMode = OUTLINERMODE_TITLEOBJECT;
pTO = (SdrTextObj*)pPage->GetPresObj( PRESOBJ_TEXT );
@@ -1975,9 +1892,9 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
}
// how many paragraphs in the outline?
- ULONG nTitlePara = pOutliner->GetAbsPos( pPara );
- ULONG nPara = nTitlePara + 1;
- ULONG nParasInLayout = 0L;
+ sal_uLong nTitlePara = pOutliner->GetAbsPos( pPara );
+ sal_uLong nPara = nTitlePara + 1;
+ sal_uLong nParasInLayout = 0L;
pPara = pOutliner->GetParagraph( nPara );
while( pPara && !pOutliner->HasParaFlag(pPara, PARAFLAG_ISPAGE) )
{
@@ -1988,7 +1905,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
{
// create an OutlinerParaObject
pPara = pOutliner->GetParagraph( nTitlePara + 1 );
- pOPO = pOutliner->CreateParaObject( (USHORT) nTitlePara + 1, (USHORT) nParasInLayout );
+ pOPO = pOutliner->CreateParaObject( (sal_uInt16) nTitlePara + 1, (sal_uInt16) nParasInLayout );
}
if( pOPO )
@@ -1999,7 +1916,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
if( !pTO )
{
pTO = pOlView->CreateOutlineTextObject( pPage );
- bNewObject = TRUE;
+ bNewObject = sal_True;
}
// page object, outline text in Outliner:
@@ -2019,7 +1936,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
pOlView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoObjectSetText(*pTO,0));
pTO->SetOutlinerParaObject( pOPO );
- pTO->SetEmptyPresObj( FALSE );
+ pTO->SetEmptyPresObj( sal_False );
pTO->ActionChanged();
}
}
@@ -2040,7 +1957,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
if( pOlView->isRecordingUndo() )
pOlView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoObjectSetText(*pTO,0));
pPage->RestoreDefaultText( pTO );
- pTO->SetEmptyPresObj(TRUE);
+ pTO->SetEmptyPresObj(sal_True);
pTO->ActionChanged();
}
}
@@ -2063,9 +1980,9 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
|*
\************************************************************************/
-ULONG OutlineViewShell::Read(SvStream& rInput, const String& rBaseURL, USHORT eFormat)
+sal_uLong OutlineViewShell::Read(SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat)
{
- ULONG bRet = 0;
+ sal_uLong bRet = 0;
::Outliner* pOutl = pOlView->GetOutliner();
@@ -2079,10 +1996,10 @@ ULONG OutlineViewShell::Read(SvStream& rInput, const String& rBaseURL, USHORT eF
SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
SfxStyleSheet* pOutlSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
- USHORT nParaCount = (USHORT)pOutl->GetParagraphCount();
+ sal_uInt16 nParaCount = (sal_uInt16)pOutl->GetParagraphCount();
if ( nParaCount > 0 )
{
- for ( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ for ( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ )
{
pOlView->UpdateParagraph( nPara );
@@ -2181,7 +2098,7 @@ void OutlineViewShell::GetState (SfxItemSet& rSet)
{
// Iterate over all requested items in the set.
SfxWhichIter aIter( rSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while (nWhich)
{
switch (nWhich)
@@ -2205,11 +2122,11 @@ void OutlineViewShell::GetState (SfxItemSet& rSet)
void OutlineViewShell::SetCurrentPage (SdPage* pPage)
{
// Adapt the selection of the model.
- for (USHORT i=0; i<GetDoc()->GetSdPageCount(PK_STANDARD); i++)
+ for (sal_uInt16 i=0; i<GetDoc()->GetSdPageCount(PK_STANDARD); i++)
GetDoc()->SetSelected(
GetDoc()->GetSdPage(i, PK_STANDARD),
- FALSE);
- GetDoc()->SetSelected (pPage, TRUE);
+ sal_False);
+ GetDoc()->SetSelected (pPage, sal_True);
DrawController& rController(GetViewShellBase().GetDrawController());
rController.FireSelectionChangeListener();
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index d2d180734d86..0bc619036739 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -98,7 +98,7 @@ namespace sd {
struct SdParaAndPos
{
Paragraph* pPara;
- USHORT nPos;
+ sal_uInt16 nPos;
};
TYPEINIT1( OutlineView, ::sd::View );
@@ -112,31 +112,31 @@ TYPEINIT1( OutlineView, ::sd::View );
OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewShell* pOutlineViewSh)
: ::sd::View(pDocSh->GetDoc(), pWindow, pOutlineViewSh)
, mpOutlineViewShell(pOutlineViewSh)
-, mpOutliner( mpDoc->GetOutliner(TRUE) )
+, mpOutliner( mpDoc->GetOutliner(sal_True) )
, mpOldParaOrder(NULL)
, mpSelectedParas(NULL)
, mnPagesToProcess(0)
, mnPagesProcessed(0)
-, mbFirstPaint(TRUE)
+, mbFirstPaint(sal_True)
, mpProgress(NULL)
, maDocColor( COL_WHITE )
, mnPageNumberWidthPixel( 0 )
, maLRSpaceItem( 0, 0, 2000, 0, EE_PARA_OUTLLRSPACE )
{
- BOOL bInitOutliner = FALSE;
+ sal_Bool bInitOutliner = sal_False;
if (mpOutliner->GetViewCount() == 0)
{
// initialize Outliner: set Reference Device
- bInitOutliner = TRUE;
+ bInitOutliner = sal_True;
mpOutliner->Init( OUTLINERMODE_OUTLINEVIEW );
mpOutliner->SetRefDevice( SD_MOD()->GetRefDevice( *pDocSh ) );
- ULONG nWidth = OUTLINE_PAPERWIDTH;
+ sal_uLong nWidth = OUTLINE_PAPERWIDTH;
mpOutliner->SetPaperSize(Size(nWidth, 400000000));
}
// insert View into Outliner
- for (USHORT nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
+ for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
{
mpOutlinerView[nView] = NULL;
}
@@ -144,7 +144,7 @@ OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewSh
mpOutlinerView[0] = new OutlinerView(mpOutliner, pWindow);
Rectangle aNullRect;
mpOutlinerView[0]->SetOutputArea(aNullRect);
- mpOutliner->SetUpdateMode(FALSE);
+ mpOutliner->SetUpdateMode(sal_False);
mpOutliner->InsertView(mpOutlinerView[0], LIST_APPEND);
onUpdateStyleSettings( true );
@@ -173,8 +173,8 @@ OutlineView::OutlineView( DrawDocShell* pDocSh, ::Window* pWindow, OutlineViewSh
maBulletFont.SetUnderline(UNDERLINE_NONE);
maBulletFont.SetStrikeout(STRIKEOUT_NONE);
maBulletFont.SetItalic(ITALIC_NONE);
- maBulletFont.SetOutline(FALSE);
- maBulletFont.SetShadow(FALSE);
+ maBulletFont.SetOutline(sal_False);
+ maBulletFont.SetShadow(sal_False);
Reference<XFrame> xFrame (mpOutlineViewShell->GetViewShellBase().GetFrame()->GetTopFrame().GetFrameInterface(), UNO_QUERY);
@@ -207,7 +207,7 @@ OutlineView::~OutlineView()
delete mpProgress;
// unregister OutlinerViews and destroy them
- for (USHORT nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
+ for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
{
if (mpOutlinerView[nView] != NULL)
{
@@ -221,8 +221,8 @@ OutlineView::~OutlineView()
{
// uninitialize Outliner: enable color display
ResetLinks();
- ULONG nCntrl = mpOutliner->GetControlWord();
- mpOutliner->SetUpdateMode(FALSE); // otherwise there will be drawn on SetControlWord
+ sal_uLong nCntrl = mpOutliner->GetControlWord();
+ mpOutliner->SetUpdateMode(sal_False); // otherwise there will be drawn on SetControlWord
mpOutliner->SetControlWord(nCntrl & ~EE_CNTRL_NOCOLORS);
SvtAccessibilityOptions aOptions;
mpOutliner->ForceAutoColor( aOptions.GetIsAutomaticFontColor() );
@@ -270,7 +270,7 @@ void OutlineView::Paint(const Rectangle& rRect, ::sd::Window* pWin)
pOlView->ShowCursor(mbFirstPaint);
- mbFirstPaint = FALSE;
+ mbFirstPaint = sal_False;
}
}
@@ -296,11 +296,11 @@ void OutlineView::AdjustPosSizePixel(const Point &,const Size &,::sd::Window*)
void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
{
- BOOL bAdded = FALSE;
- BOOL bValidArea = FALSE;
+ sal_Bool bAdded = sal_False;
+ sal_Bool bValidArea = sal_False;
Rectangle aOutputArea;
const Color aWhiteColor( COL_WHITE );
- USHORT nView = 0;
+ sal_uInt16 nView = 0;
while (nView < MAX_OUTLINERVIEWS && !bAdded)
{
@@ -309,7 +309,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
mpOutlinerView[nView] = new OutlinerView(mpOutliner, dynamic_cast< ::sd::Window* >(pWin));
mpOutlinerView[nView]->SetBackgroundColor( aWhiteColor );
mpOutliner->InsertView(mpOutlinerView[nView], LIST_APPEND);
- bAdded = TRUE;
+ bAdded = sal_True;
if (bValidArea)
{
@@ -319,7 +319,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
else if (!bValidArea)
{
aOutputArea = mpOutlinerView[nView]->GetOutputArea();
- bValidArea = TRUE;
+ bValidArea = sal_True;
}
nView++;
@@ -339,8 +339,8 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin)
void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
{
- BOOL bRemoved = FALSE;
- USHORT nView = 0;
+ sal_Bool bRemoved = sal_False;
+ sal_uInt16 nView = 0;
::Window* pWindow;
while (nView < MAX_OUTLINERVIEWS && !bRemoved)
@@ -354,7 +354,7 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
mpOutliner->RemoveView( mpOutlinerView[nView] );
delete mpOutlinerView[nView];
mpOutlinerView[nView] = NULL;
- bRemoved = TRUE;
+ bRemoved = sal_True;
}
}
@@ -373,7 +373,7 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
OutlinerView* OutlineView::GetViewByWindow (::Window* pWin) const
{
OutlinerView* pOlView = NULL;
- for (USHORT nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
+ for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
{
if (mpOutlinerView[nView] != NULL)
{
@@ -451,7 +451,7 @@ IMPL_LINK( OutlineView, ParagraphInsertedHdl, ::Outliner *, pOutliner )
Paragraph* pPara = pOutliner->GetHdlParagraph();
- USHORT nAbsPos = (USHORT)mpOutliner->GetAbsPos( pPara );
+ sal_uInt16 nAbsPos = (sal_uInt16)mpOutliner->GetAbsPos( pPara );
UpdateParagraph( nAbsPos );
@@ -474,8 +474,8 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
mpOutliner->SetParaFlag( pPara, PARAFLAG_ISPAGE );
// how many titles are there before the new title paragraph?
- ULONG nExample = 0L; // position of the "example" page
- ULONG nTarget = 0L; // position of insertion
+ sal_uLong nExample = 0L; // position of the "example" page
+ sal_uLong nTarget = 0L; // position of insertion
while(pPara)
{
pPara = GetPrevTitle(pPara);
@@ -501,7 +501,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
{
nExample = nTarget - 1;
- USHORT nPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
+ sal_uInt16 nPageCount = mpDoc->GetSdPageCount( PK_STANDARD );
if( nExample >= nPageCount )
nExample = nPageCount - 1;
}
@@ -513,13 +513,13 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
**********************************************************************/
// this page is exemplary
- SdPage* pExample = (SdPage*)mpDoc->GetSdPage((USHORT)nExample, PK_STANDARD);
- SdPage* pPage = (SdPage*)mpDoc->AllocPage(FALSE);
+ SdPage* pExample = (SdPage*)mpDoc->GetSdPage((sal_uInt16)nExample, PK_STANDARD);
+ SdPage* pPage = (SdPage*)mpDoc->AllocPage(sal_False);
pPage->SetLayoutName(pExample->GetLayoutName());
// insert (page)
- mpDoc->InsertPage(pPage, (USHORT)(nTarget) * 2 + 1);
+ mpDoc->InsertPage(pPage, (sal_uInt16)(nTarget) * 2 + 1);
if( isRecordingUndo() )
AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoNewPage(*pPage));
@@ -540,25 +540,25 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
if (eAutoLayout == AUTOLAYOUT_TITLE ||
eAutoLayout == AUTOLAYOUT_ONLY_TITLE)
{
- pPage->SetAutoLayout(AUTOLAYOUT_ENUM, TRUE);
+ pPage->SetAutoLayout(AUTOLAYOUT_ENUM, sal_True);
}
else
{
- pPage->SetAutoLayout(pExample->GetAutoLayout(), TRUE);
+ pPage->SetAutoLayout(pExample->GetAutoLayout(), sal_True);
}
/**********************************************************************
|* now the notes page
\*********************************************************************/
- pExample = (SdPage*)mpDoc->GetSdPage((USHORT)nExample, PK_NOTES);
- SdPage* pNotesPage = (SdPage*)mpDoc->AllocPage(FALSE);
+ pExample = (SdPage*)mpDoc->GetSdPage((sal_uInt16)nExample, PK_NOTES);
+ SdPage* pNotesPage = (SdPage*)mpDoc->AllocPage(sal_False);
pNotesPage->SetLayoutName(pExample->GetLayoutName());
pNotesPage->SetPageKind(PK_NOTES);
// insert (notes page)
- mpDoc->InsertPage(pNotesPage, (USHORT)(nTarget) * 2 + 2);
+ mpDoc->InsertPage(pNotesPage, (sal_uInt16)(nTarget) * 2 + 2);
if( isRecordingUndo() )
AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoNewPage(*pNotesPage));
@@ -573,7 +573,7 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
pExample->GetLwrBorder() );
// create presentation objects
- pNotesPage->SetAutoLayout(pExample->GetAutoLayout(), TRUE);
+ pNotesPage->SetAutoLayout(pExample->GetAutoLayout(), sal_True);
mpOutliner->UpdateFields();
@@ -596,7 +596,7 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner )
if( pOutliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
{
// how many titles are in front of the title paragraph in question?
- ULONG nPos = 0L;
+ sal_uLong nPos = 0L;
while(pPara)
{
pPara = GetPrevTitle(pPara);
@@ -604,13 +604,13 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner )
}
// delete page and notes page
- USHORT nAbsPos = (USHORT)nPos * 2 + 1;
+ sal_uInt16 nAbsPos = (sal_uInt16)nPos * 2 + 1;
SdrPage* pPage = mpDoc->GetPage(nAbsPos);
if( isRecordingUndo() )
AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoDeletePage(*pPage));
mpDoc->RemovePage(nAbsPos);
- nAbsPos = (USHORT)nPos * 2 + 1;
+ nAbsPos = (sal_uInt16)nPos * 2 + 1;
pPage = mpDoc->GetPage(nAbsPos);
if( isRecordingUndo() )
AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoDeletePage(*pPage));
@@ -674,7 +674,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
Paragraph* pParagraph = (Paragraph*)pList->First();
while (pParagraph)
{
- if( !pOutliner->HasParaFlag( pParagraph, PARAFLAG_ISPAGE ) && (pOutliner->GetDepth( (USHORT) pOutliner->GetAbsPos( pParagraph ) ) <= 0) )
+ if( !pOutliner->HasParaFlag( pParagraph, PARAFLAG_ISPAGE ) && (pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos( pParagraph ) ) <= 0) )
mnPagesToProcess++;
pParagraph = (Paragraph*)pList->Next();
}
@@ -693,7 +693,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
}
else
{
- mpDocSh->SetWaitCursor( TRUE );
+ mpDocSh->SetWaitCursor( sal_True );
}
delete pList;
}
@@ -718,7 +718,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
mpProgress = NULL;
}
else
- mpDocSh->SetWaitCursor( FALSE );
+ mpDocSh->SetWaitCursor( sal_False );
mnPagesToProcess = 0;
mnPagesProcessed = 0;
@@ -730,7 +730,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
// the paragraph was a page but now becomes a normal paragraph
// how many titles are before the title paragraph in question?
- ULONG nPos = 0L;
+ sal_uLong nPos = 0L;
Paragraph* pParagraph = pPara;
while(pParagraph)
{
@@ -740,13 +740,13 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
}
// delete page and notes page
- USHORT nAbsPos = (USHORT)nPos * 2 + 1;
+ sal_uInt16 nAbsPos = (sal_uInt16)nPos * 2 + 1;
SdrPage* pPage = mpDoc->GetPage(nAbsPos);
if( isRecordingUndo() )
AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoDeletePage(*pPage));
mpDoc->RemovePage(nAbsPos);
- nAbsPos = (USHORT)nPos * 2 + 1;
+ nAbsPos = (sal_uInt16)nPos * 2 + 1;
pPage = mpDoc->GetPage(nAbsPos);
if( isRecordingUndo() )
AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoDeletePage(*pPage));
@@ -776,7 +776,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
}
pOutliner->UpdateFields();
}
- else if ( (pOutliner->GetPrevDepth() == 1) && ( pOutliner->GetDepth( (USHORT) pOutliner->GetAbsPos( pPara ) ) == 2 ) )
+ else if ( (pOutliner->GetPrevDepth() == 1) && ( pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos( pPara ) ) == 2 ) )
{
// how many titles are in front of the title paragraph in question?
sal_Int32 nPos = -1L;
@@ -791,7 +791,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if(nPos >= 0)
{
- SdPage*pPage = (SdPage*)mpDoc->GetSdPage( (USHORT) nPos, PK_STANDARD);
+ SdPage*pPage = (SdPage*)mpDoc->GetSdPage( (sal_uInt16) nPos, PK_STANDARD);
if(pPage && pPage->GetPresObj(PRESOBJ_TEXT))
pOutliner->SetDepth( pPara, 0 );
@@ -811,13 +811,13 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if( nPos >= 0 )
{
- SdPage* pPage = (SdPage*) mpDoc->GetSdPage( (USHORT) nPos, PK_STANDARD );
+ SdPage* pPage = (SdPage*) mpDoc->GetSdPage( (sal_uInt16) nPos, PK_STANDARD );
if( pPage )
{
SfxStyleSheet* pStyleSheet = NULL;
- ULONG nPara = pOutliner->GetAbsPos( pPara );
- sal_Int16 nDepth = pOutliner->GetDepth( (USHORT) nPara );
+ sal_uLong nPara = pOutliner->GetAbsPos( pPara );
+ sal_Int16 nDepth = pOutliner->GetDepth( (sal_uInt16) nPara );
bool bSubTitle = pPage->GetPresObj(PRESOBJ_TEXT) != NULL;
if( pOutliner->HasParaFlag(pPara, PARAFLAG_ISPAGE) )
@@ -844,7 +844,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
// before we set the style sheet we need to preserve the bullet item
// since all items will be deleted while setting a new style sheet
- SfxItemSet aOldAttrs( pOutliner->GetParaAttribs( (USHORT)nPara ) );
+ SfxItemSet aOldAttrs( pOutliner->GetParaAttribs( (sal_uInt16)nPara ) );
pOutliner->SetStyleSheet( nPara, pStyleSheet );
@@ -852,9 +852,9 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if ( pOutliner->GetPrevDepth() != -1 && nDepth != -1 &&
aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
{
- SfxItemSet aAttrs( pOutliner->GetParaAttribs( (USHORT)nPara ) );
+ SfxItemSet aAttrs( pOutliner->GetParaAttribs( (sal_uInt16)nPara ) );
aAttrs.Put( *aOldAttrs.GetItem( EE_PARA_NUMBULLET ) );
- pOutliner->SetParaAttribs( (USHORT)nPara, aAttrs );
+ pOutliner->SetParaAttribs( (sal_uInt16)nPara, aAttrs );
}
}
}
@@ -875,7 +875,7 @@ IMPL_LINK( OutlineView, StatusEventHdl, EditStatus *, EMPTYARG )
::sd::Window* pWin = mpOutlineViewShell->GetActiveWindow();
OutlinerView* pOutlinerView = GetViewByWindow(pWin);
Rectangle aVis = pOutlinerView->GetVisArea();
- ULONG nWidth = OUTLINE_PAPERWIDTH;
+ sal_uLong nWidth = OUTLINE_PAPERWIDTH;
Rectangle aText = Rectangle(Point(0,0),
Size(nWidth,
mpOutliner->GetTextHeight()));
@@ -942,8 +942,8 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner )
}
// select the pages belonging to the paragraphs on level 0 to select
- USHORT nPos = 0;
- ULONG nParaPos = 0;
+ sal_uInt16 nPos = 0;
+ sal_uLong nParaPos = 0;
pPara = pOutliner->GetParagraph( 0 );
while(pPara)
@@ -952,10 +952,10 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner )
{
mpOldParaOrder->Insert(pPara, LIST_APPEND);
SdPage* pPage = mpDoc->GetSdPage(nPos, PK_STANDARD);
- pPage->SetSelected(FALSE);
+ pPage->SetSelected(sal_False);
if (mpSelectedParas->Seek(pPara)) // selected?
{
- pPage->SetSelected(TRUE);
+ pPage->SetSelected(sal_True);
}
nPos++;
}
@@ -983,8 +983,8 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
Paragraph* pSearchIt = (Paragraph*)mpSelectedParas->First();
// look for the first of the selected paragraphs in the new ordering
- USHORT nPosNewOrder = 0;
- ULONG nParaPos = 0;
+ sal_uInt16 nPosNewOrder = 0;
+ sal_uLong nParaPos = 0;
Paragraph* pPara = pOutliner->GetParagraph( 0 );
Paragraph* pPrev = NULL;
while (pPara && pPara != pSearchIt)
@@ -997,26 +997,26 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
pPara = pOutliner->GetParagraph( ++nParaPos );
}
- USHORT nPos = nPosNewOrder; // don't change nPosNewOrder
+ sal_uInt16 nPos = nPosNewOrder; // don't change nPosNewOrder
if (nPos == 0)
{
- nPos = (USHORT)-1; // insert before the first page
+ nPos = (sal_uInt16)-1; // insert before the first page
}
else
{
// look for the predecessor in the old ordering
- nPos = (USHORT)mpOldParaOrder->GetPos(pPrev);
+ nPos = (sal_uInt16)mpOldParaOrder->GetPos(pPrev);
DBG_ASSERT(nPos != 0xffff, "Absatz nicht gefunden");
}
mpDoc->MovePages(nPos);
// deselect the pages again
- USHORT nPageCount = (USHORT)mpSelectedParas->Count();
+ sal_uInt16 nPageCount = (sal_uInt16)mpSelectedParas->Count();
while (nPageCount)
{
SdPage* pPage = mpDoc->GetSdPage(nPosNewOrder, PK_STANDARD);
- pPage->SetSelected(FALSE);
+ pPage->SetSelected(sal_False);
nPosNewOrder++;
nPageCount--;
}
@@ -1041,11 +1041,11 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage)
{
- ULONG nObjectCount = pPage->GetObjCount();
+ sal_uLong nObjectCount = pPage->GetObjCount();
SdrObject* pObject = NULL;
SdrTextObj* pResult = NULL;
- for (ULONG nObject = 0; nObject < nObjectCount; nObject++)
+ for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++)
{
pObject = pPage->GetObj(nObject);
if (pObject->GetObjInventor() == SdrInventor &&
@@ -1067,11 +1067,11 @@ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage)
SdrTextObj* OutlineView::GetOutlineTextObject(SdrPage* pPage)
{
- ULONG nObjectCount = pPage->GetObjCount();
+ sal_uLong nObjectCount = pPage->GetObjCount();
SdrObject* pObject = NULL;
SdrTextObj* pResult = NULL;
- for (ULONG nObject = 0; nObject < nObjectCount; nObject++)
+ for (sal_uLong nObject = 0; nObject < nObjectCount; nObject++)
{
pObject = pPage->GetObj(nObject);
if (pObject->GetObjInventor() == SdrInventor &&
@@ -1140,7 +1140,7 @@ SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
}
/** updates draw model with all changes from outliner model */
-BOOL OutlineView::PrepareClose(BOOL)
+sal_Bool OutlineView::PrepareClose(sal_Bool)
{
::sd::UndoManager* pDocUndoMgr = dynamic_cast<sd::UndoManager*>(mpDocSh->GetUndoManager());
if (pDocUndoMgr != NULL)
@@ -1152,8 +1152,8 @@ BOOL OutlineView::PrepareClose(BOOL)
BegUndo(aUndoStr);
UpdateDocument();
EndUndo();
- mpDoc->SetSelected(GetActualPage(), TRUE);
- return TRUE;
+ mpDoc->SetSelected(GetActualPage(), sal_True);
+ return sal_True;
}
@@ -1163,16 +1163,16 @@ BOOL OutlineView::PrepareClose(BOOL)
|*
\************************************************************************/
-BOOL OutlineView::SetAttributes(const SfxItemSet& rSet, BOOL )
+sal_Bool OutlineView::SetAttributes(const SfxItemSet& rSet, sal_Bool )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
OutlinerView* pOlView = GetViewByWindow(mpOutlineViewShell->GetActiveWindow());
if (pOlView)
{
pOlView->SetAttribs(rSet);
- bOk = TRUE;
+ bOk = sal_True;
}
mpOutlineViewShell->Invalidate (SID_PREVIEW_STATE);
@@ -1186,29 +1186,29 @@ BOOL OutlineView::SetAttributes(const SfxItemSet& rSet, BOOL )
|*
\************************************************************************/
-BOOL OutlineView::GetAttributes( SfxItemSet& rTargetSet, BOOL ) const
+sal_Bool OutlineView::GetAttributes( SfxItemSet& rTargetSet, sal_Bool ) const
{
OutlinerView* pOlView = GetViewByWindow(
mpOutlineViewShell->GetActiveWindow());
DBG_ASSERT(pOlView, "keine OutlinerView gefunden");
- rTargetSet.Put( pOlView->GetAttribs(), FALSE );
- return TRUE;
+ rTargetSet.Put( pOlView->GetAttribs(), sal_False );
+ return sal_True;
}
/** creates outliner model from draw model */
void OutlineView::FillOutliner()
{
mpOutliner->GetUndoManager().Clear();
- mpOutliner->EnableUndo(FALSE);
+ mpOutliner->EnableUndo(sal_False);
ResetLinks();
mpOutliner->SetUpdateMode(false);
Paragraph* pTitleToSelect = NULL;
- ULONG nPageCount = mpDoc->GetSdPageCount(PK_STANDARD);
+ sal_uLong nPageCount = mpDoc->GetSdPageCount(PK_STANDARD);
// fill outliner with paragraphs from slides title & (outlines|subtitles)
- for (USHORT nPage = 0; nPage < nPageCount; nPage++)
+ for (sal_uInt16 nPage = 0; nPage < nPageCount; nPage++)
{
SdPage* pPage = (SdPage*)mpDoc->GetSdPage(nPage, PK_STANDARD);
Paragraph * pPara = NULL;
@@ -1220,8 +1220,8 @@ void OutlineView::FillOutliner()
OutlinerParaObject* pOPO = pTO->GetOutlinerParaObject();
if (pOPO)
{
- BOOL bVertical = pOPO->IsVertical();
- pOPO->SetVertical( FALSE );
+ sal_Bool bVertical = pOPO->IsVertical();
+ pOPO->SetVertical( sal_False );
mpOutliner->AddText(*pOPO);
pOPO->SetVertical( bVertical );
pPara = mpOutliner->GetParagraph( mpOutliner->GetParagraphCount()-1 );
@@ -1234,7 +1234,7 @@ void OutlineView::FillOutliner()
mpOutliner->SetDepth(pPara, -1);
// do not apply hard attributes from the previous paragraph
- mpOutliner->SetParaAttribs( (USHORT)mpOutliner->GetAbsPos(pPara),
+ mpOutliner->SetParaAttribs( (sal_uInt16)mpOutliner->GetAbsPos(pPara),
mpOutliner->GetEmptyItemSet() );
mpOutliner->SetStyleSheet( mpOutliner->GetAbsPos( pPara ), pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ) );
@@ -1242,9 +1242,9 @@ void OutlineView::FillOutliner()
mpOutliner->SetParaFlag( pPara, PARAFLAG_ISPAGE );
- ULONG nPara = mpOutliner->GetAbsPos( pPara );
+ sal_uLong nPara = mpOutliner->GetAbsPos( pPara );
- UpdateParagraph( (USHORT)nPara );
+ UpdateParagraph( (sal_uInt16)nPara );
// remember paragraph of currently selected page
if (pPage->IsSelected())
@@ -1262,14 +1262,14 @@ void OutlineView::FillOutliner()
OutlinerParaObject* pOPO = pTO->GetOutlinerParaObject();
if (pOPO)
{
- USHORT nParaCount1 = (USHORT)mpOutliner->GetParagraphCount();
- BOOL bVertical = pOPO->IsVertical();
- pOPO->SetVertical( FALSE );
+ sal_uInt16 nParaCount1 = (sal_uInt16)mpOutliner->GetParagraphCount();
+ sal_Bool bVertical = pOPO->IsVertical();
+ pOPO->SetVertical( sal_False );
mpOutliner->AddText(*pOPO);
pOPO->SetVertical( bVertical );
- USHORT nParaCount2 = (USHORT)mpOutliner->GetParagraphCount();
- for (USHORT n = nParaCount1; n < nParaCount2; n++)
+ sal_uInt16 nParaCount2 = (sal_uInt16)mpOutliner->GetParagraphCount();
+ for (sal_uInt16 n = nParaCount1; n < nParaCount2; n++)
{
if( bSubTitle )
{
@@ -1286,16 +1286,16 @@ void OutlineView::FillOutliner()
// place cursor at the start
Paragraph* pFirstPara = mpOutliner->GetParagraph( 0 );
- mpOutlinerView[0]->Select( pFirstPara, TRUE, FALSE );
- mpOutlinerView[0]->Select( pFirstPara, FALSE, FALSE );
+ mpOutlinerView[0]->Select( pFirstPara, sal_True, sal_False );
+ mpOutlinerView[0]->Select( pFirstPara, sal_False, sal_False );
// select title of slide that was selected
if (pTitleToSelect)
- mpOutlinerView[0]->Select(pTitleToSelect, TRUE, FALSE);
+ mpOutlinerView[0]->Select(pTitleToSelect, sal_True, sal_False);
SetLinks();
- mpOutliner->EnableUndo(TRUE);
+ mpOutliner->EnableUndo(sal_True);
mpOutliner->SetUpdateMode(true);
}
@@ -1308,7 +1308,7 @@ void OutlineView::FillOutliner()
IMPL_LINK( OutlineView, RemovingPagesHdl, OutlinerView *, EMPTYARG )
{
- USHORT nNumOfPages = mpOutliner->GetSelPageCount();
+ sal_uInt16 nNumOfPages = mpOutliner->GetSelPageCount();
if (nNumOfPages > PROCESS_WITH_PROGRESS_THRESHOLD)
{
@@ -1354,7 +1354,7 @@ SdPage* OutlineView::GetActualPage()
SdPage* pCurrent = GetPageForParagraph(static_cast<Paragraph*>(pSelList->First()) );
DBG_ASSERT( pCurrent ||
- (mpDocSh->GetUndoManager() && static_cast< sd::UndoManager *>(mpDocSh->GetUndoManager())->isInUndo()) ||
+ (mpDocSh->GetUndoManager() && static_cast< sd::UndoManager *>(mpDocSh->GetUndoManager())->IsDoing()) ||
maDragAndDropModelGuard.get(),
"sd::OutlineView::GetActualPage(), no current page?" );
if( pCurrent )
@@ -1377,7 +1377,7 @@ SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
}
if( nPageToSelect < (sal_uInt32)mpDoc->GetSdPageCount( PK_STANDARD ) )
- return static_cast< SdPage* >( mpDoc->GetSdPage( (USHORT)nPageToSelect, PK_STANDARD) );
+ return static_cast< SdPage* >( mpDoc->GetSdPage( (sal_uInt16)nPageToSelect, PK_STANDARD) );
else
return 0;
}
@@ -1418,7 +1418,7 @@ void OutlineView::SetActualPage( SdPage* pActual )
// if we found a paragraph, select its text at the outliner view
Paragraph* pPara = GetParagraphForPage( mpOutliner, pActual );
if( pPara )
- mpOutlinerView[0]->Select( pPara, TRUE, FALSE );
+ mpOutlinerView[0]->Select( pPara, sal_True, sal_False );
}
}
@@ -1464,8 +1464,8 @@ void OutlineView::SetSelectedPages()
}
// select the pages belonging to the paragraphs on level 0 to select
- USHORT nPos = 0;
- ULONG nParaPos = 0;
+ sal_uInt16 nPos = 0;
+ sal_uLong nParaPos = 0;
pPara = mpOutliner->GetParagraph( 0 );
while(pPara)
@@ -1477,10 +1477,10 @@ void OutlineView::SetSelectedPages()
"Trying to select non-existing page OutlineView::SetSelectedPages()");
if (pPage != NULL)
{
- pPage->SetSelected(FALSE);
+ pPage->SetSelected(sal_False);
if (pSelParas->Seek(pPara)) // selected?
- pPage->SetSelected(TRUE);
+ pPage->SetSelected(sal_True);
}
nPos++;
@@ -1545,7 +1545,7 @@ void OutlineView::ResetLinks() const
|*
\************************************************************************/
-sal_Int8 OutlineView::AcceptDrop( const AcceptDropEvent&, DropTargetHelper&, ::sd::Window*, USHORT, USHORT)
+sal_Int8 OutlineView::AcceptDrop( const AcceptDropEvent&, DropTargetHelper&, ::sd::Window*, sal_uInt16, sal_uInt16)
{
return DND_ACTION_NONE;
}
@@ -1556,7 +1556,7 @@ sal_Int8 OutlineView::AcceptDrop( const AcceptDropEvent&, DropTargetHelper&, ::s
|*
\************************************************************************/
-sal_Int8 OutlineView::ExecuteDrop( const ExecuteDropEvent&, DropTargetHelper&, ::sd::Window*, USHORT, USHORT)
+sal_Int8 OutlineView::ExecuteDrop( const ExecuteDropEvent&, DropTargetHelper&, ::sd::Window*, sal_uInt16, sal_uInt16)
{
return DND_ACTION_NONE;
}
@@ -1673,7 +1673,7 @@ void OutlineView::EndModelChange()
{
UpdateDocument();
- SfxUndoManager* pDocUndoMgr = mpDocSh->GetUndoManager();
+ ::svl::IUndoManager* pDocUndoMgr = mpDocSh->GetUndoManager();
bool bHasUndoActions = pDocUndoMgr->GetUndoActionCount() != 0;
@@ -1691,6 +1691,9 @@ void OutlineView::EndModelChange()
if( bHasUndoActions && mpOutliner->GetEditEngine().HasTriedMergeOnLastAddUndo() )
TryToMergeUndoActions();
+
+ mpOutlineViewShell->Invalidate( SID_UNDO );
+ mpOutlineViewShell->Invalidate( SID_REDO );
}
/** updates all changes in the outliner model to the draw model */
@@ -1701,8 +1704,8 @@ void OutlineView::UpdateDocument()
sal_uInt32 nPage;
for (nPage = 0; nPage < nPageCount; nPage++)
{
- SdPage* pPage = mpDoc->GetSdPage( (USHORT)nPage, PK_STANDARD);
- mpDoc->SetSelected(pPage, FALSE);
+ SdPage* pPage = mpDoc->GetSdPage( (sal_uInt16)nPage, PK_STANDARD);
+ mpDoc->SetSelected(pPage, sal_False);
mpOutlineViewShell->UpdateTitleObject( pPage, pPara );
mpOutlineViewShell->UpdateOutlineObject( pPage, pPara );
@@ -1715,7 +1718,7 @@ void OutlineView::UpdateDocument()
while( pPara )
{
SdPage* pPage = InsertSlideForParagraph( pPara );
- mpDoc->SetSelected(pPage, FALSE);
+ mpDoc->SetSelected(pPage, sal_False);
mpOutlineViewShell->UpdateTitleObject( pPage, pPara );
mpOutlineViewShell->UpdateOutlineObject( pPage, pPara );
@@ -1728,7 +1731,7 @@ void OutlineView::UpdateDocument()
/** merge edit engine undo actions if possible */
void OutlineView::TryToMergeUndoActions()
{
- SfxUndoManager& rOutlineUndo = mpOutliner->GetUndoManager();
+ ::svl::IUndoManager& rOutlineUndo = mpOutliner->GetUndoManager();
if( rOutlineUndo.GetUndoActionCount() > 1 )
{
SfxListUndoAction* pListAction = dynamic_cast< SfxListUndoAction* >( rOutlineUndo.GetUndoAction(0) );
@@ -1736,19 +1739,19 @@ void OutlineView::TryToMergeUndoActions()
if( pListAction && pPrevListAction )
{
// find the top EditUndo action in the top undo action list
- USHORT nAction = pListAction->aUndoActions.Count();
+ size_t nAction = pListAction->aUndoActions.size();
EditUndo* pEditUndo = 0;
while( !pEditUndo && nAction )
{
- pEditUndo = dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction]);
+ pEditUndo = dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction].pAction);
}
- USHORT nEditPos = nAction; // we need this later to remove the merged undo actions
+ sal_uInt16 nEditPos = nAction; // we need this later to remove the merged undo actions
// make sure it is the only EditUndo action in the top undo list
while( pEditUndo && nAction )
{
- if( dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction]) )
+ if( dynamic_cast< EditUndo* >(pListAction->aUndoActions[--nAction].pAction) )
pEditUndo = 0;
}
@@ -1757,10 +1760,10 @@ void OutlineView::TryToMergeUndoActions()
{
// yes, see if we can merge it with the prev undo list
- nAction = pPrevListAction->aUndoActions.Count();
+ nAction = pPrevListAction->aUndoActions.size();
EditUndo* pPrevEditUndo = 0;
while( !pPrevEditUndo && nAction )
- pPrevEditUndo = dynamic_cast< EditUndo* >(pPrevListAction->aUndoActions[--nAction]);
+ pPrevEditUndo = dynamic_cast< EditUndo* >(pPrevListAction->aUndoActions[--nAction].pAction);
if( pPrevEditUndo && pPrevEditUndo->Merge( pEditUndo ) )
{
@@ -1768,22 +1771,23 @@ void OutlineView::TryToMergeUndoActions()
// the top EditUndo of the previous undo list
// first remove the merged undo action
- DBG_ASSERT( pListAction->aUndoActions[nEditPos] == pEditUndo, "sd::OutlineView::TryToMergeUndoActions(), wrong edit pos!" );
+ DBG_ASSERT( pListAction->aUndoActions[nEditPos].pAction == pEditUndo,
+ "sd::OutlineView::TryToMergeUndoActions(), wrong edit pos!" );
pListAction->aUndoActions.Remove(nEditPos);
delete pEditUndo;
// now check if we also can merge the draw undo actions
- SfxUndoManager* pDocUndoManager = mpDocSh->GetUndoManager();
- if( pDocUndoManager && ( pListAction->aUndoActions.Count() == 1 ))
+ ::svl::IUndoManager* pDocUndoManager = mpDocSh->GetUndoManager();
+ if( pDocUndoManager && ( pListAction->aUndoActions.size() == 1 ))
{
- SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions[0] );
+ SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions[0].pAction );
SfxLinkUndoAction* pPrevLinkAction = 0;
if( pLinkAction )
{
- nAction = pPrevListAction->aUndoActions.Count();
+ nAction = pPrevListAction->aUndoActions.size();
while( !pPrevLinkAction && nAction )
- pPrevLinkAction = dynamic_cast< SfxLinkUndoAction* >(pPrevListAction->aUndoActions[--nAction]);
+ pPrevLinkAction = dynamic_cast< SfxLinkUndoAction* >(pPrevListAction->aUndoActions[--nAction].pAction);
}
if( pLinkAction && pPrevLinkAction &&
@@ -1795,15 +1799,15 @@ void OutlineView::TryToMergeUndoActions()
if( pSourceList && pDestinationList )
{
- USHORT nCount = pSourceList->aUndoActions.Count();
- USHORT nDestAction = pDestinationList->aUndoActions.Count();
+ sal_uInt16 nCount = pSourceList->aUndoActions.size();
+ sal_uInt16 nDestAction = pDestinationList->aUndoActions.size();
while( nCount-- )
{
- const SfxUndoAction* pTemp = pSourceList->aUndoActions.GetObject(0);
+ SfxUndoAction* pTemp = pSourceList->aUndoActions[0].pAction;
pSourceList->aUndoActions.Remove(0);
pDestinationList->aUndoActions.Insert( pTemp, nDestAction++ );
}
- pDestinationList->nCurUndoAction = pDestinationList->aUndoActions.Count();
+ pDestinationList->nCurUndoAction = pDestinationList->aUndoActions.size();
pListAction->aUndoActions.Remove(0);
delete pLinkAction;
@@ -1813,21 +1817,21 @@ void OutlineView::TryToMergeUndoActions()
}
}
- if( pListAction->aUndoActions.Count() )
+ if ( !pListAction->aUndoActions.empty() )
{
// now we have to move all remaining doc undo actions from the top undo
// list to the previous undo list and remove the top undo list
- USHORT nCount = pListAction->aUndoActions.Count();
- USHORT nDestAction = pPrevListAction->aUndoActions.Count();
+ size_t nCount = pListAction->aUndoActions.size();
+ size_t nDestAction = pPrevListAction->aUndoActions.size();
while( nCount-- )
{
- const SfxUndoAction* pTemp = pListAction->aUndoActions.GetObject(0);
+ SfxUndoAction* pTemp = pListAction->aUndoActions[0].pAction;
pListAction->aUndoActions.Remove(0);
if( pTemp )
pPrevListAction->aUndoActions.Insert( pTemp, nDestAction++ );
}
- pPrevListAction->nCurUndoAction = pPrevListAction->aUndoActions.Count();
+ pPrevListAction->nCurUndoAction = pPrevListAction->aUndoActions.size();
}
rOutlineUndo.RemoveLastUndoAction();
@@ -1851,7 +1855,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
if( pPara && mpOutliner->HasParaFlag(pPara,PARAFLAG_ISPAGE) )
{
long nPage = 0; // todo, printing??
- for ( USHORT n = 0; n <= pInfo->mnPara; n++ )
+ for ( sal_uInt16 n = 0; n <= pInfo->mnPara; n++ )
{
Paragraph* p = mpOutliner->GetParagraph( n );
if ( mpOutliner->HasParaFlag(p,PARAFLAG_ISPAGE) )
@@ -1926,7 +1930,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
// --------------------------------------------------------------------
-void OutlineView::UpdateParagraph( USHORT nPara )
+void OutlineView::UpdateParagraph( sal_uInt16 nPara )
{
if( mpOutliner )
{
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index 2ee54375f9be..ebde93d01d9d 100644..100755
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -131,7 +131,7 @@ void PresentationViewShell::FinishInitialization( FrameView* pFrameView )
}
-SvxRuler* PresentationViewShell::CreateHRuler(::sd::Window*, BOOL)
+SvxRuler* PresentationViewShell::CreateHRuler(::sd::Window*, sal_Bool)
{
return NULL;
}
@@ -142,13 +142,13 @@ SvxRuler* PresentationViewShell::CreateVRuler(::sd::Window*)
}
-void PresentationViewShell::Activate( BOOL bIsMDIActivate )
+void PresentationViewShell::Activate( sal_Bool bIsMDIActivate )
{
DrawViewShell::Activate( bIsMDIActivate );
if( bIsMDIActivate )
{
- SfxBoolItem aItem( SID_NAVIGATOR_INIT, TRUE );
+ SfxBoolItem aItem( SID_NAVIGATOR_INIT, sal_True );
GetViewFrame()->GetDispatcher()->Execute( SID_NAVIGATOR_INIT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L );
diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx
index 1b63c322678f..fbf6fc2f3f07 100644..100755
--- a/sd/source/ui/view/sdruler.cxx
+++ b/sd/source/ui/view/sdruler.cxx
@@ -56,27 +56,27 @@ class RulerCtrlItem : public SfxControllerItem
Ruler &rRuler;
protected:
- virtual void StateChanged( USHORT nSId, SfxItemState eState,
+ virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
const SfxPoolItem* pItem );
public:
- RulerCtrlItem(USHORT nId, Ruler& rRlr, SfxBindings& rBind);
+ RulerCtrlItem(sal_uInt16 nId, Ruler& rRlr, SfxBindings& rBind);
};
-RulerCtrlItem::RulerCtrlItem(USHORT _nId, Ruler& rRlr, SfxBindings& rBind)
+RulerCtrlItem::RulerCtrlItem(sal_uInt16 _nId, Ruler& rRlr, SfxBindings& rBind)
: SfxControllerItem(_nId, rBind)
, rRuler(rRlr)
{
}
-void RulerCtrlItem::StateChanged( USHORT nSId, SfxItemState, const SfxPoolItem* pState )
+void RulerCtrlItem::StateChanged( sal_uInt16 nSId, SfxItemState, const SfxPoolItem* pState )
{
switch( nSId )
{
case SID_RULER_NULL_OFFSET:
{
const SfxPointItem* pItem = dynamic_cast< const SfxPointItem* >(pState);
- DBG_ASSERT(pState ? pItem != NULL : TRUE, "SfxPointItem erwartet");
+ DBG_ASSERT(pState ? pItem != NULL : sal_True, "SfxPointItem erwartet");
if ( pItem )
rRuler.SetNullOffset(pItem->GetValue());
}
@@ -91,7 +91,7 @@ void RulerCtrlItem::StateChanged( USHORT nSId, SfxItemState, const SfxPoolItem*
|*
\************************************************************************/
-Ruler::Ruler( DrawViewShell& rViewSh, ::Window* pParent, ::sd::Window* pWin, USHORT nRulerFlags, SfxBindings& rBindings, WinBits nWinStyle)
+Ruler::Ruler( DrawViewShell& rViewSh, ::Window* pParent, ::sd::Window* pWin, sal_uInt16 nRulerFlags, SfxBindings& rBindings, WinBits nWinStyle)
: SvxRuler(pParent, pWin, nRulerFlags, rBindings, nWinStyle)
, pSdWin(pWin)
, pDrViewShell(&rViewSh)
@@ -102,12 +102,12 @@ Ruler::Ruler( DrawViewShell& rViewSh, ::Window* pParent, ::sd::Window* pWin, USH
if ( nWinStyle & WB_HSCROLL )
{
- bHorz = TRUE;
+ bHorz = sal_True;
SetHelpId( HID_SD_RULER_HORIZONTAL );
}
else
{
- bHorz = FALSE;
+ bHorz = sal_False;
SetHelpId( HID_SD_RULER_VERTICAL );
}
}
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index fe22a81b38f1..bfd4e48564af 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -129,7 +129,7 @@ View::View(SdDrawDocument* pDrawDoc, OutputDevice* pOutDev,
mnAction(DND_ACTION_NONE),
mnLockRedrawSmph(0),
mpLockedRedraws(NULL),
- mbIsDropAllowed(TRUE),
+ mbIsDropAllowed(sal_True),
maSmartTags(*this),
mpClipboard (new ViewClipboard (*this))
{
@@ -139,13 +139,13 @@ View::View(SdDrawDocument* pDrawDoc, OutputDevice* pOutDev,
// #i74769#, #i75172# Use default from the configuration
SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress());
- EnableExtendedKeyInputDispatcher(FALSE);
- EnableExtendedMouseEventDispatcher(FALSE);
- EnableExtendedCommandEventDispatcher(FALSE);
+ EnableExtendedKeyInputDispatcher(sal_False);
+ EnableExtendedMouseEventDispatcher(sal_False);
+ EnableExtendedCommandEventDispatcher(sal_False);
- SetUseIncompatiblePathCreateInterface(FALSE);
- SetMarkHdlWhenTextEdit(TRUE);
- EnableTextEditOnObjectsWithoutTextIfTextTool(TRUE);
+ SetUseIncompatiblePathCreateInterface(sal_False);
+ SetMarkHdlWhenTextEdit(sal_True);
+ EnableTextEditOnObjectsWithoutTextIfTextTool(sal_True);
SetMinMoveDistancePixel(2);
SetHitTolerancePixel(2);
@@ -178,7 +178,7 @@ View::~View()
maSmartTags.Dispose();
// release content of selection clipboard, if we own the content
- UpdateSelectionClipboard( TRUE );
+ UpdateSelectionClipboard( sal_True );
maDropErrorTimer.Stop();
maDropInsertFileTimer.Stop();
@@ -575,9 +575,9 @@ void View::MarkListHasChanged()
|*
\************************************************************************/
-BOOL View::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
+sal_Bool View::SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll)
{
- BOOL bOk = FmFormView::SetAttributes(rSet, bReplaceAll);
+ sal_Bool bOk = FmFormView::SetAttributes(rSet, bReplaceAll);
return (bOk);
}
@@ -588,7 +588,7 @@ BOOL View::SetAttributes(const SfxItemSet& rSet, BOOL bReplaceAll)
|*
\************************************************************************/
-BOOL View::GetAttributes( SfxItemSet& rTargetSet, BOOL bOnlyHardAttr ) const
+sal_Bool View::GetAttributes( SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr ) const
{
return( FmFormView::GetAttributes( rTargetSet, bOnlyHardAttr ) );
}
@@ -600,7 +600,7 @@ BOOL View::GetAttributes( SfxItemSet& rTargetSet, BOOL bOnlyHardAttr ) const
|*
\************************************************************************/
-BOOL View::IsPresObjSelected(BOOL bOnPage, BOOL bOnMasterPage, BOOL bCheckPresObjListOnly, BOOL bCheckLayoutOnly) const
+sal_Bool View::IsPresObjSelected(sal_Bool bOnPage, sal_Bool bOnMasterPage, sal_Bool bCheckPresObjListOnly, sal_Bool bCheckLayoutOnly) const
{
/**************************************************************************
* Ist ein Presentationsobjekt selektiert?
@@ -625,8 +625,8 @@ BOOL View::IsPresObjSelected(BOOL bOnPage, BOOL bOnMasterPage, BOOL bCheckPresOb
SdPage* pPage;
SdrObject* pObj;
- BOOL bSelected = FALSE;
- BOOL bMasterPage = FALSE;
+ sal_Bool bSelected = sal_False;
+ sal_Bool bMasterPage = sal_False;
long nMark;
long nMarkMax = long(pMarkList->GetMarkCount()) - 1;
@@ -650,11 +650,11 @@ BOOL View::IsPresObjSelected(BOOL bOnPage, BOOL bOnMasterPage, BOOL bCheckPresOb
PresObjKind eKind = pPage->GetPresObjKind(pObj);
if((eKind != PRESOBJ_FOOTER) && (eKind != PRESOBJ_HEADER) && (eKind != PRESOBJ_DATETIME) && (eKind != PRESOBJ_SLIDENUMBER) )
- bSelected = TRUE;
+ bSelected = sal_True;
}
else
{
- bSelected = TRUE;
+ bSelected = sal_True;
}
}
}
@@ -681,7 +681,7 @@ void View::SelectAll()
{
OutlinerView* pOLV = GetTextEditOutlinerView();
const ::Outliner* pOutliner = GetTextEditOutliner();
- pOLV->SelectRange( 0, (USHORT) pOutliner->GetParagraphCount() );
+ pOLV->SelectRange( 0, (sal_uInt16) pOutliner->GetParagraphCount() );
}
else
{
@@ -708,7 +708,7 @@ void View::ModelHasChanged()
|*
\************************************************************************/
-BOOL View::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
+sal_Bool View::SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr)
{
// weiter an SdrView
return FmFormView::SetStyleSheet(pStyleSheet, bDontRemoveHardAttr);
@@ -721,9 +721,9 @@ BOOL View::SetStyleSheet(SfxStyleSheet* pStyleSheet, BOOL bDontRemoveHardAttr)
|*
\************************************************************************/
-static void SetSpellOptions( SdDrawDocument* pDoc, ULONG& rCntrl )
+static void SetSpellOptions( SdDrawDocument* pDoc, sal_uLong& rCntrl )
{
- BOOL bOnlineSpell = pDoc->GetOnlineSpell();
+ sal_Bool bOnlineSpell = pDoc->GetOnlineSpell();
if( bOnlineSpell )
rCntrl |= EE_CNTRL_ONLINESPELLING;
@@ -748,7 +748,7 @@ sal_Bool View::SdrBeginTextEdit(
{
pOutl->SetStyleSheetPool((SfxStyleSheetPool*) mpDoc->GetStyleSheetPool());
pOutl->SetCalcFieldValueHdl(LINK(SD_MOD(), SdModule, CalcFieldValueHdl));
- ULONG nCntrl = pOutl->GetControlWord();
+ sal_uLong nCntrl = pOutl->GetControlWord();
nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
nCntrl |= EE_CNTRL_URLSFXEXECUTE;
nCntrl |= EE_CNTRL_MARKFIELDS;
@@ -804,11 +804,11 @@ sal_Bool View::SdrBeginTextEdit(
}
/** ends current text editing */
-SdrEndTextEditKind View::SdrEndTextEdit(BOOL bDontDeleteReally )
+SdrEndTextEditKind View::SdrEndTextEdit(sal_Bool bDontDeleteReally )
{
SdrObjectWeakRef xObj( GetTextEditObject() );
- BOOL bDefaultTextRestored = RestoreDefaultText( dynamic_cast< SdrTextObj* >( GetTextEditObject() ) );
+ sal_Bool bDefaultTextRestored = RestoreDefaultText( dynamic_cast< SdrTextObj* >( GetTextEditObject() ) );
SdrEndTextEditKind eKind = FmFormView::SdrEndTextEdit(bDontDeleteReally);
@@ -816,7 +816,7 @@ SdrEndTextEditKind View::SdrEndTextEdit(BOOL bDontDeleteReally )
{
if( xObj.is() && !xObj->IsEmptyPresObj() )
{
- xObj->SetEmptyPresObj( TRUE );
+ xObj->SetEmptyPresObj( sal_True );
}
else
{
@@ -830,7 +830,7 @@ SdrEndTextEditKind View::SdrEndTextEdit(BOOL bDontDeleteReally )
{
SdrPage* pPage = pObj->GetPage();
if( !pPage || !pPage->IsMasterPage() )
- pObj->SetEmptyPresObj( FALSE );
+ pObj->SetEmptyPresObj( sal_False );
}
}
@@ -887,8 +887,8 @@ bool View::RestoreDefaultText( SdrTextObj* pTextObj )
void View::SetMarkedOriginalSize()
{
SdrUndoGroup* pUndoGroup = new SdrUndoGroup(*mpDoc);
- ULONG nCount = GetMarkedObjectCount();
- BOOL bOK = FALSE;
+ sal_uLong nCount = GetMarkedObjectCount();
+ sal_Bool bOK = sal_False;
for( sal_uInt32 i = 0; i < nCount; i++ )
{
@@ -910,7 +910,7 @@ void View::SetMarkedOriginalSize()
{
MapMode aMap100( MAP_100TH_MM );
aOleSize = ((SdrOle2Obj*)pObj)->GetOrigObjSize( &aMap100 );
- bOK = TRUE;
+ bOK = sal_True;
}
else
{
@@ -919,7 +919,7 @@ void View::SetMarkedOriginalSize()
{
awt::Size aSz = xObj->getVisualAreaSize( nAspect );
aOleSize = OutputDevice::LogicToLogic( Size( aSz.Width, aSz.Height ), aUnit, MAP_100TH_MM );
- bOK = TRUE;
+ bOK = sal_True;
}
catch( embed::NoVisualAreaSizeException& )
{}
@@ -954,7 +954,7 @@ void View::SetMarkedOriginalSize()
aRect.SetSize( aSize );
pObj->SetLogicRect( aRect );
- bOK = TRUE;
+ bOK = sal_True;
}
}
}
@@ -1011,17 +1011,17 @@ void View::DoConnect(SdrOle2Obj* pObj)
}
}
-BOOL View::IsMorphingAllowed() const
+sal_Bool View::IsMorphingAllowed() const
{
const SdrMarkList& rMarkList = GetMarkedObjectList();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( rMarkList.GetMarkCount() == 2 )
{
const SdrObject* pObj1 = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
const SdrObject* pObj2 = rMarkList.GetMark( 1 )->GetMarkedSdrObj();
- const UINT16 nKind1 = pObj1->GetObjIdentifier();
- const UINT16 nKind2 = pObj2->GetObjIdentifier();
+ const sal_uInt16 nKind1 = pObj1->GetObjIdentifier();
+ const sal_uInt16 nKind2 = pObj2->GetObjIdentifier();
if ( ( nKind1 != OBJ_TEXT && nKind2 != OBJ_TEXT ) &&
( nKind1 != OBJ_TITLETEXT && nKind2 != OBJ_TITLETEXT ) &&
@@ -1050,24 +1050,24 @@ BOOL View::IsMorphingAllowed() const
if( ( eFillStyle1 == XFILL_NONE || eFillStyle1 == XFILL_SOLID ) &&
( eFillStyle2 == XFILL_NONE || eFillStyle2 == XFILL_SOLID ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL View::IsVectorizeAllowed() const
+sal_Bool View::IsVectorizeAllowed() const
{
const SdrMarkList& rMarkList = GetMarkedObjectList();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rMarkList.GetMarkCount() == 1 )
{
const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -1082,7 +1082,7 @@ void View::onAccessibilityOptionsChanged()
{
const StyleSettings& rStyleSettings = pWindow->GetSettings().GetStyleSettings();
- USHORT nOutputSlot, nPreviewSlot;
+ sal_uInt16 nOutputSlot, nPreviewSlot;
SvtAccessibilityOptions& aAccOptions = getAccessibilityOptions();
@@ -1154,7 +1154,7 @@ bool View::isRecordingUndo() const
if( mpDoc && mpDoc->IsUndoEnabled() )
{
sd::UndoManager* pUndoManager = mpDoc ? mpDoc->GetUndoManager() : 0;
- return pUndoManager && pUndoManager->isInListAction();
+ return pUndoManager && pUndoManager->IsInListAction();
}
else
{
@@ -1181,7 +1181,7 @@ SdrViewContext View::GetContext() const
return FmFormView::GetContext();
}
-BOOL View::HasMarkablePoints() const
+sal_Bool View::HasMarkablePoints() const
{
if( maSmartTags.HasMarkablePoints() )
return true;
@@ -1189,14 +1189,14 @@ BOOL View::HasMarkablePoints() const
return FmFormView::HasMarkablePoints();
}
-ULONG View::GetMarkablePointCount() const
+sal_uLong View::GetMarkablePointCount() const
{
- ULONG nCount = FmFormView::GetMarkablePointCount();
+ sal_uLong nCount = FmFormView::GetMarkablePointCount();
nCount += maSmartTags.GetMarkablePointCount();
return nCount;
}
-BOOL View::HasMarkedPoints() const
+sal_Bool View::HasMarkedPoints() const
{
if( maSmartTags.HasMarkedPoints() )
return true;
@@ -1204,14 +1204,14 @@ BOOL View::HasMarkedPoints() const
return FmFormView::HasMarkedPoints();
}
-ULONG View::GetMarkedPointCount() const
+sal_uLong View::GetMarkedPointCount() const
{
- ULONG nCount = FmFormView::GetMarkedPointCount();
+ sal_uLong nCount = FmFormView::GetMarkedPointCount();
nCount += maSmartTags.GetMarkedPointCount();
return nCount;
}
-BOOL View::IsPointMarkable(const SdrHdl& rHdl) const
+sal_Bool View::IsPointMarkable(const SdrHdl& rHdl) const
{
if( maSmartTags.IsPointMarkable( rHdl ) )
return true;
@@ -1219,7 +1219,7 @@ BOOL View::IsPointMarkable(const SdrHdl& rHdl) const
return FmFormView::IsPointMarkable( rHdl );
}
-BOOL View::MarkPoint(SdrHdl& rHdl, BOOL bUnmark )
+sal_Bool View::MarkPoint(SdrHdl& rHdl, sal_Bool bUnmark )
{
if( maSmartTags.MarkPoint( rHdl, bUnmark ) )
return true;
@@ -1227,7 +1227,7 @@ BOOL View::MarkPoint(SdrHdl& rHdl, BOOL bUnmark )
return FmFormView::MarkPoint( rHdl, bUnmark );
}
-BOOL View::MarkPoints(const Rectangle* pRect, BOOL bUnmark)
+sal_Bool View::MarkPoints(const Rectangle* pRect, sal_Bool bUnmark)
{
if( maSmartTags.MarkPoints( pRect, bUnmark ) )
return true;
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index dbace8e2b261..68e9a1f6f297 100644..100755
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -103,15 +103,15 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
{
DropTargetHelper& mrTargetHelper;
::sd::Window* mpTargetWindow;
- USHORT mnPage;
- USHORT mnLayer;
+ sal_uInt16 mnPage;
+ sal_uInt16 mnLayer;
SdNavigatorDropEvent (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer )
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer )
: ExecuteDropEvent( rEvt ),
mrTargetHelper( rTargetHelper ),
mpTargetWindow( pTargetWindow ),
@@ -126,7 +126,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
{
// since SdTransferable::CopyToClipboard is called, this
// dynamically created object ist destroyed automatically
- SdTransferable* pTransferable = new SdTransferable( mpDoc, NULL, FALSE );
+ SdTransferable* pTransferable = new SdTransferable( mpDoc, NULL, sal_False );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRet( pTransferable );
SD_MOD()->pTransferClip = pTransferable;
@@ -188,7 +188,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > View::CreateDragDataObject( View* pWorkView, ::Window& rWindow, const Point& rDragPos )
{
- SdTransferable* pTransferable = new SdTransferable( mpDoc, pWorkView, FALSE );
+ SdTransferable* pTransferable = new SdTransferable( mpDoc, pWorkView, sal_False );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRet( pTransferable );
SD_MOD()->pTransferDrag = pTransferable;
@@ -226,7 +226,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
aObjDesc.maSize = GetAllMarkedRect().GetSize();
aObjDesc.maDragStartPos = rDragPos;
aObjDesc.maDisplayName = aDisplayName;
- aObjDesc.mbCanLink = FALSE;
+ aObjDesc.mbCanLink = sal_False;
pTransferable->SetStartPos( rDragPos );
pTransferable->SetObjectDescriptor( aObjDesc );
@@ -239,7 +239,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > View::CreateSelectionDataObject( View* pWorkView, ::Window& rWindow )
{
- SdTransferable* pTransferable = new SdTransferable( mpDoc, pWorkView, TRUE );
+ SdTransferable* pTransferable = new SdTransferable( mpDoc, pWorkView, sal_True );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRet( pTransferable );
TransferableObjectDescriptor aObjDesc;
const Rectangle aMarkRect( GetAllMarkedRect() );
@@ -264,7 +264,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
// -----------------------------------------------------------------------------
-void View::UpdateSelectionClipboard( BOOL bForceDeselect )
+void View::UpdateSelectionClipboard( sal_Bool bForceDeselect )
{
if( mpViewSh && mpViewSh->GetActiveWindow() )
{
@@ -337,18 +337,18 @@ void View::DoPaste (::Window* pWindow)
// remove all hard linebreaks from the title
if( pOutliner && pOutliner->GetParagraphCount() > 1 )
{
- BOOL bOldUpdateMode = pOutliner->GetUpdateMode();
+ sal_Bool bOldUpdateMode = pOutliner->GetUpdateMode();
- pOutliner->SetUpdateMode( FALSE );
+ pOutliner->SetUpdateMode( sal_False );
const EditEngine& rEdit = pOutliner->GetEditEngine();
const int nParaCount = rEdit.GetParagraphCount();
for( int nPara = nParaCount - 2; nPara >= 0; nPara-- )
{
- const USHORT nParaLen = (USHORT)rEdit.GetTextLen( (USHORT)nPara );
- pOutliner->QuickDelete( ESelection( (USHORT)nPara, nParaLen, (USHORT)nPara+1, 0 ) );
- pOutliner->QuickInsertLineBreak( ESelection( (USHORT)nPara, nParaLen, (USHORT)nPara, nParaLen ) );
+ const sal_uInt16 nParaLen = (sal_uInt16)rEdit.GetTextLen( (sal_uInt16)nPara );
+ pOutliner->QuickDelete( ESelection( (sal_uInt16)nPara, nParaLen, (sal_uInt16)nPara+1, 0 ) );
+ pOutliner->QuickInsertLineBreak( ESelection( (sal_uInt16)nPara, nParaLen, (sal_uInt16)nPara, nParaLen ) );
}
DBG_ASSERT( rEdit.GetParagraphCount() <= 1, "Titelobjekt contains hard line breaks" );
@@ -359,7 +359,7 @@ void View::DoPaste (::Window* pWindow)
if( !mpDoc->IsChanged() )
{
if( pOutliner && pOutliner->IsModified() )
- mpDoc->SetChanged( TRUE );
+ mpDoc->SetChanged( sal_True );
}
}
}
@@ -375,7 +375,7 @@ void View::DoPaste (::Window* pWindow)
if (pDrViewSh != NULL)
{
- if( !InsertData( aDataHelper, aPos, nDnDAction, FALSE ) )
+ if( !InsertData( aDataHelper, aPos, nDnDAction, sal_False ) )
{
INetBookmark aINetBookmark( aEmptyStr, aEmptyStr );
@@ -449,7 +449,7 @@ void View::DragFinished( sal_Int8 nDropAction )
if( bUndo )
BegUndo();
- ULONG nm, nAnz = mpDragSrcMarkList->GetMarkCount();
+ sal_uLong nm, nAnz = mpDragSrcMarkList->GetMarkCount();
for( nm = nAnz; nm>0; )
{
@@ -466,7 +466,7 @@ void View::DragFinished( sal_Int8 nDropAction )
nm--;
SdrMark* pM=mpDragSrcMarkList->GetMark(nm);
SdrObject* pObj=pM->GetMarkedSdrObj();
- UINT32 nOrdNum=pObj->GetOrdNumDirect();
+ sal_uInt32 nOrdNum=pObj->GetOrdNumDirect();
if( pObj && pObj->GetPage() )
{
@@ -483,7 +483,7 @@ void View::DragFinished( sal_Int8 nDropAction )
}
if( pDragTransferable )
- pDragTransferable->SetInternalMove( FALSE );
+ pDragTransferable->SetInternalMove( sal_False );
if( bUndo )
EndUndo();
@@ -495,7 +495,7 @@ void View::DragFinished( sal_Int8 nDropAction )
// -----------------------------------------------------------------------------
sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
- ::sd::Window*, USHORT, USHORT nLayer )
+ ::sd::Window*, sal_uInt16, sal_uInt16 nLayer )
{
String aLayerName( GetActiveLayer() );
SdrPageView* pPV = GetSdrPageView();
@@ -511,7 +511,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if( mbIsDropAllowed && !pPV->IsLayerLocked( aLayerName ) && pPV->IsLayerVisible( aLayerName ) )
{
const OutlinerView* pOLV = GetTextEditOutlinerView();
- BOOL bIsInsideOutlinerView = FALSE;
+ sal_Bool bIsInsideOutlinerView = sal_False;
if( pOLV )
{
@@ -526,7 +526,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if( aRect.IsInside( pOLV->GetWindow()->PixelToLogic( rEvt.maPosPixel ) ) )
{
- bIsInsideOutlinerView = TRUE;
+ bIsInsideOutlinerView = sal_True;
}
}
@@ -553,12 +553,12 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
}
else
{
- const BOOL bDrawing = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING );
- const BOOL bGraphic = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB );
- const BOOL bMtf = rTargetHelper.IsDropFormatSupported( FORMAT_GDIMETAFILE );
- const BOOL bBitmap = rTargetHelper.IsDropFormatSupported( FORMAT_BITMAP );
- BOOL bBookmark = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
- BOOL bXFillExchange = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_XFA );
+ const sal_Bool bDrawing = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_DRAWING );
+ const sal_Bool bGraphic = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVXB );
+ const sal_Bool bMtf = rTargetHelper.IsDropFormatSupported( FORMAT_GDIMETAFILE );
+ const sal_Bool bBitmap = rTargetHelper.IsDropFormatSupported( FORMAT_BITMAP );
+ sal_Bool bBookmark = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
+ sal_Bool bXFillExchange = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_XFA );
// check handle insert
if( !nRet && ( (bXFillExchange && ( SDRDRAG_GRADIENT == GetDragMode() )) || ( SDRDRAG_TRANSPARENCE == GetDragMode() ) ) )
@@ -591,8 +591,8 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
SdrPageView* pPageView = NULL;
::sd::Window* pWindow = mpViewSh->GetActiveWindow();
Point aPos( pWindow->PixelToLogic( rEvt.maPosPixel ) );
- const BOOL bHasPickObj = PickObj( aPos, getHitTolLog(), pPickObj, pPageView );
- BOOL bIsPresTarget = FALSE;
+ const sal_Bool bHasPickObj = PickObj( aPos, getHitTolLog(), pPickObj, pPageView );
+ sal_Bool bIsPresTarget = sal_False;
if( bHasPickObj && pPickObj && ( pPickObj->IsEmptyPresObj() || pPickObj->GetUserCall() ) )
{
@@ -619,18 +619,18 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
nRet = nDropAction;
}
else
- bXFillExchange = FALSE;
+ bXFillExchange = sal_False;
}
// check normal insert
if( !nRet )
{
- const BOOL bSBAFormat = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH );
- const BOOL bEditEngine = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_EDITENGINE );
- const BOOL bString = rTargetHelper.IsDropFormatSupported( FORMAT_STRING );
- const BOOL bRTF = rTargetHelper.IsDropFormatSupported( FORMAT_RTF );
- const BOOL bFile = rTargetHelper.IsDropFormatSupported( FORMAT_FILE );
- const BOOL bFileList = rTargetHelper.IsDropFormatSupported( FORMAT_FILE_LIST );
+ const sal_Bool bSBAFormat = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH );
+ const sal_Bool bEditEngine = rTargetHelper.IsDropFormatSupported( SOT_FORMATSTR_ID_EDITENGINE );
+ const sal_Bool bString = rTargetHelper.IsDropFormatSupported( FORMAT_STRING );
+ const sal_Bool bRTF = rTargetHelper.IsDropFormatSupported( FORMAT_RTF );
+ const sal_Bool bFile = rTargetHelper.IsDropFormatSupported( FORMAT_FILE );
+ const sal_Bool bFileList = rTargetHelper.IsDropFormatSupported( FORMAT_FILE_LIST );
if( mpDropMarker )
{
@@ -639,7 +639,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
}
if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh && SlideShow::IsRunning(mpViewSh->GetViewShellBase()) )
- bBookmark = FALSE;
+ bBookmark = sal_False;
if( bDrawing || bGraphic || bMtf || bBitmap || bBookmark || bFile || bFileList || bXFillExchange || bSBAFormat || bEditEngine || bString || bRTF )
nRet = nDropAction;
@@ -670,7 +670,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
// -----------------------------------------------------------------------------
sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow, USHORT nPage, USHORT nLayer )
+ ::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer )
{
SdrPageView* pPV = GetSdrPageView();
String aActiveLayer = GetActiveLayer();
@@ -687,7 +687,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
if( !pPV->IsLayerLocked( aActiveLayer ) )
{
const OutlinerView* pOLV = GetTextEditOutlinerView();
- BOOL bIsInsideOutlinerView = FALSE;
+ sal_Bool bIsInsideOutlinerView = sal_False;
if( pOLV )
{
@@ -704,7 +704,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
if( aRect.IsInside( aPos ) )
{
- bIsInsideOutlinerView = TRUE;
+ bIsInsideOutlinerView = sal_True;
}
}
@@ -737,7 +737,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
*xStm >> aFillData;
const Color aColor( ( (XFillColorItem&) aFillData.GetXFillAttrSetItem()->GetItemSet().Get( XATTR_FILLCOLOR ) ).GetColorValue() );
- static_cast< SdrHdlColor* >( pIAOHandle )->SetColor( aColor, TRUE );
+ static_cast< SdrHdlColor* >( pIAOHandle )->SetColor( aColor, sal_True );
nRet = nDropAction;
}
}
@@ -746,7 +746,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
}
// standard insert?
- if( !nRet && InsertData( aDataHelper, aPos, nDropAction, TRUE, 0, nPage, nLayer ) )
+ if( !nRet && InsertData( aDataHelper, aPos, nDropAction, sal_True, 0, nPage, nLayer ) )
nRet = nDropAction;
// special insert?
@@ -781,7 +781,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
// insert as clip action => jump
rtl::OUString aBookmark( aINetBookmark.GetURL() );
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo( pPickObj );
- BOOL bCreated = FALSE;
+ sal_Bool bCreated = sal_False;
if( aBookmark.getLength() )
{
@@ -803,7 +803,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
if( !pInfo )
{
pInfo = SdDrawDocument::GetShapeUserData( *pPickObj, true );
- bCreated = TRUE;
+ bCreated = sal_True;
}
// Undo-Action mit alten und neuen Groessen erzeugen
@@ -866,7 +866,7 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv
List aBookmarkList;
String aBookmark;
SdPage* pPage = (SdPage*) GetSdrPageView()->GetPage();
- USHORT nPgPos = 0xFFFF;
+ sal_uInt16 nPgPos = 0xFFFF;
if( pSdNavigatorDropEvent->mpTargetWindow )
aPos = pSdNavigatorDropEvent->mpTargetWindow->PixelToLogic( pSdNavigatorDropEvent->maPosPixel );
@@ -887,11 +887,11 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv
// Um zu gewaehrleisten, dass alle Seitennamen eindeutig sind, werden
// die einzufuegenden geprueft und gegebenenfalls in einer Ersatzliste
- // aufgenommen (bNameOK == FALSE -> Benutzer hat abgebrochen)
+ // aufgenommen (bNameOK == sal_False -> Benutzer hat abgebrochen)
List* pExchangeList = NULL;
- BOOL bLink = ( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() ? TRUE : FALSE );
- BOOL bNameOK = GetExchangeList( pExchangeList, &aBookmarkList, 2 );
- BOOL bReplace = FALSE;
+ sal_Bool bLink = ( NAVIGATOR_DRAGTYPE_LINK == pPageObjsTransferable->GetDragType() ? sal_True : sal_False );
+ sal_Bool bNameOK = GetExchangeList( pExchangeList, &aBookmarkList, 2 );
+ sal_Bool bReplace = sal_False;
// Da man hier nicht weiss, ob es sich um eine Seite oder ein Objekt handelt,
// wird eine Liste sowohl mit Seiten, als auch mit Objekten gefuellt.
@@ -899,9 +899,9 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv
if( bNameOK )
{
mpDoc->InsertBookmark( &aBookmarkList, pExchangeList,
- bLink, bReplace, nPgPos, FALSE,
+ bLink, bReplace, nPgPos, sal_False,
&pPageObjsTransferable->GetDocShell(),
- TRUE, &aPos );
+ sal_True, &aPos );
}
// Delete the ExchangeList
@@ -923,19 +923,19 @@ IMPL_LINK( View, ExecuteNavigatorDrop, SdNavigatorDropEvent*, pSdNavigatorDropEv
|*
|* Rueckgabeparameter:
|* pExchangeList == NULL -> Namen sind alle eindeutig
-|* bNameOK == FALSE -> Benutzer hat abgebrochen
+|* bNameOK == sal_False -> Benutzer hat abgebrochen
|* nType == 0 -> Seiten
|* nType == 1 -> Objekte
|* nType == 2 -> Seiten + Objekte
|*
\************************************************************************/
-BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT nType )
+sal_Bool View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, sal_uInt16 nType )
{
DBG_ASSERT( !rpExchangeList, "ExchangeList muss NULL sein!");
- BOOL bListIdentical = TRUE; // BookmarkList und ExchangeList sind gleich
- BOOL bNameOK = TRUE; // Name ist eindeutig
+ sal_Bool bListIdentical = sal_True; // BookmarkList und ExchangeList sind gleich
+ sal_Bool bNameOK = sal_True; // Name ist eindeutig
rpExchangeList = new List();
@@ -963,7 +963,7 @@ BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT n
{
pDlg->SetEditHelpId( HID_SD_NAMEDIALOG_OBJECT );
- bNameOK = FALSE;
+ bNameOK = sal_False;
pDlg->SetText( aTitle );
while( !bNameOK && pDlg->Execute() == RET_OK )
@@ -971,7 +971,7 @@ BOOL View::GetExchangeList( List*& rpExchangeList, List* pBookmarkList, USHORT n
pDlg->GetName( *pNewName );
if( !mpDoc->GetObj( *pNewName ) )
- bNameOK = TRUE;
+ bNameOK = sal_True;
}
delete pDlg;
@@ -1028,7 +1028,7 @@ SdrModel* View::GetMarkedObjModel() const
return FmFormView::GetMarkedObjModel();;
}
-BOOL View::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst /* =NULL */, UINT32 nOptions /* =0 */)
+sal_Bool View::Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst /* =NULL */, sal_uInt32 nOptions /* =0 */)
{
return FmFormView::Paste( rMod, rPos, pLst,nOptions );;
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index c9e2fc8904f8..5b74b8e1494d 100644..100755
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -266,22 +266,22 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo
return true;
}
-BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
- const Point& rPos, sal_Int8& rDnDAction, BOOL bDrag,
- ULONG nFormat, USHORT nPage, USHORT nLayer )
+sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
+ const Point& rPos, sal_Int8& rDnDAction, sal_Bool bDrag,
+ sal_uLong nFormat, sal_uInt16 nPage, sal_uInt16 nLayer )
{
maDropPos = rPos;
mnAction = rDnDAction;
- mbIsDropAllowed = FALSE;
+ mbIsDropAllowed = sal_False;
TransferableDataHelper aDataHelper( rDataHelper );
SdrObject* pPickObj = NULL;
SdPage* pPage = NULL;
ImageMap* pImageMap = NULL;
- BOOL bReturn = FALSE;
- BOOL bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
- BOOL bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
- ULONG nPasteOptions = SDRINSERT_SETDEFLAYER;
+ sal_Bool bReturn = sal_False;
+ sal_Bool bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
+ sal_Bool bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
+ sal_uLong nPasteOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh != NULL)
{
@@ -380,10 +380,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( !pPV->IsLayerLocked( aLayer ) )
{
- pOwnData->SetInternalMove( TRUE );
+ pOwnData->SetInternalMove( sal_True );
SortMarkedObjects();
- for( ULONG nM = 0; nM < GetMarkedObjectCount(); nM++ )
+ for( sal_uLong nM = 0; nM < GetMarkedObjectCount(); nM++ )
{
SdrMark* pM = GetSdrMarkByIndex( nM );
SdrObject* pO = pM->GetMarkedSdrObj();
@@ -402,18 +402,18 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
}
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else
{
SdrPageView* pPV = GetSdrPageView();
- BOOL bDropOnTabBar = TRUE;
+ sal_Bool bDropOnTabBar = sal_True;
if( !pPage && pPV->GetPage()->GetPageNum() != mnDragSrcPgNum )
{
pPage = (SdPage*) pPV->GetPage();
- bDropOnTabBar = FALSE;
+ bDropOnTabBar = sal_False;
}
if( pPage )
@@ -505,7 +505,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
SdrEdgeObj* pCloneEdge = (SdrEdgeObj*)pRem->pClone;
// test first connection
- SdrObjConnection& rConn0 = pOrigEdge->GetConnection(FALSE);
+ SdrObjConnection& rConn0 = pOrigEdge->GetConnection(sal_False);
SdrObject* pConnObj = rConn0.GetObject();
if(pConnObj)
{
@@ -513,8 +513,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if(pConnClone)
{
// if dest obj was cloned, too, re-establish connection
- pCloneEdge->ConnectToNode(FALSE, pConnClone);
- pCloneEdge->GetConnection(FALSE).SetConnectorId(rConn0.GetConnectorId());
+ pCloneEdge->ConnectToNode(sal_False, pConnClone);
+ pCloneEdge->GetConnection(sal_False).SetConnectorId(rConn0.GetConnectorId());
}
else
{
@@ -530,14 +530,14 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
aPosition.X() += aVector.A();
aPosition.Y() += aVector.B();
- pCloneEdge->SetTailPoint(FALSE, aPosition);
+ pCloneEdge->SetTailPoint(sal_False, aPosition);
}
}
}
}
// test second connection
- SdrObjConnection& rConn1 = pOrigEdge->GetConnection(TRUE);
+ SdrObjConnection& rConn1 = pOrigEdge->GetConnection(sal_True);
pConnObj = rConn1.GetObject();
if(pConnObj)
{
@@ -545,8 +545,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if(pConnClone)
{
// if dest obj was cloned, too, re-establish connection
- pCloneEdge->ConnectToNode(TRUE, pConnClone);
- pCloneEdge->GetConnection(TRUE).SetConnectorId(rConn1.GetConnectorId());
+ pCloneEdge->ConnectToNode(sal_True, pConnClone);
+ pCloneEdge->GetConnection(sal_True).SetConnectorId(rConn1.GetConnectorId());
}
else
{
@@ -562,7 +562,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Point aPosition = rGluePoint.GetAbsolutePos(*pConnObj);
aPosition.X() += aVector.A();
aPosition.Y() += aVector.B();
- pCloneEdge->SetTailPoint(TRUE, aPosition);
+ pCloneEdge->SetTailPoint(sal_True, aPosition);
}
}
}
@@ -578,21 +578,21 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pMarkList != mpDragSrcMarkList )
delete pMarkList;
- bReturn = TRUE;
+ bReturn = sal_True;
}
else
{
maDropErrorTimer.Start();
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
}
else
{
- pOwnData->SetInternalMove( TRUE );
+ pOwnData->SetInternalMove( sal_True );
MoveAllMarked( Size( maDropPos.X() - pOwnData->GetStartPos().X(),
maDropPos.Y() - pOwnData->GetStartPos().Y() ), bCopy );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -612,13 +612,13 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
String aLayout( pPage->GetLayoutName() );
aLayout.Erase( aLayout.SearchAscii( SD_LT_SEPARATOR ) );
- pPage->SetPresentationLayout( aLayout, FALSE, FALSE );
+ pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
pSourceDoc->CreatingDataObj( NULL );
}
else
{
maDropErrorTimer.Start();
- bReturn = FALSE;
+ bReturn = sal_False;
}
}
}
@@ -638,10 +638,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// delete pages, that are not of any interest for us
for( long i = ( pWorkModel->GetPageCount() - 1 ); i >= 0; i-- )
{
- SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( (USHORT) i ) );
+ SdPage* pP = static_cast< SdPage* >( pWorkModel->GetPage( (sal_uInt16) i ) );
if( pP->GetPageKind() != PK_STANDARD )
- pWorkModel->DeletePage( (USHORT) i );
+ pWorkModel->DeletePage( (sal_uInt16) i );
}
bReturn = Paste( *pWorkModel, maDropPos, pPage, nPasteOptions );
@@ -651,7 +651,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
String aLayout(pPage->GetLayoutName());
aLayout.Erase(aLayout.SearchAscii(SD_LT_SEPARATOR));
- pPage->SetPresentationLayout( aLayout, FALSE, FALSE );
+ pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
}
}
else if( CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_DRAWING ) )
@@ -660,7 +660,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_DRAWING, xStm ) )
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
DrawDocShellRef xShell = new DrawDocShell(SFX_CREATE_MODE_INTERNAL);
xShell->DoInitNew(0);
@@ -729,7 +729,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
{
SdrObject::Free(pPickObj2 );
}
- bChanged = TRUE;
+ bChanged = sal_True;
mnAction = DND_ACTION_COPY;
}
else if( ( mnAction & DND_ACTION_LINK ) && pPickObj && pObj && !pPickObj->ISA( SdrGrafObj ) && !pPickObj->ISA( SdrOle2Obj ) )
@@ -763,13 +763,13 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aNewSet.Put( pObj->GetMergedItemSet() );
if( bUndo )
- AddUndo( new E3dAttributesUndoAction( *mpDoc, this, (E3dObject*) pPickObj, aNewSet, aOldSet, FALSE ) );
+ AddUndo( new E3dAttributesUndoAction( *mpDoc, this, (E3dObject*) pPickObj, aNewSet, aOldSet, sal_False ) );
pPickObj->SetMergedItemSetAndBroadcast( aNewSet );
}
if( bUndo )
EndUndo();
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
@@ -815,7 +815,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aRect.SetPos( maDropPos );
pObj->SetLogicRect( aRect );
InsertObjectAtView( pObj, *GetSdrPageView(), SDRINSERT_SETDEFLAYER );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -835,7 +835,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( mpDoc->GetDocSh() && ( mpDoc->GetDocSh()->GetClassName() == aObjDesc.maClassName ) )
{
uno::Reference < embed::XStorage > xStore( ::comphelper::OStorageHelper::GetStorageFromInputStream( xStm ) );
- ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, TRUE, mpDoc->GetDocumentType() ) );
+ ::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, sal_True, mpDoc->GetDocumentType() ) );
// mba: BaseURL doesn't make sense for clipboard functionality
SfxMedium *pMedium = new SfxMedium( xStore, String() );
@@ -858,10 +858,10 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// delete pages, that are not of any interest for us
for( long i = ( pModel->GetPageCount() - 1 ); i >= 0; i-- )
{
- SdPage* pP = static_cast< SdPage* >( pModel->GetPage( (USHORT) i ) );
+ SdPage* pP = static_cast< SdPage* >( pModel->GetPage( (sal_uInt16) i ) );
if( pP->GetPageKind() != PK_STANDARD )
- pModel->DeletePage( (USHORT) i );
+ pModel->DeletePage( (sal_uInt16) i );
}
bReturn = Paste( *pModel, maDropPos, pPage, nPasteOptions );
@@ -871,7 +871,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
String aLayout(pPage->GetLayoutName());
aLayout.Erase(aLayout.SearchAscii(SD_LT_SEPARATOR));
- pPage->SetPresentationLayout( aLayout, FALSE, FALSE );
+ pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
}
xDocShRef->DoClose();
@@ -888,7 +888,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -965,7 +965,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Rectangle aRect( maDropPos, aSize );
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect );
SdrPageView* pPV = GetSdrPageView();
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh!=NULL)
{
@@ -981,7 +981,28 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pImageMap )
pObj->InsertUserData( new SdIMapInfo( *pImageMap ) );
- bReturn = TRUE;
+ if ( pObj && pObj->IsChart() )
+ {
+ bool bDisableDataTableDialog = false;
+ svt::EmbeddedObjectRef::TryRunningState( xObj );
+ uno::Reference< beans::XPropertySet > xProps( xObj->getComponent(), uno::UNO_QUERY );
+ if ( xProps.is() &&
+ ( xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ) ) >>= bDisableDataTableDialog ) &&
+ bDisableDataTableDialog )
+ {
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableDataTableDialog" ) ),
+ uno::makeAny( sal_False ) );
+ xProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisableComplexChartTypes" ) ),
+ uno::makeAny( sal_False ) );
+ uno::Reference< util::XModifiable > xModifiable( xProps, uno::UNO_QUERY );
+ if ( xModifiable.is() )
+ {
+ xModifiable->setModified( sal_True );
+ }
+ }
+ }
+
+ bReturn = sal_True;
}
}
}
@@ -1038,7 +1059,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -1114,7 +1135,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Rectangle aRect( maDropPos, aSize );
SdrOle2Obj* pObj = new SdrOle2Obj( aObjRef, aName, aRect );
SdrPageView* pPV = GetSdrPageView();
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh!=NULL)
{
@@ -1132,7 +1153,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
// let the object stay in loaded state after insertion
pObj->Unload();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -1177,7 +1198,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
InsertGraphic( aGraphic, mnAction, aInsertPos, NULL, pImageMap );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else if( ( !bLink || pPickObj ) && CHECK_FORMAT_TRANS( FORMAT_GDIMETAFILE ) )
@@ -1201,7 +1222,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 );
}
- bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? TRUE : FALSE;
+ bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? sal_True : sal_False;
}
else if( ( !bLink || pPickObj ) && CHECK_FORMAT_TRANS( FORMAT_BITMAP ) )
{
@@ -1232,7 +1253,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
InsertGraphic( aBmp, mnAction, aInsertPos, NULL, pImageMap );
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
else if( pPickObj && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_XFA ) )
@@ -1262,9 +1283,9 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
Color aColor( rColItem.GetColorValue() );
String aName( rColItem.GetName() );
SfxItemSet aSet( mpDoc->GetPool() );
- BOOL bClosed = pPickObj->IsClosedObj();
+ sal_Bool bClosed = pPickObj->IsClosedObj();
::sd::Window* pWin = mpViewSh->GetActiveWindow();
- USHORT nHitLog = (USHORT) pWin->PixelToLogic(
+ sal_uInt16 nHitLog = (sal_uInt16) pWin->PixelToLogic(
Size(FuPoor::HITPIX, 0 ) ).Width();
const long n2HitLog = nHitLog << 1;
Point aHitPosR( rPos );
@@ -1327,8 +1348,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) )
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read( *xStm, String(), EE_FORMAT_BIN, FALSE, mpDocSh->GetHeaderAttributes() );
- bReturn = TRUE;
+ pOLV->Read( *xStm, String(), EE_FORMAT_BIN, sal_False, mpDocSh->GetHeaderAttributes() );
+ bReturn = sal_True;
}
}
@@ -1361,8 +1382,8 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) )
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read( *xStm, String(), EE_FORMAT_RTF, FALSE, mpDocSh->GetHeaderAttributes() );
- bReturn = TRUE;
+ pOLV->Read( *xStm, String(), EE_FORMAT_RTF, sal_False, mpDocSh->GetHeaderAttributes() );
+ bReturn = sal_True;
}
}
@@ -1380,13 +1401,13 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
{
maDropFileVector.clear();
- for( ULONG i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = aDropFileList.Count(); i < nCount; i++ )
maDropFileVector.push_back( aDropFileList.GetFile( i ) );
maDropInsertFileTimer.Start();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if( CHECK_FORMAT_TRANS( FORMAT_FILE ) )
{
@@ -1399,7 +1420,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
maDropInsertFileTimer.Start();
}
- bReturn = TRUE;
+ bReturn = sal_True;
}
else if( !bLink && CHECK_FORMAT_TRANS( FORMAT_STRING ) )
{
@@ -1417,7 +1438,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( pOLV )
{
pOLV->InsertText( aOUString );
- bReturn = TRUE;
+ bReturn = sal_True;
}
if( !bReturn )
@@ -1427,7 +1448,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
}
MarkListHasChanged();
- mbIsDropAllowed = TRUE;
+ mbIsDropAllowed = sal_True;
rDnDAction = mnAction;
delete pImageMap;
@@ -1436,7 +1457,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
extern void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel );
-bool View::PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, ULONG nPasteOptions )
+bool View::PasteRTFTable( SotStorageStreamRef xStm, SdrPage* pPage, sal_uLong nPasteOptions )
{
SdDrawDocument* pModel = new SdDrawDocument( DOCUMENT_TYPE_IMPRESS, mpDocSh );
pModel->NewOrLoadCompleted(NEW_DOC);
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 055d2366e947..ccabe02c086b 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -133,15 +133,15 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
else
{
pNewGrafObj = new SdrGrafObj( rGraphic, pPickObj->GetLogicRect() );
- pNewGrafObj->SetEmptyPresObj(TRUE);
+ pNewGrafObj->SetEmptyPresObj(sal_True);
}
if ( pNewGrafObj->IsEmptyPresObj() )
{
Rectangle aRect( pNewGrafObj->GetLogicRect() );
- pNewGrafObj->AdjustToMaxRect( aRect, FALSE );
+ pNewGrafObj->AdjustToMaxRect( aRect, sal_False );
pNewGrafObj->SetOutlinerParaObject(NULL);
- pNewGrafObj->SetEmptyPresObj(FALSE);
+ pNewGrafObj->SetEmptyPresObj(sal_False);
}
if (pPage && pPage->IsPresObj(pPickObj))
@@ -207,10 +207,10 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
Size aPageSize( pPage->GetSize() );
aPageSize.Width() -= pPage->GetLftBorder() + pPage->GetRgtBorder();
aPageSize.Height() -= pPage->GetUppBorder() + pPage->GetLwrBorder();
- pNewGrafObj->AdjustToMaxRect( Rectangle( Point(), aPageSize ), TRUE );
+ pNewGrafObj->AdjustToMaxRect( Rectangle( Point(), aPageSize ), sal_True );
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
- BOOL bIsPresTarget = FALSE;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
+ sal_Bool bIsPresTarget = sal_False;
if ((mpViewSh
&& mpViewSh->GetViewShell()!=NULL
@@ -377,7 +377,7 @@ IMPL_LINK( View, DropInsertFileHdl, Timer*, EMPTYARG )
{
String aCurrentDropFile( *aIter );
INetURLObject aURL( aCurrentDropFile );
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
if( aURL.GetProtocol() == INET_PROT_NOT_VALID )
{
@@ -402,12 +402,12 @@ IMPL_LINK( View, DropInsertFileHdl, Timer*, EMPTYARG )
if( aIter == maDropFileVector.begin() )
mnAction = nTempAction;
- bOK = TRUE;
+ bOK = sal_True;
}
if( !bOK )
{
const SfxFilter* pFoundFilter = NULL;
- SfxMedium aSfxMedium( aCurrentDropFile, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE );
+ SfxMedium aSfxMedium( aCurrentDropFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_False );
ErrCode nErr = SFX_APP()->GetFilterMatcher().GuessFilter( aSfxMedium, &pFoundFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE );
if( pFoundFilter && !nErr )
@@ -438,7 +438,7 @@ IMPL_LINK( View, DropInsertFileHdl, Timer*, EMPTYARG )
aReq.AppendItem( aItem1 );
aReq.AppendItem( aItem2 );
FuInsertFile::Create( mpViewSh, pWin, this, mpDoc, aReq );
- bOK = TRUE;
+ bOK = sal_True;
}
}
}
@@ -512,7 +512,7 @@ IMPL_LINK( View, DropInsertFileHdl, Timer*, EMPTYARG )
aRect = Rectangle( maDropPos, aSize );
SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect );
- ULONG nOptions = SDRINSERT_SETDEFLAYER;
+ sal_uLong nOptions = SDRINSERT_SETDEFLAYER;
if (mpViewSh != NULL)
{
@@ -570,7 +570,7 @@ IMPL_LINK( View, DropErrorHdl, Timer*, EMPTYARG )
|*
\************************************************************************/
-void View::LockRedraw(BOOL bLock)
+void View::LockRedraw(sal_Bool bLock)
{
if (bLock)
{
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index f6b627e917f4..811a4a15e19e 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -104,7 +104,7 @@ Window::Window(::Window* pParent)
SetUniqueId(HID_SD_WIN_DOCUMENT);
// #i78183# Added after discussed with AF
- EnableRTL(FALSE);
+ EnableRTL(sal_False);
}
/*************************************************************************
@@ -168,13 +168,13 @@ void Window::CalcMinZoom()
// area (also called application area) to completely fill the
// window.
Size aWinSize = PixelToLogic(GetOutputSizePixel());
- ULONG nX = (ULONG) ((double) aWinSize.Width()
+ sal_uLong nX = (sal_uLong) ((double) aWinSize.Width()
* (double) ZOOM_MULTIPLICATOR / (double) maViewSize.Width());
- ULONG nY = (ULONG) ((double) aWinSize.Height()
+ sal_uLong nY = (sal_uLong) ((double) aWinSize.Height()
* (double) ZOOM_MULTIPLICATOR / (double) maViewSize.Height());
// Decide whether to take the larger or the smaller factor.
- ULONG nFact;
+ sal_uLong nFact;
if (mbCalcMinZoomByMinSide)
nFact = Min(nX, nY);
else
@@ -182,7 +182,7 @@ void Window::CalcMinZoom()
// The factor is tansfomed according to the current zoom factor.
nFact = nFact * nZoom / ZOOM_MULTIPLICATOR;
- mnMinZoom = Max((USHORT) MIN_ZOOM, (USHORT) nFact);
+ mnMinZoom = Max((sal_uInt16) MIN_ZOOM, (sal_uInt16) nFact);
}
// If the current zoom factor is smaller than the calculated minimal
// zoom factor then set the new minimal factor as the current zoom
@@ -197,7 +197,7 @@ void Window::CalcMinZoom()
void Window::SetMinZoom (long int nMin)
{
- mnMinZoom = (USHORT) nMin;
+ mnMinZoom = (sal_uInt16) nMin;
}
@@ -213,7 +213,7 @@ long Window::GetMinZoom (void) const
void Window::SetMaxZoom (long int nMax)
{
- mnMaxZoom = (USHORT) nMax;
+ mnMaxZoom = (sal_uInt16) nMax;
}
@@ -355,7 +355,7 @@ void Window::Command(const CommandEvent& rCEvt)
long Window::Notify( NotifyEvent& rNEvt )
{
- long nResult = FALSE;
+ long nResult = sal_False;
if ( mpViewShell )
{
nResult = mpViewShell->Notify(rNEvt, this);
@@ -523,25 +523,25 @@ long Window::GetZoomForRect( const Rectangle& rZoomRect )
// rectangle being fully visible (when translated accordingly) as
// large as possible in the output area independently in both
// coordinate directions .
- ULONG nX(0L);
- ULONG nY(0L);
+ sal_uLong nX(0L);
+ sal_uLong nY(0L);
const Size aWinSize( PixelToLogic(GetOutputSizePixel()) );
if(rZoomRect.GetHeight())
{
- nX = (ULONG) ((double) aWinSize.Height()
+ nX = (sal_uLong) ((double) aWinSize.Height()
* (double) ZOOM_MULTIPLICATOR / (double) rZoomRect.GetHeight());
}
if(rZoomRect.GetWidth())
{
- nY = (ULONG) ((double) aWinSize.Width()
+ nY = (sal_uLong) ((double) aWinSize.Width()
* (double) ZOOM_MULTIPLICATOR / (double) rZoomRect.GetWidth());
}
// Use the smaller one of both so that the zoom rectangle will be
// fully visible with respect to both coordinate directions.
- ULONG nFact = Min(nX, nY);
+ sal_uLong nFact = Min(nX, nY);
// Transform the current zoom factor so that it leads to the desired
// scaling.
@@ -597,24 +597,24 @@ long Window::SetZoomRect (const Rectangle& rZoomRect)
// rectangle being fully visible (when translated accordingly) as
// large as possible in the output area independently in both
// coordinate directions .
- ULONG nX(0L);
- ULONG nY(0L);
+ sal_uLong nX(0L);
+ sal_uLong nY(0L);
if(rZoomRect.GetHeight())
{
- nX = (ULONG) ((double) aWinSize.Height()
+ nX = (sal_uLong) ((double) aWinSize.Height()
* (double) ZOOM_MULTIPLICATOR / (double) rZoomRect.GetHeight());
}
if(rZoomRect.GetWidth())
{
- nY = (ULONG) ((double) aWinSize.Width()
+ nY = (sal_uLong) ((double) aWinSize.Width()
* (double) ZOOM_MULTIPLICATOR / (double) rZoomRect.GetWidth());
}
// Use the smaller one of both so that the zoom rectangle will be
// fully visible with respect to both coordinate directions.
- ULONG nFact = Min(nX, nY);
+ sal_uLong nFact = Min(nX, nY);
// Transform the current zoom factor so that it leads to the desired
// scaling.
@@ -670,9 +670,9 @@ void Window::SetMinZoomAutoCalc (bool bAuto)
|*
\************************************************************************/
-void Window::UpdateMapOrigin(BOOL bInvalidate)
+void Window::UpdateMapOrigin(sal_Bool bInvalidate)
{
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
const Size aWinSize = PixelToLogic(GetOutputSizePixel());
if ( mbCenterAllowed )
@@ -689,22 +689,22 @@ void Window::UpdateMapOrigin(BOOL bInvalidate)
if ( maWinPos.X() > maViewSize.Width() - aWinSize.Width() )
{
maWinPos.X() = maViewSize.Width() - aWinSize.Width();
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( maWinPos.Y() > maViewSize.Height() - aWinSize.Height() )
{
maWinPos.Y() = maViewSize.Height() - aWinSize.Height();
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( aWinSize.Width() > maViewSize.Width() || maWinPos.X() < 0 )
{
maWinPos.X() = maViewSize.Width() / 2 - aWinSize.Width() / 2;
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( aWinSize.Height() > maViewSize.Height() || maWinPos.Y() < 0 )
{
maWinPos.Y() = maViewSize.Height() / 2 - aWinSize.Height() / 2;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -804,7 +804,7 @@ void Window::SetVisibleXY(double fX, double fY)
maWinPos.X() = (long) (fX * maViewSize.Width());
if ( fY >= 0 )
maWinPos.Y() = (long) (fY * maViewSize.Height());
- UpdateMapOrigin(FALSE);
+ UpdateMapOrigin(sal_False);
Scroll(nOldX - maWinPos.X(), nOldY - maWinPos.Y(), SCROLL_CHILDREN);
Update();
}
@@ -960,8 +960,8 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SvtAccessibilityOptions aAccOptions;
- ULONG nOutputMode;
- USHORT nPreviewSlot;
+ sal_uLong nOutputMode;
+ sal_uInt16 nPreviewSlot;
if( rStyleSettings.GetHighContrastMode() )
nOutputMode = ViewShell::OUTPUT_DRAWMODE_CONTRAST;
@@ -1037,7 +1037,7 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
{
DrawDocShell* pDocSh = mpViewShell->GetDocSh();
if( pDocSh )
- pDocSh->SetPrinter( pDocSh->GetPrinter( TRUE ) );
+ pDocSh->SetPrinter( pDocSh->GetPrinter( sal_True ) );
}
}
@@ -1054,7 +1054,7 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
{
DrawDocShell* pDocSh = mpViewShell->GetDocSh();
if( pDocSh )
- pDocSh->SetPrinter( pDocSh->GetPrinter( TRUE ) );
+ pDocSh->SetPrinter( pDocSh->GetPrinter( sal_True ) );
}
}
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index 3c4fabb2c6ca..da6a207b6a23 100644..100755
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -98,7 +98,7 @@ TabControl::TabControl(DrawViewShell* pViewSh, Window* pParent) :
DragSourceHelper( this ),
DropTargetHelper( this ),
pDrViewSh(pViewSh),
- bInternalMove(FALSE)
+ bInternalMove(sal_False)
{
EnableEditMode();
SetSizePixel(Size(0, 0));
@@ -131,7 +131,7 @@ void TabControl::MouseButtonDown(const MouseEvent& rMEvt)
&& !rMEvt.IsShift())
{
Point aPos = PixelToLogic( rMEvt.GetPosPixel() );
- USHORT aPageId = GetPageId(aPos);
+ sal_uInt16 aPageId = GetPageId(aPos);
if (aPageId == 0)
{
@@ -187,7 +187,7 @@ void TabControl::DoubleClick()
void TabControl::StartDrag( sal_Int8, const Point& )
{
- bInternalMove = TRUE;
+ bInternalMove = sal_True;
// object is delete by reference mechanismn
( new TabControl::TabControlTransferable( *this ) )->StartDrag( this, DND_ACTION_COPYMOVE );
@@ -201,7 +201,7 @@ void TabControl::StartDrag( sal_Int8, const Point& )
void TabControl::DragFinished( sal_Int8 )
{
- bInternalMove = FALSE;
+ bInternalMove = sal_False;
}
/*************************************************************************
@@ -238,9 +238,9 @@ sal_Int8 TabControl::AcceptDrop( const AcceptDropEvent& rEvt )
sal_Int32 nPageId = GetPageId( aPos ) - 1;
- if( ( nPageId >= 0 ) && pDoc->GetPage( (USHORT)nPageId ) )
+ if( ( nPageId >= 0 ) && pDoc->GetPage( (sal_uInt16)nPageId ) )
{
- nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, (USHORT)nPageId, SDRLAYER_NOTFOUND );
+ nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, (sal_uInt16)nPageId, SDRLAYER_NOTFOUND );
SwitchPage( aPos );
}
}
@@ -263,7 +263,7 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
if( bInternalMove )
{
- USHORT nPageId = ShowDropPos( aPos ) - 1;
+ sal_uInt16 nPageId = ShowDropPos( aPos ) - 1;
switch (rEvt.mnAction)
{
@@ -286,21 +286,21 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
if (pDrViewSh->IsSwitchPageAllowed())
{
// 1. Create a copy.
- USHORT nPageNumOfCopy = pDoc->DuplicatePage (GetCurPageId() - 1);
+ sal_uInt16 nPageNumOfCopy = pDoc->DuplicatePage (GetCurPageId() - 1);
// 2. Move page. For this first switch to the copy:
// MovePages operates on the currently selected page(s).
pDrViewSh->SwitchPage (nPageNumOfCopy);
// Adapt target page id when necessary, i.e. page copy
// has been inserted in front of the target page.
- USHORT nPageNum = nPageId;
- if ((nPageNumOfCopy <= nPageNum) && (nPageNum != (USHORT)-1))
+ sal_uInt16 nPageNum = nPageId;
+ if ((nPageNumOfCopy <= nPageNum) && (nPageNum != (sal_uInt16)-1))
nPageNum += 1;
if (pDoc->MovePages(nPageNum))
{
// 3. Switch to the copy that has been moved to its
// final destination. Use an asynchron slot call to
// be executed after the still pending ones.
- if (nPageNumOfCopy >= nPageNum || (nPageNum == (USHORT)-1))
+ if (nPageNumOfCopy >= nPageNum || (nPageNum == (sal_uInt16)-1))
nPageNum += 1;
SetCurPageId (GetPageId(nPageNum));
SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
@@ -319,9 +319,9 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
sal_Int32 nPageId = GetPageId( aPos ) - 1;
- if( ( nPageId >= 0 ) && pDoc->GetPage( (USHORT)nPageId ) )
+ if( ( nPageId >= 0 ) && pDoc->GetPage( (sal_uInt16)nPageId ) )
{
- nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, (USHORT)nPageId, SDRLAYER_NOTFOUND );
+ nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, (sal_uInt16)nPageId, SDRLAYER_NOTFOUND );
}
}
@@ -333,12 +333,12 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
void TabControl::Command(const CommandEvent& rCEvt)
{
- USHORT nCmd = rCEvt.GetCommand();
+ sal_uInt16 nCmd = rCEvt.GetCommand();
if ( nCmd == COMMAND_CONTEXTMENU )
{
- BOOL bGraphicShell = pDrViewSh->ISA(GraphicViewShell);
- USHORT nResId = bGraphicShell ? RID_GRAPHIC_PAGETAB_POPUP :
+ sal_Bool bGraphicShell = pDrViewSh->ISA(GraphicViewShell);
+ sal_uInt16 nResId = bGraphicShell ? RID_GRAPHIC_PAGETAB_POPUP :
RID_DRAW_PAGETAB_POPUP;
SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
pDispatcher->ExecutePopup( SdResId( nResId ) );
@@ -347,11 +347,11 @@ void TabControl::Command(const CommandEvent& rCEvt)
long TabControl::StartRenaming()
{
- BOOL bOK = FALSE;
+ sal_Bool bOK = sal_False;
if (pDrViewSh->GetPageKind() == PK_STANDARD)
{
- bOK = TRUE;
+ bOK = sal_True;
::sd::View* pView = pDrViewSh->GetView();
@@ -364,7 +364,7 @@ long TabControl::StartRenaming()
long TabControl::AllowRenaming()
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
String aNewName( GetEditText() );
String aCompareName( GetPageText( GetEditPageId() ) );
@@ -379,7 +379,7 @@ long TabControl::AllowRenaming()
}
else
{
- bOK = FALSE;
+ bOK = sal_False;
}
}
return( bOK );
diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx
index 83884cdba948..cf5bbe3e0f18 100644..100755
--- a/sd/source/ui/view/unmodpg.cxx
+++ b/sd/source/ui/view/unmodpg.cxx
@@ -57,15 +57,13 @@ TYPEINIT1(ModifyPageUndoAction, SdUndoAction);
\************************************************************************/
ModifyPageUndoAction::ModifyPageUndoAction(
- SfxUndoManager* pTheManager,
SdDrawDocument* pTheDoc,
SdPage* pThePage,
String aTheNewName,
AutoLayout eTheNewAutoLayout,
- BOOL bTheNewBckgrndVisible,
- BOOL bTheNewBckgrndObjsVisible)
-: SdUndoAction(pTheDoc),
- mpManager(pTheManager)
+ sal_Bool bTheNewBckgrndVisible,
+ sal_Bool bTheNewBckgrndObjsVisible)
+: SdUndoAction(pTheDoc)
{
DBG_ASSERT(pThePage, "Undo ohne Seite ???");
@@ -81,8 +79,8 @@ ModifyPageUndoAction::ModifyPageUndoAction(
{
maOldName = mpPage->GetName();
SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers = mpPage->TRG_GetMasterPageVisibleLayers();
mbOldBckgrndVisible = aVisibleLayers.IsSet(aBckgrnd);
@@ -129,8 +127,8 @@ void ModifyPageUndoAction::Undo()
}
SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers;
aVisibleLayers.Set(aBckgrnd, mbOldBckgrndVisible);
aVisibleLayers.Set(aBckgrndObj, mbOldBckgrndObjsVisible);
@@ -178,8 +176,8 @@ void ModifyPageUndoAction::Redo()
}
SdrLayerAdmin& rLayerAdmin = mpDoc->GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers;
aVisibleLayers.Set(aBckgrnd, mbNewBckgrndVisible);
aVisibleLayers.Set(aBckgrndObj, mbNewBckgrndObjsVisible);
@@ -220,8 +218,8 @@ RenameLayoutTemplateUndoAction::RenameLayoutTemplateUndoAction( SdDrawDocument*
, maNewName( rNewLayoutName )
, maComment(SdResId(STR_TITLE_RENAMESLIDE))
{
- USHORT nPos = maOldName.SearchAscii( SD_LT_SEPARATOR );
- if( nPos != (USHORT)-1 )
+ sal_uInt16 nPos = maOldName.SearchAscii( SD_LT_SEPARATOR );
+ if( nPos != (sal_uInt16)-1 )
maOldName.Erase(nPos);
}
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index c2bccbbffae1..4e4f539eabbb 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -77,12 +77,12 @@ class ImageButtonHdl;
// --------------------------------------------------------------------
-static USHORT gButtonSlots[] = { SID_INSERT_TABLE, SID_INSERT_DIAGRAM, SID_INSERT_GRAPHIC, SID_INSERT_AVMEDIA };
-static USHORT gButtonToolTips[] = { STR_INSERT_TABLE, STR_INSERT_CHART, STR_INSERT_PICTURE, STR_INSERT_MOVIE };
+static sal_uInt16 gButtonSlots[] = { SID_INSERT_TABLE, SID_INSERT_DIAGRAM, SID_INSERT_GRAPHIC, SID_INSERT_AVMEDIA };
+static sal_uInt16 gButtonToolTips[] = { STR_INSERT_TABLE, STR_INSERT_CHART, STR_INSERT_PICTURE, STR_INSERT_MOVIE };
// --------------------------------------------------------------------
-static BitmapEx loadImageResource( USHORT nId )
+static BitmapEx loadImageResource( sal_uInt16 nId )
{
SdResId aResId( nId );
aResId.SetRT( RSC_BITMAP );
@@ -149,10 +149,10 @@ private:
class ImageButtonHdl : public SmartHdl
{
public:
- ImageButtonHdl( const SmartTagReference& xTag, /* USHORT nSID, const Image& rImage, const Image& rImageMO, */ const Point& rPnt );
+ ImageButtonHdl( const SmartTagReference& xTag, /* sal_uInt16 nSID, const Image& rImage, const Image& rImageMO, */ const Point& rPnt );
virtual ~ImageButtonHdl();
virtual void CreateB2dIAObject();
- virtual BOOL IsFocusHdl() const;
+ virtual sal_Bool IsFocusHdl() const;
virtual Pointer GetPointer() const;
virtual bool isMarkable() const;
@@ -168,12 +168,12 @@ private:
int mnHighlightId;
Size maImageSize;
- ULONG mnTip;
+ sal_uLong mnTip;
};
// --------------------------------------------------------------------
-ImageButtonHdl::ImageButtonHdl( const SmartTagReference& xTag /*, USHORT nSID, const Image& rImage, const Image& rImageMO*/, const Point& rPnt )
+ImageButtonHdl::ImageButtonHdl( const SmartTagReference& xTag /*, sal_uInt16 nSID, const Image& rImage, const Image& rImageMO*/, const Point& rPnt )
: SmartHdl( xTag, rPnt )
, mxTag( dynamic_cast< ChangePlaceholderTag* >( xTag.get() ) )
, mnHighlightId( -1 )
@@ -295,7 +295,7 @@ void ImageButtonHdl::CreateB2dIAObject()
// --------------------------------------------------------------------
-BOOL ImageButtonHdl::IsFocusHdl() const
+sal_Bool ImageButtonHdl::IsFocusHdl() const
{
return false;
}
@@ -337,7 +337,7 @@ bool ChangePlaceholderTag::MouseButtonDown( const MouseEvent& /*rMEvt*/, SmartHd
int nHighlightId = static_cast< ImageButtonHdl& >(rHdl).getHighlightId();
if( nHighlightId >= 0 )
{
- USHORT nSID = gButtonSlots[nHighlightId];
+ sal_uInt16 nSID = gButtonSlots[nHighlightId];
if( mxPlaceholderObj.get() )
{
@@ -346,7 +346,7 @@ bool ChangePlaceholderTag::MouseButtonDown( const MouseEvent& /*rMEvt*/, SmartHd
{
SdrPageView* pPV = mrView.GetSdrPageView();
mrView.UnmarkAllObj(pPV );
- mrView.MarkObj(mxPlaceholderObj.get(), pPV, FALSE);
+ mrView.MarkObj(mxPlaceholderObj.get(), pPV, sal_False);
}
}
@@ -360,7 +360,7 @@ bool ChangePlaceholderTag::MouseButtonDown( const MouseEvent& /*rMEvt*/, SmartHd
/** returns true if the SmartTag consumes this event. */
bool ChangePlaceholderTag::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_DOWN:
@@ -404,7 +404,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight )
const Rectangle aRectSrc( Point( 0, 0 ), aSize );
aRet = *(getButtonImage((nHighlight == 0) ? 4 : 0, bLarge));
- aRet.Expand( aSize.Width(), aSize.Height(), NULL, TRUE );
+ aRet.Expand( aSize.Width(), aSize.Height(), NULL, sal_True );
aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) );
aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) );
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index fcbfddad198b..1fb16798b489 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -121,8 +121,8 @@ void ViewShell::UpdateScrollBars()
if(IsPageFlipMode()) // ie in zoom mode where no panning
{
SdPage* pPage = static_cast<DrawViewShell*>(this)->GetActualPage();
- USHORT nCurPage = (pPage->GetPageNum() - 1) / 2;
- USHORT nTotalPages = GetDoc()->GetSdPageCount(pPage->GetPageKind());
+ sal_uInt16 nCurPage = (pPage->GetPageNum() - 1) / 2;
+ sal_uInt16 nTotalPages = GetDoc()->GetSdPageCount(pPage->GetPageKind());
mpVerticalScrollBar->SetRange(Range(0,256*nTotalPages));
mpVerticalScrollBar->SetVisibleSize(256);
mpVerticalScrollBar->SetThumbPos(256*nCurPage);
@@ -235,8 +235,8 @@ long ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
if(IsPageFlipMode())
{
SdPage* pPage = static_cast<DrawViewShell*>(this)->GetActualPage();
- USHORT nCurPage = (pPage->GetPageNum() - 1) >> 1;
- USHORT nNewPage = (USHORT)pVScroll->GetThumbPos()/256;
+ sal_uInt16 nCurPage = (pPage->GetPageNum() - 1) >> 1;
+ sal_uInt16 nNewPage = (sal_uInt16)pVScroll->GetThumbPos()/256;
if( nCurPage != nNewPage )
static_cast<DrawViewShell*>(this)->SwitchPage(nNewPage);
}
@@ -280,7 +280,7 @@ long ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
return 0;
}
-SvxRuler* ViewShell::CreateHRuler(::sd::Window* , BOOL )
+SvxRuler* ViewShell::CreateHRuler(::sd::Window* , sal_Bool )
{
return NULL;
}
@@ -466,7 +466,7 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect)
\************************************************************************/
void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
- const Point& rWinPos, BOOL bUpdate)
+ const Point& rWinPos, sal_Bool bUpdate)
{
if (mpContentWindow.get() != NULL)
{
@@ -528,9 +528,9 @@ void ViewShell::DrawMarkRect(const Rectangle& rRect) const
void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
long nLeft, long nRight,
- long nUpper, long nLower, BOOL bScaleAll,
- Orientation eOrientation, USHORT nPaperBin,
- BOOL bBackgroundFullSize)
+ long nUpper, long nLower, sal_Bool bScaleAll,
+ Orientation eOrientation, sal_uInt16 nPaperBin,
+ sal_Bool bBackgroundFullSize)
{
SdPage* pPage = 0;
SdUndoGroup* pUndoGroup = NULL;
@@ -540,7 +540,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
SfxViewShell* pViewShell = GetViewShell();
OSL_ASSERT (pViewShell!=NULL);
- USHORT i, nPageCnt = GetDoc()->GetMasterSdPageCount(ePageKind);
+ sal_uInt16 i, nPageCnt = GetDoc()->GetMasterSdPageCount(ePageKind);
Broadcast (ViewShellHint(ViewShellHint::HINT_PAGE_RESIZE_START));
@@ -649,7 +649,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
// Handoutseite an neues Format der Standardseiten anpassen
if( (ePageKind == PK_STANDARD) || (ePageKind == PK_HANDOUT) )
- GetDoc()->GetSdPage(0, PK_HANDOUT)->CreateTitleAndLayout(TRUE);
+ GetDoc()->GetSdPage(0, PK_HANDOUT)->CreateTitleAndLayout(sal_True);
// Undo Gruppe dem Undo Manager uebergeben
pViewShell->GetViewFrame()->GetObjectShell()
@@ -661,7 +661,7 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
Point aPageOrg = Point(nWidth, nHeight / 2);
Size aViewSize = Size(nWidth * 3, nHeight * 2);
- InitWindows(aPageOrg, aViewSize, Point(-1, -1), TRUE);
+ InitWindows(aPageOrg, aViewSize, Point(-1, -1), sal_True);
Point aVisAreaPos;
@@ -755,9 +755,9 @@ void ViewShell::SetActiveWindow (::sd::Window* pWin)
|*
\************************************************************************/
-BOOL ViewShell::RequestHelp(const HelpEvent& rHEvt, ::sd::Window*)
+sal_Bool ViewShell::RequestHelp(const HelpEvent& rHEvt, ::sd::Window*)
{
- BOOL bReturn = FALSE;
+ sal_Bool bReturn = sal_False;
if (rHEvt.GetMode())
{
@@ -821,13 +821,13 @@ void ViewShell::WriteFrameViewData()
|*
\************************************************************************/
-BOOL ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
+sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
{
ErrCode aErrCode = 0;
SfxErrorContext aEC(ERRCTX_SO_DOVERB, GetActiveWindow(), RID_SO_ERRCTX);
- BOOL bAbort = FALSE;
- GetDocSh()->SetWaitCursor( TRUE );
+ sal_Bool bAbort = sal_False;
+ GetDocSh()->SetWaitCursor( sal_True );
SfxViewShell* pViewShell = GetViewShell();
OSL_ASSERT (pViewShell!=NULL);
bool bChangeDefaultsForChart = false;
@@ -869,16 +869,16 @@ BOOL ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
aName = String();
// Dialog "OLE-Objekt einfuegen" aufrufen
- GetDocSh()->SetWaitCursor( FALSE );
+ GetDocSh()->SetWaitCursor( sal_False );
pViewShell->GetViewFrame()->GetDispatcher()->Execute(
SID_INSERT_OBJECT,
SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
xObj = pObj->GetObjRef();
- GetDocSh()->SetWaitCursor( TRUE );
+ GetDocSh()->SetWaitCursor( sal_True );
if (!xObj.is())
{
- bAbort = TRUE;
+ bAbort = sal_True;
}
}
@@ -887,7 +887,7 @@ BOOL ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
/******************************************************
* OLE-Objekt ist nicht mehr leer
******************************************************/
- pObj->SetEmptyPresObj(FALSE);
+ pObj->SetEmptyPresObj(sal_False);
pObj->SetOutlinerParaObject(NULL);
pObj->SetGraphic(NULL);
@@ -970,10 +970,10 @@ BOOL ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
pSdClient->DoVerb(nVerb); // ErrCode wird ggf. vom Sfx ausgegeben
pViewShell->GetViewFrame()->GetBindings().Invalidate(
- SID_NAVIGATOR_STATE, TRUE, FALSE);
+ SID_NAVIGATOR_STATE, sal_True, sal_False);
}
- GetDocSh()->SetWaitCursor( FALSE );
+ GetDocSh()->SetWaitCursor( sal_False );
if (aErrCode != 0 && !bAbort)
{
@@ -1027,7 +1027,7 @@ void ViewShell::WriteUserData(String&)
|*
\************************************************************************/
-void ViewShell::SetRuler(BOOL bRuler)
+void ViewShell::SetRuler(sal_Bool bRuler)
{
mbHasRulers = ( bRuler && !GetDocSh()->IsPreview() ); // no rulers on preview mode
@@ -1070,8 +1070,8 @@ sal_Int8 ViewShell::AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
::sd::View* pView = GetView();
return( pView ? pView->AcceptDrop( rEvt, rTargetHelper, pTargetWindow, nPage, nLayer ) : DND_ACTION_NONE );
@@ -1087,8 +1087,8 @@ sal_Int8 ViewShell::ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
::sd::Window* pTargetWindow,
- USHORT nPage,
- USHORT nLayer)
+ sal_uInt16 nPage,
+ sal_uInt16 nLayer)
{
::sd::View* pView = GetView();
return( pView ? pView->ExecuteDrop( rEvt, rTargetHelper, pTargetWindow, nPage, nLayer ) : DND_ACTION_NONE );
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 6769af6c2946..ebb8cb66f1f4 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -35,8 +35,9 @@
#include "GraphicViewShellBase.hxx"
#include <sfx2/viewfrm.hxx>
+#include <svtools/svtools.hrc>
#include <com/sun/star/lang/Locale.hpp>
-
+#include <svtools/svtdata.hxx>
#include <utility>
#include <vector>
@@ -102,7 +103,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
{
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STYLE_FAMILY ) )
{
- UINT16 nFamily = (UINT16)GetDocSh()->GetStyleFamily();
+ sal_uInt16 nFamily = (sal_uInt16)GetDocSh()->GetStyleFamily();
SdrView* pDrView = GetDrawView();
@@ -143,14 +144,14 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_UNDO))
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
- sal_Bool bActivate(FALSE);
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
+ sal_Bool bActivate(sal_False);
if(pUndoManager)
{
if(pUndoManager->GetUndoActionCount() != 0)
{
- bActivate = TRUE;
+ bActivate = sal_True;
}
}
@@ -158,7 +159,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
{
// Set the necessary string like in
// sfx2/source/view/viewfrm.cxx ver 1.23 ln 1072 ff.
- String aTmp(ResId(STR_UNDO, *SFX_APP()->GetSfxResManager()));
+ String aTmp( SvtResId( STR_UNDO ) );
aTmp += pUndoManager->GetUndoActionComment(0);
rSet.Put(SfxStringItem(SID_UNDO, aTmp));
}
@@ -170,14 +171,14 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
if(SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_REDO))
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
- sal_Bool bActivate(FALSE);
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
+ sal_Bool bActivate(sal_False);
if(pUndoManager)
{
if(pUndoManager->GetRedoActionCount() != 0)
{
- bActivate = TRUE;
+ bActivate = sal_True;
}
}
@@ -185,7 +186,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
{
// Set the necessary string like in
// sfx2/source/view/viewfrm.cxx ver 1.23 ln 1081 ff.
- String aTmp(ResId(STR_REDO, *SFX_APP()->GetSfxResManager()));
+ String aTmp(SvtResId(STR_REDO));
aTmp += pUndoManager->GetRedoActionComment(0);
rSet.Put(SfxStringItem(SID_REDO, aTmp));
}
@@ -207,13 +208,14 @@ void ViewShell::GetMenuState( SfxItemSet &rSet )
SdPage* ViewShell::CreateOrDuplicatePage (
SfxRequest& rRequest,
PageKind ePageKind,
- SdPage* pPage)
+ SdPage* pPage,
+ const sal_Int32 nInsertPosition)
{
- USHORT nSId = rRequest.GetSlot();
+ sal_uInt16 nSId = rRequest.GetSlot();
SdDrawDocument* pDocument = GetDoc();
SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
+ sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
+ sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
SetOfByte aVisibleLayers;
// Determine the page from which to copy some values, such as layers,
// size, master page, to the new page. This is usually the given page.
@@ -231,8 +233,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
String aNotesPageName;
AutoLayout eStandardLayout (AUTOLAYOUT_NONE);
AutoLayout eNotesLayout (AUTOLAYOUT_NOTES);
- BOOL bIsPageBack = aVisibleLayers.IsSet(aBckgrnd);
- BOOL bIsPageObj = aVisibleLayers.IsSet(aBckgrndObj);
+ sal_Bool bIsPageBack = aVisibleLayers.IsSet(aBckgrnd);
+ sal_Bool bIsPageObj = aVisibleLayers.IsSet(aBckgrndObj);
// 1. Process the arguments.
const SfxItemSet* pArgs = rRequest.GetArgs();
@@ -246,7 +248,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
&& rBase.GetMainViewShell()->GetShellType()!=ViewShell::ST_DRAW)
{
framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
- framework::FrameworkHelper::msLayoutTaskPanelURL);
+ framework::FrameworkHelper::msLayoutTaskPanelURL,
+ false);
}
*/
@@ -268,7 +271,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
else if (pArgs->Count() == 1)
{
pDocument->StopWorkStartupDelay();
- SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
+ SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, sal_False);
if( pLayout )
{
if (ePageKind == PK_NOTES)
@@ -286,10 +289,10 @@ SdPage* ViewShell::CreateOrDuplicatePage (
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
- SFX_REQUEST_ARG (rRequest, pPageName, SfxStringItem, ID_VAL_PAGENAME, FALSE);
- SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- SFX_REQUEST_ARG (rRequest, pIsPageBack, SfxBoolItem, ID_VAL_ISPAGEBACK, FALSE);
- SFX_REQUEST_ARG (rRequest, pIsPageObj, SfxBoolItem, ID_VAL_ISPAGEOBJ, FALSE);
+ SFX_REQUEST_ARG (rRequest, pPageName, SfxStringItem, ID_VAL_PAGENAME, sal_False);
+ SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, sal_False);
+ SFX_REQUEST_ARG (rRequest, pIsPageBack, SfxBoolItem, ID_VAL_ISPAGEBACK, sal_False);
+ SFX_REQUEST_ARG (rRequest, pIsPageObj, SfxBoolItem, ID_VAL_ISPAGEOBJ, sal_False);
if (CHECK_RANGE (AUTOLAYOUT__START, (AutoLayout) pLayout->GetValue (), AUTOLAYOUT__END))
{
@@ -337,7 +340,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if( bUndo )
pDrView->BegUndo( String( SdResId(STR_INSERTPAGE) ) );
- USHORT nNewPageIndex = 0xffff;
+ sal_uInt16 nNewPageIndex = 0xffff;
switch (nSId)
{
case SID_INSERTPAGE:
@@ -368,10 +371,11 @@ SdPage* ViewShell::CreateOrDuplicatePage (
eStandardLayout,
eNotesLayout,
bIsPageBack,
- bIsPageObj);
+ bIsPageObj,
+ nInsertPosition);
// Select exactly the new page.
- USHORT nPageCount (pDocument->GetSdPageCount(ePageKind));
- for (USHORT i=0; i<nPageCount; i++)
+ sal_uInt16 nPageCount (pDocument->GetSdPageCount(ePageKind));
+ for (sal_uInt16 i=0; i<nPageCount; i++)
{
pDocument->GetSdPage(i, PK_STANDARD)->SetSelected(
i == nNewPageIndex);
@@ -379,7 +383,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
i == nNewPageIndex);
}
// Move the selected page to the head of the document
- pDocument->MovePages ((USHORT)-1);
+ pDocument->MovePages ((sal_uInt16)-1);
nNewPageIndex = 0;
}
else
@@ -391,7 +395,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
eStandardLayout,
eNotesLayout,
bIsPageBack,
- bIsPageObj);
+ bIsPageObj,
+ nInsertPosition);
break;
case SID_DUPLICATE_PAGE:
@@ -405,7 +410,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
eStandardLayout,
eNotesLayout,
bIsPageBack,
- bIsPageObj);
+ bIsPageObj,
+ nInsertPosition);
break;
default:
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index bbd7cbb4ba7e..bc16d7ec6a37 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -78,6 +78,7 @@
#include <svx/extrusionbar.hxx>
#include <svx/fontworkbar.hxx>
#include <svx/svdoutl.hxx>
+#include <tools/diagnose_ex.h>
#include <svl/slstitm.hxx>
#include <sfx2/request.hxx>
@@ -128,7 +129,7 @@ namespace sd {
static const int DELTA_ZOOM = 10;
-BOOL ViewShell::IsPageFlipMode(void) const
+sal_Bool ViewShell::IsPageFlipMode(void) const
{
return this->ISA(DrawViewShell) && mpContentWindow.get() != NULL &&
mpContentWindow->GetVisibleHeight() >= 1.0;
@@ -194,7 +195,7 @@ void ViewShell::construct(void)
mpView = 0;
mpFrameView = 0;
mpZoomList = 0;
- mbStartShowWithDialog = FALSE;
+ mbStartShowWithDialog = sal_False;
mnPrintedHandoutPageNum = 1;
mnPrintedHandoutPageCount = 0;
mpWindowUpdater.reset( new ::sd::WindowUpdater() );
@@ -227,7 +228,7 @@ void ViewShell::construct(void)
{
// Create scroll bars and the filler between the scroll bars.
mpHorizontalScrollBar.reset (new ScrollBar(GetParentWindow(), WinBits(WB_HSCROLL | WB_DRAG)));
- mpHorizontalScrollBar->EnableRTL (FALSE);
+ mpHorizontalScrollBar->EnableRTL (sal_False);
mpHorizontalScrollBar->SetRange(Range(0, 32000));
mpHorizontalScrollBar->SetScrollHdl(LINK(this, ViewShell, HScrollHdl));
mpHorizontalScrollBar->Show();
@@ -247,7 +248,7 @@ void ViewShell::construct(void)
String aName( RTL_CONSTASCII_USTRINGPARAM( "ViewShell" ));
SetName (aName);
- GetDoc()->StartOnlineSpelling(FALSE);
+ GetDoc()->StartOnlineSpelling(sal_False);
mpWindowUpdater->SetViewShell (*this);
mpWindowUpdater->SetDocument (GetDoc());
@@ -290,7 +291,7 @@ void ViewShell::Exit (void)
pView->UnmarkAll();
}
- Deactivate (TRUE);
+ Deactivate (sal_True);
if (IsMainViewShell())
{
@@ -309,7 +310,7 @@ void ViewShell::Exit (void)
|*
\************************************************************************/
-void ViewShell::Activate(BOOL bIsMDIActivate)
+void ViewShell::Activate(sal_Bool bIsMDIActivate)
{
SfxShell::Activate(bIsMDIActivate);
@@ -319,14 +320,14 @@ void ViewShell::Activate(BOOL bIsMDIActivate)
// den Focus hat
if (mpHorizontalRuler.get() != NULL)
- mpHorizontalRuler->SetActive(TRUE);
+ mpHorizontalRuler->SetActive(sal_True);
if (mpVerticalRuler.get() != NULL)
- mpVerticalRuler->SetActive(TRUE);
+ mpVerticalRuler->SetActive(sal_True);
if (bIsMDIActivate)
{
// Damit der Navigator auch einen aktuellen Status bekommt
- SfxBoolItem aItem( SID_NAVIGATOR_INIT, TRUE );
+ SfxBoolItem aItem( SID_NAVIGATOR_INIT, sal_True );
if (GetDispatcher() != NULL)
GetDispatcher()->Execute(
SID_NAVIGATOR_INIT,
@@ -337,7 +338,7 @@ void ViewShell::Activate(BOOL bIsMDIActivate)
SfxViewShell* pViewShell = GetViewShell();
OSL_ASSERT (pViewShell!=NULL);
SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_3D_STATE, TRUE, FALSE );
+ rBindings.Invalidate( SID_3D_STATE, sal_True, sal_False );
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if(xSlideShow.is() && xSlideShow->isRunning() )
@@ -350,7 +351,7 @@ void ViewShell::Activate(BOOL bIsMDIActivate)
}
if(!GetDocSh()->IsUIActive())
- UpdatePreview( GetActualPage(), TRUE );
+ UpdatePreview( GetActualPage(), sal_True );
}
@@ -382,7 +383,7 @@ void ViewShell::UIDeactivated( SfxInPlaceClient* )
|*
\************************************************************************/
-void ViewShell::Deactivate(BOOL bIsMDIActivate)
+void ViewShell::Deactivate(sal_Bool bIsMDIActivate)
{
// remove view from a still active drag'n'drop session
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
@@ -412,9 +413,9 @@ void ViewShell::Deactivate(BOOL bIsMDIActivate)
}
if (mpHorizontalRuler.get() != NULL)
- mpHorizontalRuler->SetActive(FALSE);
+ mpHorizontalRuler->SetActive(sal_False);
if (mpVerticalRuler.get() != NULL)
- mpVerticalRuler->SetActive(FALSE);
+ mpVerticalRuler->SetActive(sal_False);
SfxShell::Deactivate(bIsMDIActivate);
}
@@ -436,9 +437,9 @@ void ViewShell::Shutdown (void)
|*
\************************************************************************/
-BOOL ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
+sal_Bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
{
- BOOL bReturn(FALSE);
+ sal_Bool bReturn(sal_False);
if(pWin)
{
@@ -450,7 +451,7 @@ BOOL ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
// give key input first to SfxViewShell to give CTRL+Key
// (e.g. CTRL+SHIFT+'+', to front) priority.
OSL_ASSERT (GetViewShell()!=NULL);
- bReturn = (BOOL)GetViewShell()->KeyInput(rKEvt);
+ bReturn = (sal_Bool)GetViewShell()->KeyInput(rKEvt);
}
if(!bReturn)
@@ -477,7 +478,7 @@ BOOL ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
}
else
{
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
}
@@ -491,7 +492,7 @@ BOOL ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
&& aKeyCode.GetCode() == KEY_R)
{
InvalidateWindows();
- bReturn = TRUE;
+ bReturn = sal_True;
}
}
@@ -627,7 +628,7 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
void ViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
{
- BOOL bDone = HandleScrollCommand (rCEvt, pWin);
+ sal_Bool bDone = HandleScrollCommand (rCEvt, pWin);
if( !bDone )
{
@@ -656,7 +657,7 @@ void ViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
long ViewShell::Notify(NotifyEvent& rNEvt, ::sd::Window* pWin)
{
// handle scroll commands when they arrived at child windows
- long nRet = FALSE;
+ long nRet = sal_False;
if( rNEvt.GetType() == EVENT_COMMAND )
{
// note: dynamic_cast is not possible as GetData() returns a void*
@@ -667,9 +668,9 @@ long ViewShell::Notify(NotifyEvent& rNEvt, ::sd::Window* pWin)
}
-BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin)
+bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWin)
{
- BOOL bDone = FALSE;
+ bool bDone = false;
switch( rCEvt.GetCommand() )
{
@@ -719,14 +720,14 @@ BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
Invalidate( SID_ATTR_ZOOM );
Invalidate( SID_ATTR_ZOOMSLIDER );
- bDone = TRUE;
+ bDone = true;
}
}
else
{
if( mpContentWindow.get() == pWin )
{
- ULONG nScrollLines = pData->GetScrollLines();
+ sal_uLong nScrollLines = pData->GetScrollLines();
if(IsPageFlipMode())
nScrollLines = COMMAND_WHEEL_PAGESCROLL;
CommandWheelData aWheelData( pData->GetDelta(),pData->GetNotchDelta(),
@@ -735,7 +736,7 @@ BOOL ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
rCEvt.IsMouseEvent(),(const void *) &aWheelData );
bDone = pWin->HandleScrollCommand( aReWrite,
mpHorizontalScrollBar.get(),
- mpVerticalScrollBar.get());
+ mpVerticalScrollBar.get()) == sal_True;
}
}
}
@@ -763,17 +764,17 @@ void ViewShell::SetupRulers (void)
if ( mpVerticalRuler.get() != NULL )
{
nHRulerOfs = mpVerticalRuler->GetSizePixel().Width();
- mpVerticalRuler->SetActive(TRUE);
+ mpVerticalRuler->SetActive(sal_True);
mpVerticalRuler->Show();
}
}
if ( mpHorizontalRuler.get() == NULL )
{
- mpHorizontalRuler.reset(CreateHRuler(GetActiveWindow(), TRUE));
+ mpHorizontalRuler.reset(CreateHRuler(GetActiveWindow(), sal_True));
if ( mpHorizontalRuler.get() != NULL )
{
mpHorizontalRuler->SetWinPos(nHRulerOfs);
- mpHorizontalRuler->SetActive(TRUE);
+ mpHorizontalRuler->SetActive(sal_True);
mpHorizontalRuler->Show();
}
}
@@ -783,7 +784,7 @@ void ViewShell::SetupRulers (void)
-BOOL ViewShell::HasRuler (void)
+sal_Bool ViewShell::HasRuler (void)
{
return mbHasRulers;
}
@@ -984,7 +985,7 @@ void ViewShell::SetUIUnit(FieldUnit eUnit)
|* DefTab an den horizontalen Linealen setzen
|*
\************************************************************************/
-void ViewShell::SetDefTabHRuler( UINT16 nDefTab )
+void ViewShell::SetDefTabHRuler( sal_uInt16 nDefTab )
{
if (mpHorizontalRuler.get() != NULL)
mpHorizontalRuler->SetDefTabDist( nDefTab );
@@ -996,9 +997,9 @@ void ViewShell::SetDefTabHRuler( UINT16 nDefTab )
/** Tell the FmFormShell that the view shell is closing. Give it the
oportunity to prevent that.
*/
-USHORT ViewShell::PrepareClose (BOOL bUI, BOOL bForBrowsing)
+sal_uInt16 ViewShell::PrepareClose (sal_Bool bUI, sal_Bool bForBrowsing)
{
- USHORT nResult = TRUE;
+ sal_uInt16 nResult = sal_True;
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
if (pFormShell != NULL)
@@ -1010,14 +1011,14 @@ USHORT ViewShell::PrepareClose (BOOL bUI, BOOL bForBrowsing)
-void ViewShell::UpdatePreview (SdPage*, BOOL )
+void ViewShell::UpdatePreview (SdPage*, sal_Bool )
{
// Do nothing. After the actual preview has been removed,
// OutlineViewShell::UpdatePreview() is the place where something
// usefull is still done.
}
-SfxUndoManager* ViewShell::ImpGetUndoManager (void) const
+::svl::IUndoManager* ViewShell::ImpGetUndoManager (void) const
{
const ViewShell* pMainViewShell = GetViewShellBase().GetMainViewShell().get();
@@ -1058,7 +1059,7 @@ SfxUndoManager* ViewShell::ImpGetUndoManager (void) const
void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
if(pUndoManager)
{
sal_uInt16 nCount(pUndoManager->GetUndoActionCount());
@@ -1093,7 +1094,7 @@ void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
if(pUndoManager)
{
sal_uInt16 nCount(pUndoManager->GetRedoActionCount());
@@ -1126,9 +1127,9 @@ void ViewShell::ImpGetRedoStrings(SfxItemSet &rSet) const
// -----------------------------------------------------------------------------
-void ViewShell::ImpSidUndo(BOOL, SfxRequest& rReq)
+void ViewShell::ImpSidUndo(sal_Bool, SfxRequest& rReq)
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
sal_uInt16 nNumber(1);
const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -1143,11 +1144,19 @@ void ViewShell::ImpSidUndo(BOOL, SfxRequest& rReq)
sal_uInt16 nCount(pUndoManager->GetUndoActionCount());
if(nCount >= nNumber)
{
- // when UndoStack is cleared by ModifyPageUndoAction
- // the nCount may have changed, so test GetUndoActionCount()
- while(nNumber-- && pUndoManager->GetUndoActionCount())
+ try
{
- pUndoManager->Undo();
+ // when UndoStack is cleared by ModifyPageUndoAction
+ // the nCount may have changed, so test GetUndoActionCount()
+ while(nNumber-- && pUndoManager->GetUndoActionCount())
+ {
+ pUndoManager->Undo();
+ }
+ }
+ catch( const Exception& e )
+ {
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
}
}
@@ -1167,9 +1176,9 @@ void ViewShell::ImpSidUndo(BOOL, SfxRequest& rReq)
// -----------------------------------------------------------------------------
-void ViewShell::ImpSidRedo(BOOL, SfxRequest& rReq)
+void ViewShell::ImpSidRedo(sal_Bool, SfxRequest& rReq)
{
- SfxUndoManager* pUndoManager = ImpGetUndoManager();
+ ::svl::IUndoManager* pUndoManager = ImpGetUndoManager();
sal_uInt16 nNumber(1);
const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -1184,11 +1193,19 @@ void ViewShell::ImpSidRedo(BOOL, SfxRequest& rReq)
sal_uInt16 nCount(pUndoManager->GetRedoActionCount());
if(nCount >= nNumber)
{
- // when UndoStack is cleared by ModifyPageRedoAction
- // the nCount may have changed, so test GetRedoActionCount()
- while(nNumber-- && pUndoManager->GetRedoActionCount())
+ try
+ {
+ // when UndoStack is cleared by ModifyPageRedoAction
+ // the nCount may have changed, so test GetRedoActionCount()
+ while(nNumber-- && pUndoManager->GetRedoActionCount())
+ {
+ pUndoManager->Redo();
+ }
+ }
+ catch( const Exception& e )
{
- pUndoManager->Redo();
+ // no need to handle. By definition, the UndoManager handled this by clearing the
+ // Undo/Redo stacks
}
}
@@ -1210,7 +1227,7 @@ void ViewShell::ImpSidRedo(BOOL, SfxRequest& rReq)
void ViewShell::ExecReq( SfxRequest& rReq )
{
- USHORT nSlot = rReq.GetSlot();
+ sal_uInt16 nSlot = rReq.GetSlot();
switch( nSlot )
{
case SID_MAIL_SCROLLBODY_PAGEDOWN:
@@ -1232,7 +1249,7 @@ void ViewShell::ExecReq( SfxRequest& rReq )
case SID_OUTPUT_QUALITY_BLACKWHITE:
case SID_OUTPUT_QUALITY_CONTRAST:
{
- ULONG nMode = OUTPUT_DRAWMODE_COLOR;
+ sal_uLong nMode = OUTPUT_DRAWMODE_COLOR;
switch( nSlot )
{
diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx
index c88e89da1ac5..0cd1909f8294 100644
--- a/sd/source/ui/view/zoomlist.cxx
+++ b/sd/source/ui/view/zoomlist.cxx
@@ -66,9 +66,9 @@ ZoomList::ZoomList(ViewShell* pViewShell)
ZoomList::~ZoomList()
{
#if ( defined GCC && defined C272 )
- for (ULONG nObject=0; nObject<List::Count(); nObject++)
+ for (sal_uLong nObject=0; nObject<List::Count(); nObject++)
#else
- for (ULONG nObject=0; nObject<Count(); nObject++)
+ for (sal_uLong nObject=0; nObject<Count(); nObject++)
#endif
{
// delete ZoomRects if necessary
@@ -85,12 +85,12 @@ ZoomList::~ZoomList()
void ZoomList::InsertZoomRect(const Rectangle& rRect)
{
- ULONG nRectCount = Count();
+ sal_uLong nRectCount = Count();
if (nRectCount >= MAX_ENTRYS)
{
delete ((Rectangle*) GetObject(0));
- Remove((ULONG) 0);
+ Remove((sal_uLong) 0);
}
else if (nRectCount == 0)
{
@@ -118,7 +118,7 @@ void ZoomList::InsertZoomRect(const Rectangle& rRect)
Rectangle ZoomList::GetNextZoomRect()
{
mnCurPos++;
- ULONG nRectCount = Count();
+ sal_uLong nRectCount = Count();
if (nRectCount > 0 && mnCurPos > nRectCount - 1)
{
@@ -160,14 +160,14 @@ Rectangle ZoomList::GetPreviousZoomRect()
|*
\************************************************************************/
-BOOL ZoomList::IsNextPossible() const
+sal_Bool ZoomList::IsNextPossible() const
{
- BOOL bPossible = FALSE;
- ULONG nRectCount = Count();
+ sal_Bool bPossible = sal_False;
+ sal_uLong nRectCount = Count();
if (nRectCount > 0 && mnCurPos < nRectCount - 1)
{
- bPossible = TRUE;
+ bPossible = sal_True;
}
return (bPossible);
@@ -179,13 +179,13 @@ BOOL ZoomList::IsNextPossible() const
|*
\************************************************************************/
-BOOL ZoomList::IsPreviousPossible() const
+sal_Bool ZoomList::IsPreviousPossible() const
{
- BOOL bPossible = FALSE;
+ sal_Bool bPossible = sal_False;
if (mnCurPos > 0)
{
- bPossible = TRUE;
+ bPossible = sal_True;
}
return (bPossible);
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index 55f620d867de..55f620d867de 100644..100755
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
diff --git a/sd/util/exports.dxp b/sd/util/exports.dxp
index 0c2e3e7cddd7..0cb5620a1603 100644..100755
--- a/sd/util/exports.dxp
+++ b/sd/util/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory \ No newline at end of file
diff --git a/sd/util/hidother.src b/sd/util/hidother.src
index 1a15c421b419..bd378fb6d75f 100644..100755
--- a/sd/util/hidother.src
+++ b/sd/util/hidother.src
@@ -24,28 +24,8 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+
#include "../inc/helpids.h"
-#include "hidother.hrc"
-#include "../inc/app.hrc"
-
-hidspecial SID_NOTESMODE { HelpId = SID_NOTESMODE; };
-hidspecial SID_HANDOUTMODE { HelpId = SID_HANDOUTMODE; };
-
-hidspecial SD_IF_SDAPP { HelpId = SD_IF_SDAPP; };
-hidspecial SD_IF_SDDRAWDOCSHELL { HelpId = SD_IF_SDDRAWDOCSHELL; };
-hidspecial SD_IF_SDVIEWSHELL { HelpId = SD_IF_SDVIEWSHELL; };
-hidspecial SD_IF_SDDRAWVIEWSHELL { HelpId = SD_IF_SDDRAWVIEWSHELL; };
-hidspecial SD_IF_SDSLIDEVIEWSHELL { HelpId = SD_IF_SDSLIDEVIEWSHELL; };
-hidspecial SD_IF_SDOUTLINEVIEWSHELL { HelpId = SD_IF_SDOUTLINEVIEWSHELL; };
-hidspecial SD_IF_SDDRAWSTDOBJECTBAR { HelpId = SD_IF_SDDRAWSTDOBJECTBAR; };
-hidspecial SD_IF_SDDRAWTEXTOBJECTBAR { HelpId = SD_IF_SDDRAWTEXTOBJECTBAR; };
-hidspecial SD_IF_SDDRAWBEZIEROBJECTBAR { HelpId = SD_IF_SDDRAWBEZIEROBJECTBAR; };
-hidspecial SD_IF_SDDRAWGLUEPOINTSOBJECTBAR { HelpId = SD_IF_SDDRAWGLUEPOINTSOBJECTBAR; };
-hidspecial SD_IF_SDGRAPHICDOCSHELL { HelpId = SD_IF_SDGRAPHICDOCSHELL; };
-hidspecial SD_IF_SDGRAPHICVIEWSHELL { HelpId = SD_IF_SDGRAPHICVIEWSHELL; };
-hidspecial SD_IF_SDGRAPHICSTDOBJECTBAR { HelpId = SD_IF_SDGRAPHICSTDOBJECTBAR; };
-hidspecial SD_IF_SDDRAWGRAFOBJECTBAR { HelpId = SD_IF_SDDRAWGRAFOBJECTBAR; };
-hidspecial SD_IF_SDPRESVIEWSHELL { HelpId = SD_IF_SDPRESVIEWSHELL; };
hidspecial HID_SD_PRINT_OPTIONS { HelpId = HID_SD_PRINT_OPTIONS; };
hidspecial HID_SD_OPTIONS_SNAP { HelpId = HID_SD_OPTIONS_SNAP; };
@@ -130,8 +110,6 @@ hidspecial HID_SD_NAMEDIALOG_LINEEND { HelpId = HID_SD_NAMEDIALOG_LINEEND; };
hidspecial HID_SD_TABPAGE_HEADERFOOTER_SLIDE { HelpId = HID_SD_TABPAGE_HEADERFOOTER_SLIDE; };
hidspecial HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT { HelpId = HID_SD_TABPAGE_HEADERFOOTER_NOTESHANDOUT; };
-hidspecial SD_IF_SDDRAWMEDIAOBJECTBAR { HelpId = SD_IF_SDDRAWMEDIAOBJECTBAR; };
-
hidspecial HID_SD_TASK_PANE { HelpId = HID_SD_TASK_PANE; };
hidspecial HID_SD_SLIDE_DESIGNS { HelpId = HID_SD_SLIDE_DESIGNS; };
hidspecial HID_SD_CURRENT_MASTERS { HelpId = HID_SD_CURRENT_MASTERS; };
@@ -194,8 +172,6 @@ hidspecial HID_SD_CUSTOMANIMATIONPANE_TRANSPARENCYPROPERTYBOX { HelpId = HID_S
hidspecial HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX { HelpId = HID_SD_CUSTOMANIMATIONPANE_SCALEPROPERTYBOX; };
hidspecial HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX { HelpId = HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX; };
-hidspecial SID_SAVEGRAPHIC { HelpId = SID_SAVEGRAPHIC; };
-
hidspecial HID_SD_SLIDESHOW_DISPLAY { HelpId = HID_SD_SLIDESHOW_DISPLAY; };
hidspecial HID_SD_RULER_HORIZONTAL { HelpId = HID_SD_RULER_HORIZONTAL; };
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index b0140f45417a..702cc27cddfc 100755
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -50,10 +50,11 @@ RESLIB1SRSFILES=\
$(SRS)$/notes.srs \
$(SRS)$/animui.srs \
$(SRS)$/slideshow.srs \
+ $(SRS)$/slsview.srs \
$(SRS)$/uitable.srs \
$(SRS)$/view.srs \
$(SRS)$/uiannotations.srs \
- $(SOLARCOMMONRESDIR)$/sfx.srs
+
# --- StarDraw DLL
@@ -86,7 +87,7 @@ SHL1STDLIBS+= \
$(UCBHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPULIB) \
- $(CANVASLIB) \
+ $(CANVASTOOLSLIB) \
$(SALLIB) \
$(SALHELPERLIB) \
$(AVMEDIALIB)
@@ -279,3 +280,16 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk
@echo Making: $@
@$(TYPE) sd.flt > $@
+ALLTAR : $(MISC)/sd.component $(MISC)/sdd.component
+
+$(MISC)/sd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sd.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sd.component
+
+$(MISC)/sdd.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ sdd.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt sdd.component
diff --git a/sd/util/sd.component b/sd/util/sd.component
new file mode 100644
index 000000000000..0d0011b4839e
--- /dev/null
+++ b/sd/util/sd.component
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Draw.DrawingDocument">
+ <service name="com.sun.star.drawing.DrawingDocument"/>
+ <service name="com.sun.star.drawing.DrawingDocumentFactory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.DrawingModule">
+ <service name="com.sun.star.drawing.ModuleDispatcher"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.PresentationDocument">
+ <service name="com.sun.star.drawing.DrawingDocumentFactory"/>
+ <service name="com.sun.star.presentation.PresentationDocument"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.PresenterCanvasFactory">
+ <service name="com.sun.star.rendering.Canvas"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.PresenterHelper">
+ <service name="com.sun.star.drawing.PresenterHelper"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.PresenterPreviewCache">
+ <service name="com.sun.star.drawing.PresenterPreviewCache"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.PresenterTextView">
+ <service name="com.sun.star.drawing.PresenterTextView"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.SlideRenderer">
+ <service name="com.sun.star.drawing.SlideRenderer"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.SlideSorter">
+ <service name="com.sun.star.drawing.SlideSorter"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.BasicPaneFactory">
+ <service name="com.sun.star.drawing.framework.BasicPaneFactory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.BasicToolBarFactory">
+ <service name="com.sun.star.drawing.framework.BasicToolBarFactory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.BasicViewFactory">
+ <service name="com.sun.star.drawing.framework.BasicViewFactory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.PresentationFactoryProvider">
+ <service name="com.sun.star.drawing.framework.PresentationFactoryProvider"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.ResourceId">
+ <service name="com.sun.star.drawing.framework.ResourceId"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.TaskPanelFactory">
+ <service name="com.sun.star.drawing.framework.TaskPanelFactory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.configuration.Configuration">
+ <service name="com.sun.star.drawing.framework.Configuration"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.configuration.ConfigurationController">
+ <service name="com.sun.star.drawing.framework.ConfigurationController"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.Draw.framework.module.ModuleController">
+ <service name="com.sun.star.drawing.framework.ModuleController"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.draw.SdHtmlOptionsDialog">
+ <service name="com.sun.star.ui.dialog.FilterOptionsDialog"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.drawing.ToolPanelFactory">
+ <service name="com.sun.star.drawing.DefaultToolPanelFactory"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sd.InsertSlideController">
+ <service name="com.sun.star.frame.ToolbarController"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.sd.SlideLayoutController">
+ <service name="com.sun.star.frame.ToolbarController"/>
+ </implementation>
+ <implementation name="sd::RandomAnimationNode">
+ <service name="com.sun.star.comp.sd.RandomAnimationNode"/>
+ </implementation>
+</component>
diff --git a/sd/util/sdd.component b/sd/util/sdd.component
new file mode 100644
index 000000000000..51160d0f04fe
--- /dev/null
+++ b/sd/util/sdd.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.draw.FormatDetector">
+ <service name="com.sun.star.frame.ExtendedTypeDetection"/>
+ </implementation>
+</component>
diff --git a/slideshow/prj/build.lst b/slideshow/prj/build.lst
index 2b2080dfd5b5..25ecb52922f5 100644
--- a/slideshow/prj/build.lst
+++ b/slideshow/prj/build.lst
@@ -1,4 +1,4 @@
-pe slideshow : tools sal cppu vcl comphelper cppuhelper offuh cppcanvas basegfx svtools unotools toolkit animations avmedia MESA:Mesa NULL
+pe slideshow : tools sal cppu vcl comphelper cppuhelper offuh cppcanvas basegfx svtools unotools toolkit animations avmedia MESA:Mesa LIBXSLT:libxslt NULL
pe slideshow usr1 - all pe_mkout NULL
pe slideshow\inc nmake - all pe_inc NULL
pe slideshow\source\engine nmake - all pe_engine pe_inc NULL
diff --git a/slideshow/prj/d.lst b/slideshow/prj/d.lst
index 2015e1311834..f6707c2491f4 100644
--- a/slideshow/prj/d.lst
+++ b/slideshow/prj/d.lst
@@ -4,3 +4,5 @@
..\%__SRC%\lib\slideshow.uno.so %_DEST%\lib%_EXT%\slideshow.uno.so
..\%__SRC%\lib\OGLTrans.uno.so %_DEST%\lib%_EXT%\OGLTrans.uno.so
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
+..\%__SRC%\misc\ogltrans.component %_DEST%\xml%_EXT%\ogltrans.component
+..\%__SRC%\misc\slideshow.component %_DEST%\xml%_EXT%\slideshow.component
diff --git a/slideshow/source/engine/OGLTrans/exports.dxp b/slideshow/source/engine/OGLTrans/exports.dxp
index 9630d7e06768..f0e1c69934bc 100644
--- a/slideshow/source/engine/OGLTrans/exports.dxp
+++ b/slideshow/source/engine/OGLTrans/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory
diff --git a/slideshow/source/engine/OGLTrans/ogltrans.component b/slideshow/source/engine/OGLTrans/ogltrans.component
new file mode 100644
index 000000000000..89f2384b0d6c
--- /dev/null
+++ b/slideshow/source/engine/OGLTrans/ogltrans.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.presentation.OGLTransitionFactory">
+ <service name="com.sun.star.presentation.TransitionFactory"/>
+ </implementation>
+</component>
diff --git a/slideshow/source/engine/OGLTrans/win/makefile.mk b/slideshow/source/engine/OGLTrans/win/makefile.mk
index b7b9d6a68ba5..7da37872368d 100644
--- a/slideshow/source/engine/OGLTrans/win/makefile.mk
+++ b/slideshow/source/engine/OGLTrans/win/makefile.mk
@@ -70,3 +70,11 @@ DEF1EXPORTFILE=../exports.dxp
# ==========================================================================
.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/ogltrans.component
+
+$(MISC)/ogltrans.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ ogltrans.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt ogltrans.component
diff --git a/slideshow/source/engine/makefile.mk b/slideshow/source/engine/makefile.mk
index beac66778518..fdc99cd1ad9f 100644
--- a/slideshow/source/engine/makefile.mk
+++ b/slideshow/source/engine/makefile.mk
@@ -38,7 +38,7 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : $(PRJ)$/util$/makefile.pmk
.IF "$(ENABLE_PRESENTER_EXTRA_UI)"=="YES"
-CDEFS+=-DENABLE_PRESENTER_EXTRA_UI
+ENABLE_PRESENTER_EXTRA_UI is not used anymore
.ENDIF
# --- Common ----------------------------------------------------------
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 68e3830523e0..dec32a95262d 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -308,19 +308,19 @@ sal_Int32 getNextActionOffset( MetaAction * pCurrAct )
switch (pCurrAct->GetType()) {
case META_TEXT_ACTION: {
MetaTextAction * pAct = static_cast<MetaTextAction *>(pCurrAct);
- return (pAct->GetLen() == (USHORT)STRING_LEN
+ return (pAct->GetLen() == (sal_uInt16)STRING_LEN
? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen());
}
case META_TEXTARRAY_ACTION: {
MetaTextArrayAction * pAct =
static_cast<MetaTextArrayAction *>(pCurrAct);
- return (pAct->GetLen() == (USHORT)STRING_LEN
+ return (pAct->GetLen() == (sal_uInt16)STRING_LEN
? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen());
}
case META_STRETCHTEXT_ACTION: {
MetaStretchTextAction * pAct =
static_cast<MetaStretchTextAction *>(pCurrAct);
- return (pAct->GetLen() == (USHORT)STRING_LEN
+ return (pAct->GetLen() == (sal_uInt16)STRING_LEN
? pAct->GetText().Len() - pAct->GetIndex() : pAct->GetLen());
}
case META_FLOATTRANSPARENT_ACTION: {
@@ -358,12 +358,12 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
// update modes)
VirtualDevice aVDev;
aVDev.SetOutputSizePixel( aAnimSize );
- aVDev.EnableMapMode( FALSE );
+ aVDev.EnableMapMode( sal_False );
// setup mask VDev (alpha VDev is currently rather slow)
VirtualDevice aVDevMask;
aVDevMask.SetOutputSizePixel( aAnimSize );
- aVDevMask.EnableMapMode( FALSE );
+ aVDevMask.EnableMapMode( sal_False );
switch( aAnimation.GetCycleMode() )
{
@@ -392,7 +392,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames,
break;
}
- for( USHORT i=0, nCount=aAnimation.Count(); i<nCount; ++i )
+ for( sal_uInt16 i=0, nCount=aAnimation.Count(); i<nCount; ++i )
{
const AnimationBitmap& rAnimBmp( aAnimation.Get(i) );
switch(rAnimBmp.eDisposal)
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index fde007e17d23..e7dc67f79e0b 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -416,8 +416,8 @@ ShapeSharedPtr ShapeImporter::createShape(
aGraphAttrs.SetChannelG( nGreen );
aGraphAttrs.SetChannelB( nBlue );
aGraphAttrs.SetGamma( nGamma );
- aGraphAttrs.SetTransparency( static_cast<BYTE>(nTransparency) );
- aGraphAttrs.SetRotation( static_cast<USHORT>(nRotation*10) );
+ aGraphAttrs.SetTransparency( static_cast<sal_uInt8>(nTransparency) );
+ aGraphAttrs.SetRotation( static_cast<sal_uInt16>(nRotation*10) );
text::GraphicCrop aGraphCrop;
if( getPropertyValue( aGraphCrop, xPropSet, OUSTR("GraphicCrop") ))
@@ -654,20 +654,13 @@ ShapeImporter::ShapeImporter( uno::Reference<drawing::XDrawPage> const&
sal_Int32 nOrdNumStart,
bool bConvertingMasterPage ) :
mxPage( xActualPage ),
-#ifdef ENABLE_PRESENTER_EXTRA_UI
mxPagesSupplier( xPagesSupplier ),
-#else
- mxPagesSupplier( NULL ),
-#endif
mrContext( rContext ),
maPolygons(),
maShapesStack(),
mnAscendingPrio( nOrdNumStart ),
mbConvertingMasterPage( bConvertingMasterPage )
{
-#ifndef ENABLE_PRESENTER_EXTRA_UI
- (void)xPagesSupplier;
-#endif
uno::Reference<drawing::XShapes> const xShapes(
xPage, uno::UNO_QUERY_THROW );
maShapesStack.push( XShapesEntry(xShapes) );
diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx
index e861b789e561..83324fb630b9 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -40,7 +40,7 @@
#include <cppuhelper/exc_hlp.hxx>
#include <vcl/window.hxx>
-#include <vcl/javachild.hxx>
+#include <vcl/syschild.hxx>
#include <vcl/salbtype.hxx>
#ifdef GSTREAMER
#include <vcl/sysdata.hxx>
@@ -157,11 +157,7 @@ namespace slideshow
mxPlayerWindow.clear();
}
-#ifdef GSTREAMER
mpMediaWindow = ::std::auto_ptr< SystemChildWindow >();
-#else
- mpMediaWindow = ::std::auto_ptr< JavaChildWindow >();
-#endif
// shutdown player
if( mxPlayer.is() )
@@ -447,17 +443,12 @@ namespace slideshow
rRangePix.getMaxX() - rRangePix.getMinX(),
rRangePix.getMaxY() - rRangePix.getMinY() );
-#ifdef GSTREAMER
- OSL_TRACE( "created sys child window for viewmediashape" );
+ mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new
+ SystemChildWindow( pWindow, WB_CLIPCHILDREN ) );
mpMediaWindow = ::std::auto_ptr< SystemChildWindow >( new SystemChildWindow( pWindow, WB_CLIPCHILDREN ) );
-#else
- mpMediaWindow = ::std::auto_ptr< JavaChildWindow >( new JavaChildWindow( pWindow, WB_CLIPCHILDREN ) );
-#endif
mpMediaWindow->SetBackground( Color( COL_BLACK ) );
- mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X,
- aAWTRect.Y ),
- Size( aAWTRect.Width,
- aAWTRect.Height ));
+ mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ),
+ Size( aAWTRect.Width, aAWTRect.Height ) );
mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP );
mpMediaWindow->EnableEraseBackground( FALSE );
mpMediaWindow->EnablePaint( FALSE );
@@ -469,8 +460,7 @@ namespace slideshow
{
#ifndef GSTREAMER
aArgs[ 0 ] = uno::makeAny(
- sal::static_int_cast<sal_IntPtr>(
- mpMediaWindow->getParentWindowHandleForJava()) );
+ sal::static_int_cast< sal_IntPtr >( mpMediaWindow->GetParentWindowHandle() ) );
#else
aArgs[ 0 ] = uno::makeAny ( (sal_Int32) 0 );
#endif
@@ -482,6 +472,8 @@ namespace slideshow
aArgs[ 2 ] = uno::makeAny( pSystemData->aWindow );
#endif
+ aArgs[ 2 ] = uno::makeAny( reinterpret_cast< sal_IntPtr >( mpMediaWindow.get() ) );
+
mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) );
if( mxPlayerWindow.is() )
@@ -543,9 +535,7 @@ namespace slideshow
if( mxPlayer.is() )
{
- aArgs[ 0 ] = uno::makeAny(
- sal::static_int_cast<sal_Int32>(
- aWNDVal) );
+ aArgs[ 0 ] = uno::makeAny( sal::static_int_cast< sal_Int32 >( aWNDVal) );
aArgs[ 1 ] = uno::makeAny( aAWTRect );
mxPlayerWindow.set( mxPlayer->createPlayerWindow( aArgs ) );
diff --git a/slideshow/source/engine/shapes/viewmediashape.hxx b/slideshow/source/engine/shapes/viewmediashape.hxx
index 4815f2dc9e6a..5eba4a8c6a42 100644
--- a/slideshow/source/engine/shapes/viewmediashape.hxx
+++ b/slideshow/source/engine/shapes/viewmediashape.hxx
@@ -37,7 +37,6 @@
#include "viewlayer.hxx"
-class JavaChildWindow;
class SystemChildWindow;
namespace com { namespace sun { namespace star { namespace drawing {
@@ -157,11 +156,7 @@ namespace slideshow
const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rDXDeviceParams );
ViewLayerSharedPtr mpViewLayer;
-#ifdef GSTREAMER
::std::auto_ptr< SystemChildWindow > mpMediaWindow;
-#else
- ::std::auto_ptr< JavaChildWindow > mpMediaWindow;
-#endif
mutable ::com::sun::star::awt::Point maWindowOffset;
mutable ::basegfx::B2DRectangle maBounds;
diff --git a/slideshow/source/engine/slide/layermanager.hxx b/slideshow/source/engine/slide/layermanager.hxx
index aee137e140aa..74a643430192 100644
--- a/slideshow/source/engine/slide/layermanager.hxx
+++ b/slideshow/source/engine/slide/layermanager.hxx
@@ -366,10 +366,10 @@ namespace slideshow
/// Number of shape sprites currenly active on this LayerManager
sal_Int32 mnActiveSprites;
- /// TRUE, if shapes might need to move to different layer
+ /// sal_True, if shapes might need to move to different layer
bool mbLayerAssociationDirty;
- /// FALSE when deactivated
+ /// sal_False when deactivated
bool mbActive;
/** When true, all sprite animations run in the foreground. That
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index c644a0016cc4..506bd53fa775 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -142,6 +142,10 @@ public:
virtual PolyPolygonVector getPolygons();
virtual void drawPolygons() const;
virtual bool isPaintOverlayActive() const;
+ virtual void enablePaintOverlay();
+ virtual void disablePaintOverlay();
+ virtual void update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth );
+
// TODO(F2): Rework SlideBitmap to no longer be based on XBitmap,
// but on canvas-independent basegfx bitmaps
@@ -159,6 +163,9 @@ private:
virtual bool requestCursor( sal_Int16 nCursorShape );
virtual void resetCursor();
+ void activatePaintOverlay();
+ void deactivatePaintOverlay();
+
/** Query whether the slide has animations at all
If the slide doesn't have animations, show() displays
@@ -171,9 +178,6 @@ private:
*/
bool isAnimated();
- void enablePaintOverlay();
- void disablePaintOverlay();
-
/// Set all Shapes to their initial attributes for slideshow
bool applyInitialShapeAttributes( const ::com::sun::star::uno::Reference<
::com::sun::star::animations::XAnimationNode >& xRootAnimationNode );
@@ -416,6 +420,13 @@ SlideImpl::SlideImpl( const uno::Reference< drawing::XDrawPage >& xDra
maContext.mrScreenUpdater.addViewUpdate(mpShapeManager);
}
+void SlideImpl::update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth )
+{
+ maUserPaintColor = aUserPaintColor;
+ mdUserPaintStrokeWidth = dUserPaintStrokeWidth;
+ mbUserPaintOverlayEnabled = bUserPaintEnabled;
+}
+
SlideImpl::~SlideImpl()
{
if( mpShapeManager )
@@ -451,9 +462,7 @@ void SlideImpl::dispose()
mpShapeManager.reset();
mxRootNode.clear();
mxDrawPage.clear();
-#ifndef ENABLE_PRESENTER_EXTRA_UI
mxDrawPagesSupplier.clear();
-#endif
}
bool SlideImpl::prefetch()
@@ -539,7 +548,7 @@ bool SlideImpl::show( bool bSlideBackgoundPainted )
// ---------------------------------------------------------------
// enable paint overlay, if maUserPaintColor is valid
- enablePaintOverlay();
+ activatePaintOverlay();
// ---------------------------------------------------------------
@@ -563,7 +572,7 @@ void SlideImpl::hide()
// disable user paint overlay under all circumstances,
// this slide now ceases to be active.
- disablePaintOverlay();
+ deactivatePaintOverlay();
// ---------------------------------------------------------------
@@ -880,19 +889,33 @@ bool SlideImpl::implPrefetchShow()
void SlideImpl::enablePaintOverlay()
{
- if( mbUserPaintOverlayEnabled )
+ if( !mbUserPaintOverlayEnabled || !mbPaintOverlayActive )
+ {
+ mbUserPaintOverlayEnabled = true;
+ activatePaintOverlay();
+ }
+}
+
+void SlideImpl::disablePaintOverlay()
+{
+}
+
+void SlideImpl::activatePaintOverlay()
+{
+ if( mbUserPaintOverlayEnabled || !maPolygons.empty() )
{
mpPaintOverlay = UserPaintOverlay::create( maUserPaintColor,
mdUserPaintStrokeWidth,
maContext,
- maPolygons );
+ maPolygons,
+ mbUserPaintOverlayEnabled );
mbPaintOverlayActive = true;
}
}
void SlideImpl::drawPolygons() const
{
- if( mbUserPaintOverlayEnabled )
+ if( mpPaintOverlay )
mpPaintOverlay->drawPolygons();
}
@@ -915,7 +938,7 @@ bool SlideImpl::isPaintOverlayActive() const
return mbPaintOverlayActive;
}
-void SlideImpl::disablePaintOverlay()
+void SlideImpl::deactivatePaintOverlay()
{
if(mbPaintOverlayActive)
maPolygons = mpPaintOverlay->getPolygons();
@@ -1251,12 +1274,7 @@ SlideSharedPtr createSlide( const uno::Reference< drawing::XDrawPage >&
bool bIntrinsicAnimationsAllowed,
bool bDisableAnimationZOrder )
{
-#ifdef ENABLE_PRESENTER_EXTRA_UI
boost::shared_ptr<SlideImpl> pRet( new SlideImpl( xDrawPage, xDrawPages, xRootNode, rEventQueue,
-#else
- (void)xDrawPages;
- boost::shared_ptr<SlideImpl> pRet( new SlideImpl( xDrawPage, NULL, xRootNode, rEventQueue,
-#endif
rEventMultiplexer, rScreenUpdater,
rActivitiesQueue, rUserEventQueue,
rCursorManager, rViewContainer,
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index 45af355700bc..88e3e38425b7 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -71,8 +71,9 @@ namespace slideshow
ActivitiesQueue& rActivitiesQueue,
ScreenUpdater& rScreenUpdater,
const UnoViewContainer& rViews,
- Slide& rSlide,
- const PolyPolygonVector& rPolygons ) :
+ Slide& rSlide,
+ const PolyPolygonVector& rPolygons,
+ bool bActive ) :
mrActivitiesQueue( rActivitiesQueue ),
mrScreenUpdater( rScreenUpdater ),
maViews(),
@@ -88,7 +89,8 @@ namespace slideshow
//handle the "remove stroke by stroke" mode of erasing
mbIsEraseModeActivated( false ),
mrSlide(rSlide),
- mnSize(100)
+ mnSize(100),
+ mbActive( bActive )
{
std::for_each( rViews.begin(),
rViews.end(),
@@ -130,6 +132,8 @@ namespace slideshow
bool colorChanged( RGBColor const& rUserColor )
{
+ mbIsLastPointValid = false;
+ mbActive = true;
this->maStrokeColor = rUserColor;
this->mbIsEraseModeActivated = false;
return true;
@@ -142,22 +146,15 @@ namespace slideshow
return true;
}
- bool eraseAllInkChanged( bool const& rEraseAllInk )
+ void repaintWithoutPolygons()
{
- this->mbIsEraseAllModeActivated= rEraseAllInk;
- // if the erase all mode is activated it will remove all ink from slide,
- // therefor destroy all the polygons stored
- if(mbIsEraseAllModeActivated)
- {
- // The Erase Mode should be desactivated
- mbIsEraseModeActivated = false;
// must get access to the instance to erase all polygon
for( UnoViewVector::iterator aIter=maViews.begin(), aEnd=maViews.end();
aIter!=aEnd;
++aIter )
{
// fully clear view content to background color
- (*aIter)->getCanvas()->clear();
+ //(*aIter)->getCanvas()->clear();
//get via SlideImpl instance the bitmap of the slide unmodified to redraw it
SlideBitmapSharedPtr pBitmap( mrSlide.getCurrentSlideBitmap( (*aIter) ) );
@@ -182,7 +179,19 @@ namespace slideshow
mrScreenUpdater.notifyUpdate(*aIter,true);
}
- maPolygons.clear();
+ }
+
+ bool eraseAllInkChanged( bool const& rEraseAllInk )
+ {
+ this->mbIsEraseAllModeActivated= rEraseAllInk;
+ // if the erase all mode is activated it will remove all ink from slide,
+ // therefor destroy all the polygons stored
+ if(mbIsEraseAllModeActivated)
+ {
+ // The Erase Mode should be desactivated
+ mbIsEraseModeActivated = false;
+ repaintWithoutPolygons();
+ maPolygons.clear();
}
mbIsEraseAllModeActivated=false;
return true;
@@ -199,18 +208,25 @@ namespace slideshow
bool switchPenMode()
{
+ mbIsLastPointValid = false;
+ mbActive = true;
this->mbIsEraseModeActivated = false;
return true;
}
bool switchEraserMode()
{
+ mbIsLastPointValid = false;
+ mbActive = true;
this->mbIsEraseModeActivated = true;
return true;
}
bool disable()
{
+ mbIsLastPointValid = false;
+ mbIsLastMouseDownPosValid = false;
+ mbActive = false;
return true;
}
@@ -236,6 +252,9 @@ namespace slideshow
// MouseEventHandler methods
virtual bool handleMousePressed( const awt::MouseEvent& e )
{
+ if( !mbActive )
+ return false;
+
if (e.Buttons == awt::MouseButton::RIGHT)
{
mbIsLastPointValid = false;
@@ -256,6 +275,9 @@ namespace slideshow
virtual bool handleMouseReleased( const awt::MouseEvent& e )
{
+ if( !mbActive )
+ return false;
+
if (e.Buttons == awt::MouseButton::RIGHT)
{
mbIsLastPointValid = false;
@@ -290,6 +312,9 @@ namespace slideshow
virtual bool handleMouseEntered( const awt::MouseEvent& e )
{
+ if( !mbActive )
+ return false;
+
mbIsLastPointValid = true;
maLastPoint.setX( e.X );
maLastPoint.setY( e.Y );
@@ -299,6 +324,9 @@ namespace slideshow
virtual bool handleMouseExited( const awt::MouseEvent& )
{
+ if( !mbActive )
+ return false;
+
mbIsLastPointValid = false;
mbIsLastMouseDownPosValid = false;
@@ -307,7 +335,16 @@ namespace slideshow
virtual bool handleMouseDragged( const awt::MouseEvent& e )
{
- if(mbIsEraseModeActivated)
+ if( !mbActive )
+ return false;
+
+ if (e.Buttons == awt::MouseButton::RIGHT)
+ {
+ mbIsLastPointValid = false;
+ return false;
+ }
+
+ if(mbIsEraseModeActivated)
{
//define the last point as an object
//we suppose that there's no way this point could be valid
@@ -422,6 +459,14 @@ namespace slideshow
}
+ void update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth )
+ {
+ maStrokeColor = aUserPaintColor;
+ mnStrokeWidth = dUserPaintStrokeWidth;
+ mbActive = bUserPaintEnabled;
+ if( !mbActive )
+ disable();
+ }
private:
ActivitiesQueue& mrActivitiesQueue;
@@ -439,17 +484,20 @@ namespace slideshow
bool mbIsEraseModeActivated;
Slide& mrSlide;
sal_Int32 mnSize;
+ bool mbActive;
};
UserPaintOverlaySharedPtr UserPaintOverlay::create( const RGBColor& rStrokeColor,
double nStrokeWidth,
const SlideShowContext& rContext,
- const PolyPolygonVector& rPolygons )
+ const PolyPolygonVector& rPolygons,
+ bool bActive )
{
UserPaintOverlaySharedPtr pRet( new UserPaintOverlay( rStrokeColor,
nStrokeWidth,
rContext,
- rPolygons ));
+ rPolygons,
+ bActive));
return pRet;
}
@@ -457,7 +505,8 @@ namespace slideshow
UserPaintOverlay::UserPaintOverlay( const RGBColor& rStrokeColor,
double nStrokeWidth,
const SlideShowContext& rContext,
- const PolyPolygonVector& rPolygons ) :
+ const PolyPolygonVector& rPolygons,
+ bool bActive ) :
mpHandler( new PaintOverlayHandler( rStrokeColor,
nStrokeWidth,
rContext.mrActivitiesQueue,
@@ -465,7 +514,7 @@ namespace slideshow
rContext.mrViewContainer,
//adding a link to Slide
dynamic_cast<Slide&>(rContext.mrCursorManager),
- rPolygons )),
+ rPolygons, bActive )),
mrMultiplexer( rContext.mrEventMultiplexer )
{
mrMultiplexer.addClickHandler( mpHandler, 3.0 );
@@ -484,6 +533,12 @@ namespace slideshow
mpHandler->drawPolygons();
}
+ void UserPaintOverlay::update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth )
+ {
+ mpHandler->update_settings( bUserPaintEnabled, aUserPaintColor, dUserPaintStrokeWidth );
+ }
+
+
UserPaintOverlay::~UserPaintOverlay()
{
try
diff --git a/slideshow/source/engine/slide/userpaintoverlay.hxx b/slideshow/source/engine/slide/userpaintoverlay.hxx
index 706156466c97..05abeaea2056 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.hxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.hxx
@@ -70,16 +70,21 @@ namespace slideshow
static UserPaintOverlaySharedPtr create( const RGBColor& rStrokeColor,
double nStrokeWidth,
const SlideShowContext& rContext,
- const PolyPolygonVector& rPolygons );
+ const PolyPolygonVector& rPolygons,
+ bool bActive);
~UserPaintOverlay();
PolyPolygonVector getPolygons();
void drawPolygons();
+ void update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth );
+
+
private:
UserPaintOverlay( const RGBColor& rStrokeColor,
double nStrokeWidth,
const SlideShowContext& rContext,
- const PolyPolygonVector& rPolygons );
+ const PolyPolygonVector& rPolygons,
+ bool bActive );
::boost::shared_ptr<PaintOverlayHandler> mpHandler;
EventMultiplexer& mrMultiplexer;
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index f02440109c46..d29dea85d9c7 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -448,7 +448,7 @@ private:
boost::optional<RGBColor> maUserPaintColor;
- boost::optional<double> maUserPaintStrokeWidth;
+ double maUserPaintStrokeWidth;
//changed for the eraser project
boost::optional<bool> maEraseAllInk;
@@ -937,7 +937,7 @@ SlideSharedPtr SlideShowImpl::makeSlide(
maShapeCursors,
(aIter != maPolygons.end()) ? aIter->second : PolyPolygonVector(),
maUserPaintColor ? *maUserPaintColor : RGBColor(),
- *maUserPaintStrokeWidth,
+ maUserPaintStrokeWidth,
!!maUserPaintColor,
mbImageAnimationsAllowed,
mbDisableAnimationZOrder) );
@@ -1096,11 +1096,7 @@ void SlideShowImpl::displaySlide(
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();
-#ifdef ENABLE_PRESENTER_EXTRA_UI
mxDrawPagesSupplier = xDrawPages;
-#else
- mxDrawPagesSupplier = NULL;
-#endif
stopShow(); // MUST call that: results in
// maUserEventQueue.clear(). What's more,
@@ -1602,6 +1598,9 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
// enable user paint
maUserPaintColor.reset( unoColor2RGBColor( nColor ) );
+ if( mpCurrentSlide && !mpCurrentSlide->isPaintOverlayActive() )
+ mpCurrentSlide->enablePaintOverlay();
+
maEventMultiplexer.notifyUserPaintColor( *maUserPaintColor );
}
else
@@ -1609,10 +1608,11 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
// disable user paint
maUserPaintColor.reset();
maEventMultiplexer.notifyUserPaintDisabled();
+ if( mpCurrentSlide )
+ mpCurrentSlide->disablePaintOverlay();
}
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
+ resetCursor();
return true;
}
@@ -1631,15 +1631,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEraseAllInk.reset( nEraseAllInk );
maEventMultiplexer.notifyEraseAllInk( *maEraseAllInk );
}
- else
- {
- // disable user paint
- maEraseAllInk.reset();
- maEventMultiplexer.notifyUserPaintDisabled();
- }
-
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
return true;
}
@@ -1659,9 +1650,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEventMultiplexer.notifySwitchPenMode();
}
}
-
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
return true;
}
@@ -1680,8 +1668,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
}
}
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
return true;
}
@@ -1698,15 +1684,6 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
maEraseInk.reset( nEraseInk );
maEventMultiplexer.notifyEraseInkWidth( *maEraseInk );
}
- else
- {
- // disable user paint
- maEraseInk.reset();
- maEventMultiplexer.notifyUserPaintDisabled();
- }
-
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
return true;
}
@@ -1720,17 +1697,10 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
{
OSL_ENSURE( mbMouseVisible,"setProperty(): User paint overrides invisible mouse" );
// enable user paint stroke width
- maUserPaintStrokeWidth.reset( nWidth );
- maEventMultiplexer.notifyUserPaintStrokeWidth( *maUserPaintStrokeWidth );
+ maUserPaintStrokeWidth = nWidth;
+ maEventMultiplexer.notifyUserPaintStrokeWidth( maUserPaintStrokeWidth );
}
- else
- {
- // disable user paint stroke width
- maUserPaintStrokeWidth.reset();
- maEventMultiplexer.notifyUserPaintDisabled();
- }
- if( mnCurrentCursor == awt::SystemPointer::ARROW )
- resetCursor();
+
return true;
}
@@ -2193,6 +2163,8 @@ void SlideShowImpl::notifySlideTransitionEnded( bool bPaintSlide )
"notifySlideTransitionEnded(): Invalid current slide" );
if (mpCurrentSlide)
{
+ mpCurrentSlide->update_settings( !!maUserPaintColor, maUserPaintColor ? *maUserPaintColor : RGBColor(), maUserPaintStrokeWidth );
+
// first init show, to give the animations
// the chance to register SlideStartEvents
const bool bBackgroundLayerRendered( !bPaintSlide );
diff --git a/slideshow/source/inc/slide.hxx b/slideshow/source/inc/slide.hxx
index e0d3464c747e..a43a5dd67904 100644
--- a/slideshow/source/inc/slide.hxx
+++ b/slideshow/source/inc/slide.hxx
@@ -122,9 +122,14 @@ namespace slideshow
///Draw the slide Polygons
virtual void drawPolygons() const = 0;
- ///Check if slide is already active
+ ///Check if paint overlay is already active
virtual bool isPaintOverlayActive() const = 0;
+ virtual void enablePaintOverlay() = 0;
+ virtual void disablePaintOverlay() = 0;
+
+ virtual void update_settings( bool bUserPaintEnabled, RGBColor const& aUserPaintColor, double dUserPaintStrokeWidth ) = 0;
+
// Slide bitmaps
// -------------------------------------------------------------------
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx
index 154be6c1307f..68cb0893d531 100644
--- a/slideshow/test/demoshow.cxx
+++ b/slideshow/test/demoshow.cxx
@@ -315,7 +315,7 @@ class DemoApp : public Application
{
public:
virtual void Main();
- virtual USHORT Exception( USHORT nError );
+ virtual sal_uInt16 Exception( sal_uInt16 nError );
};
class ChildWindow : public Window
@@ -434,7 +434,7 @@ DemoWindow::DemoWindow() :
Show();
maUpdateTimer.SetTimeoutHdl(LINK(this, DemoWindow, updateHdl));
- maUpdateTimer.SetTimeout( (ULONG)30 );
+ maUpdateTimer.SetTimeout( (sal_uLong)30 );
maUpdateTimer.Start();
}
@@ -504,7 +504,7 @@ void DemoWindow::Resize()
// TODO
}
-USHORT DemoApp::Exception( USHORT nError )
+sal_uInt16 DemoApp::Exception( sal_uInt16 nError )
{
switch( nError & EXC_MAJORTYPE )
{
@@ -519,7 +519,7 @@ void DemoApp::Main()
{
bool bHelp = false;
- for( USHORT i = 0; i < GetCommandLineParamCount(); i++ )
+ for( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ )
{
::rtl::OUString aParam = GetCommandLineParam( i );
diff --git a/slideshow/util/exports.dxp b/slideshow/util/exports.dxp
index 0c2e3e7cddd7..0cb5620a1603 100644
--- a/slideshow/util/exports.dxp
+++ b/slideshow/util/exports.dxp
@@ -1,3 +1,2 @@
component_getImplementationEnvironment
-component_writeInfo
component_getFactory \ No newline at end of file
diff --git a/slideshow/util/makefile.mk b/slideshow/util/makefile.mk
index def425b60469..9d9bee14a198 100644
--- a/slideshow/util/makefile.mk
+++ b/slideshow/util/makefile.mk
@@ -102,3 +102,11 @@ $(MISC)$/$(SHL2TARGET).flt: makefile.mk \
$(TARGET2).flt
+$(TYPE) $(TARGET2).flt > $@
+
+ALLTAR : $(MISC)/slideshow.component
+
+$(MISC)/slideshow.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ slideshow.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt slideshow.component
diff --git a/slideshow/util/makefile.pmk b/slideshow/util/makefile.pmk
index 53724522d5e8..765b5249e5a4 100644
--- a/slideshow/util/makefile.pmk
+++ b/slideshow/util/makefile.pmk
@@ -35,7 +35,7 @@ CDEFS += -DBOOST_SP_ENABLE_DEBUG_HOOKS
.IF "$(COM)"=="MSC"
# disable inlining for MSVC
-CFLAGS += -Ob0
+#CFLAGS += -Ob0
.ENDIF
.ENDIF # "$(debug)"!="" || "$(DEBUG)"!=""
diff --git a/slideshow/util/slideshow.component b/slideshow/util/slideshow.component
new file mode 100644
index 000000000000..540c586f1ff5
--- /dev/null
+++ b/slideshow/util/slideshow.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* 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.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.presentation.SlideShow">
+ <service name="com.sun.star.presentation.SlideShow"/>
+ </implementation>
+</component>