summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2010-06-17 18:13:10 +0200
committerMathias Bauer <mba@openoffice.org>2010-06-17 18:13:10 +0200
commit2a9278560603a2725e496ed50c675b371c144b23 (patch)
treef76433471885fcf5e6ea7c990334c48df350951b /sd
parent75bba75668031bec7477383bfcc5dfa63129b1d5 (diff)
parent8c75156a84a5088506c49101efad199dc7b8d05e (diff)
CWS mba33issues01: rebase to m83
Diffstat (limited to 'sd')
-rwxr-xr-x[-rw-r--r--]sd/inc/Outliner.hxx21
-rwxr-xr-x[-rw-r--r--]sd/inc/OutlinerIterator.hxx31
-rwxr-xr-x[-rw-r--r--]sd/inc/app.hrc4
-rwxr-xr-x[-rw-r--r--]sd/inc/cusshow.hxx4
-rwxr-xr-x[-rw-r--r--]sd/inc/drawdoc.hxx14
-rwxr-xr-x[-rw-r--r--]sd/inc/glob.hrc3
-rwxr-xr-x[-rw-r--r--]sd/inc/glob.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/pres.hxx90
-rwxr-xr-x[-rw-r--r--]sd/inc/sdmod.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/sdpage.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/shapelist.hxx8
-rwxr-xr-x[-rw-r--r--]sd/inc/stlpool.hxx2
-rwxr-xr-x[-rw-r--r--]sd/inc/textapi.hxx1
-rw-r--r--[-rwxr-xr-x]sd/prj/build.lst3
-rwxr-xr-x[-rw-r--r--]sd/prj/d.lst19
-rw-r--r--sd/sdi/ToolPanelViewShell.sdi (renamed from sd/sdi/TaskPaneViewShell.sdi)5
-rwxr-xr-x[-rw-r--r--]sd/sdi/ViewShellBase.sdi32
-rwxr-xr-x[-rw-r--r--]sd/sdi/_drvwsh.sdi15
-rwxr-xr-x[-rw-r--r--]sd/sdi/drtxtob.sdi6
-rwxr-xr-x[-rw-r--r--]sd/sdi/makefile.mk4
-rwxr-xr-x[-rw-r--r--]sd/sdi/outlnvsh.sdi15
-rwxr-xr-x[-rw-r--r--]sd/sdi/sdraw.sdi2
-rwxr-xr-x[-rw-r--r--]sd/sdi/sdslots.sdi2
-rwxr-xr-x[-rw-r--r--]sd/source/core/CustomAnimationEffect.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/core/cusshow.cxx10
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc2.cxx35
-rwxr-xr-x[-rw-r--r--]sd/source/core/drawdoc4.cxx77
-rwxr-xr-x[-rw-r--r--]sd/source/core/glob.src2
-rwxr-xr-x[-rw-r--r--]sd/source/core/sdpage.cxx165
-rwxr-xr-x[-rw-r--r--]sd/source/core/shapelist.cxx57
-rwxr-xr-x[-rw-r--r--]sd/source/core/stlpool.cxx50
-rwxr-xr-x[-rw-r--r--]sd/source/core/text/textapi.cxx27
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/eppt.hxx18
-rwxr-xr-x[-rw-r--r--]sd/source/filter/eppt/epptso.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlattr.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlattr.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlex.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/filter/html/htmlex.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/ppt97animations.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/ppt97animations.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptatom.cpp22
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptatom.hxx19
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptin.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptinanimations.cxx58
-rwxr-xr-x[-rw-r--r--]sd/source/filter/ppt/pptinanimations.hxx7
-rw-r--r--sd/source/ui/accessibility/AccessibleTaskPane.cxx94
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleTreeNode.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/accessibility/AccessibleViewForwarder.cxx21
-rwxr-xr-xsd/source/ui/accessibility/makefile.mk1
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.cxx443
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.hrc50
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.hxx114
-rw-r--r--sd/source/ui/animations/AnimationSchemesPane.src113
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/CustomAnimationCreateDialog.cxx7
-rw-r--r--sd/source/ui/animations/CustomAnimationSchemesPane.hrc32
-rw-r--r--sd/source/ui/animations/CustomAnimationSchemesPane.src71
-rwxr-xr-x[-rw-r--r--]sd/source/ui/animations/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationmanager.cxx4
-rw-r--r--[-rwxr-xr-x]sd/source/ui/annotations/annotationmanagerimpl.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationwindow.cxx110
-rwxr-xr-x[-rw-r--r--]sd/source/ui/annotations/annotationwindow.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/menuids2_tmpl.src35
-rw-r--r--[-rwxr-xr-x]sd/source/ui/app/optsitem.cxx229
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/res_bmp.src302
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sddll1.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sddll2.cxx34
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdmod.cxx17
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdmod1.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/sdmod2.cxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/app/strings.src109
-rwxr-xr-xsd/source/ui/controller/makefile.mk54
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx419
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.hxx (renamed from sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx)31
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/LayerDialogContent.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/PaneChildWindows.cxx86
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/PaneDockingWindow.cxx342
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/PaneDockingWindow.src2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/PaneShells.cxx26
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/SpellDialogChildWindow.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/animobjs.cxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/custsdlg.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgass.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgassim.cxx284
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgassim.hxx51
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgctrls.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgsnap.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/docprev.cxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/filedlg.cxx88
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/headerfooterdlg.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/inspagob.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/makefile.mk1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/prntopts.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/sdtreelb.cxx58
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tpaction.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/docshel4.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/docshell/docshell.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationClassifier.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationController.cxx28
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationTracer.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationTracer.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationUpdater.cxx44
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ConfigurationUpdater.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/configuration/ResourceId.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/BasicPaneFactory.cxx33
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/BasicPaneFactory.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/BasicToolBarFactory.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/BasicToolBarFactory.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/BasicViewFactory.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/BasicViewFactory.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/ChildWindowPane.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/PresentationFactory.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/TaskPanelFactory.cxx150
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/TaskPanelFactory.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/factories/ViewShellWrapper.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ImpressModule.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ModuleController.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/PresentationModule.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ReadOnlyModeObserver.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ReadOnlyModeObserver.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ResourceManager.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/ResourceManager.hxx2
-rw-r--r--sd/source/ui/framework/module/ToolPanelModule.cxx (renamed from sd/source/ui/framework/module/TaskPaneModule.cxx)13
-rw-r--r--sd/source/ui/framework/module/ToolPanelModule.hxx (renamed from sd/source/ui/framework/module/TaskPaneModule.hxx)9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/module/makefile.mk2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/framework/tools/FrameworkHelper.cxx116
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuconstr.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fudraw.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuinsert.cxx131
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fuoutl.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fupoor.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusearch.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/fusnapln.cxx1
-rw-r--r--sd/source/ui/func/fuspell.cxx166
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/futransf.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/makefile.mk4
-rw-r--r--sd/source/ui/func/outlinfo.cxx301
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/sdundogr.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/smarttag.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/func/unoaprms.cxx46
-rw-r--r--sd/source/ui/inc/AccessibleTaskPane.hxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AccessibleViewForwarder.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/DrawController.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/DrawDocShell.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/DrawSubController.hxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/DrawViewShell.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/GraphicViewShell.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/LayerDialogContent.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/MasterPageObserver.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/OutlineView.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/OutlineViewShell.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PaneChildWindows.hxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PaneDockingWindow.hrc6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PaneDockingWindow.hxx85
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/PaneShells.hxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SdUnoDrawView.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SdUnoOutlineView.hxx5
-rw-r--r--sd/source/ui/inc/SdUnoPresView.hxx54
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SdUnoSlideView.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideSorterViewShell.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideView.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SpellDialogChildWindow.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ToolBarManager.hxx16
-rw-r--r--sd/source/ui/inc/ToolPanelChildWindow.hrc30
-rw-r--r--sd/source/ui/inc/ToolPanelChildWindow.hxx55
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/View.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewShell.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewShellBase.hxx31
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewShellImplementation.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/ViewShellManager.hxx43
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/Window.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/animobjs.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/bmcache.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgass.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/dlgctrls.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/docprev.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/filedlg.hxx31
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/FrameworkHelper.hxx17
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/PresentationFactory.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/ResourceId.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/framework/ViewShellWrapper.hxx36
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuconstr.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fudraw.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fuoutl.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/fupoor.hxx2
-rw-r--r--sd/source/ui/inc/fuspell.hxx71
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/futransf.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/headerfooterdlg.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/optsitem.hxx28
-rw-r--r--sd/source/ui/inc/outlinfo.hxx125
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/prntopts.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/res_bmp.hrc142
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/sdtreelb.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/sdundogr.hxx1
-rw-r--r--sd/source/ui/inc/showview.hxx88
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/slideshow.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/smarttag.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/strings.hrc44
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/ControlContainer.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/ILayoutableWindow.hxx2
-rw-r--r--sd/source/ui/inc/taskpane/PanelId.hxx62
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/ScrollPanel.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/SubToolPanel.hxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx33
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/TitleBar.hxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/taskpane/TitledControl.hxx27
-rw-r--r--sd/source/ui/inc/taskpane/ToolPanel.hxx125
-rw-r--r--sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx (renamed from sd/source/ui/inc/TaskPaneViewShell.hxx)139
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/PropertySet.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tools/SlotStateListener.hxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/tpaction.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unoaprms.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/unosrch.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/view/viewoverlaymanager.hxx (renamed from sd/source/ui/toolpanel/EmptyWindow.hxx)59
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/zoomlist.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterCanvas.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/presenter/PresenterTextView.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/PaneHider.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshow.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshowimpl.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slideshow/slideshowimpl.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx37
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx10
-rw-r--r--sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx66
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsPageCache.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/cache/makefile.mk1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlideSorterController.cxx69
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsFocusManager.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsListener.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsPageSelector.cxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx89
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/controller/SlsSlotManager.cxx102
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx29
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx11
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx23
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/SlideSorterModel.cxx55
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterService.cxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterService.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlideSorterView.cxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsLayouter.cxx55
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx19
-rwxr-xr-x[-rw-r--r--]sd/source/ui/table/TableDesignPane.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/table/tablefunction.cxx46
-rw-r--r--sd/source/ui/toolpanel/EmptyWindow.cxx96
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/LayoutMenu.cxx144
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/LayoutMenu.hxx37
-rw-r--r--sd/source/ui/toolpanel/LayoutableWindow.hxx79
-rw-r--r--sd/source/ui/toolpanel/MethodGuard.hxx67
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/ScrollPanel.cxx35
-rw-r--r--sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx98
-rw-r--r--sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/SubToolPanel.cxx87
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TaskPaneControlFactory.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TaskPaneShellManager.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TaskPaneShellManager.hxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TaskPaneTreeNode.cxx39
-rw-r--r--sd/source/ui/toolpanel/TaskPaneViewShell.cxx889
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TestMenu.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TestMenu.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TestPanel.cxx13
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TestPanel.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TitleBar.cxx149
-rw-r--r--sd/source/ui/toolpanel/TitleToolBox.cxx116
-rw-r--r--sd/source/ui/toolpanel/TitleToolBox.hxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/TitledControl.cxx120
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/ToolPanel.cxx310
-rw-r--r--sd/source/ui/toolpanel/ToolPanel.hxx80
-rw-r--r--sd/source/ui/toolpanel/ToolPanelChildWindow.cxx68
-rw-r--r--sd/source/ui/toolpanel/ToolPanelChildWindow.src52
-rw-r--r--sd/source/ui/toolpanel/ToolPanelFactory.cxx255
-rw-r--r--sd/source/ui/toolpanel/ToolPanelUIElement.cxx134
-rw-r--r--sd/source/ui/toolpanel/ToolPanelUIElement.hxx87
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelViewShell.cxx900
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx86
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/DocumentHelper.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainer.cxx148
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainer.hxx10
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx43
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageObserver.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx32
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx23
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/TableDesignPanel.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/TableDesignPanel.hxx12
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/makefile.mk3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/makefile.mk9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/ConfigurationAccess.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/PreviewRenderer.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/PropertySet.cxx16
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/SdGlobalResourceContainer.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/tools/SlotStateListener.cxx18
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/DrawController.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/SdUnoDrawView.cxx41
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/SdUnoOutlineView.cxx20
-rw-r--r--sd/source/ui/unoidl/SdUnoPresView.cxx54
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/SdUnoSlideView.cxx27
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/facreg.cxx61
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/makefile.mk2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unocpres.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unocpres.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unomodel.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unoobj.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unoobj.hxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unopage.cxx62
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unopage.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unosrch.cxx5
-rw-r--r--sd/source/ui/unoidl/unovwcrs.cxx209
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unowcntr.cxx25
-rwxr-xr-x[-rw-r--r--]sd/source/ui/unoidl/unowcntr.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/GraphicViewShellBase.cxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/Outliner.cxx88
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/OutlinerIterator.cxx36
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/ToolBarManager.cxx98
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx99
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/ViewShellImplementation.cxx113
-rwxr-xr-xsd/source/ui/view/ViewShellManager.cxx209
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/ViewTabBar.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/bmcache.cxx109
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drawview.cxx57
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drtxtob.cxx31
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drtxtob1.cxx14
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews1.cxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews2.cxx52
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews3.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews6.cxx27
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews7.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviews8.cxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsa.cxx20
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewse.cxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drviewsf.cxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/drvwshrg.cxx1
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/grviewsh.cxx18
-rw-r--r--sd/source/ui/view/makefile.mk5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/outlnvs2.cxx0
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/outlnvsh.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/outlview.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview.cxx83
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdview4.cxx85
-rwxr-xr-xsd/source/ui/view/sdview5.cxx114
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/sdwindow.cxx30
-rw-r--r--sd/source/ui/view/showview.cxx170
-rwxr-xr-xsd/source/ui/view/viewoverlaymanager.cxx609
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/viewshe2.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/viewshe3.cxx45
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/viewshel.cxx8
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/zoomlist.cxx13
-rw-r--r--sd/uiconfig/sdraw/menubar/menubar.xml606
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml10
-rw-r--r--sd/uiconfig/sdraw/toolbar/findbar.xml8
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml6
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/simpress/menubar/menubar.xml13
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/simpress/toolbar/commontaskbar.xml4
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml10
-rw-r--r--sd/uiconfig/simpress/toolbar/findbar.xml8
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml6
-rwxr-xr-x[-rw-r--r--]sd/uiconfig/simpress/toolbar/insertbar.xml2
-rwxr-xr-x[-rw-r--r--]sd/util/makefile.mk3
-rw-r--r--sd/workben/custompanel/ctp_panel.cxx249
-rw-r--r--sd/workben/custompanel/ctp_panel.hxx99
395 files changed, 5975 insertions, 11157 deletions
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index 0c14dec72583..dfc7e3e3bf88 100644..100755
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -179,13 +179,6 @@ public:
enum ChangeHint { CH_VIEW_SHELL_INVALID, CH_VIEW_SHELL_VALID };
- /** Handle a change outside the outliner which may affect the outliner.
- At the moment this is restricted to changes of the main view shell
- but later may include any changes that are detected now by
- DetectChange().
- */
- void HandleOutsideChange (ChangeHint eHint);
-
int GetIgnoreCurrentPageChangesLevel() const { return mnIgnoreCurrentPageChangesLevel; };
void IncreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel++; };
void DecreIgnoreCurrentPageChangesLevel() { mnIgnoreCurrentPageChangesLevel--; };
@@ -421,15 +414,6 @@ private:
*/
void EndOfSearch (void);
- /** Prepare to commence searching/spell checking on the specified page.
- This also creates a proper page iterator.
- @param nPageIndex
- Index of the page to prepare for searching. The default value
- of -1 is a flag for using the first/last page of the current
- edit mode/view mode depending on the search direction.
- */
- void InitPage (USHORT nPageIndex = (USHORT)-1);
-
/** Show a dialog that tells the user that the search has ended either
because there are no more matches after finding at least one or that
no match has been found at all.
@@ -521,11 +505,6 @@ private:
*/
bool HandleFailedSearch (void);
- /** Return a parent window for a dialog. The returned window depends on
- the search mode.
- */
- ::Window* GetParentForDialog (void);
-
/** Take a position as returned by an object iterator and switch to the
view and page on which the object specified by this position is
located.
diff --git a/sd/inc/OutlinerIterator.hxx b/sd/inc/OutlinerIterator.hxx
index ce291a6f5a00..92301f06289c 100644..100755
--- a/sd/inc/OutlinerIterator.hxx
+++ b/sd/inc/OutlinerIterator.hxx
@@ -109,13 +109,6 @@ public:
*/
explicit Iterator (IteratorImplBase* pObject);
- /** Create a new iterator with the implementation object being the copy
- of the provided one.
- @param rObject
- A copy of this object will become the implementation object.
- */
- explicit Iterator (const IteratorImplBase& rObject);
-
~Iterator (void);
/** Assign the iterator from the given one. The implementation object
@@ -240,9 +233,8 @@ private:
This specifies whether the returned iterator points to the
first, (one past the) last, or current object.
@return
- Returns an iterator as constructed by one of the
+ Returns an iterator as constructed by
<member>CreateSelectionIterator()</member>,
- <member>CreateViewIterator()</member>, or <member>CreateDocumentIterator()</member>.
*/
Iterator CreateIterator (IteratorLocation aLocation);
@@ -270,24 +262,6 @@ private:
IteratorLocation aLocation=BEGIN);
/** Create an iterator that iterates over all <type>SdrObjects</type>
- objects of the <member>mpOutliner</member> outliner that belong to
- the current view.
- @param pDocument
- The document to which the objects belong.
- @param pViewShell
- The view shell which displays the objects.
- @param bDirectionIsForward
- The direction of iteration. It defaults to forward.
- @param aLocation
- This specifies at which object the iterator points initially.
- */
- Iterator CreateViewIterator (
- SdDrawDocument* pDocument,
- const boost::shared_ptr<ViewShell>& rpViewShell,
- bool bDirectionIsForward=true,
- IteratorLocation aLocation=BEGIN);
-
- /** Create an iterator that iterates over all <type>SdrObjects</type>
objects of the <member>mpOutliner</member> outliner.
@param pDocument
The document to which the objects belong.
@@ -356,9 +330,6 @@ public:
assigned to the data members of this object.
*/
IteratorPosition (const IteratorPosition& aPosition);
- /** Create a new object and set its data members to the given values.
- */
- IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode);
/// The destructor is a no-op at the moment.
~IteratorPosition (void);
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 53223fa5ff1b..65aec562f084 100644..100755
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -430,7 +430,7 @@
#define SID_LEFT_PANE_IMPRESS (SID_SD_START+414)
#define SID_LEFT_PANE_DRAW (SID_SD_START+415)
-#define SID_RIGHT_PANE (SID_SD_START+416)
+ // FREE
#define SID_NOTES_WINDOW (SID_SD_START+417)
#define SID_SWITCH_SHELL_PANE (SID_SD_START+418)
#define SID_LAYER_DIALOG_WIN (SID_SD_START+419)
@@ -446,7 +446,7 @@
#define SID_TP_USE_FOR_NEW_PRESENTATIONS (SID_SD_START+427)
#define SID_TP_SHOW_LARGE_PREVIEW (SID_SD_START+428)
#define SID_TP_SHOW_SMALL_PREVIEW (SID_SD_START+429)
-#define SID_TASK_PANE (SID_SD_START+430)
+#define SID_SHOW_TOOL_PANEL (SID_SD_START+430)
#define SID_INSERT_MASTER_PAGE (SID_SD_START+431)
#define SID_DELETE_MASTER_PAGE (SID_SD_START+432)
#define SID_RENAME_MASTER_PAGE (SID_SD_START+433)
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index d0b2a899e5db..e2aae99cf673 100644..100755
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -64,8 +64,8 @@ public:
// @@@ copy ctor, but no copy assignment? @@@
SdCustomShow( const SdCustomShow& rShow );
- void SetName(const String& rName) { aName = rName; }
- String GetName() const { return aName; }
+ void SetName(const String& rName);
+ String GetName() const;
SdDrawDocument* GetDoc() const { return pDoc; }
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 1d801baa5d3c..6811da762934 100644..100755
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -441,7 +441,6 @@ public:
CharClass* GetCharClass() const { return mpCharClass; }
void RestoreLayerNames();
- void MakeUniqueLayerNames();
void UpdateAllLinks();
@@ -465,18 +464,6 @@ public:
static SdDrawDocument* pDocLockedInsertingLinks; // static to prevent recursions while resolving links
- /** This method acts as a simplified front end for the more complex
- <member>CreatePage()</member> method.
- @param nPageNum
- The page number as passed to the <member>GetSdPage()</member>
- method from which to use certain properties for the new pages.
- These include the auto layout.
- @return
- Returns an index of the inserted pages that can be used with the
- <member>GetSdPage()</member> method.
- */
- USHORT CreatePage (USHORT nPageNum);
-
/** Create and insert a set of two new pages: a standard (draw) page and
the associated notes page. The new pages are inserted direclty
after the specified page set.
@@ -687,7 +674,6 @@ namespace sd
class ModifyGuard
{
public:
- ModifyGuard( DrawDocShell* pDocShell );
ModifyGuard( SdDrawDocument* pDoc );
~ModifyGuard();
diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc
index 7e77d56e4dbb..73189f135e62 100644..100755
--- a/sd/inc/glob.hrc
+++ b/sd/inc/glob.hrc
@@ -138,6 +138,7 @@
#define STR_LEFT_IMPRESS_PANE_SHELL RID_GLOB_START+113
#define STR_LEFT_DRAW_PANE_SHELL RID_GLOB_START+114
#define STR_RIGHT_PANE_SHELL RID_GLOB_START+115
+#define STR_TOOL_PANEL_SHELL RID_GLOB_START+116
#define RID_CUSTOMANIMATION_START RID_GLOB_START+120
#define RID_CUSTOMANIMATION_END RID_GLOB_START+199
@@ -150,6 +151,8 @@
#define DLG_TABLEDESIGNPANE RID_GLOB_START+224
#define STR_TABLEOBJECTBARSHELL RID_GLOB_START+225
#define RID_TABPAGE_PARA_NUMBERING RID_GLOB_START+226
+#define STR_CUSTOMANIMATIONPANE RID_GLOB_START+227
+#define STR_SLIDE_TRANSITION_PANE RID_GLOB_START+228
diff --git a/sd/inc/glob.hxx b/sd/inc/glob.hxx
index 12b63c74b310..278aef490fdb 100644..100755
--- a/sd/inc/glob.hxx
+++ b/sd/inc/glob.hxx
@@ -66,6 +66,8 @@
#define SD_IF_SDRIGHTPANESHELL SFX_INTERFACE_SD_START + 26
#define SD_IF_SDDRAWTABLEOBJECTBAR SFX_INTERFACE_SD_START + 27
#define SD_IF_SDANNOTATIONSHELL SFX_INTERFACE_SD_START + 28
+#define SD_IF_SDTOOLPANELPANESHELL SFX_INTERFACE_SD_START + 29
+#define SD_IF_SDTOOLPANELSHELL SFX_INTERFACE_SD_START + 30
// Inventor-Id fuer StarDraw UserData
const UINT32 SdUDInventor=UINT32('S')*0x00000001+
diff --git a/sd/inc/pres.hxx b/sd/inc/pres.hxx
index 6efd1cbe89f2..a51083133185 100644..100755
--- a/sd/inc/pres.hxx
+++ b/sd/inc/pres.hxx
@@ -46,48 +46,66 @@ enum PresObjKind
PRESOBJ_FOOTER,
PRESOBJ_DATETIME,
PRESOBJ_SLIDENUMBER,
+ PRESOBJ_CALC,
+ PRESOBJ_MEDIA,
PRESOBJ_MAX
};
enum AutoLayout
{
- AUTOLAYOUT__START,
- AUTOLAYOUT_TITLE = AUTOLAYOUT__START,
- AUTOLAYOUT_ENUM,
- AUTOLAYOUT_CHART,
- AUTOLAYOUT_2TEXT,
- AUTOLAYOUT_TEXTCHART,
- AUTOLAYOUT_ORG,
- AUTOLAYOUT_TEXTCLIP,
- AUTOLAYOUT_CHARTTEXT,
- AUTOLAYOUT_TAB,
- AUTOLAYOUT_CLIPTEXT,
- AUTOLAYOUT_TEXTOBJ,
- AUTOLAYOUT_OBJ,
- AUTOLAYOUT_TEXT2OBJ,
- AUTOLAYOUT_OBJTEXT,
- AUTOLAYOUT_OBJOVERTEXT,
- AUTOLAYOUT_2OBJTEXT,
- AUTOLAYOUT_2OBJOVERTEXT,
- AUTOLAYOUT_TEXTOVEROBJ,
- AUTOLAYOUT_4OBJ,
- AUTOLAYOUT_ONLY_TITLE,
- AUTOLAYOUT_NONE,
- AUTOLAYOUT_NOTES,
- AUTOLAYOUT_HANDOUT1,
- AUTOLAYOUT_HANDOUT2,
- AUTOLAYOUT_HANDOUT3,
- AUTOLAYOUT_HANDOUT4,
- AUTOLAYOUT_HANDOUT6,
- AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART,
- AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE,
- AUTOLAYOUT_TITLE_VERTICAL_OUTLINE,
- AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART,
- AUTOLAYOUT_HANDOUT9,
- AUTOLAYOUT_ONLY_TEXT,
- AUTOLAYOUT_4CLIPART,
- AUTOLAYOUT_6CLIPART,
+ // new layouts with enum/text/chart/org/clip merged to content
+ AUTOLAYOUT__START = 0,
+ AUTOLAYOUT_TITLE = 0, // Title Slide
+ AUTOLAYOUT_TITLE_CONTENT = 1, // Title, Content
+ AUTOLAYOUT_TITLE_2CONTENT = 3, // Title and 2 Content
+ AUTOLAYOUT_TITLE_ONLY = 19, // Title Only
+ AUTOLAYOUT_NONE = 20, // Blank Slide
+ AUTOLAYOUT_ONLY_TEXT = 32, // Centered Text
+ AUTOLAYOUT_TITLE_CONTENT_2CONTENT = 12, // Title, Content and 2 Content
+ AUTOLAYOUT_TITLE_2CONTENT_CONTENT = 15, // Title, 2 Content and Content
+ AUTOLAYOUT_TITLE_2CONTENT_OVER_CONTENT = 16,// Title, 2 Content over Content
+ AUTOLAYOUT_TITLE_CONTENT_OVER_CONTENT = 14, // Title, Content over Content
+ AUTOLAYOUT_TITLE_4CONTENT = 18, // Title, 4 Content
+ AUTOLAYOUT_TITLE_6CONTENT = 34, // Title, 6 Content
+ AUTOLAYOUT_VTITLE_VCONTENT_OVER_VCONTENT = 27, // Vertical Title, Vertical Content over Vertical Content
+ AUTOLAYOUT_VTITLE_VCONTENT = 28, // Vertical Title, Vertical Content over Vertical Content
+ AUTOLAYOUT_TITLE_VCONTENT = 29, // Title, Vertical Content
+ AUTOLAYOUT_TITLE_2VTEXT = 30, // Title, 2 Vertical Content
+
+ // deprecated
+ AUTOLAYOUT_ENUM = 1,
+ AUTOLAYOUT_CHART = 2,
+ AUTOLAYOUT_2TEXT = 3,
+ AUTOLAYOUT_TEXTCHART = 4,
+ AUTOLAYOUT_ORG = 5,
+ AUTOLAYOUT_TEXTCLIP = 6,
+ AUTOLAYOUT_CHARTTEXT = 7,
+ AUTOLAYOUT_TAB = 8,
+ AUTOLAYOUT_CLIPTEXT = 9,
+ AUTOLAYOUT_TEXTOBJ = 10,
+ AUTOLAYOUT_OBJ = 11,
+ AUTOLAYOUT_TEXT2OBJ = 12,
+ AUTOLAYOUT_OBJTEXT = 13,
+ AUTOLAYOUT_OBJOVERTEXT = 14,
+ AUTOLAYOUT_2OBJTEXT = 15,
+ AUTOLAYOUT_2OBJOVERTEXT = 16,
+ AUTOLAYOUT_TEXTOVEROBJ = 17,
+ AUTOLAYOUT_4OBJ = 18,
+ AUTOLAYOUT_ONLY_TITLE = 19,
+ AUTOLAYOUT_NOTES = 21,
+ AUTOLAYOUT_HANDOUT1 = 22,
+ AUTOLAYOUT_HANDOUT2 = 23,
+ AUTOLAYOUT_HANDOUT3 = 24,
+ AUTOLAYOUT_HANDOUT4 = 25,
+ AUTOLAYOUT_HANDOUT6 = 26,
+ AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART = 27,
+ AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE = 28,
+ AUTOLAYOUT_TITLE_VERTICAL_OUTLINE = 29,
+ AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART = 30,
+ AUTOLAYOUT_HANDOUT9 = 31,
+ AUTOLAYOUT_4CLIPART = 33,
+ AUTOLAYOUT_6CLIPART = 34,
AUTOLAYOUT__END
};
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 0dad3ca237cb..f0d5cc64a3c4 100644..100755
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -141,8 +141,6 @@ public:
SD_DLLPUBLIC SvNumberFormatter* GetNumberFormatter();
- ::com::sun::star::text::WritingMode GetDefaultWritingMode() const;
-
//virtuelle Methoden fuer den Optionendialog
virtual SfxItemSet* CreateItemSet( USHORT nId );
virtual void ApplyItemSet( USHORT nId, const SfxItemSet& rSet );
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 51a1a03d838a..e4125051c526 100644..100755
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -195,7 +195,7 @@ public:
void EnsureMasterPageDefaultBackground();
SdrObject* CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rectangle& rRect, BOOL bInsert=FALSE);
SdrObject* CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert);
- SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1 );
+ SdrObject* GetPresObj(PresObjKind eObjKind, int nIndex = 1, bool bFuzzySearch = false );
PresObjKind GetPresObjKind(SdrObject* pObj) const;
String GetPresObjText(PresObjKind eObjKind) const;
SfxStyleSheet* GetStyleSheetForMasterPageBackground() const;
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index 553f438669d2..1b87a6a9e10f 100644..100755
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -47,6 +47,8 @@ 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();
@@ -60,10 +62,6 @@ namespace sd
returns the first shape if pObj is 0 */
SdrObject* getNextShape(SdrObject* pObj) const;
- /** returns the shape prior to the given shape in the list or 0
- returns the last shape if pObj is 0 */
- SdrObject* getPreviousShape( SdrObject* pObj ) const;
-
/**
*/
SdrObject* getNextShape();
@@ -76,6 +74,8 @@ namespace sd
*/
bool hasMore() const;
+ const std::list< SdrObject* >& getList() const { return maShapeList; }
+
private:
virtual void ObjectInDestruction(const SdrObject& rObject);
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 7dfeac99121b..fd9dbeae5977 100644..100755
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -68,7 +68,6 @@ public:
SfxStyleSheetBase* GetActualStyleSheet() { return mpActualStyleSheet; }
SfxStyleSheetBase* GetTitleSheet(const String& rLayoutName);
- String GetLayoutName() const;
// Caller muss Liste loeschen
List* CreateOutlineSheetList(const String& rLayoutName);
@@ -82,7 +81,6 @@ public:
when styles are missing.
*/
SD_DLLPUBLIC void CreateLayoutStyleSheets(const String& rLayoutName, sal_Bool bCheck = sal_False );
- void EraseLayoutStyleSheets(const String& rLayoutName);
List* CreateLayoutSheetNames(const String& rLayoutName) const;
void CreateLayoutSheetList(const String& rLayoutName, SdStyleSheetVector& rLayoutSheets);
void CopyLayoutSheets(const String& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets );
diff --git a/sd/inc/textapi.hxx b/sd/inc/textapi.hxx
index ced8a48c5bb6..6fa186596fba 100644..100755
--- a/sd/inc/textapi.hxx
+++ b/sd/inc/textapi.hxx
@@ -53,7 +53,6 @@ public:
virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
OutlinerParaObject* CreateText();
- void SetString( const String& rText );
void SetText( OutlinerParaObject& rText );
String GetText();
diff --git a/sd/prj/build.lst b/sd/prj/build.lst
index 87204261b200..381e9bc6a3a2 100755..100644
--- a/sd/prj/build.lst
+++ b/sd/prj/build.lst
@@ -26,6 +26,7 @@ sd sd\source\ui\slidesorter\model nmake - all sd_slsmodel sd_inc NULL
sd sd\source\ui\slidesorter\view nmake - all sd_slsview sd_inc NULL
sd sd\source\ui\slidesorter\controller nmake - all sd_slscontroller sd_sdi sd_inc NULL
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\filter\ppt nmake - all sd_ppt sd_inc NULL
@@ -43,5 +44,5 @@ sd sd\source\ui\framework\module nmake - all sd_framework_module sd_inc N
sd sd\source\ui\framework\factories nmake - all sd_framework_factories sd_inc NULL
sd sd\source\ui\framework\tools nmake - all sd_framework_tools sd_inc NULL
sd sd\source\ui\annotations nmake - all sd_uiannotations sd_inc NULL
-sd sd\util nmake - all sd_util sd_app sd_cgm sd_core sd_dlg sd_docsh sd_eppt sd_filt sd_func sd_grf sd_unid sd_view sd_xml sd_html sd_ppt sd_accessibility sd_animations sd_toolpanel sd_toolpanel_controls sd_tools sd_slsshell sd_slsmodel sd_slsview sd_slscontroller sd_slscache sd_notes sd_table sd_slideshow sd_presenter sd_undo sd_helper sd_framework_configuration sd_framework_module sd_framework_tools sd_framework_factories sd_text sd_annotations sd_uiannotations NULL
+sd sd\util nmake - all sd_util sd_app sd_cgm sd_core sd_dlg sd_docsh sd_eppt sd_filt sd_func sd_grf sd_unid sd_view sd_xml sd_html sd_ppt sd_accessibility sd_animations sd_toolpanel sd_toolpanel_controls sd_tools sd_slsshell sd_slsmodel sd_slsview sd_slscontroller sd_slscache sd_notes sd_controller sd_table sd_slideshow sd_presenter sd_undo sd_helper sd_framework_configuration sd_framework_module sd_framework_tools sd_framework_factories sd_text sd_annotations sd_uiannotations NULL
sd sd\qa\unoapi nmake - all sd_qa_unoapi NULL
diff --git a/sd/prj/d.lst b/sd/prj/d.lst
index fd21f7cd4b5b..14f85e982eab 100644..100755
--- a/sd/prj/d.lst
+++ b/sd/prj/d.lst
@@ -8,16 +8,6 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\menubar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\toolbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\toolbar
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\fr
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\en-US
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\de
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\es
-mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\fr
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\statusbar
mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\simpress\statusbar
@@ -62,15 +52,6 @@ mkdir: %_DEST%\inc%_EXT%\sd
..\uiconfig\simpress\menubar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\menubar\*.xml
..\uiconfig\sdraw\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\toolbar\*.xml
..\uiconfig\simpress\toolbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\toolbar\*.xml
-..\uiconfig\sdraw\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\en-US\*.xml
-..\uiconfig\sdraw\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\de\*.xml
-..\uiconfig\sdraw\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\es\*.xml
-..\uiconfig\sdraw\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\accelerator\fr\*.xml
-..\uiconfig\simpress\accelerator\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\*.xml
-..\uiconfig\simpress\accelerator\en-US\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\en-US\*.xml
-..\uiconfig\simpress\accelerator\de\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\de\*.xml
-..\uiconfig\simpress\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\es\*.xml
-..\uiconfig\simpress\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\accelerator\fr\*.xml
..\uiconfig\sdraw\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\sdraw\statusbar\*.xml
..\uiconfig\simpress\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\simpress\statusbar\*.xml
diff --git a/sd/sdi/TaskPaneViewShell.sdi b/sd/sdi/ToolPanelViewShell.sdi
index 22f0fba21265..a72342c52da5 100644
--- a/sd/sdi/TaskPaneViewShell.sdi
+++ b/sd/sdi/ToolPanelViewShell.sdi
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,7 +22,7 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
+************************************************************************/
SfxVoidItem TaskPaneApplyToAllSlides SID_TP_APPLY_TO_ALL_SLIDES
[
@@ -302,7 +301,7 @@ shell LayoutMenu
import TaskPaneLayoutMenuInterface[Automation];
}
-shell TaskPaneViewShell
+shell ToolPanelViewShell
{
}
diff --git a/sd/sdi/ViewShellBase.sdi b/sd/sdi/ViewShellBase.sdi
index e9cb7119fa89..3602e711db1b 100644..100755
--- a/sd/sdi/ViewShellBase.sdi
+++ b/sd/sdi/ViewShellBase.sdi
@@ -135,32 +135,6 @@ SfxBoolItem LeftPaneDraw SID_LEFT_PANE_DRAW
GroupId = GID_MODIFY;
]
-SfxBoolItem RightPane SID_RIGHT_PANE
-
-[
- /* 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 NotesChildWindow SID_NOTES_WINDOW
[
@@ -239,7 +213,7 @@ SfxBoolItem SlideSorterMultiPaneGUI SID_SLIDE_SORTER_MULTI_PANE_GUI
GroupId = GID_MODIFY;
]
-SfxVoidItem TaskPaneShowPanel SID_TASK_PANE (
+SfxVoidItem TaskPaneShowPanel SID_SHOW_TOOL_PANEL (
SfxBoolItem IsPanelVisible ID_VAL_ISVISIBLE,
SfxUInt32Item PanelId ID_VAL_PANEL_INDEX)
[
@@ -280,7 +254,7 @@ interface ViewShellBaseView
ExecMethod = Execute;
StateMethod = GetState;
]
- SID_RIGHT_PANE
+ SID_TASKPANE
[
ExecMethod = Execute;
StateMethod = GetState;
@@ -325,7 +299,7 @@ interface ViewShellBaseView
ExecMethod = Execute;
StateMethod = GetState;
]
- SID_TASK_PANE
+ SID_SHOW_TOOL_PANEL
[
ExecMethod = Execute;
StateMethod = GetState;
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 53813365a686..6d0d3ef33ce9 100644..100755
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2173,6 +2173,21 @@ interface DrawView
ExecMethod = FuSupport ;
StateMethod = GetCtrlState ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
SID_TRANSLITERATE_LOWER // ole : no, status : ?
[
ExecMethod = FuSupport ;
diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi
index 4e2ca49c0b82..f4133f0f4643 100644..100755
--- a/sd/sdi/drtxtob.sdi
+++ b/sd/sdi/drtxtob.sdi
@@ -202,5 +202,11 @@ shell TextObjectBar
ExecMethod = Execute;
StateMethod = GetAttrState;
]
+ SID_THES
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetAttrState ;
+ ]
+
}
diff --git a/sd/sdi/makefile.mk b/sd/sdi/makefile.mk
index ab128c378afc..a950aad5d7a5 100644..100755
--- a/sd/sdi/makefile.mk
+++ b/sd/sdi/makefile.mk
@@ -66,7 +66,7 @@ SVSDI1DEPEND= \
outlnvsh.sdi \
SlideSorterController.sdi \
ViewShellBase.sdi \
- TaskPaneViewShell.sdi \
+ ToolPanelViewShell.sdi \
sdslots.hrc \
$(PRJ)$/inc$/app.hrc
@@ -88,7 +88,7 @@ SVSDI2DEPEND= \
mediaob.sdi \
outlnvsh.sdi \
ViewShellBase.sdi \
- TaskPaneViewShell.sdi \
+ ToolPanelViewShell.sdi \
sdslots.hrc \
$(PRJ)$/inc$/app.hrc
diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi
index 1632b2fa4163..9639f1adc9dc 100644..100755
--- a/sd/sdi/outlnvsh.sdi
+++ b/sd/sdi/outlnvsh.sdi
@@ -433,6 +433,21 @@ interface OutlineView
ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
]
+ SID_TRANSLITERATE_SENTENCE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TITLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
+ SID_TRANSLITERATE_TOGGLE_CASE // ole : no, status : ?
+ [
+ ExecMethod = FuSupport ;
+ StateMethod = GetCtrlState ;
+ ]
SID_TRANSLITERATE_UPPER // ole : no, status : ?
[
ExecMethod = FuSupport ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 7c37e455276c..0e91fb2c9134 100644..100755
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -4391,7 +4391,7 @@ SfxVoidItem ModifyPage SID_MODIFYPAGE
GroupId = GID_MODIFY;
]
-SfxVoidItem AssignLayout SID_ASSIGN_LAYOUT
+SfxUInt32Item AssignLayout SID_ASSIGN_LAYOUT
(SfxUInt32Item WhatPage ID_VAL_WHATPAGE, SfxUInt32Item WhatLayout ID_VAL_WHATLAYOUT)
[
/* flags: */
diff --git a/sd/sdi/sdslots.sdi b/sd/sdi/sdslots.sdi
index 21e60e6a1a79..fbfc8da1903b 100644..100755
--- a/sd/sdi/sdslots.sdi
+++ b/sd/sdi/sdslots.sdi
@@ -104,5 +104,5 @@ ModulePrefix( "Sd" )
include "ViewShellBase.sdi"
include "mediaob.sdi"
include "tables.sdi"
- include "TaskPaneViewShell.sdi"
+ include "ToolPanelViewShell.sdi"
}
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 7852f7cc8fcf..33b9c233909b 100644..100755
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1809,15 +1809,6 @@ void EffectSequenceHelper::append( const CustomAnimationEffectPtr& pEffect )
// --------------------------------------------------------------------
-void EffectSequenceHelper::insert( EffectSequence::iterator& rPos, const CustomAnimationEffectPtr& pEffect )
-{
- pEffect->setEffectSequence( this );
- maEffects.insert( rPos, pEffect );
- rebuild();
-}
-
-// --------------------------------------------------------------------
-
CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPresetPtr& pPreset, const Any& rTarget, double fDuration /* = -1.0 */ )
{
CustomAnimationEffectPtr pEffect;
diff --git a/sd/source/core/cusshow.cxx b/sd/source/core/cusshow.cxx
index 3dcab46dce32..b9f23daedd90 100644..100755
--- a/sd/source/core/cusshow.cxx
+++ b/sd/source/core/cusshow.cxx
@@ -124,3 +124,13 @@ void SdCustomShow::RemovePage( const SdPage* pPage )
}
}
+void SdCustomShow::SetName(const String& rName)
+{
+ aName = rName;
+}
+
+String SdCustomShow::GetName() const
+{
+ return aName;
+}
+
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 092549428a42..74a1bde5f5f8 100644..100755
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -731,6 +731,10 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
if( bClipboard )
pNotesMPage->SetLayoutName( pPage->GetLayoutName() );
+
+ if( !pRefPage && (meDocType != DOCUMENT_TYPE_DRAW) )
+ pPage->SetAutoLayout( AUTOLAYOUT_TITLE, TRUE, TRUE );
+
mpWorkStartupTimer = new Timer();
mpWorkStartupTimer->SetTimeoutHdl( LINK(this, SdDrawDocument, WorkStartupHdl) );
mpWorkStartupTimer->SetTimeout(2000);
@@ -1342,37 +1346,6 @@ void SdDrawDocument::CheckMasterPages()
}
}
-
-
-
-USHORT SdDrawDocument::CreatePage (USHORT nPageNum)
-{
- PageKind ePageKind = PK_STANDARD;
-
- // Get current page.
- SdPage* pActualPage = GetSdPage(nPageNum, ePageKind);
-
- // Get background flags.
- SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
- BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
- SetOfByte aVisibleLayers = pActualPage->TRG_GetMasterPageVisibleLayers();
-
- // Get layout from current page.
- AutoLayout eAutoLayout = pActualPage->GetAutoLayout();
-
- return CreatePage (
- pActualPage, ePageKind,
- // No names for the new slides.
- String(), String(),
- eAutoLayout, eAutoLayout,
- aVisibleLayers.IsSet(aBckgrnd),
- aVisibleLayers.IsSet(aBckgrndObj));
-}
-
-
-
-
USHORT SdDrawDocument::CreatePage (
SdPage* pActualPage,
PageKind ePageKind,
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index b615c7e76c05..89f74de30494 100644..100755
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -242,26 +242,6 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE));
- // only change paragraph text direction,
- // if this is a new document and
- // text direction is set explicitly to RTL
-/*
- if( mpDocSh &&
- mpDocSh->IsNewDocument() &&
- SD_MOD()->GetDefaultWritingMode() == ::com::sun::star::text::WritingMode_RL_TB )
- {
- SvxAdjustItem aAdjust( SVX_ADJUST_RIGHT );
- SvxFrameDirectionItem aFrameDirectionItem( FRMDIR_HORI_RIGHT_TOP, EE_PARA_WRITINGDIR );
-
- rISet.Put( aAdjust );
- rISet.Put( aFrameDirectionItem );
-
- pItemPool->SetPoolDefaultItem( aAdjust );
- pItemPool->SetPoolDefaultItem( aFrameDirectionItem );
- }
- else
- rISet.Put( SvxAdjustItem() );
-*/
rISet.Put( SdrTextLeftDistItem( 250 ) ); // sj: (i33745) using text frame distances seems to be a better default
rISet.Put( SdrTextRightDistItem( 250 ) );
rISet.Put( SdrTextUpperDistItem( 125 ) );
@@ -1121,57 +1101,6 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
/*************************************************************************
|*
-|* Sprachabhaengige Namen der StandardLayer durch eindeutigen Namen ersetzen
-|*
-\************************************************************************/
-
-void SdDrawDocument::MakeUniqueLayerNames()
-{
- String aLayerLayout(SdResId(STR_LAYER_LAYOUT));
- String aLayerBckgrnd(SdResId(STR_LAYER_BCKGRND));
- String aLayerBckgrndObj(SdResId(STR_LAYER_BCKGRNDOBJ));
- String aLayerControls(SdResId(STR_LAYER_CONTROLS));
- String aLayerMeasurelines(SdResId(STR_LAYER_MEASURELINES));
- SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
- USHORT nStandardLayer = 5;
- USHORT nLayerCount = Min(rLayerAdmin.GetLayerCount(), nStandardLayer);
-
- for (USHORT nLayer = 0; nLayer < nLayerCount; nLayer++)
- {
- // Die sprachabhaengigen Namen der Default-Layer werden nicht mehr
- // gespeichert. Es werden stattdessen eindeutige Namen verwendet.
- SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer);
-
- if (pLayer)
- {
- String aLayerName(pLayer->GetName());
-
- if (aLayerName == aLayerLayout)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_LAYOUT" )));
- }
- else if (aLayerName == aLayerBckgrnd)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BCKGRND" )));
- }
- else if (aLayerName == aLayerBckgrndObj)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_BACKGRNDOBJ" )));
- }
- else if (aLayerName == aLayerControls)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_CONTROLS" )));
- }
- else if (aLayerName == aLayerMeasurelines)
- {
- pLayer->SetName( String( RTL_CONSTASCII_USTRINGPARAM( "LAYER_MEASURELINES" )));
- }
- }
- }
-}
-
-/*************************************************************************
-|*
|* Eindeutige Namen der StandardLayer durch sprachabhaengige Namen ersetzen
|*
\************************************************************************/
@@ -1545,12 +1474,6 @@ SdStyleSheetPool* SdDrawDocument::GetSdStyleSheetPool() const
return dynamic_cast< SdStyleSheetPool* >( GetStyleSheetPool() );
}
-ModifyGuard::ModifyGuard( DrawDocShell* pDocShell )
-: mpDocShell( pDocShell ), mpDoc( 0 )
-{
- init();
-}
-
ModifyGuard::ModifyGuard( SdDrawDocument* pDoc )
: mpDocShell( 0 ), mpDoc( pDoc )
{
diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src
index e235ad266c3c..f1c7058ddf79 100644..100755
--- a/sd/source/core/glob.src
+++ b/sd/source/core/glob.src
@@ -130,7 +130,7 @@ String STR_PRESOBJ_TITLE
};
String STR_PRESOBJ_OUTLINE
{
- Text [ en-US ] = "Click to add an outline" ;
+ Text [ en-US ] = "Click to add text" ;
};
String STR_PRESOBJ_TEXT
{
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 950d98a487e9..248a844a768d 100644..100755
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -158,22 +158,68 @@ SdPage::~SdPage()
delete mpItems;
}
+struct OrdNumSorter
+{
+ bool operator()( SdrObject* p1, SdrObject* p2 )
+ {
+ return p1->GetOrdNum() < p2->GetOrdNum();
+ }
+};
+
/** returns the nIndex'th object from the given PresObjKind, index starts with 1 */
-SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex )
+SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearch /* = false */ )
{
- int nObjFound = 0; // index of the searched object
+ // first sort all matching shapes with z-order
+ std::vector< SdrObject* > aMatches;
+
SdrObject* pObj = 0;
while( (pObj = maPresentationShapeList.getNextShape(pObj)) != 0 )
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
- if( pInfo && (pInfo->mePresObjKind == eObjKind) )
+ if( pInfo )
{
- nObjFound++; // found one
- if( nObjFound == nIndex )
- return pObj;
+ bool bFound = false;
+ if( pInfo->mePresObjKind == eObjKind )
+ {
+ bFound = true;
+ }
+ else if( bFuzzySearch && (eObjKind == PRESOBJ_OUTLINE) )
+ {
+ switch( pInfo->mePresObjKind )
+ {
+ case PRESOBJ_GRAPHIC:
+ case PRESOBJ_OBJECT:
+ case PRESOBJ_CHART:
+ case PRESOBJ_ORGCHART:
+ case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
+ case PRESOBJ_IMAGE:
+ case PRESOBJ_MEDIA:
+ bFound = TRUE;
+ break;
+ default:
+ break;
+ }
+ }
+ if( bFound )
+ {
+ aMatches.push_back( pObj );
+ }
}
}
+ if( aMatches.size() > 1 )
+ {
+ OrdNumSorter aSortHelper;
+ std::sort( aMatches.begin(), aMatches.end(), aSortHelper );
+ }
+
+ if( nIndex > 0 )
+ nIndex--;
+
+ if( (nIndex >= 0) && ( aMatches.size() > static_cast<unsigned int>(nIndex)) )
+ return aMatches[nIndex];
+
return 0;
}
@@ -272,6 +318,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
}
break;
+ case PRESOBJ_MEDIA:
case PRESOBJ_OBJECT:
{
pSdrObj = new SdrOle2Obj();
@@ -301,6 +348,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
}
case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
{
pSdrObj = new SdrOle2Obj();
( (SdrOle2Obj*) pSdrObj)->SetProgName( String( RTL_CONSTASCII_USTRINGPARAM( "StarCalc" )));
@@ -492,7 +540,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, BOOL bVertical, const Rec
if ( eObjKind == PRESOBJ_OBJECT ||
eObjKind == PRESOBJ_CHART ||
eObjKind == PRESOBJ_ORGCHART ||
- eObjKind == PRESOBJ_TABLE ||
+ eObjKind == PRESOBJ_CALC ||
eObjKind == PRESOBJ_GRAPHIC )
{
SfxItemSet aSet( ((SdDrawDocument*) pModel)->GetPool() );
@@ -1084,24 +1132,24 @@ static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
{
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TEXT ), // AUTOLAYOUT_TITLE
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_ENUM
- LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_CHART ), // AUTOLAYOUT_CHART
+ LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHART
LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2TEXT
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_CHART ), // AUTOLAYOUT_TEXTCHART
- LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_ORGCHART ), // AUTOLAYOUT_ORG
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_GRAPHIC ), // AUTOLAYOUT_TEXTCLbIP
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_CHART, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHARTTEXT
- LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_TABLE ), // AUTOLAYOUT_TAB
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CLIPTEXT
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXTOBJ
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTCHART
+ LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_ORG
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTCLbIP
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CHARTTEXT
+ LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TAB
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_CLIPTEXT
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OBJECT ), // AUTOLAYOUT_OBJ
- LayoutDescriptor( 2, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXT2OBJ
- LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
- LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_OBJOVERTEXT
- LayoutDescriptor( 3, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJTEXT
- LayoutDescriptor( 5, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJOVERTEXT
- LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OBJECT ), // AUTOLAYOUT_TEXTOVEROBJ
- LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OBJECT, PRESOBJ_OBJECT, // AUTOLAYOUT_4OBJ
- PRESOBJ_OBJECT, PRESOBJ_OBJECT ),
+ LayoutDescriptor( 2, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXT2OBJ
+ LayoutDescriptor( 1, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOBJ
+ LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_OBJOVERTEXT
+ LayoutDescriptor( 3, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJTEXT
+ LayoutDescriptor( 5, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_2OBJOVERTEXT
+ LayoutDescriptor( 4, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ), // AUTOLAYOUT_TEXTOVEROBJ
+ LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, // AUTOLAYOUT_4OBJ
+ PRESOBJ_OUTLINE, PRESOBJ_OUTLINE ),
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_NONE ), // AUTOLAYOUT_ONLY_TITLE
LayoutDescriptor( 0, PRESOBJ_NONE ), // AUTOLAYOUT_NONE
LayoutDescriptor( 0, PRESOBJ_PAGE, PRESOBJ_NOTES ), // AUTOLAYOUT_NOTES
@@ -1110,16 +1158,16 @@ static const LayoutDescriptor& GetLayoutDescriptor( AutoLayout eLayout )
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT3
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT4
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT6
- LayoutDescriptor( 7, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_CHART ),// AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART
+ LayoutDescriptor( 7, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_OUTLINE ),// AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART
LayoutDescriptor( 8, PRESOBJ_TITLE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE
LayoutDescriptor( 0, PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE
- LayoutDescriptor( 9, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART
+ LayoutDescriptor( 9, PRESOBJ_TITLE, PRESOBJ_OUTLINE|VERTICAL, PRESOBJ_OUTLINE|VERTICAL ), // AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART
LayoutDescriptor( 0 ), // AUTOLAYOUT_HANDOUT9
LayoutDescriptor( 10, PRESOBJ_TEXT, PRESOBJ_NONE ), // AUTOLAYOUT_ONLY_TEXT
- LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, // AUTOLAYOUT_4CLIPART
+ LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, // AUTOLAYOUT_4CLIPART
PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC ),
- LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, // AUTOLAYOUT_6CLIPART
- PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC )
+ LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, // AUTOLAYOUT_6CLIPART
+ PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE, PRESOBJ_OUTLINE )
};
if( (eLayout < AUTOLAYOUT__START) || (eLayout >= AUTOLAYOUT__END) )
@@ -1338,7 +1386,7 @@ static void CalcAutoLayoutRectangles( SdPage& rPage, int nLayout, Rectangle* rRe
}
-void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::vector< SdrObject* >& rShapes, bool bInit )
+void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescriptor, std::vector< SdrObject* >& rShapes, bool bInit, bool bSwitchLayout )
{
int i;
@@ -1353,16 +1401,20 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
for( i = 0; (i < PRESOBJ_MAX) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++ )
{
PresObjKind eKind = rDescriptor.meKind[i];
- SdrObject* pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind] );
- if( pObj )
+ SdrObject* pObj = 0;
+ while( (pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind], true )) != 0 )
{
PresObjIndex[eKind]++; // on next search for eKind, find next shape with same eKind
- rShapes[i] = pObj;
+
+ if( !bSwitchLayout || !pObj->IsEmptyPresObj() )
+ {
+ rShapes[i] = pObj;
+ break;
+ }
}
- else
- {
+
+ if( !pObj )
bMissing = true;
- }
}
if( bMissing && bInit )
@@ -1402,8 +1454,16 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
case PRESOBJ_TITLE:
bFound = eSdrObjKind == OBJ_TITLETEXT;
break;
+ case PRESOBJ_TABLE:
+ bFound = eSdrObjKind == OBJ_TABLE;
+ break;
+ case PRESOBJ_MEDIA:
+ bFound = eSdrObjKind == OBJ_MEDIA;
+ break;
case PRESOBJ_OUTLINE:
- bFound = (eSdrObjKind == OBJ_OUTLINETEXT) || ((eSdrObjKind == OBJ_TEXT) && bPresStyle);
+ bFound = (eSdrObjKind == OBJ_OUTLINETEXT) ||
+ ((eSdrObjKind == OBJ_TEXT) && bPresStyle) ||
+ (eSdrObjKind == OBJ_TABLE) || (eSdrObjKind == OBJ_MEDIA) || (eSdrObjKind == OBJ_GRAF) || (eSdrObjKind == OBJ_OLE2);
break;
case PRESOBJ_GRAPHIC:
bFound = eSdrObjKind == OBJ_GRAF;
@@ -1445,7 +1505,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
}
break;
case PRESOBJ_CHART:
- case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
if( eSdrObjKind == OBJ_OLE2 )
{
SdrOle2Obj* pOle2 = dynamic_cast< SdrOle2Obj* >( pObj );
@@ -1455,7 +1515,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
((eKind == PRESOBJ_CHART) &&
( pOle2->GetProgName().EqualsAscii( "StarChart" ) || pOle2->IsChart() ) )
||
- ((eKind == PRESOBJ_TABLE) &&
+ ((eKind == PRESOBJ_CALC) &&
( pOle2->GetProgName().EqualsAscii( "StarCalc" ) || pOle2->IsCalc() ) ) )
{
bFound = true;
@@ -1463,6 +1523,10 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
}
break;
}
+ else if( eSdrObjKind == OBJ_TABLE )
+ {
+ bFound = true;
+ }
break;
case PRESOBJ_PAGE:
case PRESOBJ_HANDOUT:
@@ -1487,6 +1551,8 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, 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();
@@ -1509,7 +1575,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, 0);
- findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit );
+ findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit, bSwitchLayout );
int i;
@@ -1543,6 +1609,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
if( !bUndo )
SdrObject::Free( pObj );
}
+/* #i108541# keep non empty pres obj as pres obj even if they are not part of the current layout
else
{
if( bUndo )
@@ -1554,6 +1621,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, BOOL bInit, BOOL bCreate )
maPresentationShapeList.removeShape( *pObj );
pObj->SetUserCall(0);
}
+*/
}
pObj = pNext;
}
@@ -2047,7 +2115,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
const bool bUndo = pUndoManager && pUndoManager->isInListAction() && rPage.IsInserted();
SdrObject* pNewObj = pSourceObj;
- if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() != OBJ_OUTLINETEXT) )
+ if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) )
{
pNewObj = rPage.CreatePresObj(PRESOBJ_OUTLINE, bVertical, aRect);
@@ -2106,7 +2174,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj,
SdrObject::Free( pSourceObj );
}
}
- else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() != OBJ_TEXT) )
+ else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() == OBJ_OUTLINETEXT) )
{
// is there an outline shape we can use to replace empty subtitle shape?
pNewObj = rPage.CreatePresObj(PRESOBJ_TEXT, bVertical, aRect);
@@ -2193,10 +2261,10 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) );
}
- if ( pObj->ISA(SdrGrafObj) && !pObj->IsEmptyPresObj() )
- ( (SdrGrafObj*) pObj)->AdjustToMaxRect( aRect, FALSE );
- else
- pObj->SetLogicRect(aRect);
+// if ( pObj->ISA(SdrGrafObj) && !pObj->IsEmptyPresObj() )
+ ( /*(SdrGrafObj*)*/ pObj)->AdjustToMaxRect( aRect );
+// else
+// SetLogicRect( pObj, aRect );
pObj->SetUserCall(this);
@@ -2213,7 +2281,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
pTextObject->SetMergedItem(SdrTextHorzAdjustItem( bVertical ? SDRTEXTHORZADJUST_RIGHT : SDRTEXTHORZADJUST_BLOCK ));
}
- if( !mbMaster )
+ if( !mbMaster && (pTextObject->GetObjIdentifier() != OBJ_TABLE) )
{
if ( pTextObject->IsAutoGrowHeight() )
{
@@ -2276,6 +2344,9 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind,
}
}
+ if ( pObj && ( pObj->IsEmptyPresObj() || !pObj->ISA(SdrGrafObj) ) )
+ pObj->AdjustToMaxRect( aRect );
+
return pObj;
}
@@ -2655,7 +2726,7 @@ String SdPage::GetPresObjText(PresObjKind eObjKind) const
{
aString = String ( SdResId( STR_PRESOBJ_ORGCHART ) );
}
- else if (eObjKind == PRESOBJ_TABLE)
+ else if (eObjKind == PRESOBJ_CALC)
{
aString = String ( SdResId( STR_PRESOBJ_TABLE ) );
}
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index daefe45c3cb1..bf5b98471b53 100644..100755
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -84,6 +84,44 @@ 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
+ {
+ DBG_ERROR("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()
@@ -132,25 +170,6 @@ SdrObject* ShapeList::getNextShape(SdrObject* pObj) const
return 0;
}
-SdrObject* ShapeList::getPreviousShape( SdrObject* pObj ) const
-{
- if( pObj )
- {
- ListImpl::const_iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), pObj ) );
- if( (aIter != maShapeList.end()) && (aIter != maShapeList.begin()) )
- {
- aIter--;
- return (*aIter);
- }
- }
- else if( !maShapeList.empty() )
- {
- return (*--maShapeList.end());
- }
-
- return 0;
-}
-
void ShapeList::ObjectInDestruction(const SdrObject& rObject)
{
ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rObject ) );
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index c91fee735954..138863cc313a 100644..100755
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -144,30 +144,6 @@ SfxStyleSheetBase* SdStyleSheetPool::GetTitleSheet(const String& rLayoutName)
return pResult;
}
-// ----------------------------------------------------------
-// find layout name of first layout
-// ----------------------------------------------------------
-
-String SdStyleSheetPool::GetLayoutName() const
-{
- String aName( SdResId(STR_LAYOUT_DEFAULT_NAME ) );
- sal_uInt32 nCount = aStyles.size();
-
- for( sal_uInt32 n = 0; n < nCount; n++ )
- {
- aName = aStyles[n]->GetName();
- sal_uInt16 nPos = aName.SearchAscii( SD_LT_SEPARATOR );
- if( nPos != STRING_NOTFOUND )
- break;
- }
-
- sal_uInt16 nPos = aName.Search( sal_Unicode( ' ' ));
- if( nPos != STRING_NOTFOUND )
- aName.Erase( nPos ); // removing blanks and number (e.g. "Gliederung 1")
-
- return aName;
-}
-
/*************************************************************************
|*
|* eine Liste der Gliederungstextvorlagen fuer ein Praesentationlayout
@@ -573,32 +549,6 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const String& rLayoutName, sal_Bo
/*************************************************************************
|*
-|* StyleSheets des genannten Praesentationslayouts loeschen
-|*
-\************************************************************************/
-
-void SdStyleSheetPool::EraseLayoutStyleSheets(const String& rLayoutName)
-{
- SfxStyleSheetBase* pSheet = NULL;
-
- List* pNameList = CreateLayoutSheetNames(rLayoutName);
-
- String* pName = (String*)pNameList->First();
- while (pName)
- {
- pSheet = Find(*pName, SD_STYLE_FAMILY_MASTERPAGE);
- DBG_ASSERT(pSheet, "EraseLayoutStyleSheets: Vorlage nicht gefunden");
- if (pSheet)
- Remove(pSheet);
- delete pName;
- pName = (String*)pNameList->Next();
- }
- delete pNameList;
-}
-
-
-/*************************************************************************
-|*
|* Graphik-StyleSheets aus dem Quellpool in diesen Pool kopieren
|*
|* (rSourcePool kann nicht const sein, weil SfxStyleSheetPoolBase::Find
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index 0856e867f4e1..ab6c69ee8fdc 100644..100755
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -118,7 +118,6 @@ public:
void Dispose();
void SetText( OutlinerParaObject& rText );
- void SetString( const String& rText );
OutlinerParaObject* CreateText();
String GetText();
SdDrawDocument* GetDoc() { return pImpl->mpDoc; }
@@ -177,16 +176,6 @@ OutlinerParaObject* TextApiObject::CreateText()
return mpSource->CreateText();
}
-void TextApiObject::SetString( const String& rText )
-{
- SdrModel* pModel = mpSource->GetDoc();
- if( pModel && pModel->IsUndoEnabled() )
- pModel->AddUndo( new UndoTextAPIChanged( *pModel, this ) );
-
- mpSource->SetString( rText );
- maSelection.nStartPara = 0xffff;
-}
-
void TextApiObject::SetText( OutlinerParaObject& rText )
{
SdrModel* pModel = mpSource->GetDoc();
@@ -288,22 +277,6 @@ void TextAPIEditSource::SetText( OutlinerParaObject& rText )
}
}
-void TextAPIEditSource::SetString( const String& rText )
-{
- if ( pImpl->mpDoc )
- {
- if( !pImpl->mpOutliner )
- {
- //init draw model first
- pImpl->mpOutliner = new Outliner( pImpl->mpDoc, OUTLINERMODE_TEXTOBJECT );
- pImpl->mpDoc->SetCalcFieldValueHdl( pImpl->mpOutliner );
- }
- else
- pImpl->mpOutliner->Clear();
- pImpl->mpOutliner->Insert( rText );
- }
-}
-
OutlinerParaObject* TextAPIEditSource::CreateText()
{
if ( pImpl->mpDoc && pImpl->mpOutliner )
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index f3ec27d8093c..3d8797beb328 100644..100755
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -476,7 +476,6 @@ class GroupTable
::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > &
GetCurrentGroupAccess() const { return mpGroupEntry[ mnCurrentGroupEntry - 1 ]->mXIndexAccess; };
sal_uInt32 GetGroupsClosed();
- void SkipCurrentGroup();
void ResetGroupTable( sal_uInt32 nCount );
void ClearGroupTable();
sal_Bool EnterGroup( ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > & rIndex );
@@ -534,7 +533,7 @@ class PortionObj : public PropStateValue
protected :
void ImplClear();
- void ImplConstruct( PortionObj& rPortionObj );
+ void ImplConstruct( const PortionObj& rPortionObj );
sal_uInt32 ImplGetTextField( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & rXTextRangeRef,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef, String& rURL );
sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
@@ -567,13 +566,13 @@ class PortionObj : public PropStateValue
sal_Bool bLast, FontCollection& rFontCollection );
PortionObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
FontCollection& rFontCollection );
- PortionObj( PortionObj& rPortionObj );
+ PortionObj( const PortionObj& rPortionObj );
~PortionObj();
void Write( SvStream* pStrm, sal_Bool bLast );
sal_uInt32 Count() const { return mnTextSize; };
- PortionObj& operator=( PortionObj& rPortionObj );
+ PortionObj& operator=( const PortionObj& rPortionObj );
};
struct ParaFlags
@@ -594,10 +593,9 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
protected :
- void ImplConstruct( ParagraphObj& rParagraphObj );
+ void ImplConstruct( const ParagraphObj& rParagraphObj );
void ImplClear();
sal_uInt32 ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition );
- ::com::sun::star::awt::Size ImplMapSize( const ::com::sun::star::awt::Size& rSize );
void ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Bool bGetPropStateValue = FALSE );
void ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue = FALSE );
@@ -631,7 +629,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
ParagraphObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent > & rXTextContentRef,
ParaFlags, FontCollection& rFontCollection,
PPTExBulletProvider& rBuProv );
- ParagraphObj( ParagraphObj& rParargraphObj );
+ ParagraphObj( const ParagraphObj& rParargraphObj );
ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSetRef,
PPTExBulletProvider& rBuProv );
@@ -641,7 +639,7 @@ class ParagraphObj : public List, public PropStateValue, public SOParagraph
void Write( SvStream* pStrm );
sal_uInt32 Count() const { return mnTextSize; };
- ParagraphObj& operator=( ParagraphObj& rParagraphObj );
+ ParagraphObj& operator=( const ParagraphObj& rParagraphObj );
};
struct ImplTextObj
@@ -659,13 +657,13 @@ struct ImplTextObj
class TextObj
{
- ImplTextObj* mpImplTextObj;
+ mutable ImplTextObj* mpImplTextObj;
void ImplCalculateTextPositions();
public :
TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSimpleText > &
rXText, int nInstance, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv );
- TextObj( TextObj& rTextObj );
+ TextObj( const TextObj& rTextObj );
~TextObj();
void Write( SvStream* pStrm );
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index c9d083db86d9..f4462da6b8b8 100644..100755
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -312,14 +312,6 @@ sal_Bool GroupTable::GetNextGroupEntry()
// ---------------------------------------------------------------------------------------------
-void GroupTable::SkipCurrentGroup()
-{
- if ( mnCurrentGroupEntry )
- delete ( mpGroupEntry[ --mnCurrentGroupEntry ] );
-}
-
-// ---------------------------------------------------------------------------------------------
-
FontCollectionEntry::~FontCollectionEntry()
{
}
@@ -1869,7 +1861,7 @@ PortionObj::PortionObj( ::com::sun::star::uno::Reference< ::com::sun::star::text
}
}
-PortionObj::PortionObj( PortionObj& rPortionObj )
+PortionObj::PortionObj( const PortionObj& rPortionObj )
: PropStateValue( rPortionObj )
{
ImplConstruct( rPortionObj );
@@ -2097,7 +2089,7 @@ void PortionObj::ImplClear()
delete[] mpText;
}
-void PortionObj::ImplConstruct( PortionObj& rPortionObj )
+void PortionObj::ImplConstruct( const PortionObj& rPortionObj )
{
mbLastPortion = rPortionObj.mbLastPortion;
mnTextSize = rPortionObj.mnTextSize;
@@ -2291,7 +2283,7 @@ sal_uInt32 PortionObj::ImplGetTextField( ::com::sun::star::uno::Reference< ::com
return nRetValue;
}
-PortionObj& PortionObj::operator=( PortionObj& rPortionObj )
+PortionObj& PortionObj::operator=( const PortionObj& rPortionObj )
{
if ( this != &rPortionObj )
{
@@ -2369,7 +2361,7 @@ ParagraphObj::ParagraphObj( const ::com::sun::star::uno::Reference< ::com::sun::
}
}
-ParagraphObj::ParagraphObj( ParagraphObj& rObj )
+ParagraphObj::ParagraphObj( const ParagraphObj& rObj )
: List()
, PropStateValue()
, SOParagraph()
@@ -2878,7 +2870,7 @@ void ParagraphObj::ImplGetParagraphValues( PPTExBulletProvider& rBuProv, sal_Boo
meBiDi = ePropState;
}
-void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
+void ParagraphObj::ImplConstruct( const ParagraphObj& rParagraphObj )
{
mnTextSize = rParagraphObj.mnTextSize;
mnTextAdjust = rParagraphObj.mnTextAdjust;
@@ -2891,8 +2883,9 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
mbForbiddenRules = rParagraphObj.mbForbiddenRules;
mnBiDi = rParagraphObj.mnBiDi;
- for ( void* pPtr = rParagraphObj.First(); pPtr; pPtr = rParagraphObj.Next() )
- Insert( new PortionObj( *(PortionObj*)pPtr ), LIST_APPEND );
+ ParagraphObj& rOther = const_cast<ParagraphObj&>(rParagraphObj);
+ for ( const void* pPtr = rOther.First(); pPtr; pPtr = rOther.Next() )
+ Insert( new PortionObj( *(const PortionObj*)pPtr ), LIST_APPEND );
maTabStop = rParagraphObj.maTabStop;
bExtendedParameters = rParagraphObj.bExtendedParameters;
@@ -2917,16 +2910,6 @@ void ParagraphObj::ImplConstruct( ParagraphObj& rParagraphObj )
nBulletId = rParagraphObj.nBulletId;
}
-::com::sun::star::awt::Size ParagraphObj::ImplMapSize( const ::com::sun::star::awt::Size& rSize )
-{
- Size aSize( OutputDevice::LogicToLogic( Size( rSize.Width, rSize.Height ), maMapModeSrc, maMapModeDest ) );
- if ( !aSize.Width() )
- aSize.Width()++;
- if ( !aSize.Height() )
- aSize.Height()++;
- return ::com::sun::star::awt::Size( aSize.Width(), aSize.Height() );
-}
-
sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition )
{
mnTextSize = 0;
@@ -2935,7 +2918,7 @@ sal_uInt32 ParagraphObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosi
return mnTextSize;
}
-ParagraphObj& ParagraphObj::operator=( ParagraphObj& rParagraphObj )
+ParagraphObj& ParagraphObj::operator=( const ParagraphObj& rParagraphObj )
{
if ( this != &rParagraphObj )
{
@@ -2998,7 +2981,7 @@ TextObj::TextObj( ::com::sun::star::uno::Reference< ::com::sun::star::text::XSim
ImplCalculateTextPositions();
}
-TextObj::TextObj( TextObj& rTextObj )
+TextObj::TextObj( const TextObj& rTextObj )
{
mpImplTextObj = rTextObj.mpImplTextObj;
mpImplTextObj->mnRefCount++;
@@ -4155,6 +4138,7 @@ sal_Bool PPTWriter::ImplCreatePresentationPlaceholder( const sal_Bool bMasterPag
ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, NULL, aExtBu, &aPropOpt );
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60, sal_False, sal_True );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
*mpStrm << (sal_Int16)maRect.Top() << (sal_Int16)maRect.Left() << (sal_Int16)maRect.Right() << (sal_Int16)maRect.Bottom(); // oben, links, rechts, unten ????
@@ -5406,6 +5390,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
maRect.Justify();
if ( mnAngle )
ImplFlipBoundingBox( aPropOpt );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddClientAnchor( maRect );
@@ -5475,6 +5460,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
SvMemoryStream aExtBu( 0x200, 0x200 );
ImplWriteTextStyleAtom( *pClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOpt );
+ aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
mpPptEscherEx->AddClientAnchor( maRect );
@@ -5652,6 +5638,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x1000100 );
aPropOpt2.AddOpt( ESCHER_Prop_tableProperties, 1 );
aPropOpt2.AddOpt( ESCHER_Prop_tableRowProperties, sal_True, aMemStrm.Tell(), static_cast< sal_uInt8* >( const_cast< void* >( aMemStrm.GetData() ) ), aMemStrm.Tell() );
+ aPropOpt.CreateShapeProperties( rXShape );
aPropOpt.Commit( *mpStrm );
aPropOpt2.Commit( *mpStrm, 3, ESCHER_UDefProp );
mpPptEscherEx->AddAtom( 8, ESCHER_ClientAnchor );
diff --git a/sd/source/filter/html/htmlattr.cxx b/sd/source/filter/html/htmlattr.cxx
index 5adcbd5fc56a..4bcb73535ba1 100644..100755
--- a/sd/source/filter/html/htmlattr.cxx
+++ b/sd/source/filter/html/htmlattr.cxx
@@ -100,15 +100,3 @@ void SdHtmlAttrPreview::SetColors( Color& aBack, Color& aText, Color& aLink,
m_aVLinkColor = aVLink;
m_aALinkColor = aALink;
}
-
-// =====================================================================
-// =====================================================================
-void SdHtmlAttrPreview::GetColors( Color& aBack, Color& aText, Color& aLink,
- Color& aVLink, Color& aALink ) const
-{
- aBack = m_aBackColor;
- aText = m_aTextColor;
- aLink = m_aLinkColor;
- aVLink = m_aVLinkColor;
- aALink = m_aALinkColor;
-}
diff --git a/sd/source/filter/html/htmlattr.hxx b/sd/source/filter/html/htmlattr.hxx
index b076b2a29307..1caa16822ab1 100644..100755
--- a/sd/source/filter/html/htmlattr.hxx
+++ b/sd/source/filter/html/htmlattr.hxx
@@ -46,8 +46,6 @@ public:
void SetColors( Color& aBack, Color& aText, Color& aLink,
Color& aVLink, Color& aALink );
- void GetColors( Color& aBack, Color& aText, Color& aLink,
- Color& aVLink, Color& aALink ) const;
};
#endif // _SD_HTMLATTR_HXX
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 82fabc73aed2..9de46771e14c 100644..100755
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -3371,15 +3371,6 @@ BOOL HtmlErrorContext::GetString( ULONG, String& rCtxStr )
// =====================================================================
-void HtmlErrorContext::SetContext( USHORT nResId )
-{
- mnResId = nResId;
- maURL1.Erase();
- maURL2.Erase();
-}
-
-// =====================================================================
-
void HtmlErrorContext::SetContext( USHORT nResId, const String& rURL )
{
mnResId = nResId;
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 34ca8182d22f..43bc12419f84 100644..100755
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -88,7 +88,6 @@ public:
virtual BOOL GetString( ULONG nErrId, String& rCtxStr );
- void SetContext( USHORT nResId );
void SetContext( USHORT nResId, const String& rURL );
void SetContext( USHORT nResId, const String& rURL1, const String& rURL2 );
};
diff --git a/sd/source/filter/ppt/ppt97animations.cxx b/sd/source/filter/ppt/ppt97animations.cxx
index a4a3564d35b0..25ac858ca319 100644..100755
--- a/sd/source/filter/ppt/ppt97animations.cxx
+++ b/sd/source/filter/ppt/ppt97animations.cxx
@@ -84,11 +84,6 @@ Ppt97Animation::Ppt97Animation( SvStream& rInputStream )
m_aAtom.ReadStream( rInputStream );
}
-Ppt97Animation::Ppt97Animation()
- : MEMBER_CONSTRUCTOR_LIST()
-{
-}
-
Ppt97Animation::Ppt97Animation( const Ppt97Animation& rAnimation )
: MEMBER_CONSTRUCTOR_LIST()
{
@@ -163,11 +158,12 @@ bool Ppt97Animation::HasAfterEffect_DimAtNextEffect() const
{
return m_aAtom.nAfterEffect == 2;
}
+#ifdef FUTURE
bool Ppt97Animation::HasAfterEffect_DimAfterEffect() const
{
return m_aAtom.nAfterEffect == 3;
}
-
+#endif
UINT32 Ppt97Animation::GetSoundRef() const
{
return m_aAtom.nSoundRef;
diff --git a/sd/source/filter/ppt/ppt97animations.hxx b/sd/source/filter/ppt/ppt97animations.hxx
index 4aa24ab12de8..c68ba9a19382 100644..100755
--- a/sd/source/filter/ppt/ppt97animations.hxx
+++ b/sd/source/filter/ppt/ppt97animations.hxx
@@ -95,7 +95,6 @@ class Ppt97Animation
public: //public methods
Ppt97Animation( SvStream& rIn );
- Ppt97Animation();
Ppt97Animation( const Ppt97Animation& rAnimation );
Ppt97Animation& operator= ( const Ppt97Animation& rAnimation );
bool operator < ( const Ppt97Animation& rAnimation ) const;//later is greater
@@ -129,7 +128,9 @@ private: //private methods
bool HasAfterEffect() const;
bool HasAfterEffect_ChangeColor() const;
bool HasAfterEffect_DimAtNextEffect() const;
+#ifdef FUTURE
bool HasAfterEffect_DimAfterEffect() const;
+#endif
bool HasStopPreviousSound() const;
bool HasReverseOrder() const; //true if the text paragraphs should be animated in reverse order
sal_Int32 GetParagraphLevel() const; //paragraph level that is animated ( that paragraph and higher levels )
diff --git a/sd/source/filter/ppt/pptatom.cpp b/sd/source/filter/ppt/pptatom.cpp
index 21a0c3c3f9f8..0bd31c2119d5 100644..100755
--- a/sd/source/filter/ppt/pptatom.cpp
+++ b/sd/source/filter/ppt/pptatom.cpp
@@ -49,7 +49,15 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream )
Atom* pLastAtom = NULL;
- while( (mrStream.GetError() == 0 ) && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
+ // retrieve file size (to allow sanity checks)
+ const sal_Size nStreamPos = mrStream.Tell();
+ mrStream.Seek( STREAM_SEEK_TO_END );
+ const sal_Size nStreamSize = mrStream.Tell();
+ mrStream.Seek( nStreamPos );
+
+ while( (mrStream.GetError() == 0 )
+ && ( mrStream.Tell() < nStreamSize )
+ && ( mrStream.Tell() < maRecordHeader.GetRecEndFilePos() ) )
{
mrStream >> aChildHeader;
@@ -109,15 +117,3 @@ const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) co
return pChild;
}
-
-/** returns the next child atom after pLast with nRecType and nRecInstance or NULL */
-const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const
-{
- const Atom* pChild = pLast != NULL ? pLast->mpNextAtom : mpFirstChild;
- while( pChild && (pChild->maRecordHeader.nRecType != nRecType) && (pChild->maRecordHeader.nRecInstance != nRecInstance) )
- {
- pChild = findNextChildAtom( pChild );
- }
-
- return pChild;
-}
diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx
index 0b13dc314584..d430b7bffb7a 100644..100755
--- a/sd/source/filter/ppt/pptatom.hxx
+++ b/sd/source/filter/ppt/pptatom.hxx
@@ -49,21 +49,12 @@ public:
/** returns true if at least one atim with the given nRecType is found */
inline bool hasChildAtom( sal_uInt16 nRecType ) const;
- /** returns true if at least one atim with the given nRecType and nRecInstnace is found */
- inline bool hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const;
-
/** returns the first child atom with nRecType or NULL */
inline const Atom* findFirstChildAtom( sal_uInt16 nRecType ) const;
/** returns the next child atom after pLast with nRecType or NULL */
const Atom* findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) const;
- /** returns the first child atom with nRecType and nRecInstance or NULL */
- inline const Atom* findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const;
-
- /** returns the next child atom after pLast with nRecType and nRecInstance or NULL */
- const Atom* findNextChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance, const Atom* pLast ) const;
-
/** returns the first child atom or NULL */
inline const Atom* findFirstChildAtom() const;
@@ -99,11 +90,6 @@ inline bool Atom::hasChildAtom( sal_uInt16 nRecType ) const
return findFirstChildAtom( nRecType ) != NULL;
}
-inline bool Atom::hasChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const
-{
- return findFirstChildAtom( nRecType, nRecInstance ) != NULL;
-}
-
inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType ) const
{
return findNextChildAtom( nRecType, NULL );
@@ -114,11 +100,6 @@ inline const DffRecordHeader& Atom::getHeader() const
return maRecordHeader;
}
-inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType, sal_uInt16 nRecInstance ) const
-{
- return findNextChildAtom( nRecType, nRecInstance, NULL );
-}
-
inline const Atom* Atom::findFirstChildAtom() const
{
return mpFirstChild;
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 59d5b5e0b98a..6a5ce08bc912 100644..100755
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2431,7 +2431,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
case PPT_PLACEHOLDER_MEDIACLIP :
case PPT_PLACEHOLDER_OBJECT : ePresObjKind = PRESOBJ_OBJECT; break;
case PPT_PLACEHOLDER_GRAPH : ePresObjKind = PRESOBJ_CHART; break;
- case PPT_PLACEHOLDER_TABLE : ePresObjKind = PRESOBJ_TABLE; break;
+ case PPT_PLACEHOLDER_TABLE : ePresObjKind = PRESOBJ_CALC; break;
case PPT_PLACEHOLDER_CLIPART : ePresObjKind = PRESOBJ_GRAPHIC; break;
case PPT_PLACEHOLDER_ORGANISZATIONCHART : ePresObjKind = PRESOBJ_ORGCHART; break;
}
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 16fc1a99dd8a..10b0b152b8f4 100644..100755
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -1522,52 +1522,6 @@ void AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference<
// --------------------------------------------------------------------
-/* todo: for now we dump sub containers into its parent container, what else to do with it? */
-void AnimationImporter::importAnimationSubContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
-{
- DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importTimeContainer()!");
- if( pAtom && xNode.is() )
- {
- // import sub containers
- const Atom* pChildAtom = pAtom->findFirstChildAtom();
-
- while( pChildAtom )
- {
- switch( pChildAtom->getType() )
- {
- case DFF_msofbtAnimNode:
- case DFF_msofbtAnimEvent:
- case DFF_msofbtAnimValue:
- case DFF_msofbtAnimAction:
- case DFF_msofbtAnimPropertySet:
- break;
- case DFF_msofbtAnimCommand:
- {
- const OUString aServiceName( OUString::createFromAscii("com.sun.star.animations.Command") );
- Reference< XAnimationNode > xChildNode( ::comphelper::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY );
- importAnimationNodeContainer( pChildAtom, xChildNode );
- Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY );
- if( xParentContainer.is() && xChildNode.is() )
- xParentContainer->appendChild( xChildNode );
- }
- break;
-
- default:
- {
- dump_atom_header( pChildAtom, true, false );
- dump_atom( pChildAtom );
- dump_atom_header( pChildAtom, false, false );
- }
- break;
- }
-
- pChildAtom = pAtom->findNextChildAtom( pChildAtom );
- }
- }
-}
-
-// --------------------------------------------------------------------
-
void AnimationImporter::importAnimationNodeContainer( const Atom* pAtom, const Reference< XAnimationNode >& xNode )
{
DBG_ASSERT( pAtom && xNode.is(), "invalid call to ppt::AnimationImporter::importAnimationNodeContainer()!");
@@ -3894,14 +3848,6 @@ void AnimationImporter::dump_atom( const Atom* , bool )
{
}
-void AnimationImporter::dump( sal_uInt32 , bool )
-{
-}
-
-void AnimationImporter::dump_anim_group( const Atom* , const AnimationNode& , const PropertySet& , bool )
-{
-}
-
void AnimationImporter::dump_target( ::com::sun::star::uno::Any& )
{
}
@@ -3922,10 +3868,6 @@ void AnimationImporter::dump( const char * )
{
}
-void AnimationImporter::dump( const rtl::OUString& )
-{
-}
-
void AnimationImporter::dump( const char * , sal_Int32 )
{
}
diff --git a/sd/source/filter/ppt/pptinanimations.hxx b/sd/source/filter/ppt/pptinanimations.hxx
index d29449361861..24f423029e82 100644..100755
--- a/sd/source/filter/ppt/pptinanimations.hxx
+++ b/sd/source/filter/ppt/pptinanimations.hxx
@@ -62,7 +62,6 @@ private:
void importAnimationContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParent );
void importTimeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimationNodeContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
- void importAnimationSubContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimateSetContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
void importAnimateFilterContainer( const Atom* pAtom, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode );
@@ -109,18 +108,18 @@ private:
#ifdef DBG_ANIM_LOG
FILE * mpFile;
+ void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
+ void dump( const rtl::OUString& rString );
+ void dump( sal_uInt32 nLen, bool bNewLine = true );
#endif
void dump_atom_header( const Atom* pAtom, bool bOpen, bool bAppend );
void dump_atom( const Atom* pAtom, bool bNewLine = true );
- void dump( sal_uInt32 nLen, bool bNewLine = true );
- void dump_anim_group( const Atom* pAtom, const AnimationNode& rNode, const PropertySet& rSet, bool bOpen );
void dump_target( ::com::sun::star::uno::Any& rAny );
void dump( ::com::sun::star::uno::Any& rAny );
void dump( const PropertySet& rSet );
void dump( const AnimationNode& rNode );
void dump( const char * pText );
- void dump( const rtl::OUString& rString );
void dump( const char * pText, sal_Int32 nInt );
void dump( const char * pText, double fDouble );
void dump( const char * pText, const char * pText2 );
diff --git a/sd/source/ui/accessibility/AccessibleTaskPane.cxx b/sd/source/ui/accessibility/AccessibleTaskPane.cxx
deleted file mode 100644
index c2a2dafef296..000000000000
--- a/sd/source/ui/accessibility/AccessibleTaskPane.cxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "AccessibleTaskPane.hxx"
-
-#include "AccessibleTreeNode.hxx"
-
-#include "taskpane/ToolPanel.hxx"
-#include "taskpane/ControlContainer.hxx"
-#include "taskpane/TitledControl.hxx"
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-
-#include <vos/mutex.hxx>
-#include <vcl/svapp.hxx>
-
-using namespace ::rtl;
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::accessibility;
-using namespace ::com::sun::star::uno;
-
-namespace accessibility {
-
-AccessibleTaskPane::AccessibleTaskPane (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> & rxParent,
- const OUString& rsName,
- const OUString& rsDescription,
- ::sd::toolpanel::ToolPanel& rTaskPane)
- : AccessibleTreeNode(
- rxParent,
- rTaskPane,
- rsName,
- rsDescription,
- AccessibleRole::PANEL)
-{
-}
-
-
-
-
-AccessibleTaskPane::~AccessibleTaskPane (void)
-{
-}
-
-
-
-
-//===== XServiceInfo ========================================================
-
-OUString SAL_CALL
- AccessibleTaskPane::getImplementationName (void)
- throw (RuntimeException)
-{
- return OUString(RTL_CONSTASCII_USTRINGPARAM("AccessibleTaskPane"));
-}
-
-
-
-
-void AccessibleTaskPane::UpdateStateSet (void)
-{
- // The task pane itself can not be focused.
- UpdateState(AccessibleStateType::FOCUSED, false);
-}
-
-
-} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
index ad8d8facf9da..5c7462581d0b 100644..100755
--- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx
+++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
@@ -714,6 +714,7 @@ IMPL_LINK(AccessibleTreeNode, WindowEventListener, VclWindowEvent*, pEvent)
case VCLEVENT_WINDOW_GETFOCUS:
case VCLEVENT_WINDOW_LOSEFOCUS:
UpdateStateSet();
+ break;
}
return 1;
}
diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
index 70734ac23198..de5342afd23f 100644..100755
--- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
+++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
@@ -44,18 +44,6 @@ namespace accessibility {
May change in the future.
*/
-AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId)
- : mpView (pView),
- mnWindowId (nWindowId),
- mrDevice (pView->GetPaintWindow((sal_uInt32)nWindowId)->GetOutputDevice())
-{
- OSL_ASSERT (mpView != NULL);
- // empty
-}
-
-
-
-
AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice)
: mpView (pView),
mnWindowId (0),
@@ -86,15 +74,6 @@ AccessibleViewForwarder::~AccessibleViewForwarder (void)
-void AccessibleViewForwarder::SetView (SdrPaintView* pView)
-{
- mpView = pView;
- OSL_ASSERT (mpView != NULL);
-}
-
-
-
-
sal_Bool AccessibleViewForwarder::IsValid (void) const
{
return sal_True;
diff --git a/sd/source/ui/accessibility/makefile.mk b/sd/source/ui/accessibility/makefile.mk
index d5eb47b06149..25d79aa7f8da 100755
--- a/sd/source/ui/accessibility/makefile.mk
+++ b/sd/source/ui/accessibility/makefile.mk
@@ -56,7 +56,6 @@ SLOFILES = \
$(SLO)$/AccessibleScrollPanel.obj \
$(SLO)$/AccessibleSlideSorterView.obj \
$(SLO)$/AccessibleSlideSorterObject.obj \
- $(SLO)$/AccessibleTaskPane.obj \
$(SLO)$/AccessibleTreeNode.obj \
$(SLO)$/SdShapeTypes.obj
diff --git a/sd/source/ui/animations/AnimationSchemesPane.cxx b/sd/source/ui/animations/AnimationSchemesPane.cxx
deleted file mode 100644
index 337dc64331fd..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.cxx
+++ /dev/null
@@ -1,443 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-#include "AnimationSchemesPane.hxx"
-#include "AnimationSchemesPane.hrc"
-#include "CustomAnimation.hrc"
-
-#include "TransitionPreset.hxx"
-#include "sdresid.hxx"
-#include "ViewShellBase.hxx"
-#include "DrawDocShell.hxx"
-#include "SlideSorterViewShell.hxx"
-#include "drawdoc.hxx"
-#include "filedlg.hxx"
-#include "strings.hrc"
-#include "EventMultiplexer.hxx"
-#include <com/sun/star/beans/XPropertySet.hpp>
-
-#ifndef _SVT_CONTROLDIMS_HRC_
-#include <svtools/controldims.hrc>
-#endif
-#include <svx/gallery.hxx>
-#include <unotools/pathoptions.hxx>
-#include <vcl/msgbox.hxx>
-#include <tools/urlobj.hxx>
-
-#include <algorithm>
-
-
-using namespace ::com::sun::star;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-using ::rtl::OUString;
-using ::com::sun::star::uno::RuntimeException;
-
-// ______________________
-//
-// Local Helper Functions
-// ______________________
-
-namespace
-{
-
-typedef ::boost::shared_ptr<sd::slidesorter::SlideSorterViewShell::PageSelection>
- SharedPageSelection;
-SharedPageSelection lcl_getSelectedPages (::sd::ViewShellBase& rBase)
-{
- ::sd::slidesorter::SlideSorterViewShell*pSlideSorterViewShell
- = ::sd::slidesorter::SlideSorterViewShell::GetSlideSorter(rBase);
- DBG_ASSERT( pSlideSorterViewShell, "No Slide-Sorter available" );
-
- if (pSlideSorterViewShell != NULL)
- {
- return pSlideSorterViewShell->GetPageSelection();
- }
- else
- {
- return SharedPageSelection(new sd::slidesorter::SlideSorterViewShell::PageSelection());
- }
-}
-
-// void lcl_ApplyToPages( ::std::vector< SdPage * > aPages, const ::sd::impl::TransitionEffect & rEffect )
-// {
-// ::std::vector< SdPage * >::const_iterator aIt( aPages.begin());
-// const ::std::vector< SdPage * >::const_iterator aEndIt( aPages.end());
-// for( ; aIt != aEndIt; ++aIt )
-// {
-// rEffect.applyTo( *(*aIt) );
-// }
-// }
-
-} // anonymous namespace
-
-namespace sd
-{
-
-// ____________________
-//
-// AnimationSchemesPane
-// ____________________
-
-AnimationSchemesPane::AnimationSchemesPane(
- ::Window * pParent,
- ViewShellBase & rBase,
- SdDrawDocument* pDoc ) :
- Control( pParent, SdResId( DLG_ANIMATION_SCHEMES_PANE ) ),
-
- mrBase( rBase ),
- mpDrawDoc( pDoc ),
- maFL_APPLY_SCHEME( this, SdResId( FL_APPLY_SCHEME ) ),
- maLB_ANIMATION_SCHEMES( this, SdResId( LB_ANIMATION_SCHEMES ) ),
- maFL_EMPTY1( this, SdResId( FL_EMPTY1 ) ),
- maPB_APPLY_TO_ALL( this, SdResId( PB_APPLY_TO_ALL ) ),
- maPB_PLAY( this, SdResId( PB_PLAY ) ),
- maPB_SLIDE_SHOW( this, SdResId( PB_SLIDE_SHOW ) ),
- maFL_EMPTY2( this, SdResId( FL_EMPTY2 ) ),
- maCB_AUTO_PREVIEW( this, SdResId( CB_AUTO_PREVIEW ) ),
-
- maSTR_NO_SCHEME( SdResId( STR_NO_SCHEME ) ),
- mbHasSelection( false ),
- mbUpdatingControls( false ),
- mbIsMainViewChangePending( false )
-{
- // use no resource ids from here on
- FreeResource();
-
- if( pDoc )
- mxModel.set( pDoc->getUnoModel(), uno::UNO_QUERY );
- // TODO: get correct view
- if( mxModel.is())
- mxView.set( mxModel->getCurrentController(), uno::UNO_QUERY );
-
- // fill list box of slide transitions
- maLB_ANIMATION_SCHEMES.InsertEntry( maSTR_NO_SCHEME );
-
- // set defaults
- maCB_AUTO_PREVIEW.Check(); // automatic preview on
-
- // update control states before adding handlers
- updateLayout();
- updateControls();
-
- // set handlers
- maPB_APPLY_TO_ALL.SetClickHdl( LINK( this, AnimationSchemesPane, ApplyToAllButtonClicked ));
- maPB_PLAY.SetClickHdl( LINK( this, AnimationSchemesPane, PlayButtonClicked ));
- maPB_SLIDE_SHOW.SetClickHdl( LINK( this, AnimationSchemesPane, SlideShowButtonClicked ));
-
- maLB_ANIMATION_SCHEMES.SetSelectHdl( LINK( this, AnimationSchemesPane, SchemeSelected ));
-
- addListener();
-}
-
-AnimationSchemesPane::~AnimationSchemesPane()
-{
- removeListener();
-}
-
-void AnimationSchemesPane::Resize()
-{
- updateLayout();
-}
-
-void AnimationSchemesPane::onSelectionChanged()
-{
- updateControls();
-}
-
-void AnimationSchemesPane::onChangeCurrentPage()
-{
- updateControls();
-}
-
-void AnimationSchemesPane::updateLayout()
-{
- ::Size aPaneSize( GetSizePixel() );
-
- // start layouting elements from bottom to top. The remaining space is used
- // for the topmost list box
- ::Point aOffset( LogicToPixel( Point( 3, 3 ), MAP_APPFONT ) );
- long nOffsetX = aOffset.getX();
- long nOffsetY = aOffset.getY();
- long nOffsetBtnX = LogicToPixel( Point( 6, 1 ), MAP_APPFONT ).getX();
-
- ::Point aUpperLeft( nOffsetX, aPaneSize.getHeight() - nOffsetY );
- long nMaxWidth = aPaneSize.getWidth() - 2 * nOffsetX;
-
- // auto preview check-box
- ::Size aCtrlSize = maCB_AUTO_PREVIEW.GetSizePixel();
- aCtrlSize.setWidth( maCB_AUTO_PREVIEW.CalcMinimumSize( nMaxWidth ).getWidth());
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maCB_AUTO_PREVIEW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above check-box
- aCtrlSize = maFL_EMPTY2.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY2.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // buttons "Play" and "Slide Show"
- long nPlayButtonWidth = maPB_PLAY.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
- long nSlideShowButtonWidth = maPB_SLIDE_SHOW.CalcMinimumSize().getWidth() + 2 * nOffsetBtnX;
-
- if( (nPlayButtonWidth + nSlideShowButtonWidth + nOffsetX) <= nMaxWidth )
- {
- // place buttons side by side
- aCtrlSize = maPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nPlayButtonWidth );
- maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aUpperLeft.setX( aUpperLeft.getX() + nPlayButtonWidth + nOffsetX );
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
- aUpperLeft.setX( nOffsetX );
- }
- else
- {
- // place buttons on top of each other
- aCtrlSize = maPB_SLIDE_SHOW.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- aCtrlSize.setWidth( nSlideShowButtonWidth );
- maPB_SLIDE_SHOW.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- aCtrlSize = maPB_PLAY.GetSizePixel();
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- aCtrlSize.setWidth( nPlayButtonWidth );
- maPB_PLAY.SetPosSizePixel( aUpperLeft, aCtrlSize );
- }
-
- // "Apply to All Slides" button
- aCtrlSize = maPB_APPLY_TO_ALL.GetSizePixel();
- aCtrlSize.setWidth( maPB_APPLY_TO_ALL.CalcMinimumSize( nMaxWidth ).getWidth() + 2 * nOffsetBtnX );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight() - nOffsetY );
- maPB_APPLY_TO_ALL.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line above "Apply to All Slides" button
- aCtrlSize = maFL_EMPTY1.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- aUpperLeft.setY( aUpperLeft.getY() - aCtrlSize.getHeight());
- maFL_EMPTY1.SetPosSizePixel( aUpperLeft, aCtrlSize );
-
- // fixed line "Apply to selected slides"
- aCtrlSize = maFL_APPLY_SCHEME.GetSizePixel();
- aCtrlSize.setWidth( nMaxWidth );
- ::Point aUpperLeftCorner( nOffsetX, nOffsetY );
- maFL_APPLY_SCHEME.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
- aUpperLeftCorner.setY( aUpperLeftCorner.getY() + aCtrlSize.getHeight() + nOffsetY );
- aUpperLeft.setY( aUpperLeft.getY() - nOffsetY );
-
- // list box animation scheme
- aCtrlSize.setWidth( nMaxWidth );
- aCtrlSize.setHeight( aUpperLeft.getY() - aUpperLeftCorner.getY() );
- maLB_ANIMATION_SCHEMES.SetPosSizePixel( aUpperLeftCorner, aCtrlSize );
-}
-
-void AnimationSchemesPane::updateControls()
-{
- SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase ));
- if( aSelectedPages->empty())
- {
- mbHasSelection = false;
- return;
- }
- mbHasSelection = true;
-
- DBG_ASSERT( ! mbUpdatingControls, "Multiple Control Updates" );
- mbUpdatingControls = true;
-
- // get model data for first page
-#ifdef DBG_UTIL
- SdPage * pFirstPage = aSelectedPages->front();
- DBG_ASSERT( pFirstPage, "Invalid Page" );
-#endif
-
-// // merge with other pages
-// ::std::vector< SdPage * >::const_iterator aIt( aSelectedPages.begin());
-// const ::std::vector< SdPage * >::const_iterator aEndIt( aSelectedPages.end());
-
-// // start with second page (note aIt != aEndIt, because ! aSelectedPages.empty())
-// for( ++aIt ;aIt != aEndIt; ++aIt )
-// {
-// if( *aIt )
-// // merge
-// }
-
- mbUpdatingControls = false;
-
- updateControlState();
-}
-
-void AnimationSchemesPane::updateControlState()
-{
- maLB_ANIMATION_SCHEMES.Enable( mbHasSelection );
-
- maPB_APPLY_TO_ALL.Enable( mbHasSelection );
- maPB_PLAY.Enable( mbHasSelection );
-// maPB_SLIDE_SHOW.Enable( TRUE );
- maCB_AUTO_PREVIEW.Enable( mbHasSelection );
-}
-
-void AnimationSchemesPane::getAnimationSchemeFromControls() const
-{
- // TODO: Implement
-}
-
-void AnimationSchemesPane::applyToSelectedPages()
-{
- if( ! mbUpdatingControls )
- {
- SharedPageSelection aSelectedPages( lcl_getSelectedPages( mrBase ));
- if( ! aSelectedPages->empty())
- {
-// lcl_ApplyToPages( aSelectedPages, getAnimationSchemeFromControls() );
- }
- if( maCB_AUTO_PREVIEW.IsEnabled() &&
- maCB_AUTO_PREVIEW.IsChecked())
- {
- playCurrentScheme();
- }
- }
-}
-
-void AnimationSchemesPane::playCurrentScheme()
-{
- // TODO: Implement a preview in the center view
-}
-
-void AnimationSchemesPane::addListener()
-{
- Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) );
- mrBase.GetEventMultiplexer()->AddEventListener(
- aLink,
- tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION
- | tools::EventMultiplexerEvent::EID_CURRENT_PAGE
- | tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED
- | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
- | tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED);
-}
-
-void AnimationSchemesPane::removeListener()
-{
- Link aLink( LINK(this,AnimationSchemesPane,EventMultiplexerListener) );
- mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
-}
-
-IMPL_LINK(AnimationSchemesPane,EventMultiplexerListener,
- tools::EventMultiplexerEvent*,pEvent)
-{
- switch (pEvent->meEventId)
- {
- case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
- onSelectionChanged();
- break;
-
- case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
- onChangeCurrentPage();
- break;
-
- case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = Reference<drawing::XDrawView>();
- onSelectionChanged();
- onChangeCurrentPage();
- break;
-
- case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
- mbIsMainViewChangePending = true;
- break;
-
- case tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED:
- if (mbIsMainViewChangePending)
- {
- mbIsMainViewChangePending = false;
- mxView = Reference<drawing::XDrawView>::query( mxModel->getCurrentController() );
- onSelectionChanged();
- onChangeCurrentPage();
- }
- break;
- }
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, ApplyToAllButtonClicked, void *, EMPTYARG )
-{
- DBG_ASSERT( mpDrawDoc, "Invalid Draw Document!" );
- if( !mpDrawDoc )
- return 0;
-
- ::std::vector< SdPage * > aPages;
-
- sal_uInt16 nPageCount = mpDrawDoc->GetSdPageCount( PK_STANDARD );
- aPages.reserve( nPageCount );
- for( sal_uInt16 i=0; i<nPageCount; ++i )
- {
- SdPage * pPage = mpDrawDoc->GetSdPage( i, PK_STANDARD );
- if( pPage )
- aPages.push_back( pPage );
- }
-
-// if( ! aPages.empty())
-// lcl_ApplyToPages( aPages, getAnimationSchemeFromControls() );
-
- return 0;
-}
-
-
-IMPL_LINK( AnimationSchemesPane, PlayButtonClicked, void *, EMPTYARG )
-{
- playCurrentScheme();
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, SlideShowButtonClicked, void *, EMPTYARG )
-{
- mrBase.StartPresentation();
- return 0;
-}
-
-IMPL_LINK( AnimationSchemesPane, SchemeSelected, void *, EMPTYARG )
-{
- applyToSelectedPages();
- return 0;
-}
-
-::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase )
-{
- ::Window* pWindow = 0;
-
- DrawDocShell* pDocSh = rBase.GetDocShell();
- if( pDocSh )
- pWindow = new AnimationSchemesPane( pParent, rBase, pDocSh->GetDoc() );
-
- return pWindow;
-}
-
-
-} // namespace sd
diff --git a/sd/source/ui/animations/AnimationSchemesPane.hrc b/sd/source/ui/animations/AnimationSchemesPane.hrc
deleted file mode 100644
index 2b9ec9be3611..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.hrc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SD_ANIMATIONSCHEMESPANE_HRC
-#define _SD_ANIMATIONSCHEMESPANE_HRC
-
-#define FL_APPLY_SCHEME 1
-// spec: 1
-#define LB_ANIMATION_SCHEMES 2
-
-#define FL_EMPTY1 3
-// spec: 2
-#define PB_APPLY_TO_ALL 4
-// spec: 3
-#define PB_PLAY 5
-// spec: 4
-#define PB_SLIDE_SHOW 6
-
-#define FL_EMPTY2 7
-// spec: 5
-#define CB_AUTO_PREVIEW 8
-
-#define STR_NO_SCHEME 9
-
-
-#endif // _SD_ANIMATIONSCHEMESPANE_HRC
diff --git a/sd/source/ui/animations/AnimationSchemesPane.hxx b/sd/source/ui/animations/AnimationSchemesPane.hxx
deleted file mode 100644
index 8528e5e6ef64..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.hxx
+++ /dev/null
@@ -1,114 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef SD_ANIMATIONSCHEMESPANE_HXX
-#define SD_ANIMATIONSCHEMESPANE_HXX
-
-#include <vcl/ctrl.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/fixed.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
-#include <vcl/field.hxx>
-#include <com/sun/star/drawing/XDrawView.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-
-#include <vector>
-
-class SdDrawDocument;
-class SdPage;
-
-namespace sd { namespace tools {
-class EventMultiplexerEvent;
-} }
-
-namespace sd
-{
-
-class ViewShellBase;
-
-class AnimationSchemesPane : public Control
-{
-public:
- explicit AnimationSchemesPane(
- ::Window * pParent,
- ViewShellBase & rBase,
- SdDrawDocument* pDoc );
- virtual ~AnimationSchemesPane();
-
- virtual void Resize();
-
- void onSelectionChanged();
- void onChangeCurrentPage();
-
-private:
- void updateLayout();
- void updateControls();
- void updateControlState();
-
- void applyToSelectedPages();
- void playCurrentScheme();
-
- void addListener();
- void removeListener();
-
- void getAnimationSchemeFromControls() const;
-
- DECL_LINK( ApplyToAllButtonClicked, void * );
- DECL_LINK( PlayButtonClicked, void * );
- DECL_LINK( SlideShowButtonClicked, void * );
-
- DECL_LINK( SchemeSelected, void * );
- DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
-
-private:
- ViewShellBase & mrBase;
- SdDrawDocument * mpDrawDoc;
-
- FixedLine maFL_APPLY_SCHEME;
- ListBox maLB_ANIMATION_SCHEMES;
- FixedLine maFL_EMPTY1;
- PushButton maPB_APPLY_TO_ALL;
- PushButton maPB_PLAY;
- PushButton maPB_SLIDE_SHOW;
- FixedLine maFL_EMPTY2;
- CheckBox maCB_AUTO_PREVIEW;
-
- String maSTR_NO_SCHEME;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawView > mxView;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
-
- bool mbHasSelection;
- bool mbUpdatingControls;
- bool mbIsMainViewChangePending;
-};
-
-} // namespace sd
-
-// SD_ANIMATIONSCHEMESPANE_HXX
-#endif
diff --git a/sd/source/ui/animations/AnimationSchemesPane.src b/sd/source/ui/animations/AnimationSchemesPane.src
deleted file mode 100644
index 12447c917930..000000000000
--- a/sd/source/ui/animations/AnimationSchemesPane.src
+++ /dev/null
@@ -1,113 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "CustomAnimation.hrc"
-#include "AnimationSchemesPane.hrc"
-#include "helpids.h"
-
-#ifndef _SVT_CONTROLDIMS_HRC_
-#include <svtools/controldims.hrc>
-#endif
-
-// Note: Sizes of 1 usually mean they are auto-calculated
-
-Control DLG_ANIMATION_SCHEMES_PANE
-{
- OutputSize = TRUE;
- Size = MAP_APPFONT( 1, 1 );
-
- Text [ en-US ] = "Animation Schemes";
-
- FixedLine FL_APPLY_SCHEME
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Apply to selected slides ";
- };
-
- ListBox LB_ANIMATION_SCHEMES
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_LB_ANIMATION_SCHEMES;
- Border = TRUE ;
- TabStop = TRUE ;
-
- Size = MAP_APPFONT( 1, 1 );
- };
-
- FixedLine FL_EMPTY1
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- PushButton PB_APPLY_TO_ALL
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_APPLY_TO_ALL;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Apply to All Slides";
- };
-
-
- PushButton PB_PLAY
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_PLAY;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Play";
- };
-
- PushButton PB_SLIDE_SHOW
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_PB_SLIDE_SHOW;
- Size = MAP_APPFONT( 1, RSC_CD_PUSHBUTTON_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Slide Show";
- };
-
- FixedLine FL_EMPTY2
- {
- Size = MAP_APPFONT( 1, RSC_CD_FIXEDLINE_HEIGHT );
- };
-
- Checkbox CB_AUTO_PREVIEW
- {
- HelpId = HID_SD_ANIMATIONSCHEMESPANE_CB_AUTO_PREVIEW;
- Size = MAP_APPFONT( 1, RSC_CD_CHECKBOX_HEIGHT );
- TabStop = TRUE ;
-
- Text [ en-US ] = "Automatic preview";
- };
-
- // --------------------
-
- String STR_NO_SCHEME
- {
- Text [ en-US ] = "No Animation";
- };
-};
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 3ac3d1f24a07..f76b84d29826 100644..100755
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -92,7 +92,6 @@ extern void fillDurationComboBox( ComboBox* pBox );
class CategoryListBox : public ListBox
{
public:
- CategoryListBox( Window* pParent, WinBits nStyle = WB_BORDER );
CategoryListBox( Window* pParent, const ResId& rResId );
~CategoryListBox();
@@ -110,12 +109,6 @@ private:
Link maDoubleClickHdl;
};
-CategoryListBox::CategoryListBox( Window* pParent, WinBits nStyle /* = WB_BORDER */ )
-: ListBox( pParent, nStyle )
-{
- EnableUserDraw( TRUE );
-}
-
CategoryListBox::CategoryListBox( Window* pParent, const ResId& rResId )
: ListBox( pParent, rResId )
{
diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc b/sd/source/ui/animations/CustomAnimationSchemesPane.hrc
deleted file mode 100644
index 70168d2662cf..000000000000
--- a/sd/source/ui/animations/CustomAnimationSchemesPane.hrc
+++ /dev/null
@@ -1,32 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
-#define _SD_CUSTOMANIMATIONSCHEMESPANE_HRC
-
-
-#endif // _SD_CUSTOMANIMATIONSCHEMESPANE_HRC \ No newline at end of file
diff --git a/sd/source/ui/animations/CustomAnimationSchemesPane.src b/sd/source/ui/animations/CustomAnimationSchemesPane.src
deleted file mode 100644
index 1499b79bbb4b..000000000000
--- a/sd/source/ui/animations/CustomAnimationSchemesPane.src
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "CustomAnimation.hrc"
-
-ModalDialog DLG_CUSTOMANIMATION_SCHEMES_PANE
-{
- DialogControl = TRUE;
-
- Text [ en-US ] = "Animation Schemes";
-
- Fixedline 1
- {
- Text [ en-US ] = "Apply to selected slides";
- };
-
- PushButton 1
- {
- Text [ en-US ] = "Apply to All Slides";
- };
-
- PushButton 2
- {
- Text [ en-US ] = "Play";
- };
-
- PushButton 3
- {
- Text [ en-US ] = "Slide Show";
- };
-
- Checkbox 4
- {
- Text [ en-US ] = "Automatic preview";
- };
-
- String 2
- {
- Text [ en-US ] = "No Animation";
- };
-
- String 3
- {
- Text [ en-US ] = "Recently used Schemes";
- };
-};
-
diff --git a/sd/source/ui/animations/makefile.mk b/sd/source/ui/animations/makefile.mk
index 2194dad6eafc..db010bf4ef23 100644..100755
--- a/sd/source/ui/animations/makefile.mk
+++ b/sd/source/ui/animations/makefile.mk
@@ -42,16 +42,13 @@ ENABLE_EXCEPTIONS=TRUE
SRS1NAME=$(TARGET)
SRC1FILES =\
- AnimationSchemesPane.src\
CustomAnimationPane.src\
CustomAnimationDialog.src\
CustomAnimationCreateDialog.src\
SlideTransitionPane.src\
- CustomAnimationSchemesPane.src\
CustomAnimation.src
SLOFILES = \
- $(SLO)$/AnimationSchemesPane.obj \
$(SLO)$/CustomAnimationCreateDialog.obj\
$(SLO)$/CustomAnimationDialog.obj\
$(SLO)$/CustomAnimationPane.obj \
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index aa42fec50f9c..1e64617edab8 100644..100755
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -971,7 +971,7 @@ IMPL_LINK(AnnotationManagerImpl,EventMultiplexerListener,
}
return 0;
}
-
+#if 0
OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation )
{
OUString sRet;
@@ -994,7 +994,7 @@ OUString AnnotationManagerImpl::GetHelpText( ::com::sun::star::uno::Reference< :
return sRet;
}
-
+#endif
void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation > xAnnotation, ::Window* pParent, const Rectangle& rContextRect, bool bButtonMenu /* = false */ )
{
diff --git a/sd/source/ui/annotations/annotationmanagerimpl.hxx b/sd/source/ui/annotations/annotationmanagerimpl.hxx
index 43b53d8467f9..70b95c2a509b 100755..100644
--- a/sd/source/ui/annotations/annotationmanagerimpl.hxx
+++ b/sd/source/ui/annotations/annotationmanagerimpl.hxx
@@ -99,9 +99,9 @@ public:
void onTagDeselected( AnnotationTag& rTag );
void onSelectionChanged();
-
+#if 0
rtl::OUString GetHelpText( ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation );
-
+#endif
void addListener();
void removeListener();
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index ad6709c776ce..a4642bb68096 100644..100755
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -136,14 +136,25 @@ AnnotationTextWindow::~AnnotationTextWindow()
void AnnotationTextWindow::Paint( const Rectangle& rRect)
{
- if ( !Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ if ( !bHighContrast )
{
DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
Gradient(GRADIENT_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
}
if( mpOutlinerView )
+ {
+ Color aBackgroundColor( mpAnnotationWindow->maColor );
+ if( bHighContrast )
+ {
+ aBackgroundColor = GetSettings().GetStyleSettings().GetWindowColor();
+ }
+
+ mpOutlinerView->SetBackgroundColor( aBackgroundColor );
+
mpOutlinerView->Paint( rRect );
+ }
}
void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt )
@@ -493,12 +504,6 @@ void AnnotationWindow::ResizeIfNeccessary(long aOldHeight, long aNewHeight)
}
}
-void AnnotationWindow::SetReadonly(bool bSet)
-{
- mbReadonly = bSet;
- getView()->SetReadOnly(bSet);
-}
-
void AnnotationWindow::SetLanguage(const SvxLanguageItem aNewItem)
{
Engine()->SetModifyHdl( Link() );
@@ -615,16 +620,34 @@ void AnnotationWindow::SetColor()
{
sal_uInt16 nAuthorIdx = mpDoc->GetAnnotationAuthorIndex( mxAnnotation->getAuthor() );
- maColor = mrManager.GetColor( nAuthorIdx );
- maColorDark = mrManager.GetColorDark( nAuthorIdx );
- maColorLight = mrManager.GetColorLight( nAuthorIdx );
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
+ if( bHighContrast )
+ {
+ StyleSettings aStyleSettings = GetSettings().GetStyleSettings();
+
+ maColor = aStyleSettings.GetWindowColor();
+ maColorDark = maColor;
+ maColorLight = aStyleSettings.GetWindowTextColor();
+ }
+ else
+ {
+ maColor = mrManager.GetColor( nAuthorIdx );
+ maColorDark = mrManager.GetColorDark( nAuthorIdx );
+ maColorLight = mrManager.GetColorLight( nAuthorIdx );
+ }
mpOutlinerView->SetBackgroundColor(maColor);
+ Engine()->SetBackgroundColor(maColor);
+
+ {
+ SvtAccessibilityOptions aOptions;
+ Engine()->ForceAutoColor( bHighContrast || aOptions.GetIsAutomaticFontColor() );
+ }
mpMeta->SetControlBackground(maColor);
AllSettings aSettings = mpMeta->GetSettings();
StyleSettings aStyleSettings = aSettings.GetStyleSettings();
- aStyleSettings.SetFieldTextColor(maColorDark);
+ aStyleSettings.SetFieldTextColor( bHighContrast ? maColorLight : maColorDark);
aSettings.SetStyleSettings(aStyleSettings);
mpMeta->SetSettings(aSettings);
@@ -641,59 +664,35 @@ void AnnotationWindow::SetColor()
void AnnotationWindow::Deactivate()
{
Reference< XAnnotation > xAnnotation( mxAnnotation );
-/*
- // check if text is empty
- Paragraph* p1stPara=Engine()->GetParagraph( 0 );
- ULONG nParaAnz=Engine()->GetParagraphCount();
- if(p1stPara==NULL)
- nParaAnz=0;
- if(nParaAnz==1)
+ // write changed text back to annotation
+ if ( Engine()->IsModified() )
{
- // if it is only one paragraph, check if that paragraph is empty
- XubString aStr(Engine()->GetText(p1stPara));
-
- if(!aStr.Len())
- nParaAnz = 0;
- }
+ TextApiObject* pTextApi = getTextApiObject( xAnnotation );
- if( nParaAnz == 0 )
- {
- // text is empty, delete postit
- DeleteAnnotation( xAnnotation );
- }
- else
-*/
- {
- // write changed text back to annotation
- if ( Engine()->IsModified() )
+ if( pTextApi )
{
- TextApiObject* pTextApi = getTextApiObject( xAnnotation );
-
- if( pTextApi )
+ OutlinerParaObject* pOPO = Engine()->CreateParaObject();
+ if( pOPO )
{
- OutlinerParaObject* pOPO = Engine()->CreateParaObject();
- if( pOPO )
- {
- if( mpDoc->IsUndoEnabled() )
- mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) );
+ if( mpDoc->IsUndoEnabled() )
+ mpDoc->BegUndo( String( SdResId( STR_ANNOTATION_UNDO_EDIT ) ) );
- pTextApi->SetText( *pOPO );
- delete pOPO;
+ pTextApi->SetText( *pOPO );
+ delete pOPO;
- // set current time to changed annotation
- xAnnotation->setDateTime( getCurrentDateTime() );
+ // set current time to changed annotation
+ xAnnotation->setDateTime( getCurrentDateTime() );
- if( mpDoc->IsUndoEnabled() )
- mpDoc->EndUndo();
-
- DocView()->GetDocSh()->SetModified(sal_True);
- }
+ if( mpDoc->IsUndoEnabled() )
+ mpDoc->EndUndo();
+ DocView()->GetDocSh()->SetModified(sal_True);
}
+
}
- Engine()->ClearModifyFlag();
}
+ Engine()->ClearModifyFlag();
Engine()->GetUndoManager().Clear();
}
@@ -704,15 +703,16 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
if(mpMeta->IsVisible() && !mbReadonly)
{
+ const bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
//draw left over space
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if ( bHighContrast )
SetFillColor(COL_BLACK);
else
SetFillColor(maColor);
SetLineColor();
DrawRect(PixelToLogic(Rectangle(Point(mpMeta->GetPosPixel().X()+mpMeta->GetSizePixel().Width(),mpMeta->GetPosPixel().Y()),Size(METABUTTON_AREA_WIDTH,mpMeta->GetSizePixel().Height()))));
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ if ( bHighContrast )
{
//draw rect around button
SetFillColor(COL_BLACK);
@@ -734,7 +734,7 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
DrawRect(maRectMetaButton);
//draw arrow
- if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
+ if( bHighContrast )
SetFillColor(COL_WHITE);
else
SetFillColor(COL_BLACK);
diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx
index ba82d4e862d3..264cb2fa1afe 100644..100755
--- a/sd/source/ui/annotations/annotationwindow.hxx
+++ b/sd/source/ui/annotations/annotationwindow.hxx
@@ -144,7 +144,6 @@ class AnnotationWindow : public FloatingWindow
void Rescale();
- void SetReadonly(bool bSet);
bool IsReadOnly() { return mbReadonly;}
bool IsProtected() { return mbProtected; }
diff --git a/sd/source/ui/app/makefile.mk b/sd/source/ui/app/makefile.mk
index d64d9b672f7e..b0ac26018877 100644..100755
--- a/sd/source/ui/app/makefile.mk
+++ b/sd/source/ui/app/makefile.mk
@@ -73,8 +73,11 @@ SLOFILES = \
$(SLO)$/tmplctrl.obj
EXCEPTIONSFILES= \
+ $(SLO)$/sddll1.obj \
+ $(SLO)$/sddll2.obj \
$(SLO)$/sdxfer.obj \
$(SLO)$/sdmod1.obj \
+ $(SLO)$/tbxww.obj \
$(SLO)$/tmplctrl.obj
.IF "$(GUI)" == "WNT"
diff --git a/sd/source/ui/app/menuids2_tmpl.src b/sd/source/ui/app/menuids2_tmpl.src
index 54b9ed6ba44c..21d906bfedf0 100644..100755
--- a/sd/source/ui/app/menuids2_tmpl.src
+++ b/sd/source/ui/app/menuids2_tmpl.src
@@ -983,40 +983,5 @@
Text [ en-US ] = "Pre~view Mode" ; \
};
-#define MN_MULTI_PANE_GUI \
- MenuItem\
- {\
- Identifier = SID_MULTI_PANE_GUI ; \
- HelpID = SID_MULTI_PANE_GUI ; \
- Text = "Multi Pane GUI" ; \
- SubMenu = Menu \
- {\
- ItemList =\
- {\
- MenuItem\
- {\
- Identifier = SID_TOOLPANEL ; \
- HelpID = SID_TOOLPANEL ; \
- Check = TRUE ; \
- Text = "Tool Panel" ; \
- };\
- MenuItem\
- {\
- Identifier = SID_SLIDE_BROWSER ; \
- HelpID = SID_SLIDE_BROWSER ; \
- Check = TRUE ; \
- Text = "Slide Browser" ; \
- };\
- MenuItem\
- {\
- Identifier = SID_NOTES_WINDOW ; \
- HelpID = SID_NOTES_WINDOW ; \
- Check = TRUE ; \
- Text = "Notes Window" ; \
- };\
- };\
- };\
- };
-
#endif // _MENUIDS2_SRC
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index e3181f792d04..4355da3011c9 100755..100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -222,22 +222,6 @@ SdOptionsLayout::SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsLayout::SetDefaults()
-{
- SetRulerVisible( TRUE );
- SetHelplines( TRUE );
- SetHandlesBezier( FALSE );
- SetMoveOutline( TRUE );
- SetDragStripes( FALSE );
- if ( isMetricSystem() )
- SetMetric( FUNIT_CM ); // default for countries with metric system
- else
- SetMetric( FUNIT_INCH ); // default for others
- SetDefTab( 1250 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsLayout::operator==( const SdOptionsLayout& rOpt ) const
{
return( IsRulerVisible() == rOpt.IsRulerVisible() &&
@@ -406,12 +390,6 @@ SdOptionsContents::SdOptionsContents( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsContents::SetDefaults()
-{
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsContents::operator==(const SdOptionsContents&) const
{
return true;
@@ -459,14 +437,6 @@ BOOL SdOptionsContents::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsContentsItem::SdOptionsContentsItem( USHORT _nWhich )
-: SfxPoolItem ( _nWhich )
-, maOptionsContents ( 0, FALSE )
-{
-}
-
-// ----------------------------------------------------------------------
-
SdOptionsContentsItem::SdOptionsContentsItem(USHORT _nWhich, SdOptions*, ::sd::FrameView*)
: SfxPoolItem ( _nWhich )
, maOptionsContents ( 0, FALSE )
@@ -542,40 +512,6 @@ SdOptionsMisc::SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsMisc::SetDefaults()
-{
- SetStartWithTemplate( TRUE );
- SetMarkedHitMovesAlways( TRUE );
- SetMoveOnlyDragging( FALSE );
- SetCrookNoContortion( FALSE );
- SetQuickEdit( GetConfigId() != SDCFG_DRAW );
- SetMasterPagePaintCaching( TRUE );
- SetDragWithCopy( FALSE );
- SetPickThrough( TRUE );
- SetBigHandles( FALSE );
- SetDoubleClickTextEdit( TRUE );
- SetClickChangeRotation( FALSE );
- SetStartWithActualPage( FALSE );
- SetSummationOfParagraphs( FALSE );
- SetSolidDragging( TRUE );
- SetSolidMarkHdl( TRUE );
- // #90356#
- SetShowUndoDeleteWarning( TRUE );
- // The default for 6.1-and-above documents is to use printer-independent
- // formatting.
- SetPrinterIndependentLayout (1);
- // #97016#
- SetDefaultObjectSizeWidth(8000);
- SetDefaultObjectSizeHeight(5000);
- SetPreviewNewEffects(true);
- SetPreviewChangedEffects(false);
- SetPreviewTransitions(true);
- SetDisplay(0);
- SetShowComments(true);
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsMisc::operator==( const SdOptionsMisc& rOpt ) const
{
return( IsStartWithTemplate() == rOpt.IsStartWithTemplate() &&
@@ -909,22 +845,6 @@ SdOptionsSnap::SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsSnap::SetDefaults()
-{
- SetSnapHelplines( TRUE );
- SetSnapBorder( TRUE );
- SetSnapFrame( FALSE );
- SetSnapPoints( FALSE );
- SetOrtho( FALSE );
- SetBigOrtho( TRUE );
- SetRotate( FALSE );
- SetSnapArea( 5 );
- SetAngle( 1500 );
- SetEliminatePolyPointLimitAngle( 1500 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsSnap::operator==( const SdOptionsSnap& rOpt ) const
{
return( IsSnapHelplines() == rOpt.IsSnapHelplines() &&
@@ -1098,13 +1018,6 @@ SdOptionsZoom::SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsZoom::SetDefaults()
-{
- SetScale( 1, 1 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsZoom::operator==( const SdOptionsZoom& rOpt ) const
{
INT32 nX1, nX2, nY1, nY2;
@@ -1160,63 +1073,6 @@ BOOL SdOptionsZoom::WriteData( Any* pValues ) const
/*************************************************************************
|*
-|* SdOptionsZoomItem
-|*
-\************************************************************************/
-
-SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich )
-: SfxPoolItem ( _nWhich )
-, maOptionsZoom ( 0, FALSE )
-{
-}
-
-// ----------------------------------------------------------------------
-
-SdOptionsZoomItem::SdOptionsZoomItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* )
-: SfxPoolItem ( _nWhich )
-, maOptionsZoom ( 0, FALSE )
-{
- if( pOpts )
- {
- INT32 nX, nY;
-
- pOpts->GetScale( nX, nY );
- maOptionsZoom.SetScale( nX, nY );
- }
-}
-
-// ----------------------------------------------------------------------
-
-SfxPoolItem* SdOptionsZoomItem::Clone( SfxItemPool* ) const
-{
- return new SdOptionsZoomItem( *this );
-}
-
-
-// ----------------------------------------------------------------------
-
-int SdOptionsZoomItem::operator==( const SfxPoolItem& rAttr ) const
-{
- const bool bSameType = SfxPoolItem::operator==(rAttr);
- DBG_ASSERT( bSameType, "SdOptionsZoomItem::operator==(), differen pool item type!" );
- return bSameType && ( maOptionsZoom == static_cast< const SdOptionsZoomItem& >(rAttr).maOptionsZoom );
-}
-
-// -----------------------------------------------------------------------
-
-void SdOptionsZoomItem::SetOptions( SdOptions* pOpts ) const
-{
- if( pOpts )
- {
- INT32 nX, nY;
-
- maOptionsZoom.GetScale( nX, nY );
- pOpts->SetScale( nX, nY );
- }
-}
-
-/*************************************************************************
-|*
|* SdOptionsGrid
|*
\************************************************************************/
@@ -1366,13 +1222,6 @@ BOOL SdOptionsGrid::WriteData( Any* pValues ) const
|*
\************************************************************************/
-SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich ) :
- SvxGridItem( _nWhich )
-{
-}
-
-// -----------------------------------------------------------------------------
-
SdOptionsGridItem::SdOptionsGridItem( USHORT _nWhich, SdOptions* pOpts, ::sd::FrameView* pView ) :
SvxGridItem( _nWhich )
{
@@ -1458,33 +1307,6 @@ SdOptionsPrint::SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig ) :
// -----------------------------------------------------------------------------
-void SdOptionsPrint::SetDefaults()
-{
- SetDraw( TRUE );
- SetNotes( FALSE );
- SetHandout( FALSE );
- SetOutline( FALSE );
- SetDate( FALSE );
- SetTime( FALSE );
- SetPagename( FALSE );
- SetHiddenPages( TRUE );
- SetPagesize( FALSE );
- SetPagetile( FALSE );
- SetWarningPrinter( TRUE );
- SetWarningSize( FALSE );
- SetWarningOrientation( FALSE );
- SetBooklet( FALSE );
- SetFrontPage( TRUE );
- SetBackPage( TRUE );
- SetCutPage( FALSE );
- SetPaperbin( FALSE );
- SetOutputQuality( 0 );
- SetHandoutHorizontal( TRUE );
- SetHandoutPages( 6 );
-}
-
-// -----------------------------------------------------------------------------
-
BOOL SdOptionsPrint::operator==( const SdOptionsPrint& rOpt ) const
{
return( IsDraw() == rOpt.IsDraw() &&
@@ -1630,31 +1452,6 @@ BOOL SdOptionsPrint::WriteData( Any* pValues ) const
return TRUE;
}
-void SdOptionsPrint::SetPrinterOptions( const SdOptionsPrint* pOptions )
-{
- bDraw = pOptions->bDraw;
- bNotes = pOptions->bNotes;
- bHandout = pOptions->bHandout;
- bOutline = pOptions->bOutline;
- bDate = pOptions->bDate;
- bTime = pOptions->bTime;
- bPagename = pOptions->bPagename;
- bHiddenPages = pOptions->bHiddenPages;
- bPagesize = pOptions->bPagesize;
- bPagetile = pOptions->bPagetile;
- bWarningPrinter = pOptions->bWarningPrinter;
- bWarningSize = pOptions->bWarningSize;
- bWarningOrientation = pOptions->bWarningOrientation;
- bBooklet = pOptions->bBooklet;
- bFront = pOptions->bFront;
- bBack = pOptions->bBack;
- bCutPage = pOptions->bCutPage;
- bPaperbin = pOptions->bPaperbin;
- nQuality = pOptions->nQuality;
- mnHandoutPages = pOptions->mnHandoutPages;
- mbHandoutHorizontal = pOptions->mbHandoutHorizontal;
-}
-
/*************************************************************************
|*
|* SdOptionsPrintItem
@@ -1766,32 +1563,6 @@ SdOptions::~SdOptions()
// ----------------------------------------------------------------------
-void SdOptions::SetRangeDefaults( ULONG nOptionsRange )
-{
- if( nOptionsRange & SD_OPTIONS_LAYOUT )
- SdOptionsLayout::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_CONTENTS )
- SdOptionsContents::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_MISC )
- SdOptionsMisc::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_SNAP )
- SdOptionsSnap::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_ZOOM )
- SdOptionsZoom::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_GRID )
- SdOptionsGrid::SetDefaults();
-
- if( nOptionsRange & SD_OPTIONS_PRINT )
- SdOptionsPrint::SetDefaults();
-}
-
-// ----------------------------------------------------------------------
-
void SdOptions::StoreConfig( ULONG nOptionsRange )
{
if( nOptionsRange & SD_OPTIONS_LAYOUT )
diff --git a/sd/source/ui/app/res_bmp.src b/sd/source/ui/app/res_bmp.src
index bc6858f66ea5..0901e53df0ed 100644..100755
--- a/sd/source/ui/app/res_bmp.src
+++ b/sd/source/ui/app/res_bmp.src
@@ -30,274 +30,236 @@
#include "glob.hrc"
#include "res_bmp.hrc"
-Bitmap BMP_FOIL_00
+// preview bitmaps for layouts
+Bitmap BMP_LAYOUT_EMPTY
{
- File = "foil00.bmp" ;
+ File = "layout_empty.png";
};
-Bitmap BMP_FOIL_00_H
+Bitmap BMP_LAYOUT_EMPTY_H
{
- File = "foil00_h.bmp" ;
+ File = "layout_empty_h.png";
};
-Bitmap BMP_FOIL_01
+Bitmap BMP_LAYOUT_HEAD01
{
- File = "foil01.bmp" ;
+ File = "layout_head01.png";
};
-Bitmap BMP_FOIL_01_H
+Bitmap BMP_LAYOUT_HEAD01_H
{
- File = "foil01_h.bmp" ;
+ File = "layout_head01_h.png";
};
-Bitmap BMP_FOIL_02
+Bitmap BMP_LAYOUT_HEAD02
{
- File = "foil02.bmp" ;
+ File = "layout_head02.png";
};
-Bitmap BMP_FOIL_02_H
+Bitmap BMP_LAYOUT_HEAD02_H
{
- File = "foil02_h.bmp" ;
+ File = "layout_head02_h.png";
};
-Bitmap BMP_FOIL_03
+Bitmap BMP_LAYOUT_HEAD02A
{
- File = "foil03.bmp" ;
+ File = "layout_head02a.png";
};
-Bitmap BMP_FOIL_03_H
+Bitmap BMP_LAYOUT_HEAD02A_H
{
- File = "foil03_h.bmp" ;
+ File = "layout_head02a_h.png";
};
-Bitmap BMP_FOIL_04
+Bitmap BMP_LAYOUT_HEAD02B
{
- File = "foil04.bmp" ;
+ File = "layout_head02b.png";
};
-Bitmap BMP_FOIL_04_H
+Bitmap BMP_LAYOUT_HEAD02B_H
{
- File = "foil04_h.bmp" ;
+ File = "layout_head02b_h.png";
};
-Bitmap BMP_FOIL_05
+Bitmap BMP_LAYOUT_HEAD03
{
- File = "foil05.bmp" ;
+ File = "layout_head03.png";
};
-Bitmap BMP_FOIL_06
+Bitmap BMP_LAYOUT_HEAD03_H
{
- File = "foil06.bmp" ;
+ File = "layout_head03_h.png";
};
-Bitmap BMP_FOIL_06_H
+Bitmap BMP_LAYOUT_HEAD03A
{
- File = "foil06_h.bmp" ;
+ File = "layout_head03a.png";
};
-Bitmap BMP_FOIL_07
+Bitmap BMP_LAYOUT_HEAD03A_H
{
- File = "foil07.bmp" ;
+ File = "layout_head03a_h.png";
};
-Bitmap BMP_FOIL_07_H
+Bitmap BMP_LAYOUT_HEAD03B
{
- File = "foil07_h.bmp" ;
+ File = "layout_head03b.png";
};
-Bitmap BMP_FOIL_08
+Bitmap BMP_LAYOUT_HEAD03B_H
{
- File = "foil08.bmp" ;
+ File = "layout_head03b_h.png";
};
-Bitmap BMP_FOIL_08_H
+Bitmap BMP_LAYOUT_HEAD03C
{
- File = "foil08_h.bmp" ;
+ File = "layout_head03c.png";
};
-Bitmap BMP_FOIL_09
+Bitmap BMP_LAYOUT_HEAD03C_H
{
- File = "foil09.bmp" ;
+ File = "layout_head03c_h.png";
};
-Bitmap BMP_FOIL_09_H
+Bitmap BMP_LAYOUT_HEAD04
{
- File = "foil09_h.bmp" ;
+ File = "layout_head04.png";
};
-Bitmap BMP_FOIL_10
+Bitmap BMP_LAYOUT_HEAD04_H
{
- File = "foil10.bmp" ;
+ File = "layout_head04_h.png";
};
-Bitmap BMP_FOIL_10_H
+Bitmap BMP_LAYOUT_HEAD06
{
- File = "foil10_h.bmp" ;
+ File = "layout_head06.png";
};
-Bitmap BMP_FOIL_11
+Bitmap BMP_LAYOUT_HEAD06_H
{
- File = "foil11.bmp" ;
+ File = "layout_head06_h.png";
};
-Bitmap BMP_FOIL_11_H
+Bitmap BMP_LAYOUT_TEXTONLY
{
- File = "foil11_h.bmp" ;
+ File = "layout_textonly.png";
};
-Bitmap BMP_FOIL_12
+Bitmap BMP_LAYOUT_TEXTONLY_H
{
- File = "foil12.bmp" ;
+ File = "layout_textonly_h.png";
};
-Bitmap BMP_FOIL_12_H
+Bitmap BMP_LAYOUT_VERTICAL01
{
- File = "foil12_h.bmp" ;
+ File = "layout_vertical01.png";
};
-Bitmap BMP_FOIL_13
+Bitmap BMP_LAYOUT_VERTICAL01_H
{
- File = "foil13.bmp" ;
+ File = "layout_vertical01_h.png";
};
-Bitmap BMP_FOIL_13_H
+Bitmap BMP_LAYOUT_VERTICAL02
{
- File = "foil13_h.bmp" ;
+ File = "layout_vertical02.png";
};
-Bitmap BMP_FOIL_14
+Bitmap BMP_LAYOUT_VERTICAL02_H
{
- File = "foil14.bmp" ;
+ File = "layout_vertical02_h.png";
};
-Bitmap BMP_FOIL_14_H
-{
- File = "foil14_h.bmp" ;
-};
-Bitmap BMP_FOIL_15
-{
- File = "foil15.bmp" ;
-};
-Bitmap BMP_FOIL_15_H
-{
- File = "foil15_h.bmp" ;
-};
-Bitmap BMP_FOIL_16
-{
- File = "foil16.bmp" ;
-};
-Bitmap BMP_FOIL_16_H
-{
- File = "foil16_h.bmp" ;
-};
-Bitmap BMP_FOIL_17
-{
- File = "foil17.bmp" ;
-};
-Bitmap BMP_FOIL_17_H
-{
- File = "foil17_h.bmp" ;
-};
-Bitmap BMP_FOIL_18
-{
- File = "foil18.bmp" ;
-};
-Bitmap BMP_FOIL_18_H
-{
- File = "foil18_h.bmp" ;
-};
-Bitmap BMP_FOIL_19
-{
- File = "foil19.bmp" ;
-};
-Bitmap BMP_FOIL_19_H
-{
- File = "foil19_h.bmp" ;
-};
-Bitmap BMP_FOIL_20
+
+Bitmap BMP_FOILH_01
{
- File = "foil20.bmp" ;
+ File = "foilh01.png";
};
-Bitmap BMP_FOIL_20_H
+Bitmap BMP_FOILH_01_H
{
- File = "foil20_h.bmp" ;
+ File = "foilh01_h.png";
};
-Bitmap BMP_FOIL_21
+Bitmap BMP_FOILH_02
{
- File = "foil21.bmp" ;
+ File = "foilh02.png";
};
-Bitmap BMP_FOIL_21_H
+Bitmap BMP_FOILH_02_H
{
- File = "foil21_h.bmp" ;
+ File = "foilh02_h.png";
};
-Bitmap BMP_FOIL_22
+Bitmap BMP_FOILH_03
{
- File = "foil22.bmp" ;
+ File = "foilh03.png";
};
-Bitmap BMP_FOIL_22_H
+Bitmap BMP_FOILH_03_H
{
- File = "foil22_h.bmp" ;
+ File = "foilh03_h.png";
};
-Bitmap BMP_FOIL_23
+Bitmap BMP_FOILH_04
{
- File = "foil23.bmp" ;
+ File = "foilh04.png";
};
-Bitmap BMP_FOIL_23_H
+Bitmap BMP_FOILH_04_H
{
- File = "foil23_h.bmp" ;
+ File = "foilh04_h.png";
};
-Bitmap BMP_FOIL_24
+Bitmap BMP_FOILH_06
{
- File = "foil24.bmp" ;
+ File = "foilh06.png";
};
-Bitmap BMP_FOIL_24_H
+Bitmap BMP_FOILH_06_H
{
- File = "foil24_h.bmp" ;
+ File = "foilh06_h.png";
};
-Bitmap BMP_FOIL_25
+Bitmap BMP_FOILH_09
{
- File = "foil25.bmp" ;
+ File = "foilh09.png";
};
-Bitmap BMP_FOIL_25_H
+Bitmap BMP_FOILH_09_H
{
- File = "foil25_h.bmp" ;
+ File = "foilh09_h.png";
};
-Bitmap BMP_FOIL_26
+
+
+Bitmap BMP_PLACEHOLDER_CHART_SMALL
{
- File = "foil26.bmp" ;
+ File = "placeholder_chart_small.png";
};
-Bitmap BMP_FOIL_26_H
+Bitmap BMP_PLACEHOLDER_CHART_SMALL_HOVER
{
- File = "foil26_h.bmp" ;
+ File = "placeholder_chart_small_hover.png";
};
-Bitmap BMP_FOIL_27
+Bitmap BMP_PLACEHOLDER_IMAGE_SMALL
{
- File = "foil27.bmp" ;
+ File = "placeholder_image_small.png";
};
-Bitmap BMP_FOIL_27_H
+Bitmap BMP_PLACEHOLDER_IMAGE_SMALL_HOVER
{
- File = "foil27_h.bmp" ;
+ File = "placeholder_image_small_hover.png";
};
-Bitmap BMP_FOILH_01
+Bitmap BMP_PLACEHOLDER_MOVIE_SMALL
{
- File = "foilh01.bmp" ;
+ File = "placeholder_movie_small.png";
};
-Bitmap BMP_FOILH_01_H
+Bitmap BMP_PLACEHOLDER_MOVIE_SMALL_HOVER
{
- File = "foilh01_h.bmp" ;
+ File = "placeholder_movie_small_hover.png";
};
-Bitmap BMP_FOILH_02
+Bitmap BMP_PLACEHOLDER_TABLE_SMALL
{
- File = "foilh02.bmp" ;
+ File = "placeholder_table_small.png";
};
-Bitmap BMP_FOILH_02_H
+Bitmap BMP_PLACEHOLDER_TABLE_SMALL_HOVER
{
- File = "foilh02_h.bmp" ;
+ File = "placeholder_table_small_hover.png";
};
-Bitmap BMP_FOILH_03
+
+Bitmap BMP_PLACEHOLDER_CHART_LARGE
{
- File = "foilh03.bmp" ;
+ File = "placeholder_chart_large.png";
};
-Bitmap BMP_FOILH_03_H
+Bitmap BMP_PLACEHOLDER_CHART_LARGE_HOVER
{
- File = "foilh03_h.bmp" ;
+ File = "placeholder_chart_large_hover.png";
};
-Bitmap BMP_FOILH_04
+Bitmap BMP_PLACEHOLDER_IMAGE_LARGE
{
- File = "foilh04.bmp" ;
+ File = "placeholder_image_large.png";
};
-Bitmap BMP_FOILH_04_H
+Bitmap BMP_PLACEHOLDER_IMAGE_LARGE_HOVER
{
- File = "foilh04_h.bmp" ;
+ File = "placeholder_image_large_hover.png";
};
-Bitmap BMP_FOILH_06
+Bitmap BMP_PLACEHOLDER_MOVIE_LARGE
{
- File = "foilh06.bmp" ;
+ File = "placeholder_movie_large.png";
};
-Bitmap BMP_FOILH_06_H
+Bitmap BMP_PLACEHOLDER_MOVIE_LARGE_HOVER
{
- File = "foilh06_h.bmp" ;
+ File = "placeholder_movie_large_hover.png";
};
-Bitmap BMP_FOILH_09
+Bitmap BMP_PLACEHOLDER_TABLE_LARGE
{
- File = "foilh09.bmp" ;
+ File = "placeholder_table_large.png";
};
-Bitmap BMP_FOILH_09_H
+Bitmap BMP_PLACEHOLDER_TABLE_LARGE_HOVER
{
- File = "foilh09_h.bmp" ;
+ File = "placeholder_table_large_hover.png";
};
+
Bitmap BMP_FOILN_01
{
File = "foiln01.bmp" ;
@@ -306,10 +268,6 @@ Bitmap BMP_FOILN_01_H
{
File = "foiln01_h.bmp" ;
};
-Bitmap BMP_FOIL_NONE
-{
- File = "foilnone.bmp" ;
-};
Bitmap BMP_PAGE
{
File = "page.bmp" ;
@@ -519,30 +477,6 @@ Bitmap BMP_WAIT_ICON
// ----------------------------------------
-Bitmap BMP_CLOSE_DOC
-{
- File = "closedoc.bmp";
-};
-Bitmap BMP_CLOSE_DOC_H
-{
- File = "closedochc.bmp";
-};
-Bitmap BMP_TRIANGLE_RIGHT
-{
- File = "triangle_right.bmp";
-};
-Bitmap BMP_TRIANGLE_RIGHT_H
-{
- File = "triangle_right_hc.bmp";
-};
-Bitmap BMP_TRIANGLE_DOWN
-{
- File = "triangle_down.bmp";
-};
-Bitmap BMP_TRIANGLE_DOWN_H
-{
- File = "triangle_down_hc.bmp";
-};
Bitmap BMP_FADE_EFFECT_INDICATOR
{
File = "fade_effect_indicator.bmp";
diff --git a/sd/source/ui/app/sddll1.cxx b/sd/source/ui/app/sddll1.cxx
index 30aea6cba7b1..53a2b4e9b1e9 100644..100755
--- a/sd/source/ui/app/sddll1.cxx
+++ b/sd/source/ui/app/sddll1.cxx
@@ -48,12 +48,8 @@
#include "GraphicViewShellBase.hxx"
#include "DrawDocShell.hxx"
#include "GraphicDocShell.hxx"
-#ifndef SD_SLIDEBROWSER_SLIDE_SORTER_VIEW_SHELL_HXX
#include "SlideSorterViewShell.hxx"
-#endif
-#ifndef SD_SLIDEBROWSER_TASK_PANE_VIEW_SHELL_HXX
-#include "TaskPaneViewShell.hxx"
-#endif
+#include "taskpane/ToolPanelViewShell.hxx"
#include "FactoryIds.hxx"
#include "sdmod.hxx"
#include "app.hrc"
@@ -131,8 +127,8 @@ void SdDLL::RegisterInterfaces()
// View shells for the side panes.
::sd::slidesorter::SlideSorterViewShell::RegisterInterface (pMod);
- ::sd::toolpanel::TaskPaneViewShell::RegisterInterface(pMod);
- // Tell the task pane view shell to register the interfaces of its
+ ::sd::toolpanel::ToolPanelViewShell::RegisterInterface(pMod);
+ // Tell the tool panel view shell to register the interfaces of its
// controls.
- ::sd::toolpanel::TaskPaneViewShell::RegisterControls();
+ ::sd::toolpanel::ToolPanelViewShell::RegisterControls();
}
diff --git a/sd/source/ui/app/sddll2.cxx b/sd/source/ui/app/sddll2.cxx
index 50143367944a..3b576c8c668b 100644..100755
--- a/sd/source/ui/app/sddll2.cxx
+++ b/sd/source/ui/app/sddll2.cxx
@@ -57,10 +57,10 @@
#include <svx/f3dchild.hxx>
#include <svx/grafctrl.hxx>
#include <svx/tbxcustomshapes.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/lboxctrl.hxx>
#include <svx/clipboardctl.hxx>
-#include <svx/extrusioncontrols.hxx>
+#include <svx/extrusioncolorcontrol.hxx>
+#include <svx/fontworkgallery.hxx>
#include <svx/tbxcolor.hxx>
#include <avmedia/mediaplayer.hxx>
#include <avmedia/mediatoolbox.hxx>
@@ -76,10 +76,7 @@
#include "AnimationChildWindow.hxx"
#include "animobjs.hxx"
#include "NavigatorChildWindow.hxx"
-#ifndef SD_LAZER_DIALOG_CHILD_WINDOW_HXX
#include "LayerDialogChildWindow.hxx"
-#endif
-//#include "3dchld.hxx"
#include "app.hrc"
#include "SpellDialogChildWindow.hxx"
#include "DrawViewShell.hxx"
@@ -121,10 +118,6 @@ void SdDLL::RegisterControllers()
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_FLOWCHART, pMod );
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod );
SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod );
-// SdTbxCtlDiaEffect::RegisterControl(0, pMod);
-// SdTbxCtlDiaSpeed::RegisterControl(0, pMod);
-// SdTbxCtlDiaAuto::RegisterControl(0, pMod);
-// SdTbxCtlDiaTime::RegisterControl(0, pMod);
SdTbxCtlDiaPages::RegisterControl( SID_PAGES_PER_ROW, pMod );
SdTbxCtlGlueEscDir::RegisterControl( SID_GLUE_ESCDIR, pMod );
@@ -133,15 +126,7 @@ void SdDLL::RegisterControllers()
::sd::NavigatorChildWindow::RegisterChildWindowContext( (sal_uInt16) ::sd::DrawViewShell::GetInterfaceId(), pMod );
::sd::NavigatorChildWindow::RegisterChildWindowContext( (sal_uInt16) ::sd::GraphicViewShell::GetInterfaceId(), pMod );
::sd::LayerDialogChildWindow::RegisterChildWindow(0, pMod);
- //Sd3DChildWindow::RegisterChildWindow(0, pMod);
-/*
- SvxChildWinCustomShapesBasic::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesSymbol::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesArrow::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesFlowChart::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesCallout::RegisterChildWindow( 0, pMod );
- SvxChildWinCustomShapesStar::RegisterChildWindow( 0, pMod );
-*/
+
Svx3DChildWindow::RegisterChildWindow(0, pMod);
SvxFontWorkChildWindow::RegisterChildWindow(0, pMod);
SvxColorChildWindow::RegisterChildWindow(0, pMod, SFX_CHILDWIN_TASK);
@@ -155,7 +140,7 @@ void SdDLL::RegisterControllers()
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod);
::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod);
- ::sd::RightPaneChildWindow::RegisterChildWindow(0, pMod);
+ ::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod);
SvxFillToolBoxControl::RegisterControl(0, pMod);
SvxLineStyleToolBoxControl::RegisterControl(0, pMod);
@@ -210,15 +195,9 @@ void SdDLL::RegisterControllers()
SvxClipBoardControl::RegisterControl( SID_PASTE, pMod );
- svx::ExtrusionDepthControl::RegisterControl( SID_EXTRUSION_DEPTH_FLOATER, pMod );
- svx::ExtrusionDirectionControl::RegisterControl( SID_EXTRUSION_DIRECTION_FLOATER, pMod );
- svx::ExtrusionLightingControl::RegisterControl( SID_EXTRUSION_LIGHTING_FLOATER, pMod );
- svx::ExtrusionSurfaceControl::RegisterControl( SID_EXTRUSION_SURFACE_FLOATER, pMod );
svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
-
svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
- svx::FontWorkAlignmentControl::RegisterControl( SID_FONTWORK_ALIGNMENT_FLOATER, pMod );
- svx::FontWorkCharacterSpacingControl::RegisterControl( SID_FONTWORK_CHARACTER_SPACING_FLOATER, pMod );
+
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pMod );
SdTemplateControl::RegisterControl( SID_STATUS_LAYOUT, pMod );
@@ -227,4 +206,7 @@ void SdDLL::RegisterControllers()
SvxFrameLineColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod );
SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod );
SvxSubToolBoxControl::RegisterControl(SID_OPTIMIZE_TABLE, pMod);
+
+// SdLayoutControl::RegisterControl( SID_ASSIGN_LAYOUT, pMod );
+// SdLayoutControl::RegisterControl( SID_INSERTPAGE, pMod );
}
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index fb180509cff9..ccbc7c8f5665 100644..100755
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -336,20 +336,3 @@ OutputDevice* SdModule::GetRefDevice (::sd::DrawDocShell& )
{
return GetVirtualRefDevice();
}
-
-
-/*************************************************************************
-|*
-\************************************************************************/
-
-::com::sun::star::text::WritingMode SdModule::GetDefaultWritingMode() const
-{
-/*
- const SvtLanguageOptions aLanguageOptions;
-
- return( aLanguageOptions.IsCTLFontEnabled() ?
- ::com::sun::star::text::WritingMode_RL_TB :
- ::com::sun::star::text::WritingMode_LR_TB );
-*/
- return ::com::sun::star::text::WritingMode_LR_TB;
-}
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 743b7a35610d..3c1abc0c7d22 100644..100755
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -68,7 +68,6 @@
#include "sdresid.hxx"
#include "OutlineViewShell.hxx"
#include "ViewShellBase.hxx"
-#include "TaskPaneViewShell.hxx"
#ifndef SD_FRAMW_VIEW_HXX
#include "FrameView.hxx"
#endif
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 9aa36ddd3f82..58aba6823d3a 100644..100755
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -171,9 +171,10 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
::sd::DrawDocShell* pDocShell = NULL;
SdDrawDocument* pDoc = 0;
- if( pInfo->GetOutliner() )
+ SdrOutliner* pSdrOutliner = dynamic_cast< SdrOutliner* >( pInfo->GetOutliner() );
+ if( pSdrOutliner )
{
- const SdrTextObj* pTextObj = static_cast< SdrOutliner* >( pInfo->GetOutliner() )->GetTextObj();
+ const SdrTextObj* pTextObj = pSdrOutliner->GetTextObj();
if( pTextObj )
pDoc = dynamic_cast< SdDrawDocument* >( pTextObj->GetModel() );
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index 3066355ef95e..e992e7016f04 100644..100755
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -166,6 +166,7 @@ String STR_HANDOUT_MODE
{
Text [ en-US ] = "Handout" ;
};
+
String STR_AUTOLAYOUT_NONE
{
Text [ en-US ] = "Blank Slide" ;
@@ -182,77 +183,41 @@ String STR_AUTOLAYOUT_TITLE
{
Text [ en-US ] = "Title Slide" ;
};
-String STR_AUTOLAYOUT_OBJ
-{
- Text [ en-US ] = "Title, Object" ;
-};
-String STR_AUTOLAYOUT_ENUM
-{
- Text [ en-US ] = "Title, Text" ;
-};
-String STR_AUTOLAYOUT_CHART
-{
- Text [ en-US ] = "Title, Chart" ;
-};
-String STR_AUTOLAYOUT_TAB
-{
- Text [ en-US ] = "Title, Spreadsheet" ;
-};
-String STR_AUTOLAYOUT_CLIPTEXT
-{
- Text [ en-US ] = "Title, Clipart, Text" ;
-};
-String STR_AUTOLAYOUT_2TEXT
-{
- Text [ en-US ] = "Title, 2 Text Blocks" ;
-};
-String STR_AUTOLAYOUT_TEXTCHART
-{
- Text [ en-US ] = "Title, Text, Chart" ;
-};
-String STR_AUTOLAYOUT_TEXTCLIP
+String STR_AUTOLAYOUT_CONTENT
{
- Text [ en-US ] = "Title, Text, Clipart" ;
+ Text [ en-US ] = "Title, Content" ;
};
-String STR_AUTOLAYOUT_CHARTTEXT
+String STR_AUTOLAYOUT_2CONTENT
{
- Text [ en-US ] = "Title, Chart, Text" ;
+ Text [ en-US ] = "Title and 2 Content" ;
};
-String STR_AUTOLAYOUT_TEXTOBJ
+String STR_AUTOLAYOUT_CONTENT_2CONTENT
{
- Text [ en-US ] = "Title, Text, Object" ;
+ Text [ en-US ] = "Title, Content and 2 Content" ;
};
-String STR_AUTOLAYOUT_TEXT2OBJ
+String STR_AUTOLAYOUT_2CONTENT_CONTENT
{
- Text [ en-US ] = "Title, Text, 2 Objects" ;
+ Text [ en-US ] = "Title, 2 Content and Content" ;
};
-String STR_AUTOLAYOUT_OBJTEXT
+String STR_AUTOLAYOUT_CONTENT_OVER_2CONTENT
{
- Text [ en-US ] = "Title, Object, Text" ;
+ Text [ en-US ] = "Title, Content over 2 Content" ;
};
-String STR_AUTOLAYOUT_OBJOVERTEXT
+String STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT
{
- Text [ en-US ] = "Title, Object Above Text" ;
+ Text [ en-US ] = "Title, 2 Content over Content" ;
};
-String STR_AUTOLAYOUT_2OBJTEXT
+String STR_AUTOLAYOUT_CONTENT_OVER_CONTENT
{
- Text [ en-US ] = "Title, 2 Objects, Text" ;
+ Text [ en-US ] = "Title, Content over Content" ;
};
-String STR_AUTOLAYOUT_2OBJOVERTEXT
+String STR_AUTOLAYOUT_4CONTENT
{
- Text [ en-US ] = "Title, 2 Objects Above Text" ;
+ Text [ en-US ] = "Title, 4 Content" ;
};
-String STR_AUTOLAYOUT_TEXTOVEROBJ
+String STR_AUTOLAYOUT_6CONTENT
{
- Text [ en-US ] = "Title, Text Above Object" ;
-};
-String STR_AUTOLAYOUT_4OBJ
-{
- Text [ en-US ] = "Title, 4 Objects" ;
-};
-String STR_AUTOLAYOUT_4CLIPART
-{
- Text [ en-US ] = "Title, 4 Cliparts" ;
+ Text [ en-US ] = "Title, 6 Content" ;
};
String STR_AL_TITLE_VERT_OUTLINE
{
@@ -270,10 +235,6 @@ String STR_AL_VERT_TITLE_VERT_OUTLINE
{
Text [ en-US ] = "Vertical Title, Vertical Text" ;
};
-String STR_AUTOLAYOUT_6CLIPART
-{
- Text [ en-US ] = "Title, 6 Cliparts" ;
-};
String STR_AUTOLAYOUT_HANDOUT1
{
@@ -1250,6 +1211,14 @@ String DLG_TABLEDESIGNPANE
{
Text [ en-US ] = "Table Designs";
};
+String STR_CUSTOMANIMATIONPANE
+{
+ Text [ en-US ] = "Custom Animation";
+};
+String STR_SLIDE_TRANSITION_PANE
+{
+ Text [ en-US ] = "Slide Transition";
+};
String STR_NAVIGATOR_SHOW_NAMED_SHAPES
{
Text [ en-US ] = "Named shapes";
@@ -1270,3 +1239,27 @@ String RID_ANNOTATIONS_START
{
Text [ en-US ] = "Comments";
};
+String STR_RESET_LAYOUT
+{
+ Text[ en-US ] = "Reset Slide Layout";
+};
+
+String STR_INSERT_TABLE
+{
+ Text [ en-US ] = "Insert Table";
+};
+
+String STR_INSERT_CHART
+{
+ Text [ en-US ] = "Insert Chart";
+};
+
+String STR_INSERT_PICTURE
+{
+ Text [ en-US ] = "Insert Picture";
+};
+
+String STR_INSERT_MOVIE
+{
+ Text [ en-US ] = "Insert Movie";
+};
diff --git a/sd/source/ui/controller/makefile.mk b/sd/source/ui/controller/makefile.mk
new file mode 100755
index 000000000000..4e37fbd5ea88
--- /dev/null
+++ b/sd/source/ui/controller/makefile.mk
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.21 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+
+PRJ=..$/..$/..
+
+PROJECTPCH=sd
+PROJECTPCHSOURCE=$(PRJ)$/util$/sd
+PRJNAME=sd
+TARGET=controller
+ENABLE_EXCEPTIONS=TRUE
+AUTOSEG=true
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = \
+ $(SLO)$/slidelayoutcontroller.obj
+
+# --- Tagets -------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
new file mode 100644
index 000000000000..489f6e489386
--- /dev/null
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -0,0 +1,419 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
+#include <com/sun/star/frame/status/FontHeight.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/DrawViewMode.hpp>
+
+#include <memory>
+#include <boost/scoped_ptr.hpp>
+
+#include <vos/mutex.hxx>
+
+#include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
+
+#include <svl/languageoptions.hxx>
+
+#include <svtools/ctrltool.hxx>
+#include <svtools/ctrlbox.hxx>
+#include <svtools/toolbarmenu.hxx>
+#include <svtools/valueset.hxx>
+
+#include <toolkit/helper/vclunohelper.hxx>
+
+#include <sfx2/imagemgr.hxx>
+
+#include "app.hrc"
+#include "glob.hrc"
+#include "strings.hrc"
+#include "res_bmp.hrc"
+#include "sdresid.hxx"
+#include "pres.hxx"
+#include "slidelayoutcontroller.hxx"
+
+using rtl::OUString;
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::text;
+using namespace ::com::sun::star::frame;
+using namespace ::com::sun::star::drawing;
+using namespace ::com::sun::star::beans;
+
+namespace sd
+{
+
+extern ::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const OUString& aCmdURL );
+
+// -----------------------------------------------------------------------
+
+class LayoutToolbarMenu : public svtools::ToolbarMenu
+{
+public:
+ LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, ::Window* pParent, const bool bInsertPage );
+ virtual ~LayoutToolbarMenu();
+
+protected:
+ DECL_LINK( SelectHdl, void * );
+
+private:
+ SlideLayoutController& mrController;
+ Reference< XFrame > mxFrame;
+ bool mbInsertPage;
+ ValueSet* mpLayoutSet1;
+ ValueSet* mpLayoutSet2;
+};
+
+// -----------------------------------------------------------------------
+
+struct snewfoil_value_info
+{
+ USHORT mnBmpResId;
+ USHORT mnHCBmpResId;
+ USHORT mnStrResId;
+ WritingMode meWritingMode;
+ AutoLayout maAutoLayout;
+};
+
+static snewfoil_value_info notes[] =
+{
+ {BMP_FOILN_01, BMP_FOILN_01_H, STR_AUTOLAYOUT_NOTES, WritingMode_LR_TB,
+ AUTOLAYOUT_NOTES},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+};
+
+static snewfoil_value_info handout[] =
+{
+ {BMP_FOILH_01, BMP_FOILH_01_H, STR_AUTOLAYOUT_HANDOUT1, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT1},
+ {BMP_FOILH_02, BMP_FOILH_02_H, STR_AUTOLAYOUT_HANDOUT2, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT2},
+ {BMP_FOILH_03, BMP_FOILH_03_H, STR_AUTOLAYOUT_HANDOUT3, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT3},
+ {BMP_FOILH_04, BMP_FOILH_04_H, STR_AUTOLAYOUT_HANDOUT4, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT4},
+ {BMP_FOILH_06, BMP_FOILH_06_H, STR_AUTOLAYOUT_HANDOUT6, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT6},
+ {BMP_FOILH_09, BMP_FOILH_09_H, STR_AUTOLAYOUT_HANDOUT9, WritingMode_LR_TB,
+ AUTOLAYOUT_HANDOUT9},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+};
+
+static snewfoil_value_info standard[] =
+{
+ {BMP_LAYOUT_EMPTY, BMP_LAYOUT_EMPTY_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {BMP_LAYOUT_HEAD03, BMP_LAYOUT_HEAD03_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT},
+ {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE},
+ {BMP_LAYOUT_TEXTONLY, BMP_LAYOUT_TEXTONLY_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT},
+ {BMP_LAYOUT_HEAD03B, BMP_LAYOUT_HEAD03B_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT},
+ {BMP_LAYOUT_HEAD03C, BMP_LAYOUT_HEAD03C_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ},
+ {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD02B, BMP_LAYOUT_HEAD02B_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ},
+ {BMP_LAYOUT_HEAD06, BMP_LAYOUT_HEAD06_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
+};
+
+static snewfoil_value_info v_standard[] =
+{
+ // vertical
+ {BMP_LAYOUT_VERTICAL02, BMP_LAYOUT_VERTICAL02_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL,AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
+ {BMP_LAYOUT_VERTICAL01, BMP_LAYOUT_VERTICAL01_H, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
+ {0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
+};
+
+// -----------------------------------------------------------------------
+
+static void fillLayoutValueSet( ValueSet* pValue, snewfoil_value_info* pInfo, const bool bHighContrast )
+{
+ Size aLayoutItemSize;
+ for( ; pInfo->mnBmpResId; pInfo++ )
+ {
+ String aText( SdResId( pInfo->mnStrResId ) );
+ BitmapEx aBmp( SdResId( (bHighContrast ? pInfo->mnHCBmpResId : pInfo->mnBmpResId) ) );
+
+ pValue->InsertItem( static_cast<USHORT>(pInfo->maAutoLayout)+1, aBmp, aText );
+
+ aLayoutItemSize.Width() = std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() );
+ aLayoutItemSize.Height() = std::max( aLayoutItemSize.Height(), aBmp.GetSizePixel().Height() );
+ }
+
+ aLayoutItemSize = pValue->CalcItemSizePixel( aLayoutItemSize );
+ pValue->SetSizePixel( pValue->CalcWindowSizePixel( aLayoutItemSize ) );
+}
+
+// -----------------------------------------------------------------------
+
+LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const Reference< XFrame >& xFrame, ::Window* pParent, const bool bInsertPage )
+: svtools::ToolbarMenu(xFrame, pParent, WB_CLIPCHILDREN )
+, mrController( rController )
+, mxFrame(xFrame)
+, mbInsertPage( bInsertPage )
+, mpLayoutSet1( 0 )
+, mpLayoutSet2( 0 )
+{
+ DrawViewMode eMode = DrawViewMode_DRAW;
+
+ // find out which view is running
+ if( xFrame.is() ) try
+ {
+ Reference< XPropertySet > xControllerSet( xFrame->getController(), UNO_QUERY_THROW );
+ xControllerSet->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "DrawViewMode" ) ) ) >>= eMode;
+ }
+ catch( Exception& e )
+ {
+ (void)e;
+ OSL_ASSERT(false);
+ }
+
+ const sal_Int32 LAYOUT_BORDER_PIX = 7;
+
+ String aTitle1( SdResId( STR_GLUE_ESCDIR_HORZ ) );
+ String aTitle2( SdResId( STR_GLUE_ESCDIR_VERT ) );
+
+ const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
+ SvtLanguageOptions aLanguageOptions;
+ const bool bVerticalEnabled = aLanguageOptions.IsVerticalTextEnabled();
+
+ SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+
+ mpLayoutSet1 = createEmptyValueSetControl();
+ mpLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+
+ snewfoil_value_info* pInfo = 0;
+ sal_Int16 nColCount = 4;
+ switch( eMode )
+ {
+ case DrawViewMode_DRAW: pInfo = &standard[0]; break;
+ case DrawViewMode_HANDOUT: pInfo = &handout[0]; nColCount = 2; break;
+ case DrawViewMode_NOTES: pInfo = &notes[0]; nColCount = 1; break;
+ default: break;
+ }
+
+ mpLayoutSet1->SetColCount( nColCount );
+
+ fillLayoutValueSet( mpLayoutSet1, pInfo, bHighContrast );
+
+ Size aSize( mpLayoutSet1->GetOutputSizePixel() );
+ aSize.Width() += (mpLayoutSet1->GetColCount() + 1) * LAYOUT_BORDER_PIX;
+ aSize.Height() += (mpLayoutSet1->GetLineCount() +1) * LAYOUT_BORDER_PIX;
+ mpLayoutSet1->SetOutputSizePixel( aSize );
+
+ if( bVerticalEnabled && (eMode == DrawViewMode_DRAW) )
+ appendEntry( -1, aTitle1 );
+ appendEntry( 0, mpLayoutSet1 );
+
+ if( bVerticalEnabled && (eMode == DrawViewMode_DRAW) )
+ {
+ mpLayoutSet2 = new ValueSet( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
+ // mpLayoutSet2->SetHelpId( HID_VALUESET_EXTRUSION_LIGHTING );
+
+ mpLayoutSet2->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectHdl ) );
+ mpLayoutSet2->SetColCount( 4 );
+ mpLayoutSet2->EnableFullItemMode( FALSE );
+ mpLayoutSet2->SetColor( GetControlBackground() );
+
+ fillLayoutValueSet( mpLayoutSet2, &v_standard[0], bHighContrast );
+
+ aSize = mpLayoutSet2->GetOutputSizePixel();
+ aSize.Width() += (mpLayoutSet2->GetColCount() + 1) * LAYOUT_BORDER_PIX;
+ aSize.Height() += (mpLayoutSet2->GetLineCount() + 1) * LAYOUT_BORDER_PIX;
+ mpLayoutSet2->SetOutputSizePixel( aSize );
+
+ appendEntry( -1, aTitle2 );
+ appendEntry( 1, mpLayoutSet2 );
+ }
+
+ if( eMode == DrawViewMode_DRAW )
+ {
+ appendSeparator();
+
+ OUString sSlotStr;
+ Image aSlotImage;
+ if( mxFrame.is() )
+ {
+ if( bInsertPage )
+ sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DuplicatePage" ) );
+ else
+ sSlotStr = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Undo" ) );
+ aSlotImage = ::GetImage( mxFrame, sSlotStr, FALSE, FALSE );
+
+ String sSlotTitle;
+ if( bInsertPage )
+ sSlotTitle = ImplRetrieveLabelFromCommand( mxFrame, sSlotStr );
+ else
+ sSlotTitle = String( SdResId( STR_RESET_LAYOUT ) );
+ appendEntry( 2, sSlotTitle, aSlotImage);
+ }
+ }
+
+ SetOutputSizePixel( getMenuSize() );
+}
+
+// -----------------------------------------------------------------------
+
+LayoutToolbarMenu::~LayoutToolbarMenu()
+{
+}
+
+// -----------------------------------------------------------------------
+
+IMPL_LINK( LayoutToolbarMenu, SelectHdl, void *, pControl )
+{
+ if ( IsInPopupMode() )
+ EndPopupMode();
+
+ Sequence< PropertyValue > aArgs;
+
+ AutoLayout eLayout = AUTOLAYOUT__END;
+
+ OUString sCommandURL( mrController.getCommandURL() );
+
+ if( pControl == mpLayoutSet1 )
+ {
+ eLayout = static_cast< AutoLayout >(mpLayoutSet1->GetSelectItemId()-1);
+ }
+ else if( pControl == mpLayoutSet2 )
+ {
+ eLayout = static_cast< AutoLayout >(mpLayoutSet2->GetSelectItemId()-1);
+ }
+
+ if( eLayout != AUTOLAYOUT__END )
+ {
+ aArgs = Sequence< PropertyValue >(1);
+ aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "WhatLayout" ) );
+ aArgs[0].Value <<= (sal_Int32)eLayout;
+ }
+ else if( mbInsertPage )
+ {
+ sCommandURL = OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:DuplicatePage" ) );
+ }
+
+ mrController.dispatchCommand( sCommandURL, aArgs );
+
+ return 0;
+}
+
+// ====================================================================
+
+OUString SlideLayoutController_getImplementationName()
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sd.SlideLayoutController" ));
+}
+
+// --------------------------------------------------------------------
+
+Sequence< OUString > SlideLayoutController_getSupportedServiceNames() throw( RuntimeException )
+{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
+}
+
+// --------------------------------------------------------------------
+
+Reference< XInterface > SAL_CALL SlideLayoutController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
+{
+ return *new SlideLayoutController( rSMgr, OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:AssignLayout" )), false );
+}
+
+// --------------------------------------------------------------------
+
+OUString InsertSlideController_getImplementationName()
+{
+ return OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.sd.InsertSlideController" ));
+}
+
+// --------------------------------------------------------------------
+
+Sequence< OUString > InsertSlideController_getSupportedServiceNames() throw( RuntimeException )
+{
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ToolbarController" ));
+ return aSNS;
+}
+
+// --------------------------------------------------------------------
+
+Reference< XInterface > SAL_CALL InsertSlideController_createInstance( const Reference< XMultiServiceFactory >& rSMgr ) throw( RuntimeException )
+{
+ return *new SlideLayoutController( rSMgr, OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:InsertPage" )), true );
+}
+
+//========================================================================
+// class SlideLayoutController
+//========================================================================
+
+SlideLayoutController::SlideLayoutController( const Reference< lang::XMultiServiceFactory >& rServiceManager, const rtl::OUString& sCommandURL, bool bInsertPage )
+: svt::PopupWindowController( rServiceManager, Reference< frame::XFrame >(), sCommandURL )
+, mbInsertPage( bInsertPage )
+{
+}
+
+// --------------------------------------------------------------------
+
+::Window* SlideLayoutController::createPopupWindow( ::Window* pParent )
+{
+ return new sd::LayoutToolbarMenu( *this, m_xFrame, pParent, mbInsertPage );
+}
+
+// --------------------------------------------------------------------
+// XServiceInfo
+// --------------------------------------------------------------------
+
+OUString SAL_CALL SlideLayoutController::getImplementationName() throw( RuntimeException )
+{
+ if( mbInsertPage )
+ return InsertSlideController_getImplementationName();
+ else
+ return SlideLayoutController_getImplementationName();
+}
+
+// --------------------------------------------------------------------
+
+Sequence< OUString > SAL_CALL SlideLayoutController::getSupportedServiceNames( ) throw( RuntimeException )
+{
+ if( mbInsertPage )
+ return InsertSlideController_getSupportedServiceNames();
+ else
+ return SlideLayoutController_getSupportedServiceNames();
+}
+
+}
diff --git a/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx b/sd/source/ui/controller/slidelayoutcontroller.hxx
index a0ad5422496a..5e76d3ad74c7 100644
--- a/sd/source/ui/slidesorter/cache/SlsIdleDetector.hxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.hxx
@@ -25,27 +25,30 @@
*
************************************************************************/
-#ifndef SD_SLIDESORTER_IDLE_DETECTOR_HXX
-#define SD_SLIDESORTER_IDLE_DETECTOR_HXX
+#ifndef __SD_SLIDELAYOUTCONTROLLER_HXX_
+#define __SD_SLIDELAYOUTCONTROLLER_HXX_
-class Window;
+#include <svtools/popupwindowcontroller.hxx>
-namespace sd { namespace slidesorter { namespace cache {
+namespace sd
+{
-class IdleDetector
+class SlideLayoutController : public svt::PopupWindowController
{
public:
- IdleDetector (const ::Window* pWindow, const bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation);
- bool operator() (void);
-
-private:
- const ::Window* mpWindow;
- const bool mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
-};
+ SlideLayoutController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager, const rtl::OUString& sCommandURL, bool bInsertPage );
+ virtual ::Window* createPopupWindow( ::Window* pParent );
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
+ using svt::PopupWindowController::createPopupWindow;
+private:
+ bool mbInsertPage;
+};
-} } } // end of namespace ::sd::slidesorter::cache
+}
-#endif
+#endif // __SD_SLIDELAYOUTCONTROLLER_HXX_
diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx
index 7420319ab491..975d277c7dff 100644..100755
--- a/sd/source/ui/dlg/LayerDialogContent.cxx
+++ b/sd/source/ui/dlg/LayerDialogContent.cxx
@@ -86,14 +86,6 @@ LayerDialogContent::~LayerDialogContent (void)
-LayerTabBar& LayerDialogContent::GetLayerTabBar (void)
-{
- return maLayerTabBar;
-}
-
-
-
-
BOOL LayerDialogContent::Close (void)
{
return SfxDockingWindow::Close();
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index ca8ee8724037..6a6d515822f8 100644..100755
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -29,28 +29,26 @@
#include "precompiled_sd.hxx"
#include "PaneChildWindows.hxx"
#include "PaneDockingWindow.hrc"
+#include "PaneDockingWindow.hxx"
+#include "ViewShellBase.hxx"
+#include "framework/FrameworkHelper.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "app.hrc"
#include "strings.hrc"
#include "sdresid.hxx"
+
#include <sfx2/app.hxx>
#include <sfx2/dockwin.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
-
-namespace sd
-{
- SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
- SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
- SFX_IMPL_DOCKINGWINDOW(RightPaneChildWindow, SID_RIGHT_PANE)
-}
-
-
-#include "PaneDockingWindow.hxx"
-#include "ViewShellBase.hxx"
-#include "framework/FrameworkHelper.hxx"
+#include <tools/diagnose_ex.h>
namespace sd {
+SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
+SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
+SFX_IMPL_DOCKINGWINDOW( ToolPanelChildWindow, SID_TASKPANE)
+
//===== PaneChildWindow =======================================================
PaneChildWindow::PaneChildWindow (
@@ -58,8 +56,8 @@ PaneChildWindow::PaneChildWindow (
USHORT nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const ResId& rResId,
- const ::rtl::OUString& rsTitle,
+ const USHORT nDockWinTitleResId,
+ const USHORT nTitleBarResId,
SfxChildAlignment eAlignment)
: SfxChildWindow (pParentWindow, nId)
{
@@ -67,9 +65,8 @@ PaneChildWindow::PaneChildWindow (
pBindings,
this,
pParentWindow,
- rResId,
- framework::FrameworkHelper::msLeftImpressPaneURL,
- rsTitle);
+ SdResId( nDockWinTitleResId ),
+ String( SdResId( nTitleBarResId ) ) );
eChildAlignment = eAlignment;
static_cast<SfxDockingWindow*>(pWindow)->Initialize(pInfo);
SetHideNotDelete(TRUE);
@@ -112,8 +109,8 @@ LeftPaneImpressChildWindow::LeftPaneImpressChildWindow (
nId,
pBindings,
pInfo,
- SdResId(FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW),
- String(SdResId(STR_LEFT_PANE_IMPRESS_TITLE)),
+ FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW,
+ STR_LEFT_PANE_IMPRESS_TITLE,
SFX_ALIGN_LEFT)
{
}
@@ -133,8 +130,8 @@ LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
nId,
pBindings,
pInfo,
- SdResId(FLT_LEFT_PANE_DRAW_DOCKING_WINDOW),
- String(SdResId(STR_LEFT_PANE_DRAW_TITLE)),
+ FLT_LEFT_PANE_DRAW_DOCKING_WINDOW,
+ STR_LEFT_PANE_DRAW_TITLE,
SFX_ALIGN_LEFT)
{
}
@@ -142,23 +139,40 @@ LeftPaneDrawChildWindow::LeftPaneDrawChildWindow (
-//===== RightPaneChildWindow ==================================================
-
-RightPaneChildWindow::RightPaneChildWindow (
- ::Window* pParentWindow,
- USHORT nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo)
- : PaneChildWindow(
- pParentWindow,
- nId,
- pBindings,
- pInfo,
- SdResId(FLT_RIGHT_PANE_DOCKING_WINDOW),
- String(SdResId(STR_RIGHT_PANE_TITLE)),
- SFX_ALIGN_RIGHT)
+//======================================================================================================================
+//= ToolPanelChildWindow
+//======================================================================================================================
+//----------------------------------------------------------------------------------------------------------------------
+ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, USHORT 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 )
{
}
+//----------------------------------------------------------------------------------------------------------------------
+void ToolPanelChildWindow::ActivateToolPanel( const ::rtl::OUString& i_rPanelURL )
+{
+ SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() );
+ ViewShellBase* pViewShellBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame() );
+ ENSURE_OR_RETURN_VOID( pViewShellBase != NULL, "ToolPanelChildWindow::ActivateToolPanel: no view shell access!" );
+
+ const ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper( framework::FrameworkHelper::Instance( *pViewShellBase ) );
+
+ if ( i_rPanelURL.indexOf( framework::FrameworkHelper::msTaskPanelURLPrefix ) == 0 )
+ {
+ // it's one of our standard panels known to the drawing framework
+ pFrameworkHelper->RequestTaskPanel( i_rPanelURL );
+ }
+ else
+ {
+ // TODO: it would be nice if the drawing framework were able to handle non-standard panels, installed by
+ // extensions, too. As long as this is not the case, we need to take the direct way ...
+ ::boost::shared_ptr< ViewShell > pViewShell = pFrameworkHelper->GetViewShell( framework::FrameworkHelper::msRightPaneURL );
+ toolpanel::ToolPanelViewShell* pToolPanelViewShell = dynamic_cast< toolpanel::ToolPanelViewShell* >( pViewShell.get() );
+ ENSURE_OR_RETURN_VOID( pToolPanelViewShell != NULL, "ToolPanelChildWindow::ActivateToolPanel: no tool panel view shell access!" );
+ pToolPanelViewShell->ActivatePanel( i_rPanelURL );
+ }
+}
} // end of namespace ::sd
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index c0dcd76f0fae..c1dedd5d8293 100644..100755
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -41,299 +41,26 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
+using ::sfx2::TitledDockingWindow;
namespace sd {
-PaneDockingWindow::PaneDockingWindow (
- SfxBindings *_pBindings,
- SfxChildWindow *pChildWindow,
- ::Window* pParent,
- const ResId& rResId,
- const ::rtl::OUString& rsPaneURL,
- const ::rtl::OUString& rsTitle)
- : SfxDockingWindow (
- _pBindings,
- pChildWindow,
- pParent,
- rResId
- ),
- msPaneURL(rsPaneURL),
- msTitle(rsTitle),
- mpTitleToolBox(),
- maBorder (3,1,3,3),
- mnChildWindowId(pChildWindow->GetType()),
- mpContentWindow(new ::Window(this)),
- mbIsLayoutPending(false)
+PaneDockingWindow::PaneDockingWindow(
+ SfxBindings *_pBindings, SfxChildWindow *pChildWindow, ::Window* pParent,
+ const ResId& rResId, const ::rtl::OUString& rsTitle )
+ :TitledDockingWindow( _pBindings, pChildWindow, pParent, rResId )
{
- SetBackground (Wallpaper());
-
- InitializeTitleToolBox();
-
- // Tell the system window about the new docking window so that it can be
- // reached via the keyboard.
- SystemWindow* pSystemWindow = GetSystemWindow();
- if (pSystemWindow != NULL)
- pSystemWindow->GetTaskPaneList()->AddWindow(this);
-
- mpContentWindow->Show();
+ SetTitle( rsTitle );
}
-
-
-
PaneDockingWindow::~PaneDockingWindow (void)
{
- // Tell the next system window that the docking window is no longer
- // available.
- SystemWindow* pSystemWindow = GetSystemWindow();
- if (pSystemWindow != NULL)
- pSystemWindow->GetTaskPaneList()->RemoveWindow(this);
- mpTitleToolBox.reset();
-}
-
-
-
-
-void PaneDockingWindow::SetTitle (const String& rsTitle)
-{
- msTitle = rsTitle;
- Invalidate();
-}
-
-
-
-
-void PaneDockingWindow::Resize (void)
-{
- SfxDockingWindow::Resize();
- mbIsLayoutPending = true;
-}
-
-
-
-
-void PaneDockingWindow::Layout (void)
-{
- mbIsLayoutPending = false;
-
- Size aWindowSize (GetOutputSizePixel());
- Size aToolBoxSize (0,0);
- int nTitleBarHeight (GetSettings().GetStyleSettings().GetTitleHeight());
-
- // Place the title tool box.
- if (mpTitleToolBox.get() != NULL)
- {
- if (IsFloatingMode())
- mpTitleToolBox->HideItem (1);
- else
- mpTitleToolBox->ShowItem (1);
-
- aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel();
- if (aToolBoxSize.Height() > nTitleBarHeight)
- nTitleBarHeight = aToolBoxSize.Height();
- mpTitleToolBox->SetPosSizePixel (
- Point(aWindowSize.Width()-aToolBoxSize.Width(),
- (nTitleBarHeight-aToolBoxSize.Height())/2),
- aToolBoxSize);
- }
-
- // Place the content window.
- if (nTitleBarHeight < aToolBoxSize.Height())
- nTitleBarHeight = aToolBoxSize.Height();
- aWindowSize.Height() -= nTitleBarHeight;
- mpContentWindow->SetPosSizePixel(
- Point(maBorder.Left(),nTitleBarHeight+maBorder.Top()),
- Size (aWindowSize.Width()-maBorder.Left()-maBorder.Right(),
- aWindowSize.Height()-maBorder.Top()-maBorder.Bottom()));
-}
-
-
-
-
-void PaneDockingWindow::Paint (const Rectangle& rRectangle)
-{
- if (mbIsLayoutPending)
- Layout();
-
- SfxDockingWindow::Paint (rRectangle);
- int nTitleBarHeight (GetSettings().GetStyleSettings().GetTitleHeight());
- Size aToolBoxSize = mpTitleToolBox->CalcWindowSizePixel();
- if (aToolBoxSize.Height() > nTitleBarHeight)
- nTitleBarHeight = aToolBoxSize.Height();
- Color aOriginalLineColor (GetLineColor());
- Color aOriginalFillColor (GetFillColor());
- SetFillColor (GetSettings().GetStyleSettings().GetDialogColor());
- SetLineColor ();
-
- // Make font bold.
- const Font& rOriginalFont (GetFont());
- Font aFont (rOriginalFont);
- aFont.SetWeight (WEIGHT_BOLD);
- SetFont (aFont);
-
- // Set border values.
- Size aWindowSize (GetOutputSizePixel());
- int nOuterLeft = 0;
- int nInnerLeft = nOuterLeft + maBorder.Left() - 1;
- int nOuterRight = aWindowSize.Width() - 1;
- int nInnerRight = nOuterRight - maBorder.Right() + 1;
- int nInnerTop = nTitleBarHeight + maBorder.Top() - 1;
- int nOuterBottom = aWindowSize.Height() - 1;
- int nInnerBottom = nOuterBottom - maBorder.Bottom() + 1;
-
- // Paint title bar background.
- Rectangle aTitleBarBox (Rectangle(
- nOuterLeft,
- 0,
- nOuterRight,
- nInnerTop-1));
- DrawRect (aTitleBarBox);
-
- if (nInnerLeft > nOuterLeft)
- DrawRect (
- Rectangle (nOuterLeft, nInnerTop, nInnerLeft, nInnerBottom));
- if (nOuterRight > nInnerRight)
- DrawRect (
- Rectangle (nInnerRight, nInnerTop, nOuterRight, nInnerBottom));
- if (nInnerBottom < nOuterBottom)
- DrawRect (
- Rectangle (nOuterLeft, nInnerBottom, nOuterRight, nOuterBottom));
-
- // Paint bevel border.
- SetFillColor ();
- SetLineColor (GetSettings().GetStyleSettings().GetShadowColor());
- if (maBorder.Top() > 0)
- DrawLine (
- Point(nInnerLeft,nInnerTop),
- Point(nInnerLeft,nInnerBottom));
- if (maBorder.Left() > 0)
- DrawLine (
- Point(nInnerLeft,nInnerTop),
- Point(nInnerRight,nInnerTop));
- SetLineColor (GetSettings().GetStyleSettings().GetLightColor());
- if (maBorder.Bottom() > 0)
- DrawLine (
- Point(nInnerRight,nInnerBottom),
- Point(nInnerLeft,nInnerBottom));
- if (maBorder.Right() > 0)
- DrawLine (
- Point(nInnerRight,nInnerBottom),
- Point(nInnerRight,nInnerTop));
-
- // Paint title bar text.
- SetLineColor (GetSettings().GetStyleSettings().GetActiveTextColor());
- SetFillColor ();
- aTitleBarBox.Left() += 3;
- DrawText (aTitleBarBox, msTitle,
- TEXT_DRAW_LEFT
- | TEXT_DRAW_VCENTER
- | TEXT_DRAW_MULTILINE
- | TEXT_DRAW_WORDBREAK);
-
- // Restore original values of the output device.
- SetFont (rOriginalFont);
- SetFillColor (aOriginalFillColor);
}
-
-
-
-void PaneDockingWindow::InitializeTitleToolBox (void)
-{
- if (mpTitleToolBox.get() == NULL)
- {
- // Initialize the title tool box.
- mpTitleToolBox.reset (new ToolBox(this));
- mpTitleToolBox->SetSelectHdl (
- LINK(this, PaneDockingWindow, ToolboxSelectHandler));
- mpTitleToolBox->SetOutStyle (TOOLBOX_STYLE_FLAT);
- mpTitleToolBox->SetBackground (Wallpaper (
- GetSettings().GetStyleSettings().GetDialogColor()));
- mpTitleToolBox->Show();
- }
- else
- mpTitleToolBox->Clear();
-
- // Get the closer bitmap and set it as right most button.
- Bitmap aBitmap (SdResId (BMP_CLOSE_DOC));
- Bitmap aBitmapHC (SdResId (BMP_CLOSE_DOC_H));
- Image aImage = Image (aBitmap, Color (COL_LIGHTMAGENTA));
- Image aImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST));
- mpTitleToolBox->InsertItem (1,
- GetSettings().GetStyleSettings().GetHighContrastMode()
- ? aImageHC
- : aImage);
- mpTitleToolBox->ShowItem (1);
-}
-
-
-
-
-USHORT PaneDockingWindow::AddMenu (
- const String& rsMenuName,
- ULONG nHelpId,
- const Link& rCallback)
-{
- // Add the menu before the closer button.
- USHORT nItemCount (mpTitleToolBox->GetItemCount());
- USHORT nItemId (nItemCount+1);
- mpTitleToolBox->InsertItem (
- nItemId,
- rsMenuName,
- TIB_DROPDOWNONLY,
- nItemCount>0 ? nItemCount-1 : (USHORT)-1);
- mpTitleToolBox->SetHelpId( nItemId, nHelpId );
- mpTitleToolBox->SetClickHdl (rCallback);
- mpTitleToolBox->SetDropdownClickHdl (rCallback);
-
- // The tool box has likely changed its size. The title bar has to be
- // resized.
- Resize();
- Invalidate();
-
- return nItemCount+1;
-}
-
-
-
-
-IMPL_LINK(PaneDockingWindow, ToolboxSelectHandler, ToolBox*, pToolBox)
-{
- USHORT nId = pToolBox->GetCurItemId();
-
- if (nId == 1)
- {
- EndTracking();
- SfxBoolItem aVisibility (mnChildWindowId, FALSE);
- GetBindings().GetDispatcher()->Execute (
- mnChildWindowId,
- SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
- &aVisibility,
- NULL);
- }
-
- return 0;
-}
-
-
-
-
-long PaneDockingWindow::Notify( NotifyEvent& rNEvt )
-{
- return SfxDockingWindow::Notify (rNEvt);
-}
-
-
-
-
void PaneDockingWindow::StateChanged( StateChangedType nType )
{
switch (nType)
{
- case STATE_CHANGE_INITSHOW:
- Resize();
- break;
-
case STATE_CHANGE_VISIBLE:
// The visibility of the docking window has changed. Tell the
// ConfigurationController so that it can activate or deactivate
@@ -351,61 +78,4 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
SfxDockingWindow::StateChanged (nType);
}
-
-
-
-void PaneDockingWindow::DataChanged (const DataChangedEvent& rEvent)
-{
- SfxDockingWindow::DataChanged (rEvent);
-
- switch (rEvent.GetType())
- {
- case DATACHANGED_SETTINGS:
- if ((rEvent.GetFlags() & SETTINGS_STYLE) == 0)
- break;
- // else fall through.
- case DATACHANGED_FONTS:
- case DATACHANGED_FONTSUBSTITUTION:
- {
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-
- // Font.
- Font aFont = rStyleSettings.GetAppFont();
- if (IsControlFont())
- aFont.Merge(GetControlFont());
- SetZoomedPointFont(aFont);
-
- // Color.
- Color aColor;
- if (IsControlForeground())
- aColor = GetControlForeground();
- else
- aColor = rStyleSettings.GetButtonTextColor();
- SetTextColor(aColor);
- SetTextFillColor();
-
- Resize();
- Invalidate();
- }
- break;
- }
-}
-
-
-
-
-::Window* PaneDockingWindow::GetContentWindow (void)
-{
- return mpContentWindow.get();
-}
-
-
-
-
-::boost::shared_ptr<ToolBox> PaneDockingWindow::GetTitleToolBox (void) const
-{
- return mpTitleToolBox;
-}
-
-
} // end of namespace ::sd
diff --git a/sd/source/ui/dlg/PaneDockingWindow.src b/sd/source/ui/dlg/PaneDockingWindow.src
index 0359f9f18182..23b0d19ac79b 100644..100755
--- a/sd/source/ui/dlg/PaneDockingWindow.src
+++ b/sd/source/ui/dlg/PaneDockingWindow.src
@@ -59,7 +59,7 @@ DockingWindow FLT_LEFT_PANE_DRAW_DOCKING_WINDOW
Text [ en-US ] = "Page Pane" ;
};
-DockingWindow FLT_RIGHT_PANE_DOCKING_WINDOW
+DockingWindow FLT_TOOL_PANEL_DOCKING_WINDOW
{
// HelpID = SID_EFFECT_WIN ;
Border = TRUE ;
diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx
index 2e8032926846..bb1023482ea0 100644..100755
--- a/sd/source/ui/dlg/PaneShells.cxx
+++ b/sd/source/ui/dlg/PaneShells.cxx
@@ -109,36 +109,30 @@ LeftDrawPaneShell::~LeftDrawPaneShell (void)
-//===== RightPaneShell ========================================================
+//===== ToolPanelPaneShell ========================================================
#undef ShellClass
-#define ShellClass RightPaneShell
+#define ShellClass ToolPanelPaneShell
-SFX_SLOTMAP(RightPaneShell)
+SFX_SLOTMAP( ToolPanelPaneShell )
{
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
-SFX_IMPL_INTERFACE(RightPaneShell, SfxShell, SdResId(STR_RIGHT_PANE_SHELL))
+SFX_IMPL_INTERFACE( ToolPanelPaneShell, SfxShell, SdResId( STR_TOOL_PANEL_SHELL ) )
{
- SFX_CHILDWINDOW_REGISTRATION(
- ::sd::RightPaneChildWindow::GetChildWindowId());
+ SFX_CHILDWINDOW_REGISTRATION( ::sd::ToolPanelChildWindow::GetChildWindowId() );
}
-TYPEINIT1(RightPaneShell, SfxShell);
-
+TYPEINIT1( ToolPanelPaneShell, SfxShell );
-
-RightPaneShell::RightPaneShell (void)
- : SfxShell()
+ToolPanelPaneShell::ToolPanelPaneShell()
+ :SfxShell()
{
- SetName(rtl::OUString::createFromAscii("RightPane"));
+ SetName( ::rtl::OUString::createFromAscii( "ToolPanel" ) );
}
-
-
-
-RightPaneShell::~RightPaneShell (void)
+ToolPanelPaneShell::~ToolPanelPaneShell(void)
{
}
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index 95d4277f8f42..7aee12f23bbd 100644..100755
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -96,14 +96,14 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
-::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence (void)
+::svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck*/ )
{
::svx::SpellPortions aResult;
if (mpSdOutliner != NULL)
{
ProvideOutliner();
- aResult = mpSdOutliner->GetNextSpellSentence ();
+ aResult = mpSdOutliner->GetNextSpellSentence();
}
// Close the spell check dialog when there are no more sentences to
@@ -125,7 +125,7 @@ void SpellDialogChildWindow::InvalidateSpellDialog (void)
void SpellDialogChildWindow::ApplyChangedSentence (
- const ::svx::SpellPortions& rChanged)
+ const ::svx::SpellPortions& rChanged, bool bRecheck )
{
if (mpSdOutliner != NULL)
{
@@ -133,7 +133,7 @@ void SpellDialogChildWindow::ApplyChangedSentence (
if (pOutlinerView != NULL)
mpSdOutliner->ApplyChangedSentence (
pOutlinerView->GetEditView(),
- rChanged, false);
+ rChanged, bRecheck);
}
}
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2ac4801aba0c..e179a0ba9f86 100644..100755
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -691,19 +691,6 @@ void AnimationWindow::ResetAttrs()
// -----------------------------------------------------------------------
-void AnimationWindow::WaitInEffect( ULONG nMilliSeconds ) const
-{
- ULONG nEnd = Time::GetSystemTicks() + nMilliSeconds;
- ULONG nCurrent = Time::GetSystemTicks();
- while (nCurrent < nEnd)
- {
- nCurrent = Time::GetSystemTicks();
- Application::Reschedule();
- }
-}
-
-// -----------------------------------------------------------------------
-
void AnimationWindow::WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
SfxProgress* pProgress ) const
{
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 2a04f56d2a61..b8c92dee3a6e 100644..100755
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -42,7 +42,6 @@
#include "sdpage.hxx"
#include "cusshow.hxx"
#include "app.hxx"
-#include "optsitem.hxx"
#include <vcl/msgbox.hxx>
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index d398724a3074..1eb3a3d0cedc 100644..100755
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1928,21 +1928,6 @@ SfxObjectShellLock AssistentDlg::GetDocument()
return mpImpl->GetDocument();
}
-String AssistentDlg::GetTopic() const
-{
- return mpImpl->mpPage4AskTopicEDT->GetText();
-}
-
-String AssistentDlg::GetUserName() const
-{
- return mpImpl->mpPage4AskNameEDT->GetText();
-}
-
-String AssistentDlg::GetInformation() const
-{
- return mpImpl->mpPage4AskInfoEDT->GetText();
-}
-
OutputType AssistentDlg::GetOutputMedium() const
{
if(mpImpl->mpPage2Medium1RB->IsChecked())
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index 40bfae16c2a4..f9dcf5046189 100644..100755
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -207,287 +207,3 @@ void SdPageListControl::DataChanged( const DataChangedEvent& rDCEvt )
SvTreeListBox::DataChanged( rDCEvt );
}
-// ====================================================================
-// TemplateCache
-// ====================================================================
-
-// Kennung fuer die Config Datei mit den Cache Daten
-static const UINT16 nMagic = (UINT16)0x4127;
-
-TemplateCacheInfo::TemplateCacheInfo()
-{
- m_bImpress = FALSE;
- m_bValid = FALSE;
- m_bModified = TRUE;
-}
-
-TemplateCacheInfo::TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress )
-{
- m_aFile = rFile;
- m_aDateTime = rDateTime;
- m_bImpress = bImpress;
- m_bValid = FALSE;
- m_bModified = TRUE;
-}
-
-SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo)
-{
- rIn.ReadByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 );
- USHORT nDay, nMonth, nYear;
- rIn >> nDay;
- rIn >> nMonth;
- rIn >> nYear;
- rInfo.m_aDateTime.SetDay( nDay );
- rInfo.m_aDateTime.SetMonth( nMonth );
- rInfo.m_aDateTime.SetYear( nYear);
-
- USHORT nHour, nMin, nSec, n100Sec;
-
- rIn >> nHour;
- rIn >> nMin;
- rIn >> nSec;
- rIn >> n100Sec;
-
- rInfo.m_aDateTime.SetHour( nHour );
- rInfo.m_aDateTime.SetMin( nMin );
- rInfo.m_aDateTime.SetSec( nSec );
- rInfo.m_aDateTime.Set100Sec( n100Sec );
-
- rIn >> rInfo.m_bImpress;
-
- rInfo.m_bModified = FALSE;
-
- return rIn;
-}
-
-SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo)
-{
- USHORT nTemp;
-
- rOut.WriteByteString( rInfo.m_aFile, RTL_TEXTENCODING_UTF8 );
-
- nTemp = rInfo.m_aDateTime.GetDay();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetMonth();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetYear();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetHour();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetMin();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.GetSec();
- rOut << nTemp;
-
- nTemp = rInfo.m_aDateTime.Get100Sec();
- rOut << nTemp;
-
- rOut << rInfo.m_bImpress;
-
- return rOut;
-}
-
-TemplateCache::TemplateCache()
-{
-}
-
-TemplateCache::~TemplateCache()
-{
- Clear();
-}
-
-void TemplateCache::Clear()
-{
- for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- delete pEntry;
- delete pDir;
- }
-}
-
-void TemplateCache::Load()
-{
- INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ | STREAM_NOCREATE, TRUE ); // Download
- SvStream* pStream = aMedium.GetInStream();
-
- if( !pStream )
- return;
-
- UINT16 aCheck;
- *pStream >> aCheck;
-
- if(aCheck != nMagic)
- return;
-
- UINT16 nDirs;
- *pStream >> nDirs;
-
- for( UINT16 nDir = 0; pStream->GetError() == SVSTREAM_OK && nDir < nDirs; nDir++ )
- {
- TemplateCacheDirEntry* pDir = new TemplateCacheDirEntry();
- m_aDirs.Insert(pDir);
-
- pStream->ReadByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 );
-
- UINT16 nFiles;
- *pStream >> nFiles;
-
- for( UINT16 nFile = 0; pStream->GetError() == SVSTREAM_OK && nFile < nFiles; nFile++ )
- {
- TemplateCacheInfo* pEntry = new TemplateCacheInfo();
- *pStream >> *pEntry;
- pDir->m_aFiles.Insert(pEntry);
- }
- }
-
- if( pStream->GetError() != SVSTREAM_OK )
- {
- // Ein I/O Problem ist doch kein Beinbruch, dann wird der Cache halt neu erzeugt
- Clear();
- }
-}
-
-void TemplateCache::Save()
-{
- INetURLObject aURL( SvtPathOptions().GetUserConfigPath() );
- aURL.Append( String( RTL_CONSTASCII_USTRINGPARAM( "template.sod" ) ) );
- SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_TRUNC, FALSE ); // Download
- SvStream* pStream = aMedium.GetInStream();
-
- if( !pStream )
- return;
-
- UINT16 nCheck = nMagic;
- *pStream << nCheck;
-
- const UINT16 nDirs = (UINT16) m_aDirs.Count();
- *pStream << nDirs;
-
- for( TemplateCacheDirEntry* pDir = m_aDirs.First();
- pStream->GetError() == SVSTREAM_OK && pDir;
- pDir = m_aDirs.Next() )
- {
- pStream->WriteByteString( pDir->m_aPath, RTL_TEXTENCODING_UTF8 );
-
- const UINT16 nFiles = (UINT16) pDir->m_aFiles.Count();
- *pStream << nFiles;
-
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First();
- pStream->GetError() == SVSTREAM_OK && pEntry;
- pEntry = pDir->m_aFiles.Next() )
- {
- *pStream << *pEntry;
- }
- }
-}
-
-TemplateCacheDirEntry* TemplateCache::GetDirEntry( const String& rPath )
-{
- TemplateCacheDirEntry* pDir = m_aDirs.GetCurObject();
- if( pDir && pDir->m_aPath == rPath )
- return pDir;
-
- for( pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- if( pDir->m_aPath == rPath )
- return pDir;
- }
-
- return NULL;
-}
-
-TemplateCacheInfo* TemplateCache::GetFileInfo( const String& rPath )
-{
- INetURLObject aUrl( rPath );
- String aPath( aUrl.GetPath() );
- String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
-
- DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
-
- if( NULL != pDir )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if( pEntry->GetFile() == aName )
- return pEntry;
- }
- }
-
- return NULL;
-}
-
-TemplateCacheInfo* TemplateCache::AddFileInfo( const String& rPath )
-{
- INetURLObject aUrl( rPath );
- String aPath( aUrl.GetPath() );
- String aName( aUrl.GetName( INetURLObject::DECODE_UNAMBIGUOUS ) );
-
- DBG_ASSERT( aUrl.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" );
-
- TemplateCacheDirEntry* pDir = GetDirEntry( aPath );
- TemplateCacheInfo* pEntry = NULL;
-
- if( pDir == NULL )
- {
- pDir = new TemplateCacheDirEntry();
- pDir->m_aPath = aPath;
- m_aDirs.Insert(pDir);
- }
-
- if( NULL != pDir )
- {
- for( pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if( pEntry->GetFile() == aName)
- return pEntry;
- }
-
- pEntry = new TemplateCacheInfo();
- pEntry->SetFile( aName );
- pDir->m_aFiles.Insert(pEntry);
- }
-
- return pEntry;
-}
-
-BOOL TemplateCache::ClearInvalidEntrys()
-{
- BOOL bModified = FALSE;
-
- for( TemplateCacheDirEntry* pDir = m_aDirs.First(); pDir; pDir = m_aDirs.Next() )
- {
- for( TemplateCacheInfo* pEntry = pDir->m_aFiles.First(); pEntry; pEntry = pDir->m_aFiles.Next() )
- {
- if(!pEntry->IsValid())
- {
- pDir->m_aFiles.Remove(pEntry);
- delete pEntry;
- bModified = TRUE;
- }
- else if( pEntry->IsModified() )
- {
- bModified = TRUE;
- }
- }
-
- if( pDir->m_aFiles.Count() == 0 )
- {
- m_aDirs.Remove(pDir);
- delete pDir;
- }
- }
-
- return bModified;
-}
-
-
diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx
index dc3e7f636e8d..35bbd41de448 100644..100755
--- a/sd/source/ui/dlg/dlgassim.hxx
+++ b/sd/source/ui/dlg/dlgassim.hxx
@@ -56,37 +56,7 @@ public:
};
-class TemplateCacheInfo
-{
-private:
- DateTime m_aDateTime;
- String m_aFile;
- BOOL m_bImpress;
- BOOL m_bValid;
- BOOL m_bModified;
-
-public:
- TemplateCacheInfo();
- TemplateCacheInfo( const String& rFile, const DateTime& rDateTime, BOOL bImpress );
-
- BOOL IsValid() const { return m_bValid; }
- void SetValid( BOOL bValid = TRUE ) { m_bValid = bValid; }
-
- BOOL IsImpress() const { return m_bImpress; }
- void SetImpress( BOOL bImpress = TRUE ) { m_bImpress = bImpress; }
-
- const String& GetFile() const { return m_aFile; }
- void SetFile( const String& rFile ) { m_aFile = rFile; }
-
- const DateTime& GetDateTime() const { return m_aDateTime; }
- void SetDateTime( const DateTime& rDateTime ) { m_aDateTime = rDateTime; }
-
- BOOL IsModified() const { return m_bModified; }
- void SetModified( BOOL bModified = TRUE ) { m_bModified = bModified; }
-
- friend SvStream& operator >> (SvStream& rIn, TemplateCacheInfo& rInfo);
- friend SvStream& operator << (SvStream& rOut, const TemplateCacheInfo& rInfo);
-};
+class TemplateCacheInfo;
DECLARE_LIST( TemplateCacheInfoList, TemplateCacheInfo * )
@@ -98,22 +68,3 @@ public:
};
DECLARE_LIST( TemplateCacheDirEntryList, TemplateCacheDirEntry * )
-
-class TemplateCache
-{
-private:
- TemplateCacheDirEntryList m_aDirs;
- TemplateCacheDirEntry* GetDirEntry( const String& rPath );
- void Clear();
-public:
- TemplateCache();
- ~TemplateCache();
-
- void Load();
- void Save();
-
- TemplateCacheInfo* GetFileInfo( const String& rPath );
- TemplateCacheInfo* AddFileInfo( const String& rPath );
-
- BOOL ClearInvalidEntrys();
-};
diff --git a/sd/source/ui/dlg/dlgctrls.cxx b/sd/source/ui/dlg/dlgctrls.cxx
index 14c1209875ef..1a5a612d37ad 100644..100755
--- a/sd/source/ui/dlg/dlgctrls.cxx
+++ b/sd/source/ui/dlg/dlgctrls.cxx
@@ -51,12 +51,6 @@ FadeEffectLB::FadeEffectLB( Window* pParent, SdResId Id )
{
}
-FadeEffectLB::FadeEffectLB( Window* pParent, WinBits aWB )
-: ListBox( pParent, aWB ),
- mpImpl( new FadeEffectLBImpl )
-{
-}
-
FadeEffectLB::~FadeEffectLB()
{
delete mpImpl;
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 2b78a649eaef..6cd220d5a5bc 100644..100755
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -96,27 +96,35 @@ SdSnapLineDlg::SdSnapLineDlg(
DBG_ASSERT( pPool, "Wo ist der Pool?" );
SfxMapUnit ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
- // Hier werden die Max- und MinWerte in Ahaengigkeit von der
+ // #i48497# Consider page origin
+ SdrPageView* pPV = pView->GetSdrPageView();
+ Point aLeftTop(aWorkArea.Left()+1, aWorkArea.Top()+1);
+ pPV->LogicToPagePos(aLeftTop);
+ Point aRightBottom(aWorkArea.Right()-2, aWorkArea.Bottom()-2);
+ pPV->LogicToPagePos(aRightBottom);
+
+ // Hier werden die Max- und MinWerte in Abhaengigkeit von der
// WorkArea, PoolUnit und der FieldUnit:
- SetMetricValue( aMtrFldX, aWorkArea.Left(), ePoolUnit );
+ SetMetricValue( aMtrFldX, aLeftTop.X(), ePoolUnit );
+
long nValue = static_cast<long>(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMin( nValue );
aMtrFldX.SetFirst( nValue );
- SetMetricValue( aMtrFldX, aWorkArea.Right()+1, ePoolUnit );
+ SetMetricValue( aMtrFldX, aRightBottom.X(), ePoolUnit );
nValue = static_cast<long>(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMax( nValue );
aMtrFldX.SetLast( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Top(), ePoolUnit );
+ SetMetricValue( aMtrFldY, aLeftTop.Y(), ePoolUnit );
nValue = static_cast<long>(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMin( nValue );
aMtrFldY.SetFirst( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Bottom()+1, ePoolUnit );
+ SetMetricValue( aMtrFldY, aRightBottom.Y(), ePoolUnit );
nValue = static_cast<long>(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMax( nValue );
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 71a7145425b7..a42ce43a2c6d 100644..100755
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -45,7 +45,6 @@
#include "DrawDocShell.hxx"
#include "ViewShell.hxx"
#include "ViewShellBase.hxx"
-#include "showview.hxx"
#include "drawview.hxx"
#include "sdpage.hxx"
#include "sfx2/viewfrm.hxx"
@@ -81,17 +80,6 @@ SdDocPreviewWin::SdDocPreviewWin( Window* pParent, const ResId& rResId )
SetBackground( aEmpty );
}
-SdDocPreviewWin::SdDocPreviewWin( Window* pParent )
-: Control(pParent, 0 ), pMetaFile( 0 ), bInEffect(FALSE), mpObj(NULL), mnShowPage(0)
-{
- SetBorderStyle( WINDOW_BORDER_MONO );
- svtools::ColorConfig aColorConfig;
- Wallpaper aEmpty;
- SetBackground( aEmpty );
- Resize();
- Show();
-}
-
SdDocPreviewWin::~SdDocPreviewWin()
{
delete pMetaFile;
@@ -104,13 +92,6 @@ void SdDocPreviewWin::Resize()
mxSlideShow->resize( GetSizePixel() );
}
-void SdDocPreviewWin::SetGDIFile( GDIMetaFile* pFile )
-{
- delete pMetaFile;
- pMetaFile = pFile;
- Invalidate();
-}
-
void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rPoint )
{
Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1,1 );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 182c70954111..71fad02f24a7 100644..100755
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -69,7 +69,6 @@ private:
using sfx2::FileDialogHelper::Execute;
#endif
- friend class SdExportFileDialog;
friend class SdOpenSoundFileDialog;
css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > mxControlAccess;
@@ -95,8 +94,6 @@ public:
// overwritten from FileDialogHelper, to receive user feedback
virtual void SAL_CALL ControlStateChanged( const css::ui::dialogs::FilePickerEvent& aEvent );
-
- sal_Bool SelectionBoxState() const;
};
// ------------------------------------------------------------------------
@@ -313,91 +310,6 @@ ErrCode SdFileDialog_Imp::Execute()
return FileDialogHelper::Execute();
}
-// ------------------------------------------------------------------------
-sal_Bool SdFileDialog_Imp::SelectionBoxState() const
-{
- if ( !mbUsableSelection || !mxControlAccess.is() )
- return sal_False;
-
- sal_Bool bState(0);
- try
- {
- mxControlAccess->getValue( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0 ) >>= bState;
- }
- catch( css::lang::IllegalArgumentException )
- {
-#ifdef DBG_UTIL
- DBG_ERROR( "Cannot access \"selection\" checkbox" );
-#endif
- }
-
- return bState;
-}
-
-
-// --------------------------------------------------------------------
-// ----------- SdExportFileDialog ---------------------------
-// --------------------------------------------------------------------
-
-// these are simple forwarders
-SdExportFileDialog::SdExportFileDialog(BOOL bHaveCheckbox) :
- mpImpl( new SdFileDialog_Imp( css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION,
- bHaveCheckbox ) )
-{
- // setup filter
- const String aHTMLFilter( SdResId( STR_EXPORT_HTML_NAME ) );
- GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter();
- const USHORT nFilterCount = pFilter->GetExportFormatCount();
-
- // add HTML filter
- mpImpl->AddFilter( aHTMLFilter, String( SdResId( STR_EXPORT_HTML_FILTER ) ) );
-
- // add other graphic filters
- for ( USHORT i = 0; i < nFilterCount; i++ )
- {
- mpImpl->AddFilter( pFilter->GetExportFormatName( i ),
- pFilter->GetExportWildcard( i ) );
- }
-
- // set dialog title
- mpImpl->SetTitle( String( SdResId( STR_EXPORT_DIALOG_TITLE ) ) );
-}
-
-// ------------------------------------------------------------------------
-SdExportFileDialog::~SdExportFileDialog()
-{
-}
-
-// ------------------------------------------------------------------------
-ErrCode SdExportFileDialog::Execute()
-{
- return mpImpl->Execute();
-}
-
-String SdExportFileDialog::GetPath() const
-{
- return mpImpl->GetPath();
-}
-
-// ------------------------------------------------------------------------
-void SdExportFileDialog::SetPath( const String& rPath )
-{
- mpImpl->SetDisplayDirectory( rPath );
-}
-
-// ------------------------------------------------------------------------
-String SdExportFileDialog::ReqCurrentFilter() const
-{
- return mpImpl->GetCurrentFilter();
-}
-
-// ------------------------------------------------------------------------
-BOOL SdExportFileDialog::IsExportSelection() const
-{
- return mpImpl->SelectionBoxState();
-}
-
-
// --------------------------------------------------------------------
// ----------- SdOpenSoundFileDialog -----------------------
// --------------------------------------------------------------------
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 294e61f3fe40..b48a1682bba6 100644..100755
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -291,12 +291,6 @@ HeaderFooterDialog::~HeaderFooterDialog()
// -----------------------------------------------------------------------
-void HeaderFooterDialog::initTabPages()
-{
-}
-
-// -----------------------------------------------------------------------
-
IMPL_LINK( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
const USHORT nId = pTabCtrl->GetCurPageId();
diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx
index f16e90dd7791..5d260367f383 100644..100755
--- a/sd/source/ui/dlg/inspagob.cxx
+++ b/sd/source/ui/dlg/inspagob.cxx
@@ -142,7 +142,6 @@ List* SdInsertPagesObjsDlg::GetList( USHORT nType )
// wird das gesamte Dokument (und nicht mehr!) eingefuegt.
if( aLbTree.GetSelectionCount() == 0 ||
( aLbTree.IsSelected( aLbTree.First() ) ) )
- //return( aLbTree.GetBookmarkList( nType ) );
return( NULL ); // #37350#
}
return( aLbTree.GetSelectEntryList( nType ) );
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index 6bc5a89a08ed..de3cff7b903d 100644..100755
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -74,7 +74,6 @@ SRC1FILES =\
layeroptionsdlg.src \
printdialog.src
-
SLOFILES = \
$(SLO)$/inspagob.obj \
$(SLO)$/ins_paste.obj \
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index ea7a702e539e..3c9aad38c332 100644..100755
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -41,15 +41,6 @@
#include "app.hrc"
#include <svl/intitem.hxx>
#include <sfx2/request.hxx>
-// STATIC DATA -----------------------------------------------------------
-
-static USHORT pPrintOptRanges[] =
-{
- ATTR_OPTIONS_PRINT,
- ATTR_OPTIONS_PRINT,
- 0
-};
-
/*************************************************************************
|*
@@ -236,13 +227,6 @@ SfxTabPage* SdPrintOptions::Create( Window* pWindow,
//-----------------------------------------------------------------------
-USHORT* SdPrintOptions::GetRanges()
-{
- return pPrintOptRanges;
-}
-
-//-----------------------------------------------------------------------
-
IMPL_LINK( SdPrintOptions, ClickCheckboxHdl, CheckBox *, pCbx )
{
// there must be at least one of them checked
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 9dbf8e22629c..275d39af4ea5 100644..100755
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/embed/XEmbedPersist.hpp>
#include <svtools/embedtransfer.hxx>
+#include <tools/diagnose_ex.h>
#include <ViewShell.hxx>
using namespace com::sun::star;
@@ -730,61 +731,6 @@ List* SdPageObjsTLB::GetSelectEntryList( USHORT nDepth )
/*************************************************************************
|*
-|* Alle Pages (und Objekte) des Docs zurueckgeben
-|* nType == 0 -> Seiten
-|* nType == 1 -> Objekte
-|*
-\************************************************************************/
-
-List* SdPageObjsTLB::GetBookmarkList( USHORT nType )
-{
- List* pList = NULL;
-
- if( GetBookmarkDoc() )
- {
- SdPage* pPage = NULL;
- String* pName = NULL;
- USHORT nPage = 0;
- const USHORT nMaxPages = mpBookmarkDoc->GetSdPageCount( PK_STANDARD );
-
- while( nPage < nMaxPages )
- {
- pPage = mpBookmarkDoc->GetSdPage( nPage, PK_STANDARD );
-
- if( nType == 0 ) // Seitennamen einfuegen
- {
- if( !pList )
- pList = new List();
-
- pName = new String( pPage->GetRealName() );
- pList->Insert( pName, LIST_APPEND );
- }
- else // Objektnamen einfuegen
- {
- // Ueber Objekte der Seite iterieren
- SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
- while( aIter.IsMore() )
- {
- SdrObject* pObj = aIter.Next();
- String aStr( GetObjectName( pObj ) );
- if( aStr.Len() )
- {
- if( !pList )
- pList = new List();
-
- pName = new String( aStr );
- pList->Insert( pName, LIST_APPEND );
- }
- }
- }
- nPage++;
- }
- }
- return( pList );
-}
-
-/*************************************************************************
-|*
|* Eintraege werden erst auf Anforderung (Doppelklick) eingefuegt
|*
\************************************************************************/
@@ -1268,7 +1214,7 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
catch (com::sun::star::uno::Exception&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
if (nRet == DND_ACTION_NONE)
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index ebe0243f7d99..af2668fc9dad 100644..100755
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -86,15 +86,6 @@ using namespace ::com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-static USHORT pActionRanges[] =
-{
- ATTR_ANIMATION_TRANSPCOLOR,
- ATTR_ANIMATION_TRANSPCOLOR,
- ATTR_ACTION_START,
- ATTR_ACTION_END,
- 0
-};
-
#define DOCUMENT_TOKEN (sal_Unicode('#'))
/*************************************************************************
@@ -423,13 +414,6 @@ SfxTabPage* SdTPAction::Create( Window* pWindow,
//------------------------------------------------------------------------
-USHORT* SdTPAction::GetRanges()
-{
- return( pActionRanges );
-}
-
-//------------------------------------------------------------------------
-
void SdTPAction::UpdateTree()
{
if( !bTreeUpdated && mpDoc && mpDoc->GetDocSh() && mpDoc->GetDocSh()->GetMedium() )
@@ -849,35 +833,6 @@ void SdTPAction::SetEditText( String const & rStr )
}
}
-String SdTPAction::GetMacroName( const String& rMacroPath )
-{
- String result = rMacroPath;
-
- // try to get name by parsing the macro path
- // using the new URI parsing services
-
- Reference< XMultiServiceFactory > xSMgr =
- ::comphelper::getProcessServiceFactory();
-
- Reference< com::sun::star::uri::XUriReferenceFactory >
- xFactory( xSMgr->createInstance(
- ::rtl::OUString::createFromAscii(
- "com.sun.star.uri.UriReferenceFactory" ) ), UNO_QUERY );
-
- if ( xFactory.is() )
- {
- Reference< com::sun::star::uri::XVndSunStarScriptUrl >
- xUrl( xFactory->parse( rMacroPath ), UNO_QUERY );
-
- if ( xUrl.is() )
- {
- result = xUrl->getName();
- }
- }
-
- return result;
-}
-
//------------------------------------------------------------------------
String SdTPAction::GetEditText( BOOL bFullDocDestination )
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 29218a7b985a..a033661e7c85 100644..100755
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -312,18 +312,6 @@ BOOL DrawDocShell::InitNew( const ::com::sun::star::uno::Reference< ::com::sun::
|*
\************************************************************************/
-sal_Bool DrawDocShell::IsNewDocument() const
-{
- return( mbNewDocument &&
- ( !GetMedium() || GetMedium()->GetURLObject().GetProtocol() == INET_PROT_NOT_VALID ) );
-}
-
-/*************************************************************************
-|*
-|* Load: Pools und Dokument laden
-|*
-\************************************************************************/
-
BOOL DrawDocShell::Load( SfxMedium& rMedium )
{
mbNewDocument = sal_False;
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index f284651b91e5..78b1b9434ad0 100644..100755
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -548,21 +548,6 @@ void DrawDocShell::SetModified( BOOL bSet /* = TRUE */ )
}
}
-::Window* DrawDocShell::GetWindow() const
-{
- SfxViewFrame* pFrame = GetFrame();
- if( pFrame == NULL )
- pFrame = SfxViewFrame::GetFirst( this );
-
- if( pFrame )
- return &(pFrame->GetWindow());
- else
- {
- DBG_ASSERT( 0, "No active window for DrawDocShell found! (next gpf is caused by this assertion)" );
- return NULL;
- }
-}
-
/*************************************************************************
|*
|* Callback fuer ExecuteSpellPopup()
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
index c8256bc2c0a6..55e22361ad3a 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
@@ -87,15 +87,12 @@ const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC2m
-
const ConfigurationClassifier::ResourceIdVector& ConfigurationClassifier::GetC1andC2 (void) const
{
return maC1andC2;
}
-
-
void ConfigurationClassifier::PartitionResources (
const ::com::sun::star::uno::Sequence<Reference<XResourceId> >& rS1,
const ::com::sun::star::uno::Sequence<Reference<XResourceId> >& rS2)
@@ -222,8 +219,6 @@ void ConfigurationClassifier::CopyResources (
}
-
-
void ConfigurationClassifier::TraceResourceIdVector (
const sal_Char* pMessage,
const ResourceIdVector& rResources) const
@@ -240,6 +235,4 @@ void ConfigurationClassifier::TraceResourceIdVector (
}
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 68bf55bb7495..2f846e50be25 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -56,7 +56,7 @@ using rtl::OUString;
using ::sd::framework::FrameworkHelper;
#undef VERBOSE
-#define VERBOSE 3
+//#define VERBOSE 3
namespace sd { namespace framework {
@@ -101,8 +101,6 @@ public:
const Reference<frame::XController>& rxController);
~Implementation (void);
- void Initialize (const Reference<frame::XController>& rxController);
-
Reference<XControllerManager> mxControllerManager;
/** The Broadcaster class implements storing and calling of listeners.
@@ -119,8 +117,6 @@ public:
ViewShellBase* mpBase;
- bool mbIsInitialized;
-
::boost::shared_ptr<ResourceFactoryManager> mpResourceFactoryContainer;
::boost::shared_ptr<ConfigurationControllerResourceManager> mpResourceManager;
@@ -705,7 +701,6 @@ ConfigurationController::Implementation::Implementation (
mpBroadcaster(new ConfigurationControllerBroadcaster(&rController)),
mxRequestedConfiguration(new Configuration(&rController, true)),
mpBase(NULL),
- mbIsInitialized(false),
mpResourceFactoryContainer(new ResourceFactoryManager(mxControllerManager)),
mpResourceManager(
new ConfigurationControllerResourceManager(mpResourceFactoryContainer,mpBroadcaster)),
@@ -721,27 +716,6 @@ ConfigurationController::Implementation::Implementation (
-void ConfigurationController::Implementation::Initialize (
- const Reference<frame::XController>& rxController)
-{
- mxControllerManager = Reference<XControllerManager>(rxController, UNO_QUERY_THROW);
-
- mpConfigurationUpdater->SetControllerManager(mxControllerManager);
-
- // Tunnel through the controller to obtain a ViewShellBase.
- Reference<lang::XUnoTunnel> xTunnel (rxController, UNO_QUERY_THROW);
- if (xTunnel.is())
- {
- ::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
- xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
- mpBase = pController->GetViewShellBase();
- }
-}
-
-
-
-
ConfigurationController::Implementation::~Implementation (void)
{
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
index e708909ee928..ff167f07520a 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerBroadcaster.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -123,8 +124,7 @@ void ConfigurationControllerBroadcaster::NotifyListeners (
}
catch(RuntimeException&)
{
- DBG_ASSERT(false,
- "ConfigurationController: caught exception while notifying listeners");
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
@@ -212,8 +212,7 @@ void ConfigurationControllerBroadcaster::DisposeAndClear (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,
- "ConfigurationController: caught exception while notifying dispose");
+ DBG_UNHANDLED_EXCEPTION();
}
}
else
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index bb5aab8a05d3..93ff7ee54e00 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -32,6 +32,7 @@
#include "ResourceFactoryManager.hxx"
#include "framework/FrameworkHelper.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
+#include <tools/diagnose_ex.h>
#include <algorithm>
#include <boost/bind.hpp>
@@ -168,7 +169,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
}
catch(Exception&)
{
- OSL_ENSURE(false, "caught exception while activating resource");
+ DBG_UNHANDLED_EXCEPTION();
}
if (xResource.is())
@@ -197,7 +198,7 @@ void ConfigurationControllerResourceManager::ActivateResource (
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -257,7 +258,7 @@ void ConfigurationControllerResourceManager::DeactivateResource (
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
#if defined VERBOSE && VERBOSE>=1
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
index 63e45f8bb110..b9552940060e 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.cxx
@@ -41,16 +41,16 @@ void ConfigurationTracer::TraceConfiguration (
const char* pMessage)
{
#ifdef DEBUG
- OSL_TRACE("%s at %p {\n", pMessage, rxConfiguration.get());
+ OSL_TRACE("%s at %p {", pMessage, rxConfiguration.get());
if (rxConfiguration.is())
{
TraceBoundResources(rxConfiguration, NULL, 0);
}
else
{
- OSL_TRACE(" empty\n");
+ OSL_TRACE(" empty");
}
- OSL_TRACE("}\n");
+ OSL_TRACE("}");
#else
(void)rxConfiguration;
(void)pMessage;
@@ -60,12 +60,12 @@ void ConfigurationTracer::TraceConfiguration (
+#ifdef DEBUG
void ConfigurationTracer::TraceBoundResources (
const Reference<XConfiguration>& rxConfiguration,
const Reference<XResourceId>& rxResourceId,
const int nIndentation)
{
-#ifdef DEBUG
Sequence<Reference<XResourceId> > aResourceList (
rxConfiguration->getResources(rxResourceId, ::rtl::OUString(), AnchorBindingMode_DIRECT));
const ::rtl::OUString sIndentation (::rtl::OUString::createFromAscii(" "));
@@ -74,14 +74,10 @@ void ConfigurationTracer::TraceBoundResources (
::rtl::OUString sLine (aResourceList[nIndex]->getResourceURL());
for (int i=0; i<nIndentation; ++i)
sLine = sIndentation + sLine;
- OSL_TRACE("%s\n", OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr());
+ OSL_TRACE("%s", OUStringToOString(sLine, RTL_TEXTENCODING_UTF8).getStr());
TraceBoundResources(rxConfiguration, aResourceList[nIndex], nIndentation+1);
}
-#else
- (void)rxConfiguration;
- (void)rxResourceId;
- (void)nIndentation;
-#endif
}
+#endif
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
index 8a789a051584..b04206fd65e1 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
@@ -32,7 +32,6 @@
namespace sd { namespace framework {
-
/** Print debug information about configurations to the standard error
output channel.
*/
@@ -43,13 +42,14 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration,
const char* pMessage);
-
+#ifdef DEBUG
static void TraceBoundResources (
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XConfiguration>& rxConfiguration,
const ::com::sun::star::uno::Reference<
::com::sun::star::drawing::framework::XResourceId>& rxResourceId,
const int nIndentation);
+#endif
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 5db5cb436739..4ab361a9490d 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -35,6 +35,7 @@
#include "framework/FrameworkHelper.hxx"
#include <comphelper/scopeguard.hxx>
+#include <tools/diagnose_ex.h>
#include <boost/bind.hpp>
@@ -46,7 +47,7 @@ using ::rtl::OUString;
using ::std::vector;
#undef VERBOSE
-#define VERBOSE 2
+//#define VERBOSE 2
namespace {
static const sal_Int32 snShortTimeout (100);
@@ -128,7 +129,7 @@ void ConfigurationUpdater::RequestUpdate (
if (IsUpdatePossible())
{
#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("UpdateConfiguration start\n");
+ OSL_TRACE("UpdateConfiguration start");
#endif
// Call UpdateConfiguration while that is possible and while someone
@@ -146,7 +147,7 @@ void ConfigurationUpdater::RequestUpdate (
{
mbUpdatePending = true;
#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("scheduling update for later\n");
+ OSL_TRACE("scheduling update for later");
#endif
}
}
@@ -162,14 +163,6 @@ Reference<XConfiguration> ConfigurationUpdater::GetCurrentConfiguration (void) c
-Reference<XConfiguration> ConfigurationUpdater::GetRequestedConfiguration (void) const
-{
- return mxRequestedConfiguration;
-}
-
-
-
-
bool ConfigurationUpdater::IsUpdatePossible (void)
{
return ! mbUpdateBeingProcessed
@@ -185,7 +178,7 @@ bool ConfigurationUpdater::IsUpdatePossible (void)
void ConfigurationUpdater::UpdateConfiguration (void)
{
#if defined VERBOSE && VERBOSE>=1
- OSL_TRACE("UpdateConfiguration update\n");
+ OSL_TRACE("UpdateConfiguration update");
#endif
SetUpdateBeingProcessed(true);
comphelper::ScopeGuard aScopeGuard (
@@ -200,7 +193,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
if (aClassifier.Partition())
{
#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationUpdater::UpdateConfiguration(\n");
+ OSL_TRACE("ConfigurationUpdater::UpdateConfiguration(");
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
@@ -232,7 +225,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
else
{
#if defined VERBOSE && VERBOSE>0
- OSL_TRACE("nothing to do\n");
+ OSL_TRACE("nothing to do");
#if defined VERBOSE && VERBOSE>=2
ConfigurationTracer::TraceConfiguration(
mxRequestedConfiguration, "requested configuration");
@@ -244,8 +237,7 @@ void ConfigurationUpdater::UpdateConfiguration (void)
}
catch (RuntimeException e)
{
- OSL_TRACE("caught exception while updating the current configuration");
- DBG_ASSERT(false, "caught exception while updating the current configuration");
+ DBG_UNHANDLED_EXCEPTION();
}
#if defined VERBOSE && VERBOSE>0
@@ -310,11 +302,11 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
{
#if defined VERBOSE && VERBOSE>=2
rClassifier.TraceResourceIdVector(
- "requested but not current resources:\n", rClassifier.GetC1minusC2());
+ "requested but not current resources:", rClassifier.GetC1minusC2());
rClassifier.TraceResourceIdVector(
- "current but not requested resources:\n", rClassifier.GetC2minusC1());
+ "current but not requested resources:", rClassifier.GetC2minusC1());
rClassifier.TraceResourceIdVector(
- "requested and current resources:\n", rClassifier.GetC1andC2());
+ "requested and current resources:", rClassifier.GetC1andC2());
#endif
// Updating of the sub controllers is done in two steps. In the
@@ -325,11 +317,11 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
mpResourceManager->ActivateResources(rClassifier.GetC1minusC2(), mxCurrentConfiguration);
#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("ConfigurationController::UpdateConfiguration)\n");
+ OSL_TRACE("ConfigurationController::UpdateConfiguration)");
ConfigurationTracer::TraceConfiguration(
- mxRequestedConfiguration, "requested configuration\n");
+ mxRequestedConfiguration, "requested configuration");
ConfigurationTracer::TraceConfiguration(
- mxCurrentConfiguration, "current configuration\n");
+ mxCurrentConfiguration, "current configuration");
#endif
// Deactivate pure anchors that have no child.
@@ -340,7 +332,7 @@ void ConfigurationUpdater::UpdateCore (const ConfigurationClassifier& rClassifie
}
catch(RuntimeException)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -401,7 +393,7 @@ void ConfigurationUpdater::CheckPureAnchors (
if (bDeactiveCurrentResource)
{
#if defined VERBOSE && VERBOSE>=2
- OSL_TRACE("deactiving pure anchor %s because it has no children\n",
+ OSL_TRACE("deactiving pure anchor %s because it has no children",
OUStringToOString(
FrameworkHelper::ResourceIdToString(xResourceId),
RTL_TEXTENCODING_UTF8).getStr());
@@ -458,14 +450,14 @@ void ConfigurationUpdater::SetUpdateBeingProcessed (bool bValue)
IMPL_LINK(ConfigurationUpdater, TimeoutHandler, Timer*, EMPTYARG)
{
- OSL_TRACE("configuration update timer\n");
+ OSL_TRACE("configuration update timer");
if ( ! mbUpdateBeingProcessed
&& mxCurrentConfiguration.is()
&& mxRequestedConfiguration.is())
{
if ( ! AreConfigurationsEquivalent(mxCurrentConfiguration, mxRequestedConfiguration))
{
- OSL_TRACE("configurations differ, requesting update\n");
+ OSL_TRACE("configurations differ, requesting update");
RequestUpdate(mxRequestedConfiguration);
}
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
index 87c92be5e5c4..a9f3e09f2a64 100644..100755
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
@@ -84,9 +84,6 @@ public:
css::uno::Reference<
css::drawing::framework::XConfiguration> GetCurrentConfiguration (void) const;
- css::uno::Reference<
- css::drawing::framework::XConfiguration> GetRequestedConfiguration (void) const;
-
friend class ConfigurationUpdaterLock;
/** Return a lock of the called ConfigurationUpdater. While the
returned object exists no update of the current configuration is
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx
index 32894411547a..15d7c3a6f4ec 100644..100755
--- a/sd/source/ui/framework/configuration/ResourceId.cxx
+++ b/sd/source/ui/framework/configuration/ResourceId.cxx
@@ -592,17 +592,6 @@ bool ResourceId::IsBoundToAnchor (
-bool ResourceId::IsValid (void) const
-{
- return maResourceURLs.size() == 0
- || maResourceURLs[0].getLength()>0
- || maResourceURLs.size() == 1;
-
-}
-
-
-
-
void ResourceId::ParseResourceURL (void)
{
::osl::Guard< ::osl::Mutex > aGuard (::osl::Mutex::getGlobalMutex());
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index 969844f7650d..f406501bd114 100644..100755
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -44,6 +44,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
@@ -270,7 +271,7 @@ void SAL_CALL BasicPaneFactory::initialize (const Sequence<Any>& aArguments)
Reference<XResource> SAL_CALL BasicPaneFactory::createResource (
const Reference<XResourceId>& rxPaneId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
ThrowIfDisposed();
@@ -528,8 +529,8 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
break;
case RightPaneId:
- pShell.reset(new RightPaneShell());
- nChildWindowId = ::sd::RightPaneChildWindow::GetChildWindowId();
+ pShell.reset(new ToolPanelPaneShell());
+ nChildWindowId = ::sd::ToolPanelChildWindow::GetChildWindowId();
break;
default:
@@ -551,32 +552,6 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
return xPane;
}
-
-
-
-bool BasicPaneFactory::IsBoundToChildWindow (const Reference<XResourceId>& rxResourceId) const
-{
- if ( ! rxResourceId.is())
- return false;
-
- Reference<XResourceId> xAnchorId (rxResourceId->getAnchor());
- if ( ! xAnchorId.is())
- return false;
-
- const OUString sAnchorURL (xAnchorId->getResourceURL());
- if (sAnchorURL == FrameworkHelper::msLeftImpressPaneURL)
- return true;
- else if (sAnchorURL == FrameworkHelper::msLeftDrawPaneURL)
- return true;
- else if (sAnchorURL == FrameworkHelper::msRightPaneURL)
- return true;
- else
- return false;
-}
-
-
-
-
void BasicPaneFactory::ThrowIfDisposed (void) const
throw (lang::DisposedException)
{
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.hxx b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
index 1f442656d1d9..9b41866180fc 100644..100755
--- a/sd/source/ui/framework/factories/BasicPaneFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.hxx
@@ -99,7 +99,7 @@ public:
virtual css::uno::Reference<css::drawing::framework::XResource>
SAL_CALL createResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId)
- throw (css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL
releaseResource (
@@ -159,12 +159,6 @@ private:
css::drawing::framework::XResourceId>& rxPaneId,
const PaneDescriptor& rDescriptor);
- /** Return <TRUE/> when the specified resource is bound to one of the
- child windows.
- */
- bool IsBoundToChildWindow (
- const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId) const;
-
void ThrowIfDisposed (void) const
throw (css::lang::DisposedException);
};
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
index 4645b0462399..d353cfc58c1f 100644..100755
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
@@ -38,6 +38,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
namespace sd { namespace framework {
@@ -191,7 +192,7 @@ void SAL_CALL BasicToolBarFactory::disposing (
Reference<XResource> SAL_CALL BasicToolBarFactory::createResource (
const Reference<XResourceId>& rxToolBarId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
ThrowIfDisposed();
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.hxx b/sd/source/ui/framework/factories/BasicToolBarFactory.hxx
index c305c334bf0f..686de897c179 100644..100755
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.hxx
@@ -80,7 +80,7 @@ public:
createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxToolBarId)
- throw (css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL
releaseResource (
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 4f0137ea6530..1320df5c827b 100644..100755
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -42,7 +42,7 @@
#include "DrawViewShell.hxx"
#include "GraphicViewShell.hxx"
#include "OutlineViewShell.hxx"
-#include "TaskPaneViewShell.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "PresentationViewShell.hxx"
#include "SlideSorterViewShell.hxx"
#include "FrameView.hxx"
@@ -55,6 +55,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
@@ -189,7 +190,7 @@ void SAL_CALL BasicViewFactory::disposing (void)
Reference<XResource> SAL_CALL BasicViewFactory::createResource (
const Reference<XResourceId>& rxViewId)
- throw(RuntimeException)
+ throw(RuntimeException, IllegalArgumentException, WrappedTargetException)
{
Reference<XResource> xView;
const bool bIsCenterPane (
@@ -372,7 +373,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
pDescriptor->mpViewShell,
rxViewId,
rxPane->getWindow());
- pDescriptor->mxView = Reference<XResource>(pDescriptor->mpWrapper);
+ pDescriptor->mxView.set( pDescriptor->mpWrapper->queryInterface( XResource::static_type() ), UNO_QUERY_THROW );
}
return pDescriptor;
@@ -449,7 +450,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
else if (rsViewURL.equals(FrameworkHelper::msTaskPaneURL))
{
pViewShell.reset(
- new ::sd::toolpanel::TaskPaneViewShell (
+ new ::sd::toolpanel::ToolPanelViewShell(
&rFrame,
*mpBase,
&rWindow,
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.hxx b/sd/source/ui/framework/factories/BasicViewFactory.hxx
index cc9218af26cc..e5bb43551a24 100644..100755
--- a/sd/source/ui/framework/factories/BasicViewFactory.hxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.hxx
@@ -96,7 +96,7 @@ public:
virtual css::uno::Reference<css::drawing::framework::XResource>
SAL_CALL createResource (
const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId)
- throw(css::uno::RuntimeException);
+ throw(css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL releaseResource (
const css::uno::Reference<css::drawing::framework::XResource>& xView)
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index 290c84c3ec75..5e4e6df987f0 100644..100755
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -191,7 +191,7 @@ void SAL_CALL ChildWindowPane::disposing (void)
break;
// At last, we have access to the window and its UNO wrapper.
- mpWindow = pDockingWindow->GetContentWindow();
+ mpWindow = &pDockingWindow->GetContentWindow();
mxWindow = VCLUnoHelper::GetInterface(mpWindow);
// Register as window listener to be informed when the child window
diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx
index 6ede6e439e02..6f22f1484627 100644..100755
--- a/sd/source/ui/framework/factories/PresentationFactory.cxx
+++ b/sd/source/ui/framework/factories/PresentationFactory.cxx
@@ -34,10 +34,12 @@
#include "ViewShellBase.hxx"
#include <com/sun/star/drawing/framework/XControllerManager.hpp>
#include <cppuhelper/compbase1.hxx>
+#include <tools/diagnose_ex.h>
#include "slideshow.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
@@ -154,7 +156,7 @@ PresentationFactory::PresentationFactory (
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -180,7 +182,7 @@ void SAL_CALL PresentationFactory::disposing (void)
Reference<XResource> SAL_CALL PresentationFactory::createResource (
const Reference<XResourceId>& rxViewId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
ThrowIfDisposed();
@@ -308,7 +310,7 @@ void SAL_CALL PresentationFactoryProvider::initialize(
}
catch (RuntimeException&)
{
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
index 8942833d2483..d7c45ceb803b 100644..100755
--- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
@@ -27,18 +27,19 @@
#include "precompiled_sd.hxx"
#include "TaskPanelFactory.hxx"
-#include "TaskPaneViewShell.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "DrawController.hxx"
#include "framework/FrameworkHelper.hxx"
#include <cppuhelper/compbase1.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::drawing::framework;
using ::rtl::OUString;
using ::sd::framework::FrameworkHelper;
-using ::sd::toolpanel::TaskPaneViewShell;
namespace sd { namespace framework {
@@ -85,14 +86,11 @@ class TaskPanelResource
{
public:
TaskPanelResource (
- const Reference<XResourceId>& rxResourceId,
- const TaskPaneViewShell::PanelId ePaneId);
+ const Reference<XResourceId>& rxResourceId );
virtual ~TaskPanelResource ();
virtual void SAL_CALL disposing ();
- TaskPaneViewShell::PanelId GetPaneId () const;
-
// XResource
virtual Reference<XResourceId> SAL_CALL getResourceId (void)
@@ -103,7 +101,6 @@ public:
private:
const Reference<XResourceId> mxResourceId;
- const TaskPaneViewShell::PanelId mePaneId;
};
} // end of anonymous namespace.
@@ -185,9 +182,27 @@ void SAL_CALL TaskPanelFactory::initialize(
//===== XResourceController ===================================================
+namespace
+{
+ void lcl_collectResourceURLs( const Reference< XResourceId >& i_rResourceId, ::std::vector< ::rtl::OUString >& o_rResourceURLs )
+ {
+ ENSURE_OR_RETURN_VOID( i_rResourceId.is(), "illegal resource ID" );
+ o_rResourceURLs.resize(0);
+
+ Reference< XResourceId > xResourceId( i_rResourceId );
+ ::rtl::OUString sResourceURL = xResourceId->getResourceURL();
+ while ( sResourceURL.getLength() > 0 )
+ {
+ o_rResourceURLs.push_back( sResourceURL );
+ xResourceId = xResourceId->getAnchor();
+ sResourceURL = xResourceId->getResourceURL();
+ }
+ }
+}
+
Reference<XResource> SAL_CALL TaskPanelFactory::createResource (
const Reference<XResourceId>& rxResourceId)
- throw (RuntimeException)
+ throw (RuntimeException, IllegalArgumentException, WrappedTargetException)
{
Reference<XResource> xResource;
@@ -196,45 +211,26 @@ Reference<XResource> SAL_CALL TaskPanelFactory::createResource (
OUString sResourceURL (rxResourceId->getResourceURL());
- if (sResourceURL.match(FrameworkHelper::msTaskPanelURLPrefix))
+ if ( sResourceURL.match( FrameworkHelper::msTaskPanelURLPrefix ) )
{
- TaskPaneViewShell::PanelId ePaneId (TaskPaneViewShell::PID_UNKNOWN);
+ toolpanel::PanelId ePanelId( toolpanel::GetStandardPanelId( sResourceURL ) );
- if (sResourceURL.equals(FrameworkHelper::msMasterPagesTaskPanelURL))
+ if ( ( ePanelId != toolpanel::PID_UNKNOWN ) && ( mpViewShellBase != NULL ) )
{
- ePaneId = TaskPaneViewShell::PID_MASTER_PAGES;
- }
- else if (sResourceURL.equals(FrameworkHelper::msLayoutTaskPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_LAYOUT;
- }
- else if (sResourceURL.equals(FrameworkHelper::msTableDesignPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_TABLE_DESIGN;
- }
- else if (sResourceURL.equals(FrameworkHelper::msCustomAnimationTaskPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_CUSTOM_ANIMATION;
- }
- else if (sResourceURL.equals(FrameworkHelper::msSlideTransitionTaskPanelURL))
- {
- ePaneId = TaskPaneViewShell::PID_SLIDE_TRANSITION;
- }
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( *mpViewShellBase ) );
- if (ePaneId!=TaskPaneViewShell::PID_UNKNOWN && mpViewShellBase!=NULL)
- {
- toolpanel::TaskPaneViewShell* pTaskPane
- = dynamic_cast<toolpanel::TaskPaneViewShell*>(
- FrameworkHelper::Instance(*mpViewShellBase)
- ->GetViewShell(FrameworkHelper::msRightPaneURL).get());
- if (pTaskPane != NULL)
- {
- xResource = new TaskPanelResource(
- rxResourceId,
- ePaneId);
- pTaskPane->ShowPanel(ePaneId);
- pTaskPane->ExpandPanel(ePaneId);
- }
+ // assume that the top-level anchor is the URL of the pane
+ ::std::vector< ::rtl::OUString > aResourceURLs;
+ lcl_collectResourceURLs( rxResourceId, aResourceURLs );
+
+ const ::rtl::OUString sPaneURL = aResourceURLs[ aResourceURLs.size() - 1 ];
+ const ::boost::shared_ptr< ViewShell > pPaneViewShell( pFrameworkHelper->GetViewShell( sPaneURL ) );
+
+ toolpanel::ToolPanelViewShell* pToolPanel = dynamic_cast< toolpanel::ToolPanelViewShell* >( pPaneViewShell.get() );
+ if ( pToolPanel != NULL )
+ xResource = new TaskPanelResource( rxResourceId );
+
+ OSL_POSTCOND( xResource.is(), "TaskPanelFactory::createResource: did not find the given resource!" );
}
}
@@ -248,16 +244,37 @@ void SAL_CALL TaskPanelFactory::releaseResource (
const Reference<XResource>& rxResource)
throw (RuntimeException)
{
- toolpanel::TaskPaneViewShell* pTaskPane
- = dynamic_cast<toolpanel::TaskPaneViewShell*>(
- FrameworkHelper::Instance(*mpViewShellBase)
- ->GetViewShell(FrameworkHelper::msRightPaneURL).get());
+ ENSURE_OR_RETURN_VOID( rxResource.is(), "illegal resource" );
+ const Reference< XResourceId > xResourceId( rxResource->getResourceId(), UNO_SET_THROW );
- rtl::Reference<TaskPanelResource> pResource = dynamic_cast<TaskPanelResource*>(
- rxResource.get());
+ // assume that the top-level anchor is the URL of the pane
+ ::std::vector< ::rtl::OUString > aResourceURLs;
+ lcl_collectResourceURLs( xResourceId, aResourceURLs );
- if (pTaskPane != NULL && pResource.is())
- pTaskPane->CollapsePanel(pResource->GetPaneId());
+ OSL_ENSURE( !aResourceURLs.empty(), "TaskPanelFactory::releaseResource: illegal resource/URL!" );
+ if ( !aResourceURLs.empty() )
+ {
+ const ::rtl::OUString sPaneURL = aResourceURLs[ aResourceURLs.size() - 1 ];
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( *mpViewShellBase ) );
+ const ::boost::shared_ptr< ViewShell > pPaneViewShell( pFrameworkHelper->GetViewShell( sPaneURL ) );
+ if ( pPaneViewShell != NULL )
+ {
+ const ::rtl::OUString sPanelResourceURL( xResourceId->getResourceURL() );
+ const toolpanel::PanelId ePanelId( toolpanel::GetStandardPanelId( sPanelResourceURL ) );
+ toolpanel::ToolPanelViewShell* pToolPanel = dynamic_cast< toolpanel::ToolPanelViewShell* >( pPaneViewShell.get() );
+
+ if ( ( ePanelId != toolpanel::PID_UNKNOWN )
+ && ( pToolPanel != NULL )
+ )
+ {
+ pToolPanel->DeactivatePanel( sPanelResourceURL );
+ }
+ else
+ {
+ OSL_ENSURE( false, "TaskPanelFactory::releaseResource: don't know what to do with this resource!" );
+ }
+ }
+ }
Reference<XComponent> xComponent (rxResource, UNO_QUERY);
if (xComponent.is())
@@ -267,33 +284,14 @@ void SAL_CALL TaskPanelFactory::releaseResource (
-//=============================================================================
-
-void TaskPanelFactory::ThrowIfDisposed (void) const
- throw (lang::DisposedException)
-{
- if (rBHelper.bDisposed || rBHelper.bInDispose)
- {
- throw lang::DisposedException (
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "TaskPanelFactory object has already been disposed")),
- const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
- }
-}
-
-
-
-
//===== ToolPanelResource =====================================================
namespace {
TaskPanelResource::TaskPanelResource (
- const Reference<XResourceId>& rxResourceId,
- const TaskPaneViewShell::PanelId ePaneId)
+ const Reference<XResourceId>& rxResourceId)
: TaskPanelResourceInterfaceBase(m_aMutex),
- mxResourceId(rxResourceId),
- mePaneId(ePaneId)
+ mxResourceId(rxResourceId)
{
}
@@ -314,14 +312,6 @@ void SAL_CALL TaskPanelResource::disposing ()
-TaskPaneViewShell::PanelId TaskPanelResource::GetPaneId () const
-{
- return mePaneId;
-}
-
-
-
-
Reference<XResourceId> SAL_CALL TaskPanelResource::getResourceId ()
throw (css::uno::RuntimeException)
{
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.hxx b/sd/source/ui/framework/factories/TaskPanelFactory.hxx
index 1130a106a56c..086788a6763e 100644..100755
--- a/sd/source/ui/framework/factories/TaskPanelFactory.hxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.hxx
@@ -80,7 +80,7 @@ public:
SAL_CALL createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxResourcesId)
- throw (css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL releaseResource (
const css::uno::Reference<
@@ -89,8 +89,6 @@ public:
private:
ViewShellBase* mpViewShellBase;
-
- void ThrowIfDisposed (void) const throw (css::lang::DisposedException);
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 0a3aeccade7c..a1c0bd525c9e 100644..100755
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -29,22 +29,32 @@
#include "framework/ViewShellWrapper.hxx"
#include "framework/Pane.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "ViewShell.hxx"
#include "Window.hxx"
#include <com/sun/star/drawing/framework/XPane.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
#include <rtl/uuid.h>
#include <toolkit/helper/vclunohelper.hxx>
+#include <comphelper/sequence.hxx>
+#include <cppuhelper/typeprovider.hxx>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
+using ::com::sun::star::awt::XWindow;
+using ::com::sun::star::rendering::XCanvas;
+using ::com::sun::star::lang::DisposedException;
+
using ::rtl::OUString;
+using ::sd::toolpanel::ToolPanelViewShell;
namespace sd { namespace framework {
@@ -79,6 +89,8 @@ ViewShellWrapper::~ViewShellWrapper (void)
void SAL_CALL ViewShellWrapper::disposing (void)
{
+ ::osl::MutexGuard aGuard( maMutex );
+
OSL_TRACE("disposing ViewShellWrapper %x", this);
Reference<awt::XWindow> xWindow (mxWindow);
if (xWindow.is())
@@ -101,14 +113,6 @@ void SAL_CALL ViewShellWrapper::disposing (void)
-bool ViewShellWrapper::IsUnique (void)
-{
- return m_refCount==1;
-}
-
-
-
-
//----- XResource -------------------------------------------------------------
Reference<XResourceId> SAL_CALL ViewShellWrapper::getResourceId (void)
@@ -177,7 +181,7 @@ const Sequence<sal_Int8>& ViewShellWrapper::getUnoTunnelId (void)
static Sequence<sal_Int8>* pSequence = NULL;
if (pSequence == NULL)
{
- const ::vos::OGuard aSolarGuard (Application::GetSolarMutex());
+ const ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (pSequence == NULL)
{
static ::com::sun::star::uno::Sequence<sal_Int8> aSequence (16);
diff --git a/sd/source/ui/framework/module/ImpressModule.cxx b/sd/source/ui/framework/module/ImpressModule.cxx
index 050429b3f289..a5856bc3ebc9 100644..100755
--- a/sd/source/ui/framework/module/ImpressModule.cxx
+++ b/sd/source/ui/framework/module/ImpressModule.cxx
@@ -33,7 +33,7 @@
#include "ViewTabBarModule.hxx"
#include "CenterViewFocusModule.hxx"
#include "SlideSorterModule.hxx"
-#include "TaskPaneModule.hxx"
+#include "ToolPanelModule.hxx"
#include "ToolBarModule.hxx"
#include "ShellStackGuard.hxx"
@@ -54,7 +54,7 @@ void ImpressModule::Initialize (Reference<frame::XController>& rxController)
new SlideSorterModule(
rxController,
FrameworkHelper::msLeftImpressPaneURL);
- TaskPaneModule::Initialize(rxController);
+ ToolPanelModule::Initialize(rxController);
new ToolBarModule(rxController);
new ShellStackGuard(rxController);
}
diff --git a/sd/source/ui/framework/module/ModuleController.cxx b/sd/source/ui/framework/module/ModuleController.cxx
index b90ebe851f0e..e910a8df7496 100644..100755
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -35,6 +35,8 @@
#include <boost/bind.hpp>
#include <hash_map>
+#include <tools/diagnose_ex.h>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
@@ -168,7 +170,7 @@ void ModuleController::LoadFactories (const Reference<XComponentContext>& rxCont
}
catch (Exception&)
{
- OSL_TRACE("ERROR in ModuleController::LoadFactories");
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/sd/source/ui/framework/module/PresentationModule.cxx b/sd/source/ui/framework/module/PresentationModule.cxx
index e28432a25d93..6a5ba5dc5e7f 100644..100755
--- a/sd/source/ui/framework/module/PresentationModule.cxx
+++ b/sd/source/ui/framework/module/PresentationModule.cxx
@@ -31,7 +31,6 @@
#include "CenterViewFocusModule.hxx"
#include "SlideSorterModule.hxx"
-#include "TaskPaneModule.hxx"
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
index cf9b095072b1..090247e7f68c 100644..100755
--- a/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
+++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.cxx
@@ -145,17 +145,6 @@ void ReadOnlyModeObserver::AddStatusListener (
-void ReadOnlyModeObserver::RemoveStatusListener (
- const Reference<frame::XStatusListener>& rxListener)
-{
- mpBroadcaster->removeListener(
- getCppuType((Reference<frame::XStatusListener>*)NULL),
- rxListener);
-}
-
-
-
-
bool ReadOnlyModeObserver::ConnectToDispatch (void)
{
if ( ! mxDispatch.is())
diff --git a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
index f01649bdf8bd..d783d6d83abf 100644..100755
--- a/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
+++ b/sd/source/ui/framework/module/ReadOnlyModeObserver.hxx
@@ -91,12 +91,6 @@ public:
const ::com::sun::star::uno::Reference<
com::sun::star::frame::XStatusListener>& rxListener);
- /** Remove the given listener.
- */
- void RemoveStatusListener (
- const ::com::sun::star::uno::Reference<
- com::sun::star::frame::XStatusListener>& rxListener);
-
// XEventListener
virtual void SAL_CALL disposing (
diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx
index 8f79ed41f24b..fcd90ca6454b 100644..100755
--- a/sd/source/ui/framework/module/ResourceManager.cxx
+++ b/sd/source/ui/framework/module/ResourceManager.cxx
@@ -291,25 +291,4 @@ void SAL_CALL ResourceManager::disposing (
}
}
-
-
-
-void ResourceManager::Trace (void) const
-{
- OSL_TRACE("main views with resource %s:",
- ::rtl::OUStringToOString(
- FrameworkHelper::ResourceIdToString(mxResourceId), RTL_TEXTENCODING_UTF8).getStr());
-
- MainViewContainer::const_iterator iDescriptor;
- for (iDescriptor=mpActiveMainViewContainer->begin();
- iDescriptor!=mpActiveMainViewContainer->end();
- ++iDescriptor)
- {
- OSL_TRACE(" %s",
- ::rtl::OUStringToOString(*iDescriptor, RTL_TEXTENCODING_UTF8).getStr());
- }
-}
-
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx
index 23cb1ed7dd48..d00ee78c2de3 100644..100755
--- a/sd/source/ui/framework/module/ResourceManager.hxx
+++ b/sd/source/ui/framework/module/ResourceManager.hxx
@@ -126,8 +126,6 @@ private:
const ::com::sun::star::uno::Reference<
com::sun::star::drawing::framework::XConfiguration>& rxConfiguration);
void UpdateForMainViewShell (void);
-
- void Trace (void) const;
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/TaskPaneModule.cxx b/sd/source/ui/framework/module/ToolPanelModule.cxx
index 03e2277bdcd3..888fa68ad708 100644
--- a/sd/source/ui/framework/module/TaskPaneModule.cxx
+++ b/sd/source/ui/framework/module/ToolPanelModule.cxx
@@ -2,10 +2,13 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
+ * $RCSfile: ToolPanelModule.cxx,v $
+ * $Revision: 1.4 $
+ *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -27,7 +30,7 @@
#include "precompiled_sd.hxx"
-#include "TaskPaneModule.hxx"
+#include "ToolPanelModule.hxx"
#include "ReadOnlyModeObserver.hxx"
#include "framework/FrameworkHelper.hxx"
@@ -54,7 +57,7 @@ typedef ::cppu::WeakComponentImplHelper1 <
> LocalReadOnlyModeObserverInterfaceBase;
/** This local class enables or disables the ResourceManager of a
- TaskPaneModule. It connects to a ReadOnlyModeObserver and is called
+ ToolPanelModule. It connects to a ReadOnlyModeObserver and is called
when the state of the .uno:EditDoc command changes. When either the
ResourceManager or the ReadOnlyModeObserver are disposed then the
LocalReadOnlyModeObserver disposes itself. The link
@@ -138,9 +141,9 @@ private:
-//===== TaskPaneModule ====================================================
+//===== ToolPanelModule ====================================================
-void TaskPaneModule::Initialize (const Reference<frame::XController>& rxController)
+void ToolPanelModule::Initialize (const Reference<frame::XController>& rxController)
{
::rtl::Reference<ResourceManager> pResourceManager (
new ResourceManager(
diff --git a/sd/source/ui/framework/module/TaskPaneModule.hxx b/sd/source/ui/framework/module/ToolPanelModule.hxx
index 3495e4c93a73..7d728e60e93d 100644
--- a/sd/source/ui/framework/module/TaskPaneModule.hxx
+++ b/sd/source/ui/framework/module/ToolPanelModule.hxx
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -23,10 +22,10 @@
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
- ************************************************************************/
+************************************************************************/
-#ifndef SD_FRAMEWORK_TASK_PANE_MODULE_HXX
-#define SD_FRAMEWORK_TASK_PANE_MODULE_HXX
+#ifndef SD_FRAMEWORK_TOOL_PANEL_MODULE_HXX
+#define SD_FRAMEWORK_TOOL_PANEL_MODULE_HXX
#include "ResourceManager.hxx"
@@ -38,7 +37,7 @@ class ReadOnlyModeObserver;
/** This module is responsible for showing the task pane.
*/
-class TaskPaneModule
+class ToolPanelModule
{
public:
static void Initialize (
diff --git a/sd/source/ui/framework/module/makefile.mk b/sd/source/ui/framework/module/makefile.mk
index 56c864a7df53..bec9b1a04075 100644..100755
--- a/sd/source/ui/framework/module/makefile.mk
+++ b/sd/source/ui/framework/module/makefile.mk
@@ -52,7 +52,7 @@ SLOFILES = \
$(SLO)$/ResourceManager.obj \
$(SLO)$/ShellStackGuard.obj \
$(SLO)$/SlideSorterModule.obj \
- $(SLO)$/TaskPaneModule.obj \
+ $(SLO)$/ToolPanelModule.obj \
$(SLO)$/ToolBarModule.obj \
$(SLO)$/ViewTabBarModule.obj
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 25790e736473..078f86a88d86 100644..100755
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -52,6 +52,7 @@
#include "vcl/svapp.hxx"
#include <osl/doublecheckedlocking.h>
#include <osl/getglobalmutex.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -218,7 +219,7 @@ const OUString FrameworkHelper::msViewTabBarURL(
// Task panel URLs.
const ::rtl::OUString FrameworkHelper::msTaskPanelURLPrefix(
- OUString::createFromAscii("private:resource/taskpanel/"));
+ OUString::createFromAscii("private:resource/toolpanel/DrawingFramework/"));
const ::rtl::OUString FrameworkHelper::msMasterPagesTaskPanelURL(
msTaskPanelURLPrefix + OUString::createFromAscii("MasterPages"));
const ::rtl::OUString FrameworkHelper::msLayoutTaskPanelURL(
@@ -252,6 +253,46 @@ const OUString FrameworkHelper::msModuleControllerService(
const OUString FrameworkHelper::msConfigurationControllerService(
OUString::createFromAscii("com.sun.star.drawing.framework.ConfigurationController"));
+//----- helper ----------------------------------------------------------------
+namespace
+{
+ static ::boost::shared_ptr< ViewShell > lcl_getViewShell( const Reference< XResource >& i_rViewShellWrapper )
+ {
+ ::boost::shared_ptr< ViewShell > pViewShell;
+ if ( !i_rViewShellWrapper.is() )
+ return pViewShell;
+
+ try
+ {
+ Reference<lang::XUnoTunnel> xViewTunnel( i_rViewShellWrapper, UNO_QUERY_THROW );
+ pViewShell = reinterpret_cast< ViewShellWrapper* >(
+ xViewTunnel->getSomething( ViewShellWrapper::getUnoTunnelId() ) )->GetViewShell();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return pViewShell;
+ }
+ Reference< XResource > lcl_getFirstViewInPane( const Reference< XConfigurationController >& i_rConfigController,
+ const Reference< XResourceId >& i_rPaneId )
+ {
+ try
+ {
+ Reference< XConfiguration > xConfiguration( i_rConfigController->getRequestedConfiguration(), UNO_SET_THROW );
+ Sequence< Reference< XResourceId > > aViewIds( xConfiguration->getResources(
+ i_rPaneId, FrameworkHelper::msViewURLPrefix, AnchorBindingMode_DIRECT ) );
+ if ( aViewIds.getLength() > 0 )
+ return i_rConfigController->getResource( aViewIds[0] );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
+}
+
//----- FrameworkHelper::ViewURLMap -------------------------------------------
@@ -438,8 +479,11 @@ bool FrameworkHelper::IsValid (void)
::boost::shared_ptr<ViewShell> FrameworkHelper::GetViewShell (const OUString& rsPaneURL)
{
- Reference<XResourceId> xPaneId (CreateResourceId(rsPaneURL));
- return GetViewShell(GetView(xPaneId));
+ if ( !mxConfigurationController.is() )
+ return ::boost::shared_ptr<ViewShell>();
+
+ Reference<XResourceId> xPaneId( CreateResourceId( rsPaneURL ) );
+ return lcl_getViewShell( lcl_getFirstViewInPane( mxConfigurationController, xPaneId ) );
}
@@ -447,22 +491,7 @@ bool FrameworkHelper::IsValid (void)
::boost::shared_ptr<ViewShell> FrameworkHelper::GetViewShell (const Reference<XView>& rxView)
{
- ::boost::shared_ptr<ViewShell> pViewShell;
-
- try
- {
- Reference<lang::XUnoTunnel> xViewTunnel (rxView, UNO_QUERY);
- if (xViewTunnel.is())
- {
- pViewShell = reinterpret_cast<ViewShellWrapper*>(xViewTunnel->getSomething(
- ViewShellWrapper::getUnoTunnelId()))->GetViewShell();
- }
- }
- catch (RuntimeException&)
- {
- }
-
- return pViewShell;
+ return lcl_getViewShell( rxView.get() );
}
@@ -479,21 +508,11 @@ Reference<XView> FrameworkHelper::GetView (const Reference<XResourceId>& rxPaneO
{
if (rxPaneOrViewId->getResourceURL().match(msViewURLPrefix))
{
- xView = Reference<XView>(
- mxConfigurationController->getResource(rxPaneOrViewId), UNO_QUERY);
+ xView.set( mxConfigurationController->getResource( rxPaneOrViewId ), UNO_QUERY );
}
else
{
- Reference<XConfiguration> xConfiguration (
- mxConfigurationController->getRequestedConfiguration());
- if (xConfiguration.is())
- {
- Sequence<Reference<XResourceId> > aViewIds (xConfiguration->getResources(
- rxPaneOrViewId, msViewURLPrefix, AnchorBindingMode_DIRECT));
- if (aViewIds.getLength() >= 1)
- xView = Reference<XView>(
- mxConfigurationController->getResource(aViewIds[0]), UNO_QUERY);
- }
+ xView.set( lcl_getFirstViewInPane( mxConfigurationController, rxPaneOrViewId ), UNO_QUERY );
}
}
catch (lang::DisposedException&)
@@ -501,7 +520,8 @@ Reference<XView> FrameworkHelper::GetView (const Reference<XResourceId>& rxPaneO
Dispose();
}
catch (RuntimeException&)
- {}
+ {
+ }
return xView;
}
@@ -717,7 +737,7 @@ void FrameworkHelper::HandleModeChangeSlot (
}
catch (RuntimeException&)
{
- OSL_TRACE("HandleModeChangeSlot: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -800,7 +820,7 @@ void FrameworkHelper::WaitForEvent (const OUString& rsEventType) const
if( (osl_getGlobalTimer() - nStartTime) > 60000 )
{
- DBG_ERROR("FrameworkHelper::WaitForEvent(), no event since a minute? giving up!");
+ DBG_ERROR("FrameworkHelper::WaitForEvent(), no event for a minute? giving up!");
break;
}
}
@@ -852,7 +872,7 @@ void FrameworkHelper::UpdateConfiguration (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false, "FrameworkHelper::UpdateConfiguration: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
}
@@ -982,28 +1002,6 @@ void SAL_CALL FrameworkHelper::DisposeListener::disposing (const lang::EventObje
-//----- DispatchCaller --------------------------------------------------------
-
-DispatchCaller::DispatchCaller (
- SfxDispatcher& rDispatcher,
- USHORT nSId)
- : mrDispatcher(rDispatcher),
- mnSId(nSId)
-{
-}
-
-
-
-
-void DispatchCaller::operator() (bool bEventSeen)
-{
- (void)bEventSeen;
- mrDispatcher.Execute(mnSId, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
-}
-
-
-
-
//===== FrameworkHelperResourceIdFilter =======================================
FrameworkHelperResourceIdFilter::FrameworkHelperResourceIdFilter (
@@ -1053,7 +1051,7 @@ CallbackCaller::CallbackCaller (
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,"ConfigurationUpdateGuard: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -1080,7 +1078,7 @@ void CallbackCaller::disposing (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,"~ConfigurationUpdateGuard: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 26119b6a03b9..c0d8235e97fb 100644..100755
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -72,13 +72,6 @@ FuConstruct::FuConstruct (
{
}
-FunctionReference FuConstruct::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuConstruct( pViewSh, pWin, pView, pDoc, rReq ) );
- xFunc->DoExecute(rReq);
- return xFunc;
-}
-
void FuConstruct::DoExecute( SfxRequest& rReq )
{
FuDraw::DoExecute( rReq );
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index bbe13c114931..5cc3cc49ca88 100644..100755
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -99,14 +99,6 @@ FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
{
}
-FunctionReference FuDraw::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent )
-{
- FuDraw* pFunc;
- FunctionReference xFunc( pFunc = new FuDraw( pViewSh, pWin, pView, pDoc, rReq ) );
- pFunc->SetPermanent(bPermanent);
- return xFunc;
-}
-
/*************************************************************************
|*
|* Destruktor
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 931ff3a10cb8..2db29c725718 100644..100755
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -93,6 +93,7 @@
#include "sdgrffilter.hxx"
#include "sdxfer.hxx"
#include <vcl/svapp.hxx>
+#include "undo/undoobjects.hxx"
using namespace com::sun::star;
@@ -143,34 +144,15 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
if( mpViewShell && mpViewShell->ISA(DrawViewShell))
{
sal_Int8 nAction = DND_ACTION_COPY;
- SdrGrafObj* pEmptyGrafObj = NULL;
-
- if ( mpView->AreObjectsMarked() )
- {
- /**********************************************************
- * Is an empty graphic object available?
- **********************************************************/
- const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
-
- if (rMarkList.GetMarkCount() == 1)
- {
- SdrMark* pMark = rMarkList.GetMark(0);
- SdrObject* pObj = pMark->GetMarkedSdrObj();
-
- if (pObj->GetObjInventor() == SdrInventor &&
- pObj->GetObjIdentifier() == OBJ_GRAF)
- {
- nAction = DND_ACTION_LINK;
- pEmptyGrafObj = (SdrGrafObj*) pObj;
- }
- }
- }
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_GRAPHIC );
+ if( pPickObj )
+ nAction = DND_ACTION_LINK;
Point aPos;
Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() );
aPos = aRect.Center();
aPos = mpWindow->PixelToLogic(aPos);
- SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pEmptyGrafObj, NULL);
+ SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, NULL);
if(pGrafObj && aDlg.IsAsLink())
{
@@ -299,6 +281,10 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
nSlotId == SID_INSERT_DIAGRAM ||
nSlotId == SID_INSERT_MATH )
{
+ PresObjKind ePresObjKind = (nSlotId == SID_INSERT_DIAGRAM) ? PRESOBJ_CHART : PRESOBJ_OBJECT;
+
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( ePresObjKind );
+
/**********************************************************************
* Diagramm oder StarCalc-Tabelle einfuegen
**********************************************************************/
@@ -317,42 +303,78 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
if ( xObj.is() )
{
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
- awt::Size aSz;
- try
+
+ MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
+
+ Rectangle aRect;
+ if( pPickObj )
{
- aSz = xObj->getVisualAreaSize( nAspect );
+ aRect = pPickObj->GetLogicRect();
+
+ awt::Size aSz;
+ aSz.Width = aRect.GetWidth();
+ aSz.Height = aRect.GetHeight();
+ xObj->setVisualAreaSize( nAspect, aSz );
}
- catch ( embed::NoVisualAreaSizeException& )
+ else
{
- // the default size will be set later
+ awt::Size aSz;
+ try
+ {
+ aSz = xObj->getVisualAreaSize( nAspect );
+ }
+ catch ( embed::NoVisualAreaSizeException& )
+ {
+ // the default size will be set later
+ }
+
+ Size aSize( aSz.Width, aSz.Height );
+
+ if (aSize.Height() == 0 || aSize.Width() == 0)
+ {
+ // Rechteck mit ausgewogenem Kantenverhaeltnis
+ aSize.Width() = 14100;
+ aSize.Height() = 10000;
+ Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
+ aSz.Width = aTmp.Width();
+ aSz.Height = aTmp.Height();
+ xObj->setVisualAreaSize( nAspect, aSz );
+ }
+ else
+ {
+ aSize = OutputDevice::LogicToLogic(aSize, aUnit, MAP_100TH_MM);
+ }
+
+ Point aPos;
+ Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() );
+ aPos = aWinRect.Center();
+ aPos = mpWindow->PixelToLogic(aPos);
+ aPos.X() -= aSize.Width() / 2;
+ aPos.Y() -= aSize.Height() / 2;
+ aRect = Rectangle(aPos, aSize);
}
- Size aSize( aSz.Width, aSz.Height );
+ SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
+ SdrPageView* pPV = mpView->GetSdrPageView();
- MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( nAspect ) );
- if (aSize.Height() == 0 || aSize.Width() == 0)
+ // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
+ if( pPickObj )
{
- // Rechteck mit ausgewogenem Kantenverhaeltnis
- aSize.Width() = 14100;
- aSize.Height() = 10000;
- Size aTmp = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit );
- aSz.Width = aTmp.Width();
- aSz.Height = aTmp.Height();
- xObj->setVisualAreaSize( nAspect, aSz );
+ SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
+ if(pPage && pPage->IsPresObj(pPickObj))
+ {
+ pPage->InsertPresObj( pOleObj, ePresObjKind );
+ pOleObj->SetUserCall(pPickObj->GetUserCall());
+ }
}
+
+ bool bRet = true;
+ if( pPickObj )
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pOleObj, TRUE );
else
- aSize = OutputDevice::LogicToLogic(aSize, aUnit, MAP_100TH_MM);
-
- Point aPos;
- Rectangle aWinRect(aPos, mpWindow->GetOutputSizePixel() );
- aPos = aWinRect.Center();
- aPos = mpWindow->PixelToLogic(aPos);
- aPos.X() -= aSize.Width() / 2;
- aPos.Y() -= aSize.Height() / 2;
- Rectangle aRect (aPos, aSize);
- SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aObjName, aRect );
- SdrPageView* pPV = mpView->GetSdrPageView();
- if( mpView->InsertObjectAtView(pOleObj, *pPV, SDRINSERT_SETDEFLAYER) )
+ bRet = mpView->InsertObjectAtView(pOleObj, *pPV, SDRINSERT_SETDEFLAYER);
+
+ if( bRet )
{
if (nSlotId == SID_INSERT_DIAGRAM)
{
@@ -369,10 +391,11 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
//HMHmpView->HideMarkHdl();
pOleObj->SetLogicRect(aRect);
- Size aTmp = OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aUnit );
- aSz.Width = aTmp.Width();
- aSz.Height = aTmp.Height();
- xObj->setVisualAreaSize( nAspect, aSz );
+ Size aTmp( OutputDevice::LogicToLogic( aRect.GetSize(), MAP_100TH_MM, aUnit ) );
+ awt::Size aVisualSize;
+ aVisualSize.Width = aTmp.Width();
+ aVisualSize.Height = aTmp.Height();
+ xObj->setVisualAreaSize( nAspect, aVisualSize );
mpViewShell->ActivateObject(pOleObj, SVVERB_SHOW);
if (nSlotId == SID_INSERT_DIAGRAM)
diff --git a/sd/source/ui/func/fuoutl.cxx b/sd/source/ui/func/fuoutl.cxx
index 2bb056f55e42..c0ef53f144b3 100644..100755
--- a/sd/source/ui/func/fuoutl.cxx
+++ b/sd/source/ui/func/fuoutl.cxx
@@ -60,12 +60,6 @@ FuOutline::FuOutline (
{
}
-FunctionReference FuOutline::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuOutline( pViewSh, pWin, pView, pDoc, rReq ) );
- return xFunc;
-}
-
/*************************************************************************
|*
|* Command, weiterleiten an OutlinerView
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index c1df44e52677..0342c5f2bbc5 100644..100755
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -247,16 +247,6 @@ IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
/*************************************************************************
|*
-|* String in Applikations-Statuszeile ausgeben
-|*
-\************************************************************************/
-
-void FuPoor::WriteStatus(const String& )
-{
-}
-
-/*************************************************************************
-|*
|* Tastaturereignisse bearbeiten
|*
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
@@ -1121,18 +1111,6 @@ void FuPoor::StartDelayToScrollTimer ()
/*************************************************************************
|*
-|* Handler fuer Maustaste
-|*
-\************************************************************************/
-
-long FuPoor::diffPoint (long pos1, long pos2)
-{
- return (pos1 > pos2) ? pos1 - pos2
- : pos2 - pos1;
-}
-
-/*************************************************************************
-|*
|* Help-event
|*
\************************************************************************/
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index 82007fe61893..04fcf124cc14 100644..100755
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -38,7 +38,6 @@
#include <svx/srchdlg.hxx>
#include <sfx2/bindings.hxx>
#include "fupoor.hxx"
-#include "fuspell.hxx" // wegen SidArraySpell[]
#ifndef SD_WINDOW_SHELL_HXX
#include "Window.hxx"
#endif
@@ -55,6 +54,14 @@ class SfxRequest;
namespace sd {
+static USHORT SidArraySpell[] = {
+ SID_DRAWINGMODE,
+ SID_OUTLINEMODE,
+ SID_DIAMODE,
+ SID_NOTESMODE,
+ SID_HANDOUTMODE,
+ 0 };
+
TYPEINIT1( FuSearch, FuPoor );
/*************************************************************************
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index ab686481b402..fad1cb324fd2 100644..100755
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -123,6 +123,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
{
OSL_ASSERT(pPV!=NULL);
aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
+ pPV->LogicToPagePos(aLinePos);
bLineExist = true;
}
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
diff --git a/sd/source/ui/func/fuspell.cxx b/sd/source/ui/func/fuspell.cxx
deleted file mode 100644
index 526efb0087e4..000000000000
--- a/sd/source/ui/func/fuspell.cxx
+++ /dev/null
@@ -1,166 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-
-#include "fuspell.hxx"
-
-#include <editeng/outliner.hxx>
-#include <sfx2/bindings.hxx>
-
-#include <sfx2/viewfrm.hxx>
-#include "fupoor.hxx"
-#include "Outliner.hxx"
-#include "drawdoc.hxx"
-#include "DrawViewShell.hxx"
-#include "OutlineViewShell.hxx"
-#include "ViewShellBase.hxx"
-
-#include "app.hrc"
-
-class SfxRequest;
-
-namespace sd {
-
-USHORT SidArraySpell[] = {
- SID_DRAWINGMODE,
- SID_OUTLINEMODE,
- SID_DIAMODE,
- SID_NOTESMODE,
- SID_HANDOUTMODE,
- 0 };
-
-TYPEINIT1( FuSpell, FuPoor );
-
-/*************************************************************************
-|*
-|* Konstruktor
-|*
-\************************************************************************/
-
-FuSpell::FuSpell (
- ViewShell* pViewSh,
- ::sd::Window* pWin,
- ::sd::View* pView,
- SdDrawDocument* pDoc,
- SfxRequest& rReq )
- : FuPoor(pViewSh, pWin, pView, pDoc, rReq),
- pSdOutliner(NULL),
- bOwnOutliner(FALSE)
-{
-}
-
-FunctionReference FuSpell::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
-{
- FunctionReference xFunc( new FuSpell( pViewSh, pWin, pView, pDoc, rReq ) );
- xFunc->DoExecute(rReq);
- return xFunc;
-}
-
-void FuSpell::DoExecute( SfxRequest& )
-{
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
-
- if ( mpViewShell->ISA(DrawViewShell) )
- {
- bOwnOutliner = TRUE;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
- }
- else if ( mpViewShell->ISA(OutlineViewShell) )
- {
- bOwnOutliner = FALSE;
- pSdOutliner = mpDoc->GetOutliner();
- }
-
- if (pSdOutliner)
- pSdOutliner->PrepareSpelling();
-}
-
-
-
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
-
-FuSpell::~FuSpell()
-{
- mpDocSh->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
-
- if (pSdOutliner)
- pSdOutliner->EndSpelling();
-
- if (bOwnOutliner)
- delete pSdOutliner;
-}
-
-/*************************************************************************
-|*
-|* Pruefung starten
-|*
-\************************************************************************/
-
-void FuSpell::StartSpelling()
-{
- // Get current main view shell.
- ViewShellBase* pBase (ViewShellBase::GetViewShellBase (
- mpDocSh->GetViewShell()->GetViewFrame()));
- if (pBase != NULL)
- mpViewShell = pBase->GetMainViewShell().get();
- else
- mpViewShell = NULL;
- if (mpViewShell != NULL)
- {
- if ( pSdOutliner && mpViewShell->ISA(DrawViewShell) && !bOwnOutliner )
- {
- pSdOutliner->EndSpelling();
-
- bOwnOutliner = TRUE;
- pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
- pSdOutliner->PrepareSpelling();
- }
- else if ( pSdOutliner && mpViewShell->ISA(OutlineViewShell) && bOwnOutliner )
- {
- pSdOutliner->EndSpelling();
- delete pSdOutliner;
-
- bOwnOutliner = FALSE;
- pSdOutliner = mpDoc->GetOutliner();
- pSdOutliner->PrepareSpelling();
- }
-
- if (pSdOutliner)
- pSdOutliner->StartSpelling();
- }
-}
-
-
-
-} // end of namespace sd
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index f62b1b087aee..31797f3c8a03 100644..100755
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -136,29 +136,4 @@ void FuTransform::DoExecute( SfxRequest& rReq )
}
}
-/*************************************************************************
-|*
-|* Function ResizeObject
-|*
-\************************************************************************/
-
-Point FuTransform::GetPoint( Rectangle aRect, RECT_POINT eRP )
-{
-
- switch( eRP )
- {
- case RP_LT: return( Point( aRect.Left(), aRect.Top() ) );
- case RP_MT: return( Point( aRect.Center().X(), aRect.Top() ) );
- case RP_RT: return( Point( aRect.Right(), aRect.Top() ) );
- case RP_LM: return( Point( aRect.Left(), aRect.Center().Y() ) );
- case RP_MM: return( Point( aRect.Center().X(), aRect.Center().Y() ) );
- case RP_RM: return( Point( aRect.Right(), aRect.Center().Y() ) );
- case RP_LB: return( Point( aRect.Left(), aRect.Bottom() ) );
- case RP_MB: return( Point( aRect.Center().X(), aRect.Bottom() ) );
- case RP_RB: return( Point( aRect.Right(), aRect.Bottom() ) );
- }
- return( Point ( 0, 0 ) ); // Sollte nicht vorkommen !
-}
-
-
} // end of namespace sd
diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk
index 9ec946325239..e4df8fe9d65a 100644..100755
--- a/sd/source/ui/func/makefile.mk
+++ b/sd/source/ui/func/makefile.mk
@@ -84,7 +84,6 @@ SLOFILES = \
$(SLO)$/fuolbull.obj \
$(SLO)$/fucopy.obj \
$(SLO)$/fulink.obj \
- $(SLO)$/fuspell.obj \
$(SLO)$/futhes.obj \
$(SLO)$/fusearch.obj \
$(SLO)$/fuinsfil.obj \
@@ -98,7 +97,6 @@ SLOFILES = \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
- $(SLO)$/outlinfo.obj \
$(SLO)$/fucushow.obj \
$(SLO)$/fuvect.obj \
$(SLO)$/bulmaper.obj \
@@ -159,7 +157,6 @@ LIB3OBJFILES= \
$(SLO)$/fuolbull.obj \
$(SLO)$/fucopy.obj \
$(SLO)$/fulink.obj \
- $(SLO)$/fuspell.obj \
$(SLO)$/futhes.obj \
$(SLO)$/fusearch.obj \
$(SLO)$/fuinsfil.obj \
@@ -173,7 +170,6 @@ LIB3OBJFILES= \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
- $(SLO)$/outlinfo.obj \
$(SLO)$/fucushow.obj \
$(SLO)$/fuvect.obj \
$(SLO)$/bulmaper.obj \
diff --git a/sd/source/ui/func/outlinfo.cxx b/sd/source/ui/func/outlinfo.cxx
deleted file mode 100644
index 0a52da329b20..000000000000
--- a/sd/source/ui/func/outlinfo.cxx
+++ /dev/null
@@ -1,301 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include <vcl/metric.hxx>
-#include <editeng/outliner.hxx>
-#include <svx/svdorect.hxx>
-#include <svx/svdoutl.hxx>
-#include <editeng/svxfont.hxx>
-#include "drawdoc.hxx"
-#include "outlinfo.hxx"
-#include <algorithm>
-
-// #101500#
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#ifndef _COM_SUN_STAR_I18N_SCRIPTTYPE_HDL_
-#include <com/sun/star/i18n/ScriptType.hdl>
-#endif
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <comphelper/processfactory.hxx>
-
-#ifndef _COM_SUN_STAR_I18N_CHARACTERITERATORMODE_HDL_
-#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
-#endif
-#include <editeng/unolingu.hxx>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::i18n;
-
-// ----------------
-// - OutlinerInfo -
-// ----------------
-
-OutlinerInfo::OutlinerInfo() :
- pParagraphs ( NULL ),
- nParaCount ( 0UL ),
- nExtraData ( 0L )
-{
-}
-
-// -----------------------------------------------------------------------------
-
-OutlinerInfo::~OutlinerInfo()
-{
- Clear();
-}
-
-// -----------------------------------------------------------------------------
-
-void OutlinerInfo::SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* pOut )
-{
- Clear();
-
- SdrOutliner& rOutliner = pDoc->GetDrawOutliner();
-
- mpOut = pOut;
- rOutliner.SetText( *pObj->GetOutlinerParaObject() );
-
- aObjBound = pObj->GetCurrentBoundRect();
- nParaCount = rOutliner.GetParagraphCount();
- nExtraData = 0L;
-
- if( nParaCount )
- {
- mbVertical = rOutliner.IsVertical();
- pObj->TakeTextRect( rOutliner, aParaBound, TRUE );
-
- if( IsVertical() )
- aTextOffset = aParaBound.TopRight();
- else
- aTextOffset = aParaBound.TopLeft();
-
- nCurPara = 0;
- bInit = TRUE;
-
- rOutliner.SetDrawPortionHdl( LINK( this, OutlinerInfo, DrawPortionHdl ) );
- pParagraphs = new OutlinerParagraph[ nParaCount ];
- rOutliner.StripPortions();
- rOutliner.SetDrawPortionHdl( Link() );
-
- if( 1 == nParaCount )
- pParagraphs[ 0 ].aRect = aParaBound;
- else if( IsVertical() )
- {
- pParagraphs[ 0 ].aRect.Right() = aParaBound.Right();
-
- for( USHORT i = 0; i < nParaCount; i++ )
- {
- if( i > 0 )
- pParagraphs[i].aRect.Right() = pParagraphs[ i - 1 ].aRect.Left();
-
- pParagraphs[i].aRect.Left() = pParagraphs[i].aRect.Right() - rOutliner.GetTextHeight( i );
- }
- }
- else
- {
- pParagraphs[ 0 ].aRect.Top() = aParaBound.Top();
-
- for( USHORT i = 0; i < nParaCount; i++ )
- {
- if( i > 0 )
- pParagraphs[ i ].aRect.Top() = pParagraphs[ i - 1 ].aRect.Bottom();
-
- pParagraphs[ i ].aRect.Bottom() = pParagraphs[ i ].aRect.Top() + rOutliner.GetTextHeight( i );
- }
- }
- }
- else
- {
- pParagraphs = NULL;
- aParaBound = Rectangle();
- aTextOffset = Point();
- }
-
- nCurPara = 0;
- bInit = FALSE;
-}
-
-// -----------------------------------------------------------------------------
-
-void OutlinerInfo::Clear()
-{
- for( void* pChar = aCharacterList.First(); pChar; pChar = aCharacterList.Next() )
- delete (OutlinerCharacter*) pChar;
- aCharacterList.Clear();
-
- delete[] pParagraphs;
- pParagraphs = NULL;
-
- nCurPara = nParaCount = 0UL;
- aObjBound = aParaBound = Rectangle();
- aTextOffset = Point();
-}
-
-// -----------------------------------------------------------------------------
-
-const Rectangle& OutlinerInfo::GetParaRect( const ULONG nPara ) const
-{
- DBG_ASSERT( nPara < nParaCount, "Para out of range!" );
- return pParagraphs[ nPara ].aRect;
-}
-
-// -----------------------------------------------------------------------------
-
-BOOL OutlinerInfo::GetParaCharCount( const ULONG nPara ) const
-{
- DBG_ASSERT( nPara < nParaCount, "Para out of range!" );
- return (0 != pParagraphs[ nPara ].nCharCount);
-}
-
-// -----------------------------------------------------------------------------
-
-IMPL_LINK(OutlinerInfo, DrawPortionHdl, DrawPortionInfo*, pInfo)
-{
- // #101500#
- Point aStart;
- sal_Bool bIsVertical(IsVertical());
- mpOut->SetFont((const Font&)pInfo->mrFont);
- FontMetric aFontMetric(mpOut->GetFontMetric());
- sal_Bool bUseBreakIterator(sal_False);
-
- // initialize BreakIterator
- Reference < com::sun::star::i18n::XBreakIterator > xBreak;
- Reference < XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.i18n.BreakIterator"));
- ::com::sun::star::lang::Locale aFontLocale = SvxCreateLocale(pInfo->mrFont.GetLanguage());
-
- if(xInterface.is())
- {
- Any x = xInterface->queryInterface(::getCppuType((const Reference< XBreakIterator >*)0));
- x >>= xBreak;
- }
-
- if(xBreak.is())
- {
- bUseBreakIterator = sal_True;
- }
-
- if(bIsVertical)
- {
- aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X() - aFontMetric.GetDescent();
- aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y();
-
- const Point aTopLeft(aStart.X(), aParaBound.Top());
- const Point aBottomRight(aStart.X() + aFontMetric.GetLineHeight(), aParaBound.Bottom());
- const Rectangle aCurRect(aTopLeft, aBottomRight);
-
- if(pInfo->mnPara != nCurPara)
- {
- nCurPara = pInfo->mnPara;
- pParagraphs[nCurPara].aRect = aCurRect;
- }
- else
- {
- pParagraphs[nCurPara].aRect.Union(aCurRect);
- }
- }
- else
- {
- aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X();
- aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y() - aFontMetric.GetAscent();
-
- const Point aTopLeft(aParaBound.Left(), aStart.Y());
- const Point aBottomRight(aParaBound.Right(), aStart.Y() + aFontMetric.GetLineHeight());
- const Rectangle aCurRect(aTopLeft, aBottomRight);
-
- if(pInfo->mnPara != nCurPara)
- {
- nCurPara = pInfo->mnPara;
- pParagraphs[nCurPara].aRect = aCurRect;
- }
- else
- {
- pParagraphs[nCurPara].aRect.Union(aCurRect);
- }
- }
-
- if(pInfo->mnTextLen && (0xFFFF != pInfo->mnIndex))
- {
- pParagraphs[nCurPara].nCharCount += pInfo->mnTextLen;
- sal_uInt16 nInsertIndex(0xffff);
-
- if(pInfo->IsRTL())
- nInsertIndex = (sal_uInt16)aCharacterList.Count();
-
- for(sal_uInt16 nCharIndex(0); nCharIndex < pInfo->mnTextLen; )
- {
- xub_StrLen nNextGlyphLen(1);
- sal_Bool bIsSingleSpace(sal_False);
-
- if(bUseBreakIterator)
- {
- sal_Int32 nDone(0L);
- nNextGlyphLen = (xub_StrLen)xBreak->nextCharacters( pInfo->mrText, pInfo->mnTextStart, aFontLocale,
- CharacterIteratorMode::SKIPCELL, 1, nDone) - (pInfo->mnTextStart);
- }
-
- if(!bIsSingleSpace)
- {
- Size aGlyphSize(pInfo->mrFont.GetPhysTxtSize(mpOut,
- pInfo->mrText, nCharIndex + pInfo->mnTextStart, nNextGlyphLen));
-
- if(bIsVertical)
- {
- ::std::swap(aGlyphSize.Width(), aGlyphSize.Height());
- }
-
- const Rectangle aRect(aStart, aGlyphSize);
-
- aCharacterList.Insert(new OutlinerCharacter(
- aRect,
- pInfo->mnPara,
- pInfo->mrFont.GetColor()),
- nInsertIndex);
-
- long dx = 0;
- if( pInfo->mpDXArray )
- dx = (pInfo->mpDXArray)[nCharIndex];
-
- if(bIsVertical)
- aStart.Y() = pInfo->mrStartPos.Y() + aTextOffset.Y() + dx;
- else
- aStart.X() = pInfo->mrStartPos.X() + aTextOffset.X() + dx;
- }
-
- nCharIndex = nCharIndex + nNextGlyphLen;
- }
- }
-
- return 0L;
-}
-
-// eof
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index daea6eef49a2..7b7a361bba80 100644..100755
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -116,14 +116,3 @@ void SdUndoGroup::AddAction(SdUndoAction* pAction)
{
aCtn.Insert(pAction, CONTAINER_APPEND);
}
-
-/*************************************************************************
-|*
-|* Zeiger auf eine Aktion liefern
-|*
-\************************************************************************/
-
-SdUndoAction* SdUndoGroup::GetAction(ULONG nAction) const
-{
- return (SdUndoAction*)aCtn.GetObject(nAction);
-}
diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx
index 4246b11a5af8..a8b6c0647237 100644..100755
--- a/sd/source/ui/func/smarttag.cxx
+++ b/sd/source/ui/func/smarttag.cxx
@@ -172,6 +172,12 @@ void SmartTagSet::add( const SmartTagReference& xTag )
{
maSet.insert( xTag );
mrView.InvalidateAllWin();
+
+ if( xTag == mxMouseOverTag )
+ mxMouseOverTag.clear();
+
+ if( xTag == mxSelectedTag )
+ mxSelectedTag.clear();
}
// --------------------------------------------------------------------
@@ -182,6 +188,12 @@ void SmartTagSet::remove( const SmartTagReference& xTag )
if( aIter != maSet.end() )
maSet.erase( aIter );
mrView.InvalidateAllWin();
+
+ if( xTag == mxMouseOverTag )
+ mxMouseOverTag.clear();
+
+ if( xTag == mxSelectedTag )
+ mxSelectedTag.clear();
}
// --------------------------------------------------------------------
@@ -193,6 +205,8 @@ void SmartTagSet::Dispose()
for( std::set< SmartTagReference >::iterator aIter( aSet.begin() ); aIter != aSet.end(); )
(*aIter++)->Dispose();
mrView.InvalidateAllWin();
+ mxMouseOverTag.clear();
+ mxSelectedTag.clear();
}
// --------------------------------------------------------------------
diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx
index 684487d0c592..933e961ed927 100644..100755
--- a/sd/source/ui/func/unoaprms.cxx
+++ b/sd/source/ui/func/unoaprms.cxx
@@ -39,52 +39,6 @@ TYPEINIT1(SdAnimationPrmsUndoAction, SdUndoAction);
/*************************************************************************
|*
-|* 2. Ctor, der den ersten (inline) nach der Version 4.0 einmal ersetzen
-|* soll (mit 3. Parameter dann)
-|* Hier werden die Member mit den Animations-Informationen vorbelegt,
-|* um nicht immer alle inline-Methoden aufrufen zu muessen, auch im
-|* Hinblick auf zukuenftige Erweiterungen (neue Member etc.)
-|*
-\************************************************************************/
-
-SdAnimationPrmsUndoAction::SdAnimationPrmsUndoAction(
- SdDrawDocument* pTheDoc,
- SdrObject* pObj ) :
- SdUndoAction ( pTheDoc ),
- pObject ( pObj ),
- bInfoCreated ( FALSE ) // Fuer Animationsreihenfolge existiert Info
-{
- SdAnimationInfo* pInfo = pTheDoc->GetAnimationInfo( pObject );
- if( pInfo )
- {
- bNewActive = bOldActive = pInfo->mbActive;
- eNewEffect = eOldEffect = pInfo->meEffect;
- eNewTextEffect = eOldTextEffect = pInfo->meTextEffect;
- eNewSpeed = eOldSpeed = pInfo->meSpeed;
- bNewDimPrevious = bOldDimPrevious= pInfo->mbDimPrevious;
- aNewDimColor = aOldDimColor = pInfo->maDimColor;
- bNewDimHide = bOldDimHide = pInfo->mbDimHide;
- bNewSoundOn = bOldSoundOn = pInfo->mbSoundOn;
- aNewSoundFile = aOldSoundFile = pInfo->maSoundFile;
- bNewPlayFull = bOldPlayFull = pInfo->mbPlayFull;
-
- pNewPathObj = pOldPathObj = pInfo->mpPathObj;
-
- eNewClickAction = eOldClickAction = pInfo->meClickAction;
- aNewBookmark = aOldBookmark = pInfo->GetBookmark();
-// bNewInvisibleInPres = bOldInvisibleInPres= pInfo->mbInvisibleInPresentation;
- nNewVerb = nOldVerb = pInfo->mnVerb;
- nNewPresOrder = nOldPresOrder = pInfo->mnPresOrder;
-
- eNewSecondEffect = eOldSecondEffect = pInfo->meSecondEffect;
- eNewSecondSpeed = eOldSecondSpeed = pInfo->meSecondSpeed;
- bNewSecondSoundOn = bOldSecondSoundOn = pInfo->mbSecondSoundOn;
- bNewSecondPlayFull = bOldSecondPlayFull = pInfo->mbSecondPlayFull;
- }
-}
-
-/*************************************************************************
-|*
|* Undo()
|*
\************************************************************************/
diff --git a/sd/source/ui/inc/AccessibleTaskPane.hxx b/sd/source/ui/inc/AccessibleTaskPane.hxx
deleted file mode 100644
index 913609ecec87..000000000000
--- a/sd/source/ui/inc/AccessibleTaskPane.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_ACCESSIBILITY_ACCESSIBLE_TASK_PANE_HXX
-#define SD_ACCESSIBILITY_ACCESSIBLE_TASK_PANE_HXX
-
-#include "AccessibleTreeNode.hxx"
-
-namespace sd { namespace toolpanel {
-class ToolPanel;
-} }
-
-
-namespace accessibility {
-
-/** Make the task pane as implemented by sd::toolpanel::ToolPanel
- accessible.
- This derived class exists in order to disable the FOCUSED state.
-*/
-class AccessibleTaskPane
- : public AccessibleTreeNode
-{
-public:
- AccessibleTaskPane (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> & rxParent,
- const ::rtl::OUString& rsName,
- const ::rtl::OUString& rsDescription,
- ::sd::toolpanel::ToolPanel& rTaskPane);
- ~AccessibleTaskPane (void);
-
- //===== XServiceInfo ====================================================
-
- /** Returns an identifier for the implementation of this object.
- */
- virtual ::rtl::OUString SAL_CALL
- getImplementationName (void)
- throw (::com::sun::star::uno::RuntimeException);
-
-protected:
- virtual void UpdateStateSet (void);
-};
-
-} // end of namespace accessibility
-
-#endif
diff --git a/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx
index 33e0bbf725ab..5c8fba1e6b2d 100644..100755
--- a/sd/source/ui/inc/AccessibleViewForwarder.hxx
+++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx
@@ -53,13 +53,10 @@ class AccessibleViewForwarder
public:
//===== internal ========================================================
- AccessibleViewForwarder (SdrPaintView* pView, USHORT nWindowId);
AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice);
virtual ~AccessibleViewForwarder (void);
- void SetView (SdrPaintView* pView);
-
//===== IAccessibleViewforwarder ========================================
/** This method informs you about the state of the forwarder. Do not
diff --git a/sd/source/ui/inc/DrawController.hxx b/sd/source/ui/inc/DrawController.hxx
index 5afda083abbc..da0b6ade7327 100644..100755
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -104,7 +104,8 @@ public:
PROPERTY_ACTIVE_LAYER = 5,
PROPERTY_ZOOMTYPE = 6,
PROPERTY_ZOOMVALUE = 7,
- PROPERTY_VIEWOFFSET = 8
+ PROPERTY_VIEWOFFSET = 8,
+ PROPERTY_DRAWVIEWMODE = 9
};
/** Create a new DrawController object for the given ViewShellBase.
@@ -126,8 +127,6 @@ public:
void SetSubController (
const css::uno::Reference<css::drawing::XDrawSubController>& rxSubController);
- ::com::sun::star::awt::Rectangle GetVisArea (void) const;
-
/** Call this method when the VisArea has changed.
*/
void FireVisAreaChanged (const Rectangle& rVisArea) throw();
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index f2b77d01f96c..4ad4b0d09392 100644..100755
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -115,7 +115,6 @@ public:
sd::ViewShell* GetViewShell() { return mpViewShell; }
::sd::FrameView* GetFrameView();
- ::Window* GetWindow() const;
::sd::FunctionReference GetDocShellFunction() const { return mxDocShellFunction; }
void SetDocShellFunction( const ::sd::FunctionReference& xFunction );
@@ -164,8 +163,6 @@ public:
UINT16 GetStyleFamily() const { return mnStyleFamily; }
void SetStyleFamily( UINT16 nSF ) { mnStyleFamily = nSF; }
- sal_Bool IsNewDocument() const;
-
/** executes the SID_OPENDOC slot to let the framework open a document
with the given URL and this document as a referer */
void OpenBookmark( const String& rBookmarkURL );
diff --git a/sd/source/ui/inc/DrawSubController.hxx b/sd/source/ui/inc/DrawSubController.hxx
index 11816fa45902..22d3afb5dd4a 100644..100755
--- a/sd/source/ui/inc/DrawSubController.hxx
+++ b/sd/source/ui/inc/DrawSubController.hxx
@@ -29,12 +29,27 @@
#define SD_DRAW_SUB_CONTROLLER_HXX
#include <com/sun/star/drawing/XDrawSubController.hpp>
-#include <cppuhelper/compbase1.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/compbase2.hxx>
+
+namespace sd {
+
+ class DrawSubControllerInterfaceBase : public ::cppu::WeakComponentImplHelper2<
+ ::com::sun::star::drawing::XDrawSubController,
+ ::com::sun::star::lang::XServiceInfo >
+ {
+ public:
+ DrawSubControllerInterfaceBase( ::osl::Mutex& aMutex )
+ : ::cppu::WeakComponentImplHelper2<
+ ::com::sun::star::drawing::XDrawSubController,
+ ::com::sun::star::lang::XServiceInfo >( aMutex ) {}
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0;
+ };
-namespace {
- typedef ::cppu::WeakComponentImplHelper1 <
- ::com::sun::star::drawing::XDrawSubController
- > DrawSubControllerInterfaceBase;
}
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index e48d3cef142b..4abb1a22946d 100644..100755
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -57,6 +57,7 @@ class LayerTabBar;
class Ruler;
class SdUnoDrawView;
class AnnotationManager;
+class ViewOverlayManager;
#define CHECK_RANGE(nMin, nValue, nMax) ((nValue >= nMin) && (nValue <= nMax))
@@ -93,11 +94,6 @@ public:
PageKind ePageKind = PK_STANDARD,
FrameView* pFrameView = NULL);
- DrawViewShell(
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const DrawViewShell& rShell);
-
virtual ~DrawViewShell (void);
virtual void Init (bool bIsMainViewShell);
@@ -198,9 +194,6 @@ public:
void ExecFormText(SfxRequest& rReq);
void GetFormTextState(SfxItemSet& rSet);
- void ExecObjPalette(SfxRequest& rReq);
- void GetObjPaletteState(SfxItemSet& rSet);
-
void ExecAnimationWin(SfxRequest& rReq);
void GetAnimationWinState(SfxItemSet& rSet);
@@ -496,6 +489,7 @@ private:
using ViewShell::Notify;
::std::auto_ptr< AnnotationManager > mpAnnotationManager;
+ ::std::auto_ptr< ViewOverlayManager > mpViewOverlayManager;
};
diff --git a/sd/source/ui/inc/GraphicViewShell.hxx b/sd/source/ui/inc/GraphicViewShell.hxx
index 39e12e47d1e1..6b5d96be95c6 100644..100755
--- a/sd/source/ui/inc/GraphicViewShell.hxx
+++ b/sd/source/ui/inc/GraphicViewShell.hxx
@@ -52,11 +52,6 @@ public:
SFX_DECL_VIEWFACTORY(GraphicViewShell);
SFX_DECL_INTERFACE(SD_IF_SDGRAPHICVIEWSHELL)
- GraphicViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const DrawViewShell& rShell);
-
/** Create a new view shell for the Draw application.
@param rViewShellBase
The new object will be stacked on this view shell base.
diff --git a/sd/source/ui/inc/LayerDialogContent.hxx b/sd/source/ui/inc/LayerDialogContent.hxx
index f06b785737b0..3c0b00025307 100644..100755
--- a/sd/source/ui/inc/LayerDialogContent.hxx
+++ b/sd/source/ui/inc/LayerDialogContent.hxx
@@ -50,8 +50,6 @@ public:
ViewShellBase& rBase);
virtual ~LayerDialogContent (void);
- LayerTabBar& GetLayerTabBar (void);
-
protected:
virtual BOOL Close (void);
virtual void Resize (void);
diff --git a/sd/source/ui/inc/MasterPageObserver.hxx b/sd/source/ui/inc/MasterPageObserver.hxx
index 4e74d922d256..caaa8c175f68 100644..100755
--- a/sd/source/ui/inc/MasterPageObserver.hxx
+++ b/sd/source/ui/inc/MasterPageObserver.hxx
@@ -80,12 +80,6 @@ public:
*/
void RemoveEventListener (const Link& rEventListener);
- /** Return a set of the names of master pages for the given document.
- This convenience method exists because this set is part of the
- internal data structure and thus takes no time to create.
- */
- MasterPageNameSet GetMasterPageNames (SdDrawDocument& rDocument);
-
private:
static ::osl::Mutex maMutex;
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 710ee3a96cf7..78481294bf94 100644..100755
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -162,7 +162,9 @@ public:
*/
void IgnoreCurrentPageChanges (bool bIgnore);
+#if 0
sal_Int32 GetPageNumberWidthPixel();
+#endif
void InvalidateSlideNumberArea();
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 0bc083b12b2e..6c3848f39926 100644..100755
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -67,11 +67,6 @@ public:
::Window* pParentWindow,
FrameView* pFrameView = NULL);
- OutlineViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const OutlineViewShell& rShell);
-
virtual ~OutlineViewShell (void);
virtual void Shutdown (void);
diff --git a/sd/source/ui/inc/PaneChildWindows.hxx b/sd/source/ui/inc/PaneChildWindows.hxx
index 9995ed4b00c8..9ba0a1f03720 100644..100755
--- a/sd/source/ui/inc/PaneChildWindows.hxx
+++ b/sd/source/ui/inc/PaneChildWindows.hxx
@@ -29,6 +29,7 @@
#define SD_PANE_CHILD_WINDOWS_HXX
#include <sfx2/childwin.hxx>
+#include <sfx2/taskpane.hxx>
namespace sd {
@@ -41,8 +42,8 @@ public:
USHORT nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo,
- const ResId& rResId,
- const ::rtl::OUString& rsTitle,
+ const USHORT nDockWinTitleResId,
+ const USHORT nTitleBarResId,
SfxChildAlignment eAlignment);
virtual ~PaneChildWindow (void);
};
@@ -74,16 +75,24 @@ public:
-class RightPaneChildWindow
- : public PaneChildWindow
+//======================================================================================================================
+//= ToolPanelChildWindow
+//======================================================================================================================
+class ToolPanelChildWindow :public PaneChildWindow
+ ,public ::sfx2::ITaskPaneToolPanelAccess
{
public:
- RightPaneChildWindow (::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
-
- SFX_DECL_CHILDWINDOW(RightPaneChildWindow);
-};
+ ToolPanelChildWindow(
+ ::Window* i_pParentWindow,
+ USHORT i_nId,
+ SfxBindings* i_pBindings,
+ SfxChildWinInfo* i_pChildWindowInfo );
+ SFX_DECL_CHILDWINDOW( ToolPanelChildWindow );
+ // ::sfx2::ITaskPaneToolPanelAccess
+ virtual void ActivateToolPanel( const ::rtl::OUString& i_rPanelURL );
+};
} // end of namespace ::sd
diff --git a/sd/source/ui/inc/PaneDockingWindow.hrc b/sd/source/ui/inc/PaneDockingWindow.hrc
index e8e4a1fba597..eb7c23c075ec 100644..100755
--- a/sd/source/ui/inc/PaneDockingWindow.hrc
+++ b/sd/source/ui/inc/PaneDockingWindow.hrc
@@ -25,6 +25,6 @@
*
************************************************************************/
-#define FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW 792
-#define FLT_LEFT_PANE_DRAW_DOCKING_WINDOW 793
-#define FLT_RIGHT_PANE_DOCKING_WINDOW 794
+#define FLT_LEFT_PANE_IMPRESS_DOCKING_WINDOW 792
+#define FLT_LEFT_PANE_DRAW_DOCKING_WINDOW 793
+#define FLT_TOOL_PANEL_DOCKING_WINDOW 794
diff --git a/sd/source/ui/inc/PaneDockingWindow.hxx b/sd/source/ui/inc/PaneDockingWindow.hxx
index 03e6cf96c0f0..1874df10dd53 100644..100755
--- a/sd/source/ui/inc/PaneDockingWindow.hxx
+++ b/sd/source/ui/inc/PaneDockingWindow.hxx
@@ -28,7 +28,7 @@
#ifndef SD_PANE_DOCKING_WINDOW_HXX
#define SD_PANE_DOCKING_WINDOW_HXX
-#include <sfx2/dockwin.hxx>
+#include <sfx2/titledockwin.hxx>
#include <sfx2/viewfrm.hxx>
#include <boost/scoped_ptr.hpp>
@@ -38,15 +38,10 @@ class ToolBox;
namespace sd {
-class PaneDockingWindow
- : public SfxDockingWindow
+ class PaneDockingWindow : public ::sfx2::TitledDockingWindow
{
public:
- /** Create a new docking window that will be displayed in the specified
- pane.
- The constructor will determine the ViewShellBase via the given
- bindings and tell its PaneManager about the new window. It will ask
- the PaneManager for a window title.
+ /** Create a new docking window.
@param pBindings
Used, among others, to determine the ViewShellBase and
PaneManager that manage the new docking window.
@@ -57,89 +52,19 @@ public:
The parent window of the new docking window.
@param rResId
The resource is used to determine initial size and attributes.
- @param ePane
- The pane in which to show the docking window.
+ @param rsTitle
+ the initial title
*/
PaneDockingWindow (
SfxBindings *pBindings,
SfxChildWindow *pChildWindow,
::Window* pParent,
const ResId& rResId,
- const ::rtl::OUString& rsPaneURL,
const ::rtl::OUString& rsTitle);
virtual ~PaneDockingWindow (void);
- virtual void Paint (const Rectangle& rRectangle);
- virtual void Resize (void);
-
- virtual long Notify( NotifyEvent& rNEvt );
virtual void StateChanged( StateChangedType nType );
- virtual void DataChanged( const DataChangedEvent& rDCEvt );
-
- /** Initializing the title tool box either creates a new title tool box
- or clears all items from an existing one. A closer is added as only
- item.
- */
- void InitializeTitleToolBox (void);
-
- /** Add a top down menu to the title bar or rather the top-level menu
- entry. The given callback is called when the menu is clicked and it
- is the task of the callback to show the menu.
- @return
- The id of the new menu is returned. It can be compared by the
- callback to the value of GetCurItemId() when called at the given
- tool box.
- */
- USHORT AddMenu (const String& rsMenuName, ULONG nHelpId, const Link& rCallback);
-
- /** Set the title of the docking window to the given string. Use this
- method when the title is not yet known at the time of construction
- or can not be passed to the constructor.
- */
- void SetTitle (const String& rsTitle);
-
- ::Window* GetContentWindow (void);
-
- ::boost::shared_ptr<ToolBox> GetTitleToolBox (void) const;
-
-private:
- /** The pane which is represented by the docking window.
- */
- ::rtl::OUString msPaneURL;
-
- /** Title that is shown at the top of the docking window.
- */
- ::rtl::OUString msTitle;
-
- /** The tool box that is displayed in the window title area contains
- menus and the closer button.
- */
- ::boost::shared_ptr<ToolBox> mpTitleToolBox;
-
- /** The border that is painted arround the inner window. The bevel
- shadow lines are part of the border, so where the border is 0 no
- such line is painted.
- */
- SvBorder maBorder;
-
- sal_uInt16 mnChildWindowId;
-
- ::boost::scoped_ptr< ::Window> mpContentWindow;
-
- /** Remember that a layout is pending, i.e. Resize() has been called
- since the last Paint().
- */
- bool mbIsLayoutPending;
-
- DECL_LINK(ToolboxSelectHandler, ToolBox*);
-
- /** This does the actual placing and sizing of the title bar and the
- content window after the size of the docking window has changed.
- This method is called from withing the Paint() method when since its
- last invocation the size of the docking window has changed.
- */
- void Layout (void);
};
} // end of namespace ::sd
diff --git a/sd/source/ui/inc/PaneShells.hxx b/sd/source/ui/inc/PaneShells.hxx
index c34d2ba632d8..de410c2565bf 100644..100755
--- a/sd/source/ui/inc/PaneShells.hxx
+++ b/sd/source/ui/inc/PaneShells.hxx
@@ -75,15 +75,14 @@ public:
/** Shell that displays the right pane for both Impress and Draw. The shell
does not do anything else and has especially no slots.
*/
-class RightPaneShell
- : public SfxShell
+class ToolPanelPaneShell : public SfxShell
{
public:
TYPEINFO();
- SFX_DECL_INTERFACE(SD_IF_SDRIGHTPANESHELL)
+ SFX_DECL_INTERFACE( SD_IF_SDTOOLPANELPANESHELL )
- RightPaneShell (void);
- virtual ~RightPaneShell (void);
+ ToolPanelPaneShell();
+ virtual ~ToolPanelPaneShell();
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/SdUnoDrawView.hxx b/sd/source/ui/inc/SdUnoDrawView.hxx
index afd03acd256f..d29ca3b09d32 100644..100755
--- a/sd/source/ui/inc/SdUnoDrawView.hxx
+++ b/sd/source/ui/inc/SdUnoDrawView.hxx
@@ -106,6 +106,11 @@ public:
css::lang::WrappedTargetException,
css::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
sal_Bool getMasterPageMode(void) const throw();
void setMasterPageMode(sal_Bool MasterPageMode_) throw();
@@ -133,6 +138,8 @@ protected:
void SetZoomType( sal_Int16 nType );
+ ::com::sun::star::uno::Any getDrawViewMode() const;
+
private:
DrawController& mrController;
DrawViewShell& mrDrawViewShell;
diff --git a/sd/source/ui/inc/SdUnoOutlineView.hxx b/sd/source/ui/inc/SdUnoOutlineView.hxx
index a8c97b2e2610..d2a4d4bfd39d 100644..100755
--- a/sd/source/ui/inc/SdUnoOutlineView.hxx
+++ b/sd/source/ui/inc/SdUnoOutlineView.hxx
@@ -111,6 +111,11 @@ public:
disposing (const ::com::sun::star::lang::EventObject& rEventObject)
throw (::com::sun::star::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
private:
DrawController& mrController;
OutlineViewShell& mrOutlineViewShell;
diff --git a/sd/source/ui/inc/SdUnoPresView.hxx b/sd/source/ui/inc/SdUnoPresView.hxx
deleted file mode 100644
index 8edf171f60cc..000000000000
--- a/sd/source/ui/inc/SdUnoPresView.hxx
+++ /dev/null
@@ -1,54 +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_UNO_PRES_VIEW_HXX
-#define SD_UNO_PRES_VIEW_HXX
-
-#include "SdUnoDrawView.hxx"
-
-namespace sd {
-
-/** The sub controller for the slide show (or preview?) It formerly reduced
- the property set inherited from SdUnoDrawView to just 'CurrentPage'.
- Now that we have to always support the whole set, we can as well try to
- do that as best as we can. Therefore the inherited functionality is
- provided as is.
-*/
-class SdUnoPresView
- : public SdUnoDrawView
-{
-public:
- SdUnoPresView (
- DrawController& rController,
- DrawViewShell& rViewShell,
- View& rView) throw();
- virtual ~SdUnoPresView (void) throw();
-};
-
-} // end of namespace sd
-
-#endif
diff --git a/sd/source/ui/inc/SdUnoSlideView.hxx b/sd/source/ui/inc/SdUnoSlideView.hxx
index e468d416bf56..6005704ec895 100644..100755
--- a/sd/source/ui/inc/SdUnoSlideView.hxx
+++ b/sd/source/ui/inc/SdUnoSlideView.hxx
@@ -109,6 +109,11 @@ public:
css::lang::WrappedTargetException,
css::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
+
private:
DrawController& mrController;
slidesorter::SlideSorter& mrSlideSorter;
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 6f8ebb285886..4e6033d67ad1 100644..100755
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -53,12 +53,6 @@ public:
TYPEINFO();
SFX_DECL_INTERFACE(SD_IF_SDSLIDESORTERVIEWSHELL)
- static SfxShell* CreateInstance (
- sal_Int32 nId,
- SfxShell* pParent,
- void* pUserData,
- ViewShellBase& rBase);
-
static ::boost::shared_ptr<SlideSorterViewShell> Create(
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
diff --git a/sd/source/ui/inc/SlideView.hxx b/sd/source/ui/inc/SlideView.hxx
index 3764347f2a4b..17f7f17e3a9a 100644..100755
--- a/sd/source/ui/inc/SlideView.hxx
+++ b/sd/source/ui/inc/SlideView.hxx
@@ -36,7 +36,6 @@ class SdPage;
namespace sd {
-class ShowView;
class SlideViewShell;
class Window;
@@ -129,7 +128,6 @@ private:
List aDelayedPaints;
SlideViewShell* pSlideViewShell;
BitmapCache* pCache;
- ShowView* pShowView;
VirtualDevice* mpVDev;
USHORT nAllowInvalidateSmph;
USHORT nPagesPerRow;
diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx
index 898df6865280..4e08dd99b063 100644..100755
--- a/sd/source/ui/inc/SpellDialogChildWindow.hxx
+++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx
@@ -62,12 +62,12 @@ protected:
next sentence with spelling errors. While doing so the view
mode may be changed and text shapes are set into edit mode.
*/
- virtual ::svx::SpellPortions GetNextWrongSentence (void);
+ virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck );
/** This method is responsible for merging corrections made in the
spelling dialog back into the document.
*/
- virtual void ApplyChangedSentence (const ::svx::SpellPortions& rChanged);
+ virtual void ApplyChangedSentence(const ::svx::SpellPortions& rChanged, bool bRecheck);
virtual void GetFocus (void);
virtual void LoseFocus (void);
diff --git a/sd/source/ui/inc/ToolBarManager.hxx b/sd/source/ui/inc/ToolBarManager.hxx
index 2caead9a3c5d..d8b84d1d7b61 100644..100755
--- a/sd/source/ui/inc/ToolBarManager.hxx
+++ b/sd/source/ui/inc/ToolBarManager.hxx
@@ -144,14 +144,6 @@ public:
TBG__LAST = TBG_MASTER_MODE
};
- /** Only after calls with bValid=<TRUE/> may the tool bar manager use
- the frame::XLayoutManager to change the visible tool bars. Call
- this method when the controller is attached to or detachted from the
- frame. When called with <FALSE/> then ResetAllToolBars() is
- executed.
- */
- void SetValid (bool bValid);
-
/** Reset the set of visible object bars in the specified group. Tool
bars in other groups are not affected.
@param rParentShell
@@ -209,10 +201,6 @@ public:
ToolBarGroup eGroup,
const ::rtl::OUString& rsToolBarName);
- void RemoveToolBarShell (
- ToolBarGroup eGroup,
- ShellId nToolBarId);
-
/** This is basically a shortcut for ResetToolBars(),AddToolBar(). The
main difference is, that all sub shells of the specified parent
shell are deactivated as well.
@@ -275,10 +263,6 @@ public:
};
friend class UpdateLock;
- /** Return whether updates of tool bars are locked.
- */
- bool IsUpdateLocked (void) const;
-
void ToolBarsDestroyed(void);
private:
diff --git a/sd/source/ui/inc/ToolPanelChildWindow.hrc b/sd/source/ui/inc/ToolPanelChildWindow.hrc
deleted file mode 100644
index 61dca11d21cc..000000000000
--- a/sd/source/ui/inc/ToolPanelChildWindow.hrc
+++ /dev/null
@@ -1,30 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define FLT_WIN_TOOLPANEL 788
-
-#define TOOLPANEL 1
diff --git a/sd/source/ui/inc/ToolPanelChildWindow.hxx b/sd/source/ui/inc/ToolPanelChildWindow.hxx
deleted file mode 100644
index 721c9baee3ac..000000000000
--- a/sd/source/ui/inc/ToolPanelChildWindow.hxx
+++ /dev/null
@@ -1,55 +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_TOOL_PANEL_CHILD_WINDOW_HXX
-#define SD_TOOL_PANEL_CHILD_WINDOW_HXX
-
-#include <sfx2/childwin.hxx>
-
-#define TOOLPANEL_CHILD_WINDOW() ( \
- static_cast< ::sd::toolpanel::ToolPanelChildWindow*>( \
- SfxViewFrame::Current()->GetChildWindow( \
- ::sd::toolpanel::ToolPanelChildWindow::GetChildWindowId() \
- )->GetWindow()))
-
-
-namespace sd { namespace toolpanel {
-
-class ToolPanelChildWindow
- : public SfxChildWindow
-{
-public:
- ToolPanelChildWindow (::Window*, USHORT, SfxBindings*, SfxChildWinInfo*);
- virtual ~ToolPanelChildWindow (void);
-
- SFX_DECL_CHILDWINDOW (ToolPanelChildWindow);
-};
-
-
-} } // end of namespaces ::sd::toolpanel
-
-#endif
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index a0d7bf179886..f78051bdd719 100644..100755
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -160,10 +160,7 @@ public:
void SetMarkedOriginalSize();
- VirtualDevice* CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel);
-
void LockRedraw(BOOL bLock);
- bool IsRedrawLocked (void) const;
BOOL IsMorphingAllowed() const;
BOOL IsVectorizeAllowed() const;
@@ -208,6 +205,7 @@ public:
void SetMarkedPointsSmoothPossible( bool bSet ) { bSetMarkedPointsSmoothPossible = bSet; }
void SetMarkedSegmentsKindPossible( bool bSet ) { bSetMarkedSegmentsKindPossible = bSet; }
+ SdrObject* GetEmptyPresentationObject( PresObjKind eKind );
protected:
DECL_LINK( OnParagraphInsertedHdl, ::Outliner * );
DECL_LINK( OnParagraphRemovingHdl, ::Outliner * );
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 64bc5cbc02b7..ffefb9de7359 100644..100755
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -141,10 +141,6 @@ public:
::Window* pParentWindow,
ViewShellBase& rViewShellBase,
bool bAllowCenter = true);
- ViewShell (
- SfxViewFrame *pFrame,
- ::Window* pParentWindow,
- const ViewShell& rShell);
virtual ~ViewShell (void);
/** The Init method has to be called from the outside directly
@@ -235,7 +231,6 @@ public:
void InitWindows(const Point& rViewOrigin, const Size& rViewSize,
const Point& rWinPos, BOOL bUpdate = FALSE);
void InvalidateWindows();
- void UpdateWindows();
/** This method is still used by the OutlineViewShell to update the
model according to the content of the outline view. This in turn
updates the previews in the slide sorter.
@@ -243,8 +238,6 @@ public:
virtual void UpdatePreview (SdPage* pPage, BOOL bInit = FALSE);
void DrawMarkRect(const Rectangle& rRect) const;
- void DrawFilledRect( const Rectangle& rRect, const Color& rLColor,
- const Color& rFColor ) const;
void ExecReq( SfxRequest &rReq );
diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx
index 5e1acbe2a6ac..38f7223f1d83 100644..100755
--- a/sd/source/ui/inc/ViewShellBase.hxx
+++ b/sd/source/ui/inc/ViewShellBase.hxx
@@ -28,6 +28,8 @@
#ifndef SD_VIEW_SHELL_BASE_HXX
#define SD_VIEW_SHELL_BASE_HXX
+#include <com/sun/star/frame/XFrame.hpp>
+
#include "ViewShell.hxx"
#include "glob.hxx"
@@ -55,7 +57,6 @@ class ToolBarManager;
class UpdateLockManager;
class ViewShell;
class ViewShellManager;
-class CustomHandleManager;
/** SfxViewShell descendant that the stacked Draw/Impress shells are
based on.
@@ -110,10 +111,6 @@ public:
DrawDocShell* GetDocShell (void) const;
SdDrawDocument* GetDocument (void) const;
- /** Callback function for retrieving item values related to menu entries.
- */
- void GetMenuState (SfxItemSet& rSet);
-
/** Callback function for general slot calls. At the moment these are
slots for switching the pane docking windows on and off.
*/
@@ -163,12 +160,6 @@ public:
PrintDialog *pPrintDialog,
BOOL bSilent, BOOL bIsAPI );
- /// Forwarded to the print manager.
- USHORT SetPrinterOptDlg (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags = SFX_PRINTER_ALL,
- BOOL _bShowDialog = TRUE);
-
virtual void PreparePrint (PrintDialog* pPrintDialog);
/// Forward methods to main sub shell.
@@ -259,8 +250,6 @@ public:
*/
::Window* GetViewWindow (void);
- CustomHandleManager& getCustomHandleManager() const;
-
/** returns the ui descriptive name for the given uno slot. The result is taken from the configuration
and not cached, so do not use it excessive (f.e. in status updates) */
::rtl::OUString RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const;
@@ -293,22 +282,6 @@ public:
virtual void addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList ) = 0;
};
-class CustomHandleManager : public ICustomhandleSupplier
-{
-public:
- CustomHandleManager( ViewShellBase& rViewShellBase );
- virtual ~CustomHandleManager();
-
- void registerSupplier( ICustomhandleSupplier* pSupplier );
- void unRegisterSupplier( ICustomhandleSupplier* pSupplier );
-
- virtual void addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList );
-
-private:
- ViewShellBase& mrViewShellBase;
- std::set< ICustomhandleSupplier* > maSupplier;
-};
-
} // end of namespace sd
#endif
diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx
index 466e4e578cc2..f4f07b5549dd 100644..100755
--- a/sd/source/ui/inc/ViewShellImplementation.hxx
+++ b/sd/source/ui/inc/ViewShellImplementation.hxx
@@ -124,9 +124,7 @@ public:
@param pPage
If a NULL pointer is given then this call is ignored.
*/
- void AssignLayout (
- SdPage* pPage,
- AutoLayout aLayout);
+ void AssignLayout ( SfxRequest& rRequest, PageKind ePageKind );
/** Determine the view id of the view shell. This corresponds to the
view id stored in the SfxViewFrame class.
diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx
index 27f88b72bf11..d674e7d07eff 100644..100755
--- a/sd/source/ui/inc/ViewShellManager.hxx
+++ b/sd/source/ui/inc/ViewShellManager.hxx
@@ -90,23 +90,6 @@ public:
ViewShell* pViewShell,
const SharedShellFactory& rpFactory);
- /** Create a new (or possibly recycle an existing) instance of a view
- shell that is specified by the given id. When called multiple times
- with the same id then multiple instances of the associated view
- shell are created. Use the returned pointer to distinguish between
- these.
- @param nId
- The id of the shell to activate.
- @return
- A pointer to the activated shell is returned. Use this pointer
- to identify the shell in other method calls. When an activation
- is not possible then NULL is returned.
- */
- ViewShell* ActivateViewShell (
- ShellId nId,
- ::Window* pParentWindow,
- FrameView* pFrameView);
-
/** Activate the given view shell.
*/
void ActivateViewShell (ViewShell* pViewShell);
@@ -156,10 +139,6 @@ public:
*/
void DeactivateSubShell (const ViewShell& rParentShell, ShellId nId);
- /** Deactivate all sub shells of the given view shell.
- */
- void DeactivateAllSubShells (const ViewShell& rParentShell);
-
/** Move the specified sub shells to the top position among the sub
shells of the parent view shell. The rest of the SFX shell stack
does not change (but the all shells above the sub shells have to be
@@ -173,14 +152,6 @@ public:
void InvalidateAllSubShells (
ViewShell* pViewShell);
- /** Call this method to when a 'secondary' shell is moved to or from the
- stack, e.g. an object bar. As a result a pending
- TakeShellsFromStack() is executed and at the next UnlockUpdate() to
- lock level 0 the shells are asked about their secondary shells to
- push on the shell stack.
- */
- void InvalidateShellStack (const SfxShell* pShell);
-
/** Move the specified view shell to the top most position on the stack
of view shells in relation to the other view shells. After this the
only shells that are higher on the stack are its object bars.
@@ -211,20 +182,6 @@ public:
*/
SfxShell* GetTopShell (void) const;
- /** Return the id of the given shell.
- */
- ShellId GetShellId (const SfxShell* pShell) const;
-
- /** Replace the references to one SfxUndoManager to that of another at all
- shells on the SFX shell stack. Call this method when an undo
- manager is about to be destroyed.
- @param pManager
- The undo manager to be replaced.
- @param pReplacement
- The undo manager that replaces pManager.
- */
- void ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement);
-
/** Use this class to safely lock updates of the view shell stack.
*/
class UpdateLock
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx
index dbf2a1ed40a6..8dd522d8212d 100644..100755
--- a/sd/source/ui/inc/Window.hxx
+++ b/sd/source/ui/inc/Window.hxx
@@ -66,8 +66,6 @@ public:
void SetViewShell (ViewShell* pViewSh);
- void ShareViewArea(::sd::Window* pOtherWin);
-
/** Set the zoom factor to the specified value and center the display
area arround the zoom center.
@param nZoom
diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx
index 846863c3a68a..7a7a34362c48 100644..100755
--- a/sd/source/ui/inc/animobjs.hxx
+++ b/sd/source/ui/inc/animobjs.hxx
@@ -172,7 +172,6 @@ private:
void UpdateControl( ULONG nPos, BOOL bDisableCtrls = FALSE );
void ResetAttrs();
- void WaitInEffect( ULONG nMilliSeconds ) const;
void WaitInEffect( ULONG nMilliSeconds, ULONG nTime,
SfxProgress* pStbMgr ) const;
Fraction GetScale();
diff --git a/sd/source/ui/inc/bmcache.hxx b/sd/source/ui/inc/bmcache.hxx
index 26658333dca3..c04f7d2ed2c4 100644..100755
--- a/sd/source/ui/inc/bmcache.hxx
+++ b/sd/source/ui/inc/bmcache.hxx
@@ -45,8 +45,6 @@ public:
: nMaxSize(nMaxSizeKB), nCurSize(0) {}
virtual ~BitmapCache();
- void Add(const SdPage* pPage, const Bitmap& rBmp, long nZoomPercent);
- const GraphicObject* Get(const SdPage* pPage, long& rZoomPercent, long nZoomTolerancePercent);
void Remove(const SdPage* pPage);
};
diff --git a/sd/source/ui/inc/dlgass.hxx b/sd/source/ui/inc/dlgass.hxx
index 418d72618b4c..523b86cf66a8 100644..100755
--- a/sd/source/ui/inc/dlgass.hxx
+++ b/sd/source/ui/inc/dlgass.hxx
@@ -64,9 +64,6 @@ public:
DECL_LINK( FinishHdl, OKButton * );
SfxObjectShellLock GetDocument();
- String GetTopic() const;
- String GetUserName() const;
- String GetInformation() const;
OutputType GetOutputMedium() const;
BOOL IsSummary() const;
StartType GetStartType() const;
diff --git a/sd/source/ui/inc/dlgctrls.hxx b/sd/source/ui/inc/dlgctrls.hxx
index df48868d473d..72b5921d8e86 100644..100755
--- a/sd/source/ui/inc/dlgctrls.hxx
+++ b/sd/source/ui/inc/dlgctrls.hxx
@@ -50,7 +50,6 @@ class SD_DLLPUBLIC FadeEffectLB : public ListBox
{
public:
FadeEffectLB( Window* pParent, SdResId Id );
- FadeEffectLB( Window* pParent, WinBits aWB );
~FadeEffectLB();
virtual void Fill();
diff --git a/sd/source/ui/inc/docprev.hxx b/sd/source/ui/inc/docprev.hxx
index 0827371da3be..76b8fe06f318 100644..100755
--- a/sd/source/ui/inc/docprev.hxx
+++ b/sd/source/ui/inc/docprev.hxx
@@ -70,10 +70,8 @@ protected:
public:
SdDocPreviewWin( Window* pParent, const ResId& rResId );
- SdDocPreviewWin( Window* pParent );
~SdDocPreviewWin();
void SetObjectShell( SfxObjectShell* pObj, sal_uInt16 nShowPage = 0 );
- void SetGDIFile( GDIMetaFile* pFile );
virtual void Resize();
void startPreview();
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 74b4c5d1d6a6..2aaa7be9f123 100644..100755
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -40,40 +40,9 @@
class SdFileDialog_Imp;
-/******************************************************************************/
-
-/**
- The class SdExportFileDialog wraps the FileDialogHelper, displaying the
- FILESAVE_AUTOEXTENSION_SELECTION dialog template. The interface is a downstripped
- version of the aforementioned class, with similar semantics.
- */
-class SdExportFileDialog
-{
- const std::auto_ptr< SdFileDialog_Imp > mpImpl;
-
- // forbidden and not implemented
- SdExportFileDialog ();
- SdExportFileDialog (const SdExportFileDialog &);
- SdExportFileDialog & operator= (const SdExportFileDialog &);
-
-public:
- explicit SdExportFileDialog( BOOL haveCheckbox );
- ~SdExportFileDialog();
-
- ErrCode Execute();
- String GetPath() const;
- void SetPath( const String& rPath );
-
- String ReqDisplayDirectory() const;
-
- String ReqCurrentFilter() const;
- BOOL IsExportSelection() const; // whether the "selection" checkbox is checked.
-};
-
/******************************************************************************/
-
/**
The class SdOpenSoundFileDialog wraps the FileDialogHelper, displaying the
FILEOPEN_PLAY dialog template and performing the 'preview' functionality
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index a25839b3e637..58c663449bbc 100644..100755
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -383,23 +383,6 @@ private:
};
-
-/** This functor wraps a slot call. It is used to call a slot after an
- asynchronous configuration update, eg after switching views.
-*/
-class DispatchCaller
-{
- SfxDispatcher& mrDispatcher;
- USHORT mnSId;
-public:
- /** Create a new DispatchCaller object that, when executed, will call
- the given slot at the given dispatcher.
- */
- DispatchCaller(SfxDispatcher& rDispatcher, USHORT nSId);
- void operator() (bool bEventSeen);
-};
-
-
} } // end of namespace sd::framework
diff --git a/sd/source/ui/inc/framework/PresentationFactory.hxx b/sd/source/ui/inc/framework/PresentationFactory.hxx
index 4f35813a7205..a607542f2df0 100644..100755
--- a/sd/source/ui/inc/framework/PresentationFactory.hxx
+++ b/sd/source/ui/inc/framework/PresentationFactory.hxx
@@ -82,7 +82,7 @@ public:
SAL_CALL createResource (
const css::uno::Reference<
css::drawing::framework::XResourceId>& rxViewId)
- throw(css::uno::RuntimeException);
+ throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException);
virtual void SAL_CALL releaseResource (
const css::uno::Reference<css::drawing::framework::XResource>& xView)
diff --git a/sd/source/ui/inc/framework/ResourceId.hxx b/sd/source/ui/inc/framework/ResourceId.hxx
index a4d5390d15d0..e8124e895ee6 100644..100755
--- a/sd/source/ui/inc/framework/ResourceId.hxx
+++ b/sd/source/ui/inc/framework/ResourceId.hxx
@@ -236,8 +236,6 @@ private:
const ::std::vector<rtl::OUString>& rResourceURLs,
css::drawing::framework::AnchorBindingMode eMode) const;
- bool IsValid (void) const;
-
void ParseResourceURL (void);
};
diff --git a/sd/source/ui/inc/framework/ViewShellWrapper.hxx b/sd/source/ui/inc/framework/ViewShellWrapper.hxx
index 96846e5c08d7..12483f462d5e 100644..100755
--- a/sd/source/ui/inc/framework/ViewShellWrapper.hxx
+++ b/sd/source/ui/inc/framework/ViewShellWrapper.hxx
@@ -35,17 +35,17 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <osl/mutex.hxx>
#include <cppuhelper/compbase4.hxx>
+#include <cppuhelper/implbase1.hxx>
#include <boost/shared_ptr.hpp>
namespace {
-typedef ::cppu::WeakComponentImplHelper4 <
- ::com::sun::star::drawing::framework::XView,
- ::com::sun::star::lang::XUnoTunnel,
- ::com::sun::star::awt::XWindowListener,
- ::com::sun::star::drawing::framework::XRelocatableResource
- > ViewShellWrapperInterfaceBase;
+typedef ::cppu::WeakComponentImplHelper4 < ::com::sun::star::lang::XUnoTunnel
+ , ::com::sun::star::awt::XWindowListener
+ , ::com::sun::star::drawing::framework::XRelocatableResource
+ , ::com::sun::star::drawing::framework::XView
+ > ViewShellWrapperInterfaceBase;
} // end of anonymous namespace.
@@ -57,9 +57,8 @@ namespace sd { namespace framework {
Most importantly it provides a tunnel to the ViewShell implementation.
Then it forwards size changes of the pane window to the view shell.
*/
-class ViewShellWrapper
- : private sd::MutexOwner,
- public ViewShellWrapperInterfaceBase
+class ViewShellWrapper :private sd::MutexOwner
+ ,public ViewShellWrapperInterfaceBase
{
public:
/** Create a new ViewShellWrapper object that wraps the given ViewShell
@@ -90,23 +89,11 @@ public:
*/
::boost::shared_ptr<ViewShell> GetViewShell (void);
- /** Returns whether there is exactly one reference to the called
- ViewShellWrapper object (the number of references to the wrapped
- ViewShell object is not taken into account). This method is
- typically used by the owner of a ViewShellWrapper object to verify
- that, at the end of the ViewShellWrapper object's lifetime, the
- owner holds the last reference and by releasing it will destroy the
- object.
- */
- bool IsUnique (void);
-
-
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething (const com::sun::star::uno::Sequence<sal_Int8>& rId)
throw (com::sun::star::uno::RuntimeException);
-
// XResource
virtual ::com::sun::star::uno::Reference<com::sun::star::drawing::framework::XResourceId>
@@ -151,10 +138,9 @@ public:
throw (com::sun::star::uno::RuntimeException);
private:
- ::boost::shared_ptr<ViewShell> mpViewShell;
- const ::com::sun::star::uno::Reference<
- com::sun::star::drawing::framework::XResourceId> mxViewId;
- ::com::sun::star::uno::Reference<com::sun::star::awt::XWindow> mxWindow;
+ ::boost::shared_ptr< ViewShell > mpViewShell;
+ const ::com::sun::star::uno::Reference< com::sun::star::drawing::framework::XResourceId > mxViewId;
+ ::com::sun::star::uno::Reference<com::sun::star::awt::XWindow > mxWindow;
};
} } // end of namespace sd::framework
diff --git a/sd/source/ui/inc/fuconstr.hxx b/sd/source/ui/inc/fuconstr.hxx
index c4199986a5b6..390060a16e3c 100644..100755
--- a/sd/source/ui/inc/fuconstr.hxx
+++ b/sd/source/ui/inc/fuconstr.hxx
@@ -50,7 +50,6 @@ public:
TYPEINFO();
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
virtual void DoExecute( SfxRequest& rReq );
// Mouse- & Key-Events
diff --git a/sd/source/ui/inc/fudraw.hxx b/sd/source/ui/inc/fudraw.hxx
index 77427a7f346e..23f68eda327b 100644..100755
--- a/sd/source/ui/inc/fudraw.hxx
+++ b/sd/source/ui/inc/fudraw.hxx
@@ -50,8 +50,6 @@ class FuDraw
public:
TYPEINFO();
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent );
-
virtual BOOL KeyInput(const KeyEvent& rKEvt);
virtual BOOL MouseMove(const MouseEvent& rMEvt);
virtual BOOL MouseButtonUp(const MouseEvent& rMEvt);
diff --git a/sd/source/ui/inc/fuoutl.hxx b/sd/source/ui/inc/fuoutl.hxx
index a8743fea8a50..92299387849a 100644..100755
--- a/sd/source/ui/inc/fuoutl.hxx
+++ b/sd/source/ui/inc/fuoutl.hxx
@@ -54,8 +54,6 @@ class FuOutline
public:
TYPEINFO();
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
-
virtual BOOL Command(const CommandEvent& rCEvt);
virtual void ScrollStart();
diff --git a/sd/source/ui/inc/fupoor.hxx b/sd/source/ui/inc/fupoor.hxx
index c3c95a384a38..2650e99767b5 100644..100755
--- a/sd/source/ui/inc/fupoor.hxx
+++ b/sd/source/ui/inc/fupoor.hxx
@@ -98,7 +98,6 @@ public:
virtual void ScrollEnd() {} // ForceScroll aufgerufen
void SetWindow(::sd::Window* pWin) { mpWindow = pWin; }
- void WriteStatus(const String& aStr); // Statuszeile schreiben
// #97016# II
virtual void SelectionHasChanged();
@@ -145,7 +144,6 @@ protected:
virtual ~FuPoor (void);
DECL_LINK( DelayHdl, Timer * );
- long diffPoint (long pos1, long pos2);
void ImpForceQuadratic(Rectangle& rRect);
diff --git a/sd/source/ui/inc/fuspell.hxx b/sd/source/ui/inc/fuspell.hxx
deleted file mode 100644
index 1bb37d3a873d..000000000000
--- a/sd/source/ui/inc/fuspell.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_FU_SPELL_HXX
-#define SD_FU_SPELL_HXX
-
-#include "fupoor.hxx"
-
-namespace sd {
-
-extern USHORT SidArraySpell[];
-
-class Outliner;
-
-class FuSpell
- : public FuPoor
-{
-public:
- TYPEINFO();
-
- static FunctionReference Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq );
- virtual void DoExecute( SfxRequest& rReq );
-
- void StartSpelling();
-
- ::sd::Outliner* GetOutliner() const { return pSdOutliner; }
-
-protected:
- virtual ~FuSpell (void);
-
- ::sd::Outliner* pSdOutliner;
- BOOL bOwnOutliner;
-
-private:
- FuSpell (
- ViewShell* pViewSh,
- ::sd::Window* pWin,
- ::sd::View* pView,
- SdDrawDocument* pDoc,
- SfxRequest& rReq);
-};
-
-} // end of namespace sd
-
-#endif
-
-
diff --git a/sd/source/ui/inc/futransf.hxx b/sd/source/ui/inc/futransf.hxx
index be554e941400..85041334c7f0 100644..100755
--- a/sd/source/ui/inc/futransf.hxx
+++ b/sd/source/ui/inc/futransf.hxx
@@ -51,8 +51,6 @@ private:
::sd::View* pView,
SdDrawDocument* pDoc,
SfxRequest& rReq);
-
- Point GetPoint( Rectangle aRect, RECT_POINT eRP );
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/headerfooterdlg.hxx b/sd/source/ui/inc/headerfooterdlg.hxx
index 382727475f84..fa0c4d9282c0 100644..100755
--- a/sd/source/ui/inc/headerfooterdlg.hxx
+++ b/sd/source/ui/inc/headerfooterdlg.hxx
@@ -65,7 +65,6 @@ private:
SdPage* mpCurrentPage;
ViewShell* mpViewShell;
- void initTabPages();
void apply( bool bToAll, bool bForceSlides );
void change( SdUndoGroup* pUndoGroup, SdPage* pPage, const HeaderFooterSettings& rNewSettings );
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index dcf53fc6ffc3..13088dfc64cb 100644..100755
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -163,7 +163,6 @@ public:
SdOptionsLayout( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsLayout() {}
- void SetDefaults();
BOOL operator==( const SdOptionsLayout& rOpt ) const;
BOOL IsRulerVisible() const { Init(); return (BOOL) bRuler; }
@@ -220,7 +219,6 @@ public:
SdOptionsContents( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsContents() {}
- void SetDefaults();
BOOL operator==( const SdOptionsContents& rOpt ) const;
};
@@ -230,7 +228,6 @@ class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem
{
public:
- SdOptionsContentsItem( USHORT nWhich);
SdOptionsContentsItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
@@ -301,7 +298,6 @@ public:
SdOptionsMisc( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsMisc() {}
- void SetDefaults();
BOOL operator==( const SdOptionsMisc& rOpt ) const;
BOOL IsStartWithTemplate() const { Init(); return (BOOL) bStartWithTemplate; }
@@ -427,7 +423,6 @@ public:
SdOptionsSnap( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsSnap() {}
- void SetDefaults();
BOOL operator==( const SdOptionsSnap& rOpt ) const;
BOOL IsSnapHelplines() const { Init(); return (BOOL) bSnapHelplines; }
@@ -494,7 +489,6 @@ public:
SdOptionsZoom( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsZoom() {}
- void SetDefaults();
BOOL operator==( const SdOptionsZoom& rOpt ) const;
void GetScale( INT32& rX, INT32& rY ) const { Init(); rX = nX; rY = nY; }
@@ -503,23 +497,6 @@ public:
// -----------------------------------------------------------------------------
-class SdOptionsZoomItem : public SfxPoolItem
-{
-public:
-
- SdOptionsZoomItem( USHORT nWhich);
- SdOptionsZoomItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
-
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual int operator==( const SfxPoolItem& ) const;
-
- void SetOptions( SdOptions* pOpts ) const;
-
- SdOptionsZoom& GetOptionsZoom() { return maOptionsZoom; }
-private:
- SdOptionsZoom maOptionsZoom;
-};
-
// -----------------
// - SdOptionsGrid -
// -----------------
@@ -569,7 +546,6 @@ class SdOptionsGridItem : public SvxGridItem
{
public:
- SdOptionsGridItem( USHORT nWhich );
SdOptionsGridItem( USHORT nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
void SetOptions( SdOptions* pOpts ) const;
@@ -616,9 +592,6 @@ public:
SdOptionsPrint( USHORT nConfigId, BOOL bUseConfig );
virtual ~SdOptionsPrint() {}
- void SetPrinterOptions( const SdOptionsPrint* pOptions );
-
- void SetDefaults();
BOOL operator==( const SdOptionsPrint& rOpt ) const;
BOOL IsDraw() const { Init(); return (BOOL) bDraw; }
@@ -700,7 +673,6 @@ public:
SdOptions( USHORT nConfigId );
virtual ~SdOptions();
- void SetRangeDefaults( ULONG nOptionRange );
void StoreConfig( ULONG nOptionRange = SD_OPTIONS_ALL );
};
diff --git a/sd/source/ui/inc/outlinfo.hxx b/sd/source/ui/inc/outlinfo.hxx
deleted file mode 100644
index 4f277c0fa320..000000000000
--- a/sd/source/ui/inc/outlinfo.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _OUTLINFO_HXX
-#define _OUTLINFO_HXX
-
-#include <tools/gen.hxx>
-#include <vcl/outdev.hxx>
-
-// ---------------
-// - SdLaserInfo -
-// ---------------
-
-struct OutlinerCharacter
-{
- Rectangle aRect;
- ULONG nPara;
- Color aColor;
-
- // #101500# Removed CharCode, it's only used in one place to compare
- // for single space character. This can be done at creation, too.
- //USHORT nCharCode;
-
- OutlinerCharacter( const Rectangle& _rRect, ULONG _nPara, const Color& _rCol /* #101500#, USHORT _nCharCode*/ )
- : aRect( _rRect ),
- nPara( _nPara ),
- aColor( _rCol )
- {
- }
-};
-
-// -----------------------------------------------------------------------------
-
-struct OutlinerParagraph
-{
- Rectangle aRect;
- ULONG nCharCount;
-
- OutlinerParagraph() : nCharCount( 0 ) {}
- ~OutlinerParagraph() {};
-};
-
-// ----------------
-// - OutlinerInfo -
-// ----------------
-
-class DrawPortionInfo;
-class SdDrawDocument;
-class SdrRectObj;
-
-class OutlinerInfo
-{
-private:
-
- List aCharacterList;
- Rectangle aObjBound;
- Rectangle aParaBound;
- Point aTextOffset;
- OutlinerParagraph* pParagraphs;
- OutputDevice* mpOut;
- ULONG nParaCount;
- ULONG nCurPara;
- long nExtraData;
- BOOL bInit;
- BOOL mbVertical;
-
- OutlinerInfo( const OutlinerInfo& ) {}
- OutlinerInfo& operator=( const OutlinerInfo& ) { return *this; }
-
- DECL_LINK( DrawPortionHdl, DrawPortionInfo* );
-
-public:
-
- OutlinerInfo();
- ~OutlinerInfo();
-
- void Clear();
-
- void SetTextObj( SdDrawDocument* pDoc, SdrRectObj* pObj, OutputDevice* _pOut );
-
- const Rectangle& GetObjRect() const { return aObjBound; }
- const Rectangle& GetTextRect() const { return aParaBound; }
- const Point& GetTextOffset() const { return aTextOffset; }
-
- ULONG GetParaCount() const { return nParaCount; }
-
- const Rectangle& GetParaRect( const ULONG nPara ) const;
- BOOL GetParaCharCount( const ULONG nPara ) const;
-
- ULONG GetCharacterCount() const { return aCharacterList.Count(); }
- OutlinerCharacter* GetCharacter( ULONG nPos ) const { return (OutlinerCharacter*) aCharacterList.GetObject( nPos ); };
- OutlinerCharacter* GetFirstCharacter() { return (OutlinerCharacter*) aCharacterList.First(); }
- OutlinerCharacter* GetNextCharacter() { return (OutlinerCharacter*) aCharacterList.Next(); }
-
- void SetExtraData( const long _nExtraData = 0L ) { nExtraData = _nExtraData; }
- long GetExtraData() const { return nExtraData; }
-
- BOOL IsVertical() const { return mbVertical; }
-};
-
-#endif
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 288bcfb3e359..da9bc20c02d6 100644..100755
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -94,7 +94,6 @@ public:
~SdPrintOptions();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- static USHORT* GetRanges();
virtual BOOL FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
diff --git a/sd/source/ui/inc/res_bmp.hrc b/sd/source/ui/inc/res_bmp.hrc
index 9572d9da6960..1602dc698f3f 100644..100755
--- a/sd/source/ui/inc/res_bmp.hrc
+++ b/sd/source/ui/inc/res_bmp.hrc
@@ -67,36 +67,6 @@
#define RID_GRAFFILTERS RID_APP_START+29
#define RID_GRAFFILTERS_TBX RID_APP_START+30
-#define BMP_FOIL_00 RID_APP_START+10
-#define BMP_FOIL_01 RID_APP_START+11
-#define BMP_FOIL_02 RID_APP_START+12
-#define BMP_FOIL_03 RID_APP_START+13
-#define BMP_FOIL_04 RID_APP_START+14
-#define BMP_FOIL_05 RID_APP_START+15
-#define BMP_FOIL_06 RID_APP_START+16
-#define BMP_FOIL_07 RID_APP_START+17
-#define BMP_FOIL_08 RID_APP_START+18
-#define BMP_FOIL_09 RID_APP_START+19
-#define BMP_FOIL_10 RID_APP_START+20
-#define BMP_FOIL_11 RID_APP_START+21
-#define BMP_FOIL_12 RID_APP_START+22
-#define BMP_FOIL_13 RID_APP_START+23
-#define BMP_FOIL_14 RID_APP_START+24
-#define BMP_FOIL_15 RID_APP_START+25
-#define BMP_FOIL_16 RID_APP_START+26
-#define BMP_FOIL_17 RID_APP_START+27
-#define BMP_FOIL_18 RID_APP_START+28
-#define BMP_FOIL_19 RID_APP_START+29
-#define BMP_FOIL_20 RID_APP_START+30
-#define BMP_FOILH_01 RID_APP_START+31
-#define BMP_FOILH_02 RID_APP_START+32
-#define BMP_FOILH_03 RID_APP_START+33
-#define BMP_FOILH_04 RID_APP_START+34
-#define BMP_FOILH_06 RID_APP_START+35
-#define BMP_FOILH_09 RID_APP_START+36
-#define BMP_FOILN_01 RID_APP_START+40
-#define BMP_FOIL_25 RID_APP_START+41
-
// Bitmaps fuer Tree-ListBox im Effekte-TabDialog
#define BMP_PAGE RID_APP_START+42
#define BMP_PAGEOBJS RID_APP_START+43
@@ -111,8 +81,6 @@
#define BMP_COLLAPSE RID_APP_START+52
#define BMP_GRAPHIC RID_APP_START+53
-#define BMP_FOIL_26 RID_APP_START+54
-
// Bimaps fuer ValueSet im EffekteWindow
#define BMP_EFFECT_NONE RID_APP_START+105
#define BMP_TEXTEFFECT_DISCARD_FROM_T RID_APP_START+106
@@ -170,38 +138,6 @@
#define BMP_EFFECT_UNCOVER_TO_B RID_APP_START+171
#define BMP_EFFECT_UNCOVER_TO_LL RID_APP_START+172
-#define BMP_FOIL_00_H RID_SD_START+182
-#define BMP_FOIL_01_H RID_SD_START+183
-#define BMP_FOIL_02_H RID_SD_START+184
-#define BMP_FOIL_03_H RID_SD_START+185
-#define BMP_FOIL_04_H RID_SD_START+186
-#define BMP_FOIL_05_H RID_SD_START+187
-#define BMP_FOIL_06_H RID_SD_START+188
-#define BMP_FOIL_07_H RID_SD_START+189
-#define BMP_FOIL_08_H RID_SD_START+190
-#define BMP_FOIL_09_H RID_SD_START+191
-#define BMP_FOIL_10_H RID_SD_START+192
-#define BMP_FOIL_11_H RID_SD_START+193
-#define BMP_FOIL_12_H RID_SD_START+194
-#define BMP_FOIL_13_H RID_SD_START+195
-#define BMP_FOIL_14_H RID_SD_START+196
-#define BMP_FOIL_15_H RID_SD_START+197
-#define BMP_FOIL_16_H RID_SD_START+198
-#define BMP_FOIL_17_H RID_SD_START+199
-#define BMP_FOIL_18_H RID_SD_START+200
-#define BMP_FOIL_19_H RID_SD_START+201
-#define BMP_FOIL_20_H RID_SD_START+202
-#define BMP_FOIL_21_H RID_SD_START+203
-#define BMP_FOIL_22_H RID_SD_START+204
-#define BMP_FOIL_23_H RID_SD_START+205
-#define BMP_FOIL_24_H RID_SD_START+206
-#define BMP_FOILH_01_H RID_SD_START+207
-#define BMP_FOILH_02_H RID_SD_START+208
-#define BMP_FOILH_03_H RID_SD_START+209
-#define BMP_FOILH_04_H RID_SD_START+210
-#define BMP_FOILH_06_H RID_SD_START+211
-#define BMP_FOILN_01_H RID_SD_START+212
-
#define BMP_PAGE_H RID_SD_START+213
#define BMP_PAGEOBJS_H RID_SD_START+214
#define BMP_OBJECTS_H RID_SD_START+215
@@ -219,24 +155,78 @@
#define BMP_GROUP_H RID_SD_START+226
#define BMP_WAIT_ICON_H RID_SD_START+229
-#define BMP_CLOSE_DOC RID_SD_START+325
-#define BMP_CLOSE_DOC_H RID_SD_START+326
-#define BMP_TRIANGLE_RIGHT RID_SD_START+327
-#define BMP_TRIANGLE_RIGHT_H RID_SD_START+328
-#define BMP_TRIANGLE_DOWN RID_SD_START+329
-#define BMP_TRIANGLE_DOWN_H RID_SD_START+330
#define BMP_FADE_EFFECT_INDICATOR RID_SD_START+331
#define BMP_FADE_EFFECT_INDICATOR_H RID_SD_START+332
-#define BMP_FOILH_09_H RID_SD_START+333
-#define BMP_FOIL_25_H RID_SD_START+334
-#define BMP_FOIL_26_H RID_SD_START+335
-#define BMP_FOIL_27 RID_SD_START+336
-#define BMP_FOIL_27_H RID_SD_START+337
-
#define BMP_COMMENTS_INDICATOR RID_SD_START+338
#define BMP_COMMENTS_INDICATOR_H RID_SD_START+339
+#define BMP_LAYOUT_EMPTY RID_SD_START+340
+#define BMP_LAYOUT_EMPTY_H RID_SD_START+341
+#define BMP_LAYOUT_HEAD01 RID_SD_START+342
+#define BMP_LAYOUT_HEAD01_H RID_SD_START+343
+#define BMP_LAYOUT_HEAD02 RID_SD_START+344
+#define BMP_LAYOUT_HEAD02_H RID_SD_START+345
+#define BMP_LAYOUT_HEAD02A RID_SD_START+346
+#define BMP_LAYOUT_HEAD02A_H RID_SD_START+347
+#define BMP_LAYOUT_HEAD02B RID_SD_START+348
+#define BMP_LAYOUT_HEAD02B_H RID_SD_START+349
+#define BMP_LAYOUT_HEAD03 RID_SD_START+350
+#define BMP_LAYOUT_HEAD03_H RID_SD_START+351
+#define BMP_LAYOUT_HEAD03A RID_SD_START+352
+#define BMP_LAYOUT_HEAD03A_H RID_SD_START+353
+#define BMP_LAYOUT_HEAD03B RID_SD_START+354
+#define BMP_LAYOUT_HEAD03B_H RID_SD_START+355
+#define BMP_LAYOUT_HEAD03C RID_SD_START+356
+#define BMP_LAYOUT_HEAD03C_H RID_SD_START+357
+#define BMP_LAYOUT_HEAD04 RID_SD_START+358
+#define BMP_LAYOUT_HEAD04_H RID_SD_START+359
+#define BMP_LAYOUT_HEAD06 RID_SD_START+360
+#define BMP_LAYOUT_HEAD06_H RID_SD_START+361
+#define BMP_LAYOUT_TEXTONLY RID_SD_START+362
+#define BMP_LAYOUT_TEXTONLY_H RID_SD_START+363
+#define BMP_LAYOUT_VERTICAL01 RID_SD_START+364
+#define BMP_LAYOUT_VERTICAL01_H RID_SD_START+365
+#define BMP_LAYOUT_VERTICAL02 RID_SD_START+366
+#define BMP_LAYOUT_VERTICAL02_H RID_SD_START+367
+
+#define BMP_FOILH_01 RID_SD_START+388
+#define BMP_FOILH_01_H RID_SD_START+389
+#define BMP_FOILH_02 RID_SD_START+390
+#define BMP_FOILH_02_H RID_SD_START+391
+#define BMP_FOILH_03 RID_SD_START+392
+#define BMP_FOILH_03_H RID_SD_START+393
+#define BMP_FOILH_04 RID_SD_START+394
+#define BMP_FOILH_04_H RID_SD_START+395
+#define BMP_FOILH_06 RID_SD_START+396
+#define BMP_FOILH_06_H RID_SD_START+397
+#define BMP_FOILH_09 RID_SD_START+398
+#define BMP_FOILH_09_H RID_SD_START+399
+
+#define BMP_FOILN_01 RID_SD_START+400
+#define BMP_FOILN_01_H RID_SD_START+401
+
+#define BMP_PLACEHOLDER_SMALL_START (RID_SD_START+402) // these ids must stay in order!
+#define BMP_PLACEHOLDER_TABLE_SMALL (RID_SD_START+402)
+#define BMP_PLACEHOLDER_CHART_SMALL (RID_SD_START+403)
+#define BMP_PLACEHOLDER_IMAGE_SMALL (RID_SD_START+404)
+#define BMP_PLACEHOLDER_MOVIE_SMALL (RID_SD_START+405)
+#define BMP_PLACEHOLDER_TABLE_SMALL_HOVER (RID_SD_START+406)
+#define BMP_PLACEHOLDER_CHART_SMALL_HOVER (RID_SD_START+407)
+#define BMP_PLACEHOLDER_IMAGE_SMALL_HOVER (RID_SD_START+408)
+#define BMP_PLACEHOLDER_MOVIE_SMALL_HOVER (RID_SD_START+409)
+#define BMP_PLACEHOLDER_SMALL_END (RID_SD_START+410)
+#define BMP_PLACEHOLDER_LARGE_START (RID_SD_START+410)
+#define BMP_PLACEHOLDER_TABLE_LARGE (RID_SD_START+410)
+#define BMP_PLACEHOLDER_CHART_LARGE (RID_SD_START+411)
+#define BMP_PLACEHOLDER_IMAGE_LARGE (RID_SD_START+412)
+#define BMP_PLACEHOLDER_MOVIE_LARGE (RID_SD_START+413)
+#define BMP_PLACEHOLDER_TABLE_LARGE_HOVER (RID_SD_START+414)
+#define BMP_PLACEHOLDER_CHART_LARGE_HOVER (RID_SD_START+415)
+#define BMP_PLACEHOLDER_IMAGE_LARGE_HOVER (RID_SD_START+416)
+#define BMP_PLACEHOLDER_MOVIE_LARGE_HOVER (RID_SD_START+417)
+#define BMP_PLACEHOLDER_LARGE_END (RID_SD_START+418) // until here!
+
// -----------------------------------------------------------------------------
#define IMG_PIPETTE_H RID_APP_START+21
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 948a55d3754c..dc98929a9ed1 100644..100755
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -210,7 +210,6 @@ public:
BOOL SelectEntry( const String& rName );
String GetSelectEntry();
List* GetSelectEntryList( USHORT nDepth );
- List* GetBookmarkList( USHORT nType );
SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = NULL);
::sd::DrawDocShell* GetDropDocSh() { return(mpDropDocSh); }
diff --git a/sd/source/ui/inc/sdundogr.hxx b/sd/source/ui/inc/sdundogr.hxx
index b4665dbe5a46..f02977234475 100644..100755
--- a/sd/source/ui/inc/sdundogr.hxx
+++ b/sd/source/ui/inc/sdundogr.hxx
@@ -48,7 +48,6 @@ public:
virtual void Redo();
void AddAction(SdUndoAction* pAction);
- SdUndoAction* GetAction(ULONG nAction) const;
ULONG Count() const { return aCtn.Count(); }
};
diff --git a/sd/source/ui/inc/showview.hxx b/sd/source/ui/inc/showview.hxx
deleted file mode 100644
index 748effbe1985..000000000000
--- a/sd/source/ui/inc/showview.hxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_SHOW_VIEW_HXX
-#define SD_SHOW_VIEW_HXX
-
-#include <svx/fmview.hxx>
-
-class SdDrawDocument;
-
-namespace sd {
-
-class ViewShell;
-
-/*************************************************************************
-|*
-|* Beschreibung ShowView ist die View fuer die Diashow
-|*
-\************************************************************************/
-
-class ShowView
- : public FmFormView
-{
-public:
- // wenn waehrend des Zeichnens Plugins 'connected'
- // werden sollen, muss pWWin ein Zeiger auf das Fenster
- // sein, das das Plugin benutzen soll
- ShowView (
- SdDrawDocument* pDoc,
- OutputDevice* pOut,
- ViewShell* pViewShell,
- ::Window* pWin = NULL);
- virtual ~ShowView (void);
-
- SdDrawDocument& GetDoc() const { return *pDrDoc; }
-
- void SetAllowInvalidate(BOOL bFlag);
- BOOL IsInvalidateAllowed() const;
-
- void SetAllowMasterPageCaching(BOOL bAllow)
- { bAllowMasterPageCaching = bAllow; }
- BOOL IsMasterPageCachingAllowed() const
- { return(bAllowMasterPageCaching); }
-
- virtual void CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L);
- virtual void InvalidateOneWin(::Window& rWin);
- virtual void InvalidateOneWin(::Window& rWin, const Rectangle& rRect);
-
- virtual void DoConnect(SdrOle2Obj* pOleObj);
-
-private:
- SdDrawDocument* pDrDoc;
- ViewShell* mpViewSh;
- Window* pWindowForPlugIns;
- USHORT nAllowInvalidateSmph;
- BOOL bAllowMasterPageCaching;
-
-};
-
-} // end of namespace sd
-
-#endif
-
-
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index bc4df5aa44f5..eda80feeb825 100644..100755
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -173,7 +173,6 @@ public:
ShowWindow* getShowWindow(); // a.k.a. FuSlideShow::GetShowWindow()
int getAnimationMode(); // a.k.a. FuSlideShow::GetAnimationMode()
sal_Int32 getCurrentPageNumber(); // a.k.a. FuSlideShow::GetCurrentPage()
- sal_Int32 getCurrentPageIndex();
sal_Int32 getFirstPageNumber();
sal_Int32 getLastPageNumber();
bool isEndless();
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index 88faf5db8db8..15544c2b5221 100644..100755
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -163,6 +163,7 @@ private:
::sd::View& mrView;
SmartTagReference mxSelectedTag;
+ SmartTagReference mxMouseOverTag;
};
/** a derivation from this handle is the visual representation for a smart tag.
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index ea7a06969d84..d9dc93a1ef20 100644..100755
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -168,26 +168,20 @@
#define STR_DRAW_MEDIA_TOOLBOX RID_DRAW_MEDIA_TOOLBOX
// IDs fuer Praesentationsfolien
-#define STR_AUTOLAYOUT_NONE (RID_APP_START+210)
-#define STR_AUTOLAYOUT_ONLY_TITLE (RID_APP_START+211)
-#define STR_AUTOLAYOUT_TITLE (RID_APP_START+212)
-#define STR_AUTOLAYOUT_OBJ (RID_APP_START+213)
-#define STR_AUTOLAYOUT_ENUM (RID_APP_START+214)
-#define STR_AUTOLAYOUT_CHART (RID_APP_START+215)
-#define STR_AUTOLAYOUT_TAB (RID_APP_START+217)
-#define STR_AUTOLAYOUT_CLIPTEXT (RID_APP_START+218)
-#define STR_AUTOLAYOUT_2TEXT (RID_APP_START+219)
-#define STR_AUTOLAYOUT_TEXTCHART (RID_APP_START+220)
-#define STR_AUTOLAYOUT_TEXTCLIP (RID_APP_START+221)
-#define STR_AUTOLAYOUT_CHARTTEXT (RID_APP_START+222)
-#define STR_AUTOLAYOUT_TEXTOBJ (RID_APP_START+223)
-#define STR_AUTOLAYOUT_TEXT2OBJ (RID_APP_START+224)
-#define STR_AUTOLAYOUT_OBJTEXT (RID_APP_START+225)
-#define STR_AUTOLAYOUT_OBJOVERTEXT (RID_APP_START+226)
-#define STR_AUTOLAYOUT_2OBJTEXT (RID_APP_START+227)
-#define STR_AUTOLAYOUT_2OBJOVERTEXT (RID_APP_START+228)
-#define STR_AUTOLAYOUT_TEXTOVEROBJ (RID_APP_START+229)
-#define STR_AUTOLAYOUT_4OBJ (RID_APP_START+230)
+#define STR_AUTOLAYOUT_NONE (RID_APP_START+210)
+#define STR_AUTOLAYOUT_ONLY_TITLE (RID_APP_START+211)
+#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+212)
+#define STR_AUTOLAYOUT_TITLE (RID_APP_START+213)
+#define STR_AUTOLAYOUT_CONTENT (RID_APP_START+214)
+#define STR_AUTOLAYOUT_2CONTENT (RID_APP_START+215)
+#define STR_AUTOLAYOUT_CONTENT_2CONTENT (RID_APP_START+217)
+#define STR_AUTOLAYOUT_2CONTENT_CONTENT (RID_APP_START+218)
+#define STR_AUTOLAYOUT_CONTENT_OVER_2CONTENT (RID_APP_START+219)
+#define STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT (RID_APP_START+220)
+#define STR_AUTOLAYOUT_CONTENT_OVER_CONTENT (RID_APP_START+221)
+#define STR_AUTOLAYOUT_4CONTENT (RID_APP_START+222)
+#define STR_AUTOLAYOUT_6CONTENT (RID_APP_START+223)
+
#define STR_AUTOLAYOUT_HANDOUT1 (RID_APP_START+231)
#define STR_AUTOLAYOUT_HANDOUT2 (RID_APP_START+232)
#define STR_AUTOLAYOUT_HANDOUT3 (RID_APP_START+233)
@@ -195,13 +189,9 @@
#define STR_AUTOLAYOUT_HANDOUT6 (RID_APP_START+235)
#define STR_AUTOLAYOUT_NOTES (RID_APP_START+236)
#define STR_AUTOLAYOUT_HANDOUT9 (RID_APP_START+237)
-#define STR_AUTOLAYOUT_ONLY_TEXT (RID_APP_START+238)
-#define STR_AUTOLAYOUT_4CLIPART (RID_APP_START+239)
#define STR_TRANSFORM (RID_APP_START+240)
-#define STR_AUTOLAYOUT_6CLIPART (RID_APP_START+241)
-
#define STR_EXPORT_HTML_NAME (RID_APP_START+244)
#define STR_EXPORT_HTML_FILTER (RID_APP_START+245)
#define STR_EXPORT_DIALOG_TITLE (RID_APP_START+261)
@@ -512,6 +502,12 @@
#define STR_NAVIGATOR_SHOW_ALL_SHAPES (RID_APP_START+719)
#define STR_NAVIGATOR_SHAPE_BASE_NAME (RID_APP_START+720)
+#define STR_RESET_LAYOUT (RID_APP_START+721)
+#define STR_INSERT_TABLE (RID_APP_START+722)
+#define STR_INSERT_CHART (RID_APP_START+723)
+#define STR_INSERT_PICTURE (RID_APP_START+724)
+#define STR_INSERT_MOVIE (RID_APP_START+725)
+
/******************************************************************************
* The ids in glob.hrc start at RID_APP_START+750!
******************************************************************************/
diff --git a/sd/source/ui/inc/taskpane/ControlContainer.hxx b/sd/source/ui/inc/taskpane/ControlContainer.hxx
index b4087da5b51b..9c1652f05887 100644..100755
--- a/sd/source/ui/inc/taskpane/ControlContainer.hxx
+++ b/sd/source/ui/inc/taskpane/ControlContainer.hxx
@@ -28,7 +28,6 @@
#ifndef SD_TOOLPANEL_CONTROL_CONTAINER_HXX
#define SD_TOOLPANEL_CONTROL_CONTAINER_HXX
-#include "TitleBar.hxx"
#include <osl/mutex.hxx>
#include <vector>
diff --git a/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx b/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx
index 7a85120e1ad6..5aad9fa29f78 100644..100755
--- a/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx
+++ b/sd/source/ui/inc/taskpane/ILayoutableWindow.hxx
@@ -48,7 +48,7 @@ public:
/** This interface has to be implemented by windows that want to be
- layouted by a ToolPanel, SubToolPanel, or ScrollablePanel object.
+ layouted by a SubToolPanel or ScrollablePanel object.
*/
class ILayoutableWindow
{
diff --git a/sd/source/ui/inc/taskpane/PanelId.hxx b/sd/source/ui/inc/taskpane/PanelId.hxx
new file mode 100644
index 000000000000..565745f97140
--- /dev/null
+++ b/sd/source/ui/inc/taskpane/PanelId.hxx
@@ -0,0 +1,62 @@
+/*************************************************************************
+ * 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_UI_TASKPANE_PANELID_HXX
+#define SD_UI_TASKPANE_PANELID_HXX
+
+namespace rtl
+{
+ class OUString;
+}
+
+//......................................................................................................................
+namespace sd { namespace toolpanel
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= PanelId
+ //==================================================================================================================
+ /** List of top level panels that can be shown in the task pane.
+ */
+ enum PanelId
+ {
+ PID_MASTER_PAGES = 0,
+ PID_LAYOUT = 1,
+ PID_TABLE_DESIGN = 2,
+ PID_CUSTOM_ANIMATION = 3,
+ PID_SLIDE_TRANSITION = 4,
+
+ PID_UNKNOWN = 5
+ };
+
+ PanelId GetStandardPanelId( const ::rtl::OUString& i_rTaskPanelResourceURL );
+
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
+
+#endif // SD_UI_TASKPANE_PANELID_HXX
diff --git a/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
index 019e06d9dd44..f820edc69f09 100644..100755
--- a/sd/source/ui/inc/taskpane/ScrollPanel.hxx
+++ b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
@@ -60,6 +60,10 @@ public:
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.
+ */
+ ScrollPanel (::Window& i_rParentWindow);
virtual ~ScrollPanel (void);
/** Add a control to the sub panel. An title bar is added above the
@@ -127,11 +131,6 @@ public:
Rectangle& aRectangle,
::Window* pWindow);
-protected:
- /** Initiate a rearrangement of the controls.
- */
- void ListHasChanged (void);
-
private:
::Control maScrollWindow;
ScrollBar maVerticalScrollBar;
@@ -171,6 +170,10 @@ private:
*/
sal_Int32 LayoutChildren (void);
+ /** ctor-impl
+ */
+ void Construct();
+
Size SetupScrollBars (const Size& rRequiresSize);
sal_Int32 SetupVerticalScrollBar (bool bShow, sal_Int32 nRange);
sal_Int32 SetupHorizontalScrollBar (bool bShow, sal_Int32 nRange);
diff --git a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx b/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
index 7d5c4c996bc1..933a25f4067d 100644..100755
--- a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
+++ b/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
@@ -54,7 +54,6 @@ class Window;
namespace sd { namespace toolpanel {
-class ControlFactory;
class TreeNode;
/** This panel demonstrates how to create a panel for the task pane.
@@ -71,8 +70,6 @@ public:
virtual void Paint (const Rectangle& rBoundingBox);
virtual void Resize (void);
- static std::auto_ptr<ControlFactory> CreateControlFactory (const SdDrawDocument* pDocument);
-
static SlideSorterCacheDisplay* Instance (const SdDrawDocument* pDocument);
void SetPageCount (sal_Int32 nPageCount);
diff --git a/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
index 9524cdddf748..669c51cfcfad 100644..100755
--- a/sd/source/ui/inc/taskpane/SubToolPanel.hxx
+++ b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
@@ -40,8 +40,6 @@ class Window;
namespace sd { namespace toolpanel {
-class ToolPanel;
-
/** The sub tool panel is in function similar to the tool panel. It
differes in two points. First, it is a control that can be used
as element in a tool panel and thus is actually a nested tool
@@ -67,21 +65,9 @@ public:
parent. This will usually be a child window.
*/
SubToolPanel (TreeNode* pParent);
+ SubToolPanel (Window& i_rParentWindow);
virtual ~SubToolPanel (void);
- /** Add a control to the sub panel.
- @param rTitle
- The title that will be shown in the two title bars that
- belong to the control.
- @param nHelpId
- The help id is set at the title bar not the actual control.
- */
- void AddControl (
- ::std::auto_ptr<TreeNode> pControl,
- const String& rTitle,
- ULONG nHelpId);
- void AddControl (::std::auto_ptr<TreeNode> pControl);
-
virtual void Paint (const Rectangle& rRect);
/** Initiate a rearrangement of the controls and title bars.
@@ -107,11 +93,6 @@ public:
::com::sun::star::accessibility::XAccessible>& rxParent);
using Window::GetWindow;
-protected:
- /** Initiate a rearrangement of the controls.
- */
- void ListHasChanged (void);
-
private:
::Window maWindowFiller;
bool mbIsRearrangePending;
diff --git a/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx b/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx
index 483488b665ac..c86c496a770d 100644..100755
--- a/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx
+++ b/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx
@@ -58,37 +58,34 @@ public:
ControlFactory (void);
virtual ~ControlFactory (void);
- /** Derived classes should overload InternalCreateControl(), not this
- method.
+ /** creates a tree node which acts as root of an own tree
+
+ Derived classes should overload InternalCreateControl.
*/
- ::std::auto_ptr<TreeNode> CreateControl (TreeNode* pTreeNode);
+ ::std::auto_ptr<TreeNode> CreateControl( ::Window& i_rParent );
protected:
- /** This is the internal hook for derived classes to overload in order
- to provide a new control instance.
- */
- virtual TreeNode* InternalCreateControl (TreeNode* pTreeNode) = 0;
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent ) = 0;
};
-/** A simple helper class that realizes a ControlFactory that provides its
- newly created controls with one additional argument (additional to the
- parent TreeNode).
+/** A simple helper class that realizes a ControlFactory that is able to create root controls, providing
+ the to-be-created control with an additional parameter.
*/
template<class ControlType, class ArgumentType>
-class ControlFactoryWithArgs1
+class RootControlFactoryWithArg
: public ControlFactory
{
public:
- ControlFactoryWithArgs1 (ArgumentType& rArgument)
+ RootControlFactoryWithArg (ArgumentType& rArgument)
: mrArgument(rArgument)
{}
protected:
- virtual TreeNode* InternalCreateControl (TreeNode* pTreeNode)
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent )
{
- return new ControlType(pTreeNode, mrArgument);
+ return new ControlType( i_rParent, mrArgument );
}
private:
diff --git a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
index 250e73124854..a1a430c49328 100644..100755
--- a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
+++ b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
@@ -53,9 +53,9 @@ enum TreeNodeStateChangeEventId {
/** Base class for all members of the object hierarchy that makes up the
- tool panel. There are usually at least three levels. At the top level
- is the ToolPanel with one instance: the root of the tree. At the
- middle level there are SubToolPanels and Window/Control objects. At the
+ tool panel. In the task pane, there are multiple hierarchies of such nodes,
+ with every panel having an own tree. The pane node is the root of the tree, below
+ that there are SubToolPanels and Window/Control objects. At the
lowest level there are only Window or Control objects.
This class provides the means of communication between objects on
@@ -69,15 +69,6 @@ public:
TreeNode (TreeNode* pParent);
virtual ~TreeNode (void);
- /** Returns <TRUE/> if the node has no children, i.e. is a leaf of a
- tree. In this case mpControlContainer is NULL.
- */
- bool IsLeaf (void);
-
- /** Returns true if the node has no parent, i.e. is the root of a tree.
- */
- bool IsRoot (void);
-
void SetParentNode (TreeNode* pNewParent);
TreeNode* GetParentNode (void);
@@ -94,14 +85,6 @@ public:
*/
virtual sal_Int32 GetMinimumWidth (void);
- /** Give each node access to the object bar manager of the tool panel.
-
- At least the root node has to overwrite this method since the
- default implementation simply returns the object bar manager of the
- parent.
- */
- virtual ObjectBarManager* GetObjectBarManager (void);
-
/** The default implementaion always returns <FALSE/>
*/
virtual bool IsResizable (void);
@@ -151,7 +134,7 @@ public:
ControlContainer& GetControlContainer (void);
/** Give each node access to a shell manage. This usually is the shell
- manager of the TaskPaneViewShell.
+ manager of the ToolPanelViewShell.
At least the root node has to overwrite this method since the
default implementation simply returns the shell manager of its
@@ -187,14 +170,6 @@ public:
*/
void AddStateChangeListener (const Link& rListener);
- /** Remove the listener form the list of state change listeners.
- @param rListener
- It is OK to specify a listener that is not currently
- registered. Only when the listener is registered it is
- removed. Otherwise the call is ignored.
- */
- void RemoveStateChangeListener (const Link& rListener);
-
/** Call the state change listeners and pass a state change event with
the specified event id. The source field is set to this.
@param pChild
diff --git a/sd/source/ui/inc/taskpane/TitleBar.hxx b/sd/source/ui/inc/taskpane/TitleBar.hxx
index b10adcef07e0..995117516529 100644..100755
--- a/sd/source/ui/inc/taskpane/TitleBar.hxx
+++ b/sd/source/ui/inc/taskpane/TitleBar.hxx
@@ -41,22 +41,13 @@ class VirtualDevice;
namespace sd { namespace toolpanel {
-/** The title bar above a control in a tool panel or sub tool panel.
- The way the title bar is displayed depends on the TitleBarType
- given to the constructor. TBT_CONTROL_TITLE and
- TBT_SUB_CONTROL_HEADLINE both show a expansion indicator in front of
- the title string that shows whether the associated control is
- visible (expanded) or not.
- A title bar with TBT_WINDOW_TITLE is typically used only once as the
- title bar of the whole task pane.
-
- <p>The title bar shows three kinds of indicators: 1) Expansion is
+/** The title bar above a control in a sub tool panel.
+
+ <p>The title bar shows two kinds of indicators: 1) Expansion is
displayed by two sets of two bitmaps, a triangle pointing to the right
resp. a minus in a square indicates that the control is collapsed, a
triangle pointing down resp. a plus in a square stands for an expanded
- control. 2) Keyboard focus is indicated by a dotted rectangle. 3) An
- underlined title string is a mouse over indicator for a
- selectable/expandable control.</p>
+ control. 2) Keyboard focus is indicated by a dotted rectangle.
*/
class TitleBar
: public ::Window,
@@ -64,10 +55,8 @@ class TitleBar
{
public:
enum TitleBarType {
- TBT_WINDOW_TITLE,
- TBT_CONTROL_TITLE,
TBT_SUB_CONTROL_HEADLINE
- };
+ };
/** Create a new title bar whose content, the given title string,
will be formatted according to the given type.
@@ -90,8 +79,8 @@ public:
virtual bool Expand (bool bFlag = true);
virtual bool IsExpanded (void) const;
virtual void SetEnabledState(bool bFlag);
-
- void SetFocus (bool bFlag);
+ virtual void GetFocus (void);
+ virtual void LoseFocus (void);
virtual void MouseMove(const MouseEvent& rEvent);
/** Empty implementation prevents forwarding to docking window.
@@ -115,17 +104,10 @@ private:
String msTitle;
bool mbExpanded;
bool mbFocused;
- bool mbMouseOver;
// Size of the bounding box that encloses the title string.
- Size maStringBox;
::std::auto_ptr<VirtualDevice> mpDevice;
bool mbIsExpandable;
- /** Set the mbMouseOver flag to the given value and paint the
- title bar accordingly.
- */
- void SetMouseOver (bool bFlag);
-
/** Return whether this TitleBar object has an expansion indicator
bitmap. It is safe to call GetExpansionIndicator() when this method
returns <FALSE/> but unnecessary.
@@ -159,8 +141,6 @@ private:
const Rectangle& rTextBox,
int nTitleBarWidth);
- void PaintWindowTitleBar (void);
- void PaintPanelControlTitle (void);
void PaintSubPanelHeadLineBar (void);
void PaintBackground (const Rectangle& rTextBox);
@@ -168,12 +148,6 @@ private:
/// Paint a focus indicator that encloses the given rectangle.
void PaintFocusIndicator (const Rectangle& rIndicatorBox);
- /** Paint a mouse over indicator. If the mouse is over the title
- bar than the text enclosed by the given rectangle is
- underlined.
- */
- void PaintMouseOverIndicator (const Rectangle& rIndicatorBox);
-
Rectangle PaintExpansionIndicator (const Rectangle& rTextBox);
void PaintText (const Rectangle& rTextBox);
diff --git a/sd/source/ui/inc/taskpane/TitledControl.hxx b/sd/source/ui/inc/taskpane/TitledControl.hxx
index a5a319ca5219..cb7cd3b2159c 100644..100755
--- a/sd/source/ui/inc/taskpane/TitledControl.hxx
+++ b/sd/source/ui/inc/taskpane/TitledControl.hxx
@@ -45,7 +45,6 @@ class Window;
namespace sd { namespace toolpanel {
class ControlContainer;
-class ControlFactory;
/** This wrapper adds a title bar to a control. Both title bar and
control are child windows.
@@ -80,13 +79,6 @@ public:
const ClickHandler& rClickHandler,
TitleBar::TitleBarType eType);
- TitledControl (
- TreeNode* pParent,
- ::std::auto_ptr<ControlFactory> pControlFactory,
- const String& rTitle,
- const ClickHandler& rClickHandler,
- TitleBar::TitleBarType eType);
-
virtual ~TitledControl (void);
@@ -98,7 +90,6 @@ public:
virtual void Resize (void);
virtual void GetFocus (void);
- virtual void LoseFocus (void);
virtual void KeyInput (const KeyEvent& rEvent);
// void Select (bool bExpansionState);
@@ -108,8 +99,8 @@ public:
the control has not yet been created and the given flag is <TRUE/>
then the control is created.
*/
- TreeNode* GetControl (bool bCreate=true);
- const TreeNode* GetConstControl (bool bCreate=true) const;
+ TreeNode* GetControl (void);
+ const TreeNode* GetConstControl () const;
const String& GetTitle (void) const;
@@ -134,13 +125,6 @@ public:
virtual void SetEnabledState(bool bFlag);
- /** Ownership of the given data remains with the caller. The data
- is thus not destroyed when the destructor of this class is
- called.
- */
- void SetUserData (void* pUserData);
- void* GetUserData (void) const;
-
virtual bool IsShowing (void) const;
virtual void Show (bool bVisible);
@@ -156,15 +140,8 @@ private:
String msTitle;
bool mbVisible;
void* mpUserData;
- ::std::auto_ptr<ControlFactory> mpControlFactory;
::std::auto_ptr<ClickHandler> mpClickHandler;
- /** Remember whether to toggle (true) the expansion state when the title
- bar is clicked on. When set to false then the control is always
- expanded.
- */
- bool mbExpansionModeIsToggle;
-
/// Do not use! Assignment operator is not supported.
const TitledControl& operator= (
const TitledControl& aDescriptor);
diff --git a/sd/source/ui/inc/taskpane/ToolPanel.hxx b/sd/source/ui/inc/taskpane/ToolPanel.hxx
deleted file mode 100644
index f2c573a21c06..000000000000
--- a/sd/source/ui/inc/taskpane/ToolPanel.hxx
+++ /dev/null
@@ -1,125 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef SD_TOOL_PANEL_HXX
-#define SD_TOOL_PANEL_HXX
-
-#include "taskpane/TaskPaneTreeNode.hxx"
-#include "taskpane/TitledControl.hxx"
-#include <vcl/ctrl.hxx>
-
-#include <vector>
-#include <memory>
-
-class Window;
-
-namespace sd { namespace toolpanel {
-
-class TaskPaneViewShell;
-class ControlFactory;
-
-/** This control is basically a layout manager for the vertical
- stacking of controls. At any one time there is exactly one of
- them visible. For the others only their title bar is shown.
-
- <p>Each control is independant of both other controls and the tool
- panel itself. To be usable by the tool panel they only have to be
- derived from the vcl Window class.</p>
-*/
-class ToolPanel
- : public Control,
- public TreeNode
-{
-public:
- /** Create a new tool panel with the given window as its parent.
- This will usually be a child window.
- */
- ToolPanel (
- ::Window* pParentWindow,
- TaskPaneViewShell& rViewShell);
-
- virtual ~ToolPanel (void);
-
- /** Append the given control to the end of the list of controls that are
- managed by the tool panel.
- @param pControlFactory
- Factory that provides the control on demand, typically when it
- is expanded the first time.
- @param rTitle
- The string that is displayed in the title bar above the control.
- @param nHelpId
- The help id is set at the title bar not the actual control.
- @param rClickHandler
- The click handler typically expands a control when the user has
- clicked on its title.
- */
- sal_uInt32 AddControl (
- ::std::auto_ptr<ControlFactory> pControlFactory,
- const String& rTitle,
- ULONG nHelpId,
- const TitledControl::ClickHandler& rClickHandler);
-
- virtual void Resize (void);
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
-
- virtual void RequestResize (void);
-
- virtual TaskPaneShellManager* GetShellManager (void);
-
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>& rxParent);
-
- using Window::GetWindow;
-
-protected:
- /** Initiate a rearrangement of the controls.
- */
- void ListHasChanged (void);
-
-private:
- TaskPaneViewShell& mrViewShell;
-
- /// Guard against recursive calls or Rearrange().
- bool mbRearrangeActive;
-
- /** Calculate position, size, and visibility of the controls.
- Call this method after the list of controls has changed.
- */
- void Rearrange (void);
-};
-
-
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
diff --git a/sd/source/ui/inc/TaskPaneViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
index d9f432029dc2..5bd0cd877803 100644
--- a/sd/source/ui/inc/TaskPaneViewShell.hxx
+++ b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
@@ -2,10 +2,13 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
+ * $RCSfile: ToolPanelViewShell.hxx,v $
+ * $Revision: 1.12 $
+ *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -25,30 +28,36 @@
*
************************************************************************/
-#ifndef SD_TOOLPANEL_TASK_PANE_VIEW_SHELL_HXX
-#define SD_TOOLPANEL_TASK_PANE_VIEW_SHELL_HXX
+#ifndef SD_TOOL_PANEL_VIEW_SHELL_HXX
+#define SD_TOOL_PANEL_VIEW_SHELL_HXX
#include "ViewShell.hxx"
#include "glob.hxx"
+#include "taskpane/PanelId.hxx"
#include "framework/FrameworkHelper.hxx"
#include <vcl/button.hxx>
#include <sfx2/shell.hxx>
#include <sfx2/viewfac.hxx>
#include <sfx2/dockwin.hxx>
-#include <memory>
#include <boost/shared_ptr.hpp>
+#include <boost/scoped_ptr.hpp>
class PopupMenu;
-namespace sd { namespace toolpanel {
+namespace com { namespace sun { namespace star { namespace ui {
+ class XUIElement;
+} } } }
+
+namespace sd {
+class PaneDockingWindow;
+namespace toolpanel {
class TaskPaneShellManager;
class TitleToolBox;
class TitleBar;
class TitledControl;
-class ToolPanel;
-
+class ToolPanelViewShell_Impl;
/** The tool panel is a view shell for some very specific reasons:
- It fits better into the concept of panes being docking windows whose
content, a view shell, can be exchanged on runtime.
@@ -58,34 +67,19 @@ class ToolPanel;
If interpreted as object bars this can be handled by the
ObjectBarManager of the ViewShell.
*/
-class TaskPaneViewShell
+class ToolPanelViewShell
: public ViewShell
{
public:
TYPEINFO();
- SFX_DECL_INTERFACE(SD_IF_SDTASKPANEVIEWSHELL)
+ SFX_DECL_INTERFACE(SD_IF_SDTOOLPANELSHELL)
- /** List of top level panels that can be shown in the task pane.
- */
- enum PanelId
- {
- PID__START = 0,
- PID_UNKNOWN = PID__START,
- PID_MASTER_PAGES,
- PID_LAYOUT,
- PID_TABLE_DESIGN,
- PID_ANIMATION_SCHEMES,
- PID_CUSTOM_ANIMATION,
- PID_SLIDE_TRANSITION,
- PID__END = PID_SLIDE_TRANSITION
- };
-
- TaskPaneViewShell (
+ ToolPanelViewShell (
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
::Window* pParentWindow,
FrameView* pFrameView);
- virtual ~TaskPaneViewShell (void);
+ virtual ~ToolPanelViewShell (void);
/** Register the SFX interfaces so that (some of) the controls can be
pushed as SFX shells on the shell stack and process slot calls and
@@ -108,37 +102,22 @@ public:
TaskPaneShellManager& GetSubShellManager (void) const;
- /** Called when a mouse button has been pressed but not yet
- released, this handler is used to show the popup menu of the
- title bar.
+ /** deactivates the given panel, bypassing the configuration controller. Only valid for tool panels which are
+ not under the drawing framework's control.
*/
- DECL_LINK(ToolboxClickHandler, ToolBox*);
- DECL_LINK(MenuSelectHandler, Menu*);
+ void ActivatePanel( const ::rtl::OUString& i_rPanelResourceURL );
- /** Make the specified panel visible and expand it.
- @param nId
- The id of the panel that is to be made visible.
+ /** deactivates the given panel, bypassing the configuration controller
*/
- void ShowPanel (const PanelId nId);
+ void DeactivatePanel( const ::rtl::OUString& i_rPanelResourceURL );
- /** Hide and collapse the specified panel.
- @param nId
- The id of the panel that is to hide.
- */
- void HidePanel (const PanelId nId);
-
- /** Expand the specified panel. Its visibility state is not modified.
- @param nId
- The id of the panel that is to expand.
- */
- void ExpandPanel (const PanelId nId);
-
- /** Collapse the specified panel. Its visibility state is not
- modified.
- @param nId
- The id of the panel that is to collapse.
+ /** Return a pointer to the docking window that is the parent or a
+ predecessor of the content window.
+ @return
+ When the view shell is not placed in a docking window, e.g. when
+ shown in the center pane, then <NULL?> is returned.
*/
- void CollapsePanel (const PanelId nId);
+ DockingWindow* GetDockingWindow (void);
virtual ::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible>
@@ -150,13 +129,19 @@ public:
*/
virtual bool RelocateToParentWindow (::Window* pParentWindow);
-private:
- class Implementation;
- ::std::auto_ptr<Implementation> mpImpl;
+ /// returns <TRUE/> if and only if the given window is the panel anchor window of our ToolPanelDeck
+ bool IsPanelAnchorWindow( const ::Window& i_rWindow ) const;
- ::std::auto_ptr<ToolPanel> mpTaskPane;
+ /** creates an XUIElement for the given standard panel
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >
+ CreatePanelUIElement(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocFrame,
+ const ::rtl::OUString& i_rPanelResourceURL
+ );
- bool mbIsInitialized;
+private:
+ ::boost::scoped_ptr< ToolPanelViewShell_Impl > mpImpl;
::boost::shared_ptr<TaskPaneShellManager> mpSubShellManager;
@@ -165,10 +150,9 @@ private:
*/
USHORT mnMenuId;
- /** Create a popup menu. it contains three sections, one for
+ /** Create a popup menu. it contains two sections, one for
docking or un-docking the tool panel, one for toggling the
- visibility state of the tool panel items, and one for bringing
- up a customization dialog.
+ visibility state of the tool panel items.
@param bIsDocking
According to this flag one of the lock/unlock entries is
made disabled.
@@ -176,22 +160,6 @@ private:
::std::auto_ptr<PopupMenu> CreatePopupMenu (bool bIsDocking);
- /** Make sure that as long as there is at least one visible
- control there is exactly one expanded control.
- If the currently expanded control is being hidden then try to
- expand the control after the hidden one or if that does not
- exist expand the one before.
- */
- void EnsureExpandedControl (TitledControl* pHiddenControl);
-
- /** Return a pointer to the docking window that is the parent or a
- predecessor of the content window.
- @return
- When the view shell is not placed in a docking window, e.g. when
- shown in the center pane, then <NULL?> is returned.
- */
- DockingWindow* GetDockingWindow (void);
-
/** Initialize the task pane view shell if that has not yet been done
before. If mbIsInitialized is already set to <TRUE/> then this
method returns immediately.
@@ -202,25 +170,6 @@ private:
-/** This functor makes visible a panel in the task pane. It can be used
- with the FrameworkHelper to make a panel visible after an asynchonous
- update of the configuration, e.g. after switching to another view.
-*/
-class PanelActivation
-{
-public:
- /** Create a new object that, when its operator() method is called, will
- make the specified panel visible in the task pane that belongs to
- the application window specified by the given ViewShellBase.
- */
- PanelActivation (ViewShellBase& rBase, TaskPaneViewShell::PanelId nPanelId);
- void operator() (bool);
-private:
- ViewShellBase& mrBase;
- TaskPaneViewShell::PanelId mnPanelId;
-};
-
-
} } // end of namespace ::sd::toolpanel
#endif
diff --git a/sd/source/ui/inc/tools/PropertySet.hxx b/sd/source/ui/inc/tools/PropertySet.hxx
index c74253092adf..998b4f0e2142 100644..100755
--- a/sd/source/ui/inc/tools/PropertySet.hxx
+++ b/sd/source/ui/inc/tools/PropertySet.hxx
@@ -62,13 +62,6 @@ public:
virtual void SAL_CALL disposing (void);
-
- /** Create an UnknownPropertyException, but do not yet throw it. This
- method fills in the fields of the exception.
- */
- css::beans::UnknownPropertyException CreateUnknownPropertyException (
- const rtl::OUString& rsPropertyName);
-
// XPropertySet
virtual css::uno::Reference<css::beans::XPropertySetInfo>
diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
index d86ac3cf6433..d0661a61636b 100644..100755
--- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
+++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
@@ -92,17 +92,6 @@ public:
*/
void AddResource (const ::css::uno::Reference<css::uno::XInterface>& rxResource);
- /** Tell the container that it is not any longer responsible for the
- specified resource.
- @return
- When the specified resource has previously added to the
- container the resource is returned (which is, of course, the
- same pointer as the given one.) Otherwise a NULL pointer is
- returned.
- */
- ::std::auto_ptr<SdGlobalResource> ReleaseResource (
- SdGlobalResource* pResource);
-
protected:
friend class ::SdModule;
friend class ::std::auto_ptr<SdGlobalResourceContainer>;
diff --git a/sd/source/ui/inc/tools/SlotStateListener.hxx b/sd/source/ui/inc/tools/SlotStateListener.hxx
index 418e4dbf1766..1f45aef331ab 100644..100755
--- a/sd/source/ui/inc/tools/SlotStateListener.hxx
+++ b/sd/source/ui/inc/tools/SlotStateListener.hxx
@@ -57,13 +57,6 @@ class SlotStateListener
public SlotStateListenerInterfaceBase
{
public:
- /** Create a new object that has yet to be told about the the frame and
- slots to listen to and the callback that state changes are relayed
- to. When you want to listen to one single slot then you can use the
- three argument variant of this constructor.
- */
- SlotStateListener (void);
-
/** This convenience version of the constructor takes all parameters
that are necessary to observe a single slot. See descriptions of
the SetCallback(), ConnectToFrame(), and ObserveSlot() methods for
@@ -105,14 +98,6 @@ public:
*/
void ObserveSlot (const ::rtl::OUString& rSlotName);
- /** Return whether the called SlotStateListener is connected to a slot.
- One reason for returning <FALSE/> is that the SlotStateListener has
- been created before the controller and frame have been properly
- initialized.
- */
- bool IsValid (void) const;
-
-
//===== frame::XStatusListener ==========================================
/** Called by slot state change broadcasters. In turn the callback is
diff --git a/sd/source/ui/inc/tpaction.hxx b/sd/source/ui/inc/tpaction.hxx
index d07f24a2dcc2..2ee8bbe6771a 100644..100755
--- a/sd/source/ui/inc/tpaction.hxx
+++ b/sd/source/ui/inc/tpaction.hxx
@@ -114,7 +114,6 @@ private:
void SetActualAnimationEffect( ::com::sun::star::presentation::AnimationEffect eAE );
void SetEditText( String const & rStr );
String GetEditText( BOOL bURL = FALSE );
- String GetMacroName( const String& rPath );
USHORT GetClickActionSdResId( ::com::sun::star::presentation::ClickAction eCA );
USHORT GetAnimationEffectSdResId( ::com::sun::star::presentation::AnimationEffect eAE );
@@ -123,7 +122,6 @@ public:
~SdTPAction();
static SfxTabPage* Create( Window*, const SfxItemSet& );
- static USHORT* GetRanges();
virtual BOOL FillItemSet( SfxItemSet& );
virtual void Reset( const SfxItemSet & );
diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx
index 9cc3555dce3b..a2a80963ad63 100644..100755
--- a/sd/source/ui/inc/unoaprms.hxx
+++ b/sd/source/ui/inc/unoaprms.hxx
@@ -97,8 +97,6 @@ public:
bInfoCreated (bCreated)
{}
- SdAnimationPrmsUndoAction( SdDrawDocument* pTheDoc, SdrObject* pObj );
-
void SetActive(BOOL bTheOldActive, BOOL bTheNewActive)
{ bOldActive = bTheOldActive; bNewActive = bTheNewActive; }
void SetEffect(::com::sun::star::presentation::AnimationEffect eTheOldEffect, ::com::sun::star::presentation::AnimationEffect eTheNewEffect)
diff --git a/sd/source/ui/inc/unosrch.hxx b/sd/source/ui/inc/unosrch.hxx
index e30605181c4c..b19f3751e836 100644..100755
--- a/sd/source/ui/inc/unosrch.hxx
+++ b/sd/source/ui/inc/unosrch.hxx
@@ -58,9 +58,10 @@ protected:
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > GetCurrentShape() const throw();
public:
- SdUnoSearchReplaceShape( ::com::sun::star::drawing::XDrawPage* xPage ) throw(); // danger, these c'tors are only usable if
- SdUnoSearchReplaceShape( ::com::sun::star::drawing::XShape* xShape ) throw(); // the given shape or page is derived from
- virtual ~SdUnoSearchReplaceShape() throw(); // this class!!!
+ // danger, this c'tor is only usable if the given shape or page is derived
+ // from this class!!!
+ SdUnoSearchReplaceShape( ::com::sun::star::drawing::XDrawPage* xPage ) throw();
+ virtual ~SdUnoSearchReplaceShape() throw();
// XReplaceable
virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/sd/source/ui/toolpanel/EmptyWindow.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
index 4137020874f5..0693d1faea7a 100644..100755
--- a/sd/source/ui/toolpanel/EmptyWindow.hxx
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -2,10 +2,13 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
+ * $RCSfile: $
+ * $Revision: $
+ *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -25,33 +28,49 @@
*
************************************************************************/
-#ifndef SD_EMPTY_WINDOW_HXX
-#define SD_EMPTY_WINDOW_HXX
+#ifndef _SD_VIEWOVERLAYMANAGER_HXX
+#define _SD_VIEWOVERLAYMANAGER_HXX
+
+#include <vcl/image.hxx>
+#include <svl/lstner.hxx>
+#include "EventMultiplexer.hxx"
+#include "ViewShellBase.hxx"
+#include "res_bmp.hrc"
-#include <vcl/window.hxx>
+namespace sd
+{
-namespace sd { namespace toolpanel {
+typedef std::vector< rtl::Reference< SmartTag > > ViewTagVector;
-/** Simply paint a solid background and a centered text.
-*/
-class EmptyWindow
- : public ::Window
+class ViewOverlayManager : public SfxListener
{
public:
- EmptyWindow (
- ::Window* pParentWindow,
- Color rBackgroundColor,
- const String& rText);
- virtual ~EmptyWindow (void);
+ ViewOverlayManager( ViewShellBase& rViewShellBase );
+ virtual ~ViewOverlayManager();
+
+ void onZoomChanged();
+ void UpdateTags();
+
+ DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent*);
+ DECL_LINK(UpdateTagsHdl, void *);
- virtual void Paint (const Rectangle& rBoundingBox);
- virtual void Resize (void);
- virtual void GetFocus (void);
+ bool CreateTags();
+ bool DisposeTags();
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
+
+ static BitmapEx maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START];
+ static BitmapEx maSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START];
private:
- String msText;
+ void UpdateImages();
+
+ ViewShellBase& mrBase;
+ ULONG mnUpdateTagsEvent;
+
+ ViewTagVector maTagVector;
};
-} } // end of namespace ::sd::toolpanel
+}
-#endif
+#endif // _SD_VIEWOVERLAYMANAGER_HXX
diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx
index 1e31eaa598ac..6957bfed25ce 100644..100755
--- a/sd/source/ui/inc/zoomlist.hxx
+++ b/sd/source/ui/inc/zoomlist.hxx
@@ -44,7 +44,6 @@ public:
virtual ~ZoomList();
void InsertZoomRect(const Rectangle& rRect);
- Rectangle GetCurrentZoomRect() const;
Rectangle GetNextZoomRect();
Rectangle GetPreviousZoomRect();
BOOL IsNextPossible() const;
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx
index 8a87a10e43d0..a1f583a4e40c 100644..100755
--- a/sd/source/ui/presenter/PresenterCanvas.cxx
+++ b/sd/source/ui/presenter/PresenterCanvas.cxx
@@ -908,22 +908,6 @@ css::rendering::ViewState PresenterCanvas::MergeViewState (
-Reference<rendering::XCanvas> PresenterCanvas::GetSharedCanvas (void) const
-{
- return mxSharedCanvas;
-}
-
-
-
-
-void PresenterCanvas::SetClip (const awt::Rectangle& rClipRectangle)
-{
- maClipRectangle = rClipRectangle;
-}
-
-
-
-
awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWindow)
{
mbOffsetUpdatePending = false;
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 3734f488d370..ba90a92939ca 100644..100755
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -113,7 +113,6 @@ public:
void SetFontDescriptor (const awt::FontDescriptor& rFontDescriptor);
sal_Int32 GetTop (void) const;
void SetTop (const sal_Int32 nTop);
- void ClearText (void);
void SetText (const OUString& Text);
sal_Int32 ParseDistance (const OUString& rsDistance) const;
Reference<rendering::XBitmap> GetBitmap (void);
@@ -533,17 +532,6 @@ void PresenterTextView::Implementation::SetTop (const sal_Int32 nTop)
-void PresenterTextView::Implementation::ClearText (void)
-{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
- msText = OUString();
- mnTotalHeight = 0;
- mxBitmap = NULL;
-}
-
-
-
-
void PresenterTextView::Implementation::SetText (const OUString& rText)
{
DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
diff --git a/sd/source/ui/slideshow/PaneHider.cxx b/sd/source/ui/slideshow/PaneHider.cxx
index f0032b27d1a0..2841891f31ce 100644..100755
--- a/sd/source/ui/slideshow/PaneHider.cxx
+++ b/sd/source/ui/slideshow/PaneHider.cxx
@@ -42,6 +42,8 @@
#include <com/sun/star/drawing/framework/XConfiguration.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
+#include <tools/diagnose_ex.h>
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
@@ -88,7 +90,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false, "caught exception in PaneHider constructor");
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index c951f68d9b74..187d0d5ea715 100644..100755
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -947,13 +947,6 @@ sal_Int32 SlideShow::getCurrentPageNumber()
// ---------------------------------------------------------
-sal_Int32 SlideShow::getCurrentPageIndex()
-{
- return mxController.is() ? mxController->getCurrentSlideIndex() : 0;
-}
-
-// ---------------------------------------------------------
-
void SlideShow::jumpToBookmark( const OUString& sBookmark )
{
if( mxController.is() )
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 0afcb7df053b..5afcb65ab90c 100644..100755
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3697,14 +3697,7 @@ Reference< XSlideShow > SAL_CALL SlideshowImpl::getSlideShow() throw (RuntimeExc
// --------------------------------------------------------------------
-PresentationSettingsEx::PresentationSettingsEx()
-: mbRehearseTimings(sal_False)
-, mbPreview(sal_False)
-, mpParentWindow( 0 )
-{
-}
-
-PresentationSettingsEx::PresentationSettingsEx( PresentationSettingsEx& r )
+PresentationSettingsEx::PresentationSettingsEx( const PresentationSettingsEx& r )
: PresentationSettings( r )
, mbRehearseTimings(r.mbRehearseTimings)
, mbPreview(r.mbPreview)
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index 48dca432671c..cb33c4a740c7 100644..100755
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -112,8 +112,7 @@ struct PresentationSettingsEx : public PresentationSettings
css::uno::Reference< css::drawing::XDrawPage > mxStartPage;
css::uno::Reference< css::animations::XAnimationNode > mxAnimationNode;
- PresentationSettingsEx();
- PresentationSettingsEx( PresentationSettingsEx& );
+ PresentationSettingsEx( const PresentationSettingsEx& );
PresentationSettingsEx( PresentationSettings& );
void SetArguments( const css::uno::Sequence< css::beans::PropertyValue >& rArguments ) throw (css::lang::IllegalArgumentException);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 47818b73d193..1bbecbef3d66 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -178,14 +178,6 @@ void BitmapCache::Clear (void)
-bool BitmapCache::IsEmpty (void) const
-{
- return mpBitmapContainer->empty();
-}
-
-
-
-
bool BitmapCache::IsFull (void) const
{
return mbIsFull;
@@ -261,21 +253,6 @@ bool BitmapCache::BitmapIsUpToDate (const CacheKey& rKey)
-void BitmapCache::ReleaseBitmap (const CacheKey& rKey)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey));
- if (aIterator != mpBitmapContainer->end())
- {
- UpdateCacheSize(aIterator->second, REMOVE);
- mpBitmapContainer->erase(aIterator);
- }
-}
-
-
-
-
void BitmapCache::InvalidateBitmap (const CacheKey& rKey)
{
::osl::MutexGuard aGuard (maMutex);
@@ -348,20 +325,6 @@ void BitmapCache::SetBitmap (
-bool BitmapCache::IsPrecious (const CacheKey& rKey)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- CacheBitmapContainer::iterator aIterator (mpBitmapContainer->find(rKey));
- if (aIterator != mpBitmapContainer->end())
- return aIterator->second.IsPrecious();
- else
- return false;
-}
-
-
-
-
void BitmapCache::SetPrecious (const CacheKey& rKey, bool bIsPrecious)
{
::osl::MutexGuard aGuard (maMutex);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index d0f8766cabf5..2c33e042342f 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -81,10 +81,6 @@ public:
*/
void Clear (void);
- /** Returns <TRUE/> when there is no preview bitmap in the cache.
- */
- bool IsEmpty (void) const;
-
/** Return <TRUE/> when the cache is full, i.e. the cache compactor had
to be run.
*/
@@ -108,11 +104,6 @@ public:
*/
::boost::shared_ptr<BitmapEx> GetBitmap (const CacheKey& rKey);
- /** Release the reference to the preview bitmap that is associated with
- the given key.
- */
- void ReleaseBitmap (const CacheKey& rKey);
-
/** Mark the specified preview bitmap as not being up-to-date anymore.
*/
void InvalidateBitmap (const CacheKey& rKey);
@@ -128,11 +119,6 @@ public:
const ::boost::shared_ptr<BitmapEx>& rpPreview,
bool bIsPrecious);
- /** Return whether the specified preview bitmap has been marked as
- precious.
- */
- bool IsPrecious (const CacheKey& rKey);
-
/** Mark the specified preview bitmap as precious, i.e. that it must not
be compressed or otherwise removed from the cache.
*/
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index 7658d1f3b663..780a429df29e 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -199,15 +199,6 @@ void GenericPageCache::RequestPreviewBitmap (
-void GenericPageCache::InvalidatePreviewBitmap (CacheKey aKey)
-{
- if (mpBitmapCache.get() != NULL)
- mpBitmapCache->InvalidateBitmap(mpCacheContext->GetPage(aKey));
-}
-
-
-
-
void GenericPageCache::ReleasePreviewBitmap (CacheKey aKey)
{
if (mpBitmapCache.get() != NULL)
@@ -294,17 +285,6 @@ void GenericPageCache::SetPreciousFlag (CacheKey aKey, bool bIsPrecious)
-bool GenericPageCache::IsEmpty (void) const
-{
- if (mpBitmapCache.get() != NULL)
- return mpBitmapCache->IsEmpty();
- else
- return true;
-}
-
-
-
-
void GenericPageCache::Pause (void)
{
ProvideCacheAndProcessor();
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
index e38745e2844f..89fc657004e8 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.hxx
@@ -99,12 +99,6 @@ public:
const Size& rSize,
bool bMayBeUpToDate = true);
- /** Tell the cache to replace the bitmap associated with the given
- request data with a new one that reflects recent changes in the
- content of the page object.
- */
- void InvalidatePreviewBitmap (CacheKey aKey);
-
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested a new bitmap.
@@ -124,10 +118,6 @@ public:
*/
void SetPreciousFlag (CacheKey aKey, bool bIsPrecious);
- /** Return <TRUE/> when there is no preview bitmap in the cache.
- */
- bool IsEmpty (void) const;
-
void Pause (void);
void Resume (void);
diff --git a/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx b/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx
deleted file mode 100644
index 6df77bf52800..000000000000
--- a/sd/source/ui/slidesorter/cache/SlsIdleDetector.cxx
+++ /dev/null
@@ -1,66 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "precompiled_sd.hxx"
-
-#include "SlsIdleDetector.hxx"
-
-#include "view/SlideSorterView.hxx"
-#include "tools/IdleDetection.hxx"
-#include "Window.hxx"
-
-namespace sd { namespace slidesorter { namespace cache {
-
-IdleDetector::IdleDetector (
- const ::Window* pWindow,
- const bool bIsSuspendPreviewUpdatesDuringFullScreenPresentation)
- : mpWindow(pWindow),
- mbIsSuspendPreviewUpdatesDuringFullScreenPresentation(
- bIsSuspendPreviewUpdatesDuringFullScreenPresentation)
-{
-}
-
-
-
-
-bool IdleDetector::operator() (void)
-{
- // Determine whether the system is idle.
- sal_Int32 nIdleState (tools::IdleDetection::GetIdleState(mpWindow));
- if (nIdleState == tools::IdleDetection::IDET_IDLE)
- return true;
- else
- return false;
-}
-
-
-} } } // end of namespace ::sd::slidesorter::cache
-
-
-
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
index 29b7cdb687d1..714e1f008329 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCache.cxx
@@ -29,7 +29,6 @@
#include "SlsGenericPageCache.hxx"
#include "SlsRequestFactory.hxx"
-#include "SlsIdleDetector.hxx"
#include "cache/SlsPageCache.hxx"
#include "model/SlideSorterModel.hxx"
#include <boost/bind.hpp>
@@ -81,25 +80,6 @@ BitmapEx PageCache::GetPreviewBitmap (
-void PageCache::RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize)
-{
- return mpImplementation->RequestPreviewBitmap(aKey, rSize);
-}
-
-
-
-
-void PageCache::InvalidatePreviewBitmap (
- CacheKey aKey)
-{
- mpImplementation->InvalidatePreviewBitmap(aKey);
-}
-
-
-
-
void PageCache::ReleasePreviewBitmap (
CacheKey aKey)
{
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index 86354c823b7e..bec9c7fa369d 100644..100755
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -30,7 +30,6 @@
#include "SlsQueueProcessor.hxx"
#include "SlsCacheConfiguration.hxx"
#include "SlsRequestQueue.hxx"
-#include "SlsIdleDetector.hxx"
namespace sd { namespace slidesorter { namespace cache {
diff --git a/sd/source/ui/slidesorter/cache/makefile.mk b/sd/source/ui/slidesorter/cache/makefile.mk
index d9766e892992..58862a28645a 100644..100755
--- a/sd/source/ui/slidesorter/cache/makefile.mk
+++ b/sd/source/ui/slidesorter/cache/makefile.mk
@@ -49,7 +49,6 @@ SLOFILES = \
$(SLO)$/SlsCacheCompactor.obj \
$(SLO)$/SlsCacheConfiguration.obj \
$(SLO)$/SlsGenericPageCache.obj \
- $(SLO)$/SlsIdleDetector.obj \
$(SLO)$/SlsPageCache.obj \
$(SLO)$/SlsPageCacheManager.obj \
$(SLO)$/SlsQueueProcessor.obj \
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index d90f6f0f824f..69c2a02ddc24 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -210,14 +210,6 @@ SlideSorterController::~SlideSorterController (void)
-SlideSorter& SlideSorterController::GetSlideSorter (void) const
-{
- return mrSlideSorter;
-}
-
-
-
-
model::SharedPageDescriptor SlideSorterController::GetPageAt (
const Point& aPixelPosition)
{
@@ -229,23 +221,6 @@ model::SharedPageDescriptor SlideSorterController::GetPageAt (
return pDescriptorAtPoint;
}
-
-
-
-model::SharedPageDescriptor SlideSorterController::GetFadePageAt (
- const Point& aPixelPosition)
-{
- sal_Int32 nHitPageIndex (mrView.GetFadePageIndexAtPoint(aPixelPosition));
- model::SharedPageDescriptor pDescriptorAtPoint;
- if (nHitPageIndex >= 0)
- pDescriptorAtPoint = mrModel.GetPageDescriptor(nHitPageIndex);
-
- return pDescriptorAtPoint;
-}
-
-
-
-
PageSelector& SlideSorterController::GetPageSelector (void)
{
OSL_ASSERT(mpPageSelector.get()!=NULL);
@@ -800,50 +775,6 @@ Rectangle SlideSorterController::Rearrange (bool bForce)
-void SlideSorterController::SetZoom (long int nZoom)
-{
- ::sd::Window* pWindow = mrSlideSorter.GetActiveWindow();
- long int nCurrentZoom ((long int)(
- pWindow->GetMapMode().GetScaleX().operator double() * 100));
-
- if (nZoom > nCurrentZoom)
- {
- Size aPageSize (mrView.GetPageBoundingBox(
- 0,
- view::SlideSorterView::CS_MODEL,
- view::SlideSorterView::BBT_SHAPE).GetSize());
- Size aWindowSize (pWindow->PixelToLogic(
- pWindow->GetOutputSizePixel()));
-
- // The zoom factor must not grow by more then the ratio of the
- // widths of the output window and the page objects.
- long nMaxFactor
- = nCurrentZoom * aWindowSize.Width() / aPageSize.Width();
- // Apply rounding, so that a current zoom factor of 1 is still
- // increased.
- nMaxFactor = (nCurrentZoom * 18 + 5) / 10;
- nZoom = Min(nMaxFactor, nZoom);
- }
- if (nZoom < 1)
- nZoom = 1;
-
- mrView.LockRedraw (TRUE);
- mrView.GetLayouter().SetZoom(nZoom/100.0, pWindow);
- mrView.Layout();
- GetScrollBarManager().UpdateScrollBars (false);
- mrView.GetPreviewCache()->InvalidateCache();
- mrView.RequestRepaint();
- mrView.LockRedraw (FALSE);
-
- /*
- ViewShell::SetZoom (nZoom);
- GetViewFrame()->GetBindings().Invalidate (SID_ATTR_ZOOM);
- */
-}
-
-
-
-
FunctionReference SlideSorterController::CreateSelectionFunction (SfxRequest& rRequest)
{
FunctionReference xFunc( SelectionFunction::Create(mrSlideSorter, rRequest) );
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 5fdee6400959..f5864c3307a1 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -253,19 +253,4 @@ void CurrentSlideManager::HandleModelChange (void)
}
}
-
-
-
-SdPage* GetCurrentSdPage (SlideSorter& rSlideSorter)
-{
- SharedPageDescriptor pDescriptor (
- rSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() == NULL)
- return NULL;
- else
- return pDescriptor->GetPage();
-}
-
-
-
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index 8ed681e3ddfc..dcda73d38dba 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -317,7 +317,7 @@ void FocusManager::SetFocusToToolBox (void)
{
PaneDockingWindow* pPaneDockingWindow = dynamic_cast<PaneDockingWindow*>(pDockingWindow);
if (pPaneDockingWindow != NULL)
- pPaneDockingWindow->GetTitleToolBox()->GrabFocus();
+ pPaneDockingWindow->GetToolBox().GrabFocus();
}
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 04a1821cd6d8..94b3b4afe717 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -49,6 +49,7 @@
#include <com/sun/star/frame/FrameActionEvent.hpp>
#include <com/sun/star/frame/FrameAction.hpp>
#include <sfx2/viewfrm.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star::accessibility;
@@ -228,8 +229,7 @@ void Listener::ConnectToController (void)
}
catch (beans::UnknownPropertyException aEvent)
{
- OSL_TRACE ("caught exception in SlideSorterController::SetupListeners: %s",
- ::rtl::OUStringToOString(aEvent.Message, RTL_TEXTENCODING_UTF8).getStr());
+ DBG_UNHANDLED_EXCEPTION();
}
try
{
@@ -237,8 +237,7 @@ void Listener::ConnectToController (void)
}
catch (beans::UnknownPropertyException aEvent)
{
- OSL_TRACE ("caught exception in SlideSorterController::SetupListeners: %s",
- ::rtl::OUStringToOString(aEvent.Message, RTL_TEXTENCODING_UTF8).getStr());
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -286,9 +285,7 @@ void Listener::DisconnectFromController (void)
}
catch (beans::UnknownPropertyException aEvent)
{
- OSL_TRACE ("caught exception in destructor of SlideSorterController: %s",
- ::rtl::OUStringToOString(aEvent.Message,
- RTL_TEXTENCODING_UTF8).getStr());
+ DBG_UNHANDLED_EXCEPTION();
}
mbListeningToController = false;
@@ -488,9 +485,7 @@ void SAL_CALL Listener::propertyChange (
}
catch (beans::UnknownPropertyException aEvent)
{
- OSL_TRACE ("caught exception while accessing the page number of a slide: %s",
- ::rtl::OUStringToOString(aEvent.Message,
- RTL_TEXTENCODING_UTF8).getStr());
+ DBG_UNHANDLED_EXCEPTION();
}
catch (lang::DisposedException&)
{
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index b50be47a0188..0e8f5e100d1c 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -177,17 +177,6 @@ void PageSelector::DeselectPage (int nPageIndex)
-void PageSelector::DeselectPage (const SdPage* pPage)
-{
- int nPageIndex = (pPage->GetPageNum()-1) / 2;
- SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
- DeselectPage(pDescriptor);
-}
-
-
-
-
void PageSelector::DeselectPage (const SharedPageDescriptor& rpDescriptor)
{
if (rpDescriptor.get()!=NULL && rpDescriptor->Deselect())
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index b928eeb9f4ce..5ee7f6f58b82 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -219,26 +219,6 @@ void ScrollBarManager::PlaceFiller (const Rectangle& aArea)
-void ScrollBarManager::AdaptWindowSize (const Rectangle& rArea)
-{
- Size aPixelContentSize (mpContentWindow->LogicToPixel(
- mrSlideSorter.GetView().GetLayouter().GetPageBox (
- mrSlideSorter.GetModel().GetPageCount()).GetSize()));
- int nHeightDifference = aPixelContentSize.Height() - rArea.GetHeight();
- ::Window* pParentWindow = mpContentWindow->GetParent();
- Size aNewWindowSize (pParentWindow->GetSizePixel());
- if (nHeightDifference != 0)
- {
- aNewWindowSize.Height() += nHeightDifference;
- pParentWindow->SetPosSizePixel(
- pParentWindow->GetPosPixel(),
- aNewWindowSize);
- }
-}
-
-
-
-
void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScrolling)
{
Rectangle aModelArea (mrSlideSorter.GetView().GetModelArea());
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
index d24f8a347646..687019954feb 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.cxx
@@ -54,18 +54,6 @@ SelectionCommand::SelectionCommand (
-void SelectionCommand::AddSlides (
- const ::boost::shared_ptr<PageSelector::PageSelection>& rpSelection)
-{
- PageSelector::PageSelection::iterator iPage = rpSelection->begin();
- PageSelector::PageSelection::iterator iEnd = rpSelection->end();
- for (; iPage!=iEnd; ++iPage)
- AddSlide(((*iPage)->GetPageNum()-1)/2);
-}
-
-
-
-
void SelectionCommand::AddSlide (USHORT nPageIndex)
{
maPagesToSelect.push_back(nPageIndex);
@@ -74,14 +62,6 @@ void SelectionCommand::AddSlide (USHORT nPageIndex)
-void SelectionCommand::SetCurrentSlide (USHORT nPageIndex)
-{
- mnCurrentPageIndex = nPageIndex;
-}
-
-
-
-
void SelectionCommand::operator() (void)
{
OSL_ASSERT(mpCurrentSlideManager.get()!=NULL);
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
index 88ce0ea29b75..7a9d0f27369e 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionCommand.hxx
@@ -64,24 +64,11 @@ public:
const ::boost::shared_ptr<controller::CurrentSlideManager>& rpCurrentSlideManager,
const model::SlideSorterModel& rModel);
- /** Add the pages in the given list of selected pages to those that will
- be selected when this command is executed, i.e. its operator()
- method is called.
- The first page will be set as current page when the new current page
- has not been specified previously.
- */
- void AddSlides (const ::boost::shared_ptr<PageSelector::PageSelection>& rpSelection);
-
/** Remember the specified page to be selected when this command is
executed.
*/
void AddSlide (USHORT nPageIndex);
- /** Call this method to explicitly set the page that will be made the
- current page when this command is executed.
- */
- void SetCurrentSlide (USHORT nPageIndex);
-
/** Execute the command and select the pages added by previous calls to
AddPages() and AddPage().
*/
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 710e7c2eb02d..c1d742ce7158 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -47,7 +47,6 @@
#include "view/SlsLayouter.hxx"
#include "view/SlsPageObjectViewObjectContact.hxx"
#include "framework/FrameworkHelper.hxx"
-#include "showview.hxx"
#include "ViewShellBase.hxx"
#include "DrawController.hxx"
#include <vcl/sound.hxx>
@@ -136,26 +135,6 @@ private:
};
-class SelectionFunction::InsertionIndicatorHandler
-{
-public:
- InsertionIndicatorHandler (SlideSorter& rSlideSorter);
- ~InsertionIndicatorHandler (void);
-
- /** Show the insertion marker at the given coordinates.
- */
- void Start (const Point& rMouseModelPosition);
-
- void UpdatePosition (const Point& rMouseModelPosition);
-
- /** Hide the insertion marker.
- */
- void End (void);
-
-private:
- SlideSorter& mrSlideSorter;
-};
-
class SelectionFunction::EventDescriptor
{
public:
@@ -188,8 +167,7 @@ SelectionFunction::SelectionFunction (
mbDragSelection(false),
maInsertionMarkerBox(),
mbProcessingMouseButtonDown(false),
- mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter)),
- mpInsertionIndicatorHandler(new InsertionIndicatorHandler(mrSlideSorter))
+ mpSubstitutionHandler(new SubstitutionHandler(mrSlideSorter))
{
//af aDelayToScrollTimer.SetTimeout(50);
aDragTimer.SetTimeoutHdl( LINK( this, SelectionFunction, DragSlideHdl ) );
@@ -710,20 +688,6 @@ void SelectionFunction::GotoNextPage (int nOffset)
-void SelectionFunction::ClearOverlays (void)
-{
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
-
- rOverlay.GetSubstitutionOverlay().setVisible(false);
- rOverlay.GetSubstitutionOverlay().Clear();
-
- mpInsertionIndicatorHandler->End();
- rOverlay.GetMouseOverIndicatorOverlay().SetSlideUnderMouse(model::SharedPageDescriptor());
-}
-
-
-
-
void SelectionFunction::ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent)
{
// #95491# remember button state for creation of own MouseEvents
@@ -1350,55 +1314,4 @@ bool SelectionFunction::SubstitutionHandler::IsSubstitutionInsertionNonTrivial (
return bIsNonTrivial;
}
-
-
-
-//===== InsertionIndicatorHandler =============================================
-
-SelectionFunction::InsertionIndicatorHandler::InsertionIndicatorHandler (
- SlideSorter& rSlideSorter)
- : mrSlideSorter(rSlideSorter)
-{
-}
-
-
-
-
-SelectionFunction::InsertionIndicatorHandler::~InsertionIndicatorHandler (void)
-{
-}
-
-
-
-
-void SelectionFunction::InsertionIndicatorHandler::Start (const Point& rMouseModelPosition)
-{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
-
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
-}
-
-
-
-
-void SelectionFunction::InsertionIndicatorHandler::UpdatePosition (const Point& rMouseModelPosition)
-{
- if (mrSlideSorter.GetController().GetProperties()->IsUIReadOnly())
- return;
-
- view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
-}
-
-
-
-
-void SelectionFunction::InsertionIndicatorHandler::End (void)
-{
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
-}
-
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index c566c5bbc7fe..f1b4cb6c39be 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -290,6 +290,7 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
pViewShell->Invalidate(SID_HIDE_SLIDE);
pViewShell->Invalidate(SID_DELETE_PAGE);
pViewShell->Invalidate(SID_DELETE_MASTER_PAGE);
+ pViewShell->Invalidate(SID_ASSIGN_LAYOUT);
// StatusBar
pViewShell->Invalidate (SID_STATUS_PAGE);
diff --git a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
index 1b70cb1e154e..7fe090ad5541 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlideFunction.cxx
@@ -53,12 +53,6 @@ SlideFunction::SlideFunction (
{
}
-FunctionReference SlideFunction::Create( SlideSorter& rSlideSorter, SfxRequest& rRequest )
-{
- FunctionReference xFunc( new SlideFunction( rSlideSorter, rRequest ) );
- return xFunc;
-}
-
void SlideFunction::ScrollStart (void)
{
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 126a599c21d3..6c1123abc031 100644..100755
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -65,7 +65,6 @@
#include "ViewShellBase.hxx"
#include "ViewShellImplementation.hxx"
#include "sdattr.hxx"
-#include "TaskPaneViewShell.hxx"
#include "FrameView.hxx"
#include "zoomlist.hxx"
#include "sdpage.hxx"
@@ -239,12 +238,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_ASSIGN_LAYOUT:
{
- SFX_REQUEST_ARG (rRequest, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
- SFX_REQUEST_ARG (rRequest, pWhatLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- pShell->mpImpl->AssignLayout(
- pDocument->GetSdPage((USHORT)pWhatPage->GetValue(),
- mrSlideSorter.GetModel().GetPageType()),
- (AutoLayout)pWhatLayout->GetValue());
+ pShell->mpImpl->AssignLayout( rRequest, mrSlideSorter.GetModel().GetPageType() );
rRequest.Done ();
}
break;
@@ -483,68 +477,6 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
}
}
-
-
-
-void SlotManager::GetCtrlState (SfxItemSet& rSet)
-{
- if (rSet.GetItemState(SID_RELOAD) != SFX_ITEM_UNKNOWN)
- {
- // "Letzte Version" vom SFx en/disablen lassen
- ViewShell* pShell = mrSlideSorter.GetViewShell();
- if (pShell != NULL)
- {
- SfxViewFrame* pSlideViewFrame = pShell->GetViewFrame();
- DBG_ASSERT(pSlideViewFrame!=NULL,
- "SlideSorterController::GetCtrlState: ViewFrame not found");
- pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet);
- }
- }
-
- // Output quality.
- if (rSet.GetItemState(SID_OUTPUT_QUALITY_COLOR)==SFX_ITEM_AVAILABLE
- ||rSet.GetItemState(SID_OUTPUT_QUALITY_GRAYSCALE)==SFX_ITEM_AVAILABLE
- ||rSet.GetItemState(SID_OUTPUT_QUALITY_BLACKWHITE)==SFX_ITEM_AVAILABLE
- ||rSet.GetItemState(SID_OUTPUT_QUALITY_CONTRAST)==SFX_ITEM_AVAILABLE)
- {
- ULONG nMode = mrSlideSorter.GetView().GetWindow()->GetDrawMode();
- UINT16 nQuality = 0;
-
- switch (nMode)
- {
- case ::sd::ViewShell::OUTPUT_DRAWMODE_COLOR:
- nQuality = 0;
- break;
- case ::sd::ViewShell::OUTPUT_DRAWMODE_GRAYSCALE:
- nQuality = 1;
- break;
- case ::sd::ViewShell::OUTPUT_DRAWMODE_BLACKWHITE:
- nQuality = 2;
- break;
- case ::sd::ViewShell::OUTPUT_DRAWMODE_CONTRAST:
- nQuality = 3;
- break;
- }
-
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_COLOR,
- (BOOL)(nQuality==0)));
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_GRAYSCALE,
- (BOOL)(nQuality==1)));
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_BLACKWHITE,
- (BOOL)(nQuality==2)));
- rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_CONTRAST,
- (BOOL)(nQuality==3)));
- }
-
- if (rSet.GetItemState(SID_MAIL_SCROLLBODY_PAGEDOWN) == SFX_ITEM_AVAILABLE)
- {
- rSet.Put (SfxBoolItem( SID_MAIL_SCROLLBODY_PAGEDOWN, TRUE));
- }
-}
-
-
-
-
void SlotManager::GetMenuState ( SfxItemSet& rSet)
{
EditMode eEditMode = mrSlideSorter.GetModel().GetEditMode();
@@ -1160,38 +1092,6 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
mrSlideSorter.GetView().LockRedraw(FALSE);
}
-
-
-
-void SlotManager::AssignTransitionEffect (void)
-{
- model::SlideSorterModel& rModel (mrSlideSorter.GetModel());
-
- // We have to manually select the pages in the document that are
- // selected in the slide sorter.
- rModel.SynchronizeDocumentSelection();
-
- // #i34011#: Needs review, AF's bugfix is removed here
- //rShell.AssignFromSlideChangeWindow(rModel.GetEditMode());
-
- // We have to remove the selection of master pages to not confuse the
- // model.
- if (rModel.GetEditMode() == EM_MASTERPAGE)
- {
- SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
- USHORT nMasterPageCount = pDocument->GetMasterSdPageCount(PK_STANDARD);
- for (USHORT nIndex=0; nIndex<nMasterPageCount; nIndex++)
- {
- SdPage* pPage = pDocument->GetMasterSdPage(nIndex, PK_STANDARD);
- if (pPage != NULL)
- pPage->SetSelected (FALSE);
- }
- }
-}
-
-
-
-
void SlotManager::ExecuteCommandAsynchronously (::std::auto_ptr<Command> pCommand)
{
// Ownership of command is (implicitely) transferred to the queue.
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index 9a3256a07d86..4a5c2b51ac28 100644..100755
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -68,18 +68,11 @@ class RequestData;
bitmaps and throw.</li>
</p>
- <p>There are three somewhat similar methods for requesting new previews:
- a) GetPreviewBitmap() schedules a re-rendering (when necessary) and
+ <p>There is another somewhat similar methods for requesting new previews:
+ GetPreviewBitmap() schedules a re-rendering (when necessary) and
returns the preview what is currently available, either as a preview of
the preview or, when nothing has changed since the last call, as the
final thing.
- b) RequestPreviewBitmap() schedules, like GetPreviewBitmap(), a
- re-rendering when the currently available preview is not up-to-date. It
- does not, however, return anything. Use this if you can wait for the
- preview.
- c) InvalidatePreviewBitmap() does not schedule a re-rendering, but
- remembers that one is necessary when one of the other two methods is
- called.
</p>
*/
class PageCache
@@ -120,24 +113,6 @@ public:
CacheKey aKey,
const Size& rSize);
- /** When the requested preview bitmap does not yet exist or is not
- up-to-date then the rendering of one is scheduled. Otherwise this
- method does nothing.
- */
- void RequestPreviewBitmap (
- CacheKey aKey,
- const Size& rSize);
-
- /** Tell the cache that the bitmap associated with the given request
- data is not up-to-date anymore. Unlike the RequestPreviewBitmap()
- method this does not trigger the rendering itself. It just
- remembers to render it when the preview is requested the next time.
- @param rRequestData
- It is safe to pass a (barly) living object. It will called only
- once to obtain its page object.
- */
- void InvalidatePreviewBitmap (CacheKey aKey);
-
/** Call this method when a view-object-contact object is being deleted
and does not need (a) its current bitmap in the cache and (b) a
requested new bitmap.
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index af90b60932b9..667aa768ee8f 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -105,8 +105,6 @@ public:
*/
Rectangle Rearrange (bool bForce = false);
- SlideSorter& GetSlideSorter (void) const;
-
/** Return the descriptor of the page that is rendered under the
given position.
@return
@@ -116,14 +114,6 @@ public:
*/
model::SharedPageDescriptor GetPageAt (const Point& rPixelPosition);
- /** Return the descriptor of the page that is associated to the page
- visible fade symbol at the given position.
- @return
- When the given position is not over a visible page fade symbol
- then NULL is returned.
- */
- model::SharedPageDescriptor GetFadePageAt (const Point& rPixelPosition);
-
PageSelector& GetPageSelector (void);
FocusManager& GetFocusManager (void);
controller::Clipboard& GetClipboard (void);
@@ -189,14 +179,6 @@ public:
*/
void UpdateAllPages (void);
- /** Set the zoom factor. The given value is clipped against an upper
- bound.
- @param nZoom
- An integer percent value, i.e. nZoom/100 is the actual zoom
- factor.
- */
- void SetZoom (long int nZoom);
-
/** This factory method creates a selection function.
*/
virtual FunctionReference CreateSelectionFunction (SfxRequest& rRequest);
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
index 24420160b8cd..57aaf9293301 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
@@ -91,7 +91,6 @@ public:
/** Deselect the descriptor that is associated with the given page.
*/
void DeselectPage (int nPageIndex);
- void DeselectPage (const SdPage* pPage);
void DeselectPage (const model::SharedPageDescriptor& rpDescriptor);
/** This convenience method returns the same number of pages that
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
index 9d4c5a9329e2..c93ed7708650 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx
@@ -242,13 +242,6 @@ private:
void PlaceHorizontalScrollBar (const Rectangle& aArea);
void PlaceVerticalScrollBar (const Rectangle& aArea);
void PlaceFiller (const Rectangle& aArea);
-
- /** Make the height of the content window larger or smaller, so that the
-
- content size fits exactly in. This is achieved by changing the size
- of the parent window and rely on the resulting resize.
- */
- void AdaptWindowSize (const Rectangle& rArea);
};
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index ef2bcd7b5617..79b8a1ff5d44 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -99,7 +99,6 @@ protected:
private:
class SubstitutionHandler;
class EventDescriptor;
- class InsertionIndicatorHandler;
/// Set in MouseButtonDown this flag indicates that a page has been hit.
bool mbPageHit;
@@ -121,8 +120,6 @@ private:
::std::auto_ptr<SubstitutionHandler> mpSubstitutionHandler;
- ::std::auto_ptr<InsertionIndicatorHandler> mpInsertionIndicatorHandler;
-
DECL_LINK( DragSlideHdl, Timer* );
void StartDrag (void);
@@ -182,11 +179,6 @@ private:
*/
void ProcessRectangleSelection (bool bToggleSelection);
- /** Hide and clear the insertion indiciator, substitution display and
- selection rectangle.
- */
- void ClearOverlays (void);
-
/** Compute a numerical code that describes a mouse event and that can
be used for fast look up of the appropriate reaction.
*/
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
index 843e6e82b45c..5b8c7d9a08b6 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlideFunction.hxx
@@ -50,8 +50,6 @@ class SlideFunction
public:
TYPEINFO();
- static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest );
-
virtual BOOL MouseMove (const MouseEvent& rMEvt);
virtual BOOL MouseButtonUp (const MouseEvent& rMEvt);
virtual BOOL MouseButtonDown (const MouseEvent& rMEvt);
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index d7b7a0e06831..0e58d5d3b411 100644..100755
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -63,7 +63,6 @@ public:
void FuTemporary (SfxRequest& rRequest);
void FuPermanent (SfxRequest& rRequest);
void FuSupport (SfxRequest& rRequest);
- void GetCtrlState (SfxItemSet &rSet);
void GetMenuState (SfxItemSet &rSet);
void GetClipboardState (SfxItemSet &rSet);
void GetStatusBarState (SfxItemSet& rSet);
@@ -94,8 +93,6 @@ private:
*/
void InsertSlide (SfxRequest& rRequest);
- void AssignTransitionEffect (void);
-
DECL_LINK(UserEventCallback, void*);
};
diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
index 42bc6c2140f7..4ade19087304 100644..100755
--- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
@@ -83,9 +83,6 @@ public:
*/
bool SetEditMode (EditMode eEditMode);
- /** Set the edit mode to that currently used by the controller.
- */
- bool SetEditModeFromController (void);
EditMode GetEditMode (void) const;
PageKind GetPageType (void) const;
@@ -147,10 +144,6 @@ public:
*/
void SynchronizeDocumentSelection (void);
- /** Set the selection of the called model to exactly that of the document.
- */
- void SynchronizeModelSelection (void);
-
/** Replace the factory for the creation of the page objects and
contacts with the given object. The old factory is destroyed.
*/
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
index 0854ad5e678a..81877ce7465c 100644..100755
--- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
@@ -100,13 +100,6 @@ public:
*/
css::uno::Reference<css::drawing::XDrawPage> GetXDrawPage (void) const;
- /** Returns the index of the page as it is displayed in the view as page
- number. The value may differ from the index returned by the
- XDrawPage when there are hidden slides and the XIndexAccess used to
- access the model filters them out.
- */
- sal_Int32 GetPageIndex (void) const;
-
/** Return the page shape that is used for visualizing the page.
*/
view::PageObject* GetPageObject (void);
@@ -176,10 +169,6 @@ public:
void SetPageNumberAreaModelSize (const Size& rSize);
Size GetPageNumberAreaModelSize (void) const;
- /** Returns <TRUE/> when the slide is the current slide.
- */
- bool IsCurrentPage (void) const;
-
/** Set or revoke the state of this slide being the current slide.
*/
void SetIsCurrentPage (const bool bIsCurrent);
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index d5c8dd4bf241..6c16a154ecfd 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -134,7 +134,6 @@ public:
given position.
*/
sal_Int32 GetPageIndexAtPoint (const Point& rPosition) const;
- sal_Int32 GetFadePageIndexAtPoint (const Point& rPosition) const;
view::Layouter& GetLayouter (void);
@@ -206,8 +205,6 @@ public:
*/
void SetSelectionRectangleVisibility (bool bVisible);
- ::sdr::contact::ObjectContact& GetObjectContact (void) const;
-
typedef ::std::pair<sal_Int32,sal_Int32> PageRange;
/** Return the range of currently visible page objects including the
first and last one in that range.
@@ -217,16 +214,6 @@ public:
*/
PageRange GetVisiblePageRange (void);
- /** Return the size of the area where the page numbers are displayed.
- @return
- The returned size is given in model coordinates.
- */
- Size GetPageNumberAreaModelSize (void) const;
-
- /** Return the size of the border around the original SdrPageObj.
- */
- SvBorder GetModelBorder (void) const;
-
/** Add a shape to the page. Typically used from inside
PostModelChange().
*/
diff --git a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
index 246dcbc05ee7..9b1fd996e9c0 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsLayouter.hxx
@@ -69,14 +69,6 @@ public:
Layouter (void);
~Layouter (void);
- /** Set the minimal, the maximal, and the desired width of the page
- objects. The three parameters have to fullfill the constraint
- nMinimalWidth <= nPreferredWidth <= nMaximalWidth or the call is
- ignored.
- */
- void SetObjectWidth (sal_Int32 nMinimalWidth, sal_Int32 nMaximalWidth,
- sal_Int32 nPreferredWidth);
-
/** Set the horizontal and vertical borders in pixel coordinates between
the enclosing window and page objects. The borders may be painted
larger then the given values when the space for the insertion marker
@@ -114,13 +106,6 @@ public:
void SetPageBorders (sal_Int32 nLeftBorder, sal_Int32 nRightBorder,
sal_Int32 nTopBorder, sal_Int32 nBottomBorder);
- /** Set the horizontal and vertical gaps between adjacent page objects.
- These gaps are only relevant when there is more than one column or
- more than one row. Negative values indicate that the respective gap
- is not set.
- */
- void SetGaps (sal_Int32 nHorizontalGap, sal_Int32 nVerticalGap);
-
/** Set the interval of valid column counts. When nMinimalColumnCount
<= nMaximalColumnCount is not fullfilled then the call is ignored.
@param nMinimalColumnCount
@@ -160,19 +145,12 @@ public:
/** Change the zoom factor. This does not change the general layout
(number of columns).
*/
- void SetZoom (double nZoomFactor, OutputDevice* pDevice);
void SetZoom (Fraction nZoomFactor, OutputDevice* pDevice);
/** Return the number of columns.
*/
sal_Int32 GetColumnCount (void) const;
- /** Returns whether the column count is fixed (<TRUE/>) or variable
- (<FALSE/>). It is fixed if SetColumnCount() was called with the
- same value for minimal and maximal column count.
- */
- bool IsColumnCountFixed (void) const;
-
/** Return the scale factor that can be set at the map mode of the
output window.
*/
@@ -289,7 +267,6 @@ public:
const DoublePoint&rLayouterPoint) const;
typedef ::std::vector<Rectangle> BackgroundRectangleList;
- const BackgroundRectangleList& GetBackgroundRectangleList (void) const;
private:
class ScreenAndModelValue {public:
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx
index c0083ff92d73..31899d3b3e44 100644..100755
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewContact.hxx
@@ -69,8 +69,6 @@ public:
SdrPageObj& GetPageObject (void) const;
- Rectangle GetPageObjectBoundingBox (void) const;
-
virtual void ActionChanged (void);
protected:
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index be298856c066..0bf9052f5382 100644..100755
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -50,6 +50,8 @@
#include "sdpage.hxx"
#include "FrameView.hxx"
+#include <tools/diagnose_ex.h>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -119,30 +121,6 @@ bool SlideSorterModel::SetEditMode (EditMode eEditMode)
-bool SlideSorterModel::SetEditModeFromController (void)
-{
- bool bIsMasterPageMode = false;
- // Get the edit mode from the controller.
- try
- {
- Reference<beans::XPropertySet> xSet (mrSlideSorter.GetXController(), UNO_QUERY_THROW);
- Any aValue (xSet->getPropertyValue(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsMasterPageMode"))));
- aValue >>= bIsMasterPageMode;
- }
- catch (RuntimeException&)
- {
- // When the property is not supported then the master
- // page mode is not supported, too.
- bIsMasterPageMode = false;
- }
-
- return SetEditMode(bIsMasterPageMode ? EM_MASTERPAGE : EM_PAGE);
-}
-
-
-
-
EditMode SlideSorterModel::GetEditMode (void) const
{
return meEditMode;
@@ -225,13 +203,9 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
return nNumber;
}
}
- catch (beans::UnknownPropertyException&)
+ catch (uno::Exception&)
{
- OSL_ASSERT(false);
- }
- catch (lang::DisposedException&)
- {
- OSL_ASSERT(false);
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -313,27 +287,6 @@ void SlideSorterModel::SynchronizeDocumentSelection (void)
}
}
-
-
-
-void SlideSorterModel::SynchronizeModelSelection (void)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(*this));
- while (aAllPages.HasMoreElements())
- {
- SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
- if (pDescriptor->GetPage()->IsSelected())
- pDescriptor->Select ();
- else
- pDescriptor->Deselect ();
- }
-}
-
-
-
-
void SlideSorterModel::SetPageObjectFactory(
::std::auto_ptr<controller::PageObjectFactory> pPageObjectFactory)
{
diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
index 2010d313c9dd..ffd93cbf0a13 100644..100755
--- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
@@ -92,14 +92,6 @@ Reference<drawing::XDrawPage> PageDescriptor::GetXDrawPage (void) const
-sal_Int32 PageDescriptor::GetPageIndex (void) const
-{
- return mnIndex;
-}
-
-
-
-
view::PageObject* PageDescriptor::GetPageObject (void)
{
if (mpPageObject==NULL && mpPageObjectFactory!=NULL && mpPage != NULL)
@@ -279,14 +271,6 @@ Size PageDescriptor::GetPageNumberAreaModelSize (void) const
-bool PageDescriptor::IsCurrentPage (void) const
-{
- return mbIsCurrent;
-}
-
-
-
-
void PageDescriptor::SetIsCurrentPage (const bool bIsCurrent)
{
mbIsCurrent = bIsCurrent;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index db5d948b52fc..787086b4596e 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -631,18 +631,6 @@ void SlideSorterService::Resize (void)
-void SlideSorterService::Rearrange (void)
-{
- if (mxParentWindow.is())
- {
- awt::Rectangle aWindowBox = mxParentWindow->getPosSize();
- mpSlideSorter->GetController().Rearrange();
- }
-}
-
-
-
-
void SlideSorterService::ThrowIfDisposed (void)
throw (::com::sun::star::lang::DisposedException)
{
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
index a502442ab9f2..9af239c64fd1 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.hxx
@@ -204,7 +204,6 @@ private:
::boost::scoped_ptr<cppu::IPropertyArrayHelper> mpPropertyArrayHelper;
void Resize (void);
- void Rearrange (void);
/** This method throws a DisposedException when the object has already been
disposed.
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 83475948fab2..86ec4002cd02 100644..100755
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -327,22 +327,6 @@ SfxUndoManager* SlideSorterViewShell::ImpGetUndoManager (void) const
-SfxShell* SlideSorterViewShell::CreateInstance (
- sal_Int32,
- SfxShell*,
- void* pUserData,
- ViewShellBase& rBase)
-{
- return new SlideSorterViewShell (
- rBase.GetViewFrame(),
- rBase,
- static_cast< ::Window*>(pUserData),
- NULL);
-}
-
-
-
-
void SlideSorterViewShell::GetFocus (void)
{
OSL_ASSERT(mpSlideSorter.get()!=NULL);
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 82aac5b2cd9e..47ce907be637 100644..100755
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -171,52 +171,6 @@ sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rPosition) const
-sal_Int32 SlideSorterView::GetFadePageIndexAtPoint (
- const Point& rPosition) const
-{
- sal_Int32 nIndex (-1);
-
- ::sd::Window* pWindow = GetWindow();
- if (pWindow != NULL)
- {
- Point aModelPosition (pWindow->PixelToLogic (rPosition));
- nIndex = mpLayouter->GetIndexAtPoint(
- aModelPosition,
- true // Include page borders into hit test
- );
-
- // Clip the page index against the page count.
- if (nIndex >= mrModel.GetPageCount())
- nIndex = -1;
-
- if (nIndex >= 0)
- {
- // Now test whether the given position is inside the area of the
- // fade effect indicator.
- view::PageObjectViewObjectContact* pContact
- = mrModel.GetPageDescriptor(nIndex)->GetViewObjectContact();
- if (pContact != NULL)
- {
- if ( ! pContact->GetBoundingBox(
- *pWindow,
- PageObjectViewObjectContact::FadeEffectIndicatorBoundingBox,
- PageObjectViewObjectContact::ModelCoordinateSystem).IsInside (
- aModelPosition))
- {
- nIndex = -1;
- }
- }
- else
- nIndex = -1;
- }
- }
-
- return nIndex;
-}
-
-
-
-
Layouter& SlideSorterView::GetLayouter (void)
{
return *mpLayouter.get();
@@ -725,14 +679,6 @@ ViewOverlay& SlideSorterView::GetOverlay (void)
-::sdr::contact::ObjectContact& SlideSorterView::GetObjectContact (void) const
-{
- return GetSdrPageView()->GetPageWindow(0)->GetObjectContact();
-}
-
-
-
-
SlideSorterView::PageRange SlideSorterView::GetVisiblePageRange (void)
{
const int nMaxPageIndex (mrModel.GetPageCount() - 1);
@@ -821,22 +767,6 @@ void SlideSorterView::UpdatePageBorders (void)
-Size SlideSorterView::GetPageNumberAreaModelSize (void) const
-{
- return maPageNumberAreaModelSize;
-}
-
-
-
-
-SvBorder SlideSorterView::GetModelBorder (void) const
-{
- return maModelBorder;
-}
-
-
-
-
void SlideSorterView::AddSdrObject (SdrObject& rObject)
{
mpPage->InsertObject(&rObject);
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index 1ba44caa24b0..3767a655c48b 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -71,22 +71,6 @@ Layouter::~Layouter (void)
}
-void Layouter::SetObjectWidth (
- sal_Int32 nMinimalWidth,
- sal_Int32 nMaximalWidth,
- sal_Int32 nPreferredWidth)
-{
- if (nMinimalWidth <= nPreferredWidth && nPreferredWidth <= nMaximalWidth)
- {
- mnMinimalWidth = nMinimalWidth;
- mnPreferredWidth = nMaximalWidth;
- mnMaximalWidth = nPreferredWidth;
- }
-}
-
-
-
-
void Layouter::SetBorders (
sal_Int32 nLeftBorder,
sal_Int32 nRightBorder,
@@ -125,20 +109,6 @@ void Layouter::SetPageBorders (
-void Layouter::SetGaps (
- sal_Int32 nHorizontalGap,
- sal_Int32 nVerticalGap)
-{
- if (nHorizontalGap >= 0)
- mnHorizontalGap.mnScreen = nHorizontalGap;
- if (nVerticalGap >= 0)
- mnVerticalGap.mnScreen = nVerticalGap;
-}
-
-
-
-
-
void Layouter::SetColumnCount (
sal_Int32 nMinimalColumnCount,
sal_Int32 nMaximalColumnCount)
@@ -337,14 +307,6 @@ bool Layouter::RearrangeVertical (
-void Layouter::SetZoom (double nZoomFactor, OutputDevice* pDevice)
-{
- SetZoom(Fraction(nZoomFactor), pDevice);
-}
-
-
-
-
void Layouter::SetZoom (Fraction nZoomFactor, OutputDevice* pDevice)
{
MapMode aMapMode (pDevice->GetMapMode());
@@ -406,14 +368,6 @@ sal_Int32 Layouter::GetColumnCount (void) const
-bool Layouter::IsColumnCountFixed (void) const
-{
- return mnMinimalColumnCount == mnMaximalColumnCount;
-}
-
-
-
-
Size Layouter::GetPageObjectSize (void) const
{
return maPageObjectModelSize;
@@ -801,13 +755,4 @@ sal_Int32 Layouter::ResolvePositionInGap (
-const Layouter::BackgroundRectangleList&
- Layouter::GetBackgroundRectangleList (void) const
-{
- return maBackgroundRectangleList;
-}
-
-
-
-
} } } // end of namespace ::sd::slidesorter::namespace
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
index 5ef90ad2830b..303e78eeff61 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewContact.cxx
@@ -93,21 +93,6 @@ void PageObjectViewContact::ActionChanged (void)
ViewContactOfPageObj::ActionChanged();
}
-Rectangle PageObjectViewContact::GetPageObjectBoundingBox (void) const
-{
- // use model data directly here
- OSL_ASSERT(mpDescriptor.get()!=NULL);
- Rectangle aRetval(GetPageObject().GetLastBoundRect());
- const SvBorder aPageDescriptorBorder(mpDescriptor->GetModelBorder());
-
- aRetval.Left() -= aPageDescriptorBorder.Left();
- aRetval.Top() -= aPageDescriptorBorder.Top();
- aRetval.Right() += aPageDescriptorBorder.Right();
- aRetval.Bottom() += aPageDescriptorBorder.Bottom();
-
- return aRetval;
-}
-
SdrPageObj& PageObjectViewContact::GetPageObject (void) const
{
return ViewContactOfPageObj::GetPageObj();
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
index 8f259e2a8c0f..b1e4e80fdf1f 100644..100755
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
@@ -61,6 +61,7 @@
#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;
@@ -626,7 +627,6 @@ private:
// private helpers
const BitmapEx& getFadeEffectIconBitmap() const;
- const BitmapEx& getCommentsIconBitmap() const;
protected:
// method which is to be used to implement the local decomposition of a 2D primitive.
@@ -684,21 +684,6 @@ const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getFadeEffectIconBitmap() c
const sal_Int32 SdPageObjectFadeNameNumberPrimitive::mnCommentsIndicatorOffset(9);
BitmapEx* SdPageObjectFadeNameNumberPrimitive::mpCommentsIconBitmap = 0;
-const BitmapEx& SdPageObjectFadeNameNumberPrimitive::getCommentsIconBitmap() const
-{
- if(mpCommentsIconBitmap == NULL)
- {
- // prepare CommentsIconBitmap on demand
- const sal_uInt16 nIconId(Application::GetSettings().GetStyleSettings().GetHighContrastMode()
- ? BMP_COMMENTS_INDICATOR_H
- : BMP_COMMENTS_INDICATOR);
- const BitmapEx aCommentsIconBitmap(IconCache::Instance().GetIcon(nIconId).GetBitmapEx());
- const_cast< SdPageObjectFadeNameNumberPrimitive* >(this)->mpCommentsIconBitmap = new BitmapEx(aCommentsIconBitmap);
- }
-
- return *mpCommentsIconBitmap;
-}
-
Primitive2DSequence SdPageObjectFadeNameNumberPrimitive::create2DDecomposition(const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
{
const xub_StrLen nTextLength(getPageName().Len());
@@ -1166,7 +1151,7 @@ BitmapEx PageObjectViewObjectContact::GetPreview (
}
catch (const ::com::sun::star::uno::Exception&)
{
- OSL_TRACE("PageObjectViewObjectContact::GetPreview: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
return aBitmap;
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 678fdf6ccda7..cdba12e9887e 100644..100755
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -343,7 +343,9 @@ void TableDesignPane::onSelectionChanged()
}
Reference< XShapeDescriptor > xDesc( aSel, UNO_QUERY );
- if( xDesc.is() && xDesc->getShapeType().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.TableShape" ) ) )
+ if( xDesc.is() &&
+ ( xDesc->getShapeType().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.TableShape" ) ) ||
+ xDesc->getShapeType().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.TableShape" ) ) ) )
{
xNewSelection = Reference< XPropertySet >::query( xDesc );
}
@@ -389,7 +391,7 @@ void TableDesignPane::updateLayout()
mxControls[nId]->SetPaintTransparent(TRUE);
mxControls[nId]->SetBackground();
}
- aValueSetSize = Size( aPaneSize.Width() - 2 * aOffset.X(), nStylesHeight - mxControls[FL_TABLE_STYLES]->GetSizePixel().Height() - mnOrgOffsetY[FL_TABLE_STYLES] );
+ aValueSetSize = Size( pValueSet->GetSizePixel().Width(), nStylesHeight - mxControls[FL_TABLE_STYLES]->GetSizePixel().Height() - mnOrgOffsetY[FL_TABLE_STYLES] );
}
else
{
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 9d3de5904f43..b30e259e049a 100644..100755
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -70,6 +70,7 @@
#include "Window.hxx"
#include "drawview.hxx"
#include "sdresid.hxx"
+#include "undo/undoobjects.hxx"
using ::rtl::OUString;
using namespace ::sd;
@@ -147,21 +148,48 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
nRows = pDlg->getRows();
}
- Size aSize( 14100, 200 );
+ Rectangle aRect;
- Point aPos;
- Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
- aPos = aWinRect.Center();
- aPos = GetActiveWindow()->PixelToLogic(aPos);
- aPos.X() -= aSize.Width() / 2;
- aPos.Y() -= aSize.Height() / 2;
- Rectangle aRect (aPos, aSize);
+ SdrObject* pPickObj = mpView->GetEmptyPresentationObject( PRESOBJ_TABLE );
+ if( pPickObj )
+ {
+ aRect = pPickObj->GetLogicRect();
+ aRect.setHeight( 200 );
+ }
+ else
+ {
+ Size aSize( 14100, 200 );
+
+ Point aPos;
+ Rectangle aWinRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
+ aPos = aWinRect.Center();
+ aPos = GetActiveWindow()->PixelToLogic(aPos);
+ aPos.X() -= aSize.Width() / 2;
+ aPos.Y() -= aSize.Height() / 2;
+ aRect = Rectangle(aPos, aSize);
+ }
::sdr::table::SdrTableObj* pObj = new ::sdr::table::SdrTableObj( GetDoc(), aRect, nColumns, nRows );
pObj->NbcSetStyleSheet( GetDoc()->GetDefaultStyleSheet(), sal_True );
apply_table_style( pObj, GetDoc(), sTableStyle );
SdrPageView* pPV = mpView->GetSdrPageView();
- mpView->InsertObjectAtView(pObj, *pPV, SDRINSERT_SETDEFLAYER);
+
+ // if we have a pick obj we need to make this new ole a pres obj replacing the current pick obj
+ if( pPickObj )
+ {
+ SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
+ if(pPage && pPage->IsPresObj(pPickObj))
+ {
+ pObj->SetUserCall( pPickObj->GetUserCall() );
+ pPage->InsertPresObj( pObj, PRESOBJ_TABLE );
+ }
+ }
+
+ if( pPickObj )
+ mpView->ReplaceObjectAtView(pPickObj, *pPV, pObj, TRUE );
+ else
+ mpView->InsertObjectAtView(pObj, *pPV, SDRINSERT_SETDEFLAYER);
+
Invalidate(SID_DRAWTBX_INSERT);
rReq.Ignore();
break;
diff --git a/sd/source/ui/toolpanel/EmptyWindow.cxx b/sd/source/ui/toolpanel/EmptyWindow.cxx
deleted file mode 100644
index 2e964fa4e30b..000000000000
--- a/sd/source/ui/toolpanel/EmptyWindow.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "EmptyWindow.hxx"
-
-namespace sd { namespace toolpanel {
-
-
-EmptyWindow::EmptyWindow (
- Window* pParentWindow,
- Color aBackgroundColor,
- const String& rText)
- : Window (pParentWindow, WinBits()),
- msText (rText)
-{
- SetBackground (aBackgroundColor);
-}
-
-
-
-
-EmptyWindow::~EmptyWindow (void)
-{
-}
-
-
-
-
-void EmptyWindow::Paint (const Rectangle& )
-{
- Size aWindowSize (GetOutputSizePixel());
- Point aPosition(aWindowSize.Width()/2,aWindowSize.Height()/2);
-
- Rectangle aBBox;
- aPosition = Point(10,aWindowSize.Height()/2);
- if (GetTextBoundRect (aBBox, msText))
- aPosition = Point (
- (aWindowSize.Width()-aBBox.GetWidth())/2,
- (aWindowSize.Height()-aBBox.GetHeight())/2);
- DrawText (aPosition, msText);
-
- String sSizeString = String::CreateFromInt32(aWindowSize.Width());
- sSizeString.Append (String::CreateFromAscii(" x "));
- sSizeString.Append (String::CreateFromInt32(aWindowSize.Height()));
- if (GetTextBoundRect (aBBox, sSizeString))
- aPosition = Point (
- (aWindowSize.Width()-aBBox.GetWidth())/2,
- aPosition.Y() + GetTextHeight() + aBBox.GetHeight());
- DrawText (aPosition, sSizeString);
-}
-
-
-
-
-void EmptyWindow::Resize (void)
-{
- Window::Resize();
-}
-
-
-
-
-void EmptyWindow::GetFocus (void)
-{
- GetParent()->GrabFocus();
-}
-
-
-} } // end of namespace ::sd::tpv
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index a2bb1d0cbbac..ec4eb1e43d4d 100644..100755
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -47,6 +47,7 @@
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
#include "taskpane/TaskPaneControlFactory.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "taskpane/ScrollPanel.hxx"
#include "tools/SlotStateListener.hxx"
#include "EventMultiplexer.hxx"
@@ -84,40 +85,32 @@ using ::sd::framework::FrameworkHelper;
namespace sd { namespace toolpanel {
-/** This factory class stores references to ViewShellBase and DrawDocShell
- and passes them to new LayoutMenu objects.
-*/
-class LayoutMenuFactory
+class LayoutMenuRootFactory
: public ControlFactory
{
public:
- LayoutMenuFactory (ViewShellBase& rBase, DrawDocShell& rDocShell)
- : mrBase(rBase),
- mrDocShell(rDocShell)
- {}
+ LayoutMenuRootFactory (ToolPanelViewShell& i_rPanelViewShell)
+ :mrPanelViewShell(i_rPanelViewShell)
+ {
+ }
protected:
- virtual TreeNode* InternalCreateControl (TreeNode* pTreeNode)
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent )
{
- ScrollPanel* pScrollPanel = new ScrollPanel (pTreeNode);
+ ScrollPanel* pScrollPanel = new ScrollPanel (i_rParent);
::std::auto_ptr<TreeNode> pMenu (
new LayoutMenu (
pScrollPanel,
- mrDocShell,
- mrBase,
- false));
+ mrPanelViewShell));
pScrollPanel->AddControl(pMenu);
return pScrollPanel;
}
private:
- ViewShellBase& mrBase;
- DrawDocShell& mrDocShell;
+ ToolPanelViewShell& mrPanelViewShell;
};
-
-
SFX_IMPL_INTERFACE(LayoutMenu, SfxShell,
SdResId(STR_TASKPANELAYOUTMENU))
{
@@ -161,83 +154,50 @@ static snewfoil_value_info handout[] =
static snewfoil_value_info standard[] =
{
- {BMP_FOIL_20, BMP_FOIL_20_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB,
- AUTOLAYOUT_NONE},
- {BMP_FOIL_00, BMP_FOIL_00_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB,
- AUTOLAYOUT_TITLE},
- {BMP_FOIL_01, BMP_FOIL_01_H, STR_AUTOLAYOUT_ENUM, WritingMode_LR_TB,
- AUTOLAYOUT_ENUM},
- {BMP_FOIL_03, BMP_FOIL_03_H, STR_AUTOLAYOUT_2TEXT, WritingMode_LR_TB,
- AUTOLAYOUT_2TEXT},
- {BMP_FOIL_19, BMP_FOIL_19_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB,
- AUTOLAYOUT_ONLY_TITLE},
- {BMP_FOIL_25, BMP_FOIL_25_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB,
- AUTOLAYOUT_ONLY_TEXT},
- {BMP_FOIL_11, BMP_FOIL_11_H, STR_AUTOLAYOUT_OBJ, WritingMode_LR_TB,
- AUTOLAYOUT_OBJ},
- {BMP_FOIL_02, BMP_FOIL_02_H, STR_AUTOLAYOUT_CHART, WritingMode_LR_TB,
- AUTOLAYOUT_CHART},
- {BMP_FOIL_08, BMP_FOIL_08_H, STR_AUTOLAYOUT_TAB, WritingMode_LR_TB,
- AUTOLAYOUT_TAB},
- {BMP_FOIL_09, BMP_FOIL_09_H, STR_AUTOLAYOUT_CLIPTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_CLIPTEXT},
- {BMP_FOIL_04, BMP_FOIL_04_H, STR_AUTOLAYOUT_TEXTCHART, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTCHART},
- {BMP_FOIL_06, BMP_FOIL_06_H, STR_AUTOLAYOUT_TEXTCLIP, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTCLIP},
- {BMP_FOIL_07, BMP_FOIL_07_H, STR_AUTOLAYOUT_CHARTTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_CHARTTEXT},
- {BMP_FOIL_10, BMP_FOIL_10_H, STR_AUTOLAYOUT_TEXTOBJ, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTOBJ},
- {BMP_FOIL_12, BMP_FOIL_12_H, STR_AUTOLAYOUT_TEXT2OBJ, WritingMode_LR_TB,
- AUTOLAYOUT_TEXT2OBJ},
- {BMP_FOIL_13, BMP_FOIL_13_H, STR_AUTOLAYOUT_OBJTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_OBJTEXT},
- {BMP_FOIL_14, BMP_FOIL_14_H, STR_AUTOLAYOUT_OBJOVERTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_OBJOVERTEXT},
- {BMP_FOIL_15, BMP_FOIL_15_H, STR_AUTOLAYOUT_2OBJTEXT, WritingMode_LR_TB,
- AUTOLAYOUT_2OBJTEXT},
- {BMP_FOIL_16, BMP_FOIL_16_H, STR_AUTOLAYOUT_2OBJOVERTEXT,
- WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
- {BMP_FOIL_17, BMP_FOIL_17_H, STR_AUTOLAYOUT_TEXTOVEROBJ, WritingMode_LR_TB,
- AUTOLAYOUT_TEXTOVEROBJ},
- {BMP_FOIL_18, BMP_FOIL_18_H, STR_AUTOLAYOUT_4OBJ, WritingMode_LR_TB,
- AUTOLAYOUT_4OBJ},
- {BMP_FOIL_26, BMP_FOIL_26_H, STR_AUTOLAYOUT_4CLIPART, WritingMode_LR_TB, AUTOLAYOUT_4CLIPART},
- {BMP_FOIL_27, BMP_FOIL_27_H, STR_AUTOLAYOUT_6CLIPART, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART},
+ {BMP_LAYOUT_EMPTY, BMP_LAYOUT_EMPTY_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE},
+ {BMP_LAYOUT_HEAD03, BMP_LAYOUT_HEAD03_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT},
+ {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE},
+ {BMP_LAYOUT_TEXTONLY, BMP_LAYOUT_TEXTONLY_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT},
+ {BMP_LAYOUT_HEAD03B, BMP_LAYOUT_HEAD03B_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT},
+ {BMP_LAYOUT_HEAD03C, BMP_LAYOUT_HEAD03C_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ},
+ {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD02B, BMP_LAYOUT_HEAD02B_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT},
+ {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ},
+ {BMP_LAYOUT_HEAD06, BMP_LAYOUT_HEAD06_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART},
// vertical
- {BMP_FOIL_21, BMP_FOIL_21_H, STR_AL_VERT_TITLE_TEXT_CHART,
- WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
- {BMP_FOIL_22, BMP_FOIL_22_H, STR_AL_VERT_TITLE_VERT_OUTLINE,
- WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
- {BMP_FOIL_23, BMP_FOIL_23_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL,
- AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
- {BMP_FOIL_24, BMP_FOIL_24_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART,
- WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
-
+ {BMP_LAYOUT_VERTICAL02, BMP_LAYOUT_VERTICAL02_H, STR_AL_VERT_TITLE_TEXT_CHART, WritingMode_TB_RL,AUTOLAYOUT_VERTICAL_TITLE_TEXT_CHART},
+ {BMP_LAYOUT_VERTICAL01, BMP_LAYOUT_VERTICAL01_H, STR_AL_VERT_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_VERTICAL_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AL_TITLE_VERT_OUTLINE, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE},
+ {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AL_TITLE_VERT_OUTLINE_CLIPART, WritingMode_TB_RL, AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART},
{0, 0, 0, WritingMode_LR_TB, AUTOLAYOUT_NONE}
};
-
-
-
-LayoutMenu::LayoutMenu (
- TreeNode* pParent,
- DrawDocShell& rDocumentShell,
- ViewShellBase& rViewShellBase,
- bool bUseOwnScrollBar)
+LayoutMenu::LayoutMenu( TreeNode* pParent, ToolPanelViewShell& i_rPanelViewShell )
: ValueSet (pParent->GetWindow()),
TreeNode(pParent),
DragSourceHelper(this),
DropTargetHelper(this),
- mrBase (rViewShellBase),
- mbUseOwnScrollBar (bUseOwnScrollBar),
+ mrBase( i_rPanelViewShell.GetViewShellBase() ),
+ mpShellManager (&i_rPanelViewShell.GetSubShellManager()),
+ mbUseOwnScrollBar( false ),
mnPreferredColumnCount(3),
mxListener(NULL),
mbSelectionUpdatePending(true),
mbIsMainViewChangePending(false)
{
+ implConstruct( *mrBase.GetDocument()->GetDocSh() );
+}
+
+
+void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
+{
+ OSL_ENSURE( mrBase.GetDocument()->GetDocSh() == &rDocumentShell,
+ "LayoutMenu::implConstruct: hmm?" );
+ // if this fires, then my assumption that the rDocumentShell parameter to our first ctor is superfluous ...
+
SetStyle (
( GetStyle() & ~(WB_ITEMBORDER) )
| WB_TABSTOP
@@ -276,7 +236,6 @@ LayoutMenu::LayoutMenu (
-
LayoutMenu::~LayoutMenu (void)
{
// Tell the shell factory that this object is no longer available.
@@ -296,18 +255,9 @@ LayoutMenu::~LayoutMenu (void)
::std::auto_ptr<ControlFactory> LayoutMenu::CreateControlFactory (
- ViewShellBase& rBase,
- DrawDocShell& rDocShell)
+ ToolPanelViewShell& i_rPanelViewShell )
{
- return ::std::auto_ptr<ControlFactory>(new LayoutMenuFactory(rBase, rDocShell));
-}
-
-
-
-
-String LayoutMenu::GetSelectedLayoutName (void)
-{
- return GetItemText (GetSelectItemId());
+ return ::std::auto_ptr<ControlFactory>(new LayoutMenuRootFactory(i_rPanelViewShell));
}
@@ -631,6 +581,13 @@ void LayoutMenu::InsertPageWithLayout (AutoLayout aLayout)
+TaskPaneShellManager* LayoutMenu::GetShellManager()
+{
+ if ( mpShellManager )
+ return mpShellManager;
+ return TreeNode::GetShellManager();
+}
+
void LayoutMenu::InvalidateContent (void)
{
// The number of items may have changed. Request a resize so that the
@@ -732,7 +689,8 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
// There is a slide sorter visible so get the list of selected pages from it.
pPageSelection = pSlideSorter->GetPageSelection();
}
- else
+
+ if( (pSlideSorter == NULL) || (pPageSelection.get() == 0) || pPageSelection->empty() )
{
// No valid slide sorter available. Ask the main view shell for
// its current page.
diff --git a/sd/source/ui/toolpanel/LayoutMenu.hxx b/sd/source/ui/toolpanel/LayoutMenu.hxx
index bd121403c2d3..627a363fb576 100644..100755
--- a/sd/source/ui/toolpanel/LayoutMenu.hxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.hxx
@@ -60,6 +60,7 @@ class EventMultiplexerEvent;
namespace sd { namespace toolpanel {
class ControlFactory;
+class ToolPanelViewShell;
class LayoutMenu
@@ -76,32 +77,18 @@ public:
/** Create a new layout menu. Depending on the given flag it
displays its own scroll bar or lets a surrounding window
handle that.
- @param rDocumentShell
- Used to determine writing direction.
- @param rViewShellBase
- Gives access to the view shell at whose active page the
- layout will be set.
- @param bUseOwnScrollBar
- When <TRUE/> then we will show our own scroll bar when not
- all icons can be displayed in the visible window area.
- When <FALSE/> then rely on an outer scroll bar. In this
- case we will set the height of the window so that all
- icons are visible.
+ @param i_pParent
+ the parent node in the control tree
+ @param i_rPanelViewShell
+ the view shell of the task pane.
*/
LayoutMenu (
- TreeNode* pParent,
- DrawDocShell& rDocumentShell,
- ViewShellBase& rViewShellBase,
- bool bUseOwnScrollBar);
+ TreeNode* i_pParent,
+ ToolPanelViewShell& i_rPanelViewShell);
virtual ~LayoutMenu (void);
static std::auto_ptr<ControlFactory> CreateControlFactory (
- ViewShellBase& rBase,
- DrawDocShell& rDocShell);
-
- /** Return the name of the currently selected layout.
- */
- String GetSelectedLayoutName (void);
+ ToolPanelViewShell& i_rPanelViewShell );
/** Return a numerical value representing the currently selected
layout.
@@ -140,6 +127,9 @@ public:
enum MasterMode { MM_NORMAL, MM_MASTER, MM_UNKNOWN };
void UpdateEnabledState (const MasterMode eMode);
+ // TreeNode overridables
+ virtual TaskPaneShellManager* GetShellManager (void);
+
/** Call this method when the set of displayed layouts is not up-to-date
anymore. It will re-assemple this set according to the current
settings.
@@ -168,6 +158,8 @@ public:
private:
ViewShellBase& mrBase;
+ TaskPaneShellManager* mpShellManager;
+
/** Do we use our own scroll bar or is viewport handling done by
our parent?
*/
@@ -231,6 +223,9 @@ private:
*/
void UpdateSelection (void);
+ // internal ctor
+ void implConstruct( DrawDocShell& rDocumentShell );
+
/** When clicked then set the current page of the view in the center pane.
*/
DECL_LINK(ClickHandler, ValueSet*);
diff --git a/sd/source/ui/toolpanel/LayoutableWindow.hxx b/sd/source/ui/toolpanel/LayoutableWindow.hxx
deleted file mode 100644
index ed4e1ec77959..000000000000
--- a/sd/source/ui/toolpanel/LayoutableWindow.hxx
+++ /dev/null
@@ -1,79 +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_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
-#define SD_TOOLPANEL_I_LAYOUTABLE_WINDOW_HXX
-
-#include <vcl/gen.hxx>
-
-class Window;
-
-namespace sd { namespace toolpanel {
-
-
-/** This interface has to be implemented by windows that want to be
- layouted by a ToolPanel, SubToolPanel, or ScrollablePanel object.
-*/
-class LayoutableWindow
-{
-public:
- /** Return the preferred size without constraints on either the
- height or the width.
- The size the window will later be set to may but does not have
- to be equal to this size.
- */
- virtual Size GetPreferredSize (void) = 0;
-
- /** Return the preferred width with the constraint, that the
- window will be set to the given height.
- The width the window will later be set to may but does not have
- to be equal to this width.
- */
- virtual int GetPreferredWidth (int nHeight) = 0;
-
- /** Return the preferred height with the constraint, that the
- window will be set to the given width.
- The height the window will later be set to may but does not have
- to be equal to this height.
- */
- virtual int GetPreferredHeight (int nWidth) = 0;
-
- /** Return wether the window is generally resizable. When used by
- a VerticalLayouter then the width will always be resized and
- the return value of this method determines whether the height
- may be modified as well.
- */
- virtual bool IsResizable (void) = 0;
-
- /** Return the window so that its size and position can be set.
- */
- virtual ::Window& GetWindow (void) = 0;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
diff --git a/sd/source/ui/toolpanel/MethodGuard.hxx b/sd/source/ui/toolpanel/MethodGuard.hxx
new file mode 100644
index 000000000000..45b81367c8de
--- /dev/null
+++ b/sd/source/ui/toolpanel/MethodGuard.hxx
@@ -0,0 +1,67 @@
+/*************************************************************************
+ * 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_METHODGUARD_HXX
+#define SD_METHODGUARD_HXX
+
+#include <osl/mutex.hxx>
+
+//......................................................................................................................
+namespace sd { namespace toolpanel
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= MethodGuard
+ //==================================================================================================================
+ template < class COMPONENT >
+ class MethodGuard
+ {
+ public:
+ MethodGuard( COMPONENT& i_rComponent )
+ :m_aGuard( i_rComponent.getMutex() )
+ {
+ i_rComponent.checkDisposed();
+ }
+
+ ~MethodGuard()
+ {
+ }
+
+ inline void clear()
+ {
+ m_aGuard.clear();
+ }
+
+ private:
+ ::osl::ClearableMutexGuard m_aGuard;
+ };
+
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
+
+#endif // SD_METHODGUARD_HXX
diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx
index cff065777235..6b10ed889424 100644..100755
--- a/sd/source/ui/toolpanel/ScrollPanel.cxx
+++ b/sd/source/ui/toolpanel/ScrollPanel.cxx
@@ -56,6 +56,30 @@ ScrollPanel::ScrollPanel (
mnVerticalGap(3),
mnHorizontalBorder(2)
{
+ Construct();
+}
+
+ScrollPanel::ScrollPanel (
+ ::Window& i_rParentWindow)
+ : Control (&i_rParentWindow, WB_DIALOGCONTROL),
+ TreeNode(NULL),
+ 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();
+}
+
+void ScrollPanel::Construct()
+{
SetAccessibleName (
::rtl::OUString::createFromAscii("Sub Task Panel"));
mpControlContainer->SetMultiSelection (true);
@@ -95,7 +119,7 @@ ScrollPanel::~ScrollPanel (void)
// control instead of pNode directly.
TitledControl* pTitledControl = static_cast<TitledControl*>(pNode);
if (pTitledControl != NULL)
- pControl = pTitledControl->GetControl(false);
+ pControl = pTitledControl->GetControl();
// Remove this object as listener from the control.
if (pControl != NULL && pControl->GetWindow()!=NULL)
@@ -110,15 +134,6 @@ ScrollPanel::~ScrollPanel (void)
-void ScrollPanel::ListHasChanged (void)
-{
- mpControlContainer->ListHasChanged ();
- RequestResize ();
-}
-
-
-
-
TitledControl* ScrollPanel::AddControl (
::std::auto_ptr<TreeNode> pControl,
const String& rTitle,
diff --git a/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx b/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx
deleted file mode 100644
index 0aa2d3f91760..000000000000
--- a/sd/source/ui/toolpanel/SimpleLayoutWrapper.cxx
+++ /dev/null
@@ -1,98 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "SimpleLayoutWrapper.hxx"
-
-#include <vcl/window.hxx>
-
-namespace sd { namespace toolpanel {
-
-SimpleLayoutWrapper::SimpleLayoutWrapper (
- ::std::auto_ptr< ::Window> pWindow,
- int nPreferredWidth,
- int nPreferredHeight,
- bool bIsResizable)
- : mpWindow (pWindow),
- mnPreferredWidth(nPreferredWidth),
- mnPreferredHeight(nPreferredHeight),
- mbIsResizable (bIsResizable)
-{
-}
-
-
-
-
-SimpleLayoutWrapper::~SimpleLayoutWrapper (void)
-{
-}
-
-
-
-
-Size SimpleLayoutWrapper::GetPreferredSize (void)
-{
- return Size (mnPreferredWidth, mnPreferredHeight);
-}
-
-
-
-
-sal_Int32 SimpleLayoutWrapper::GetPreferredWidth (sal_Int32)
-{
- return mnPreferredWidth;
-}
-
-
-
-
-sal_Int32 SimpleLayoutWrapper::GetPreferredHeight (sal_Int32)
-{
- return mnPreferredHeight;
-}
-
-
-
-
-bool SimpleLayoutWrapper::IsResizable (void)
-{
- return mbIsResizable;
-}
-
-
-
-
-::Window* SimpleLayoutWrapper::GetWindow (void)
-{
- return mpWindow.get();
-}
-
-
-} } // end of namespace ::sd::toolpanel
-
diff --git a/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx b/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx
deleted file mode 100644
index a05d9d6ff295..000000000000
--- a/sd/source/ui/toolpanel/SimpleLayoutWrapper.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_TASKPANE_SIMPLE_LAYOUT_WRAPPER_HXX
-#define SD_TASKPANE_SIMPLE_LAYOUT_WRAPPER_HXX
-
-#include "taskpane/ILayoutableWindow.hxx"
-
-#include <memory>
-
-namespace sd { namespace toolpanel {
-
-
-/** Simple wrapper arround a regular VCL window that implements the
- methods that return the preferred size of the window. They are
- given once to the constructor and are not modified by the wrapper.
-*/
-class SimpleLayoutWrapper
- : public virtual ILayoutableWindow
-{
-public:
- SimpleLayoutWrapper (
- ::std::auto_ptr< ::Window> pWindow,
- int nPreferredWidth,
- int nPreferredHeight,
- bool bIsResizable);
- virtual ~SimpleLayoutWrapper (void);
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
-
- using sd::toolpanel::ILayoutableWindow::GetPreferredWidth;
- using sd::toolpanel::ILayoutableWindow::GetPreferredHeight;
-private:
- ::std::auto_ptr< ::Window> mpWindow;
- int mnPreferredWidth;
- int mnPreferredHeight;
- bool mbIsResizable;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
diff --git a/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx b/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx
index 3cef1ca6ee88..a032b6ef02f0 100644..100755
--- a/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx
+++ b/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx
@@ -71,38 +71,6 @@ namespace sd { namespace toolpanel {
::std::map<const SdDrawDocument*, SlideSorterCacheDisplay*> SlideSorterCacheDisplay::maDisplays;
-/** This factory class is used to create instances of TestPanel. It can be
- extended so that its constructor stores arguments that later are passed
- to new TestPanel objects.
-*/
-class SlideSorterCacheDisplayFactory
- : public ControlFactory
-{
-public:
- SlideSorterCacheDisplayFactory (const SdDrawDocument* pDocument)
- : mpDocument(pDocument)
- {
- }
-
-protected:
- virtual TreeNode* InternalCreateControl (TreeNode* pTreeNode)
- {
- SlideSorterCacheDisplay* pDisplay = SlideSorterCacheDisplay::Instance(mpDocument);
- pDisplay->SetParentWindow(pTreeNode->GetWindow());
- pDisplay->SetParentNode(pTreeNode);
- return pDisplay;
- }
-
-private:
- const SdDrawDocument* mpDocument;
-};
-
-
-
-
-
-
-
SlideSorterCacheDisplay::SlideSorterCacheDisplay (const SdDrawDocument* pDocument)
: TreeNode(NULL),
mpWindow(NULL),
@@ -137,15 +105,6 @@ void SlideSorterCacheDisplay::SetParentWindow (::Window* pParentWindow)
-std::auto_ptr<ControlFactory> SlideSorterCacheDisplay::CreateControlFactory (
- const SdDrawDocument* pDocument)
-{
- return std::auto_ptr<ControlFactory>(new SlideSorterCacheDisplayFactory(pDocument));
-}
-
-
-
-
void SlideSorterCacheDisplay::Paint (const Rectangle& rBoundingBox)
{
if (maCellSize.Width()>0 && maCellSize.Height()>0 && mpWindow!=NULL)
diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx
index 31c29f4f1c08..73783b0f0a41 100644..100755
--- a/sd/source/ui/toolpanel/SubToolPanel.cxx
+++ b/sd/source/ui/toolpanel/SubToolPanel.cxx
@@ -70,6 +70,35 @@ SubToolPanel::SubToolPanel (
+SubToolPanel::SubToolPanel (
+ Window& i_rParentWindow)
+ : Control (&i_rParentWindow, WB_DIALOGCONTROL),
+ TreeNode(NULL),
+ maWindowFiller(this),
+ mbIsRearrangePending(true),
+ mbIsLayoutPending(true),
+ mnChildrenWidth(0),
+ mnVerticalBorder(0),
+ mnVerticalGap(3),
+ mnHorizontalBorder(2)
+{
+ SetAccessibleName (
+ ::rtl::OUString::createFromAscii("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 (void)
{
sal_uInt32 nCount = mpControlContainer->GetControlCount();
@@ -86,64 +115,6 @@ SubToolPanel::~SubToolPanel (void)
-void SubToolPanel::ListHasChanged (void)
-{
- mpControlContainer->ListHasChanged ();
- RequestResize ();
-}
-
-
-
-
-void SubToolPanel::AddControl (
- ::std::auto_ptr<TreeNode> pControl,
- const String& rTitle,
- ULONG nHelpId)
-{
- pControl->GetWindow()->AddEventListener (
- LINK(this,SubToolPanel,WindowEventListener));
-
- // We are interested only in the title. The control itself is
- // managed by the content object.
- TitledControl* pTitledControl = new TitledControl(
- this,
- pControl,
- rTitle,
- TitledControlStandardClickHandler(GetControlContainer(), ControlContainer::ES_TOGGLE),
- TitleBar::TBT_SUB_CONTROL_HEADLINE);
- pTitledControl->GetWindow()->SetParent(this);
- pTitledControl->GetWindow()->SetHelpId(nHelpId);
- ::std::auto_ptr<TreeNode> pChild (pTitledControl);
-
- // Add a down link only for the first control so that when
- // entering the sub tool panel the focus is set to the first control.
- if (mpControlContainer->GetControlCount() == 0)
- FocusManager::Instance().RegisterDownLink(GetParent(), pTitledControl->GetWindow());
- FocusManager::Instance().RegisterUpLink(pTitledControl->GetWindow(), GetParent());
-
- mpControlContainer->AddControl (pChild);
-}
-
-
-
-
-void SubToolPanel::AddControl (::std::auto_ptr<TreeNode> pControl)
-{
- pControl->GetWindow()->AddEventListener (
- LINK(this,SubToolPanel,WindowEventListener));
-
- // Add a down link only for the first control so that when
- // entering the sub tool panel the focus is set to the first control.
- if (mpControlContainer->GetControlCount() == 0)
- FocusManager::Instance().RegisterDownLink(GetParent(), pControl->GetWindow());
- FocusManager::Instance().RegisterUpLink(pControl->GetWindow(), GetParent());
-
- mpControlContainer->AddControl (pControl);
-}
-
-
-
-
void SubToolPanel::Paint (const Rectangle& rRect)
{
if (mbIsRearrangePending)
diff --git a/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx b/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx
index c1651d62010b..4ad610df7f7f 100644..100755
--- a/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx
@@ -48,13 +48,10 @@ ControlFactory::~ControlFactory (void)
-::std::auto_ptr<TreeNode> ControlFactory::CreateControl (TreeNode* pTreeNode)
+::std::auto_ptr<TreeNode> ControlFactory::CreateControl( ::Window& i_rParent )
{
- // Create a new control by using the protected virtual hook.
- TreeNode* pNewNode = InternalCreateControl(pTreeNode);
-
- return ::std::auto_ptr<TreeNode>(pNewNode);
+ TreeNode* pNewNode = InternalCreateControl( i_rParent );
+ return ::std::auto_ptr<TreeNode>( pNewNode );
}
-
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx
index 5a4875340840..0a9667dd2431 100644..100755
--- a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx
@@ -31,7 +31,7 @@
#include "TaskPaneShellManager.hxx"
#include "ViewShellManager.hxx"
-#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <vcl/window.hxx>
#include <algorithm>
@@ -76,19 +76,6 @@ void TaskPaneShellManager::ReleaseShell (SfxShell* )
// Nothing to do.
}
-// hack for annotation panel, better fix?
-void TaskPaneShellManager_AddSubShell ( TaskPaneShellManager* pManager, sal_Int32 nId, SfxShell* pShell, ::Window* pWindow )
-{
- if( pManager != NULL )
- pManager->AddSubShell( (ShellId)nId, pShell, pWindow );
-}
-
-void TaskPaneShellManager_RemoveSubShell ( TaskPaneShellManager* pManager, const SfxShell* pShell)
-{
- if( pManager != NULL )
- pManager->RemoveSubShell( pShell );
-}
-
void TaskPaneShellManager::AddSubShell (
ShellId nId,
SfxShell* pShell,
@@ -111,6 +98,21 @@ void TaskPaneShellManager::AddSubShell (
+void TaskPaneShellManager::RemoveSubShell (const ShellId i_nShellId)
+{
+ SubShells::iterator pos = maSubShells.find( i_nShellId );
+ ENSURE_OR_RETURN_VOID( pos != maSubShells.end(), "no shell for this ID" );
+ if ( pos->second.mpWindow != NULL )
+ {
+ pos->second.mpWindow->RemoveEventListener( LINK( this, TaskPaneShellManager, WindowCallback ) );
+ }
+ mpViewShellManager->DeactivateSubShell( mrViewShell, pos->first );
+ maSubShells.erase( pos );
+}
+
+
+
+
void TaskPaneShellManager::RemoveSubShell (const SfxShell* pShell)
{
if (pShell != NULL)
diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.hxx b/sd/source/ui/toolpanel/TaskPaneShellManager.hxx
index 2c2e49b98c48..92e7b6b83b8d 100644..100755
--- a/sd/source/ui/toolpanel/TaskPaneShellManager.hxx
+++ b/sd/source/ui/toolpanel/TaskPaneShellManager.hxx
@@ -46,7 +46,7 @@ namespace sd { namespace toolpanel {
/** The TaskPaneShellManager implements the ViewShellManager::ShellFactory
interface. However, it does not create or delete shells. It only
gives the ViewShellManager access to the sub shells of the
- TaskPaneViewShell. Life time control of the sub shells is managed by
+ ToolPanelViewShell. Life time control of the sub shells is managed by
the sub shells themselves.
*/
class TaskPaneShellManager
@@ -86,6 +86,11 @@ public:
NULL when this shell is requested.
*/
void RemoveSubShell (const SfxShell* pShell);
+ /** removes the shell given by its ID from the set of sub shells managed by the
+ TaskPaneShellManager. Subsequent calls to CreateShell() will return
+ NULL when this shell is requested.
+ */
+ void RemoveSubShell (const ShellId i_nShellId);
/** Move the given sub-shell to the top of the local shell stack.
Furthermore move the view shell whose sub-shells this class manages
diff --git a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
index 152f576bd5bc..8c69e12c504d 100644..100755
--- a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
+++ b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx
@@ -55,22 +55,6 @@ TreeNode::~TreeNode (void)
-bool TreeNode::IsLeaf (void)
-{
- return (mpControlContainer.get()==NULL);
-}
-
-
-
-
-bool TreeNode::IsRoot (void)
-{
- return (mpParent==NULL);
-}
-
-
-
-
void TreeNode::SetParentNode (TreeNode* pNewParent)
{
mpParent = pNewParent;
@@ -122,17 +106,6 @@ sal_Int32 TreeNode::GetMinimumWidth (void)
-ObjectBarManager* TreeNode::GetObjectBarManager (void)
-{
- if (mpParent != NULL)
- return mpParent->GetObjectBarManager();
- else
- return NULL;
-}
-
-
-
-
bool TreeNode::IsResizable (void)
{
return false;
@@ -288,18 +261,6 @@ void TreeNode::AddStateChangeListener (const Link& rListener)
-void TreeNode::RemoveStateChangeListener (const Link& rListener)
-{
- maStateChangeListeners.erase (
- ::std::find (
- maStateChangeListeners.begin(),
- maStateChangeListeners.end(),
- rListener));
-}
-
-
-
-
void TreeNode::FireStateChangeEvent (
TreeNodeStateChangeEventId eEventId,
TreeNode* pChild) const
diff --git a/sd/source/ui/toolpanel/TaskPaneViewShell.cxx b/sd/source/ui/toolpanel/TaskPaneViewShell.cxx
deleted file mode 100644
index d80beba7cd10..000000000000
--- a/sd/source/ui/toolpanel/TaskPaneViewShell.cxx
+++ /dev/null
@@ -1,889 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "TaskPaneViewShell.hxx"
-
-#include "TaskPaneShellManager.hxx"
-#include "ToolPanelChildWindow.hrc"
-#include "ToolPanelChildWindow.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
-#include "taskpane/ToolPanel.hxx"
-#include "taskpane/TitledControl.hxx"
-#include "LayoutMenu.hxx"
-#include "TaskPaneFocusManager.hxx"
-#include "taskpane/SubToolPanel.hxx"
-#include "taskpane/ScrollPanel.hxx"
-#include "taskpane/TaskPaneControlFactory.hxx"
-#include "controls/MasterPagesPanel.hxx"
-#include "controls/MasterPagesSelector.hxx"
-#include "controls/TableDesignPanel.hxx"
-#include "controls/CustomAnimationPanel.hxx"
-#include "controls/SlideTransitionPanel.hxx"
-#include "controls/AnimationSchemesPanel.hxx"
-#include "TitleToolBox.hxx"
-#include "taskpane/ControlContainer.hxx"
-#include "FrameView.hxx"
-#include "Window.hxx"
-#include "PaneDockingWindow.hxx"
-#include "AccessibleTaskPane.hxx"
-#include "DrawSubController.hxx"
-#include "sdmod.hxx"
-#include "app.hrc"
-#include "glob.hrc"
-#include "res_bmp.hrc"
-#include "helpids.h"
-#include "strings.hrc"
-#include "sdresid.hxx"
-#include "framework/FrameworkHelper.hxx"
-#include <com/sun/star/drawing/framework/XResourceId.hpp>
-#include <com/sun/star/drawing/framework/ResourceActivationMode.hpp>
-#include <com/sun/star/drawing/XDrawSubController.hpp>
-
-#include <svx/dlgctrl.hxx>
-#include <sfx2/bindings.hxx>
-#include <sfx2/dispatch.hxx>
-#include <sfx2/viewfrm.hxx>
-#include <sfx2/msg.hxx>
-#include <sfx2/objface.hxx>
-#include <svx/colrctrl.hxx>
-#include <svx/xtable.hxx>
-#include <vcl/dockwin.hxx>
-#include "sdtreelb.hxx"
-#include "DrawViewShell.hxx"
-#include "drawdoc.hxx"
-#include "ViewShellBase.hxx"
-#include <svx/ruler.hxx>
-#include <vcl/svapp.hxx>
-
-//#define SHOW_TEST_PANEL
-#ifdef SHOW_TEST_PANEL
-#include "TestPanel.hxx"
-#endif
-//#define SHOW_COLOR_MENU
-#ifdef SHOW_COLOR_MENU
-#include "TestMenu.hxx"
-#endif
-
-#include <vector>
-#include <boost/shared_ptr.hpp>
-
-using namespace ::sd::toolpanel;
-
-#define TaskPaneViewShell
-#include "sdslots.hxx"
-
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using ::sd::framework::FrameworkHelper;
-
-namespace sd { namespace toolpanel {
-
-SFX_IMPL_INTERFACE(TaskPaneViewShell, SfxShell, SdResId(STR_TASKPANEVIEWSHELL))
-{
-}
-
-
-TYPEINIT1(TaskPaneViewShell, ViewShell);
-
-
-/** Inner implementation class of TaskPaneViewShell.
-*/
-class TaskPaneViewShell::Implementation
-{
-public:
- static const sal_uInt32 mnInvalidId = 0xffffffff;
-
- Implementation (void);
- ~Implementation (void);
-
- /** Here the panels are created that are shown in the task pane.
- */
- void Setup (ToolPanel* pToolPanel, ViewShellBase& rBase);
-
- /** Make a new panel known to the translation table that translates
- between internal indices as returned by
- ControlContainer::AddControl() and public indices defined by
- TaskPaneViewShell::PanelId.
- */
- void AddPanel (sal_uInt32 nInternalId, PanelId nPublicId);
-
- /** Return the public id for the given internal one.
- @return
- When the given public id is not known then PID_UNKNOWN is
- returned.
- */
- PanelId GetPublicId (sal_uInt32 nInternalId) const;
-
- /** Return the internal id for the given public one.
- @return
- When the given public id is not known then mnInvalidId is
- returned.
- */
- sal_uInt32 GetInternalId (PanelId nPublicId) const;
-
-private:
- /** This map translates between internal indices returned by
- ControlContainer::AddControl() and public indices defined by
- TaskPaneViewShell::PanelId.
- */
- typedef ::std::vector<PanelId> InternalIdToPanelIdMap;
- InternalIdToPanelIdMap maIndexMap;
-};
-
-
-
-
-namespace {
-
-enum MenuId {
- MID_UNLOCK_TASK_PANEL = 1,
- MID_LOCK_TASK_PANEL = 2,
- MID_CUSTOMIZE = 3,
- MID_FIRST_CONTROL = 4
-};
-
-/** This control is used for extracting the title string from the resource
- of some dialogs that are displayed in the task pane. With this the
- actual controls can be created on demand. This class only loads (a part
- of) their resource.
-*/
-class DummyControl : public Control
-{
-public:
- DummyControl (::Window* pParent, const ResId& rResId)
- : Control(pParent,rResId)
- {
- FreeResource();
- }
-};
-
-class ResourceActivationClickHandler
-{
-public:
- ResourceActivationClickHandler (
- const ::boost::shared_ptr<FrameworkHelper>& rpFrameworkHelper,
- const Reference<drawing::framework::XResourceId>& rxResourceId,
- ControlContainer& rControlContainer);
- void operator () (TitledControl& rTitledControl);
-
-private:
- ::boost::shared_ptr<FrameworkHelper> mpFrameworkHelper;
- Reference<drawing::framework::XResourceId> mxResourceId;
- ControlContainer& mrControlContainer;
-};
-
-} // end of anonymouse namespace
-
-
-
-
-
-void TaskPaneViewShell::Implementation::Setup (
- ToolPanel* pToolPanel,
- ViewShellBase& rBase)
-{
- SdDrawDocument* pDocument = rBase.GetDocument();
- sal_uInt32 nId;
- sal_uInt32 nIdOfControlToExpand;
-
- ::boost::shared_ptr<FrameworkHelper> pFrameworkHelper (FrameworkHelper::Instance(rBase));
- Reference<drawing::framework::XResourceId> xTaskPaneId (pFrameworkHelper->CreateResourceId(
- FrameworkHelper::msTaskPaneURL, FrameworkHelper::msRightPaneURL));
-
- // The master page controls.
- nId = pToolPanel->AddControl (
- controls::MasterPagesPanel::CreateControlFactory(rBase),
- SdResId(STR_TASKPANEL_MASTER_PAGE_TITLE),
- HID_SD_SLIDE_DESIGNS,
- ResourceActivationClickHandler(
- pFrameworkHelper,
- pFrameworkHelper->CreateResourceId(
- FrameworkHelper::msMasterPagesTaskPanelURL, xTaskPaneId),
- pToolPanel->GetControlContainer()));
- AddPanel (nId, PID_MASTER_PAGES);
-
- // Layout Menu.
- nId = pToolPanel->AddControl (
- LayoutMenu::CreateControlFactory(rBase, *pDocument->GetDocSh()),
- SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE),
- HID_SD_SLIDE_LAYOUTS,
- ResourceActivationClickHandler(
- pFrameworkHelper,
- pFrameworkHelper->CreateResourceId(
- FrameworkHelper::msLayoutTaskPanelURL, xTaskPaneId),
- pToolPanel->GetControlContainer()));
- AddPanel (nId, PID_LAYOUT);
- nIdOfControlToExpand = nId;
-
- {
- DummyControl aControl (pToolPanel, SdResId(DLG_TABLEDESIGNPANE));
-
- // TableDesignPanel
- nId = pToolPanel->AddControl (
- controls::TableDesignPanel::CreateControlFactory(rBase),
- aControl.GetText(),
- HID_SD_TABLE_DESIGN,
- ResourceActivationClickHandler(
- pFrameworkHelper,
- pFrameworkHelper->CreateResourceId(
- FrameworkHelper::msTableDesignPanelURL, xTaskPaneId),
- pToolPanel->GetControlContainer()));
- AddPanel (nId, PID_TABLE_DESIGN);
- }
-
- {
- DummyControl aControl (pToolPanel, SdResId(RID_CUSTOMANIMATION_START+0));
-
- // CustomAnimationPanel
- nId = pToolPanel->AddControl (
- controls::CustomAnimationPanel::CreateControlFactory(rBase),
- aControl.GetText(),
- HID_SD_CUSTOM_ANIMATIONS,
- ResourceActivationClickHandler(
- pFrameworkHelper,
- pFrameworkHelper->CreateResourceId(
- FrameworkHelper::msCustomAnimationTaskPanelURL, xTaskPaneId),
- pToolPanel->GetControlContainer()));
- AddPanel (nId, PID_CUSTOM_ANIMATION);
- }
-
- // SlideTransitionPanel
- {
- DummyControl aControl (pToolPanel, SdResId(RID_CUSTOMANIMATION_START+3));
-
- nId = pToolPanel->AddControl (
- controls::SlideTransitionPanel::CreateControlFactory(rBase),
- aControl.GetText(),
- HID_SD_SLIDE_TRANSITIONS,
- ResourceActivationClickHandler(
- pFrameworkHelper,
- pFrameworkHelper->CreateResourceId(
- FrameworkHelper::msSlideTransitionTaskPanelURL, xTaskPaneId),
- pToolPanel->GetControlContainer()));
- AddPanel (nId, PID_SLIDE_TRANSITION);
- }
-
-#ifdef SHOW_COLOR_MENU
- // Test Menu.
- pToolPanel->AddControl (
- ColorMenu::CreateControlFactory(),
- String::CreateFromAscii ("Color Test Menu"),
- 0);
-#endif
-
-#ifdef SHOW_TEST_PANEL
- // Test Panel.
- pToolPanel->AddControl (
- TestPanel::CreateControlFactory(),
- String::CreateFromAscii ("Test Panel"),
- 0);
-#endif
-
-#ifdef USE_SLIDE_SORTER_CACHE_DISPLAY
- pToolPanel->AddControl (
- SlideSorterCacheDisplay::CreateControlFactory(pDocument),
- String::CreateFromAscii("Slide Sorter Cache Status"),
- 0);
-#endif
-
- // Expand the layout menu.
- pToolPanel->GetControlContainer().SetExpansionState (
- nIdOfControlToExpand,
- ControlContainer::ES_EXPAND);
-
- pToolPanel->GetWindow()->Show();
-}
-
-
-
-
-void TaskPaneViewShell::Initialize (void)
-{
- if ( ! mbIsInitialized)
- {
- mbIsInitialized = true;
- mpImpl->Setup (mpTaskPane.get(), GetViewShellBase());
- }
-}
-
-
-
-
-TaskPaneViewShell::TaskPaneViewShell (
- SfxViewFrame* pFrame,
- ViewShellBase& rViewShellBase,
- ::Window* pParentWindow,
- FrameView* pFrameViewArgument)
- : ViewShell (pFrame, pParentWindow, rViewShellBase),
- mpImpl(NULL),
- mpTaskPane(NULL),
- mbIsInitialized(false),
- mpSubShellManager(),
- mnMenuId(0)
-{
- meShellType = ST_TASK_PANE;
-
- mpImpl.reset (new Implementation());
-
- mpContentWindow->SetCenterAllowed (false);
- pParentWindow->SetStyle(pParentWindow->GetStyle() | WB_DIALOGCONTROL);
-
- mpTaskPane = ::std::auto_ptr<ToolPanel>(new ToolPanel (
- mpContentWindow.get(), *this));
-
- GetParentWindow()->SetBackground(Wallpaper());
- mpContentWindow->SetBackground(Wallpaper());
-
- GetParentWindow()->SetHelpId(HID_SD_TASK_PANE);
-
- PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(GetDockingWindow());
- if (pDockingWindow != NULL)
- {
- pDockingWindow->InitializeTitleToolBox();
- mnMenuId = pDockingWindow->AddMenu (
- String(SdResId(STR_TASKPANEL_MASTER_PAGE_MENU_TITLE)),
- HID_SD_TASK_PANE_VIEW_MENU,
- LINK(this, TaskPaneViewShell, ToolboxClickHandler));
- }
-
- // Tell the focus manager that we want to pass the focus to our
- // child.
- FocusManager::Instance().RegisterDownLink(pParentWindow, mpTaskPane.get());
-
- SetPool (&GetDoc()->GetPool());
-
- if (pFrameViewArgument != NULL)
- mpFrameView = pFrameViewArgument;
- else
- mpFrameView = new FrameView(GetDoc());
- GetFrameView()->Connect();
-
- // Hide or delete unused controls that we have inherited from the
- // ViewShell base class.
- mpHorizontalScrollBar.reset();
- mpVerticalScrollBar.reset();
- mpScrollBarBox.reset();
- mpHorizontalRuler.reset();
- mpVerticalRuler.reset();
-
- SetName (String (RTL_CONSTASCII_USTRINGPARAM("TaskPaneViewShell")));
-
- // For accessibility we have to shortly hide the content window. This
- // triggers the construction of a new accessibility object for the new
- // view shell. (One is created earlier while the construtor of the base
- // class is executed. At that time the correct accessibility object can
- // not be constructed.)
- if (mpContentWindow.get() !=NULL)
- {
- mpContentWindow->Hide();
- mpContentWindow->Show();
- }
-
- // Register the shell manager as factory at the ViewShellManager.
- mpSubShellManager.reset (new TaskPaneShellManager(
- GetViewShellBase().GetViewShellManager(),
- *this));
- GetViewShellBase().GetViewShellManager()->AddSubShellFactory(this, mpSubShellManager);
-}
-
-
-
-
-TaskPaneViewShell::~TaskPaneViewShell (void)
-{
- GetViewShellBase().GetViewShellManager()->RemoveSubShellFactory(this, mpSubShellManager);
-}
-
-
-
-// static
-void TaskPaneViewShell::RegisterControls (void)
-{
- SfxModule* pModule = SD_MOD();
- controls::MasterPagesSelector::RegisterInterface (pModule);
- LayoutMenu::RegisterInterface (pModule);
-}
-
-
-
-
-void TaskPaneViewShell::ArrangeGUIElements (void)
-{
- ViewShell::ArrangeGUIElements();
-
- Point aOrigin (maViewPos);
- Size aSize (maViewSize);
-
- Initialize();
-
- // Place the task pane.
- if (mpTaskPane.get() != NULL)
- mpTaskPane->SetPosSizePixel (Point(0,0), aSize);
-}
-
-
-
-
-void TaskPaneViewShell::GetFocus (void)
-{
- Invalidate ();
-}
-
-
-
-
-void TaskPaneViewShell::LoseFocus (void)
-{
- Invalidate ();
-}
-
-
-
-
-void TaskPaneViewShell::KeyInput (const KeyEvent& rEvent)
-{
- KeyCode nCode = rEvent.GetKeyCode();
- if (nCode == KEY_RETURN)
- {
- mpTaskPane->GrabFocus();
- }
- else
- ViewShell::KeyInput (rEvent, NULL);
-}
-
-
-
-
-IMPL_LINK(TaskPaneViewShell, ToolboxClickHandler, ToolBox*, pToolBox)
-{
- if (pToolBox->GetCurItemId() == mnMenuId)
- {
- pToolBox->EndSelection();
-
- DockingWindow* pDockingWindow = GetDockingWindow();
- ::std::auto_ptr<PopupMenu> pMenu = CreatePopupMenu (
- pDockingWindow!=NULL && !pDockingWindow->IsFloatingMode());
- pMenu->SetSelectHdl (
- LINK(this, TaskPaneViewShell, MenuSelectHandler));
-
- // pass toolbox button rect so the menu can stay open on button up
- Rectangle aRect = pToolBox->GetItemRect(mnMenuId);
- aRect.SetPos(pToolBox->GetPosPixel() );
- pMenu->Execute (pDockingWindow, aRect, POPUPMENU_EXECUTE_DOWN);
- }
-
- return 0;
-}
-
-
-
-
-IMPL_LINK(TaskPaneViewShell, MenuSelectHandler, Menu*, pMenu)
-{
- if (pMenu)
- {
- pMenu->Deactivate();
- switch (pMenu->GetCurItemId())
- {
- case MID_UNLOCK_TASK_PANEL:
- {
- DockingWindow* pDockingWindow = GetDockingWindow();
- if (pDockingWindow != NULL)
- pDockingWindow->SetFloatingMode (TRUE);
- }
- break;
-
- case MID_LOCK_TASK_PANEL:
- {
- DockingWindow* pDockingWindow = GetDockingWindow();
- if (pDockingWindow != NULL)
- pDockingWindow->SetFloatingMode (FALSE);
- }
- break;
-
- case MID_CUSTOMIZE:
- DBG_ASSERT (0, "Customization not yet implemented");
- break;
-
- default:
- {
- sal_uInt32 nIndex (pMenu->GetUserValue(pMenu->GetCurItemId()));
- mpTaskPane->GetControlContainer().SetVisibilityState (
- nIndex,
- ControlContainer::VS_TOGGLE);
- // mpTaskPane->Resize();
- // mpTaskPane->Invalidate();
- }
- break;
- }
- }
-
- return 0;
-}
-
-
-
-
-::std::auto_ptr<PopupMenu> TaskPaneViewShell::CreatePopupMenu (
- bool bIsDocking)
-{
- ::std::auto_ptr<PopupMenu> pMenu (new PopupMenu ());
- FloatingWindow* pFloat = static_cast<FloatingWindow*>(pMenu->GetWindow());
- if (pFloat != NULL)
- {
- pFloat->SetPopupModeFlags (
- pFloat->GetPopupModeFlags()
- | FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE);
- }
-
- // warning free code changes:
- // FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE is 0x10000, so cast to USHORT is 0
- // so why was this used anyway?
- pMenu->SetMenuFlags (
- pMenu->GetMenuFlags() /* | (USHORT)FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE */ );
-
- // Add one entry for every tool panel element to individually make
- // them visible or hide them.
- USHORT nIndex = MID_FIRST_CONTROL;
- sal_uInt32 nControlIndex;
- ControlContainer& rContainer (mpTaskPane->GetControlContainer());
- for (nControlIndex=0;
- nControlIndex<rContainer.GetControlCount();
- nControlIndex=rContainer.GetNextIndex(nControlIndex,true,false))
- {
- TreeNode* pChild = rContainer.GetControl(nControlIndex);
- TitledControl* pControl
- = static_cast<TitledControl*>(pChild->GetWindow());
- pMenu->InsertItem (nIndex,
- pControl->GetTitle(),
- MIB_CHECKABLE);
- pMenu->SetUserValue (nIndex, nControlIndex);
- if (pControl->IsVisible())
- pMenu->CheckItem (nIndex, TRUE);
- nIndex++;
- }
-
- pMenu->InsertSeparator ();
-
- // Add entry for docking or un-docking the tool panel.
- if (bIsDocking)
- pMenu->InsertItem (
- MID_UNLOCK_TASK_PANEL,
- String(SdResId(STR_TASKPANEL_MASTER_PAGE_MENU_UNLOCK)));
- else
- pMenu->InsertItem (
- MID_LOCK_TASK_PANEL,
- String(SdResId(STR_TASKPANEL_MASTER_PAGE_MENU_LOCK)));
- pMenu->RemoveDisabledEntries (FALSE, FALSE);
-
- return pMenu;
-}
-
-
-
-
-SdPage* TaskPaneViewShell::GetActualPage (void)
-{
- return NULL;
-}
-
-SdPage* TaskPaneViewShell::getCurrentPage(void) const
-{
- return NULL;
-}
-
-
-
-void TaskPaneViewShell::Execute (SfxRequest& )
-{
-}
-
-
-
-
-void TaskPaneViewShell::GetState (SfxItemSet& rItemSet)
-{
- (void)rItemSet;
-}
-
-
-
-
-TaskPaneShellManager& TaskPaneViewShell::GetSubShellManager (void) const
-{
- return *mpSubShellManager.get();
-}
-
-
-
-
-DockingWindow* TaskPaneViewShell::GetDockingWindow (void)
-{
- ::Window* pParentWindow = GetParentWindow();
- DockingWindow* pDockingWindow = NULL;
- while (pParentWindow!=NULL && pDockingWindow==NULL)
- {
- pDockingWindow = dynamic_cast<DockingWindow*>(pParentWindow);
- pParentWindow = pParentWindow->GetParent();
- }
- return pDockingWindow;
-}
-
-
-
-
-void TaskPaneViewShell::ShowPanel (const PanelId nPublicId)
-{
- Initialize();
- sal_uInt32 nId (mpImpl->GetInternalId(nPublicId));
- if (nId != Implementation::mnInvalidId)
- {
- mpTaskPane->GetControlContainer().SetVisibilityState (
- nId,
- ControlContainer::VS_SHOW);
- }
-}
-
-
-
-
-void TaskPaneViewShell::HidePanel (const PanelId nPublicId)
-{
- Initialize();
- sal_uInt32 nId (mpImpl->GetInternalId(nPublicId));
- if (nId != Implementation::mnInvalidId)
- {
- mpTaskPane->GetControlContainer().SetVisibilityState (
- nId,
- ControlContainer::VS_HIDE);
- }
-}
-
-
-
-
-void TaskPaneViewShell::ExpandPanel (const PanelId nPublicId)
-{
- Initialize();
- sal_uInt32 nId (mpImpl->GetInternalId(nPublicId));
- if (nId != Implementation::mnInvalidId)
- {
- mpTaskPane->GetControlContainer().SetExpansionState (
- nId,
- ControlContainer::ES_EXPAND);
- }
-}
-
-
-
-
-void TaskPaneViewShell::CollapsePanel (const PanelId nPublicId)
-{
- Initialize();
- sal_uInt32 nId (mpImpl->GetInternalId(nPublicId));
- if (nId != Implementation::mnInvalidId)
- {
- mpTaskPane->GetControlContainer().SetExpansionState (
- nId,
- ControlContainer::ES_COLLAPSE);
- }
-}
-
-
-
-
-::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>
- TaskPaneViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow)
-{
- ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> xAccessible;
-
- if (mpTaskPane.get()!=NULL && pWindow!=NULL)
- {
- // We have to call CreateAccessible directly so that we can specify
- // the correct accessible parent.
- ::Window* pParentWindow = pWindow->GetAccessibleParentWindow();
- if (pParentWindow != NULL)
- xAccessible = mpTaskPane->CreateAccessibleObject(
- pParentWindow->GetAccessible());
- }
-
- return xAccessible;
-}
-
-
-
-
-Reference<drawing::XDrawSubController> TaskPaneViewShell::CreateSubController (void)
-{
- // This view shell is not designed to be the main view shell and thus
- // does not support a UNO sub controller.
- return Reference<drawing::XDrawSubController>();
-}
-
-
-
-
-bool TaskPaneViewShell::RelocateToParentWindow (::Window* pParentWindow)
-{
- ::Window* pOldParentWindow = GetParentWindow();
- FocusManager::Instance().RemoveLinks(pOldParentWindow, mpTaskPane.get());
- FocusManager::Instance().RemoveLinks(mpTaskPane.get(), pOldParentWindow);
-
- ViewShell::RelocateToParentWindow(pParentWindow);
-
- PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(GetDockingWindow());
- if (pDockingWindow != NULL)
- {
- pDockingWindow->InitializeTitleToolBox();
- mnMenuId = pDockingWindow->AddMenu (
- String(SdResId(STR_TASKPANEL_MASTER_PAGE_MENU_TITLE)),
- HID_SD_TASK_PANE_VIEW_MENU,
- LINK(this, TaskPaneViewShell, ToolboxClickHandler));
- }
- FocusManager::Instance().RegisterDownLink(pParentWindow, mpTaskPane.get());
-
- Resize();
-
- return true;
-}
-
-
-
-
-//===== TaskPaneViewShell::Implementation =====================================
-
-TaskPaneViewShell::Implementation::Implementation (void)
- : maIndexMap(
- (InternalIdToPanelIdMap::size_type)PID__END,
- PID_UNKNOWN)
-{
-}
-
-
-
-
-TaskPaneViewShell::Implementation::~Implementation (void)
-{
-}
-
-
-
-
-void TaskPaneViewShell::Implementation::AddPanel (
- sal_uInt32 nInternalId,
- PanelId nPublicId)
-{
- maIndexMap[nInternalId] = nPublicId;
-}
-
-
-
-
-TaskPaneViewShell::PanelId
- TaskPaneViewShell::Implementation::GetPublicId (
- sal_uInt32 nInternalId) const
-{
- if (nInternalId < maIndexMap.size())
- return maIndexMap[nInternalId];
- else
- return PID_UNKNOWN;
-}
-
-
-
-
-sal_uInt32
- TaskPaneViewShell::Implementation::GetInternalId (
- TaskPaneViewShell::PanelId nPublicId) const
-{
- sal_uInt32 nId = mnInvalidId;
- for (sal_uInt32 nI=0; nI<maIndexMap.size(); nI++)
- if (maIndexMap[nI] == nPublicId)
- {
- nId = nI;
- break;
- }
-
- return nId;
-}
-
-
-
-
-//===== PanelActivation =======================================================
-
-PanelActivation::PanelActivation (ViewShellBase& rBase, TaskPaneViewShell::PanelId nPanelId)
- : mrBase(rBase),
- mnPanelId(nPanelId)
-{
-}
-
-void PanelActivation::operator() (bool)
-{
- toolpanel::TaskPaneViewShell* pTaskPane
- = dynamic_cast<toolpanel::TaskPaneViewShell*>(
- framework::FrameworkHelper::Instance(mrBase)
- ->GetViewShell(framework::FrameworkHelper::msRightPaneURL).get());
- if (pTaskPane != NULL)
- pTaskPane->ShowPanel(mnPanelId);
-}
-
-
-
-
-//===== ResourceActivationClickHandler ========================================
-
-ResourceActivationClickHandler::ResourceActivationClickHandler (
- const ::boost::shared_ptr<FrameworkHelper>& rpFrameworkHelper,
- const Reference<drawing::framework::XResourceId>& rxResourceId,
- ControlContainer& rControlContainer)
- : mpFrameworkHelper(rpFrameworkHelper),
- mxResourceId(rxResourceId),
- mrControlContainer(rControlContainer)
-{
-}
-
-
-
-
-void ResourceActivationClickHandler::operator () (TitledControl& rTitledControl)
-{
- mrControlContainer.SetExpansionState (
- &rTitledControl,
- ControlContainer::ES_EXPAND);
- mpFrameworkHelper->GetConfigurationController()->requestResourceActivation(
- mxResourceId, drawing::framework::ResourceActivationMode_REPLACE);
-}
-
-
-} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestMenu.cxx b/sd/source/ui/toolpanel/TestMenu.cxx
index 7bfb6adebe8d..a8f0b6df7893 100644..100755
--- a/sd/source/ui/toolpanel/TestMenu.cxx
+++ b/sd/source/ui/toolpanel/TestMenu.cxx
@@ -37,6 +37,7 @@
namespace sd { namespace toolpanel {
+#ifdef SHOW_COLOR_MENU
/** This factory class is used to create instances of ColorMenu. It can be
extended so that its constructor stores arguments that later are passed
to new ColorMenu objects.
@@ -45,16 +46,16 @@ class ColorMenuFactory
: public ControlFactory
{
protected:
- virtual TreeNode* InternalCreateControl (TreeNode* pTreeNode)
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent )
{
- return new ColorMenu (pTreeNode);
+ return new ColorMenu (&i_rParent);
}
};
-ColorMenu::ColorMenu (TreeNode* pParent)
- : Window (pParent->GetWindow()),
- TreeNode(pParent),
+ColorMenu::ColorMenu (::Window* i_pParent)
+ : Window (i_pParent),
+ TreeNode(NULL),
maSet (this),
mnPreferredColumnCount(2)
{
@@ -71,7 +72,7 @@ ColorMenu::ColorMenu (TreeNode* pParent)
Fill ();
maSet.Show();
- pParent->RequestResize();
+ i_pParent->Resize();
}
@@ -82,16 +83,12 @@ ColorMenu::~ColorMenu (void)
}
-
-
::std::auto_ptr<ControlFactory> ColorMenu::CreateControlFactory (void)
{
return ::std::auto_ptr<ControlFactory>(new ColorMenuFactory());
}
-
-
/** The preferred size depends on the preferred number of columns, the
number of items, and the size of the items.
*/
@@ -316,5 +313,6 @@ void ColorMenu::Fill (void)
maSet.InsertItem (++i, rSettings.GetFontColor());
maSet.SetItemText (i, String::CreateFromAscii("FontColor"));
}
+#endif
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestMenu.hxx b/sd/source/ui/toolpanel/TestMenu.hxx
index 37ac6542970d..0c4b3bfe6530 100644..100755
--- a/sd/source/ui/toolpanel/TestMenu.hxx
+++ b/sd/source/ui/toolpanel/TestMenu.hxx
@@ -39,6 +39,8 @@ namespace sd { namespace toolpanel {
class ControlFactory;
+#ifdef SHOW_COLOR_MENU
+
/** This demo menu shows the colors that are available from the
StyleSettings.
*/
@@ -47,7 +49,7 @@ class ColorMenu
public TreeNode
{
public:
- ColorMenu (TreeNode* pParent);
+ ColorMenu (::Window* i_pParent);
virtual ~ColorMenu (void);
static ::std::auto_ptr<ControlFactory> CreateControlFactory (void);
@@ -75,6 +77,7 @@ private:
int CalculateRowCount (const Size& rItemSize, int nColumnCount);
void Fill (void);
};
+#endif
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx
index e2786e23a0c5..044b40dcdb4f 100644..100755
--- a/sd/source/ui/toolpanel/TestPanel.cxx
+++ b/sd/source/ui/toolpanel/TestPanel.cxx
@@ -37,6 +37,7 @@
namespace sd { namespace toolpanel {
+#ifdef SHOW_TEST_PANEL
/** This factory class is used to create instances of TestPanel. It can be
extended so that its constructor stores arguments that later are passed
to new TestPanel objects.
@@ -45,9 +46,9 @@ class TestPanelFactory
: public ControlFactory
{
protected:
- virtual TreeNode* InternalCreateControl (TreeNode* pTreeNode)
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent )
{
- return new TestPanel (pTreeNode);
+ return new TestPanel (i_rParent);
}
};
@@ -109,8 +110,8 @@ private:
};
-TestPanel::TestPanel (TreeNode* pParent)
- : SubToolPanel (pParent)
+TestPanel::TestPanel (::Window& i_rParent)
+ : SubToolPanel (i_rParent)
{
// Create a scrollable panel with two list boxes.
ScrollPanel* pScrollPanel = new ScrollPanel (this);
@@ -163,13 +164,11 @@ TestPanel::~TestPanel (void)
{
}
-
-
-
std::auto_ptr<ControlFactory> TestPanel::CreateControlFactory (void)
{
return std::auto_ptr<ControlFactory>(new TestPanelFactory());
}
+#endif
} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/TestPanel.hxx b/sd/source/ui/toolpanel/TestPanel.hxx
index f883cc08c1e1..494e5086b179 100644..100755
--- a/sd/source/ui/toolpanel/TestPanel.hxx
+++ b/sd/source/ui/toolpanel/TestPanel.hxx
@@ -36,18 +36,22 @@ namespace sd { namespace toolpanel {
class ControlFactory;
class TreeNode;
+#ifdef SHOW_TEST_PANEL
+
/** This panel demonstrates how to create a panel for the task pane.
*/
class TestPanel
: public SubToolPanel
{
public:
- TestPanel (TreeNode* pParent);
+ TestPanel (::Window& i_rParent);
virtual ~TestPanel (void);
static std::auto_ptr<ControlFactory> CreateControlFactory (void);
};
+#endif
+
} } // end of namespace ::sd::toolpanel
#endif
diff --git a/sd/source/ui/toolpanel/TitleBar.cxx b/sd/source/ui/toolpanel/TitleBar.cxx
index e0b48a6cf57b..de49b7a6abb5 100644..100755
--- a/sd/source/ui/toolpanel/TitleBar.cxx
+++ b/sd/source/ui/toolpanel/TitleBar.cxx
@@ -60,13 +60,12 @@ namespace sd { namespace toolpanel {
const int TitleBar::snIndentationWidth = 16;
TitleBar::TitleBar ( ::Window* pParent, const String& rsTitle, TitleBarType eType, bool bIsExpandable)
-: ::Window (pParent)
+: ::Window (pParent, WB_TABSTOP)
, TreeNode(this)
, meType(eType)
, msTitle(rsTitle)
, mbExpanded(false)
, mbFocused(false)
-, mbMouseOver(false)
, mpDevice(new VirtualDevice (*this))
, mbIsExpandable (bIsExpandable)
{
@@ -77,10 +76,6 @@ TitleBar::TitleBar ( ::Window* pParent, const String& rsTitle, TitleBarType eTyp
// Change the mouse pointer shape so that it acts as a mouse over effect.
switch (meType)
{
- case TBT_WINDOW_TITLE:
- break;
-
- case TBT_CONTROL_TITLE:
case TBT_SUB_CONTROL_HEADLINE:
if (mbIsExpandable)
SetPointer (POINTER_REFHAND);
@@ -170,14 +165,6 @@ void TitleBar::Paint (const Rectangle& rBoundingBox)
switch (meType)
{
- case TBT_WINDOW_TITLE:
- PaintWindowTitleBar ();
- break;
-
- case TBT_CONTROL_TITLE:
- PaintPanelControlTitle ();
- break;
-
case TBT_SUB_CONTROL_HEADLINE:
PaintSubPanelHeadLineBar ();
break;
@@ -223,22 +210,21 @@ void TitleBar::SetEnabledState(bool bFlag)
}
-void TitleBar::SetFocus (bool bFlag)
+
+
+void TitleBar::GetFocus()
{
- mbFocused = bFlag;
- Invalidate ();
+ mbFocused = true;
+ Invalidate();
}
-void TitleBar::SetMouseOver (bool bFlag)
+void TitleBar::LoseFocus()
{
- if (bFlag != mbMouseOver)
- {
- mbMouseOver = bFlag;
- // Invalidate();
- }
+ mbFocused = false;
+ Invalidate();
}
@@ -251,15 +237,9 @@ bool TitleBar::HasExpansionIndicator (void) const
{
switch (meType)
{
- case TBT_CONTROL_TITLE:
case TBT_SUB_CONTROL_HEADLINE:
bHasExpansionIndicator = true;
break;
-
- default:
- case TBT_WINDOW_TITLE:
- // bHasExpansionIndicator remains false
- break;
}
}
return bHasExpansionIndicator;
@@ -277,21 +257,6 @@ Image TitleBar::GetExpansionIndicator (void) const
USHORT nResourceId = 0;
switch (meType)
{
- case TBT_CONTROL_TITLE:
- if (mbExpanded)
- if (bHighContrastMode)
- nResourceId = BMP_TRIANGLE_DOWN_H;
- else
- nResourceId = BMP_TRIANGLE_DOWN;
- else
- if (bHighContrastMode)
- nResourceId = BMP_TRIANGLE_RIGHT_H;
- else
- nResourceId = BMP_TRIANGLE_RIGHT;
-
- aIndicator = IconCache::Instance().GetIcon(nResourceId);
- break;
-
case TBT_SUB_CONTROL_HEADLINE:
if (mbExpanded)
if (bHighContrastMode)
@@ -306,11 +271,6 @@ Image TitleBar::GetExpansionIndicator (void) const
aIndicator = IconCache::Instance().GetIcon(nResourceId);
break;
-
- default:
- case TBT_WINDOW_TITLE:
- // aIndicator remains empty Image.
- break;
}
}
@@ -320,35 +280,6 @@ Image TitleBar::GetExpansionIndicator (void) const
-void TitleBar::PaintPanelControlTitle (void)
-{
- int nWidth (GetOutputSizePixel().Width());
- Rectangle aTextBox (CalculateTextBoundingBox (nWidth, true));
- PaintBackground(CalculateTitleBarBox(aTextBox, nWidth));
- Rectangle aFocusBox (PaintExpansionIndicator (aTextBox));
- PaintText (aTextBox);
- aFocusBox.Union (aTextBox);
- aFocusBox.Left() += 2;
- PaintFocusIndicator (aFocusBox);
- PaintMouseOverIndicator (aTextBox);
-}
-
-
-
-
-void TitleBar::PaintWindowTitleBar (void)
-{
- Rectangle aTextBox (CalculateTextBoundingBox (
- GetOutputSizePixel().Width(),
- true));
-
- PaintText (aTextBox);
- PaintFocusIndicator (aTextBox);
-}
-
-
-
-
void TitleBar::PaintSubPanelHeadLineBar (void)
{
int nWidth (GetOutputSizePixel().Width());
@@ -369,7 +300,6 @@ void TitleBar::PaintSubPanelHeadLineBar (void)
aFocusBox.Left() -= 2;
aFocusBox.Right() += 1;
PaintFocusIndicator (aFocusBox);
- PaintMouseOverIndicator (aTextBox);
}
@@ -406,21 +336,6 @@ void TitleBar::PaintFocusIndicator (const Rectangle& rTextBox)
-void TitleBar::PaintMouseOverIndicator (const Rectangle& rTextBox)
-{
- if (mbMouseOver)
- {
- Rectangle aBox (rTextBox);
- // Show the line below the focus rectangle (which is painted
- // after and over the mouse over indicator.)
- // aBox.Bottom() += 2;
- // DrawLine (aBox.BottomLeft(), aBox.BottomRight());
- }
-}
-
-
-
-
Rectangle TitleBar::PaintExpansionIndicator (const Rectangle& rTextBox)
{
Rectangle aExpansionIndicatorArea;
@@ -482,29 +397,6 @@ void TitleBar::PaintBackground (const Rectangle& rTitleBarBox)
switch (meType)
{
- case TBT_CONTROL_TITLE:
- {
- mpDevice->SetFillColor (
- GetSettings().GetStyleSettings().GetDialogColor());
- mpDevice->DrawRect(rTitleBarBox);
-
- mpDevice->SetFillColor();
- mpDevice->SetLineColor (
- GetSettings().GetStyleSettings().GetLightColor());
- mpDevice->DrawLine(
- rTitleBarBox.TopLeft(),rTitleBarBox.TopRight());
- mpDevice->DrawLine(
- rTitleBarBox.TopLeft(),rTitleBarBox.BottomLeft());
-
- mpDevice->SetLineColor (
- GetSettings().GetStyleSettings().GetShadowColor());
- mpDevice-> DrawLine(
- rTitleBarBox.BottomLeft(), rTitleBarBox.BottomRight());
- mpDevice->DrawLine(
- rTitleBarBox.TopRight(), rTitleBarBox.BottomRight());
- }
- break;
-
case TBT_SUB_CONTROL_HEADLINE:
{
Color aColor (GetSettings().GetStyleSettings().GetDialogColor());
@@ -534,10 +426,6 @@ void TitleBar::PaintBackground (const Rectangle& rTitleBarBox)
Point(rTitleBarBox.Right(), rTitleBarBox.Bottom()));
}
break;
-
- default:
- case TBT_WINDOW_TITLE:
- break;
}
}
@@ -588,16 +476,6 @@ Rectangle TitleBar::CalculateTitleBarBox (
switch (meType)
{
- case TBT_WINDOW_TITLE:
- aTitleBarBox.Bottom() += aTitleBarBox.Top();
- aTitleBarBox.Top() = 0;
- break;
-
- case TBT_CONTROL_TITLE:
- aTitleBarBox.Bottom() += aTitleBarBox.Top();
- aTitleBarBox.Top() = 0;
- break;
-
case TBT_SUB_CONTROL_HEADLINE:
aTitleBarBox.Top() -= 3;
aTitleBarBox.Bottom() += 3;
@@ -614,15 +492,8 @@ Rectangle TitleBar::CalculateTitleBarBox (
-void TitleBar::MouseMove (const MouseEvent& rEvent)
+void TitleBar::MouseMove (const MouseEvent& )
{
- Point aRelativePosition = rEvent.GetPosPixel() - GetPosPixel();
- Size aSize = GetSizePixel();
- SetMouseOver (
- aRelativePosition.X() >= 0
- && aRelativePosition.Y() >= 0
- && aRelativePosition.X() < aSize.Width()
- && aRelativePosition.Y() < aSize.Height());
}
diff --git a/sd/source/ui/toolpanel/TitleToolBox.cxx b/sd/source/ui/toolpanel/TitleToolBox.cxx
deleted file mode 100644
index 57cbac3fe132..000000000000
--- a/sd/source/ui/toolpanel/TitleToolBox.cxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "TitleToolBox.hxx"
-
-#include "res_bmp.hrc"
-#include <vcl/bitmap.hxx>
-#include <vcl/bitmapex.hxx>
-#include "sdresid.hxx"
-#include <rtl/ustring.hxx>
-
-namespace sd { namespace toolpanel {
-
-
-TitleToolBox::TitleToolBox (::Window* pParent, WinBits nStyle )
- : ToolBox( pParent, nStyle )
-{
- lastSize = -1;
-
- Bitmap aBitmap (SdResId (BMP_CLOSE_DOC));
- Bitmap aBitmapHC (SdResId (BMP_CLOSE_DOC_H));
- Bitmap aTriangleRight (SdResId (BMP_TRIANGLE_RIGHT));
- Bitmap aTriangleDown (SdResId (BMP_TRIANGLE_DOWN));
-
- maImage = Image (aBitmap, Color (COL_LIGHTMAGENTA));
- maImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST));
- maTriangleRight = Image (aTriangleRight, Color (COL_LIGHTMAGENTA));
- maTriangleDown = Image (aTriangleDown, Color (COL_LIGHTMAGENTA));
-
- SetOutStyle (TOOLBOX_STYLE_FLAT);
- SetBackground (Wallpaper (
- GetSettings().GetStyleSettings().GetDialogColor()));
-}
-
-
-
-
-void TitleToolBox::AddItem (ToolBoxId aId)
-{
- switch (aId)
- {
- case TBID_PANEL_MENU:
- InsertItem (TBID_PANEL_MENU,
- String::CreateFromAscii ("Panel"),
- TIB_DROPDOWN);
- break;
-
- case TBID_DOCUMENT_CLOSE:
- InsertItem (TBID_DOCUMENT_CLOSE,
- GetSettings().GetStyleSettings().GetHighContrastMode()
- ? maImageHC : maImage, 0 );
- break;
-
- case TBID_TRIANGLE_RIGHT:
- InsertItem (TBID_TRIANGLE_RIGHT,
- maTriangleRight, 0);
- break;
-
- case TBID_TRIANGLE_DOWN:
- InsertItem (TBID_TRIANGLE_DOWN,
- maTriangleDown, 0);
- break;
-
- case TBID_TEST:
- InsertItem (TBID_TEST,
- String::CreateFromAscii ("Test"),
- TIB_DROPDOWN);
- break;
- }
-}
-
-
-
-
-void TitleToolBox::DataChanged (const DataChangedEvent& rDCEvt)
-{
- Window::DataChanged (rDCEvt);
-
- if (rDCEvt.GetFlags() & SETTINGS_STYLE)
- {
- SetBackground (
- Wallpaper (GetSettings().GetStyleSettings().GetDialogColor()));
- }
-}
-
-
-
-
-} } // end of namespace ::sd::toolbox
diff --git a/sd/source/ui/toolpanel/TitleToolBox.hxx b/sd/source/ui/toolpanel/TitleToolBox.hxx
deleted file mode 100644
index 9433706579df..000000000000
--- a/sd/source/ui/toolpanel/TitleToolBox.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef SD_TOOLBOX_TITLETOOLBOX_HXX
-#define SD_TOOLBOX_TITLETOOLBOX_HXX
-
-#include <vcl/toolbox.hxx>
-
-class PushButton;
-
-namespace sd { namespace toolpanel {
-
-/** Copied from vcl/menu.cxx
-// To get the transparent mouse-over look, the TitleToolBox is actually a toolbox
-// overload DataChange to handle style changes correctly
-*/
-class TitleToolBox
- : public ToolBox
-{
-public:
- enum ToolBoxId {
- TBID_DOCUMENT_CLOSE = 1,
- TBID_PANEL_MENU = 2,
- TBID_TRIANGLE_RIGHT = 3,
- TBID_TRIANGLE_DOWN = 4,
- TBID_TEST
- };
-
- TitleToolBox (::Window* pParent, WinBits nStyle = 0);
-
- void AddItem (ToolBoxId aId);
-
- void DataChanged (const DataChangedEvent& rDCEvt);
-
-private:
- Image maImage;
- Image maImageHC;
- Image maTriangleRight;
- Image maTriangleDown;
-
- long lastSize;
-};
-
-} } // end of namespace ::sd::toolbox
-
-#endif
diff --git a/sd/source/ui/toolpanel/TitledControl.cxx b/sd/source/ui/toolpanel/TitledControl.cxx
index 7930bb4cd7f1..e83e6c47c10a 100644..100755
--- a/sd/source/ui/toolpanel/TitledControl.cxx
+++ b/sd/source/ui/toolpanel/TitledControl.cxx
@@ -52,53 +52,15 @@ TitledControl::TitledControl (
msTitle(rTitle),
mbVisible(true),
mpUserData(NULL),
- mpControlFactory(NULL),
- mpClickHandler(new ClickHandler(rClickHandler)),
- mbExpansionModeIsToggle(eType!=TitleBar::TBT_CONTROL_TITLE)
-{
- if (pControl.get() != NULL)
- {
- mpControlContainer->AddControl (::std::auto_ptr<TreeNode> (
- new TitleBar (this, rTitle, eType, pControl->IsExpandable())));
- pControl->SetParentNode (this);
- }
- mpControlContainer->AddControl (pControl);
-
- FocusManager::Instance().RegisterDownLink(this, GetControl()->GetWindow());
- FocusManager::Instance().RegisterUpLink(GetControl()->GetWindow(), this);
-
- SetBackground (Wallpaper());
-
- GetTitleBar()->GetWindow()->Show ();
- GetTitleBar()->GetWindow()->AddEventListener (
- LINK(this,TitledControl,WindowEventListener));
-
- UpdateStates ();
-}
-
-
-
-
-TitledControl::TitledControl (
- TreeNode* pParent,
- ::std::auto_ptr<ControlFactory> pControlFactory,
- const String& rTitle,
- const ClickHandler& rClickHandler,
- TitleBar::TitleBarType eType)
- : ::Window (pParent->GetWindow(), WB_TABSTOP),
- TreeNode(pParent),
- msTitle (rTitle),
- mbVisible (true),
- mpUserData (NULL),
- mpControlFactory(pControlFactory),
- mpClickHandler(new ClickHandler(rClickHandler)),
- mbExpansionModeIsToggle(eType!=TitleBar::TBT_CONTROL_TITLE)
+ mpClickHandler(new ClickHandler(rClickHandler))
{
mpControlContainer->AddControl (::std::auto_ptr<TreeNode> (
- new TitleBar (this, rTitle, eType, true)));
+ new TitleBar (this, rTitle, eType, pControl->IsExpandable())));
+ pControl->SetParentNode (this);
+ mpControlContainer->AddControl (pControl);
- // The second control is created on demand, i.e. when GetControl(true)
- // is called the first time.
+ FocusManager::Instance().RegisterDownLink( GetTitleBar()->GetWindow(), GetControl()->GetWindow() );
+ FocusManager::Instance().RegisterUpLink( GetControl()->GetWindow(), GetTitleBar()->GetWindow() );
SetBackground (Wallpaper());
@@ -124,7 +86,7 @@ TitledControl::~TitledControl (void)
Size TitledControl::GetPreferredSize (void)
{
Size aPreferredSize;
- if (GetControl(false) != NULL)
+ if (GetControl() != NULL)
{
aPreferredSize = GetControl()->GetPreferredSize();
if ( ! IsExpanded())
@@ -146,7 +108,7 @@ Size TitledControl::GetPreferredSize (void)
sal_Int32 TitledControl::GetPreferredWidth (sal_Int32 nHeight)
{
int nPreferredWidth = 0;
- if (GetControl(false) != NULL)
+ if (GetControl() != NULL)
nPreferredWidth = GetControl()->GetPreferredWidth(
nHeight - GetTitleBar()->GetWindow()->GetSizePixel().Height());
else
@@ -163,7 +125,7 @@ sal_Int32 TitledControl::GetPreferredWidth (sal_Int32 nHeight)
sal_Int32 TitledControl::GetPreferredHeight (sal_Int32 nWidth)
{
int nPreferredHeight = 0;
- if (IsExpanded() && GetControl(false)!=NULL)
+ if (IsExpanded() && GetControl()!=NULL)
nPreferredHeight = GetControl()->GetPreferredHeight(nWidth);
nPreferredHeight += GetTitleBar()->GetPreferredHeight(nWidth);
@@ -201,7 +163,7 @@ void TitledControl::Resize (void)
Size (aWindowSize.Width(), nTitleBarHeight));
- TreeNode* pControl = GetControl(false);
+ TreeNode* pControl = GetControl();
if (pControl != NULL
&& pControl->GetWindow() != NULL
&& pControl->GetWindow()->IsVisible())
@@ -219,17 +181,7 @@ void TitledControl::GetFocus (void)
{
::Window::GetFocus();
if (GetTitleBar() != NULL)
- GetTitleBar()->SetFocus (true);
-}
-
-
-
-
-void TitledControl::LoseFocus (void)
-{
- ::Window::LoseFocus();
- if (GetTitleBar() != NULL)
- GetTitleBar()->SetFocus (false);
+ GetTitleBar()->GrabFocus();
}
@@ -258,7 +210,7 @@ void TitledControl::KeyInput (const KeyEvent& rEvent)
if ( ! FocusManager::Instance().TransferFocus(this,nCode))
{
// When already expanded then put focus on first child.
- TreeNode* pControl = GetControl(false);
+ TreeNode* pControl = GetControl();
if (pControl!=NULL && IsExpanded())
if (pControl->GetWindow() != NULL)
pControl->GetWindow()->GrabFocus();
@@ -296,7 +248,7 @@ bool TitledControl::Expand (bool bExpanded)
// Get the control. Use the bExpanded parameter as argument to
// indicate that a control is created via its factory only when it
// is to be expanded. When it is collapsed this is not necessary.
- TreeNode* pControl = GetControl(bExpanded);
+ TreeNode* pControl = GetControl();
if (pControl != NULL
&& GetControl()->IsExpanded() != bExpanded)
{
@@ -314,7 +266,7 @@ bool TitledControl::Expand (bool bExpanded)
bool TitledControl::IsExpandable (void) const
{
- const TreeNode* pControl = GetConstControl(false);
+ const TreeNode* pControl = GetConstControl();
if (pControl != NULL)
return pControl->IsExpandable();
else
@@ -328,7 +280,7 @@ bool TitledControl::IsExpandable (void) const
bool TitledControl::IsExpanded (void) const
{
- const TreeNode* pControl = GetConstControl(false);
+ const TreeNode* pControl = GetConstControl();
if (pControl != NULL)
return pControl->IsExpanded();
else
@@ -359,22 +311,6 @@ void TitledControl::SetEnabledState(bool bFlag)
-void TitledControl::SetUserData (void* pUserData)
-{
- mpUserData = pUserData;
-}
-
-
-
-
-void* TitledControl::GetUserData (void) const
-{
- return mpUserData;
-}
-
-
-
-
bool TitledControl::IsShowing (void) const
{
return mbVisible;
@@ -402,7 +338,7 @@ void TitledControl::UpdateStates (void)
else
GetWindow()->Hide();
- TreeNode* pControl = GetControl(false);
+ TreeNode* pControl = GetControl();
if (pControl!=NULL && pControl->GetWindow() != NULL)
{
if (IsVisible() && IsExpanded())
@@ -435,33 +371,17 @@ IMPL_LINK(TitledControl, WindowEventListener,
-TreeNode* TitledControl::GetControl (bool bCreate)
+TreeNode* TitledControl::GetControl (void)
{
- TreeNode* pNode = mpControlContainer->GetControl(1);
- if (pNode==NULL && mpControlFactory.get()!=NULL && bCreate)
- {
- // We have to create the control with the factory object.
- ::std::auto_ptr<TreeNode> pControl (mpControlFactory->CreateControl(this));//GetParentNode()));
- if (pControl.get() != NULL)
- {
- pControl->SetParentNode(this);
- mpControlContainer->AddControl(pControl);
-
- pNode = mpControlContainer->GetControl(1);
- FocusManager::Instance().RegisterDownLink(this, pNode->GetWindow());
- FocusManager::Instance().RegisterUpLink(pNode->GetWindow(), this);
- }
- }
-
- return pNode;
+ return mpControlContainer->GetControl(1);
}
-const TreeNode* TitledControl::GetConstControl (bool bCreate) const
+const TreeNode* TitledControl::GetConstControl () const
{
- return const_cast<TitledControl*>(this)->GetControl(bCreate);
+ return const_cast<TitledControl*>(this)->GetControl();
}
diff --git a/sd/source/ui/toolpanel/ToolPanel.cxx b/sd/source/ui/toolpanel/ToolPanel.cxx
index 89ab9397d4ee..6dbcae52547a 100644..100755
--- a/sd/source/ui/toolpanel/ToolPanel.cxx
+++ b/sd/source/ui/toolpanel/ToolPanel.cxx
@@ -1,5 +1,4 @@
/*************************************************************************
- *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
@@ -25,265 +24,90 @@
*
************************************************************************/
-// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
-#include "taskpane/ToolPanel.hxx"
-
-#include "TaskPaneFocusManager.hxx"
-#include "taskpane/TitleBar.hxx"
-#include "taskpane/TitledControl.hxx"
-#include "taskpane/ControlContainer.hxx"
-#include "TaskPaneViewShell.hxx"
-#include "taskpane/TaskPaneControlFactory.hxx"
-#include "AccessibleTaskPane.hxx"
-
-#include "strings.hrc"
-#include "sdresid.hxx"
-#include <vcl/decoview.hxx>
-#include <vcl/menu.hxx>
-#include <vcl/svapp.hxx>
-
-namespace sd { namespace toolpanel {
-
-
-/** Use WB_DIALOGCONTROL as argument for the Control constructor to
- let VCL handle focus traveling. In addition the control
- descriptors have to use WB_TABSTOP.
-*/
-ToolPanel::ToolPanel (
- Window* pParentWindow,
- TaskPaneViewShell& rViewShell)
- : Control (pParentWindow, WB_DIALOGCONTROL),
- TreeNode (NULL),
- mrViewShell(rViewShell),
- mbRearrangeActive(false)
-{
- SetBackground (Wallpaper ());
-}
-
-
-
-
-ToolPanel::~ToolPanel (void)
-{
-}
-
+#include "ToolPanel.hxx"
+#include "MethodGuard.hxx"
+#include <taskpane/TaskPaneTreeNode.hxx>
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/DisposedException.hpp>
+/** === end UNO includes === **/
+#include <vcl/window.hxx>
-sal_uInt32 ToolPanel::AddControl (
- ::std::auto_ptr<ControlFactory> pControlFactory,
- const String& rTitle,
- ULONG nHelpId,
- const TitledControl::ClickHandler& rClickHandler)
+//......................................................................................................................
+namespace sd { namespace toolpanel
{
- TitledControl* pTitledControl = new TitledControl (
- this,
- pControlFactory,
- rTitle,
- rClickHandler,
- TitleBar::TBT_CONTROL_TITLE);
- ::std::auto_ptr<TreeNode> pChild (pTitledControl);
-
- // Get the (grand) parent window which is focus-wise our parent.
- Window* pParent = GetParent();
- if (pParent != NULL)
- pParent = pParent->GetParent();
-
- FocusManager& rFocusManager (FocusManager::Instance());
- int nControlCount (mpControlContainer->GetControlCount());
-
- // Add a link up from every control to the parent. A down link is added
- // only for the first control so that when entering the sub tool panel
- // the focus is set to the first control.
- if (pParent != NULL)
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::accessibility::XAccessible;
+ /** === end UNO using === **/
+
+ typedef MethodGuard< ToolPanel > ToolPanelGuard;
+
+ //==================================================================================================================
+ //= ToolPanel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanel::ToolPanel( ::std::auto_ptr< TreeNode >& i_rControl )
+ :ToolPanel_Base( m_aMutex )
+ ,m_pControl( i_rControl )
{
- if (nControlCount == 1)
- rFocusManager.RegisterDownLink(pParent, pChild->GetWindow());
- rFocusManager.RegisterUpLink(pChild->GetWindow(), pParent);
}
- // Replace the old links for cycling between first and last child by
- // current ones.
- if (nControlCount > 0)
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanel::~ToolPanel()
{
- ::Window* pFirst = mpControlContainer->GetControl(0)->GetWindow();
- ::Window* pLast = mpControlContainer->GetControl(nControlCount-1)->GetWindow();
- rFocusManager.RemoveLinks(pFirst,pLast);
- rFocusManager.RemoveLinks(pLast,pFirst);
-
- rFocusManager.RegisterLink(pFirst,pChild->GetWindow(), KEY_UP);
- rFocusManager.RegisterLink(pChild->GetWindow(),pFirst, KEY_DOWN);
}
- pTitledControl->GetWindow()->SetHelpId(nHelpId);
-
- return mpControlContainer->AddControl (pChild);
-}
-
-
-
-
-void ToolPanel::ListHasChanged (void)
-{
- mpControlContainer->ListHasChanged ();
- Rearrange ();
-}
-
-
-
-
-void ToolPanel::Resize (void)
-{
- Control::Resize();
- Rearrange ();
-}
-
-
-
-
-void ToolPanel::RequestResize (void)
-{
- Invalidate();
- Rearrange ();
-}
-
-
-
-
-/** Subtract the space for the title bars from the available space and
- give the remaining space to the active control.
-*/
-void ToolPanel::Rearrange (void)
-{
- // Prevent recursive calls.
- if ( ! mbRearrangeActive && mpControlContainer->GetVisibleControlCount()>0)
+ //------------------------------------------------------------------------------------------------------------------
+ void ToolPanel::checkDisposed()
{
- mbRearrangeActive = true;
-
- SetBackground (Wallpaper ());
-
- // Make the area that is covered by the children a little bit
- // smaller so that a frame is visible arround them.
- Rectangle aAvailableArea (Point(0,0), GetOutputSizePixel());
-
- int nWidth = aAvailableArea.GetWidth();
- sal_uInt32 nControlCount (mpControlContainer->GetControlCount());
- sal_uInt32 nActiveControlIndex (
- mpControlContainer->GetActiveControlIndex());
+ if ( m_pControl.get() == NULL )
+ throw DisposedException( ::rtl::OUString(), *this );
+ }
- // Place title bars of controls above the active control and thereby
- // determine the top of the active control.
- sal_uInt32 nIndex;
- for (nIndex=mpControlContainer->GetFirstIndex();
- nIndex<nActiveControlIndex;
- nIndex=mpControlContainer->GetNextIndex(nIndex))
- {
- TreeNode* pChild = mpControlContainer->GetControl(nIndex);
- if (pChild != NULL)
- {
- sal_uInt32 nHeight = pChild->GetPreferredHeight (nWidth);
- pChild->GetWindow()->SetPosSizePixel (
- aAvailableArea.TopLeft(),
- Size(nWidth, nHeight));
- aAvailableArea.Top() += nHeight;
- }
- }
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XWindow > SAL_CALL ToolPanel::getWindow() throw (RuntimeException)
+ {
+ ToolPanelGuard aGuard( *this );
+ return Reference< XWindow >( m_pControl->GetWindow()->GetComponentInterface(), UNO_QUERY_THROW );
+ }
- // Place title bars of controls below the active control and thereby
- // determine the bottom of the active control.
- for (nIndex=mpControlContainer->GetLastIndex();
- nIndex<nControlCount && nIndex!=nActiveControlIndex;
- nIndex=mpControlContainer->GetPreviousIndex(nIndex))
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XAccessible > SAL_CALL ToolPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException)
+ {
+ ToolPanelGuard aGuard( *this );
+ Reference< XAccessible > xAccessible( m_pControl->GetWindow()->GetAccessible( FALSE ) );
+ if ( !xAccessible.is() )
{
- TreeNode* pChild = mpControlContainer->GetControl(nIndex);
- if (pChild != NULL)
- {
- sal_uInt32 nHeight = pChild->GetPreferredHeight (nWidth);
- pChild->GetWindow()->SetPosSizePixel (
- Point(aAvailableArea.Left(),
- aAvailableArea.Bottom()-nHeight+1),
- Size(nWidth, nHeight));
- aAvailableArea.Bottom() -= nHeight;
- }
+ xAccessible.set( m_pControl->CreateAccessibleObject( i_rParentAccessible ) );
+ m_pControl->GetWindow()->SetAccessible( xAccessible );
}
-
- // Finally place the active control.
- TreeNode* pChild = mpControlContainer->GetControl(nActiveControlIndex);
- if (pChild != NULL)
- pChild->GetWindow()->SetPosSizePixel (
- aAvailableArea.TopLeft(),
- aAvailableArea.GetSize());
-
- mbRearrangeActive = false;
+ return xAccessible;
}
- else
- SetBackground (
- Application::GetSettings().GetStyleSettings().GetDialogColor());
-}
-
-
-
-
-Size ToolPanel::GetPreferredSize (void)
-{
- return Size(300,300);
-}
-
-
-
-
-sal_Int32 ToolPanel::GetPreferredWidth (sal_Int32 )
-{
- return 300;
-}
-
-
-
-
-sal_Int32 ToolPanel::GetPreferredHeight (sal_Int32 )
-{
- return 300;
-}
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL ToolPanel::disposing()
+ {
+ m_pControl.reset();
+ }
-
-
-bool ToolPanel::IsResizable (void)
-{
- return true;
-}
-
-
-
-
-::Window* ToolPanel::GetWindow (void)
-{
- return this;
-}
-
-
-
-
-TaskPaneShellManager* ToolPanel::GetShellManager (void)
-{
- return &mrViewShell.GetSubShellManager();
-}
-
-
-
-
-::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> ToolPanel::CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>& rxParent)
-{
- return new ::accessibility::AccessibleTaskPane (
- rxParent,
- String(SdResId(STR_RIGHT_PANE_TITLE)),
- String(SdResId(STR_RIGHT_PANE_TITLE)),
- *this);
-}
-
-} } // end of namespace ::sd::toolpanel
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
diff --git a/sd/source/ui/toolpanel/ToolPanel.hxx b/sd/source/ui/toolpanel/ToolPanel.hxx
new file mode 100644
index 000000000000..2fe4a64c71be
--- /dev/null
+++ b/sd/source/ui/toolpanel/ToolPanel.hxx
@@ -0,0 +1,80 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SD_TOOLPANEL_HXX
+#define SD_TOOLPANEL_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/XToolPanel.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase1.hxx>
+
+#include <memory>
+
+//......................................................................................................................
+namespace sd { namespace toolpanel
+{
+//......................................................................................................................
+
+ class TreeNode;
+
+ //==================================================================================================================
+ //= ToolPanel
+ //==================================================================================================================
+ typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::ui::XToolPanel
+ > ToolPanel_Base;
+ class ToolPanel :public ::cppu::BaseMutex
+ ,public ToolPanel_Base
+ {
+ public:
+ ToolPanel(
+ ::std::auto_ptr< TreeNode >& i_rControl
+ );
+
+ // XToolPanel
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL createAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& ParentAccessible ) throw (::com::sun::star::uno::RuntimeException);
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ ::osl::Mutex& getMutex() { return m_aMutex; }
+ void checkDisposed();
+
+ protected:
+ ~ToolPanel();
+
+ private:
+ ::std::auto_ptr< TreeNode > m_pControl;
+ };
+
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
+
+#endif // SD_TOOLPANEL_HXX
diff --git a/sd/source/ui/toolpanel/ToolPanelChildWindow.cxx b/sd/source/ui/toolpanel/ToolPanelChildWindow.cxx
deleted file mode 100644
index 1db383091bff..000000000000
--- a/sd/source/ui/toolpanel/ToolPanelChildWindow.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "ToolPanelChildWindow.hxx"
-#include "ToolPanelDockingWindow.hxx"
-
-#include "sdresid.hxx"
-#include "app.hrc"
-#include "sfx2/app.hxx"
-
-
-namespace sd { namespace toolpanel {
-
-
-
-ToolPanelChildWindow::ToolPanelChildWindow (
- ::Window* pParentWindow,
- USHORT nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo)
- : SfxChildWindow (pParentWindow, nId)
-{
- pWindow = new ToolPanelDockingWindow (pBindings, this, pParentWindow);
- eChildAlignment = SFX_ALIGN_RIGHT;
- static_cast<SfxDockingWindow*>(pWindow)->Initialize (pInfo);
- // SetHideNotDelete (TRUE);
-};
-
-
-
-
-ToolPanelChildWindow::~ToolPanelChildWindow()
-{}
-
-
-SFX_IMPL_DOCKINGWINDOW(ToolPanelChildWindow, SID_TOOLPANEL)
-
-
-
-
-} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/ToolPanelChildWindow.src b/sd/source/ui/toolpanel/ToolPanelChildWindow.src
deleted file mode 100644
index 079f9608f616..000000000000
--- a/sd/source/ui/toolpanel/ToolPanelChildWindow.src
+++ /dev/null
@@ -1,52 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "app.hrc"
-#include "ToolPanelChildWindow.hrc"
-
-DockingWindow FLT_WIN_TOOLPANEL
-{
- HelpID = SID_TOOLPANEL ;
- Border = TRUE ;
- Hide = FALSE ;
- SVLook = TRUE ;
- Sizeable = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Zoomable = TRUE ;
- Dockable = TRUE ;
- EnableResizing = TRUE ;
- Size = MAP_APPFONT ( 140 , 120 ) ;
- Text = "Tool Panel" ;
-
- Control TOOLPANEL
- {
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( 69, 150 ) ;
- Border = FALSE;
- };
-};
diff --git a/sd/source/ui/toolpanel/ToolPanelFactory.cxx b/sd/source/ui/toolpanel/ToolPanelFactory.cxx
new file mode 100644
index 000000000000..db4602c991d0
--- /dev/null
+++ b/sd/source/ui/toolpanel/ToolPanelFactory.cxx
@@ -0,0 +1,255 @@
+/*************************************************************************
+ * 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 "taskpane/ToolPanelViewShell.hxx"
+#include "framework/FrameworkHelper.hxx"
+#include "PaneChildWindows.hxx"
+#include "ViewShellBase.hxx"
+#include "app.hrc"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/XUIElementFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+/** === end UNO includes === **/
+
+#include <sfx2/frame.hxx>
+#include <vcl/svapp.hxx>
+#include <vos/mutex.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+
+//......................................................................................................................
+namespace sd { namespace toolpanel
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::XComponentContext;
+ using ::com::sun::star::ui::XUIElementFactory;
+ using ::com::sun::star::ui::XUIElement;
+ using ::com::sun::star::beans::PropertyValue;
+ using ::com::sun::star::container::NoSuchElementException;
+ using ::com::sun::star::lang::IllegalArgumentException;
+ using ::com::sun::star::lang::XServiceInfo;
+ using ::com::sun::star::lang::XInitialization;
+ using ::com::sun::star::frame::XFrame;
+ using ::com::sun::star::awt::XWindow;
+ /** === end UNO using === **/
+
+ //==================================================================================================================
+ //= ToolPanelFactory
+ //==================================================================================================================
+ typedef ::cppu::WeakImplHelper3 < XUIElementFactory
+ , XServiceInfo
+ , XInitialization
+ > ToolPanelFactory_Base;
+ class ToolPanelFactory : public ToolPanelFactory_Base
+ {
+ public:
+ ToolPanelFactory( const Reference< XComponentContext >& i_rContext );
+
+ // XUIElementFactory
+ virtual Reference< XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& ResourceURL, const Sequence< PropertyValue >& Args ) throw (NoSuchElementException, IllegalArgumentException, RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (RuntimeException);
+ virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (RuntimeException);
+ virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException);
+
+ protected:
+ virtual ~ToolPanelFactory();
+
+ private:
+ const Reference< XComponentContext > m_xContext;
+ };
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL ToolPanelFactory_createInstance( const Reference< XComponentContext >& i_rContext )
+ {
+ return Reference< XInterface >( *new ToolPanelFactory( i_rContext ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString ToolPanelFactory_getImplementationName() throw(RuntimeException)
+ {
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.drawing.ToolPanelFactory" ) );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
+ throw (RuntimeException)
+ {
+ const ::rtl::OUString sServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DefaultToolPanelFactory" ) );
+ return Sequence< ::rtl::OUString >( &sServiceName, 1 );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanelFactory::ToolPanelFactory( const Reference< XComponentContext >& i_rContext )
+ :m_xContext( i_rContext )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanelFactory::~ToolPanelFactory()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XUIElement > SAL_CALL ToolPanelFactory::createUIElement( const ::rtl::OUString& i_rResourceURL, const Sequence< PropertyValue >& i_rArgs ) throw (NoSuchElementException, IllegalArgumentException, RuntimeException)
+ {
+ ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+
+ const PanelId ePanelId( toolpanel::GetStandardPanelId( i_rResourceURL ) );
+ if ( ePanelId == PID_UNKNOWN )
+ throw NoSuchElementException( i_rResourceURL, *this );
+
+ const ::comphelper::NamedValueCollection aArgs( i_rArgs );
+ const Reference< XFrame > xDocFrame( aArgs.getOrDefault( "Frame", Reference< XFrame >() ) );
+ const Reference< XWindow > xParentWindow( aArgs.getOrDefault( "ParentWindow", Reference< XWindow >() ) );
+ if ( !xDocFrame.is() || !xParentWindow.is() )
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "For creating a standard tool panel, a Frame and a Parent window are needed." ) ),
+ *this,
+ 2
+ );
+
+ // look up the Sfx(View)Frame for the given XFrame
+ SfxViewFrame* pViewFrame = NULL;
+ for ( SfxFrame* pFrame = SfxFrame::GetFirst();
+ pFrame != NULL;
+ pFrame = SfxFrame::GetNext( *pFrame )
+ )
+ {
+ if ( pFrame->GetFrameInterface() == xDocFrame )
+ {
+ pViewFrame = pFrame->GetCurrentViewFrame();
+ break;
+ }
+ }
+
+ if ( !pViewFrame || !pViewFrame->HasChildWindow( SID_TASKPANE ) )
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal frame." ) ),
+ *this,
+ 2
+ );
+
+ // retrieve the task pane
+ ToolPanelChildWindow* pToolPanelWindow( dynamic_cast< ToolPanelChildWindow* >( pViewFrame->GetChildWindow( SID_TASKPANE ) ) );
+ if ( !pToolPanelWindow )
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No Impress document, or no Impress Task Pane." ) ),
+ *this,
+ 2
+ );
+
+ // retrieve the ViewShellBase, and the view shell of the task pane
+ ViewShellBase* pViewShellBase = dynamic_cast< ViewShellBase* >( pViewFrame->GetViewShell() );
+ ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper;
+ if ( pViewShellBase )
+ pFrameworkHelper = framework::FrameworkHelper::Instance( *pViewShellBase );
+ ::boost::shared_ptr< ViewShell > pViewShell;
+ if ( pFrameworkHelper.get() )
+ pViewShell = pFrameworkHelper->GetViewShell( framework::FrameworkHelper::msRightPaneURL );
+ ToolPanelViewShell* pToolPanelShell = dynamic_cast< ToolPanelViewShell* >( pViewShell.get() );
+
+ if ( !pToolPanelShell )
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Wrong document type." ) ),
+ *this,
+ 2
+ );
+
+ ::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
+ if ( !pParentWindow || !pToolPanelShell->IsPanelAnchorWindow( *pParentWindow ) )
+ throw IllegalArgumentException(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported parent window." ) ),
+ *this,
+ 2
+ );
+
+ return pToolPanelShell->CreatePanelUIElement( xDocFrame, i_rResourceURL );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL ToolPanelFactory::getImplementationName( ) throw (RuntimeException)
+ {
+ return ToolPanelFactory_getImplementationName();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL ToolPanelFactory::supportsService( const ::rtl::OUString& i_rServiceName ) throw (RuntimeException)
+ {
+ const Sequence< ::rtl::OUString > aSupported( getSupportedServiceNames() );
+ for ( const ::rtl::OUString* pSupported = aSupported.getConstArray();
+ pSupported != aSupported.getConstArray() + aSupported.getLength();
+ ++pSupported
+ )
+ if ( *pSupported == i_rServiceName )
+ return sal_True;
+
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames( ) throw (RuntimeException)
+ {
+ return ToolPanelFactory_getSupportedServiceNames();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL ToolPanelFactory::initialize( const Sequence< Any >& i_rArguments ) throw (Exception, RuntimeException)
+ {
+ ::comphelper::NamedValueCollection aArgs( i_rArguments );
+ (void)aArgs;
+ // TODO
+ }
+
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
diff --git a/sd/source/ui/toolpanel/ToolPanelUIElement.cxx b/sd/source/ui/toolpanel/ToolPanelUIElement.cxx
new file mode 100644
index 000000000000..e81f683bcfa7
--- /dev/null
+++ b/sd/source/ui/toolpanel/ToolPanelUIElement.cxx
@@ -0,0 +1,134 @@
+/*************************************************************************
+ * 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 "ToolPanelUIElement.hxx"
+#include "MethodGuard.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/UIElementType.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+
+//......................................................................................................................
+namespace sd { namespace toolpanel
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::frame::XFrame;
+ using ::com::sun::star::lang::XComponent;
+ using ::com::sun::star::ui::XToolPanel;
+ using ::com::sun::star::lang::DisposedException;
+ /** === end UNO using === **/
+ namespace UIElementType = ::com::sun::star::ui::UIElementType;
+
+ typedef MethodGuard< ToolPanelUIElement > UIElementMethodGuard;
+
+ //==================================================================================================================
+ //= ToolPanelUIElement
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanelUIElement::ToolPanelUIElement( const Reference< XFrame >& i_rFrame, const ::rtl::OUString& i_rResourceURL,
+ const Reference< XToolPanel >& i_rToolPanel )
+ :ToolPanelUIElement_Base( m_aMutex )
+ ,m_xFrame( i_rFrame )
+ ,m_sResourceURL( i_rResourceURL )
+ ,m_xToolPanel( i_rToolPanel )
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ToolPanelUIElement::~ToolPanelUIElement()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void ToolPanelUIElement::checkDisposed()
+ {
+ if ( !m_xToolPanel.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XFrame > SAL_CALL ToolPanelUIElement::getFrame() throw (RuntimeException)
+ {
+ UIElementMethodGuard aGuard( *this );
+ return m_xFrame;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::rtl::OUString SAL_CALL ToolPanelUIElement::getResourceURL() throw (RuntimeException)
+ {
+ UIElementMethodGuard aGuard( *this );
+ return m_sResourceURL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Int16 SAL_CALL ToolPanelUIElement::getType() throw (RuntimeException)
+ {
+ UIElementMethodGuard aGuard( *this );
+ return UIElementType::TOOLPANEL;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XInterface > SAL_CALL ToolPanelUIElement::getRealInterface( ) throw (RuntimeException)
+ {
+ UIElementMethodGuard aGuard( *this );
+ return m_xToolPanel.get();
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL ToolPanelUIElement::disposing()
+ {
+ try
+ {
+ Reference< XComponent > xPanelComponent( m_xToolPanel, UNO_QUERY_THROW );
+ xPanelComponent->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
diff --git a/sd/source/ui/toolpanel/ToolPanelUIElement.hxx b/sd/source/ui/toolpanel/ToolPanelUIElement.hxx
new file mode 100644
index 000000000000..0a74b7bd449e
--- /dev/null
+++ b/sd/source/ui/toolpanel/ToolPanelUIElement.hxx
@@ -0,0 +1,87 @@
+/*************************************************************************
+ * 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_TOOLPANELUIELEMENT_HXX
+#define SD_TOOLPANELUIELEMENT_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/ui/XUIElement.hpp>
+#include <com/sun/star/ui/XToolPanel.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+#include <memory>
+
+//......................................................................................................................
+namespace sd { namespace toolpanel
+{
+//......................................................................................................................
+
+ class TreeNode;
+
+ //==================================================================================================================
+ //= ToolPanelUIElement
+ //==================================================================================================================
+ typedef ::cppu::WeakComponentImplHelper1 < ::com::sun::star::ui::XUIElement
+ > ToolPanelUIElement_Base;
+ class ToolPanelUIElement :public ::cppu::BaseMutex
+ ,public ToolPanelUIElement_Base
+ {
+ public:
+ ToolPanelUIElement(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rFrame,
+ const ::rtl::OUString& i_rResourceURL,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XToolPanel >& i_rToolPanel
+ );
+
+ // XUIElement
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getResourceURL() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getRealInterface( ) throw (::com::sun::star::uno::RuntimeException);
+
+ void checkDisposed();
+ ::osl::Mutex& getMutex() { return m_aMutex; }
+
+ protected:
+ virtual ~ToolPanelUIElement();
+
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
+ private:
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame;
+ const ::rtl::OUString m_sResourceURL;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XToolPanel > m_xToolPanel;
+ };
+
+//......................................................................................................................
+} } // namespace sd::toolpanel
+//......................................................................................................................
+
+#endif // SD_TOOLPANELUIELEMENT_HXX
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
new file mode 100755
index 000000000000..c62faf29ca50
--- /dev/null
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -0,0 +1,900 @@
+/*************************************************************************
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include "taskpane/ToolPanelViewShell.hxx"
+
+#include "TaskPaneShellManager.hxx"
+#include "TaskPaneFocusManager.hxx"
+#include "taskpane/TaskPaneControlFactory.hxx"
+#include "controls/MasterPagesPanel.hxx"
+#include "LayoutMenu.hxx"
+#include "DrawDocShell.hxx"
+#include "controls/TableDesignPanel.hxx"
+#include "controls/CustomAnimationPanel.hxx"
+#include "controls/SlideTransitionPanel.hxx"
+#include "controls/MasterPagesSelector.hxx"
+#include "ToolPanel.hxx"
+#include "ToolPanelUIElement.hxx"
+#include "PaneDockingWindow.hxx"
+#include "FrameView.hxx"
+#include "Window.hxx"
+#include "sdmod.hxx"
+#include "app.hrc"
+#include "glob.hrc"
+#include "res_bmp.hrc"
+#include "helpids.h"
+#include "strings.hrc"
+#include "sdresid.hxx"
+#include "framework/FrameworkHelper.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/drawing/framework/XResourceId.hpp>
+#include <com/sun/star/drawing/framework/ResourceActivationMode.hpp>
+#include <com/sun/star/drawing/framework/AnchorBindingMode.hpp>
+#include <com/sun/star/drawing/framework/ResourceActivationMode.hpp>
+#include <com/sun/star/drawing/XDrawSubController.hpp>
+/** === end UNO includes === **/
+
+#include <svtools/toolpanel/toolpanel.hxx>
+#include <svtools/toolpanel/toolpaneldeck.hxx>
+#include <svx/dlgctrl.hxx>
+#include <sfx2/taskpane.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/msg.hxx>
+#include <sfx2/objface.hxx>
+#include <svx/colrctrl.hxx>
+#include <svx/xtable.hxx>
+#include <vcl/dockwin.hxx>
+#include "sdtreelb.hxx"
+#include "DrawViewShell.hxx"
+#include "drawdoc.hxx"
+#include "ViewShellBase.hxx"
+#include <svx/ruler.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/toolbox.hxx>
+#include <tools/diagnose_ex.h>
+#include <unotools/confignode.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+#include <vector>
+
+using namespace ::sd::toolpanel;
+
+#define ToolPanelViewShell
+#include "sdslots.hxx"
+
+/** === begin UNO using === **/
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::XInterface;
+using ::com::sun::star::uno::UNO_QUERY;
+using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_SET_THROW;
+using ::com::sun::star::uno::Exception;
+using ::com::sun::star::uno::RuntimeException;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::makeAny;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::uno::Type;
+using ::com::sun::star::accessibility::XAccessible;
+using ::com::sun::star::drawing::XDrawSubController;
+using ::com::sun::star::frame::XFrame;
+using ::com::sun::star::drawing::framework::XResourceId;
+using ::com::sun::star::drawing::framework::XConfigurationChangeListener;
+using ::com::sun::star::drawing::framework::ConfigurationChangeEvent;
+using ::com::sun::star::lang::EventObject;
+using ::com::sun::star::lang::DisposedException;
+using ::com::sun::star::drawing::framework::XConfigurationControllerBroadcaster;
+using ::com::sun::star::drawing::framework::XConfigurationController;
+using ::com::sun::star::drawing::framework::XConfiguration;
+using ::com::sun::star::drawing::framework::AnchorBindingMode_DIRECT;
+using ::com::sun::star::ui::XUIElement;
+using ::com::sun::star::ui::XToolPanel;
+using ::com::sun::star::drawing::framework::ResourceActivationMode_REPLACE;
+/** === end UNO using === **/
+
+using ::sd::framework::FrameworkHelper;
+
+namespace sd { namespace toolpanel {
+
+// =====================================================================================================================
+// = misc helper
+// =====================================================================================================================
+// ---------------------------------------------------------------------------------------------------------------------
+PanelId GetStandardPanelId( const ::rtl::OUString& i_rTaskPanelResourceURL, const bool i_bIgnoreUnknown )
+{
+ PanelId ePanelId( PID_UNKNOWN );
+
+ if ( i_rTaskPanelResourceURL.equals( FrameworkHelper::msMasterPagesTaskPanelURL ) )
+ {
+ ePanelId = PID_MASTER_PAGES;
+ }
+ else if ( i_rTaskPanelResourceURL.equals( FrameworkHelper::msLayoutTaskPanelURL ) )
+ {
+ ePanelId = PID_LAYOUT;
+ }
+ else if ( i_rTaskPanelResourceURL.equals( FrameworkHelper::msTableDesignPanelURL ) )
+ {
+ ePanelId = PID_TABLE_DESIGN;
+ }
+ else if ( i_rTaskPanelResourceURL.equals( FrameworkHelper::msCustomAnimationTaskPanelURL ) )
+ {
+ ePanelId = PID_CUSTOM_ANIMATION;
+ }
+ else if ( i_rTaskPanelResourceURL.equals( FrameworkHelper::msSlideTransitionTaskPanelURL ) )
+ {
+ ePanelId = PID_SLIDE_TRANSITION;
+ }
+ else
+ {
+ OSL_ENSURE( i_bIgnoreUnknown, "GetStandardPanelId: cannot translate the given resource URL!" );
+ (void)i_bIgnoreUnknown;
+ }
+
+ return ePanelId;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+PanelId GetStandardPanelId( const ::rtl::OUString& i_rTaskPanelResourceURL )
+{
+ return GetStandardPanelId( i_rTaskPanelResourceURL, false );
+}
+
+// =====================================================================================================================
+// = ConfigurationListener - declaration
+// =====================================================================================================================
+typedef ::cppu::WeakImplHelper1 < XConfigurationChangeListener
+ > ConfigurationListener_Base;
+
+class ConfigurationListener :public ::cppu::BaseMutex
+ ,public ConfigurationListener_Base
+{
+public:
+ ConfigurationListener( ToolPanelViewShell_Impl& i_rShellImpl );
+
+ // XConfigurationChangeListener
+ virtual void SAL_CALL notifyConfigurationChange( const ConfigurationChangeEvent& aEvent ) throw (RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException);
+
+ // XComponent equivalents (not available per UNO interface)
+ void dispose();
+
+protected:
+ ~ConfigurationListener();
+
+ void impl_checkDisposed_throw()
+ {
+ if ( !m_pShellImpl )
+ throw DisposedException( ::rtl::OUString(), *this );
+ }
+
+private:
+ ToolPanelViewShell_Impl* m_pShellImpl;
+};
+
+// =====================================================================================================================
+// = ToolPanelViewShell_Impl - declaration
+// =====================================================================================================================
+/** Inner implementation class of ToolPanelViewShell.
+*/
+class ToolPanelViewShell_Impl :public ::boost::noncopyable
+ ,public ::svt::IToolPanelDeckListener
+ ,public ::sfx2::IToolPanelCompare
+{
+public:
+ static const size_t mnInvalidId = static_cast< size_t >( -1 );
+
+ ToolPanelViewShell_Impl( ToolPanelViewShell& i_rPanelViewShell, ::Window& i_rPanelDeckParent );
+ ~ToolPanelViewShell_Impl();
+
+ ToolPanelViewShell& GetAntiImpl() { return m_rPanelViewShell; }
+
+ /** Here the panels are created that are shown in the task pane.
+ */
+ void Setup();
+
+ /** clean up the instance
+ */
+ void Cleanup();
+
+ /** activates the panel which has the given resource URL
+ */
+ void ActivatePanelByResource( const ::rtl::OUString& i_rPanelResourceURL );
+
+ /** de-activates the panel given by its resource URL, bypassing the configuration controller
+
+ If the panel is not active currently, nothing happens.
+ */
+ void DeactivatePanelByResource( const ::rtl::OUString& i_rPanelResourceURL );
+
+ /** provides access to the the VCL window of the panel deck
+ */
+ ::sfx2::ModuleTaskPane& GetTaskPane() { return *m_pTaskPane; }
+ const ::sfx2::ModuleTaskPane& GetTaskPane() const { return *m_pTaskPane; }
+
+ ::svt::ToolPanelDeck& GetToolPanelDeck() { return GetTaskPane().GetPanelDeck(); }
+ const ::svt::ToolPanelDeck& GetToolPanelDeck() const { return GetTaskPane().GetPanelDeck(); }
+
+ Reference< XAccessible >
+ CreateAccessible( ::sd::Window& i_rWindow );
+
+ void ConnectToDockingWindow();
+
+private:
+ // IToolPanelDeckListener overridables
+ virtual void PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition );
+ virtual void PanelRemoved( const size_t i_nPosition );
+ virtual void ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive );
+ virtual void LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter );
+ virtual void Dying();
+
+ // IToolPanelCompare overridables
+ virtual short compareToolPanelsURLs( const ::rtl::OUString& i_rLHS, const ::rtl::OUString& i_rRHS ) const;
+
+private:
+ struct InitialPanel
+ {
+ ::rtl::OUString sPanelResourceURL;
+ bool bActivateDirectly;
+ InitialPanel()
+ :sPanelResourceURL()
+ ,bActivateDirectly( true )
+ {
+ }
+ };
+ InitialPanel impl_determineInitialPanel();
+ ::rtl::OUString impl_getPanelURL( const ::boost::optional< size_t >& i_rPanel );
+
+private:
+ ToolPanelViewShell& m_rPanelViewShell;
+ ::boost::scoped_ptr< ::sfx2::ModuleTaskPane > m_pTaskPane;
+ ::std::auto_ptr< ::sfx2::TaskPaneController > m_pTaskPaneController;
+ ::rtl::Reference< ConfigurationListener > m_pConfigListener;
+ bool m_bInitialized;
+};
+
+// =====================================================================================================================
+// = ConfigurationListener - implementation
+// =====================================================================================================================
+// ---------------------------------------------------------------------------------------------------------------------
+ConfigurationListener::ConfigurationListener( ToolPanelViewShell_Impl& i_rShellImpl )
+ :m_pShellImpl( &i_rShellImpl )
+{
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( i_rShellImpl.GetAntiImpl().GetViewShellBase() ) );
+ Reference< XConfigurationControllerBroadcaster > xBroadcaster;
+ if ( pFrameworkHelper.get() )
+ xBroadcaster.set( pFrameworkHelper->GetConfigurationController().get() );
+ ENSURE_OR_THROW( pFrameworkHelper.get(), "no access to the config controller" );
+
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ xBroadcaster->addConfigurationChangeListener( this, ::rtl::OUString(), Any() );
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+ConfigurationListener::~ConfigurationListener()
+{
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL ConfigurationListener::notifyConfigurationChange( const ConfigurationChangeEvent& i_rEvent ) throw (RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+
+ // is this an event we're interested in?
+ if ( i_rEvent.Type != FrameworkHelper::msResourceActivationEvent )
+ return;
+
+ // is this a resource we're interested in? Must be anchored in the task pane ...
+ Reference< XResourceId > xAnchorId;
+ if ( i_rEvent.ResourceId.is() )
+ xAnchorId = i_rEvent.ResourceId->getAnchor();
+ if ( !xAnchorId.is() )
+ return;
+ const ::rtl::OUString sAnchorURL( xAnchorId->getResourceURL() );
+ if ( sAnchorURL != FrameworkHelper::msTaskPaneURL )
+ return;
+
+ m_pShellImpl->ActivatePanelByResource( i_rEvent.ResourceId->getResourceURL() );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void SAL_CALL ConfigurationListener::disposing( const EventObject& i_rEvent ) throw (RuntimeException)
+{
+ (void)i_rEvent;
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ impl_checkDisposed_throw();
+ }
+
+ dispose();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ConfigurationListener::dispose()
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+ m_pShellImpl = NULL;
+}
+
+// =====================================================================================================================
+// = ToolPanelViewShell
+// =====================================================================================================================
+// ---------------------------------------------------------------------------------------------------------------------
+SFX_IMPL_INTERFACE(ToolPanelViewShell, SfxShell, SdResId(STR_TASKPANEVIEWSHELL))
+{
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+TYPEINIT1(ToolPanelViewShell, ViewShell);
+
+// ---------------------------------------------------------------------------------------------------------------------
+ToolPanelViewShell_Impl::InitialPanel ToolPanelViewShell_Impl::impl_determineInitialPanel()
+{
+ InitialPanel aPanelToActivate;
+ if ( GetAntiImpl().GetViewShellBase().GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW )
+ // for Draw, rely on SFX's default handling, which is to activate the previously active panel
+ return aPanelToActivate;
+
+ // Default to Layout panel, but check whether the requested configuration already contains a tool panel, in this case,
+ // use that one.
+ aPanelToActivate.sPanelResourceURL = FrameworkHelper::msLayoutTaskPanelURL;
+ aPanelToActivate.bActivateDirectly = false;
+ try
+ {
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( m_rPanelViewShell.GetViewShellBase() ) );
+ const Reference< XResourceId > xToolPanelId( pFrameworkHelper->CreateResourceId( FrameworkHelper::msTaskPaneURL, FrameworkHelper::msRightPaneURL ) );
+ Reference< XConfigurationController > xCC( pFrameworkHelper->GetConfigurationController(), UNO_QUERY_THROW );
+ Reference< XConfiguration > xConfiguration( xCC->getRequestedConfiguration(), UNO_QUERY_THROW );
+ Sequence< Reference< XResourceId > > aViewIds( xConfiguration->getResources(
+ FrameworkHelper::CreateResourceId( FrameworkHelper::msTaskPaneURL, FrameworkHelper::msRightPaneURL ),
+ FrameworkHelper::msTaskPanelURLPrefix, AnchorBindingMode_DIRECT ) );
+
+ if ( aViewIds.getLength() > 0 )
+ {
+ const ::rtl::OUString sResourceURL( aViewIds[0]->getResourceURL() );
+ PanelId nRequestedPanel = GetStandardPanelId( sResourceURL );
+ if ( nRequestedPanel != PID_UNKNOWN )
+ {
+ aPanelToActivate.sPanelResourceURL = sResourceURL;
+ aPanelToActivate.bActivateDirectly = true;
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return aPanelToActivate;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::Setup()
+{
+ if ( m_bInitialized )
+ return;
+ m_bInitialized = true;
+
+ // initially activate a panel
+ const InitialPanel aInitialPanel = impl_determineInitialPanel();
+ if ( aInitialPanel.sPanelResourceURL.getLength() )
+ {
+ if ( aInitialPanel.bActivateDirectly )
+ {
+ ActivatePanelByResource( aInitialPanel.sPanelResourceURL );
+ }
+ else
+ {
+ ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( GetAntiImpl().GetViewShellBase() ) );
+ pFrameworkHelper->RequestTaskPanel( aInitialPanel.sPanelResourceURL );
+ }
+ }
+
+ // listen at the configuration
+ m_pConfigListener.set( new ConfigurationListener( *this ) );
+
+ m_pTaskPane->Show();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::Cleanup()
+{
+ if ( m_bInitialized )
+ {
+ if ( m_pConfigListener.is() )
+ m_pConfigListener->dispose();
+ }
+ GetToolPanelDeck().RemoveListener( *this );
+ m_pTaskPaneController.reset();
+ m_pTaskPane.reset();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::ActivatePanelByResource( const ::rtl::OUString& i_rResourceURL )
+{
+ // determine position of the requested panel
+ ::boost::optional< size_t > aPanelPos = GetTaskPane().GetPanelPos( i_rResourceURL );
+ OSL_ENSURE( !!aPanelPos, "ToolPanelViewShell_Impl::ActivatePanelByResource: illegal panel resource, or illegal panel deck setup!" );
+ if ( !!aPanelPos )
+ GetToolPanelDeck().ActivatePanel( *aPanelPos );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::DeactivatePanelByResource( const ::rtl::OUString& i_rPanelResourceURL )
+{
+ // determine position of the requested panel
+ ::boost::optional< size_t > aPanelPos = GetTaskPane().GetPanelPos( i_rPanelResourceURL );
+ OSL_ENSURE( !!aPanelPos, "ToolPanelViewShell_Impl::DeactivatePanelByResource: illegal panel resource, or illegal panel deck setup!" );
+ if ( !!aPanelPos )
+ {
+ if ( GetToolPanelDeck().GetActivePanel() == *aPanelPos )
+ GetToolPanelDeck().ActivatePanel( ::boost::optional< size_t >() );
+ }
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::Initialize()
+{
+ mpImpl->Setup();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+ToolPanelViewShell::ToolPanelViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, ::Window* pParentWindow,
+ FrameView* pFrameViewArgument )
+ :ViewShell(pFrame, pParentWindow, rViewShellBase)
+ ,mpImpl( new ToolPanelViewShell_Impl( *this, *mpContentWindow.get() ) )
+ ,mpSubShellManager()
+ ,mnMenuId(0)
+{
+ meShellType = ST_TASK_PANE;
+
+ mpContentWindow->SetCenterAllowed( false );
+ pParentWindow->SetStyle( pParentWindow->GetStyle() | WB_DIALOGCONTROL );
+
+ GetParentWindow()->SetBackground( Wallpaper() );
+ mpContentWindow->SetBackground( Wallpaper() );
+
+ GetParentWindow()->SetHelpId(HID_SD_TASK_PANE);
+
+ mpImpl->ConnectToDockingWindow();
+
+ SetPool( &GetDoc()->GetPool() );
+
+ if ( pFrameViewArgument )
+ mpFrameView = pFrameViewArgument;
+ else
+ mpFrameView = new FrameView( GetDoc() );
+ GetFrameView()->Connect();
+
+ // Hide or delete unused controls that we have inherited from the
+ // ViewShell base class.
+ mpHorizontalScrollBar.reset();
+ mpVerticalScrollBar.reset();
+ mpScrollBarBox.reset();
+ mpHorizontalRuler.reset();
+ mpVerticalRuler.reset();
+
+ SetName( String( RTL_CONSTASCII_USTRINGPARAM( "ToolPanelViewShell" ) ) );
+
+ // For accessibility we have to shortly hide the content window. This
+ // triggers the construction of a new accessibility object for the new
+ // view shell. (One is created earlier while the construtor of the base
+ // class is executed. At that time the correct accessibility object can
+ // not be constructed.)
+ if ( mpContentWindow.get() )
+ {
+ mpContentWindow->Hide();
+ mpContentWindow->Show();
+ }
+
+ // Register the shell manager as factory at the ViewShellManager.
+ mpSubShellManager.reset( new TaskPaneShellManager(
+ GetViewShellBase().GetViewShellManager(),
+ *this
+ ) );
+ GetViewShellBase().GetViewShellManager()->AddSubShellFactory( this, mpSubShellManager );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+ToolPanelViewShell::~ToolPanelViewShell()
+{
+ mpImpl->Cleanup();
+
+ // reset our impl before destroying the panel deck, to ensure the hidden panels are properly
+ // disposed/destroyed, too
+ mpImpl.reset();
+ GetViewShellBase().GetViewShellManager()->RemoveSubShellFactory(this, mpSubShellManager);
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+// static
+void ToolPanelViewShell::RegisterControls()
+{
+ SfxModule* pModule = SD_MOD();
+ controls::MasterPagesSelector::RegisterInterface( pModule );
+ LayoutMenu::RegisterInterface( pModule );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::ArrangeGUIElements()
+{
+ ViewShell::ArrangeGUIElements();
+
+ Initialize();
+
+ mpImpl->GetTaskPane().SetPosSizePixel( Point(), maViewSize );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::GetFocus()
+{
+ Invalidate();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::LoseFocus()
+{
+ Invalidate();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::KeyInput( const KeyEvent& i_rKeyEvent )
+{
+ const KeyCode nCode = i_rKeyEvent.GetKeyCode();
+ if ( nCode == KEY_RETURN )
+ {
+ if ( !mpImpl->GetTaskPane().HasChildPathFocus() )
+ mpImpl->GetTaskPane().GrabFocus();
+ }
+ else
+ ViewShell::KeyInput( i_rKeyEvent, NULL );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+SdPage* ToolPanelViewShell::GetActualPage()
+{
+ return NULL;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+SdPage* ToolPanelViewShell::getCurrentPage() const
+{
+ return NULL;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+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();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+DockingWindow* ToolPanelViewShell::GetDockingWindow()
+{
+ ::Window* pParentWindow = GetParentWindow();
+ DockingWindow* pDockingWindow = NULL;
+ while (pParentWindow!=NULL && pDockingWindow==NULL)
+ {
+ pDockingWindow = dynamic_cast<DockingWindow*>(pParentWindow);
+ pParentWindow = pParentWindow->GetParent();
+ }
+ return pDockingWindow;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+Reference< XAccessible > ToolPanelViewShell::CreateAccessibleDocumentView( ::sd::Window* i_pWindow )
+{
+ ENSURE_OR_RETURN( i_pWindow, "ToolPanelViewShell::CreateAccessibleDocumentView: illegal window!", NULL );
+ return mpImpl->CreateAccessible( *i_pWindow );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+Reference< XDrawSubController > ToolPanelViewShell::CreateSubController()
+{
+ // This view shell is not designed to be the main view shell and thus
+ // does not support a UNO sub controller.
+ return Reference< XDrawSubController >();
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+bool ToolPanelViewShell::RelocateToParentWindow( ::Window* pParentWindow )
+{
+ ::Window* pOldParentWindow = GetParentWindow();
+ FocusManager::Instance().RemoveLinks( pOldParentWindow, &mpImpl->GetTaskPane() );
+ FocusManager::Instance().RemoveLinks( &mpImpl->GetTaskPane(), pOldParentWindow );
+
+ PaneDockingWindow* pDockingWindow = dynamic_cast< PaneDockingWindow* >( GetDockingWindow() );
+ if ( pDockingWindow != NULL )
+ {
+ pDockingWindow->SetEndDockingHdl( Link() );
+ }
+
+ ViewShell::RelocateToParentWindow(pParentWindow);
+
+ mpImpl->ConnectToDockingWindow();
+
+ Resize();
+
+ return true;
+}
+
+//---------------------------------------------------------------------------------------------------------------------
+bool ToolPanelViewShell::IsPanelAnchorWindow( const ::Window& i_rWindow ) const
+{
+ return &mpImpl->GetToolPanelDeck().GetPanelWindowAnchor() == &i_rWindow;
+}
+
+//---------------------------------------------------------------------------------------------------------------------
+namespace
+{
+ typedef std::auto_ptr< ControlFactory > (*ControlFactoryFactory)( ToolPanelViewShell& i_rToolPanelShell );
+
+ struct PanelFactory
+ {
+ ControlFactoryFactory pFactory;
+ ULONG nHelpID;
+ PanelFactory( const ControlFactoryFactory i_pFactory, const ULONG i_nHelpID )
+ :pFactory( i_pFactory )
+ ,nHelpID( i_nHelpID )
+ {
+ }
+ };
+
+ const PanelFactory lcl_describePanel( const PanelId i_ePanelId )
+ {
+ switch ( i_ePanelId )
+ {
+ case PID_MASTER_PAGES:
+ return PanelFactory( &controls::MasterPagesPanel::CreateControlFactory, HID_SD_SLIDE_DESIGNS );
+ case PID_LAYOUT:
+ return PanelFactory( &LayoutMenu::CreateControlFactory, HID_SD_SLIDE_LAYOUTS );
+ case PID_TABLE_DESIGN:
+ return PanelFactory( &controls::TableDesignPanel::CreateControlFactory, HID_SD_TABLE_DESIGN );
+ case PID_CUSTOM_ANIMATION:
+ return PanelFactory( &controls::CustomAnimationPanel::CreateControlFactory, HID_SD_CUSTOM_ANIMATIONS );
+ case PID_SLIDE_TRANSITION:
+ return PanelFactory( &controls::SlideTransitionPanel::CreateControlFactory, HID_SD_SLIDE_TRANSITIONS );
+ default:
+ break;
+ }
+ throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal panel ID" ) ), NULL );
+ }
+}
+
+//---------------------------------------------------------------------------------------------------------------------
+Reference< XUIElement > ToolPanelViewShell::CreatePanelUIElement( const Reference< XFrame >& i_rDocFrame, const ::rtl::OUString& i_rPanelResourceURL )
+{
+ const PanelId ePanelId( GetStandardPanelId( i_rPanelResourceURL ) );
+ ENSURE_OR_RETURN( ePanelId != PID_UNKNOWN, "ToolPanelViewShell::CreatePanelUIElement: illegal panel URL!", NULL );
+
+ // a TreeNode which will resemble the panel
+ const PanelFactory aPanelFactory( lcl_describePanel( ePanelId ) );
+ ::std::auto_ptr< ControlFactory > pControlFactory( (*aPanelFactory.pFactory)( *this ) );
+ ::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 );
+
+ // create an XToolPanel
+ Reference< XToolPanel > xPanel( new ToolPanel( pNode ) );
+
+ // create an XUIElement providing this panel
+ const Reference< XUIElement > xUIElement( new ToolPanelUIElement( i_rDocFrame, i_rPanelResourceURL, xPanel ) );
+
+ return xUIElement;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::ActivatePanel( const ::rtl::OUString& i_rPanelResourceURL )
+{
+ OSL_ENSURE( i_rPanelResourceURL.indexOf( FrameworkHelper::msTaskPanelURLPrefix ) < 0,
+ "ToolPanelViewShell::ActivatePanel: for drawing-framework-controller panels, please use FrameworkHelper::RequestTaskPanel!" );
+ mpImpl->ActivatePanelByResource( i_rPanelResourceURL );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell::DeactivatePanel( const ::rtl::OUString& i_rPanelResourceURL )
+{
+ mpImpl->DeactivatePanelByResource( i_rPanelResourceURL );
+}
+
+// =====================================================================================================================
+// = ToolPanelViewShell_Impl - implementation
+// =====================================================================================================================
+// ---------------------------------------------------------------------------------------------------------------------
+ToolPanelViewShell_Impl::ToolPanelViewShell_Impl( ToolPanelViewShell& i_rPanelViewShell, ::Window& i_rPanelDeckParent )
+ :m_rPanelViewShell( i_rPanelViewShell )
+ ,m_pTaskPane( new ::sfx2::ModuleTaskPane( i_rPanelDeckParent, i_rPanelViewShell.GetViewShellBase().GetViewFrame()->GetFrame().GetFrameInterface(), *this ) )
+ ,m_bInitialized( false )
+{
+ const String sPaneTitle( SdResId( STR_RIGHT_PANE_TITLE ) );
+ GetToolPanelDeck().SetAccessibleName( sPaneTitle );
+ GetToolPanelDeck().SetAccessibleDescription( sPaneTitle );
+
+ GetToolPanelDeck().AddListener( *this );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+ToolPanelViewShell_Impl::~ToolPanelViewShell_Impl()
+{
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::PanelInserted( const ::svt::PToolPanel& i_pPanel, const size_t i_nPosition )
+{
+ // not interested in
+ (void)i_pPanel;
+ (void)i_nPosition;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::PanelRemoved( const size_t i_nPosition )
+{
+ // not interested in
+ (void)i_nPosition;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+::rtl::OUString ToolPanelViewShell_Impl::impl_getPanelURL( const ::boost::optional< size_t >& i_rPanel )
+{
+ ::rtl::OUString sPanelURL;
+ if ( !!i_rPanel )
+ {
+ sPanelURL = GetTaskPane().GetPanelResourceURL( *i_rPanel );
+ const PanelId ePanelId( GetStandardPanelId( sPanelURL, true ) );
+ if ( ePanelId == PID_UNKNOWN )
+ sPanelURL = ::rtl::OUString();
+ }
+ return sPanelURL;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::ActivePanelChanged( const ::boost::optional< size_t >& i_rOldActive, const ::boost::optional< size_t >& i_rNewActive )
+{
+ // update the configuration controller, since this change in the active panel might have been triggered by means other
+ // than the drawing framework, so it does not yet know about it.
+
+ const ::rtl::OUString sOldPanelURL( impl_getPanelURL( i_rOldActive ) );
+ const ::rtl::OUString sNewPanelURL( impl_getPanelURL( i_rNewActive ) );
+
+ const ::boost::shared_ptr< FrameworkHelper > pFrameworkHelper( FrameworkHelper::Instance( GetAntiImpl().GetViewShellBase() ) );
+ if ( sNewPanelURL.getLength() )
+ {
+ // activate the resource belonging to the new panel. This will automatically de-activate the previously active
+ // panel resource (since ResourceActivationMode_REPLACE is used)
+ pFrameworkHelper->RequestTaskPanel( sNewPanelURL );
+ }
+ else if ( sOldPanelURL.getLength() )
+ {
+ // there is no new active panel, or it is not one of our standard panels, i.e. it is not covered by the
+ // resource framework. => Deactivate the old resource.
+ try
+ {
+ Reference< XConfigurationController > xConfigController( pFrameworkHelper->GetConfigurationController(), UNO_QUERY_THROW );
+ xConfigController->requestResourceDeactivation(
+ pFrameworkHelper->CreateResourceId(
+ sOldPanelURL,
+ FrameworkHelper::msTaskPaneURL,
+ FrameworkHelper::msRightPaneURL
+ )
+ );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::LayouterChanged( const ::svt::PDeckLayouter& i_rNewLayouter )
+{
+ // not interested in
+ (void)i_rNewLayouter;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::Dying()
+{
+ // not interested in
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+short ToolPanelViewShell_Impl::compareToolPanelsURLs( const ::rtl::OUString& i_rLHS, const ::rtl::OUString& i_rRHS ) const
+{
+ const PanelId eLHS( GetStandardPanelId( i_rLHS, true ) );
+ const PanelId eRHS( GetStandardPanelId( i_rRHS, true ) );
+ if ( eLHS < eRHS )
+ return -1;
+ if ( eLHS == eRHS )
+ return 0;
+ return 1;
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+void ToolPanelViewShell_Impl::ConnectToDockingWindow()
+{
+ m_pTaskPaneController.reset();
+ DockingWindow* pDockingWindow( GetAntiImpl().GetDockingWindow() );
+ if ( pDockingWindow )
+ {
+ PaneDockingWindow* pPaneDockingWindow = dynamic_cast< PaneDockingWindow* >( pDockingWindow );
+ OSL_ENSURE( pPaneDockingWindow, "ToolPanelViewShell_Impl::ConnectToDockingWindow: unsupported docking window type!" );
+ if ( pPaneDockingWindow != NULL )
+ m_pTaskPaneController.reset( new ::sfx2::TaskPaneController( GetTaskPane(), *pPaneDockingWindow ) );
+ }
+
+ // Tell the focus manager that we want to pass the focus to our
+ // child.
+ FocusManager::Instance().RegisterDownLink( GetAntiImpl().GetParentWindow(), &GetTaskPane() );
+}
+
+// ---------------------------------------------------------------------------------------------------------------------
+Reference< XAccessible > ToolPanelViewShell_Impl::CreateAccessible( ::sd::Window& i_rWindow )
+{
+ Reference< XAccessible > xAccessible( GetToolPanelDeck().GetAccessible( FALSE ) );
+ if ( !xAccessible.is() )
+ {
+ // determine the XAccessible which is the parent of the to-be-created object
+ ::Window* pAccessibleParent = i_rWindow.GetAccessibleParentWindow();
+ OSL_ENSURE( pAccessibleParent, "ToolPanelViewShell_Impl::CreateAccessible: illegal accessible parent provided by the sd::Window!" );
+ GetToolPanelDeck().SetAccessibleParentWindow( pAccessibleParent );
+
+ xAccessible = GetToolPanelDeck().GetAccessible( TRUE );
+ ENSURE_OR_RETURN( xAccessible.is(), "ToolPanelViewShell_Impl::CreateAccessible: illegal ToolPanelDeck accessible!", NULL );
+ OSL_ENSURE( xAccessible->getAccessibleContext().is()
+ && xAccessible->getAccessibleContext()->getAccessibleParent() == pAccessibleParent->GetAccessible(),
+ "ToolPanelViewShell_Impl::CreateAccessible: illegal parenthood!" );
+ }
+ return xAccessible;
+}
+
+} } // end of namespace ::sd::toolpanel
diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
index c4fc41e97744..730fc74795f2 100644..100755
--- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
@@ -24,7 +24,93 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AnimationSchemesPanel.cxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+#include "AnimationSchemesPanel.hxx"
+
+#include "strings.hrc"
+#include "sdresid.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+
+namespace sd
+{
+
+ class ViewShellBase;
+ extern ::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase );
+
+namespace toolpanel { namespace controls {
+
+AnimationSchemesPanel::AnimationSchemesPanel(TreeNode* pParent, ViewShellBase& rBase)
+ : SubToolPanel (pParent),
+ maPreferredSize( 100, 200 )
+{
+ mpWrappedControl = createAnimationSchemesPanel( pParent->GetWindow(), rBase );
+ mpWrappedControl->Show();
+}
+
+AnimationSchemesPanel::~AnimationSchemesPanel()
+{
+ delete mpWrappedControl;
+}
+
+Size AnimationSchemesPanel::GetPreferredSize()
+{
+ return maPreferredSize;
+}
+sal_Int32 AnimationSchemesPanel::GetPreferredWidth(sal_Int32 )
+{
+ return maPreferredSize.Width();
+}
+sal_Int32 AnimationSchemesPanel::GetPreferredHeight(sal_Int32 )
+{
+ return maPreferredSize.Height();
+}
+::Window* AnimationSchemesPanel::GetWindow()
+{
+ return mpWrappedControl;
+}
+bool AnimationSchemesPanel::IsResizable()
+{
+ return true;
+}
+bool AnimationSchemesPanel::IsExpandable() const
+{
+ return true;
+}
+
+
+} } } // end of namespace ::sd::toolpanel::controls
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include "AnimationSchemesPanel.hxx"
diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
index 4cee546dae0d..dd3388fb0342 100644..100755
--- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
@@ -24,6 +24,35 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: AnimationSchemesPanel.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
@@ -66,3 +95,44 @@ private:
} } } // end of namespace ::sd::toolpanel::controls
#endif
+#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
+#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
+
+#include "taskpane/SubToolPanel.hxx"
+
+namespace sd {
+class ViewShellBase;
+}
+
+namespace sd { namespace toolpanel {
+class TreeNode;
+} }
+
+namespace sd { namespace toolpanel { namespace controls {
+
+class AnimationSchemesPanel
+ : public SubToolPanel
+{
+public:
+ AnimationSchemesPanel (
+ TreeNode* pParent,
+ ViewShellBase& rBase);
+ virtual ~AnimationSchemesPanel (void);
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual ::Window* GetWindow (void);
+ virtual bool IsResizable (void);
+ virtual bool IsExpandable (void) const;
+
+ using Window::GetWindow;
+
+private:
+ Size maPreferredSize;
+ ::Window* mpWrappedControl;
+};
+
+} } } // end of namespace ::sd::toolpanel::controls
+
+#endif
diff --git a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx
index 9767efe87c48..e7edf109cffd 100644..100755
--- a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx
@@ -31,6 +31,7 @@
#include "CustomAnimationPanel.hxx"
#include "taskpane/TaskPaneControlFactory.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "strings.hrc"
#include "sdresid.hxx"
@@ -44,10 +45,11 @@ namespace sd
namespace toolpanel { namespace controls {
-CustomAnimationPanel::CustomAnimationPanel(TreeNode* pParent, ViewShellBase& rBase)
- : SubToolPanel (pParent)
+CustomAnimationPanel::CustomAnimationPanel(Window& i_rParentWindow, ToolPanelViewShell& i_rPanelViewShell)
+ :SubToolPanel( i_rParentWindow )
+ ,m_pPanelViewShell( &i_rPanelViewShell )
{
- mpWrappedControl = createCustomAnimationPanel( pParent->GetWindow(), rBase );
+ mpWrappedControl = createCustomAnimationPanel( &i_rParentWindow, i_rPanelViewShell.GetViewShellBase() );
mpWrappedControl->Show();
}
@@ -56,10 +58,17 @@ CustomAnimationPanel::~CustomAnimationPanel()
delete mpWrappedControl;
}
-std::auto_ptr<ControlFactory> CustomAnimationPanel::CreateControlFactory (ViewShellBase& rBase)
+std::auto_ptr< ControlFactory > CustomAnimationPanel::CreateControlFactory( ToolPanelViewShell& i_rToolPanelShell )
{
- return std::auto_ptr<ControlFactory>(
- new ControlFactoryWithArgs1<CustomAnimationPanel,ViewShellBase>(rBase));
+ return std::auto_ptr< ControlFactory >(
+ new RootControlFactoryWithArg< CustomAnimationPanel, ToolPanelViewShell >( i_rToolPanelShell ) );
+}
+
+TaskPaneShellManager* CustomAnimationPanel::GetShellManager()
+{
+ if ( m_pPanelViewShell )
+ return &m_pPanelViewShell->GetSubShellManager();
+ return SubToolPanel::GetShellManager();
}
Size CustomAnimationPanel::GetPreferredSize()
diff --git a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx
index 734965e5264b..864ba637b94d 100644..100755
--- a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx
@@ -37,6 +37,7 @@ class ViewShellBase;
namespace sd { namespace toolpanel {
class TreeNode;
class ControlFactory;
+class ToolPanelViewShell;
} }
namespace sd { namespace toolpanel { namespace controls {
@@ -46,12 +47,16 @@ class CustomAnimationPanel
{
public:
CustomAnimationPanel (
- TreeNode* pParent,
- ViewShellBase& rBase);
+ Window& i_rParentWindow,
+ ToolPanelViewShell& i_rPanelViewShell);
virtual ~CustomAnimationPanel (void);
- static std::auto_ptr<ControlFactory> CreateControlFactory (ViewShellBase& rBase);
+ static std::auto_ptr<ControlFactory> CreateControlFactory (ToolPanelViewShell& i_rPanelViewShell);
+ // TreeNode overridables
+ virtual TaskPaneShellManager* GetShellManager();
+
+ // ILayoutableWindow overridables
virtual Size GetPreferredSize (void);
virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
@@ -68,6 +73,7 @@ public:
private:
Size maPreferredSize;
::Window* mpWrappedControl;
+ ToolPanelViewShell* m_pPanelViewShell;
};
} } } // end of namespace ::sd::toolpanel::controls
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index 2e121098194a..b9040e72283f 100644..100755
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -44,6 +44,8 @@
#include <com/sun/star/container/XIndexAccess.hpp>
#include "stlpool.hxx"
#include <svx/xfillit0.hxx>
+#include <tools/diagnose_ex.h>
+
using namespace ::com::sun::star;
namespace sd { namespace toolpanel { namespace controls {
@@ -245,9 +247,7 @@ SdPage* DocumentHelper::AddMasterPage (
catch (uno::Exception& rException)
{
pClonedMasterPage = NULL;
- OSL_TRACE("caught exception while adding master page: %s",
- ::rtl::OUStringToOString(rException.Message,
- RTL_TEXTENCODING_UTF8).getStr());
+ DBG_UNHANDLED_EXCEPTION();
}
catch (::std::exception rException)
{
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
index 444ecd6dacb4..80a094ec1a66 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
@@ -73,24 +73,6 @@ namespace {
typedef ::std::vector<SharedMasterPageDescriptor> MasterPageContainerType;
-
-class PreviewCreationRequest
-{
-public:
- PreviewCreationRequest (MasterPageContainer::Token aToken, int nPriority);
- MasterPageContainer::Token maToken;
- int mnPriority;
- class Compare {public:
- bool operator() (const PreviewCreationRequest& r1,const PreviewCreationRequest& r2);
- };
- class CompareToken {public:
- MasterPageContainer::Token maToken;
- CompareToken(MasterPageContainer::Token aToken);
- bool operator() (const PreviewCreationRequest& rRequest);
- };
-};
-
-
} // end of anonymous namespace
@@ -423,28 +405,6 @@ MasterPageContainer::Token MasterPageContainer::GetTokenForURL (
-MasterPageContainer::Token MasterPageContainer::GetTokenForPageName (
- const String& sPageName)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- Token aResult (NIL_TOKEN);
- if (sPageName.Len() > 0)
- {
- MasterPageContainerType::iterator iEntry (
- ::std::find_if (
- mpImpl->maContainer.begin(),
- mpImpl->maContainer.end(),
- MasterPageDescriptor::PageNameComparator(sPageName)));
- if (iEntry != mpImpl->maContainer.end())
- aResult = (*iEntry)->maToken;
- }
- return aResult;
-}
-
-
-
-
MasterPageContainer::Token MasterPageContainer::GetTokenForStyleName (const String& sStyleName)
{
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
@@ -589,46 +549,6 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken)
-void MasterPageContainer::SetPreviewProviderForToken (
- Token aToken,
- const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get()!=NULL)
- {
- pDescriptor->mpPreviewProvider = rpPreviewProvider;
- mpImpl->InvalidatePreview(aToken);
- }
-}
-
-
-
-
-SdPage* MasterPageContainer::GetSlideForToken (
- MasterPageContainer::Token aToken,
- bool bLoad)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- SdPage* pSlide = NULL;
- SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != NULL)
- {
- pSlide = pDescriptor->mpSlide;
- if (pSlide==NULL && bLoad)
- {
- GetPageObjectForToken(aToken, bLoad);
- pSlide = pDescriptor->mpSlide;
- }
- }
- return pSlide;
-}
-
-
-
-
SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken (
MasterPageContainer::Token aToken)
{
@@ -639,19 +559,6 @@ SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken (
-
-bool MasterPageContainer::UpdateDescriptor (
- const SharedMasterPageDescriptor& rpDescriptor,
- bool bForcePageObject,
- bool bForcePreview,
- bool bSendEvents)
-{
- return mpImpl->UpdateDescriptor(rpDescriptor, bForcePageObject, bForcePreview, bSendEvents);
-}
-
-
-
-
void MasterPageContainer::InvalidatePreview (MasterPageContainer::Token aToken)
{
mpImpl->InvalidatePreview(aToken);
@@ -1311,58 +1218,3 @@ void MasterPageContainer::Implementation::FillingDone (void)
} } } // end of namespace ::sd::toolpanel::controls
-
-
-
-
-namespace {
-
-//===== PreviewCreationRequest ================================================
-
-PreviewCreationRequest::PreviewCreationRequest (
- MasterPageContainer::Token aToken,
- int nPriority)
- : maToken(aToken),
- mnPriority(nPriority)
-{
-}
-
-
-
-
-bool PreviewCreationRequest::Compare::operator() (
- const PreviewCreationRequest& aRequest1,
- const PreviewCreationRequest& aRequest2)
-{
- if (aRequest1.mnPriority != aRequest2.mnPriority)
- {
- // Prefer requests with higher priority.
- return aRequest1.mnPriority > aRequest2.mnPriority;
- }
- else
- {
- // Prefer tokens that have been earlier created (those with lower
- // value).
- return aRequest1.maToken < aRequest2.maToken;
- }
-}
-
-
-
-
-PreviewCreationRequest::CompareToken::CompareToken (MasterPageContainer::Token aToken)
- : maToken(aToken)
-{
-}
-
-
-
-
-bool PreviewCreationRequest::CompareToken::operator() (const PreviewCreationRequest& aRequest)
-{
- return maToken==aRequest.maToken;
-}
-
-
-
-} // end of anonymous namespace
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
index d922c089ffb4..60f760f63e34 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
@@ -143,26 +143,16 @@ public:
Token GetTokenForIndex (int nIndex);
Token GetTokenForURL (const String& sURL);
- Token GetTokenForPageName (const String& sPageName);
Token GetTokenForStyleName (const String& sStyleName);
Token GetTokenForPageObject (const SdPage* pPage);
String GetURLForToken (Token aToken);
String GetPageNameForToken (Token aToken);
String GetStyleNameForToken (Token aToken);
- SdPage* GetSlideForToken (Token aToken, bool bLoad=true);
SdPage* GetPageObjectForToken (Token aToken, bool bLoad=true);
Origin GetOriginForToken (Token aToken);
sal_Int32 GetTemplateIndexForToken (Token aToken);
::boost::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken);
- bool UpdateDescriptor (
- const ::boost::shared_ptr<MasterPageDescriptor>& rpDescriptor,
- bool bForcePageObject,
- bool bForcePreview,
- bool bSendEvents);
-
- void SetPreviewProviderForToken (Token aToken,
- const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider);
void InvalidatePreview (Token aToken);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
index 6b9ff09bbed3..61483f278a4f 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
@@ -40,6 +40,7 @@
#include <vcl/image.hxx>
#include <vcl/pngread.hxx>
#include <com/sun/star/embed/ElementModes.hpp>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -291,7 +292,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
}
catch (uno::RuntimeException)
{
- OSL_TRACE ("caught exception while loading page from template file");
+ DBG_UNHANDLED_EXCEPTION();
pPage = NULL;
}
@@ -386,46 +387,6 @@ bool DefaultPageObjectProvider::operator== (const PageObjectProvider& rProvider)
-//===== DefaultPagePreviewProvider ============================================
-
-DefaultPagePreviewProvider::DefaultPagePreviewProvider (void)
-{
-}
-
-
-
-Image DefaultPagePreviewProvider::operator() (
- int nWidth,
- SdPage* pPage,
- ::sd::PreviewRenderer& rRenderer)
-{
- // Unused parameters.
- (void)nWidth;
- (void)pPage;
- (void)rRenderer;
-
- return Image();
-}
-
-
-
-
-int DefaultPagePreviewProvider::GetCostIndex (void)
-{
- return 0;
-}
-
-
-
-
-bool DefaultPagePreviewProvider::NeedsPageObject (void)
-{
- return false;
-}
-
-
-
-
//===== ExistingPageProvider ==================================================
ExistingPageProvider::ExistingPageProvider (SdPage* pPage)
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
index 7cde148b3e3d..071b23cdbb16 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
@@ -170,21 +170,6 @@ public:
-
-/** Used temporarily to avoid the (expensive) creation of the default page
- too early.
-*/
-class DefaultPagePreviewProvider : public PreviewProvider
-{
-public:
- DefaultPagePreviewProvider (void);
- virtual Image operator() (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer);
- virtual int GetCostIndex (void);
- virtual bool NeedsPageObject (void);
-};
-
-
-
/** This implementation of the PageObjectProvider simply returns an already
existing master page object.
*/
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
index 49ae6dff264d..6871883d65f5 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
@@ -337,28 +337,6 @@ bool MasterPageDescriptor::URLComparator::operator() (
-//===== PageNameComparator ====================================================
-
-MasterPageDescriptor::PageNameComparator::PageNameComparator (const ::rtl::OUString& sPageName)
- : msPageName(sPageName)
-{
-}
-
-
-
-
-bool MasterPageDescriptor::PageNameComparator::operator() (
- const SharedMasterPageDescriptor& rDescriptor)
-{
- if (rDescriptor.get() == NULL)
- return false;
- else
- return rDescriptor->msPageName.equals(msPageName);
-}
-
-
-
-
// ===== StyleNameComparator ==================================================
MasterPageDescriptor::StyleNameComparator::StyleNameComparator (const ::rtl::OUString& sStyleName)
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
index 1eea46bd1802..0303989e3379 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
@@ -214,11 +214,6 @@ public:
URLComparator (const ::rtl::OUString& sURL);
bool operator() (const SharedMasterPageDescriptor& rDescriptor);
};
- class PageNameComparator { public:
- ::rtl::OUString msPageName;
- PageNameComparator (const ::rtl::OUString& sPageName);
- bool operator() (const SharedMasterPageDescriptor& rDescriptor);
- };
class StyleNameComparator { public:
::rtl::OUString msStyleName;
StyleNameComparator (const ::rtl::OUString& sStyleName);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
index 0f485174009d..2ba0cc678403 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
@@ -187,15 +187,6 @@ MasterPageObserver::~MasterPageObserver (void)
-MasterPageObserver::MasterPageNameSet MasterPageObserver::GetMasterPageNames (
- SdDrawDocument& rDocument)
-{
- return mpImpl->GetMasterPageNames (rDocument);
-}
-
-
-
-
//===== MasterPageObserver::Implementation ====================================
void MasterPageObserver::Implementation::RegisterDocument (
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx b/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx
index b897e1514862..8dab51e93a58 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx
@@ -33,6 +33,7 @@
#include "CurrentMasterPagesSelector.hxx"
#include "RecentMasterPagesSelector.hxx"
#include "AllMasterPagesSelector.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "taskpane/TaskPaneControlFactory.hxx"
#include "taskpane/TitledControl.hxx"
#include "../TaskPaneShellManager.hxx"
@@ -48,8 +49,14 @@
namespace sd { namespace toolpanel { namespace controls {
-MasterPagesPanel::MasterPagesPanel (TreeNode* pParent, ViewShellBase& rBase)
- : ScrollPanel (pParent)
+MasterPagesPanel::MasterPagesPanel (::Window& i_rParentWindow, ToolPanelViewShell& i_rPanelViewShell)
+ :ScrollPanel (i_rParentWindow)
+ ,m_pPanelViewShell( &i_rPanelViewShell )
+{
+ impl_construct( m_pPanelViewShell->GetViewShellBase() );
+}
+
+void MasterPagesPanel::impl_construct( ViewShellBase& rBase )
{
SdDrawDocument* pDocument = rBase.GetDocument();
::std::auto_ptr<controls::MasterPagesSelector> pSelector;
@@ -118,18 +125,33 @@ MasterPagesPanel::MasterPagesPanel (TreeNode* pParent, ViewShellBase& rBase)
MasterPagesPanel::~MasterPagesPanel (void)
{
+ TaskPaneShellManager* pShellManager( GetShellManager() );
+ 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 );
+ }
}
-std::auto_ptr<ControlFactory> MasterPagesPanel::CreateControlFactory (ViewShellBase& rBase)
+TaskPaneShellManager* MasterPagesPanel::GetShellManager()
{
- return std::auto_ptr<ControlFactory>(
- new ControlFactoryWithArgs1<MasterPagesPanel,ViewShellBase>(rBase));
+ if ( m_pPanelViewShell )
+ return &m_pPanelViewShell->GetSubShellManager();
+ return TreeNode::GetShellManager();
}
+std::auto_ptr< ControlFactory > MasterPagesPanel::CreateControlFactory( ToolPanelViewShell& i_rToolPanelShell )
+{
+ return std::auto_ptr< ControlFactory >(
+ new RootControlFactoryWithArg< MasterPagesPanel, ToolPanelViewShell >( i_rToolPanelShell ) );
+}
+
} } } // end of namespace ::sd::toolpanel::controls
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx b/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx
index 1c6d75ea8dcb..932007802ebf 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx
@@ -37,6 +37,7 @@ class ViewShellBase;
namespace sd { namespace toolpanel {
class ControlFactory;
class TreeNode;
+class ToolPanelViewShell;
} }
namespace sd { namespace toolpanel { namespace controls {
@@ -50,11 +51,20 @@ class MasterPagesPanel
{
public:
MasterPagesPanel (
- TreeNode* pParent,
- ViewShellBase& rBase);
+ ::Window& i_rParentWindow,
+ ToolPanelViewShell& i_rPanelViewShell);
virtual ~MasterPagesPanel (void);
- static std::auto_ptr<ControlFactory> CreateControlFactory (ViewShellBase& rBase);
+ // TreeNode overridables
+ virtual TaskPaneShellManager* GetShellManager (void);
+
+ static std::auto_ptr<ControlFactory> CreateControlFactory (ToolPanelViewShell& i_rToolPanelShell);
+
+private:
+ void impl_construct( ViewShellBase& rBase );
+
+private:
+ ToolPanelViewShell* m_pPanelViewShell;
};
} } } // end of namespace ::sd::toolpanel::controls
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
index 4571d4278140..b321dbf8dd14 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
@@ -41,7 +41,6 @@
#include "app.hrc"
#include "res_bmp.hrc"
#include "strings.hrc"
-#include "showview.hxx"
#include "DrawViewShell.hxx"
#include "DrawController.hxx"
#include "SlideSorterViewShell.hxx"
@@ -699,21 +698,6 @@ void MasterPagesSelector::RemoveTokenToIndexEntry (
-void MasterPagesSelector::InvalidatePreview (MasterPageContainer::Token aToken)
-{
- const ::osl::MutexGuard aGuard (maMutex);
-
- int nIndex (GetIndexForToken(aToken));
- if (nIndex > 0)
- {
- mpContainer->InvalidatePreview(aToken);
- mpContainer->RequestPreview(aToken);
- }
-}
-
-
-
-
void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
{
const ::osl::MutexGuard aGuard (maMutex);
@@ -734,20 +718,6 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
}
}
-
-
-
-void MasterPagesSelector::InvalidateAllPreviews (void)
-{
- const ::osl::MutexGuard aGuard (maMutex);
-
- for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
- InvalidatePreview(nIndex);
-}
-
-
-
-
void MasterPagesSelector::UpdateAllPreviews (void)
{
const ::osl::MutexGuard aGuard (maMutex);
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
index a480729aa9c8..a2df51f2bd4b 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
@@ -131,14 +131,8 @@ public:
Index into the value set control that is used for displaying the
previews.
*/
- void InvalidatePreview (MasterPageContainer::Token aToken);
void InvalidatePreview (const SdPage* pPage);
- /** Mark all previews as no being up-to-date anymore. This method is
- typically called when the size of the previews has changed.
- */
- void InvalidateAllPreviews (void);
-
void UpdateAllPreviews (void);
protected:
diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx
index 2cb0f58a029b..4ad67b876983 100644..100755
--- a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx
@@ -30,6 +30,7 @@
#include "SlideTransitionPanel.hxx"
#include "taskpane/TaskPaneControlFactory.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "strings.hrc"
#include "sdresid.hxx"
@@ -45,11 +46,12 @@ namespace toolpanel { namespace controls {
-SlideTransitionPanel::SlideTransitionPanel(TreeNode* pParent, ViewShellBase& rBase)
- : SubToolPanel (pParent),
- maPreferredSize( 100, 200 )
+SlideTransitionPanel::SlideTransitionPanel(Window& i_rParentWindow, ToolPanelViewShell& i_rToolPanelShell)
+ :SubToolPanel( i_rParentWindow )
+ ,maPreferredSize( 100, 200 )
+ ,m_pPanelViewShell( &i_rToolPanelShell )
{
- mpWrappedControl = createSlideTransitionPanel( pParent->GetWindow(), rBase );
+ mpWrappedControl = createSlideTransitionPanel( &i_rParentWindow, i_rToolPanelShell.GetViewShellBase() );
mpWrappedControl->Show();
}
@@ -58,10 +60,17 @@ SlideTransitionPanel::~SlideTransitionPanel()
delete mpWrappedControl;
}
-std::auto_ptr<ControlFactory> SlideTransitionPanel::CreateControlFactory (ViewShellBase& rBase)
+std::auto_ptr< ControlFactory > SlideTransitionPanel::CreateControlFactory( ToolPanelViewShell& i_rToolPanelShell )
{
- return std::auto_ptr<ControlFactory>(
- new ControlFactoryWithArgs1<SlideTransitionPanel,ViewShellBase>(rBase));
+ return std::auto_ptr< ControlFactory >(
+ new RootControlFactoryWithArg< SlideTransitionPanel, ToolPanelViewShell >( i_rToolPanelShell ) );
+}
+
+TaskPaneShellManager* SlideTransitionPanel::GetShellManager()
+{
+ if ( m_pPanelViewShell )
+ return &m_pPanelViewShell->GetSubShellManager();
+ return SubToolPanel::GetShellManager();
}
Size SlideTransitionPanel::GetPreferredSize()
diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx
index 478f69091f63..f62cb918806b 100644..100755
--- a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx
@@ -36,6 +36,7 @@ class ViewShellBase;
namespace sd { namespace toolpanel {
class ControlFactory;
class TreeNode;
+class ToolPanelViewShell;
} }
namespace sd { namespace toolpanel { namespace controls {
@@ -45,12 +46,16 @@ class SlideTransitionPanel
{
public:
SlideTransitionPanel (
- TreeNode* pParent,
- ViewShellBase& rBase);
+ Window& i_rParentWindow,
+ ToolPanelViewShell& i_rToolPanelShell);
virtual ~SlideTransitionPanel (void);
- static std::auto_ptr<ControlFactory> CreateControlFactory (ViewShellBase& rBase);
+ static std::auto_ptr<ControlFactory> CreateControlFactory (ToolPanelViewShell& i_rToolPanelShell);
+ // TreeNode overridables
+ virtual TaskPaneShellManager* GetShellManager();
+
+ // ILayoutableWindow overridables
virtual Size GetPreferredSize (void);
virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
@@ -68,6 +73,7 @@ public:
private:
Size maPreferredSize;
::Window* mpWrappedControl;
+ ToolPanelViewShell* m_pPanelViewShell;
};
} } } // end of namespace ::sd::toolpanel::controls
diff --git a/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx b/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx
index ce242d557ee7..d6507a25c11f 100644..100755
--- a/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx
@@ -31,6 +31,7 @@
#include "TableDesignPanel.hxx"
#include "taskpane/TaskPaneControlFactory.hxx"
+#include "taskpane/ToolPanelViewShell.hxx"
#include "strings.hrc"
#include "sdresid.hxx"
@@ -44,10 +45,11 @@ namespace sd
namespace toolpanel { namespace controls {
-TableDesignPanel::TableDesignPanel(TreeNode* pParent, ViewShellBase& rBase)
- : SubToolPanel (pParent)
+TableDesignPanel::TableDesignPanel( ::Window& i_rParentWindow, ToolPanelViewShell& i_rPanelViewShell )
+ :SubToolPanel( i_rParentWindow )
+ ,m_pPanelViewShell( &i_rPanelViewShell )
{
- mpWrappedControl = createTableDesignPanel( pParent->GetWindow(), rBase );
+ mpWrappedControl = createTableDesignPanel( &i_rParentWindow, i_rPanelViewShell.GetViewShellBase() );
mpWrappedControl->Show();
}
@@ -56,10 +58,17 @@ TableDesignPanel::~TableDesignPanel()
delete mpWrappedControl;
}
-std::auto_ptr<ControlFactory> TableDesignPanel::CreateControlFactory (ViewShellBase& rBase)
+std::auto_ptr< ControlFactory > TableDesignPanel::CreateControlFactory( ToolPanelViewShell& i_rToolPanelShell )
{
- return std::auto_ptr<ControlFactory>(
- new ControlFactoryWithArgs1<TableDesignPanel,ViewShellBase>(rBase));
+ return std::auto_ptr< ControlFactory >(
+ new RootControlFactoryWithArg< TableDesignPanel, ToolPanelViewShell >( i_rToolPanelShell ) );
+}
+
+TaskPaneShellManager* TableDesignPanel::GetShellManager()
+{
+ if ( m_pPanelViewShell )
+ return &m_pPanelViewShell->GetSubShellManager();
+ return SubToolPanel::GetShellManager();
}
Size TableDesignPanel::GetPreferredSize()
diff --git a/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx b/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx
index aae06e37ad14..a3620df2ef68 100644..100755
--- a/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx
@@ -37,6 +37,7 @@ class ViewShellBase;
namespace sd { namespace toolpanel {
class TreeNode;
class ControlFactory;
+class ToolPanelViewShell;
} }
namespace sd { namespace toolpanel { namespace controls {
@@ -46,12 +47,16 @@ class TableDesignPanel
{
public:
TableDesignPanel (
- TreeNode* pParent,
- ViewShellBase& rBase);
+ ::Window& i_rParentWindow,
+ ToolPanelViewShell& i_rPanelViewShell);
virtual ~TableDesignPanel (void);
- static std::auto_ptr<ControlFactory> CreateControlFactory (ViewShellBase& rBase);
+ static std::auto_ptr<ControlFactory> CreateControlFactory (ToolPanelViewShell& i_rToolPanelShell);
+ // TreeNode overridables
+ virtual TaskPaneShellManager* GetShellManager();
+
+ // ILayoutableWindow overridables
virtual Size GetPreferredSize (void);
virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
@@ -68,6 +73,7 @@ public:
private:
Size maPreferredSize;
::Window* mpWrappedControl;
+ ToolPanelViewShell* m_pPanelViewShell;
};
} } } // end of namespace ::sd::toolpanel::controls
diff --git a/sd/source/ui/toolpanel/controls/makefile.mk b/sd/source/ui/toolpanel/controls/makefile.mk
index 33871a415a7e..b2218e55008c 100644..100755
--- a/sd/source/ui/toolpanel/controls/makefile.mk
+++ b/sd/source/ui/toolpanel/controls/makefile.mk
@@ -59,8 +59,7 @@ SLOFILES = \
$(SLO)$/RecentMasterPagesSelector.obj \
$(SLO)$/CustomAnimationPanel.obj \
$(SLO)$/SlideTransitionPanel.obj \
- $(SLO)$/TableDesignPanel.obj \
- $(SLO)$/AnimationSchemesPanel.obj
+ $(SLO)$/TableDesignPanel.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/toolpanel/makefile.mk b/sd/source/ui/toolpanel/makefile.mk
index 08a966fe4061..262b32535ef3 100644..100755
--- a/sd/source/ui/toolpanel/makefile.mk
+++ b/sd/source/ui/toolpanel/makefile.mk
@@ -45,19 +45,18 @@ PRJINC=..$/slidesorter
SLOFILES = \
$(SLO)$/ControlContainer.obj \
$(SLO)$/ScrollPanel.obj \
- $(SLO)$/SimpleLayoutWrapper.obj \
$(SLO)$/SubToolPanel.obj \
$(SLO)$/TitleBar.obj \
- $(SLO)$/TitleToolBox.obj \
$(SLO)$/TitledControl.obj \
- $(SLO)$/ToolPanel.obj \
$(SLO)$/TaskPaneControlFactory.obj \
$(SLO)$/TaskPaneFocusManager.obj \
$(SLO)$/TaskPaneShellManager.obj \
$(SLO)$/TaskPaneTreeNode.obj \
- $(SLO)$/TaskPaneViewShell.obj \
+ $(SLO)$/ToolPanel.obj \
+ $(SLO)$/ToolPanelViewShell.obj \
+ $(SLO)$/ToolPanelFactory.obj \
+ $(SLO)$/ToolPanelUIElement.obj \
\
- $(SLO)$/EmptyWindow.obj \
$(SLO)$/LayoutMenu.obj \
$(SLO)$/TestMenu.obj \
$(SLO)$/TestPanel.obj \
diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx
index 94ada78461ec..bf4fbc6e6ebe 100644..100755
--- a/sd/source/ui/tools/ConfigurationAccess.cxx
+++ b/sd/source/ui/tools/ConfigurationAccess.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -113,11 +114,9 @@ void ConfigurationAccess::Initialize (
sAccessService,
aCreationArguments);
}
- catch (Exception& rException)
+ catch (Exception&)
{
- OSL_TRACE ("caught exception while opening configuration: %s",
- ::rtl::OUStringToOString(rException.Message,
- RTL_TEXTENCODING_UTF8).getStr());
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index b791454bd10a..c416e689efcf 100644..100755
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -42,6 +42,7 @@
#include <editeng/editstat.hxx>
#include <tools/link.hxx>
#include <vcl/svapp.hxx>
+#include <tools/diagnose_ex.h>
namespace sd {
@@ -131,7 +132,7 @@ Image PreviewRenderer::RenderPage (
}
catch (const com::sun::star::uno::Exception&)
{
- OSL_TRACE("PreviewRenderer::RenderPage: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -193,7 +194,7 @@ Image PreviewRenderer::RenderSubstitution (
}
catch (const com::sun::star::uno::Exception&)
{
- OSL_TRACE("PreviewRenderer::RenderPage: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
return aPreview;
@@ -302,7 +303,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage)
}
catch (const ::com::sun::star::uno::Exception&)
{
- OSL_TRACE("PreviewRenderer::PaintPage: caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
// Restore the previous online spelling and redlining states.
diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx
index 010571b10927..9cf24dccd508 100644..100755
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -58,22 +58,6 @@ void SAL_CALL PropertySet::disposing (void)
{
}
-
-
-
-beans::UnknownPropertyException PropertySet::CreateUnknownPropertyException (
- const rtl::OUString& rsPropertyName)
-{
- return beans::UnknownPropertyException(
- OUString::createFromAscii("property ")
- + rsPropertyName
- + OUString::createFromAscii(" is not known"),
- static_cast<XWeak*>(this));
-}
-
-
-
-
//----- XPropertySet ----------------------------------------------------------
Reference<beans::XPropertySetInfo> SAL_CALL PropertySet::getPropertySetInfo (void)
diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
index 878ef16a52f4..4ed95bbf5b99 100644..100755
--- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx
+++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
@@ -152,31 +152,6 @@ void SdGlobalResourceContainer::AddResource (const Reference<XInterface>& rxReso
-
-::std::auto_ptr<SdGlobalResource> SdGlobalResourceContainer::ReleaseResource (
- SdGlobalResource* pResource)
-{
- ::std::auto_ptr<SdGlobalResource> pResult (NULL);
-
- ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- Implementation::ResourceList::iterator iResource;
- iResource = ::std::find (
- mpImpl->maResources.begin(),
- mpImpl->maResources.end(),
- pResource);
- if (iResource != mpImpl->maResources.end())
- {
- pResult.reset (*iResource);
- mpImpl->maResources.erase(iResource);
- }
-
- return pResult;
-}
-
-
-
-
SdGlobalResourceContainer::SdGlobalResourceContainer (void)
: mpImpl (new SdGlobalResourceContainer::Implementation())
{
diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx
index e8e2ffb24f2b..b3175b7fdb4a 100644..100755
--- a/sd/source/ui/tools/SlotStateListener.cxx
+++ b/sd/source/ui/tools/SlotStateListener.cxx
@@ -45,16 +45,6 @@ using namespace ::rtl;
namespace sd { namespace tools {
-SlotStateListener::SlotStateListener (void)
- : SlotStateListenerInterfaceBase(maMutex),
- maCallback(),
- mxDispatchProviderWeak(NULL)
-{
-}
-
-
-
-
SlotStateListener::SlotStateListener (
Link& rCallback,
const uno::Reference<frame::XDispatchProvider>& rxDispatchProvider,
@@ -125,14 +115,6 @@ void SlotStateListener::ObserveSlot (const ::rtl::OUString& rSlotName)
-bool SlotStateListener::IsValid (void) const
-{
- return maRegisteredURLList.size() > 0;
-}
-
-
-
-
void SlotStateListener::disposing (void)
{
ReleaseListeners();
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index acd57f18d85c..2bc98cd66de3 100644..100755
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -29,6 +29,7 @@
#include "precompiled_sd.hxx"
#include "DrawController.hxx"
+#include "DrawDocShell.hxx"
#include "DrawSubController.hxx"
#include "sdpage.hxx"
@@ -54,6 +55,7 @@
#include <svx/fmshell.hxx>
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
+#include <boost/shared_ptr.hpp>
using namespace ::std;
using ::rtl::OUString;
@@ -164,6 +166,16 @@ void SAL_CALL DrawController::dispose (void)
{
mbDisposing = true;
+ boost::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell();
+ if ( pViewShell )
+ {
+ pViewShell->DeactivateCurrentFunction();
+ DrawDocShell* pDocShell = pViewShell->GetDocSh();
+ if ( pDocShell != NULL )
+ pDocShell->SetDocShellFunction(0);
+ }
+ pViewShell.reset();
+
// When the controller has not been detached from its view
// shell, i.e. mpViewShell is not NULL, then tell PaneManager
// and ViewShellManager to clear the shell stack.
@@ -368,18 +380,6 @@ void SAL_CALL
-::awt::Rectangle DrawController::GetVisArea (void) const
-{
- return awt::Rectangle(
- maLastVisArea.Left(),
- maLastVisArea.Top(),
- maLastVisArea.GetWidth(),
- maLastVisArea.GetHeight());
-}
-
-
-
-
// XDrawView
void SAL_CALL DrawController::setCurrentPage( const Reference< drawing::XDrawPage >& xPage )
@@ -699,6 +699,11 @@ void DrawController::FillPropertyTable (
PROPERTY_VIEWOFFSET,
::getCppuType((const ::com::sun::star::awt::Point*)0),
beans::PropertyAttribute::BOUND ));
+ rProperties.push_back(
+ beans::Property( OUString( RTL_CONSTASCII_USTRINGPARAM("DrawViewMode") ),
+ PROPERTY_DRAWVIEWMODE,
+ ::getCppuType((const ::com::sun::star::awt::Point*)0),
+ beans::PropertyAttribute::BOUND|beans::PropertyAttribute::READONLY|beans::PropertyAttribute::MAYBEVOID ));
}
@@ -928,3 +933,4 @@ void DrawController::ThrowIfDisposed (void) const
} // end of namespace sd
+
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 5a497231158d..8594d4e0ebf9 100644..100755
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -38,21 +38,27 @@
#include "unomodel.hxx"
#include "unopage.hxx"
#include "Window.hxx"
+#include "pres.hxx"
#include <cppuhelper/proptypehlp.hxx>
+#include <comphelper/serviceinfohelper.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/viewfrm.hxx>
#include <svx/svdpagv.hxx>
#include <svx/unoshape.hxx>
#include <svx/unoshcol.hxx>
#include <svx/zoomitem.hxx>
+#include <com/sun/star/drawing/DrawViewMode.hpp>
#include <com/sun/star/drawing/XLayerManager.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
#include <vector>
+using rtl::OUString;
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
namespace sd {
@@ -416,7 +422,6 @@ void SdUnoDrawView::setFastPropertyValue (
SetViewOffset( aOffset );
}
break;
-
default:
throw beans::UnknownPropertyException();
}
@@ -460,6 +465,10 @@ Any SAL_CALL SdUnoDrawView::getFastPropertyValue (
aValue <<= GetViewOffset();
break;
+ case DrawController::PROPERTY_DRAWVIEWMODE:
+ aValue = getDrawViewMode();
+ break;
+
default:
throw beans::UnknownPropertyException();
}
@@ -601,5 +610,35 @@ SdXImpressDocument* SdUnoDrawView::GetModel (void) const throw()
return NULL;
}
+Any SdUnoDrawView::getDrawViewMode() const
+{
+ Any aRet;
+ switch( mrDrawViewShell.GetPageKind() )
+ {
+ case PK_NOTES: aRet <<= DrawViewMode_NOTES; break;
+ case PK_HANDOUT: aRet <<= DrawViewMode_HANDOUT; break;
+ case PK_STANDARD: aRet <<= DrawViewMode_DRAW; break;
+ }
+ return aRet;
+}
+
+// XServiceInfo
+OUString SAL_CALL SdUnoDrawView::getImplementationName( ) throw (RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoDrawView") );
+}
+
+sal_Bool SAL_CALL SdUnoDrawView::supportsService( const OUString& ServiceName ) throw (RuntimeException)
+{
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+Sequence< OUString > SAL_CALL SdUnoDrawView::getSupportedServiceNames( ) throw (RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocumentDrawView") );
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
} // end of namespace sd
+
diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
index 5804765d633c..ff3e5dd501fb 100644..100755
--- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx
+++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
@@ -28,6 +28,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+#include <comphelper/serviceinfohelper.hxx>
+
#include "SdUnoOutlineView.hxx"
#include "DrawController.hxx"
@@ -237,6 +239,8 @@ Any SAL_CALL SdUnoOutlineView::getFastPropertyValue (
aValue <<= pPage->getUnoPage();
}
break;
+ case DrawController::PROPERTY_VIEWOFFSET:
+ break;
default:
throw beans::UnknownPropertyException();
@@ -246,6 +250,22 @@ Any SAL_CALL SdUnoOutlineView::getFastPropertyValue (
}
+// XServiceInfo
+OUString SAL_CALL SdUnoOutlineView::getImplementationName( ) throw (RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoOutlineView") );
+}
+sal_Bool SAL_CALL SdUnoOutlineView::supportsService( const OUString& ServiceName ) throw (RuntimeException)
+{
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+
+Sequence< OUString > SAL_CALL SdUnoOutlineView::getSupportedServiceNames( ) throw (RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.OutlineView") );
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
} // end of namespace sd
diff --git a/sd/source/ui/unoidl/SdUnoPresView.cxx b/sd/source/ui/unoidl/SdUnoPresView.cxx
deleted file mode 100644
index dcd5001ace38..000000000000
--- a/sd/source/ui/unoidl/SdUnoPresView.cxx
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "SdUnoPresView.hxx"
-
-
-namespace sd {
-
-
-SdUnoPresView::SdUnoPresView (
- DrawController& rController,
- DrawViewShell& rViewShell,
- View& rView) throw()
- : SdUnoDrawView (rController, rViewShell, rView)
-{
-}
-
-
-
-
-SdUnoPresView::~SdUnoPresView (void) throw()
-{
-}
-
-
-
-} // end of namespace sd
diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx
index 34121dc5ac4b..a6502711ee72 100644..100755
--- a/sd/source/ui/unoidl/SdUnoSlideView.cxx
+++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx
@@ -27,6 +27,9 @@
#include "precompiled_sd.hxx"
+#include <comphelper/serviceinfohelper.hxx>
+
+#include "DrawController.hxx"
#include "SdUnoSlideView.hxx"
#include "SlideSorter.hxx"
@@ -39,6 +42,8 @@
#include "sdpage.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
+using ::rtl::OUString;
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -202,10 +207,30 @@ Any SAL_CALL SdUnoSlideView::getFastPropertyValue (
{
(void)nHandle;
- throw beans::UnknownPropertyException();
+ if( nHandle != DrawController::PROPERTY_VIEWOFFSET )
+ throw beans::UnknownPropertyException();
+
+ return Any();
+}
+
+
+// XServiceInfo
+OUString SAL_CALL SdUnoSlideView::getImplementationName( ) throw (RuntimeException)
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sd.SdUnoSlideView") );
}
+sal_Bool SAL_CALL SdUnoSlideView::supportsService( const OUString& ServiceName ) throw (RuntimeException)
+{
+ return comphelper::ServiceInfoHelper::supportsService( ServiceName, getSupportedServiceNames() );
+}
+Sequence< OUString > SAL_CALL SdUnoSlideView::getSupportedServiceNames( ) throw (RuntimeException)
+{
+ OUString aSN( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SlidesView") );
+ uno::Sequence< OUString > aSeq( &aSN, 1 );
+ return aSeq;
+}
/*
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index b8dcba6beecd..1ac245ad00d4 100644..100755
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -72,6 +72,14 @@ namespace sd
extern uno::Reference< uno::XInterface > SAL_CALL RandomNode_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
extern OUString RandomNode__getImplementationName() throw( uno::RuntimeException );
extern uno::Sequence< OUString > SAL_CALL RandomNode_getSupportedServiceNames() throw( uno::RuntimeException );
+
+extern uno::Reference< uno::XInterface > SAL_CALL SlideLayoutController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
+extern OUString SlideLayoutController_getImplementationName() throw( uno::RuntimeException );
+extern uno::Sequence< OUString > SlideLayoutController_getSupportedServiceNames() throw( uno::RuntimeException );
+
+extern uno::Reference< uno::XInterface > SAL_CALL InsertSlideController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
+extern OUString InsertSlideController_getImplementationName() throw( uno::RuntimeException );
+extern uno::Sequence< OUString > InsertSlideController_getSupportedServiceNames() throw( uno::RuntimeException );
}
namespace sd { namespace framework {
@@ -142,6 +150,17 @@ extern uno::Sequence<OUString> SAL_CALL PresentationFactoryProvider_getSupported
} }
+namespace sd { namespace toolpanel {
+
+extern uno::Reference<uno::XInterface> SAL_CALL ToolPanelFactory_createInstance(
+ const uno::Reference<uno::XComponentContext>& rxContext)
+ throw(uno::Exception);
+extern OUString ToolPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
+extern uno::Sequence<OUString> SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
+ throw (uno::RuntimeException);
+
+} }
+
namespace sd { namespace presenter {
extern uno::Reference<uno::XInterface> SAL_CALL SlideRenderer_createInstance(
const uno::Reference<uno::XComponentContext>& rxContext)
@@ -199,6 +218,7 @@ using namespace ::sd;
using namespace ::sd::framework;
using namespace ::sd::presenter;
using namespace ::sd::slidesorter;
+using namespace ::sd::toolpanel;
@@ -222,6 +242,7 @@ enum FactoryId
BasicToolBarFactoryFactoryId,
BasicViewFactoryFactoryId,
TaskPanelFactoryFactoryId,
+ ToolPanelFactoryFactoryId,
ResourceIdFactoryId,
PresentationFactoryProviderFactoryId,
SlideRendererFactoryId,
@@ -229,7 +250,9 @@ enum FactoryId
PresenterTextViewServiceFactoryId,
PresenterHelperServiceFactoryId,
PresenterPreviewCacheFactoryId,
- SlideSorterServiceFactoryId
+ SlideSorterServiceFactoryId,
+ SlideLayoutControllerFactoryId,
+ InsertSlideControllerFactoryId,
};
typedef ::std::hash_map<OUString, FactoryId, comphelper::UStringHash, comphelper::UStringEqual> FactoryMap;
@@ -253,6 +276,7 @@ static ::boost::shared_ptr<FactoryMap> spFactoryMap;
(*spFactoryMap)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId;
(*spFactoryMap)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId;
(*spFactoryMap)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId;
+ (*spFactoryMap)[ToolPanelFactory_getImplementationName()] = ToolPanelFactoryFactoryId;
(*spFactoryMap)[ResourceId_getImplementationName()] = ResourceIdFactoryId;
(*spFactoryMap)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId;
(*spFactoryMap)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId;
@@ -261,6 +285,8 @@ static ::boost::shared_ptr<FactoryMap> spFactoryMap;
(*spFactoryMap)[PresenterHelperService_getImplementationName()] = PresenterHelperServiceFactoryId;
(*spFactoryMap)[PresenterPreviewCache_getImplementationName()] = PresenterPreviewCacheFactoryId;
(*spFactoryMap)[SlideSorterService_getImplementationName()] = SlideSorterServiceFactoryId;
+ (*spFactoryMap)[SlideLayoutController_getImplementationName()] = SlideLayoutControllerFactoryId;
+ (*spFactoryMap)[InsertSlideController_getImplementationName()] = InsertSlideControllerFactoryId;
}
return spFactoryMap;
};
@@ -335,6 +361,10 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(
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(
@@ -365,6 +395,14 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_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 &)
{
@@ -484,6 +522,13 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sd::framework::TaskPanelFactory_getSupportedServiceNames());
break;
+ case ToolPanelFactoryFactoryId:
+ xComponentFactory = ::cppu::createSingleComponentFactory(
+ sd::toolpanel::ToolPanelFactory_createInstance,
+ sd::toolpanel::ToolPanelFactory_getImplementationName(),
+ sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
+ break;
+
case ResourceIdFactoryId:
xComponentFactory = ::cppu::createSingleComponentFactory(
sd::framework::ResourceId_createInstance,
@@ -540,6 +585,20 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sd::slidesorter::SlideSorterService_getSupportedServiceNames());
break;
+ case SlideLayoutControllerFactoryId:
+ xFactory = ::cppu::createSingleFactory(
+ xMSF,
+ sd::SlideLayoutController_getImplementationName(),
+ sd::SlideLayoutController_createInstance,
+ sd::SlideLayoutController_getSupportedServiceNames());
+ break;
+
+ case InsertSlideControllerFactoryId:
+ xFactory = ::cppu::createSingleFactory(
+ xMSF,
+ sd::InsertSlideController_getImplementationName(),
+ sd::InsertSlideController_createInstance,
+ sd::InsertSlideController_getSupportedServiceNames());
default:
break;
}
diff --git a/sd/source/ui/unoidl/makefile.mk b/sd/source/ui/unoidl/makefile.mk
index b3e71df86740..cf4910b29186 100644..100755
--- a/sd/source/ui/unoidl/makefile.mk
+++ b/sd/source/ui/unoidl/makefile.mk
@@ -50,7 +50,6 @@ NOOPTFILES= $(SLO)$/unowcntr.obj
SLO1FILES = \
$(SLO)$/DrawController.obj \
- $(SLO)$/SdUnoPresView.obj\
$(SLO)$/SdUnoSlideView.obj\
$(SLO)$/SdUnoOutlineView.obj\
$(SLO)$/SdUnoDrawView.obj \
@@ -66,7 +65,6 @@ SLO1FILES = \
$(SLO)$/unowcntr.obj \
$(SLO)$/unokywds.obj \
$(SLO)$/unopback.obj \
- $(SLO)$/unovwcrs.obj \
$(SLO)$/unodoc.obj \
$(SLO)$/unomodule.obj \
$(SLO)$/randomnode.obj
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index b8f48a6928aa..1935c424ec03 100644..100755
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -493,24 +493,3 @@ SdCustomShow * SdXCustomPresentationAccess::getSdCustomShow( const OUString& Nam
}
return NULL;
}
-
-sal_Int32 SdXCustomPresentationAccess::getSdCustomShowIdx( const OUString& Name ) const throw()
-{
- sal_Int32 nIdx = 0;
-
- List* pList = GetCustomShowList();
- const sal_Int32 nCount = pList?pList->Count():0;
-
- const String aName( Name );
-
- while( nIdx < nCount )
- {
- SdCustomShow* pShow = (SdCustomShow*)pList->GetObject(nIdx);
- if( pShow->GetName() == aName )
- return nIdx;
- nIdx++;
- }
- return -1;
-}
-
-
diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx
index 1267b3a58b0a..615d5ba7007c 100644..100755
--- a/sd/source/ui/unoidl/unocpres.hxx
+++ b/sd/source/ui/unoidl/unocpres.hxx
@@ -124,7 +124,6 @@ private:
// intern
inline List* GetCustomShowList() const throw();
- sal_Int32 getSdCustomShowIdx( const ::rtl::OUString& Name ) const throw();
SdCustomShow * getSdCustomShow( const ::rtl::OUString& Name ) const throw();
public:
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 5b0594ba58b0..e11f76a64baa 100644..100755
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1071,10 +1071,14 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
{
nType = OBJ_OLE2;
}
- else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ else if( aType.EqualsAscii( "CalcShape", 26, 9 ) )
{
nType = OBJ_OLE2;
}
+ else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ {
+ nType = OBJ_TABLE;
+ }
else if( aType.EqualsAscii( "OrgChartShape", 26, 13 ) )
{
nType = OBJ_OLE2;
@@ -1103,9 +1107,9 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
{
nType = OBJ_TEXT;
}
- else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ else if( aType.EqualsAscii( "MediaShape", 26, 10 ) )
{
- nType = OBJ_TABLE;
+ nType = OBJ_MEDIA;
}
else
{
@@ -1156,7 +1160,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
- uno::Sequence< OUString > aSNS( mbImpressDoc ? (34) : (19) );
+ uno::Sequence< OUString > aSNS( mbImpressDoc ? (36) : (19) );
sal_uInt16 i(0);
@@ -1199,6 +1203,8 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.HeaderShape"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.SlideNumberShape"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.DateTimeShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.CalcShape"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.MediaShape"));
}
else
{
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index d4ea1dce196f..f31c960d432d 100644..100755
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -311,14 +311,6 @@ typedef SORT* PSORT;
extern "C" int __LOADONCALLAPI SortFunc( const void* p1, const void* p2 );
-SdXShape::SdXShape() throw()
-: mpPropSet(lcl_GetEmpty_SdXShapePropertySet_Impl()),
- mpMap(lcl_GetEmpty_SdXShapePropertyMap_Impl()),
- mpModel(NULL),
- mpImplementationId(NULL)
-{
-}
-
SdXShape::SdXShape( SvxShape* pShape, SdXImpressDocument* pModel) throw()
: mpShape( pShape ),
mpPropSet( pModel?
diff --git a/sd/source/ui/unoidl/unoobj.hxx b/sd/source/ui/unoidl/unoobj.hxx
index 3e7c3fab7d3c..0e472f41ff16 100644..100755
--- a/sd/source/ui/unoidl/unoobj.hxx
+++ b/sd/source/ui/unoidl/unoobj.hxx
@@ -75,7 +75,6 @@ private:
com::sun::star::uno::Sequence< sal_Int8 >* mpImplementationId;
public:
- SdXShape() throw();
SdXShape(SvxShape* pShape, SdXImpressDocument* pModel) throw();
virtual ~SdXShape() throw();
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 69d961d7237a..379344667a0c 100644..100755
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -345,7 +345,34 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind )
return pRet;
}
-UNO3_GETIMPLEMENTATION2_IMPL( SdGenericDrawPage, SvxFmDrawPage );
+const ::com::sun::star::uno::Sequence< sal_Int8 > & SdGenericDrawPage::getUnoTunnelId() throw()
+{
+ static ::com::sun::star::uno::Sequence< sal_Int8 > * pSeq = 0;
+ if( !pSeq )
+ {
+ ::osl::Guard< ::osl::Mutex > aGuard( ::osl::Mutex::getGlobalMutex() );
+ if( !pSeq )
+ {
+ static ::com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
+ rtl_createUuid( (sal_uInt8*)aSeq.getArray(), 0, sal_True );
+ pSeq = &aSeq;
+ }
+ }
+ return *pSeq;
+}
+
+sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException)
+{
+ if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
+ rId.getConstArray(), 16 ) )
+ {
+ return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));
+ }
+ else
+ {
+ return SvxFmDrawPage::getSomething( rId );
+ }
+}
/***********************************************************************
* *
@@ -403,7 +430,7 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
String aType( xShape->getShapeType() );
const String aPrefix( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.") );
- if(aType.CompareTo( aPrefix, aPrefix.Len() ) != 0)
+ if( aType.CompareTo( aPrefix, aPrefix.Len() ) != 0 )
{
SdrObject* pObj = SvxFmDrawPage::_CreateSdrObject( xShape );
if( pObj && ( (pObj->GetObjInventor() != SdrInventor) || (pObj->GetObjIdentifier() != OBJ_PAGE) ) )
@@ -439,6 +466,10 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{
eObjKind = PRESOBJ_CHART;
}
+ else if( aType.EqualsAscii( "CalcShape" ) )
+ {
+ eObjKind = PRESOBJ_CALC;
+ }
else if( aType.EqualsAscii( "TableShape" ) )
{
eObjKind = PRESOBJ_TABLE;
@@ -486,6 +517,10 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
{
eObjKind = PRESOBJ_DATETIME;
}
+ else if( aType.EqualsAscii( "MediaShape" ) )
+ {
+ eObjKind = PRESOBJ_MEDIA;
+ }
Rectangle aRect( eObjKind == PRESOBJ_TITLE ? GetPage()->GetTitleRect() : GetPage()->GetLayoutRect() );
@@ -495,7 +530,22 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
const awt::Size aSize( aRect.GetWidth(), aRect.GetHeight() );
xShape->setSize( aSize );
- SdrObject *pPresObj = GetPage()->CreatePresObj( eObjKind, FALSE, aRect, sal_True );
+ SdrObject *pPresObj = 0;
+ if( (eObjKind == PRESOBJ_TABLE) || (eObjKind == PRESOBJ_MEDIA) )
+ {
+ pPresObj = SvxFmDrawPage::_CreateSdrObject( xShape );
+ if( pPresObj )
+ {
+ SdDrawDocument* pDoc = (SdDrawDocument*)GetPage()->GetModel();
+ if( pDoc )
+ pPresObj->NbcSetStyleSheet( pDoc->GetDefaultStyleSheet(), sal_True );
+ GetPage()->InsertPresObj( pPresObj, eObjKind );
+ }
+ }
+ else
+ {
+ pPresObj = GetPage()->CreatePresObj( eObjKind, FALSE, aRect, sal_True );
+ }
if( pPresObj )
pPresObj->SetUserCall( GetPage() );
@@ -1380,9 +1430,15 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape( SdrObject *pObj )
case PRESOBJ_ORGCHART:
aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("OrgChartShape") );
break;
+ case PRESOBJ_CALC:
+ aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("CalcShape") );
+ break;
case PRESOBJ_TABLE:
aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("TableShape") );
break;
+ case PRESOBJ_MEDIA:
+ aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("MediaShape") );
+ break;
case PRESOBJ_PAGE:
aShapeType += String( RTL_CONSTASCII_USTRINGPARAM("PageShape") );
break;
diff --git a/sd/source/ui/unoidl/unopage.hxx b/sd/source/ui/unoidl/unopage.hxx
index 52e5cc061f7d..5d525b0f0f04 100644..100755
--- a/sd/source/ui/unoidl/unopage.hxx
+++ b/sd/source/ui/unoidl/unopage.hxx
@@ -113,7 +113,8 @@ public:
SdPage* GetPage() const { return (SdPage*)SvxDrawPage::mpPage; }
SdXImpressDocument* GetModel() const;
- UNO3_GETIMPLEMENTATION_DECL( SdGenericDrawPage )
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
// this is called whenever a SdrObject must be created for a empty api shape wrapper
virtual SdrObject *_CreateSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xShape ) throw();
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index a1cd11861d3a..56133e03a375 100644..100755
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -105,11 +105,6 @@ SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XDrawPage* pPage ) th
mpPage = pPage;
}
-SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XShape* pShape ) throw()
-{
- mpShape = pShape;
-}
-
SdUnoSearchReplaceShape::~SdUnoSearchReplaceShape() throw()
{
}
diff --git a/sd/source/ui/unoidl/unovwcrs.cxx b/sd/source/ui/unoidl/unovwcrs.cxx
deleted file mode 100644
index 8b72cbe1fd96..000000000000
--- a/sd/source/ui/unoidl/unovwcrs.cxx
+++ /dev/null
@@ -1,209 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-#include <com/sun/star/text/XTextViewCursor.hpp>
-#include <com/sun/star/view/XScreenCursor.hpp>
-#include <sfx2/request.hxx>
-#include <vos/mutex.hxx>
-#include "View.hxx"
-#ifndef SVX_LIGHT
-#ifndef SD_DRAW_DOC_SHELL_HXX
-#include "DrawDocShell.hxx"
-#endif
-#endif
-#include "ViewShell.hxx"
-#include "slideshow.hxx"
-
-#include <cppuhelper/implbase2.hxx>
-#include <vcl/svapp.hxx>
-
-using namespace ::vos;
-using namespace ::rtl;
-using namespace ::com::sun::star;
-
-class SdXTextViewCursor
- : public ::cppu::WeakImplHelper2<
- text::XTextViewCursor,
- view::XScreenCursor >
-{
-public:
- SdXTextViewCursor(::sd::View* pVw) throw();
- virtual ~SdXTextViewCursor() throw();
-
- //XTextViewCursor
- virtual sal_Bool SAL_CALL isVisible(void) throw( uno::RuntimeException );
- virtual void SAL_CALL setVisible(sal_Bool bVisible) throw( uno::RuntimeException );
- virtual awt::Point SAL_CALL getPosition(void) throw( uno::RuntimeException );
-
- //XTextCursor
- virtual void SAL_CALL collapseToStart(void) throw( uno::RuntimeException );
- virtual void SAL_CALL collapseToEnd(void) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL isCollapsed(void) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL goLeft(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL goRight(sal_Int16 nCount, sal_Bool Expand) throw( uno::RuntimeException );
- virtual void SAL_CALL gotoStart(sal_Bool Expand) throw( uno::RuntimeException );
- virtual void SAL_CALL gotoEnd(sal_Bool Expand) throw( uno::RuntimeException );
- virtual void SAL_CALL gotoRange(const uno::Reference< text::XTextRange > & rRange, sal_Bool bExpand ) throw (::com::sun::star::uno::RuntimeException);
-
- //XTextRange
- virtual uno::Reference< text::XText > SAL_CALL getText(void) throw( uno::RuntimeException );
- virtual uno::Reference< text::XTextRange > SAL_CALL getStart(void) throw( uno::RuntimeException );
- virtual uno::Reference< text::XTextRange > SAL_CALL getEnd(void) throw( uno::RuntimeException );
- virtual OUString SAL_CALL getString(void) throw( uno::RuntimeException );
- virtual void SAL_CALL setString(const OUString& aString) throw( uno::RuntimeException );
-
- //XScreenCursor
- virtual sal_Bool SAL_CALL screenDown(void) throw( uno::RuntimeException );
- virtual sal_Bool SAL_CALL screenUp(void) throw( uno::RuntimeException );
-
- void Invalidate() { mpView = 0; }
-
-private:
- ::sd::View* mpView;
-};
-
-
-text::XTextViewCursor* CreateSdXTextViewCursor(::sd::View* mpView )
-{
- return new SdXTextViewCursor( mpView );
-}
-
-SdXTextViewCursor::SdXTextViewCursor(::sd::View* pSdView ) throw()
- : mpView(pSdView)
-{
-
-}
-
-SdXTextViewCursor::~SdXTextViewCursor() throw()
-{
-}
-
-sal_Bool SdXTextViewCursor::isVisible(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_True;
-}
-
-void SdXTextViewCursor::setVisible(sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-awt::Point SdXTextViewCursor::getPosition(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return awt::Point();
-}
-
-void SdXTextViewCursor::collapseToStart(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-void SdXTextViewCursor::collapseToEnd(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-sal_Bool SdXTextViewCursor::isCollapsed(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_True;
-
-}
-
-sal_Bool SdXTextViewCursor::goLeft(sal_Int16 , sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_False;
-}
-
-sal_Bool SdXTextViewCursor::goRight(sal_Int16, sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return sal_False;
-}
-
-void SdXTextViewCursor::gotoRange(const uno::Reference< text::XTextRange > &, sal_Bool ) throw (::com::sun::star::uno::RuntimeException)
-{
- DBG_WARNING("not implemented");
-}
-
-void SdXTextViewCursor::gotoStart(sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-void SdXTextViewCursor::gotoEnd(sal_Bool ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-sal_Bool SdXTextViewCursor::screenDown(void) throw( uno::RuntimeException )
-{
- OGuard aGuard(Application::GetSolarMutex());
- return sal_False;
-}
-
-sal_Bool SdXTextViewCursor::screenUp(void) throw( uno::RuntimeException )
-{
- OGuard aGuard(Application::GetSolarMutex());
- return sal_False;
-}
-
-uno::Reference< text::XText > SdXTextViewCursor::getText(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return uno::Reference< text::XText > ();
-}
-
-uno::Reference< text::XTextRange > SdXTextViewCursor::getStart(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return uno::Reference< text::XTextRange > ();
-}
-
-uno::Reference< text::XTextRange > SdXTextViewCursor::getEnd(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return uno::Reference< text::XTextRange > ();
-}
-
-OUString SdXTextViewCursor::getString(void) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
- return OUString();
-}
-
-void SdXTextViewCursor::setString(const OUString& ) throw( uno::RuntimeException )
-{
- DBG_WARNING("not implemented");
-}
-
-
diff --git a/sd/source/ui/unoidl/unowcntr.cxx b/sd/source/ui/unoidl/unowcntr.cxx
index fbb9991981f9..e29ee1e1516e 100644..100755
--- a/sd/source/ui/unoidl/unowcntr.cxx
+++ b/sd/source/ui/unoidl/unowcntr.cxx
@@ -77,31 +77,6 @@ void SvUnoWeakContainer::insert( uno::WeakReference< uno::XInterface > xRef ) th
mpList->Insert( new uno::WeakReference< uno::XInterface >( xRef ) );
}
-/** removes the given ref from this container */
-void SvUnoWeakContainer::remove( uno::WeakReference< uno::XInterface > xRef ) throw()
-{
- uno::WeakReference< uno::XInterface >* pRef = mpList->First();
- while( pRef )
- {
- uno::Reference< uno::XInterface > xTestRef( *pRef );
- if(!xTestRef.is())
- {
- delete mpList->Remove();
- pRef = mpList->GetCurObject();
- }
- else
- {
- if( *pRef == xRef )
- {
- delete mpList->Remove();
- break;
- }
-
- pRef = mpList->Next();
- }
- }
-}
-
/** searches the container for a ref that returns true on the given
search function
*/
diff --git a/sd/source/ui/unoidl/unowcntr.hxx b/sd/source/ui/unoidl/unowcntr.hxx
index 86d68f3c4d22..a35c27cfd583 100644..100755
--- a/sd/source/ui/unoidl/unowcntr.hxx
+++ b/sd/source/ui/unoidl/unowcntr.hxx
@@ -46,9 +46,6 @@ public:
/** inserts the given ref into this container */
void insert( ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > xRef ) throw();
- /** removes the given ref from this container */
- void remove( ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > xRef ) throw();
-
/** searches the container for a ref that returns true on the given
search function
*/
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index 38409bb2376e..759103760bfe 100644..100755
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -100,18 +100,18 @@ void GraphicViewShellBase::Execute (SfxRequest& rRequest)
switch (nSlotId)
{
- case SID_RIGHT_PANE:
case SID_NOTES_WINDOW:
case SID_SLIDE_SORTER_MULTI_PANE_GUI:
case SID_DIAMODE:
case SID_OUTLINEMODE:
case SID_NOTESMODE:
case SID_HANDOUTMODE:
- case SID_TASK_PANE:
+ case SID_SHOW_TOOL_PANEL:
// Prevent some Impress-only slots from being executed.
rRequest.Cancel();
break;
+ case SID_TASKPANE:
case SID_SWITCH_SHELL:
case SID_LEFT_PANE_DRAW:
case SID_LEFT_PANE_IMPRESS:
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 5314f6dbe768..356c03b82387 100644..100755
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -57,6 +57,8 @@
#include <vcl/metric.hxx>
#include <sfx2/viewfrm.hxx>
#include <svtools/langtab.hxx>
+#include <tools/diagnose_ex.h>
+
#include "strings.hrc"
#include "sdstring.hrc"
#include "eetext.hxx"
@@ -425,23 +427,6 @@ BOOL Outliner::SpellNextDocument (void)
}
-void Outliner::HandleOutsideChange (ChangeHint eHint)
-{
- switch (eHint)
- {
- case CH_VIEW_SHELL_INVALID:
- EndSpelling();
- mbPrepareSpellingPending = true;
- mbViewShellValid = false;
- break;
-
- case CH_VIEW_SHELL_VALID:
- mbViewShellValid = true;
- break;
- }
-}
-
-
/*************************************************************************
|*
@@ -566,7 +551,8 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
void Outliner::Initialize (bool bDirectionIsForward)
{
- bool bOldDirectionIsForward = mbDirectionIsForward;
+ const bool bIsAtEnd (maObjectIterator == ::sd::outliner::OutlinerContainer(this).end());
+ const bool bOldDirectionIsForward = mbDirectionIsForward;
mbDirectionIsForward = bDirectionIsForward;
if (maObjectIterator == ::sd::outliner::Iterator())
@@ -601,10 +587,19 @@ void Outliner::Initialize (bool bDirectionIsForward)
{
// Requested iteration direction has changed. Turn arround the iterator.
maObjectIterator.Reverse();
- // The iterator has pointed to the object one ahead/before the current
- // one. Now move it to the one before/ahead the current one.
- ++maObjectIterator;
- ++maObjectIterator;
+ if (bIsAtEnd)
+ {
+ // The iterator has pointed to end(), which after the search
+ // direction is reversed, becomes begin().
+ maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
+ }
+ else
+ {
+ // The iterator has pointed to the object one ahead/before the current
+ // one. Now move it to the one before/ahead the current one.
+ ++maObjectIterator;
+ ++maObjectIterator;
+ }
mbMatchMayExist = true;
}
@@ -974,7 +969,7 @@ void Outliner::ProvideNextTextObject (void)
}
catch (::com::sun::star::uno::Exception e)
{
- OSL_TRACE ("Outliner %p: caught exception while ending text edit mode", this);
+ DBG_UNHANDLED_EXCEPTION();
}
SetUpdateMode(FALSE);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
@@ -1076,23 +1071,6 @@ void Outliner::EndOfSearch (void)
}
}
-
-
-
-void Outliner::InitPage (USHORT nPageIndex)
-{
- (void)nPageIndex;
-
- ::sd::outliner::IteratorPosition aPosition (*maObjectIterator);
- if (aPosition.meEditMode == EM_PAGE)
- mnPageCount = mpDrawDocument->GetSdPageCount(aPosition.mePageKind);
- else
- mnPageCount = mpDrawDocument->GetMasterSdPageCount(aPosition.mePageKind);
-}
-
-
-
-
void Outliner::ShowEndOfSearchDialog (void)
{
String aString;
@@ -1475,36 +1453,6 @@ bool Outliner::HandleFailedSearch (void)
}
-#if ENABLE_LAYOUT
-#define SvxSearchDialog Window
-#endif
-
-/** See task #95227# for discussion about correct parent for dialogs/info boxes.
-*/
-::Window* Outliner::GetParentForDialog (void)
-{
- ::Window* pParent = NULL;
-
- if (meMode == SEARCH)
- pParent = static_cast<SvxSearchDialog*>(
- SfxViewFrame::Current()->GetChildWindow(
- SvxSearchDialogWrapper::GetChildWindowId())->GetWindow());
-
- if (pParent == NULL)
- pParent = mpViewShell->GetActiveWindow();
-
- if (pParent == NULL)
- pParent = Application::GetDefDialogParent();
- //1.30->1.31 of sdoutl.cxx pParent = Application::GetDefModalDialogParent();
-
- return pParent;
-}
-
-#if ENABLE_LAYOUT
-#undef SvxSearchDialog
-#endif
-
-
SdrObject* Outliner::SetObject (
const ::sd::outliner::IteratorPosition& rPosition)
{
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 81f9a50d256d..226d767c6c91 100644..100755
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -67,15 +67,6 @@ IteratorPosition::IteratorPosition (const IteratorPosition& aPosition)
{
}
-IteratorPosition::IteratorPosition (SdrObject* pObject, sal_Int32 nText, sal_Int32 nPageIndex, PageKind ePageKind, EditMode eEditMode)
-: mxObject(pObject)
-, mnText(nText)
-, mnPageIndex(nPageIndex)
-, mePageKind(ePageKind)
-, meEditMode(eEditMode)
-{
-}
-
IteratorPosition::~IteratorPosition (void)
{
}
@@ -119,11 +110,6 @@ Iterator::Iterator (IteratorImplBase* pObject)
mpIterator = pObject;
}
-Iterator::Iterator (const IteratorImplBase& rObject)
-{
- mpIterator = rObject.Clone();
-}
-
Iterator::~Iterator (void)
{
delete mpIterator;
@@ -266,28 +252,6 @@ Iterator OutlinerContainer::CreateSelectionIterator (
rObjectList, nObjectIndex, pDocument, rpViewShell, bDirectionIsForward));
}
-Iterator OutlinerContainer::CreateViewIterator (
- SdDrawDocument* pDocument,
- const ::boost::shared_ptr<ViewShell>& rpViewShell,
- bool bDirectionIsForward,
- IteratorLocation aLocation)
-{
- OSL_ASSERT(rpViewShell.get());
-
- const ::boost::shared_ptr<DrawViewShell> pDrawViewShell(
- ::boost::dynamic_pointer_cast<DrawViewShell>(rpViewShell));
- sal_Int32 nPageIndex = GetPageIndex (
- pDocument,
- rpViewShell,
- pDrawViewShell.get() ? pDrawViewShell->GetPageKind() : PK_STANDARD,
- pDrawViewShell.get() ? pDrawViewShell->GetEditMode() : EM_PAGE,
- bDirectionIsForward,
- aLocation);
-
- return Iterator (new ViewIteratorImpl (
- nPageIndex, pDocument, rpViewShell, bDirectionIsForward));
-}
-
Iterator OutlinerContainer::CreateDocumentIterator (
SdDrawDocument* pDocument,
const ::boost::shared_ptr<ViewShell>& rpViewShell,
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 4919a9fe2bbb..ce3064392d40 100644..100755
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -119,10 +119,9 @@ private:
/** Manage tool bars that are implemented as sub shells of a view shell.
The typical procedure of updating the sub shells of a view shell is to
rebuild a list of sub shells that the caller would like to have active.
- The methods ClearGroup(), AddShellId(), and RemoveShellId() allow the
- caller to do that. A final call to UpdateShells() activates the
- requested shells that are not active and deactivates the active shells
- that are not requested.
+ The methods ClearGroup() and AddShellId() allow the caller to do that. A
+ final call to UpdateShells() activates the requested shells that are not
+ active and deactivates the active shells that are not requested .
This is done by maintaining two lists. One (the current list)
reflects the current state. The other (the requested list) contains the
@@ -157,18 +156,6 @@ public:
*/
void AddShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId);
- /** Remove a shell. This is done only when the specified shell is a
- member of the specified group. If it has been requested for another
- group or if it has not been requested then this call is ignored.
- @param eGroup
- The group from which to remove the shell.
- @param nId
- The id of the shell to remove.
- @return
- Returns whether the shell is removed.
- */
- bool RemoveShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId);
-
/** Releasing all shells means that the given ToolBarRules object is
informed that every shell mananged by the called ToolBarShellList is
about to be removed and that the associated framework tool bars can
@@ -296,7 +283,6 @@ public:
void AddToolBar (ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName);
void AddToolBarShell (ToolBarGroup eGroup, ShellId nToolBarId);
void RemoveToolBar (ToolBarGroup eGroup, const ::rtl::OUString& rsToolBarName);
- void RemoveToolBarShell (ToolBarGroup eGroup, ShellId nToolBarId);
/** Release all tool bar shells and the associated framework tool bars.
Typically called when the main view shell is being replaced by
@@ -332,7 +318,6 @@ public:
};
void LockViewShellManager (void);
- bool IsUpdateLocked (void) const;
void LockUpdate (void);
void UnlockUpdate (void);
@@ -430,15 +415,6 @@ void ToolBarManager::Shutdown (void)
-void ToolBarManager::SetValid (bool bValid)
-{
- if (mpImpl.get() != NULL)
- mpImpl->SetValid(bValid);
-}
-
-
-
-
void ToolBarManager::ResetToolBars (ToolBarGroup eGroup)
{
if (mpImpl.get() != NULL)
@@ -505,20 +481,6 @@ void ToolBarManager::RemoveToolBar (
-void ToolBarManager::RemoveToolBarShell (
- ToolBarGroup eGroup,
- ShellId nToolBarId)
-{
- if (mpImpl.get() != NULL)
- {
- UpdateLock aLock (shared_from_this());
- mpImpl->RemoveToolBarShell(eGroup,nToolBarId);
- }
-}
-
-
-
-
void ToolBarManager::SetToolBar (
ToolBarGroup eGroup,
const ::rtl::OUString& rsToolBarName)
@@ -576,17 +538,6 @@ void ToolBarManager::LockViewShellManager (void)
-bool ToolBarManager::IsUpdateLocked (void) const
-{
- if (mpImpl.get() != NULL)
- return mpImpl->IsUpdateLocked();
- else
- return false;
-}
-
-
-
-
void ToolBarManager::LockUpdate (void)
{
if (mpImpl.get()!=NULL)
@@ -819,21 +770,6 @@ void ToolBarManager::Implementation::AddToolBarShell (
-void ToolBarManager::Implementation::RemoveToolBarShell (
- ToolBarGroup eGroup,
- ShellId nToolBarId)
-{
- ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
- if (pMainViewShell != NULL)
- {
- GetToolBarRules().SubShellRemoved(eGroup, nToolBarId);
- maToolBarShellList.RemoveShellId(eGroup,nToolBarId);
- }
-}
-
-
-
-
void ToolBarManager::Implementation::ReleaseAllToolBarShells (void)
{
maToolBarShellList.ReleaseAllShells(GetToolBarRules());
@@ -946,14 +882,6 @@ void ToolBarManager::Implementation::LockViewShellManager (void)
-bool ToolBarManager::Implementation::IsUpdateLocked (void) const
-{
- return mnLockCount;
-}
-
-
-
-
void ToolBarManager::Implementation::LockUpdate (void)
{
#ifdef VERBOSE
@@ -1705,26 +1633,6 @@ void ToolBarShellList::AddShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::
-bool ToolBarShellList::RemoveShellId (sd::ToolBarManager::ToolBarGroup eGroup, sd::ShellId nId)
-{
- bool bRemoved (false);
-
- GroupedShellList::iterator iDescriptor (maNewList.find(ShellDescriptor(nId,eGroup)));
- if (iDescriptor != maNewList.end())
- {
- if (iDescriptor->meGroup == eGroup)
- {
- maNewList.erase(iDescriptor);
- bRemoved = true;
- }
- }
-
- return bRemoved;
-}
-
-
-
-
void ToolBarShellList::ReleaseAllShells (ToolBarRules& rRules)
{
// Release the currently active tool bars.
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 6640d2455c20..1e18ad5c5ee9 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -64,9 +64,9 @@
#include "OutlineViewShell.hxx"
#include "SlideSorterViewShell.hxx"
#include "PresentationViewShell.hxx"
-#include "TaskPaneViewShell.hxx"
#include "FormShellManager.hxx"
#include "ToolBarManager.hxx"
+#include "taskpane/PanelId.hxx"
#include "Window.hxx"
#include "framework/ConfigurationController.hxx"
#include "DocumentRenderer.hxx"
@@ -91,6 +91,7 @@
#include <svl/whiter.hxx>
#include <comphelper/processfactory.hxx>
#include <vcl/msgbox.hxx>
+#include <tools/diagnose_ex.h>
#include "fubullet.hxx"
@@ -163,8 +164,6 @@ public:
::boost::shared_ptr<FormShellManager> mpFormShellManager;
- ::boost::shared_ptr<CustomHandleManager> mpCustomHandleManager;
-
Implementation (ViewShellBase& rBase);
~Implementation (void);
@@ -460,13 +459,6 @@ ViewShellBase* ViewShellBase::GetViewShellBase (SfxViewFrame* pViewFrame)
-void ViewShellBase::GetMenuState (SfxItemSet& )
-{
-}
-
-
-
-
DrawDocShell* ViewShellBase::GetDocShell (void) const
{
return mpDocShell;
@@ -712,21 +704,6 @@ ErrCode ViewShellBase::DoPrint (
-USHORT ViewShellBase::SetPrinterOptDlg (
- SfxPrinter* pNewPrinter,
- USHORT nDiffFlags,
- BOOL bShowDialog)
-{
- (void)pNewPrinter;
- (void)nDiffFlags;
- (void)bShowDialog;
- return 0;
- // return mpImpl->mpPrintManager->SetPrinterOptDlg ( pNewPrinter, nDiffFlags, bShowDialog);
-}
-
-
-
-
void ViewShellBase::PreparePrint (PrintDialog* pPrintDialog)
{
SfxViewShell::PreparePrint (pPrintDialog);
@@ -808,7 +785,7 @@ void ViewShellBase::Execute (SfxRequest& rRequest)
framework::FrameworkHelper::msSlideSorterURL);
break;
- case SID_RIGHT_PANE:
+ case SID_TASKPANE:
mpImpl->SetPaneVisibility(
rRequest,
framework::FrameworkHelper::msRightPaneURL,
@@ -829,7 +806,7 @@ void ViewShellBase::Execute (SfxRequest& rRequest)
// The full screen mode is not supported. Ignore the request.
break;
- case SID_TASK_PANE:
+ case SID_SHOW_TOOL_PANEL:
mpImpl->ProcessTaskPaneSlot(rRequest);
break;
@@ -1245,19 +1222,7 @@ void ViewShellBase::SetViewTabBar (const ::rtl::Reference<ViewTabBar>& rViewTabB
}
-
-
-CustomHandleManager& ViewShellBase::getCustomHandleManager() const
-{
- OSL_ASSERT(mpImpl.get()!=NULL);
-
- if( !mpImpl->mpCustomHandleManager.get() )
- mpImpl->mpCustomHandleManager.reset( new ::sd::CustomHandleManager(*const_cast< ViewShellBase* >(this)) );
-
- return *mpImpl->mpCustomHandleManager.get();
-}
-
-::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
+::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const ::rtl::OUString& aCmdURL )
{
::rtl::OUString aLabel;
@@ -1266,7 +1231,7 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
Reference< XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
Reference< XModuleManager > xModuleManager( xServiceManager->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager") ) ), UNO_QUERY_THROW );
- Reference< XInterface > xIfac( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY_THROW );
+ Reference< XInterface > xIfac( xFrame, UNO_QUERY_THROW );
::rtl::OUString aModuleIdentifier( xModuleManager->identify( xIfac ) );
@@ -1298,6 +1263,12 @@ CustomHandleManager& ViewShellBase::getCustomHandleManager() const
return aLabel;
}
+::rtl::OUString ViewShellBase::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) const
+{
+ Reference< XFrame > xFrame( GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(), UNO_QUERY );
+ return ImplRetrieveLabelFromCommand( xFrame, aCmdURL );
+}
+
//===== ViewShellBase::Implementation =========================================
@@ -1487,9 +1458,9 @@ void ViewShellBase::Implementation::SetPaneVisibility (
xConfigurationController->requestResourceDeactivation(
xPaneId);
}
- catch (RuntimeException&)
+ catch (const Exception &)
{
- DBG_ASSERT(false, "ViewShellBase::Implementation::SetPaneVisibility(): caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -1534,7 +1505,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet)
xContext, FrameworkHelper::msLeftDrawPaneURL);
break;
- case SID_RIGHT_PANE:
+ case SID_TASKPANE:
xResourceId = ResourceId::create(
xContext, FrameworkHelper::msRightPaneURL);
break;
@@ -1625,7 +1596,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false, "ViewShellBase::Implementation::GetSlotState(): caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
}
@@ -1638,8 +1609,8 @@ void ViewShellBase::Implementation::ProcessTaskPaneSlot (SfxRequest& rRequest)
// Set the visibility state of the toolpanel and one of its top
// level panels.
BOOL bShowToolPanel = TRUE;
- toolpanel::TaskPaneViewShell::PanelId nPanelId (
- toolpanel::TaskPaneViewShell::PID_UNKNOWN);
+ toolpanel::PanelId nPanelId (
+ toolpanel::PID_UNKNOWN);
bool bPanelIdGiven = false;
// Extract the given arguments.
@@ -1660,7 +1631,7 @@ void ViewShellBase::Implementation::ProcessTaskPaneSlot (SfxRequest& rRequest)
if (pPanelId != NULL)
{
nPanelId = static_cast<
- toolpanel::TaskPaneViewShell::PanelId>(
+ toolpanel::PanelId>(
pPanelId->GetValue());
bPanelIdGiven = true;
}
@@ -1670,7 +1641,7 @@ void ViewShellBase::Implementation::ProcessTaskPaneSlot (SfxRequest& rRequest)
// Ignore the request for some combinations of panels and view
// shell types.
if (bPanelIdGiven
- && ! (nPanelId==toolpanel::TaskPaneViewShell::PID_LAYOUT
+ && ! (nPanelId==toolpanel::PID_LAYOUT
&& mrBase.GetMainViewShell()!=NULL
&& mrBase.GetMainViewShell()->GetShellType()==ViewShell::ST_OUTLINE))
{
@@ -1813,34 +1784,4 @@ void FocusForwardingWindow::Command (const CommandEvent& rEvent)
} // end of anonymouse namespace
-// ====================================================================
-
-CustomHandleManager::CustomHandleManager( ViewShellBase& rViewShellBase )
-: mrViewShellBase( rViewShellBase )
-{
-}
-
-CustomHandleManager::~CustomHandleManager()
-{
- DBG_ASSERT( maSupplier.empty(), "sd::CustomHandleManager::~CustomHandleManager(), still suppliers attached!" );
-}
-
-void CustomHandleManager::registerSupplier( ICustomhandleSupplier* pSupplier )
-{
- maSupplier.insert( pSupplier );
-}
-
-void CustomHandleManager::unRegisterSupplier( ICustomhandleSupplier* pSupplier )
-{
- maSupplier.erase( pSupplier );
-}
-
-void CustomHandleManager::addCustomHandler( SdrView& rSourceView, ViewShell::ShellType eShellType, SdrHdlList& rHandlerList )
-{
- for( std::set< ICustomhandleSupplier* >::iterator aIter( maSupplier.begin() ); aIter != maSupplier.end(); aIter++ )
- {
- (*aIter)->addCustomHandler( rSourceView, eShellType, rHandlerList );
- }
-}
-
} // end of namespace sd
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 8193ae3004d2..fdd7c530137f 100644..100755
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -47,11 +47,11 @@
#include "DrawController.hxx"
#include "FactoryIds.hxx"
#include "slideshow.hxx"
-#include "TaskPaneViewShell.hxx"
#include "ViewShellBase.hxx"
#include "FrameView.hxx"
#include "DrawViewShell.hxx"
#include "ViewShellHint.hxx"
+#include "taskpane/PanelId.hxx"
#include "framework/FrameworkHelper.hxx"
#include <sfx2/bindings.hxx>
@@ -69,48 +69,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
-namespace {
-
-class ImpUndoDeleteWarning : public ModalDialog
-{
-private:
- FixedImage maImage;
- FixedText maWarningFT;
- CheckBox maDisableCB;
- OKButton maYesBtn;
- CancelButton maNoBtn;
-
-public:
- ImpUndoDeleteWarning(Window* pParent);
- BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); }
-};
-
-ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent)
-: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)),
- maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)),
- maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)),
- maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)),
- maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)),
- maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO))
-{
- FreeResource();
-
- SetHelpId( HID_SD_UNDODELETEWARNING_DLG );
- maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX );
-
- maYesBtn.SetText(Button::GetStandardText(BUTTON_YES));
- maNoBtn.SetText(Button::GetStandardText(BUTTON_NO));
- maImage.SetImage(WarningBox::GetStandardImage());
-
- // #93721# Set focus to YES-Button
- maYesBtn.GrabFocus();
-}
-
-} // end of anonymous namespace
-
-
-
-
namespace sd {
ViewShell::Implementation::Implementation (ViewShell& rViewShell)
@@ -195,12 +153,12 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
// Make the layout menu visible in the tool pane.
SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, TRUE);
SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX,
- ::sd::toolpanel::TaskPaneViewShell::PID_LAYOUT);
+ ::sd::toolpanel::PID_LAYOUT);
SfxViewFrame* pFrame = mrViewShell.GetViewFrame();
if (pFrame!=NULL && pFrame->GetDispatcher()!=NULL)
{
pFrame->GetDispatcher()->Execute (
- SID_TASK_PANE,
+ SID_SHOW_TOOL_PANEL,
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
&aMakeToolPaneVisible,
&aPanelId,
@@ -319,30 +277,53 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
rRequest.Done ();
}
+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) ) );
+ SdDrawDocument* pDocument = mrViewShell.GetDoc();
+ if( !pDocument )
+ return;
+ SdPage* pPage = 0;
+ if( pWhatPage )
+ {
+ pPage = pDocument->GetSdPage(static_cast<USHORT>(pWhatPage->GetValue()), ePageKind);
+ }
-void ViewShell::Implementation::AssignLayout (
- SdPage* pPage,
- AutoLayout aLayout)
-{
- // 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));
- SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers());
- SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
- aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
- aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
- aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
- aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
-
- // Forward the call with the new arguments.
- ProcessModifyPageSlot (
- aRequest,
- pPage,
- pPage->GetPageKind());
+ if( pPage == 0 )
+ pPage = mrViewShell.getCurrentPage();
+
+ if( pPage )
+ {
+ AutoLayout eLayout = pPage->GetAutoLayout();
+
+ if( pWhatLayout )
+ eLayout = static_cast< AutoLayout >( pWhatLayout->GetValue() );
+
+ // 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));
+
+ SetOfByte aVisibleLayers;
+
+ if( pPage->GetPageKind() == PK_HANDOUT )
+ aVisibleLayers.SetAll();
+ else
+ aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
+
+ SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
+ aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
+ aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, eLayout));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
+
+ // Forward the call with the new arguments.
+ ProcessModifyPageSlot( aRequest, pPage, pPage->GetPageKind());
+ }
}
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 3ea4ef7a96f3..c25c0f11270a 100755
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -42,7 +42,7 @@
#include <hash_map>
#undef VERBOSE
-#define VERBOSE 2
+//#define VERBOSE 2
namespace sd {
@@ -124,10 +124,6 @@ public:
void RemoveShellFactory (
const SfxShell* pViewShell,
const SharedShellFactory& rpFactory);
- ViewShell* ActivateViewShell (
- ShellId nId,
- ::Window* pParentWindow,
- FrameView* pFrameView);
void ActivateViewShell (
ViewShell* pViewShell);
void DeactivateViewShell (const ViewShell& rShell);
@@ -137,13 +133,10 @@ public:
void SetFormShell (const ViewShell* pViewShell, FmFormShell* pFormShell, bool bAbove);
void ActivateSubShell (const SfxShell& rParentShell, ShellId nId);
void DeactivateSubShell (const SfxShell& rParentShell, ShellId nId);
- void DeactivateAllSubShells (const SfxShell& rViewShell);
void MoveSubShellToTop (const SfxShell& rParentShell, ShellId nId);
void MoveToTop (const SfxShell& rParentShell);
SfxShell* GetShell (ShellId nId) const;
SfxShell* GetTopShell (void) const;
- ShellId GetShellId (const SfxShell* pShell) const;
- void ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement);
void Shutdown (void);
void InvalidateAllSubShells (const SfxShell* pParentShell);
@@ -235,7 +228,6 @@ private:
DECL_LINK(WindowEventHandler, VclWindowEvent*);
- void DumpActiveShell (const ActiveShellList& rList);
void DumpShellStack (const ShellStack& rStack);
void DumpSfxShellStack (void);
@@ -246,10 +238,6 @@ private:
*/
void Deactivate (SfxShell* pShell);
- ShellDescriptor CreateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView);
ShellDescriptor CreateSubShell (
SfxShell* pShell,
ShellId nShellId,
@@ -304,20 +292,6 @@ void ViewShellManager::RemoveSubShellFactory (
-ViewShell* ViewShellManager::ActivateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView)
-{
- if (mbValid)
- return mpImpl->ActivateViewShell(nShellId,pParentWindow,pFrameView);
- else
- return NULL;
-}
-
-
-
-
void ViewShellManager::ActivateViewShell (ViewShell* pViewShell)
{
if (mbValid)
@@ -377,15 +351,6 @@ void ViewShellManager::DeactivateSubShell (const ViewShell& rViewShell, ShellId
-void ViewShellManager::DeactivateAllSubShells (const ViewShell& rViewShell)
-{
- if (mbValid)
- mpImpl->DeactivateAllSubShells(rViewShell);
-}
-
-
-
-
void ViewShellManager::InvalidateAllSubShells (ViewShell* pViewShell)
{
if (mbValid)
@@ -413,15 +378,6 @@ void ViewShellManager::DeactivateShell (const SfxShell* pShell)
-void ViewShellManager::InvalidateShellStack (const SfxShell* pShell)
-{
- if (mbValid)
- mpImpl->TakeShellsFromStack(pShell);
-}
-
-
-
-
void ViewShellManager::MoveToTop (const ViewShell& rParentShell)
{
if (mbValid)
@@ -453,26 +409,6 @@ SfxShell* ViewShellManager::GetTopShell (void) const
-ShellId ViewShellManager::GetShellId (const SfxShell* pShell) const
-{
- if (mbValid)
- return mpImpl->GetShellId(pShell);
- else
- return snInvalidShellId;
-}
-
-
-
-
-void ViewShellManager::ReplaceUndoManager (SfxUndoManager* pManager, SfxUndoManager* pReplacement)
-{
- if (mbValid)
- mpImpl->ReplaceUndoManager(pManager,pReplacement);
-}
-
-
-
-
void ViewShellManager::Shutdown (void)
{
if (mbValid)
@@ -572,24 +508,6 @@ void ViewShellManager::Implementation::RemoveShellFactory (
-ViewShell* ViewShellManager::Implementation::ActivateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- // Create a new shell or recycle on in the cache.
- ShellDescriptor aDescriptor (CreateViewShell(nShellId, pParentWindow, pFrameView));
-
- ActivateShell(aDescriptor);
-
- return dynamic_cast<ViewShell*>(aDescriptor.mpShell);
-}
-
-
-
-
void ViewShellManager::Implementation::ActivateViewShell (ViewShell* pViewShell)
{
::osl::MutexGuard aGuard (maMutex);
@@ -953,66 +871,6 @@ SfxShell* ViewShellManager::Implementation::GetTopShell (void) const
-ShellId ViewShellManager::Implementation::GetShellId (const SfxShell* pShell) const
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- ShellId nId = snInvalidShellId;
-
- // First search the active view shells.
- const ViewShell* pViewShell = dynamic_cast<const ViewShell*>(pShell);
- if (pShell != NULL)
- {
- ActiveShellList::const_iterator iShell (
- ::std::find_if (
- maActiveViewShells.begin(),
- maActiveViewShells.end(),
- IsShell(pViewShell)));
- if (iShell != maActiveViewShells.end())
- nId = iShell->mnId;
- }
- if (nId == snInvalidShellId)
- {
- // Now search the active sub shells of every active view shell.
- SubShellList::const_iterator iList;
- for (iList=maActiveSubShells.begin(); iList!=maActiveSubShells.end(); ++iList)
- {
- const SubShellSubList& rList (iList->second);
- SubShellSubList::const_iterator iSubShell(
- ::std::find_if(rList.begin(),rList.end(), IsShell(pShell)));
- if (iSubShell != rList.end())
- {
- nId = iSubShell->mnId;
- break;
- }
- }
- }
-
- return nId;
-}
-
-
-
-
-void ViewShellManager::Implementation::ReplaceUndoManager (
- SfxUndoManager* pManager,
- SfxUndoManager* pReplacement)
-{
- for (USHORT i=0; ;++i)
- {
- SfxShell* pShell = mrBase.GetSubShell(i);
- if (pShell == NULL)
- break;
- if (pShell->GetUndoManager() == pManager)
- pShell->SetUndoManager(pReplacement);
- }
-}
-
-
-
-
-
-
void ViewShellManager::Implementation::LockUpdate (void)
{
mnUpdateLockCount++;
@@ -1333,44 +1191,6 @@ IMPL_LINK(ViewShellManager::Implementation, WindowEventHandler, VclWindowEvent*,
-ShellDescriptor ViewShellManager::Implementation::CreateViewShell (
- ShellId nShellId,
- ::Window* pParentWindow,
- FrameView* pFrameView)
-{
- ShellDescriptor aResult;
-
- if (pParentWindow != NULL)
- {
- ShellDescriptor aDescriptor (
- CreateSubShell(NULL,nShellId,pParentWindow,pFrameView));
- aResult.mpShell = dynamic_cast<ViewShell*>(aDescriptor.mpShell);
- aResult.mpFactory = aDescriptor.mpFactory;
- aResult.mnId = aDescriptor.mnId;
-
- // Register as window listener so that the shells of the current
- // window can be moved to the top of the shell stack.
- if (aResult.mpShell != NULL)
- {
- ::Window* pWindow = aResult.GetWindow();
- if (pWindow != NULL)
- pWindow->AddEventListener(
- LINK(this, ViewShellManager::Implementation, WindowEventHandler));
- else
- {
- DBG_ASSERT (false,
- "ViewShellManager::ActivateViewShell: "
- "new view shell has no active window");
- }
- }
- }
-
- return aResult;
-}
-
-
-
-
ShellDescriptor ViewShellManager::Implementation::CreateSubShell (
SfxShell* pParentShell,
ShellId nShellId,
@@ -1499,15 +1319,6 @@ void ViewShellManager::Implementation::Shutdown (void)
-void ViewShellManager::Implementation::DumpActiveShell (const ActiveShellList& rList)
-{
- for (ActiveShellList::const_iterator aI=rList.begin(); aI!=rList.end(); ++aI)
- OSL_TRACE (" %d %p\r", aI->mnId, aI->mpShell);
-}
-
-
-
-
void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack)
{
ShellStack::const_reverse_iterator iEntry;
@@ -1580,24 +1391,6 @@ void ViewShellManager::Implementation::SetFormShell (
-void ViewShellManager::Implementation::DeactivateAllSubShells (
- const SfxShell& rViewShell)
-{
- ::osl::MutexGuard aGuard (maMutex);
-
- SubShellList::iterator iList (maActiveSubShells.find(&rViewShell));
- if (iList != maActiveSubShells.end())
- {
- SubShellSubList& rList (iList->second);
- UpdateLock aLock (*this);
- while ( ! rList.empty())
- DeactivateSubShell(rViewShell, rList.front().mnId);
- }
-}
-
-
-
-
namespace {
ShellDescriptor::ShellDescriptor (void)
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index 280252a61621..a12412bf7f7d 100644..100755
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -54,6 +54,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <comphelper/processfactory.hxx>
+#include <tools/diagnose_ex.h>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -472,7 +473,7 @@ bool ViewTabBar::ActivatePage (void)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false,"ViewTabBar::ActivatePage(): caught exception");
+ DBG_UNHANDLED_EXCEPTION();
}
return false;
diff --git a/sd/source/ui/view/bmcache.cxx b/sd/source/ui/view/bmcache.cxx
index d8781733c520..c7f313037ff8 100644..100755
--- a/sd/source/ui/view/bmcache.cxx
+++ b/sd/source/ui/view/bmcache.cxx
@@ -58,115 +58,6 @@ BitmapCache::~BitmapCache()
}
}
-/*************************************************************************
-|*
-|* Cache-Eintrag einfuegen
-|*
-\************************************************************************/
-
-void BitmapCache::Add(const SdPage* pPage, const Bitmap& rBmp, long nZoom)
-{
- BitmapCacheEntry* pEntry = NULL;
- ULONG nSizeOfBitmap = rBmp.GetSizeBytes();
-
- if( nSizeOfBitmap < nMaxSize )
- {
- while (nCurSize + nSizeOfBitmap > nMaxSize)
- {
- if( aEntries.Count() )
- {
- pEntry = (BitmapCacheEntry*) aEntries.Remove(aEntries.Count() - 1);
-
- if( pEntry && pEntry->pGraphicObject )
- {
- nCurSize -= pEntry->nSizeBytes;
- delete pEntry->pGraphicObject;
- }
-
- delete pEntry;
- }
- else
- break;
- }
-
- pEntry = new BitmapCacheEntry;
- pEntry->pPage = pPage;
- pEntry->pGraphicObject = new GraphicObject( rBmp );
- pEntry->nSizeBytes = nSizeOfBitmap;
- pEntry->nZoom = nZoom;
-
- aEntries.Insert( pEntry, (ULONG) 0 );
- nCurSize += nSizeOfBitmap;
- }
-}
-
-/*************************************************************************
-|*
-|* Cache-Eintrag suchen, Bitmap-Zeiger zurueckgeben (NULL, wenn Bitmap nicht
-|* im Cache)
-|* - auf rZoomPercent wird der Zoomfaktor der Bitmap geschrieben
-|* - abs(nZoomTolerance) gibt die maximal erlaubte Abweichung des
-|* Zoomfaktors an; ist die Toleranz negativ, so sucht der Cache den
-|* "best fit", sonst den "first fit",
-|* - es werden nur Bitmaps mit Zoomfaktoren kleiner oder gleich rZoomPercent
-|* beruecksichtigt, um ein Verkleinern der Bitmap beim Zeichnen zu vermeiden
-|*
-\************************************************************************/
-
-const GraphicObject* BitmapCache::Get( const SdPage* pPage, long& rZoomPercent, long nZoomTolerancePercent)
-{
- BitmapCacheEntry* pEntry = NULL;
- GraphicObject* pGraphicObject = NULL;
-
- if( nZoomTolerancePercent < 0 )
- {
- // "best fit"-Suche
- long nTolerance = -nZoomTolerancePercent;
- BitmapCacheEntry* pBest = NULL;
- long nBest = LONG_MAX;
- long nTest = 0L;
-
- for( ULONG nPos = 0; nPos < aEntries.Count(); nPos++ )
- {
- pEntry = (BitmapCacheEntry*) aEntries.GetObject( nPos );
-
- if( pEntry->pPage == pPage )
- {
- nTest = rZoomPercent - pEntry->nZoom;
-
- if( nTest >= 0 && nTest < nBest && nTest <= nTolerance )
- pBest = pEntry;
- }
- }
-
- pEntry = pBest;
- }
- else
- {
- // "first fit"-suche
- for( ULONG nPos = 0; nPos < aEntries.Count(); nPos++ )
- {
- pEntry = (BitmapCacheEntry*)aEntries.GetObject( nPos );
-
- if (pEntry->pPage == pPage && Abs( pEntry->nZoom - rZoomPercent ) <= nZoomTolerancePercent )
- break;
- else
- pEntry = NULL;
- }
- }
-
- // was passendes gefunden?
- if( pEntry )
- {
- pGraphicObject = pEntry->pGraphicObject;
- aEntries.Remove( pEntry );
- aEntries.Insert( pEntry, (ULONG) 0 );
- rZoomPercent = pEntry->nZoom;
- }
-
- return pGraphicObject;
-}
-
void BitmapCache::Remove( const SdPage* pPage )
{
for( ULONG nPos = 0; nPos < aEntries.Count(); )
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 81e69f36300c..b32cd1fe023a 100644..100755
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -1,4 +1,4 @@
-/*************************************************************************
+ /*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -578,6 +578,8 @@ void DrawView::HideSdrPage()
void DrawView::DeleteMarked()
{
+ OSL_TRACE( "DrawView::DeleteMarked() - enter" );
+
sd::UndoManager* pUndoManager = mpDoc->GetUndoManager();
DBG_ASSERT( pUndoManager, "sd::DrawView::DeleteMarked(), ui action without undo manager!?" );
@@ -590,33 +592,60 @@ void DrawView::DeleteMarked()
}
SdPage* pPage = 0;
+ bool bResetLayout = false;
- const SdrMarkList& rList = GetMarkedObjectList();
- ULONG nMarkCount = rList.GetMarkCount();
- for (ULONG nMark = 0; nMark < nMarkCount; nMark++)
+ const ULONG nMarkCount = GetMarkedObjectList().GetMarkCount();
+ if( nMarkCount )
{
- SdrObject* pObj = rList.GetMark(nMark)->GetMarkedSdrObj();
- if( pObj && !pObj->IsEmptyPresObj() && pObj->GetUserCall() )
+ SdrMarkList aList( GetMarkedObjectList() );
+ for (ULONG nMark = 0; nMark < nMarkCount; nMark++)
{
- pPage = dynamic_cast< SdPage* >( pObj->GetPage() );
- PresObjKind ePresObjKind;
- if( pPage && ((ePresObjKind = pPage->GetPresObjKind(pObj)) != PRESOBJ_NONE))
+ SdrObject* pObj = aList.GetMark(nMark)->GetMarkedSdrObj();
+ if( pObj && !pObj->IsEmptyPresObj() && pObj->GetUserCall() )
{
- SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
- bool bVertical = pTextObj && pTextObj->IsVerticalWriting();
- Rectangle aRect( pObj->GetLogicRect() );
- pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true );
+ pPage = static_cast< SdPage* >( pObj->GetPage() );
+ PresObjKind ePresObjKind;
+ if( pPage && ((ePresObjKind = pPage->GetPresObjKind(pObj)) != PRESOBJ_NONE))
+ {
+ switch( ePresObjKind )
+ {
+ case PRESOBJ_GRAPHIC:
+ case PRESOBJ_OBJECT:
+ case PRESOBJ_CHART:
+ case PRESOBJ_ORGCHART:
+ case PRESOBJ_TABLE:
+ case PRESOBJ_CALC:
+ case PRESOBJ_IMAGE:
+ case PRESOBJ_MEDIA:
+ ePresObjKind = PRESOBJ_OUTLINE;
+ break;
+ default:
+ break;
+ }
+ SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
+ bool bVertical = pTextObj && pTextObj->IsVerticalWriting();
+ Rectangle aRect( pObj->GetLogicRect() );
+ SdrObject* pNewObj = pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true );
+
+ pPage->SetObjectOrdNum( pNewObj->GetOrdNum(), pObj->GetOrdNum() );
+
+ bResetLayout = true;
+
+ OSL_TRACE( "DrawView::InsertAutoLayoutShape() - InsertAutoLayoutShape" );
+ }
}
}
}
::sd::View::DeleteMarked();
- if( pPage )
+ if( pPage && bResetLayout )
pPage->SetAutoLayout( pPage->GetAutoLayout() );
if( pUndoManager )
pUndoManager->LeaveListAction();
+
+ OSL_TRACE( "DrawView::InsertAutoLayoutShape() - leave" );
}
} // end of namespace sd
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index bcff1c573b14..8b88be3682e3 100644..100755
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -32,6 +32,14 @@
#include <svx/svxids.hrc>
+#include <i18npool/mslangid.hxx>
+#include <editeng/ulspitem.hxx>
+#include <editeng/lspcitem.hxx>
+#include <editeng/adjitem.hxx>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/outliner.hxx>
+#include <editeng/unolingu.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
#include <editeng/adjitem.hxx>
@@ -39,6 +47,7 @@
#include <sfx2/app.hxx>
#include <svl/whiter.hxx>
#include <svl/itempool.hxx>
+#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/languageoptions.hxx>
#include <sfx2/tplpitem.hxx>
@@ -71,6 +80,8 @@
using namespace sd;
+using namespace ::com::sun::star;
+
#define TextObjectBar
#include "sdslots.hxx"
@@ -371,6 +382,26 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
break;
+ case SID_THES:
+ {
+ EditView & rEditView = mpView->GetTextEditOutlinerView()->GetEditView();;
+ String aStatusVal;
+ LanguageType nLang = LANGUAGE_NONE;
+ bool bIsLookUpWord = GetStatusValueForThesaurusFromContext( aStatusVal, nLang, rEditView );
+ rSet.Put( SfxStringItem( SID_THES, aStatusVal ) );
+
+ // disable "Thesaurus" context menu entry if there is nothing to look up
+ lang::Locale aLocale( SvxCreateLocale( nLang ) );
+ uno::Reference< linguistic2::XThesaurus > xThes( LinguMgr::GetThesaurus() );
+ if (!bIsLookUpWord ||
+ !xThes.is() || nLang == LANGUAGE_NONE || !xThes->hasLocale( aLocale ))
+ rSet.DisableItem( SID_THES );
+
+ //! avoid puting the same item as SfxBoolItem at the end of this function
+ nSlotId = 0;
+ }
+ break;
+
default:
break;
}
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 4ca26501fedb..4a6d83e376e7 100644..100755
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -30,8 +30,12 @@
#include "TextObjectBar.hxx"
+
#include <svx/svxids.hrc>
+#include <editeng/editview.hxx>
+#include <editeng/editeng.hxx>
+#include <editeng/unolingu.hxx>
#include <editeng/outliner.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/lspcitem.hxx>
@@ -331,6 +335,16 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
break;
+ case SID_THES:
+ {
+ String aReplaceText;
+ SFX_REQUEST_ARG( rReq, pItem2, SfxStringItem, SID_THES, sal_False );
+ if (pItem2)
+ aReplaceText = pItem2->GetValue();
+ if (aReplaceText.Len() > 0)
+ ReplaceTextWithSynonym( pOLV->GetEditView(), aReplaceText );
+ }
+ break;
default:
{
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 55ba07c3fa23..98d0b7551705 100644..100755
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -68,6 +68,8 @@
#include <svx/dialogs.hrc>
+#include "view/viewoverlaymanager.hxx"
+
#include "glob.hrc"
#include "app.hrc"
#include "res_bmp.hrc"
@@ -92,7 +94,6 @@
#include "slideshow.hxx"
#include "optsitem.hxx"
#include "fusearch.hxx"
-#include "fuspell.hxx"
#include "Outliner.hxx"
#include "AnimationChildWindow.hxx"
#include "SdUnoDrawView.hxx"
@@ -314,6 +315,7 @@ void DrawViewShell::SetZoom( long nZoom )
ViewShell::SetZoom( nZoom );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
+ mpViewOverlayManager->onZoomChanged();
}
/*************************************************************************
@@ -327,6 +329,7 @@ void DrawViewShell::SetZoomRect( const Rectangle& rZoomRect )
ViewShell::SetZoomRect( rZoomRect );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOM );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_ZOOMSLIDER );
+ mpViewOverlayManager->onZoomChanged();
}
/*************************************************************************
@@ -1240,6 +1243,7 @@ BOOL DrawViewShell::SwitchPage(USHORT nSelectedPage)
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);
UpdatePreview( mpActualPage );
mpDrawView->AdjustMarkHdl();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index aa1a0f53c15a..3102dc726a61 100644..100755
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -105,48 +105,6 @@ namespace sd {
/*************************************************************************
|*
-|* modal dialog for #90356#
-|*
-\************************************************************************/
-
-class ImpUndoDeleteWarning : public ModalDialog
-{
-private:
- FixedImage maImage;
- FixedText maWarningFT;
- CheckBox maDisableCB;
- OKButton maYesBtn;
- CancelButton maNoBtn;
-
-public:
- ImpUndoDeleteWarning(Window* pParent);
- BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); }
-};
-
-ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent)
-: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)),
- maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)),
- maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)),
- maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)),
- maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)),
- maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO))
-{
- FreeResource();
-
- SetHelpId( HID_SD_UNDODELETEWARNING_DLG );
- maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX );
-
- maYesBtn.SetText(Button::GetStandardText(BUTTON_YES));
- maNoBtn.SetText(Button::GetStandardText(BUTTON_NO));
- maImage.SetImage(WarningBox::GetStandardImage());
-
- // #93721# Set focus to YES-Button
- maYesBtn.GrabFocus();
-}
-
-
-/*************************************************************************
-|*
|* SfxRequests fuer temporaere Funktionen
|*
\************************************************************************/
@@ -425,18 +383,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_ASSIGN_LAYOUT:
{
- if (mePageKind==PK_STANDARD
- || mePageKind==PK_NOTES
- || (mePageKind==PK_HANDOUT && meEditMode==EM_MASTERPAGE))
+ if (mePageKind==PK_STANDARD || mePageKind==PK_NOTES || (mePageKind==PK_HANDOUT && meEditMode==EM_MASTERPAGE))
{
if ( mpDrawView->IsTextEdit() )
mpDrawView->SdrEndTextEdit();
- SFX_REQUEST_ARG (rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE, FALSE);
- SFX_REQUEST_ARG (rReq, pWhatLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
- ::sd::ViewShell::mpImpl->AssignLayout (
- GetDoc()->GetSdPage((USHORT)pWhatPage->GetValue(), mePageKind),
- (AutoLayout)pWhatLayout->GetValue());
+ ::sd::ViewShell::mpImpl->AssignLayout(rReq, mePageKind);
}
Cancel();
rReq.Done ();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 852e56096a76..28f8d909031b 100644..100755
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -90,6 +90,7 @@
#include "DrawDocShell.hxx"
#include "sdabstdlg.hxx"
#include <sfx2/ipclient.hxx>
+#include <tools/diagnose_ex.h>
#include "ViewShellBase.hxx"
#include "FormShellManager.hxx"
#include "LayerTabBar.hxx"
@@ -413,7 +414,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
catch (RuntimeException&)
{
- DBG_ASSERT(false, "caught exception while handline SID_RELOAD");
+ DBG_UNHANDLED_EXCEPTION();
}
// We have to return immediately to avoid accessing this object.
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 4dd3c61556e1..681192ff351b 100644..100755
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -81,7 +81,6 @@
#include "FrameView.hxx"
#include "Window.hxx"
#include "DrawDocShell.hxx"
-#include "TaskPaneViewShell.hxx"
#include "framework/FrameworkHelper.hxx"
namespace sd {
@@ -193,32 +192,6 @@ void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
/*************************************************************************
|*
-|* SfxRequests fuer Objektpalette bearbeiten
-|*
-\************************************************************************/
-
-void DrawViewShell::ExecObjPalette( SfxRequest& )
-{
- // Diese Methode muss erhalten bleiben, bis
- // der/die Slots entfernt wurden;
- // ==> Voll-Update
-}
-
-/*************************************************************************
-|*
-|* Statuswerte fuer Objektpalette zurueckgeben
-|*
-\************************************************************************/
-
-void DrawViewShell::GetObjPaletteState(SfxItemSet& )
-{
- // Diese Methode muss erhalten bleiben, bis
- // der/die Slots entfernt wurden;
- // ==> Voll-Update
-}
-
-/*************************************************************************
-|*
|* SfxRequests fuer Animator bearbeiten
|*
\************************************************************************/
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index e0cb78095bd0..e853d3944ce0 100644..100755
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -294,6 +294,26 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
GetMenuStateSel(rSet);
+ if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT))
+ {
+ bool bDisable = true;
+ if( pPageView )
+ {
+ SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
+
+ if( pPage )
+ {
+ rSet.Put( SfxUInt32Item( SID_ASSIGN_LAYOUT, static_cast< sal_uInt32 >(pPage->GetAutoLayout()) ) );
+ bDisable = false;
+ }
+ }
+
+ if(bDisable)
+ {
+ rSet.DisableItem(SID_EXPAND_PAGE);
+ }
+ }
+
if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_EXPAND_PAGE))
{
bool bDisable = true;
@@ -342,6 +362,26 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
}
+ if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT))
+ {
+ bool bDisable = true;
+ if( pPageView )
+ {
+ SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() );
+
+ if( pPage && !pPage->IsMasterPage() )
+ {
+ rSet.Put( SfxUInt32Item(SID_ASSIGN_LAYOUT, pPage->GetAutoLayout()) );
+ bDisable = false;
+ }
+ }
+
+ if(bDisable)
+ {
+ rSet.DisableItem(SID_ASSIGN_LAYOUT);
+ }
+ }
+
// Starten der Praesentation moeglich?
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) ||
SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) )
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index 54cd0c792c94..54cd0c792c94 100644..100755
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 4d30831f4e2a..3628a11ac5a1 100644..100755
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -62,6 +62,7 @@
#include <svtools/cliplistener.hxx>
#include <svx/float3d.hxx>
+#include "view/viewoverlaymanager.hxx"
#include "app.hrc"
#include "helpids.h"
#include "strings.hrc"
@@ -150,28 +151,14 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
/*************************************************************************
|*
-|* Copy-Konstruktor
-|*
-\************************************************************************/
-
-DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ::Window* pParentWindow, const DrawViewShell& rShell )
-: ViewShell(pFrame, pParentWindow, rShell)
-, maTabControl(this, pParentWindow)
-, mbIsInSwitchPage(false)
-{
- mpFrameView = new FrameView(GetDoc());
- Construct (GetDocSh(), PK_STANDARD);
-}
-
-/*************************************************************************
-|*
|* Destruktor
|*
\************************************************************************/
DrawViewShell::~DrawViewShell()
{
- mpAnnotationManager.release();
+ mpAnnotationManager.reset();
+ mpViewOverlayManager.reset();
OSL_ASSERT (GetViewShell()!=NULL);
@@ -416,6 +403,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
}
mpAnnotationManager.reset( new AnnotationManager( GetViewShellBase() ) );
+ mpViewOverlayManager.reset( new ViewOverlayManager( GetViewShellBase() ) );
}
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 1a667b28f6d4..6f6f49fdc93c 100644..100755
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -31,7 +31,8 @@
#include <com/sun/star/presentation/XPresentation2.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/i18n/TransliterationModules.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <comphelper/processfactory.hxx>
@@ -1401,6 +1402,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
}
break;
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ case SID_TRANSLITERATE_TITLE_CASE:
+ case SID_TRANSLITERATE_TOGGLE_CASE:
case SID_TRANSLITERATE_UPPER:
case SID_TRANSLITERATE_LOWER:
case SID_TRANSLITERATE_HALFWIDTH:
@@ -1416,6 +1420,15 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
switch( nSId )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nType = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nType = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nType = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nType = TransliterationModules_LOWERCASE_UPPERCASE;
break;
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 0a5f743bb738..ac6b46f3018b 100644..100755
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -250,6 +250,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
GetViewFrame()->GetBindings().SetVisibleState( SID_TRANSLITERATE_KATAGANA, sal_True );
}
+ rSet.DisableItem( SID_TRANSLITERATE_SENTENCE_CASE );
+ rSet.DisableItem( SID_TRANSLITERATE_TITLE_CASE );
+ rSet.DisableItem( SID_TRANSLITERATE_TOGGLE_CASE );
rSet.DisableItem( SID_TRANSLITERATE_UPPER );
rSet.DisableItem( SID_TRANSLITERATE_LOWER );
rSet.DisableItem( SID_TRANSLITERATE_HALFWIDTH );
diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index a8b2d0814c3e..76590dd45003 100644..100755
--- a/sd/source/ui/view/drvwshrg.cxx
+++ b/sd/source/ui/view/drvwshrg.cxx
@@ -106,6 +106,7 @@ SFX_IMPL_INTERFACE(GraphicViewShell, SfxShell, SdResId(STR_DRAWVIEWSHELL)) //SOH
{
SFX_POPUPMENU_REGISTRATION( SdResId(RID_DRAW_TEXTOBJ_INSIDE_POPUP) );
SFX_CHILDWINDOW_CONTEXT_REGISTRATION( SID_NAVIGATOR );
+ SFX_CHILDWINDOW_REGISTRATION( SID_TASKPANE );
SFX_CHILDWINDOW_REGISTRATION( SfxTemplateDialogWrapper::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SvxFontWorkChildWindow::GetChildWindowId() );
SFX_CHILDWINDOW_REGISTRATION( SvxColorChildWindow::GetChildWindowId() );
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 1c22348f8b87..646a437c42bf 100644..100755
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -61,24 +61,6 @@ GraphicViewShell::GraphicViewShell (
ConstructGraphicViewShell();
}
-/*************************************************************************
-|*
-|* Copy-Konstruktor
-|*
-\************************************************************************/
-
-GraphicViewShell::GraphicViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const DrawViewShell& rShell)
- : DrawViewShell (pFrame, pParentWindow, rShell)
-{
- ConstructGraphicViewShell();
-}
-
-
-
-
GraphicViewShell::~GraphicViewShell (void)
{
}
diff --git a/sd/source/ui/view/makefile.mk b/sd/source/ui/view/makefile.mk
index 3b3bca4ff3d5..0ee8280d3fad 100644
--- a/sd/source/ui/view/makefile.mk
+++ b/sd/source/ui/view/makefile.mk
@@ -53,6 +53,7 @@ SLOFILES = \
$(SLO)$/sdview2.obj \
$(SLO)$/sdview3.obj \
$(SLO)$/sdview4.obj \
+ $(SLO)$/sdview5.obj \
$(SLO)$/viewshel.obj \
$(SLO)$/viewshe2.obj \
$(SLO)$/viewshe3.obj \
@@ -84,7 +85,6 @@ SLOFILES = \
$(SLO)$/presvish.obj \
$(SLO)$/outlview.obj \
$(SLO)$/tabcontr.obj \
- $(SLO)$/showview.obj \
$(SLO)$/bmcache.obj \
$(SLO)$/drbezob.obj \
$(SLO)$/drtxtob.obj \
@@ -113,7 +113,8 @@ SLOFILES = \
$(SLO)$/ViewShellManager.obj \
$(SLO)$/ViewShellHint.obj \
$(SLO)$/ViewTabBar.obj \
- $(SLO)$/WindowUpdater.obj
+ $(SLO)$/WindowUpdater.obj \
+ $(SLO)$/viewoverlaymanager.obj
# --- Tagets -------------------------------------------------------
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 2acf143ff0b3..2acf143ff0b3 100644..100755
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 1467e6c24bd0..955a9d167b49 100644..100755
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -59,7 +59,8 @@
#include <svx/svdorect.hxx>
#include <sot/formats.hxx>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
-#include <com/sun/star/i18n/TransliterationModules.hdl>
+#include <com/sun/star/i18n/TransliterationModules.hpp>
+#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
#include <editeng/unolingu.hxx>
#include <comphelper/processfactory.hxx>
#include <editeng/outlobj.hxx>
@@ -235,31 +236,6 @@ OutlineViewShell::OutlineViewShell (
Construct(GetDocSh());
}
-
-/*************************************************************************
-|*
-|* Copy-Konstruktor
-|*
-\************************************************************************/
-
-OutlineViewShell::OutlineViewShell (
- SfxViewFrame* pFrame,
- ::Window* pParentWindow,
- const OutlineViewShell& rShell)
- : ViewShell (pFrame, pParentWindow, rShell),
- pOlView(NULL),
- pLastPage( NULL ),
- pClipEvtLstnr(NULL),
- bPastePossible(FALSE),
- mbInitialized(false)
-
-{
- mpFrameView = new FrameView(GetDoc());
- mpFrameView->Connect();
-
- Construct(GetDocSh());
-}
-
/*************************************************************************
|*
|* Destruktor
@@ -528,6 +504,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
std::auto_ptr< OutlineViewModelChangeGuard > aGuard;
if( pOlView && (
+ (nSlot == SID_TRANSLITERATE_SENTENCE_CASE) ||
+ (nSlot == SID_TRANSLITERATE_TITLE_CASE) ||
+ (nSlot == SID_TRANSLITERATE_TOGGLE_CASE) ||
(nSlot == SID_TRANSLITERATE_UPPER) ||
(nSlot == SID_TRANSLITERATE_LOWER) ||
(nSlot == SID_TRANSLITERATE_HALFWIDTH) ||
@@ -661,6 +640,9 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
}
break;
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ case SID_TRANSLITERATE_TITLE_CASE:
+ case SID_TRANSLITERATE_TOGGLE_CASE:
case SID_TRANSLITERATE_UPPER:
case SID_TRANSLITERATE_LOWER:
case SID_TRANSLITERATE_HALFWIDTH:
@@ -676,6 +658,15 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
switch( nSlot )
{
+ case SID_TRANSLITERATE_SENTENCE_CASE:
+ nType = TransliterationModulesExtra::SENTENCE_CASE;
+ break;
+ case SID_TRANSLITERATE_TITLE_CASE:
+ nType = TransliterationModulesExtra::TITLE_CASE;
+ break;
+ case SID_TRANSLITERATE_TOGGLE_CASE:
+ nType = TransliterationModulesExtra::TOGGLE_CASE;
+ break;
case SID_TRANSLITERATE_UPPER:
nType = TransliterationModules_LOWERCASE_UPPERCASE;
break;
@@ -988,7 +979,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
GetDoc()->SetChanged(TRUE);
}
- // Da berladen, muss hier der Status gesetzt werden
+ // Da �berladen, muss hier der Status gesetzt werden
if( !GetDocSh()->IsModified() )
{
rSet.DisableItem( SID_SAVEDOC );
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 30daec8b636e..dfad4b34c6f2 100644..100755
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -2040,6 +2040,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
return 0;
}
+#if 0
sal_Int32 OutlineView::GetPageNumberWidthPixel()
{
Window* pActWin = mpOutlineViewShell->GetActiveWindow();
@@ -2062,6 +2063,7 @@ sal_Int32 OutlineView::GetPageNumberWidthPixel()
}
return mnPageNumberWidthPixel;
}
+#endif
// --------------------------------------------------------------------
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 813c6caba95a..3aed9c6c0d9c 100644..100755
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -969,89 +969,6 @@ void View::SetMarkedOriginalSize()
delete pUndoGroup;
}
-/** create a virtual device and paints the slide contents into it.
- The caller must delete the returned device */
-VirtualDevice* View::CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel)
-{
- ViewShell* pViewShell = mpDocSh->GetViewShell();
- OutputDevice* pRefDevice = 0;
- if( pViewShell )
- pRefDevice = pViewShell->GetActiveWindow();
-
- if( !pRefDevice )
- pRefDevice = Application::GetDefaultDevice();
-
- DBG_ASSERT( pRefDevice, "sd::View::CreatePageVDev(), I need a reference device to work properly!" );
-
- VirtualDevice* pVDev;
- if( pRefDevice )
- pVDev = new VirtualDevice( *pRefDevice );
- else
- pVDev = new VirtualDevice();
-
- MapMode aMM( MAP_100TH_MM );
-
- SdPage* pPage = mpDoc->GetSdPage(nSdPage, ePageKind);
- DBG_ASSERT(pPage, "sd::View::CreatePageVDev(), slide not found!");
-
- if( pPage )
- {
- Size aPageSize(pPage->GetSize());
- aPageSize.Width() -= pPage->GetLftBorder();
- aPageSize.Width() -= pPage->GetRgtBorder();
- aPageSize.Height() -= pPage->GetUppBorder();
- aPageSize.Height() -= pPage->GetLwrBorder();
-
- // use scaling?
- if( nWidthPixel )
- {
- const Fraction aFrac( (long) nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() );
-
- aMM.SetScaleX( aFrac );
- aMM.SetScaleY( aFrac );
- }
-
- pVDev->SetMapMode( aMM );
- if( pVDev->SetOutputSize(aPageSize) )
- {
- std::auto_ptr< SdrView > pView( new SdrView(mpDoc, pVDev) );
- pView->SetPageVisible( FALSE );
- pView->SetBordVisible( FALSE );
- pView->SetGridVisible( FALSE );
- pView->SetHlplVisible( FALSE );
- pView->SetGlueVisible( FALSE );
- pView->ShowSdrPage(pPage); // WAITING FOR SJ , Point(-pPage->GetLftBorder(), -pPage->GetUppBorder()));
- SdrPageView* pPageView = pView->GetSdrPageView();
- if( pViewShell )
- {
- FrameView* pFrameView = pViewShell->GetFrameView();
- if( pFrameView )
- {
- pPageView->SetVisibleLayers( pFrameView->GetVisibleLayers() );
- pPageView->SetLockedLayers( pFrameView->GetLockedLayers() );
- pPageView->SetPrintableLayers( pFrameView->GetPrintableLayers() );
- }
- }
-
- // SJ: i40609, the vdev mapmode seems to be dangled after CompleteRedraw,
- // so we are pushing here, because the mapmode is used afterwards
- pVDev->Push();
-
- Point aPoint( 0, 0 );
- Region aRegion (Rectangle( aPoint, aPageSize ) );
- pView->CompleteRedraw(pVDev, aRegion);
- pVDev->Pop();
- }
- else
- {
- DBG_ERROR("sd::View::CreatePageVDev(), virt. device creation failed!");
- }
- }
- return pVDev;
-}
-
-
-
/*************************************************************************
|*
|* OLE-Obj am Client connecten
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 44e5127bfb25..9fbe223c276a 100644..100755
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -114,11 +114,25 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if( mnAction == DND_ACTION_LINK && pPickObj && pPV )
{
- if( pPickObj->ISA( SdrGrafObj ) )
+ const bool bIsGraphic = pPickObj->ISA( SdrGrafObj );
+ if( bIsGraphic || pObj->IsEmptyPresObj() )
{
- // Das Objekt wird mit der Bitmap gefuellt
- pNewGrafObj = (SdrGrafObj*) pPickObj->Clone();
- pNewGrafObj->SetGraphic(rGraphic);
+ if( IsUndoEnabled() )
+ BegUndo(String(SdResId(STR_INSERTGRAPHIC)));
+
+ SdPage* pPage = (SdPage*) pPickObj->GetPage();
+
+ if( bIsGraphic )
+ {
+ // Das Objekt wird mit der Bitmap gefuellt
+ pNewGrafObj = (SdrGrafObj*) pPickObj->Clone();
+ pNewGrafObj->SetGraphic(rGraphic);
+ }
+ else
+ {
+ pNewGrafObj = new SdrGrafObj( rGraphic, pPickObj->GetLogicRect() );
+ pNewGrafObj->SetEmptyPresObj(TRUE);
+ }
if ( pNewGrafObj->IsEmptyPresObj() )
{
@@ -128,28 +142,11 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
pNewGrafObj->SetEmptyPresObj(FALSE);
}
- const bool bUndo = IsUndoEnabled();
- if( bUndo )
- BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
-
- SdPage* pPage = (SdPage*) pPickObj->GetPage();
-
- if (pPage && pPage->GetPresObjKind(pPickObj) == PRESOBJ_GRAPHIC)
+ if (pPage && pPage->IsPresObj(pPickObj))
{
// Neues PresObj in die Liste eintragen
+ pPage->InsertPresObj( pNewGrafObj, PRESOBJ_GRAPHIC );
pNewGrafObj->SetUserCall(pPickObj->GetUserCall());
- if( bUndo )
- {
- AddUndo( new sd::UndoObjectPresentationKind( *pPickObj ) );
- AddUndo( new sd::UndoObjectPresentationKind( *pNewGrafObj ) );
- }
- pPage->RemovePresObj(pPickObj);
- pPage->InsertPresObj(pNewGrafObj, PRESOBJ_GRAPHIC);
-
- if( !bUndo )
- {
- SdrObject::Free( pPickObj );
- }
}
if (pImageMap)
@@ -157,7 +154,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
ReplaceObjectAtView(pPickObj, *pPV, pNewGrafObj); // maybe ReplaceObjectAtView
- if( bUndo )
+ if( IsUndoEnabled() )
EndUndo();
}
else if (pPickObj->IsClosedObj() && !pPickObj->ISA(SdrOle2Obj))
@@ -295,7 +292,7 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc
SdrMediaObj* pNewMediaObj = NULL;
SdrPageView* pPV = GetSdrPageView();
- SdrObject* pPickObj = NULL;
+ SdrObject* pPickObj = GetEmptyPresentationObject( PRESOBJ_MEDIA );
if(pPV && this->ISA(::sd::slidesorter::view::SlideSorterView ))
{
@@ -320,10 +317,37 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc
}
else if( pPV )
{
- pNewMediaObj = new SdrMediaObj( Rectangle( rPos, rSize ) );
+ Rectangle aRect( rPos, rSize );
+ if( pPickObj )
+ aRect = pPickObj->GetLogicRect();
+
+
+ pNewMediaObj = new SdrMediaObj( aRect );
+
+ bool bIsPres = false;
+ if( pPickObj )
+ {
+ SdPage* pPage = static_cast< SdPage* >(pPickObj->GetPage());
+ bIsPres = pPage && pPage->IsPresObj(pPickObj);
+ if( bIsPres )
+ {
+ pPage->InsertPresObj( pNewMediaObj, PRESOBJ_MEDIA );
+ }
+ }
- if( pPV && InsertObjectAtView( pNewMediaObj, *pPV, SDRINSERT_SETDEFLAYER ) )
- pNewMediaObj->setURL( rMediaURL );
+ if( pPickObj )
+ ReplaceObjectAtView(pPickObj, *pPV, pNewMediaObj);
+ else
+ InsertObjectAtView( pNewMediaObj, *pPV, SDRINSERT_SETDEFLAYER );
+
+ pNewMediaObj->setURL( rMediaURL );
+
+ if( pPickObj )
+ {
+ pNewMediaObj->AdjustToMaxRect( pPickObj->GetLogicRect() );
+ if( bIsPres )
+ pNewMediaObj->SetUserCall(pPickObj->GetUserCall());
+ }
}
rAction = mnAction;
@@ -599,11 +623,6 @@ void View::LockRedraw(BOOL bLock)
-bool View::IsRedrawLocked (void) const
-{
- return mnLockRedrawSmph>0;
-}
-
/*************************************************************************
|*
|* StyleSheet aus der Sleketion besorgen
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
new file mode 100755
index 000000000000..156544c235ab
--- /dev/null
+++ b/sd/source/ui/view/sdview5.cxx
@@ -0,0 +1,114 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include "sdpage.hxx"
+#include "View.hxx"
+#include "pres.hxx"
+
+namespace sd {
+
+static bool implIsMultiPresObj( PresObjKind eKind )
+{
+ switch( eKind )
+ {
+ case PRESOBJ_OUTLINE:
+ case PRESOBJ_GRAPHIC:
+ case PRESOBJ_OBJECT:
+ case PRESOBJ_CHART:
+ case PRESOBJ_ORGCHART:
+ case PRESOBJ_TABLE:
+ case PRESOBJ_IMAGE:
+ case PRESOBJ_MEDIA:
+ return true;
+ default:
+ return false;
+ }
+}
+
+SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind )
+{
+ SdrObject* pEmptyObj = 0;
+
+ SdrPageView* pPV = GetSdrPageView();
+ if( pPV )
+ {
+ SdPage* pPage = static_cast< SdPage* >( pPV->GetPage() );
+ if( pPage )
+ {
+ // first try selected shape
+ if ( AreObjectsMarked() )
+ {
+ /**********************************************************
+ * Is an empty graphic object available?
+ **********************************************************/
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+
+ if (rMarkList.GetMarkCount() == 1)
+ {
+ SdrMark* pMark = rMarkList.GetMark(0);
+ SdrObject* pObj = pMark->GetMarkedSdrObj();
+
+ if( pObj->IsEmptyPresObj() && implIsMultiPresObj( pPage->GetPresObjKind(pObj) ) )
+ pEmptyObj = pObj;
+ }
+ }
+
+ // try to find empty pres obj of same type
+ if( !pEmptyObj )
+ {
+ int nIndex = 1;
+ do
+ {
+ pEmptyObj = pPage->GetPresObj(eKind, nIndex++ );
+ }
+ while( (pEmptyObj != 0) && (!pEmptyObj->IsEmptyPresObj()) );
+ }
+
+ // last try to find empty pres obj of multiple type
+ if( !pEmptyObj )
+ {
+ const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
+
+ for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); iter++ )
+ {
+ if( (*iter)->IsEmptyPresObj() && implIsMultiPresObj(pPage->GetPresObjKind(*iter)) )
+ {
+ pEmptyObj = (*iter);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return pEmptyObj;
+}
+
+}
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 7cae5d452a1b..28873b3946a3 100644..100755
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -36,7 +36,6 @@
#include <svx/svxids.hrc>
#include <editeng/outliner.hxx>
-
#include <editeng/editview.hxx>
#include "app.hrc"
@@ -147,35 +146,6 @@ void Window::SetViewShell (ViewShell* pViewSh)
}
}
-
-
-
-/*************************************************************************
-|*
-|* Die Haelfte des Sichtbaren Bereich eines anderen Fensters darstellen
-|*
-\************************************************************************/
-
-void Window::ShareViewArea(Window* pOtherWin)
-{
- mpShareWin = pOtherWin;
- maViewOrigin = pOtherWin->maViewOrigin;
- maViewSize = pOtherWin->maViewSize;
- mnMinZoom = pOtherWin->mnMinZoom;
- mnMaxZoom = pOtherWin->mnMaxZoom;
- mbCenterAllowed = pOtherWin->mbCenterAllowed;
-
- long nZoom = pOtherWin->GetZoom();
- MapMode aMap(GetMapMode());
- aMap.SetScaleX(Fraction(nZoom, 100));
- aMap.SetScaleY(Fraction(nZoom, 100));
- aMap.SetOrigin(pOtherWin->GetMapMode().GetOrigin());
- SetMapMode(aMap);
-}
-
-
-
-
void Window::CalcMinZoom()
{
// Are we entitled to change the minimal zoom factor?
diff --git a/sd/source/ui/view/showview.cxx b/sd/source/ui/view/showview.cxx
deleted file mode 100644
index a60195eac1b8..000000000000
--- a/sd/source/ui/view/showview.cxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sd.hxx"
-
-#include "showview.hxx"
-#include <svx/svdmodel.hxx>
-#include <svx/fmview.hxx>
-
-
-#include "drawdoc.hxx"
-#include "sdpage.hxx"
-#include "ViewShell.hxx"
-#include "FrameView.hxx"
-
-namespace sd {
-
-#ifndef SO2_DECL_SVINPLACEOBJECT_DEFINED
-#define SO2_DECL_SVINPLACEOBJECT_DEFINED
-SO2_DECL_REF(SvInPlaceObject)
-#endif
-#ifndef SO2_DECL_SVINPLACECLIENT_DEFINED
-#define SO2_DECL_SVINPLACECLIENT_DEFINED
-SO2_DECL_REF(SvInPlaceClient)
-#endif
-
-/*************************************************************************
-|*
-|* der Konstruktor setzt den MapMode und arrangiert die einzelnen Seiten
-|*
-\************************************************************************/
-
-ShowView::ShowView (
- SdDrawDocument* pDoc,
- OutputDevice* pOut,
- ViewShell* pViewShell,
- ::Window* pWin)
- : FmFormView(pDoc, pOut),
- pDrDoc(pDoc),
- mpViewSh(pViewShell),
- pWindowForPlugIns(pWin),
- nAllowInvalidateSmph(0),
- bAllowMasterPageCaching(TRUE)
-{
- // #i73602# Use default from the configuration
- SetBufferedOverlayAllowed(getOptionsDrawinglayer().IsOverlayBuffer_DrawImpress());
-
- // #i74769#, #i75172# Use default from the configuration
- SetBufferedOutputAllowed(getOptionsDrawinglayer().IsPaintBuffer_DrawImpress());
-
- EnableExtendedKeyInputDispatcher(FALSE);
- EnableExtendedMouseEventDispatcher(FALSE);
- EnableExtendedCommandEventDispatcher(FALSE);
-}
-
-/*************************************************************************
-|*
-|* Destruktor
-|*
-\************************************************************************/
-
-ShowView::~ShowView()
-{
-}
-
-/*************************************************************************
-|*
-|* Zaehler fuer Invalidierungserlaubnis hoch- oder runter zaehlen
-|*
-\************************************************************************/
-
-void ShowView::SetAllowInvalidate(BOOL bFlag)
-{
- if (!bFlag)
- {
- nAllowInvalidateSmph++;
- }
- else if (nAllowInvalidateSmph > 0)
- {
- nAllowInvalidateSmph--;
- }
-}
-
-/*************************************************************************
-|*
-|* ermittelt, ob invalidiert werden darf
-|*
-\************************************************************************/
-
-BOOL ShowView::IsInvalidateAllowed() const
-{
- return (nAllowInvalidateSmph == 0);
-}
-
-/*************************************************************************
-|*
-|* Invalidate abfangen
-|*
-\************************************************************************/
-
-void ShowView::InvalidateOneWin (::Window& rWin)
-{
- if (IsInvalidateAllowed())
- {
- FmFormView::InvalidateOneWin(rWin);
- }
-}
-
-/*************************************************************************
-|*
-|* Invalidate abfangen
-|*
-\************************************************************************/
-
-void ShowView::InvalidateOneWin (::Window& rWin, const Rectangle& rRect)
-{
- if (IsInvalidateAllowed())
- {
- FmFormView::InvalidateOneWin(rWin, rRect);
- }
-}
-
-/*************************************************************************
-|*
-|* Paint-Methode: das Ereignis wird an die View weitergeleitet
-|*
-\************************************************************************/
-
-void ShowView::CompleteRedraw(OutputDevice* pOutDev, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/)
-{
- FmFormView::CompleteRedraw(pOutDev, rReg, pRedirector);
-}
-
-/*************************************************************************
-|*
-|* DoConnect
-|*
-\************************************************************************/
-
-void ShowView::DoConnect(SdrOle2Obj* )
-{
- // connected wird jetzt in FuSlideShow::ShowPlugIns()
-}
-
-} // end of namespace sd
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
new file mode 100755
index 000000000000..ab165eea600b
--- /dev/null
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -0,0 +1,609 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+
+#include "sddll.hxx"
+
+#include <com/sun/star/frame/XFrame.hpp>
+#include <sfx2/imagemgr.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/app.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include <tools/rcid.h>
+
+#include <vcl/help.hxx>
+#include <vcl/imagerepository.hxx>
+
+#include <svx/sdrpagewindow.hxx>
+#include <svx/sdrpaintwindow.hxx>
+#include <svx/sdr/overlay/overlayanimatedbitmapex.hxx>
+#include <svx/sdr/overlay/overlaybitmapex.hxx>
+#include <svx/sdr/overlay/overlaymanager.hxx>
+#include <svx/svxids.hrc>
+
+#include "view/viewoverlaymanager.hxx"
+
+#include "res_bmp.hrc"
+#include "DrawDocShell.hxx"
+#include "DrawViewShell.hxx"
+#include "DrawController.hxx"
+#include "glob.hrc"
+#include "strings.hrc"
+#include "sdresid.hxx"
+#include "EventMultiplexer.hxx"
+#include "ViewShellManager.hxx"
+#include "helpids.h"
+#include "sdpage.hxx"
+#include "drawdoc.hxx"
+#include "smarttag.hxx"
+
+using ::rtl::OUString;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::frame;
+
+namespace sd {
+
+class ImageButtonHdl;
+
+// --------------------------------------------------------------------
+
+BitmapEx ViewOverlayManager::maSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START];
+BitmapEx ViewOverlayManager::maLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START];
+
+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 BitmapEx loadImageResource( USHORT nId )
+{
+ SdResId aResId( nId );
+ aResId.SetRT( RSC_BITMAP );
+
+ return BitmapEx( aResId );
+}
+
+// --------------------------------------------------------------------
+
+const sal_uInt32 SMART_TAG_HDL_NUM = SAL_MAX_UINT32;
+
+class ChangePlaceholderTag : public SmartTag
+{
+ friend class ImageButtonHdl;
+public:
+ ChangePlaceholderTag( ViewOverlayManager& rManager, ::sd::View& rView, SdrObject& rPlaceholderObj );
+ virtual ~ChangePlaceholderTag();
+
+ /** returns true if the SmartTag handled the event. */
+ virtual bool MouseButtonDown( const MouseEvent&, SmartHdl& );
+
+ /** returns true if the SmartTag consumes this event. */
+ virtual bool KeyInput( const KeyEvent& rKEvt );
+
+ BitmapEx createOverlayImage( int nHighlight = -1 );
+
+protected:
+ virtual void addCustomHandles( SdrHdlList& rHandlerList );
+ virtual void disposing();
+ virtual void select();
+ virtual void deselect();
+
+private:
+ ViewOverlayManager& mrManager;
+ SdrObjectWeakRef mxPlaceholderObj;
+};
+
+class ImageButtonHdl : public SmartHdl
+{
+public:
+ ImageButtonHdl( const SmartTagReference& xTag, /* USHORT nSID, const Image& rImage, const Image& rImageMO, */ const Point& rPnt );
+ virtual ~ImageButtonHdl();
+ virtual void CreateB2dIAObject();
+ virtual BOOL IsFocusHdl() const;
+ virtual Pointer GetPointer() const;
+ virtual bool isMarkable() const;
+
+ virtual void onMouseEnter(const MouseEvent& rMEvt);
+ virtual void onMouseLeave();
+
+ int getHighlightId() const { return mnHighlightId; }
+
+ void HideTip();
+
+private:
+ rtl::Reference< ChangePlaceholderTag > mxTag;
+
+ int mnHighlightId;
+ Size maImageSize;
+ ULONG mnTip;
+};
+
+// --------------------------------------------------------------------
+
+ImageButtonHdl::ImageButtonHdl( const SmartTagReference& xTag /*, USHORT nSID, const Image& rImage, const Image& rImageMO*/, const Point& rPnt )
+: SmartHdl( xTag, rPnt )
+, mxTag( dynamic_cast< ChangePlaceholderTag* >( xTag.get() ) )
+, mnHighlightId( -1 )
+, maImageSize( 42, 42 )
+, mnTip( 0 )
+{
+}
+
+// --------------------------------------------------------------------
+
+ImageButtonHdl::~ImageButtonHdl()
+{
+ HideTip();
+}
+
+// --------------------------------------------------------------------
+
+void ImageButtonHdl::HideTip()
+{
+ if( mnTip )
+ {
+ Help::HideTip( mnTip );
+ mnTip = 0;
+ }
+}
+
+// --------------------------------------------------------------------
+
+extern ::rtl::OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const OUString& aCmdURL );
+
+void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt)
+{
+ int nHighlightId = 0;
+
+ if( pHdlList && pHdlList->GetView())
+ {
+ OutputDevice* pDev = pHdlList->GetView()->GetFirstOutputDevice();
+ if( pDev == 0 )
+ pDev = Application::GetDefaultDevice();
+
+ Point aMDPos( rMEvt.GetPosPixel() );
+ aMDPos -= pDev->LogicToPixel( GetPos() );
+
+ nHighlightId += aMDPos.X() > maImageSize.Width() ? 1 : 0;
+ nHighlightId += aMDPos.Y() > maImageSize.Height() ? 2 : 0;
+
+ if( mnHighlightId != nHighlightId )
+ {
+ HideTip();
+
+ mnHighlightId = nHighlightId;
+
+ if( pHdlList )
+ {
+ SdResId aResId( gButtonToolTips[mnHighlightId] );
+ aResId.SetRT( RSC_STRING );
+
+ String aHelpText( aResId );
+ Rectangle aScreenRect( pDev->LogicToPixel( GetPos() ), maImageSize );
+ mnTip = Help::ShowTip( static_cast< ::Window* >( pHdlList->GetView()->GetFirstOutputDevice() ), aScreenRect, aHelpText, 0 ) ;
+ }
+ Touch();
+ }
+ }
+}
+
+// --------------------------------------------------------------------
+
+void ImageButtonHdl::onMouseLeave()
+{
+ mnHighlightId = -1;
+ HideTip();
+ Touch();
+}
+
+// --------------------------------------------------------------------
+
+void ImageButtonHdl::CreateB2dIAObject()
+{
+ // first throw away old one
+ GetRidOfIAObject();
+
+ const Point aTagPos( GetPos() );
+ basegfx::B2DPoint aPosition( aTagPos.X(), aTagPos.Y() );
+
+ BitmapEx aBitmapEx( mxTag->createOverlayImage( mnHighlightId ) ); // maImageMO.GetBitmapEx() : maImage.GetBitmapEx() );
+ maImageSize = aBitmapEx.GetSizePixel();
+ maImageSize.Width() >>= 1;
+ maImageSize.Height() >>= 1;
+
+ if(pHdlList)
+ {
+ SdrMarkView* pView = pHdlList->GetView();
+
+ if(pView && !pView->areMarkHandlesHidden())
+ {
+ SdrPageView* pPageView = pView->GetSdrPageView();
+
+ if(pPageView)
+ {
+ for(sal_uInt32 b = 0; b < pPageView->PageWindowCount(); b++)
+ {
+ const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b);
+
+ SdrPaintWindow& rPaintWindow = rPageWindow.GetPaintWindow();
+ if(rPaintWindow.OutputToWindow() && rPageWindow.GetOverlayManager() )
+ {
+ ::sdr::overlay::OverlayObject* pOverlayObject = 0;
+
+ pOverlayObject = new ::sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 );
+ rPageWindow.GetOverlayManager()->add(*pOverlayObject);
+ maOverlayGroup.append(*pOverlayObject);
+ }
+ }
+ }
+ }
+ }
+}
+
+// --------------------------------------------------------------------
+
+BOOL ImageButtonHdl::IsFocusHdl() const
+{
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+bool ImageButtonHdl::isMarkable() const
+{
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+Pointer ImageButtonHdl::GetPointer() const
+{
+ return Pointer( POINTER_ARROW );
+}
+
+// ====================================================================
+
+ChangePlaceholderTag::ChangePlaceholderTag( ViewOverlayManager& rManager, ::sd::View& rView, SdrObject& rPlaceholderObj )
+: SmartTag( rView )
+, mrManager( rManager )
+, mxPlaceholderObj( &rPlaceholderObj )
+{
+}
+
+// --------------------------------------------------------------------
+
+ChangePlaceholderTag::~ChangePlaceholderTag()
+{
+}
+
+// --------------------------------------------------------------------
+
+/** returns true if the ChangePlaceholderTag handled the event. */
+bool ChangePlaceholderTag::MouseButtonDown( const MouseEvent& /*rMEvt*/, SmartHdl& rHdl )
+{
+ int nHighlightId = static_cast< ImageButtonHdl& >(rHdl).getHighlightId();
+ if( nHighlightId >= 0 )
+ {
+ USHORT nSID = gButtonSlots[nHighlightId];
+
+ if( mxPlaceholderObj.get() )
+ {
+ // mark placeholder if it is not currently marked (or if also others are marked)
+ if( !mrView.IsObjMarked( mxPlaceholderObj.get() ) || (mrView.GetMarkedObjectList().GetMarkCount() != 1) )
+ {
+ SdrPageView* pPV = mrView.GetSdrPageView();
+ mrView.UnmarkAllObj(pPV );
+ mrView.MarkObj(mxPlaceholderObj.get(), pPV, FALSE);
+ }
+ }
+
+ mrView.GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( nSID, SFX_CALLMODE_ASYNCHRON);
+ }
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+/** returns true if the SmartTag consumes this event. */
+bool ChangePlaceholderTag::KeyInput( const KeyEvent& rKEvt )
+{
+ USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ switch( nCode )
+ {
+ case KEY_DOWN:
+ case KEY_UP:
+ case KEY_LEFT:
+ case KEY_RIGHT:
+ case KEY_ESCAPE:
+ case KEY_TAB:
+ case KEY_RETURN:
+ case KEY_SPACE:
+ default:
+ return false;
+ }
+}
+
+// --------------------------------------------------------------------
+
+BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight )
+{
+ BitmapEx aRet;
+ if( mxPlaceholderObj.is() )
+ {
+ SdrObject* pPlaceholder = mxPlaceholderObj.get();
+ SmartTagReference xThis( this );
+ const Rectangle& rSnapRect = pPlaceholder->GetSnapRect();
+ const Point aPoint;
+
+ OutputDevice* pDev = mrView.GetFirstOutputDevice();
+ if( pDev == 0 )
+ pDev = Application::GetDefaultDevice();
+
+ Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
+ long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height());
+
+ BitmapEx* pImages = (nShapeSizePix > 250) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
+
+ Size aSize( pImages->GetSizePixel() );
+
+ aRet.SetSizePixel( Size( aSize.Width() << 1, aSize.Height() << 1 ) );
+
+ const Rectangle aRectSrc( Point( 0, 0 ), aSize );
+
+ aRet = pImages[(nHighlight == 0) ? 4 : 0];
+ aRet.Expand( aSize.Width(), aSize.Height(), NULL, TRUE );
+
+ aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, &pImages[(nHighlight == 1) ? 5 : 1] );
+ aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, &pImages[(nHighlight == 2) ? 6 : 2] );
+ aRet.CopyPixel( Rectangle( Point( aSize.Width(), aSize.Height() ), aSize ), aRectSrc, &pImages[(nHighlight == 3) ? 7 : 3] );
+ }
+
+ return aRet;
+}
+
+void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList )
+{
+ if( mxPlaceholderObj.is() )
+ {
+ SdrObject* pPlaceholder = mxPlaceholderObj.get();
+ SmartTagReference xThis( this );
+ const Rectangle& rSnapRect = pPlaceholder->GetSnapRect();
+ const Point aPoint;
+
+ OutputDevice* pDev = mrView.GetFirstOutputDevice();
+ if( pDev == 0 )
+ pDev = Application::GetDefaultDevice();
+
+ Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
+ long nShapeSizePix = std::min(aShapeSizePix.Width(),aShapeSizePix.Height());
+ if( 50 > nShapeSizePix )
+ return;
+
+ BitmapEx* pImages = (nShapeSizePix > 250) ? &ViewOverlayManager::maLargeButtonImages[0] : &ViewOverlayManager::maSmallButtonImages[0];
+
+ Size aButtonSize( pDev->PixelToLogic(pImages[0].GetSizePixel()) );
+
+ const int nColumns = 2;
+ const int nRows = 2;
+
+ long all_width = nColumns * aButtonSize.Width();
+ long all_height = nRows * aButtonSize.Height();
+
+ Point aPos( rSnapRect.Center() );
+ aPos.X() -= all_width >> 1;
+ aPos.Y() -= all_height >> 1;
+
+ ImageButtonHdl* pHdl = new ImageButtonHdl( xThis, aPoint );
+ pHdl->SetObjHdlNum( SMART_TAG_HDL_NUM );
+ pHdl->SetPageView( mrView.GetSdrPageView() );
+
+ pHdl->SetPos( aPos );
+
+ rHandlerList.AddHdl( pHdl );
+ }
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::disposing()
+{
+ SmartTag::disposing();
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::select()
+{
+ SmartTag::select();
+}
+
+// --------------------------------------------------------------------
+
+void ChangePlaceholderTag::deselect()
+{
+ SmartTag::deselect();
+}
+
+// --------------------------------------------------------------------
+
+ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
+: mrBase( rViewShellBase )
+, mnUpdateTagsEvent( 0 )
+{
+ Link aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
+ mrBase.GetEventMultiplexer()->AddEventListener(aLink, tools::EventMultiplexerEvent::EID_CURRENT_PAGE
+ | tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED
+ | tools::EventMultiplexerEvent::EID_VIEW_ADDED
+ | tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT
+ | tools::EventMultiplexerEvent::EID_END_TEXT_EDIT );
+
+ StartListening( *mrBase.GetDocShell() );
+}
+
+// --------------------------------------------------------------------
+
+ViewOverlayManager::~ViewOverlayManager()
+{
+ Link aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
+ mrBase.GetEventMultiplexer()->RemoveEventListener( aLink );
+
+ if( mnUpdateTagsEvent )
+ {
+ Application::RemoveUserEvent( mnUpdateTagsEvent );
+ mnUpdateTagsEvent = 0;
+ }
+
+ DisposeTags();
+}
+
+// --------------------------------------------------------------------
+
+void ViewOverlayManager::UpdateImages()
+{
+ for( sal_uInt16 i = 0; i < (BMP_PLACEHOLDER_SMALL_END-BMP_PLACEHOLDER_SMALL_START); i++ )
+ {
+ maSmallButtonImages[i] = loadImageResource( BMP_PLACEHOLDER_SMALL_START + i );
+ maLargeButtonImages[i] = loadImageResource( BMP_PLACEHOLDER_LARGE_START + i );
+ }
+}
+
+// --------------------------------------------------------------------
+
+void ViewOverlayManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
+{
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pSimpleHint != NULL)
+ {
+ if (pSimpleHint->GetId() == SFX_HINT_DOCCHANGED)
+ {
+ UpdateTags();
+ }
+ }
+}
+
+void ViewOverlayManager::onZoomChanged()
+{
+ if( !maTagVector.empty() )
+ {
+ UpdateTags();
+ }
+}
+
+void ViewOverlayManager::UpdateTags()
+{
+ if( !mnUpdateTagsEvent )
+ mnUpdateTagsEvent = Application::PostUserEvent( LINK( this, ViewOverlayManager, UpdateTagsHdl ) );
+}
+
+IMPL_LINK(ViewOverlayManager,UpdateTagsHdl, void *, EMPTYARG)
+{
+ OSL_TRACE("ViewOverlayManager::UpdateTagsHdl");
+
+ mnUpdateTagsEvent = 0;
+ bool bChanges = DisposeTags();
+ bChanges |= CreateTags();
+
+ if( bChanges && mrBase.GetDrawView() )
+ static_cast< ::sd::View* >( mrBase.GetDrawView() )->updateHandles();
+ return 0;
+}
+
+bool ViewOverlayManager::CreateTags()
+{
+ bool bChanges = false;
+
+ SdPage* pPage = mrBase.GetMainViewShell()->getCurrentPage();
+
+ if( pPage )
+ {
+ if( !maSmallButtonImages[0] )
+ UpdateImages();
+
+ const std::list< SdrObject* >& rShapes = pPage->GetPresentationShapeList().getList();
+
+ for( std::list< SdrObject* >::const_iterator iter( rShapes.begin() ); iter != rShapes.end(); iter++ )
+ {
+ if( (*iter)->IsEmptyPresObj() && ((*iter)->GetObjIdentifier() == OBJ_OUTLINETEXT) && (mrBase.GetDrawView()->GetTextEditObject() != (*iter)) )
+ {
+ rtl::Reference< SmartTag > xTag( new ChangePlaceholderTag( *this, *mrBase.GetMainViewShell()->GetView(), *(*iter) ) );
+ maTagVector.push_back(xTag);
+ bChanges = true;
+ }
+ }
+ }
+
+ return bChanges;
+}
+
+// --------------------------------------------------------------------
+
+bool ViewOverlayManager::DisposeTags()
+{
+ if( !maTagVector.empty() )
+ {
+ ViewTagVector vec;
+ vec.swap( maTagVector );
+
+ ViewTagVector::iterator iter = vec.begin();
+ do
+ {
+ (*iter++)->Dispose();
+ }
+ while( iter != vec.end() );
+ return true;
+ }
+
+ return false;
+}
+
+// --------------------------------------------------------------------
+
+IMPL_LINK(ViewOverlayManager,EventMultiplexerListener,
+ tools::EventMultiplexerEvent*,pEvent)
+{
+ switch (pEvent->meEventId)
+ {
+ case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
+ case tools::EventMultiplexerEvent::EID_VIEW_ADDED:
+ case tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT:
+ case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
+ case tools::EventMultiplexerEvent::EID_CURRENT_PAGE:
+ UpdateTags();
+ break;
+ }
+ return 0;
+}
+
+}
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 5a3426a42533..616516782be3 100644..100755
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -526,34 +526,6 @@ void ViewShell::DrawMarkRect(const Rectangle& rRect) const
}
}
-
-/*************************************************************************
-|*
-|* Auf allen Split-Windows ein Rechteck zeichnen. Fuer den Rahmen wird der
-|* uebergebene Pen, zum Fuellen die uebergebene Brush benutzt.
-|*
-\************************************************************************/
-
-void ViewShell::DrawFilledRect( const Rectangle& rRect, const Color& rLColor,
- const Color& rFColor ) const
-{
- if (mpContentWindow.get() != NULL)
- {
- const Color& rOldLineColor = mpContentWindow->GetLineColor();
- const Color& rOldFillColor = mpContentWindow->GetFillColor();
-
- mpContentWindow->SetLineColor( rLColor );
- mpContentWindow->SetFillColor( rFColor );
-
- mpContentWindow->DrawRect(rRect);
-
- mpContentWindow->SetLineColor( rOldLineColor );
- mpContentWindow->SetFillColor( rOldFillColor );
- }
-}
-
-
-
/*************************************************************************
|*
|* Groesse und Raender aller Seiten setzen
@@ -851,18 +823,6 @@ void ViewShell::WriteFrameViewData()
/*************************************************************************
|*
-|* Auf allen Split-Windows ein Update erzwingen.
-|*
-\************************************************************************/
-
-void ViewShell::UpdateWindows()
-{
- if (mpContentWindow.get() != NULL)
- mpContentWindow->Update();
-}
-
-/*************************************************************************
-|*
|* OLE-Object aktivieren
|*
\************************************************************************/
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 4ec163d813ca..8bfdefd240da 100644..100755
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -69,7 +69,6 @@
#endif
#include "DrawViewShell.hxx"
#include "OutlineViewShell.hxx"
-#include "TaskPaneViewShell.hxx"
#include "drawview.hxx"
#include "sdattr.hxx"
@@ -80,6 +79,7 @@
#include "Window.hxx"
#include "DrawDocShell.hxx"
#include "FrameView.hxx"
+#include "framework/FrameworkHelper.hxx"
#include "optsitem.hxx"
#include "sdresid.hxx"
@@ -246,6 +246,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
const SfxItemSet* pArgs = rRequest.GetArgs();
if (! pArgs)
{
+/*
// Make the layout menu visible in the tool pane.
const ViewShellBase& rBase (GetViewShellBase());
if (rBase.GetMainViewShell()!=NULL
@@ -253,8 +254,9 @@ SdPage* ViewShell::CreateOrDuplicatePage (
&& rBase.GetMainViewShell()->GetShellType()!=ViewShell::ST_DRAW)
{
framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
- framework::FrameworkHelper::msLayoutTaskPanelURL);
+ framework::FrameworkHelper::msLayoutTaskPanelURL);
}
+*/
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -263,23 +265,31 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if (pTemplatePage != NULL)
{
eStandardLayout = pTemplatePage->GetAutoLayout();
+ if( eStandardLayout == AUTOLAYOUT_TITLE )
+ eStandardLayout = AUTOLAYOUT_ENUM;
+
SdPage* pNotesTemplatePage = static_cast<SdPage*>(pDocument->GetPage(pTemplatePage->GetPageNum()+1));
if (pNotesTemplatePage != NULL)
eNotesLayout = pNotesTemplatePage->GetAutoLayout();
}
}
- else if (pArgs->Count () != 4)
+ else if (pArgs->Count() == 1)
{
- Cancel();
-
- if(HasCurrentFunction(SID_BEZIER_EDIT) )
- GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON);
-
- StarBASIC::FatalError (SbERR_WRONG_ARGS);
- rRequest.Ignore ();
- return NULL;
+ pDocument->StopWorkStartupDelay();
+ SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
+ if( pLayout )
+ {
+ if (ePageKind == PK_NOTES)
+ {
+ eNotesLayout = (AutoLayout) pLayout->GetValue ();
+ }
+ else
+ {
+ eStandardLayout = (AutoLayout) pLayout->GetValue ();
+ }
+ }
}
- else
+ else if (pArgs->Count() == 4)
{
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -317,6 +327,17 @@ SdPage* ViewShell::CreateOrDuplicatePage (
return NULL;
}
}
+ else
+ {
+ Cancel();
+
+ if(HasCurrentFunction(SID_BEZIER_EDIT) )
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON);
+
+ StarBASIC::FatalError (SbERR_WRONG_ARGS);
+ rRequest.Ignore ();
+ return NULL;
+ }
// 2. Create a new page or duplicate an existing one.
View* pDrView = GetView();
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 578026018b9f..c1f4bc070bcf 100644..100755
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -173,14 +173,6 @@ ViewShell::ViewShell( SfxViewFrame*, ::Window* pParentWindow, ViewShellBase& rVi
construct();
}
-ViewShell::ViewShell( SfxViewFrame*, ::Window* pParentWindow, const ViewShell& rShell)
-: SfxShell(rShell.GetViewShell())
-, mbCenterAllowed(rShell.mbCenterAllowed)
-, mpParentWindow(pParentWindow)
-{
- construct();
-}
-
ViewShell::~ViewShell()
{
// Keep the content window from accessing in its destructor the
diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx
index 6f4d56b6f0a3..9ae178e3d7a6 100644..100755
--- a/sd/source/ui/view/zoomlist.cxx
+++ b/sd/source/ui/view/zoomlist.cxx
@@ -112,19 +112,6 @@ void ZoomList::InsertZoomRect(const Rectangle& rRect)
rBindings.Invalidate( SID_ZOOM_PREV );
}
-
-/*************************************************************************
-|*
-|* Aktuelles ZoomRect herausgeben
-|*
-\************************************************************************/
-
-Rectangle ZoomList::GetCurrentZoomRect() const
-{
- Rectangle aRect(*(Rectangle*) GetObject(mnCurPos));
- return (aRect);
-}
-
/*************************************************************************
|*
|* Naechstes ZoomRect herausgeben
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index 20ca059b16d5..c03c6ce435cd 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -1,330 +1,332 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu:menubar xmlns:menu="http://openoffice.org/2001/menu" menu:id="menubar">
- <menu:menu menu:id=".uno:PickList">
+ <menu:menu menu:id=".uno:PickList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:AddDirect"/>
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:RecentFileList"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:SaveAs"/>
+ <menu:menuitem menu:id=".uno:SaveAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Reload"/>
+ <menu:menuitem menu:id=".uno:VersionDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ExportTo"/>
+ <menu:menuitem menu:id=".uno:ExportToPDF"/>
+ <menu:menu menu:id=".uno:SendMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SendMail"/>
+ <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
+ <menu:menuitem menu:id=".uno:Signature"/>
+ <menu:menu menu:id=".uno:TemplateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Organizer"/>
+ <menu:menuitem menu:id=".uno:AddressBookSource"/>
+ <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
+ <menu:menuitem menu:id=".uno:OpenTemplate"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:WebHtml"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:PrinterSetup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Quit"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:EditMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Cut"/>
+ <menu:menuitem menu:id=".uno:Copy"/>
+ <menu:menuitem menu:id=".uno:Paste"/>
+ <menu:menuitem menu:id=".uno:PasteSpecial"/>
+ <menu:menuitem menu:id=".uno:SelectAll"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:SearchDialog"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:CopyObjects"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ToggleObjectBezierMode"/>
+ <menu:menuitem menu:id=".uno:GlueEditMode"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Morphing"/>
+ <menu:menuitem menu:id=".uno:ModifyField"/>
+ <menu:menuitem menu:id=".uno:DeletePage"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ManageLinks"/>
+ <menu:menuitem menu:id=".uno:PlugInsActive"/>
+ <menu:menuitem menu:id=".uno:ImageMapDialog"/>
+ <menu:menuitem menu:id=".uno:ObjectMenue"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ViewMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:PageMode" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:MasterPage" menu:style="radio"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:DisplayQualityMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:AddDirect"/>
- <menu:menuitem menu:id=".uno:Open"/>
- <menu:menuitem menu:id=".uno:RecentFileList"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AutoPilotMenu"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CloseDoc"/>
- <menu:menuitem menu:id=".uno:Save"/>
- <menu:menuitem menu:id=".uno:SaveAs"/>
- <menu:menuitem menu:id=".uno:SaveAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Reload"/>
- <menu:menuitem menu:id=".uno:VersionDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ExportTo"/>
- <menu:menuitem menu:id=".uno:ExportToPDF"/>
- <menu:menu menu:id=".uno:SendMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:SendMail"/>
- <menu:menuitem menu:id=".uno:SendMailDocAsPDF"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SetDocumentProperties"/>
- <menu:menuitem menu:id=".uno:Signature"/>
- <menu:menu menu:id=".uno:TemplateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Organizer"/>
- <menu:menuitem menu:id=".uno:AddressBookSource"/>
- <menu:menuitem menu:id=".uno:SaveAsTemplate"/>
- <menu:menuitem menu:id=".uno:OpenTemplate"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:WebHtml"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Print"/>
- <menu:menuitem menu:id=".uno:PrinterSetup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Quit"/>
+ <menu:menuitem menu:id=".uno:OutputQualityColor" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:OutputQualityGrayscale" menu:style="radio"/>
+ <menu:menuitem menu:id=".uno:OutputQualityBlackWhite" menu:style="radio"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:EditMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:LeftPaneDraw"/>
+ <menu:menuitem menu:id=".uno:AvailableToolbars"/>
+ <menu:menuitem menu:id=".uno:StatusBarVisible"/>
+ <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
+ <menu:menuitem menu:id=".uno:ShowRuler"/>
+ <menu:menu menu:id=".uno:GridMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:Undo"/>
- <menu:menuitem menu:id=".uno:Redo"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Cut"/>
- <menu:menuitem menu:id=".uno:Copy"/>
- <menu:menuitem menu:id=".uno:Paste"/>
- <menu:menuitem menu:id=".uno:PasteSpecial"/>
- <menu:menuitem menu:id=".uno:SelectAll"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:SearchDialog"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:CopyObjects"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ToggleObjectBezierMode"/>
- <menu:menuitem menu:id=".uno:GlueEditMode"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Morphing"/>
- <menu:menuitem menu:id=".uno:ModifyField"/>
- <menu:menuitem menu:id=".uno:DeletePage"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ManageLinks"/>
- <menu:menuitem menu:id=".uno:PlugInsActive"/>
- <menu:menuitem menu:id=".uno:ImageMapDialog"/>
- <menu:menuitem menu:id=".uno:ObjectMenue"/>
- <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuitem menu:id=".uno:GridVisible"/>
+ <menu:menuitem menu:id=".uno:GridUse"/>
+ <menu:menuitem menu:id=".uno:GridFront"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ViewMenu">
+ </menu:menu>
+ <menu:menu menu:id=".uno:SnapLinesMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:PageMode" menu:style="radio"/>
- <menu:menuitem menu:id=".uno:MasterPage" menu:style="radio"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:DisplayQualityMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:OutputQualityColor" menu:style="radio"/>
- <menu:menuitem menu:id=".uno:OutputQualityGrayscale" menu:style="radio"/>
- <menu:menuitem menu:id=".uno:OutputQualityBlackWhite" menu:style="radio"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:LeftPaneDraw"/>
- <menu:menuitem menu:id=".uno:AvailableToolbars"/>
- <menu:menuitem menu:id=".uno:StatusBarVisible"/>
- <menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
- <menu:menuitem menu:id=".uno:ShowRuler"/>
- <menu:menu menu:id=".uno:GridMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:GridVisible"/>
- <menu:menuitem menu:id=".uno:GridUse"/>
- <menu:menuitem menu:id=".uno:GridFront"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:SnapLinesMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HelplinesVisible"/>
- <menu:menuitem menu:id=".uno:HelplinesUse"/>
- <menu:menuitem menu:id=".uno:HelplinesFront"/>
- </menu:menupopup>
- </menu:menu>
+ <menu:menuitem menu:id=".uno:HelplinesVisible"/>
+ <menu:menuitem menu:id=".uno:HelplinesUse"/>
+ <menu:menuitem menu:id=".uno:HelplinesFront"/>
+ </menu:menupopup>
+ </menu:menu>
<menu:menuitem menu:id=".uno:ShowAnnotations"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Navigator"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Zoom"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menuitem menu:id=".uno:Navigator"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Zoom"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:InsertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertPage"/>
+ <menu:menuitem menu:id=".uno:DuplicatePage"/>
+ <menu:menuitem menu:id=".uno:InsertLayer"/>
+ <menu:menuitem menu:id=".uno:CapturePoint"/>
+ <menu:menu menu:id=".uno:FieldMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertPage"/>
- <menu:menuitem menu:id=".uno:DuplicatePage"/>
- <menu:menuitem menu:id=".uno:InsertLayer"/>
- <menu:menuitem menu:id=".uno:CapturePoint"/>
- <menu:menu menu:id=".uno:FieldMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertDateFieldFix"/>
- <menu:menuitem menu:id=".uno:InsertDateFieldVar"/>
- <menu:menuitem menu:id=".uno:InsertTimeFieldFix"/>
- <menu:menuitem menu:id=".uno:InsertTimeFieldVar"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:InsertAuthorField"/>
- <menu:menuitem menu:id=".uno:InsertPageField"/>
+ <menu:menuitem menu:id=".uno:InsertDateFieldFix"/>
+ <menu:menuitem menu:id=".uno:InsertDateFieldVar"/>
+ <menu:menuitem menu:id=".uno:InsertTimeFieldFix"/>
+ <menu:menuitem menu:id=".uno:InsertTimeFieldVar"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:InsertAuthorField"/>
+ <menu:menuitem menu:id=".uno:InsertPageField"/>
<menu:menuitem menu:id=".uno:InsertPagesField"/>
<menu:menuitem menu:id=".uno:InsertFileField"/>
- </menu:menupopup>
- </menu:menu>
+ </menu:menupopup>
+ </menu:menu>
<menu:menuitem menu:id=".uno:InsertAnnotation"/>
<menu:menuitem menu:id=".uno:InsertSymbol"/>
<menu:menu menu:id=".uno:FormattingMarkMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
- <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
- <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
- <menu:menuitem menu:id=".uno:InsertZWSP"/>
- <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
- <menu:menuitem menu:id=".uno:InsertLRM"/>
- <menu:menuitem menu:id=".uno:InsertRLM"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:GraphicMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertGraphic"/>
- <menu:menu menu:id=".uno:Scan">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:TwainSelect"/>
- <menu:menuitem menu:id=".uno:TwainTransfer"/>
- </menu:menupopup>
- </menu:menu>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertTable"/>
- <menu:menuitem menu:id=".uno:InsertAVMedia"/>
- <menu:menu menu:id=".uno:ObjectMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:InsertObject"/>
- <menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
- <menu:menuitem menu:id=".uno:InsertMath"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:InsertObjectChart"/>
- <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ImportFromFile"/>
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:InsertNonBreakingSpace"/>
+ <menu:menuitem menu:id=".uno:InsertHardHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertSoftHyphen"/>
+ <menu:menuitem menu:id=".uno:InsertZWSP"/>
+ <menu:menuitem menu:id=".uno:InsertZWNBSP"/>
+ <menu:menuitem menu:id=".uno:InsertLRM"/>
+ <menu:menuitem menu:id=".uno:InsertRLM"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:FormatMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:HyperlinkDialog"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:GraphicMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SetDefault"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FontDialog"/>
- <menu:menuitem menu:id=".uno:ParagraphDialog"/>
- <menu:menuitem menu:id=".uno:OutlineBullet"/>
- <menu:menuitem menu:id=".uno:PageSetup"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:TransliterateMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
- <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:TransformDialog"/>
- <menu:menuitem menu:id=".uno:FormatLine"/>
- <menu:menuitem menu:id=".uno:FormatArea"/>
- <menu:menuitem menu:id=".uno:TextAttributes"/>
- <menu:menuitem menu:id=".uno:GrafAttrCrop"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ModifyLayer"/>
- <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ <menu:menuitem menu:id=".uno:InsertGraphic"/>
+ <menu:menu menu:id=".uno:Scan">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:TwainSelect"/>
+ <menu:menuitem menu:id=".uno:TwainTransfer"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ToolsMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertTable"/>
+ <menu:menuitem menu:id=".uno:InsertAVMedia"/>
+ <menu:menu menu:id=".uno:ObjectMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:SpellDialog"/>
- <menu:menu menu:id=".uno:LanguageMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
- <menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:Thesaurus"/>
- <menu:menuitem menu:id=".uno:Hyphenation"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MoreDictionaries"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Gallery"/>
- <menu:menuitem menu:id=".uno:BmpMask"/>
- <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:MacrosMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MacroRecorder"/>
- <menu:menuitem menu:id=".uno:RunMacro"/>
- <menu:menu menu:id=".uno:ScriptOrganizer"/>
- <menu:menuitem menu:id=".uno:MacroSignature"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
- </menu:menupopup>
- </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObject"/>
+ <menu:menuitem menu:id=".uno:InsertPlugin"/>
+ <menu:menuitem menu:id=".uno:InsertMath"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:InsertObjectChart"/>
+ <menu:menuitem menu:id=".uno:InsertObjectFloatingFrame"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ImportFromFile"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:FormatMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SetDefault"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FontDialog"/>
+ <menu:menuitem menu:id=".uno:ParagraphDialog"/>
+ <menu:menuitem menu:id=".uno:OutlineBullet"/>
+ <menu:menuitem menu:id=".uno:PageSetup"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:TransliterateMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToKatakana"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TransformDialog"/>
+ <menu:menuitem menu:id=".uno:FormatLine"/>
+ <menu:menuitem menu:id=".uno:FormatArea"/>
+ <menu:menuitem menu:id=".uno:TextAttributes"/>
+ <menu:menuitem menu:id=".uno:GrafAttrCrop"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ModifyLayer"/>
+ <menu:menuitem menu:id=".uno:DesignerDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ToolsMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:SpellDialog"/>
+ <menu:menu menu:id=".uno:LanguageMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
+ <menu:menuitem menu:id=".uno:ChineseConversion"/>
+ <menu:menuitem menu:id=".uno:Thesaurus"/>
+ <menu:menuitem menu:id=".uno:Hyphenation"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MoreDictionaries"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Gallery"/>
+ <menu:menuitem menu:id=".uno:BmpMask"/>
+ <menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:MacrosMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MacroRecorder"/>
+ <menu:menuitem menu:id=".uno:RunMacro"/>
+ <menu:menu menu:id=".uno:ScriptOrganizer"/>
+ <menu:menuitem menu:id=".uno:MacroSignature"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:MacroOrganizer?TabId:short=1"/>
+ </menu:menupopup>
+ </menu:menu>
- <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
- <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
- <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
- <menu:menuitem menu:id=".uno:ConfigureDialog"/>
- <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id="service:com.sun.star.deployment.ui.PackageManagerDialog"/>
+ <menu:menuitem menu:id=".uno:OpenXMLFilterSettings"/>
+ <menu:menuitem menu:id=".uno:AutoCorrectDlg"/>
+ <menu:menuitem menu:id=".uno:ConfigureDialog"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ModifyMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ToggleObjectRotateMode"/>
+ <menu:menu menu:id=".uno:MirrorMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:MirrorVert"/>
+ <menu:menuitem menu:id=".uno:MirrorHorz"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:ConvertMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:ChangeBezier"/>
+ <menu:menuitem menu:id=".uno:ChangePolygon"/>
+ <menu:menuitem menu:id=".uno:convert_to_contour"/>
+ <menu:menuitem menu:id=".uno:ConvertInto3D"/>
+ <menu:menuitem menu:id=".uno:ConvertInto3DLatheFast"/>
+ <menu:menuitem menu:id=".uno:ConvertIntoBitmap"/>
+ <menu:menuitem menu:id=".uno:ConvertIntoMetaFile"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ModifyMenu">
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menu menu:id=".uno:ArrangeMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ToggleObjectRotateMode"/>
- <menu:menu menu:id=".uno:MirrorMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:MirrorVert"/>
- <menu:menuitem menu:id=".uno:MirrorHorz"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ConvertMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeBezier"/>
- <menu:menuitem menu:id=".uno:ChangePolygon"/>
- <menu:menuitem menu:id=".uno:convert_to_contour"/>
- <menu:menuitem menu:id=".uno:ConvertInto3D"/>
- <menu:menuitem menu:id=".uno:ConvertInto3DLatheFast"/>
- <menu:menuitem menu:id=".uno:ConvertIntoBitmap"/>
- <menu:menuitem menu:id=".uno:ConvertIntoMetaFile"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menu menu:id=".uno:ArrangeMenu">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:BringToFront"/>
- <menu:menuitem menu:id=".uno:Forward"/>
- <menu:menuitem menu:id=".uno:Backward"/>
- <menu:menuitem menu:id=".uno:SendToBack"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:BeforeObject"/>
- <menu:menuitem menu:id=".uno:BehindObject"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ReverseOrder"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:ObjectAlign">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:ObjectAlignLeft"/>
- <menu:menuitem menu:id=".uno:AlignCenter"/>
- <menu:menuitem menu:id=".uno:ObjectAlignRight"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:AlignUp"/>
- <menu:menuitem menu:id=".uno:AlignMiddle"/>
- <menu:menuitem menu:id=".uno:AlignDown"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuitem menu:id=".uno:DistributeSelection"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
- <menu:menuitem menu:id=".uno:NameGroup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:FormatGroup"/>
- <menu:menuitem menu:id=".uno:FormatUngroup"/>
- <menu:menuitem menu:id=".uno:EnterGroup"/>
- <menu:menuitem menu:id=".uno:LeaveGroup"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Combine"/>
- <menu:menuitem menu:id=".uno:Dismantle"/>
- <menu:menu menu:id=".uno:PolyFormen">
- <menu:menupopup>
- <menu:menuitem menu:id=".uno:Merge"/>
- <menu:menuitem menu:id=".uno:Substract"/>
- <menu:menuitem menu:id=".uno:Intersect"/>
- </menu:menupopup>
- </menu:menu>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:Connect"/>
- <menu:menuitem menu:id=".uno:Break"/>
+ <menu:menuitem menu:id=".uno:BringToFront"/>
+ <menu:menuitem menu:id=".uno:Forward"/>
+ <menu:menuitem menu:id=".uno:Backward"/>
+ <menu:menuitem menu:id=".uno:SendToBack"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:BeforeObject"/>
+ <menu:menuitem menu:id=".uno:BehindObject"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ReverseOrder"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:WindowList">
+ </menu:menu>
+ <menu:menu menu:id=".uno:ObjectAlign">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:NewWindow"/>
- <menu:menuitem menu:id=".uno:CloseWin"/>
- <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectAlignLeft"/>
+ <menu:menuitem menu:id=".uno:AlignCenter"/>
+ <menu:menuitem menu:id=".uno:ObjectAlignRight"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:AlignUp"/>
+ <menu:menuitem menu:id=".uno:AlignMiddle"/>
+ <menu:menuitem menu:id=".uno:AlignDown"/>
</menu:menupopup>
- </menu:menu>
- <menu:menu menu:id=".uno:HelpMenu">
+ </menu:menu>
+ <menu:menuitem menu:id=".uno:DistributeSelection"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
+ <menu:menuitem menu:id=".uno:NameGroup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FormatGroup"/>
+ <menu:menuitem menu:id=".uno:FormatUngroup"/>
+ <menu:menuitem menu:id=".uno:EnterGroup"/>
+ <menu:menuitem menu:id=".uno:LeaveGroup"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Combine"/>
+ <menu:menuitem menu:id=".uno:Dismantle"/>
+ <menu:menu menu:id=".uno:PolyFormen">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:HelpIndex"/>
- <menu:menuitem menu:id=".uno:ExtendedHelp"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:HelpSupport"/>
- <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
- <menu:menuseparator/>
- <menu:menuitem menu:id=".uno:About"/>
+ <menu:menuitem menu:id=".uno:Merge"/>
+ <menu:menuitem menu:id=".uno:Substract"/>
+ <menu:menuitem menu:id=".uno:Intersect"/>
</menu:menupopup>
- </menu:menu>
+ </menu:menu>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:Connect"/>
+ <menu:menuitem menu:id=".uno:Break"/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:WindowList">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:NewWindow"/>
+ <menu:menuitem menu:id=".uno:CloseWin"/>
+ <menu:menuseparator/>
+ </menu:menupopup>
+ </menu:menu>
+ <menu:menu menu:id=".uno:HelpMenu">
+ <menu:menupopup>
+ <menu:menuitem menu:id=".uno:HelpIndex"/>
+ <menu:menuitem menu:id=".uno:ExtendedHelp"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:HelpSupport"/>
+ <menu:menuitem menu:id=".uno:OnlineRegistrationDlg"/>
+ <menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:About"/>
+ </menu:menupopup>
+ </menu:menu>
</menu:menubar>
diff --git a/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml b/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml
index 1f212226cf52..148849db6ee7 100644..100755
--- a/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml
new file mode 100644
index 000000000000..9ef9d8a1a78f
--- /dev/null
+++ b/sd/uiconfig/sdraw/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml b/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml
index 3ac334e0e920..32de621477dc 100644..100755
--- a/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly"/>
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 03d4c238e360..bf669992c86a 100644..100755
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -99,8 +99,8 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:RightPane"/>
- <menu:menuitem menu:id=".uno:LeftPaneImpress"/>
+ <menu:menuitem menu:id=".uno:TaskPane"/>
+ <menu:menuitem menu:id=".uno:LeftPaneImpress"/>
<menu:menuitem menu:id=".uno:AvailableToolbars"/>
<menu:menuitem menu:id=".uno:StatusBarVisible"/>
<menu:menuitem menu:id=".uno:ShowImeStatusWindow"/>
@@ -181,8 +181,6 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:InsertObject"/>
<menu:menuitem menu:id=".uno:InsertPlugin"/>
- <menu:menuitem menu:id=".uno:InsertSound"/>
- <menu:menuitem menu:id=".uno:InsertVideo"/>
<menu:menuitem menu:id=".uno:InsertMath"/>
</menu:menupopup>
</menu:menu>
@@ -203,8 +201,11 @@
<menu:menuseparator/>
<menu:menu menu:id=".uno:TransliterateMenu">
<menu:menupopup>
- <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToSentenceCase"/>
<menu:menuitem menu:id=".uno:ChangeCaseToLower"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToUpper"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToTitleCase"/>
+ <menu:menuitem menu:id=".uno:ChangeCaseToToggleCase"/>
<menu:menuitem menu:id=".uno:ChangeCaseToHalfWidth"/>
<menu:menuitem menu:id=".uno:ChangeCaseToFullWidth"/>
<menu:menuitem menu:id=".uno:ChangeCaseToHiragana"/>
@@ -239,7 +240,7 @@
<menu:menupopup>
<menu:menuitem menu:id=".uno:HangulHanjaConversion"/>
<menu:menuitem menu:id=".uno:ChineseConversion"/>
- <menu:menuitem menu:id=".uno:Thesaurus"/>
+ <menu:menuitem menu:id=".uno:ThesaurusDialog"/>
<menu:menuitem menu:id=".uno:Hyphenation"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:MoreDictionaries"/>
diff --git a/sd/uiconfig/simpress/toolbar/commontaskbar.xml b/sd/uiconfig/simpress/toolbar/commontaskbar.xml
index 5e4ce1cff6f0..c64a4b935717 100644..100755
--- a/sd/uiconfig/simpress/toolbar/commontaskbar.xml
+++ b/sd/uiconfig/simpress/toolbar/commontaskbar.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink">
- <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="27014"/>
- <toolbar:toolbaritem xlink:href=".uno:ModifyPage" toolbar:visible="false" toolbar:helpid="27046"/>
+ <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="27014" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:AssignLayout" toolbar:helpid="27435" toolbar:style="dropdownonly"/>
<toolbar:toolbaritem xlink:href=".uno:PresentationLayout" toolbar:helpid="27064"/>
<toolbar:toolbaritem xlink:href=".uno:DuplicatePage" toolbar:visible="false" toolbar:helpid="27342"/>
<toolbar:toolbaritem xlink:href=".uno:ExpandPage" toolbar:visible="false" toolbar:helpid="27343"/>
diff --git a/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml b/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml
index 1f212226cf52..148849db6ee7 100644..100755
--- a/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml
+++ b/sd/uiconfig/simpress/toolbar/extrusionobjectbar.xml
@@ -8,9 +8,9 @@
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltLeft" toolbar:helpid="10963"/>
<toolbar:toolbaritem xlink:href=".uno:ExtrusionTiltRight" toolbar:helpid="10964"/>
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967"/>
- <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968"/>
- <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDepthFloater" toolbar:helpid="10965" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionDirectionFloater" toolbar:helpid="10966" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionLightingFloater" toolbar:helpid="10967" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:ExtrusionSurfaceFloater" toolbar:helpid="10968" toolbar:style="dropdownonly"/>
+ <toolbar:toolbaritem xlink:href=".uno:Extrusion3DColor" toolbar:helpid="10969" toolbar:style="dropdownonly"/>
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml
new file mode 100644
index 000000000000..9ef9d8a1a78f
--- /dev/null
+++ b/sd/uiconfig/simpress/toolbar/findbar.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
+<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
+ <toolbar:toolbaritem xlink:href=".uno:FindText" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:DownSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:UpSearch" toolbar:helpid="helpid:100105" />
+ <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:text="Find &amp; Replace" toolbar:visible="false" toolbar:helpid="helpid:100105"/>
+</toolbar:toolbar>
diff --git a/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml b/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml
index 3ac334e0e920..28687d66eb6f 100644..100755
--- a/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml
+++ b/sd/uiconfig/simpress/toolbar/fontworkobjectbar.xml
@@ -3,9 +3,9 @@
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
<toolbar:toolbaritem xlink:href=".uno:FontworkGalleryFloater" toolbar:helpid="helpid:10977" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="radio dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkShapeType" toolbar:helpid="helpid:10978" toolbar:style="dropdownonly" />
<toolbar:toolbaritem xlink:href=".uno:FontworkSameLetterHeights" toolbar:helpid="helpid:10979" />
<toolbar:toolbarseparator/>
- <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdown" />
- <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdown" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkAlignmentFloater" toolbar:helpid="helpid:10981" toolbar:style="dropdownonly" />
+ <toolbar:toolbaritem xlink:href=".uno:FontworkCharacterSpacingFloater" toolbar:helpid="helpid:10982" toolbar:style="dropdownonly" />
</toolbar:toolbar> \ No newline at end of file
diff --git a/sd/uiconfig/simpress/toolbar/insertbar.xml b/sd/uiconfig/simpress/toolbar/insertbar.xml
index 2efa9c7d49c1..4ba1344cf2fc 100644..100755
--- a/sd/uiconfig/simpress/toolbar/insertbar.xml
+++ b/sd/uiconfig/simpress/toolbar/insertbar.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE toolbar:toolbar PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "toolbar.dtd">
<toolbar:toolbar xmlns:toolbar="http://openoffice.org/2001/toolbar" xmlns:xlink="http://www.w3.org/1999/xlink" toolbar:id="toolbar">
- <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="helpid:27014" />
+ <toolbar:toolbaritem xlink:href=".uno:InsertPage" toolbar:helpid="helpid:27014" toolbar:style="radio dropdown" />
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:InsertObjectFloatingFrame" toolbar:helpid="helpid:5563" toolbar:visible="false" />
<toolbar:toolbarseparator/>
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index bfe4d1fd1b40..8f56a0d47f7f 100644..100755
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -124,7 +124,8 @@ LIB3FILES= \
$(SLB)$/cgm.lib \
$(SLB)$/uitable.lib \
$(SLB)$/uiannotations.lib\
- $(SLB)$/grf.lib
+ $(SLB)$/grf.lib \
+ $(SLB)$/controller.lib
LIB5TARGET=$(SLB)$/sdraw3_2.lib
LIB5FILES= \
diff --git a/sd/workben/custompanel/ctp_panel.cxx b/sd/workben/custompanel/ctp_panel.cxx
new file mode 100644
index 000000000000..f36dd897736c
--- /dev/null
+++ b/sd/workben/custompanel/ctp_panel.cxx
@@ -0,0 +1,249 @@
+/*************************************************************************
+ * 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 "ctp_panel.hxx"
+
+/** === begin UNO includes === **/
+#include <com/sun/star/drawing/framework/XPane.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/awt/XWindowPeer.hpp>
+#include <com/sun/star/awt/XToolkit.hpp>
+#include <com/sun/star/awt/WindowClass.hpp>
+#include <com/sun/star/awt/WindowAttribute.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/awt/XDevice.hpp>
+#include <com/sun/star/awt/XGraphics.hpp>
+/** === end UNO includes === **/
+
+#include <tools/diagnose_ex.h>
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::drawing::framework::XConfigurationController;
+ using ::com::sun::star::drawing::framework::XResourceId;
+ using ::com::sun::star::uno::XComponentContext;
+ using ::com::sun::star::drawing::framework::XPane;
+ using ::com::sun::star::awt::XWindow;
+ using ::com::sun::star::rendering::XCanvas;
+ using ::com::sun::star::lang::DisposedException;
+ using ::com::sun::star::awt::XWindowPeer;
+ using ::com::sun::star::lang::XMultiComponentFactory;
+ using ::com::sun::star::awt::XToolkit;
+ using ::com::sun::star::awt::WindowDescriptor;
+ using ::com::sun::star::awt::WindowClass_SIMPLE;
+ using ::com::sun::star::awt::Rectangle;
+ using ::com::sun::star::awt::PaintEvent;
+ using ::com::sun::star::lang::EventObject;
+ using ::com::sun::star::awt::XDevice;
+ using ::com::sun::star::awt::XGraphics;
+ using ::com::sun::star::accessibility::XAccessible;
+ /** === end UNO using === **/
+ namespace WindowAttribute = ::com::sun::star::awt::WindowAttribute;
+ namespace PosSize = ::com::sun::star::awt::PosSize;
+
+ //==================================================================================================================
+ //= helpers
+ //==================================================================================================================
+ namespace
+ {
+ Reference< XWindow > lcl_createPlainWindow_nothrow( const Reference< XComponentContext >& i_rContext,
+ const Reference< XWindowPeer >& i_rParentWindow )
+ {
+ try
+ {
+ ENSURE_OR_THROW( i_rContext.is(), "illegal component context" );
+ Reference< XMultiComponentFactory > xFactory( i_rContext->getServiceManager(), UNO_SET_THROW );
+ Reference< XToolkit > xToolkit( xFactory->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ),
+ i_rContext
+ ), UNO_QUERY_THROW );
+
+ WindowDescriptor aWindow;
+ aWindow.Type = WindowClass_SIMPLE;
+ aWindow.WindowServiceName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "window" ) );
+ aWindow.Parent = i_rParentWindow;
+ aWindow.WindowAttributes = WindowAttribute::BORDER;
+
+ Reference< XWindowPeer > xWindow( xToolkit->createWindow( aWindow ), UNO_SET_THROW );
+ return Reference< XWindow >( xWindow, UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
+ }
+ //==================================================================================================================
+ //= class SingleColorPanel
+ //==================================================================================================================
+ //------------------------------------------------------------------------------------------------------------------
+ SingleColorPanel::SingleColorPanel( const Reference< XComponentContext >& i_rContext,
+ const Reference< XConfigurationController >& i_rConfigController, const Reference< XResourceId >& i_rResourceId )
+ :SingleColorPanel_Base( m_aMutex )
+ ,m_xContext( i_rContext )
+ ,m_xResourceId( i_rResourceId )
+ ,m_xWindow()
+ {
+ ENSURE_OR_THROW( i_rConfigController.is(), "invalid configuration controller" );
+ ENSURE_OR_THROW( m_xResourceId.is(), "invalid resource id" );
+
+ // retrieve the parent window for our to-be-created pane window
+ Reference< XWindow > xParentWindow;
+ Reference< XWindowPeer > xParentPeer;
+ try
+ {
+ Reference< XResource > xAnchor( i_rConfigController->getResource( m_xResourceId->getAnchor() ), UNO_SET_THROW );
+ Reference< XPane > xAnchorPane( xAnchor, UNO_QUERY_THROW );
+ xParentWindow.set( xAnchorPane->getWindow(), UNO_SET_THROW );
+ xParentPeer.set( xParentWindow, UNO_QUERY_THROW );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ osl_incrementInterlockedCount( &m_refCount );
+ if ( xParentWindow.is() )
+ {
+ m_xWindow = lcl_createPlainWindow_nothrow( m_xContext, xParentPeer );
+ m_xWindow->addPaintListener( this );
+ if ( m_xWindow.is() )
+ {
+ const Rectangle aPanelAnchorSize( xParentWindow->getPosSize() );
+ m_xWindow->setPosSize( 0, 0, aPanelAnchorSize.Width, aPanelAnchorSize.Height, PosSize::POSSIZE );
+ m_xWindow->setVisible( sal_True );
+ }
+ }
+ osl_decrementInterlockedCount( &m_refCount );
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ SingleColorPanel::~SingleColorPanel()
+ {
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XWindow > SAL_CALL SingleColorPanel::getWindow( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.get() )
+ throw DisposedException( ::rtl::OUString(), *this );
+ return m_xWindow;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XAccessible > SAL_CALL SingleColorPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException)
+ {
+ (void)i_rParentAccessible;
+ return Reference< XAccessible >( m_xWindow, UNO_QUERY );
+ // TODO: this is, strictly, not correct, as we ignore i_ParentAccessible here. If you are not doing a sample
+ // extension only, you'll want to do this correctly ....
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ Reference< XResourceId > SAL_CALL SingleColorPanel::getResourceId( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+ return m_xResourceId;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ ::sal_Bool SAL_CALL SingleColorPanel::isAnchorOnly( ) throw (RuntimeException)
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() )
+ throw DisposedException( ::rtl::OUString(), *this );
+ return sal_False;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SingleColorPanel::windowPaint( const PaintEvent& i_rEvent ) throw (RuntimeException)
+ {
+ try
+ {
+ const Reference< XDevice > xDevice( i_rEvent.Source, UNO_QUERY_THROW );
+ const Reference< XGraphics > xGraphics( xDevice->createGraphics(), UNO_SET_THROW );
+ xGraphics->setFillColor( 0x80 << 8 );
+ xGraphics->setLineColor( 0x80 << 16 );
+
+ const Reference< XWindow > xWindow( i_rEvent.Source, UNO_QUERY_THROW );
+ const Rectangle aWindowRect( xWindow->getPosSize() );
+ xGraphics->drawRect( 0, 0, aWindowRect.Width - 1, aWindowRect.Height - 1 );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SingleColorPanel::disposing( const EventObject& i_rSource ) throw (RuntimeException)
+ {
+ (void)i_rSource;
+ }
+
+ //------------------------------------------------------------------------------------------------------------------
+ void SAL_CALL SingleColorPanel::disposing()
+ {
+ ::osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_xWindow.is() )
+ // already disposed
+ return;
+ m_xWindow->removePaintListener( this );
+ try
+ {
+ Reference< XComponent > xWindowComp( m_xWindow, UNO_QUERY_THROW );
+ xWindowComp->dispose();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ m_xWindow.clear();
+ }
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
diff --git a/sd/workben/custompanel/ctp_panel.hxx b/sd/workben/custompanel/ctp_panel.hxx
new file mode 100644
index 000000000000..e82d33ea1b4d
--- /dev/null
+++ b/sd/workben/custompanel/ctp_panel.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_WORKBENCH_CTP_PANEL_HXX
+#define SD_WORKBENCH_CTP_PANEL_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/drawing/framework/XView.hpp>
+#include <com/sun/star/ui/XToolPanel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
+#include <com/sun/star/drawing/framework/XResourceId.hpp>
+#include <com/sun/star/awt/XPaintListener.hpp>
+/** === end UNO includes === **/
+
+#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/basemutex.hxx>
+
+#include <boost/scoped_ptr.hpp>
+
+//......................................................................................................................
+namespace sd { namespace colortoolpanel
+{
+//......................................................................................................................
+
+ //==================================================================================================================
+ //= class SingleColorPanel
+ //==================================================================================================================
+ typedef ::cppu::WeakComponentImplHelper3 < ::com::sun::star::drawing::framework::XView
+ , ::com::sun::star::ui::XToolPanel
+ , ::com::sun::star::awt::XPaintListener
+ > SingleColorPanel_Base;
+ class SingleColorPanel :public ::cppu::BaseMutex
+ ,public SingleColorPanel_Base
+ {
+ public:
+ SingleColorPanel(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XConfigurationController >& i_rConfigController,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XResourceId >& i_rResourceId
+ );
+
+ // XToolPanel
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getWindow( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL createAccessible( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& ParentAccessible ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XView
+ // (no methods)
+
+ // XResource
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XResourceId > SAL_CALL getResourceId( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Bool SAL_CALL isAnchorOnly( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XPaintListener
+ virtual void SAL_CALL windowPaint( const ::com::sun::star::awt::PaintEvent& e ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XComponent equivalents
+ virtual void SAL_CALL disposing();
+
+ protected:
+ ~SingleColorPanel();
+
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::framework::XResourceId > m_xResourceId;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWindow;
+ };
+
+//......................................................................................................................
+} } // namespace sd::colortoolpanel
+//......................................................................................................................
+
+#endif // SD_WORKBENCH_CTP_PANEL_HXX