diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-04-10 15:24:31 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-04-10 15:24:31 +0100 |
commit | 05ec31ebe0b4a223f33a9c98f6bebba1234e05ea (patch) | |
tree | e281e3aa4f653b9a8c5f9664f9a65ff903da5bf5 | |
parent | svidl: more helpful error message for missing slot / types. (diff) | |
download | core-05ec31ebe0b4a223f33a9c98f6bebba1234e05ea.tar.gz core-05ec31ebe0b4a223f33a9c98f6bebba1234e05ea.zip |
add slide grouping / un-grouping hooks.
Change-Id: I156dff8d91a073d9e6e281c26434c963456cddce
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu | 16 | ||||
-rw-r--r-- | sd/inc/app.hrc | 3 | ||||
-rw-r--r-- | sd/inc/sdcommands.h | 2 | ||||
-rw-r--r-- | sd/sdi/SlideSorterController.sdi | 11 | ||||
-rw-r--r-- | sd/sdi/sdraw.sdi | 48 | ||||
-rw-r--r-- | sd/source/ui/app/menuids3_tmpl.src | 16 | ||||
-rw-r--r-- | sd/source/ui/app/popup.src | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 54 |
9 files changed, 109 insertions, 45 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index 00e5ed5b307d..5108cc21fa82 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -85,6 +85,22 @@ <value>1</value> </prop> </node> + <node oor:name=".uno:GroupSlides" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~Group Slides</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> + <node oor:name=".uno:UnGroupSlides" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">~Un-Group Slides</value> + </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>1</value> + </prop> + </node> <node oor:name=".uno:TextAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Te~xt...</value> diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index 3fbf9cc02e62..9828825fe5db 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -455,6 +455,9 @@ #define SID_ADD_MOTION_PATH (SID_SD_START+442) #define SID_TABLE_TOOLBOX (SID_SD_START+443) +#define SID_GROUP_SLIDES (SID_SD_START+444) +#define SID_UNGROUP_SLIDES (SID_SD_START+445) + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h index a36637058b0e..e01234025510 100644 --- a/sd/inc/sdcommands.h +++ b/sd/inc/sdcommands.h @@ -75,6 +75,8 @@ #define CMD_SID_HELPLINES_VISIBLE ".uno:HelplinesVisible" #define CMD_SID_HIDE_SLIDE ".uno:HideSlide" #define CMD_SID_SHOW_SLIDE ".uno:ShowSlide" +#define CMD_SID_GROUP_SLIDES ".uno:GroupSlides" +#define CMD_SID_UNGROUP_SLIDES ".uno:UnGroupSlides" #define CMD_SID_INSERTLAYER ".uno:InsertLayer" #define CMD_SID_INSERTPAGE ".uno:InsertPage" #define CMD_SID_DUPLICATE_PAGE ".uno:DuplicatePage" diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi index 253b89376578..f62a023f90c9 100644 --- a/sd/sdi/SlideSorterController.sdi +++ b/sd/sdi/SlideSorterController.sdi @@ -186,7 +186,6 @@ interface SlideSorterView ExecMethod = ExecStatusBar ; StateMethod = GetStatusBarState ; ] - SID_RELOAD // ole : no, status : ? [ GroupId = GID_DOCUMENT ; @@ -298,6 +297,16 @@ interface SlideSorterView [ ExecMethod = FuTemporary ; ] + SID_GROUP_SLIDES + [ + ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; + ] + SID_UNGROUP_SLIDES + [ + ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; + ] } shell SlideSorterController diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index 1e83de0b9dea..25fa6f982b14 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -7278,3 +7278,51 @@ SfxVoidItem PhotoAlbumDialog SID_PHOTOALBUM ToolBoxConfig = TRUE, GroupId = GID_OPTIONS; ] +//-------------------------------------------------------------------------- +SfxVoidItem GroupSlides SID_GROUP_SLIDES +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_MODIFY; +] +//-------------------------------------------------------------------------- +SfxVoidItem UnGroupSlides SID_UNGROUP_SLIDES +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_MODIFY; +] diff --git a/sd/source/ui/app/menuids3_tmpl.src b/sd/source/ui/app/menuids3_tmpl.src index eef4bb97a879..cfe70f567fa3 100644 --- a/sd/source/ui/app/menuids3_tmpl.src +++ b/sd/source/ui/app/menuids3_tmpl.src @@ -131,4 +131,20 @@ Text [ en-US ] = "~Hide Slide" ; \ }; +#define MN_GROUP_SLIDES \ + MenuItem\ + {\ + Identifier = SID_GROUP_SLIDES ; \ + HelpId = CMD_SID_GROUP_SLIDES ; \ + Text [ en-US ] = "~Group Slide(s)" ; \ + }; + +#define MN_UNGROUP_SLIDES \ + MenuItem\ + {\ + Identifier = SID_UNGROUP_SLIDES ; \ + HelpId = CMD_SID_UNGROUP_SLIDES ; \ + Text [ en-US ] = "~Un-Group Slide(s)" ; \ + }; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/app/popup.src b/sd/source/ui/app/popup.src index b027026f9898..d847a5af181a 100644 --- a/sd/source/ui/app/popup.src +++ b/sd/source/ui/app/popup.src @@ -292,6 +292,8 @@ Menu RID_SLIDE_SORTER_IMPRESS_SEL_POPUP SEPARATOR MN_PRESENTATION_LAYOUT MN_MODIFY_PAGE + MN_GROUP_SLIDES + MN_UNGROUP_SLIDES SEPARATOR MN_DIA MN_SHOW_SLIDE diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx index 5d0afac161bc..73d0eec191db 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx @@ -243,6 +243,8 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible) pViewShell->Invalidate (SID_SUMMARY_PAGE); pViewShell->Invalidate(SID_SHOW_SLIDE); pViewShell->Invalidate(SID_HIDE_SLIDE); + pViewShell->Invalidate(SID_GROUP_SLIDES); + pViewShell->Invalidate(SID_UNGROUP_SLIDES); pViewShell->Invalidate(SID_DELETE_PAGE); pViewShell->Invalidate(SID_DELETE_MASTER_PAGE); pViewShell->Invalidate(SID_ASSIGN_LAYOUT); diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index 39a66c33d287..0b6b060ebd0e 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/presentation/XPresentation2.hpp> #include <editeng/outlobj.hxx> @@ -107,24 +106,16 @@ SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet); } // end of anonymous namespace - - SlotManager::SlotManager (SlideSorter& rSlideSorter) : mrSlideSorter(rSlideSorter), maCommandQueue() { } - - - SlotManager::~SlotManager (void) { } - - - void SlotManager::FuTemporary (SfxRequest& rRequest) { SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument(); @@ -151,6 +142,11 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) ChangeSlideExclusionState(model::SharedPageDescriptor(), false); break; + case SID_GROUP_SLIDES: + case SID_UNGROUP_SLIDES: + fprintf (stderr, "Execute group / un-group\n"); + break; + case SID_PAGES_PER_ROW: if (rRequest.GetArgs() != NULL) { @@ -268,9 +264,6 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) } } - - - void SlotManager::FuPermanent (SfxRequest& rRequest) { ViewShell* pShell = mrSlideSorter.GetViewShell(); @@ -417,9 +410,6 @@ void SlotManager::FuSupport (SfxRequest& rRequest) } } - - - void SlotManager::ExecCtrl (SfxRequest& rRequest) { ViewShell* pViewShell = mrSlideSorter.GetViewShell(); @@ -482,9 +472,6 @@ void SlotManager::ExecCtrl (SfxRequest& rRequest) } } - - - void SlotManager::GetAttrState (SfxItemSet& rSet) { // Iterate over all items. @@ -623,7 +610,6 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } } - // Disable the rename slots when there are no or more than one slides/master // pages selected. if (rSet.GetItemState(SID_RENAMEPAGE) == SFX_ITEM_AVAILABLE @@ -664,6 +650,11 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } } + if (rSet.GetItemState(SID_GROUP_SLIDES) == SFX_ITEM_AVAILABLE + || rSet.GetItemState(SID_UNGROUP_SLIDES) == SFX_ITEM_AVAILABLE) + { + fprintf(stderr, "Determine if we can show group vs. un-group\n"); + } PageKind ePageKind = mrSlideSorter.GetModel().GetPageType(); if ((eEditMode == EM_MASTERPAGE) && (ePageKind != PK_HANDOUT)) @@ -686,9 +677,6 @@ void SlotManager::GetMenuState (SfxItemSet& rSet) } } - - - void SlotManager::GetClipboardState ( SfxItemSet& rSet) { SdTransferable* pTransferClip = SD_MOD()->pTransferClip; @@ -808,9 +796,6 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet) } } - - - void SlotManager::GetStatusBarState (SfxItemSet& rSet) { // page view and layout @@ -1029,9 +1014,6 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const String return bSuccess; } - - - /** Insert a slide. The insertion position depends on a) the selection and b) the mouse position when there is no selection. @@ -1099,9 +1081,6 @@ void SlotManager::InsertSlide (SfxRequest& rRequest) mrSlideSorter.GetController().GetPageSelector().SelectPage(pNewPage); } - - - void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest) { // Create a list of the pages that are to be duplicated. The process of @@ -1188,9 +1167,6 @@ void SlotManager::ChangeSlideExclusionState ( mrSlideSorter.GetModel().GetDocument()->SetChanged(); } - - - sal_Int32 SlotManager::GetInsertionPosition (void) { PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector()); @@ -1238,9 +1214,6 @@ sal_Int32 SlotManager::GetInsertionPosition (void) } } - - - void SlotManager::NotifyEditModeChange (void) { SfxBindings& rBindings (mrSlideSorter.GetViewShell()->GetViewFrame()->GetBindings()); @@ -1249,15 +1222,8 @@ void SlotManager::NotifyEditModeChange (void) rBindings.Invalidate(SID_DUPLICATE_PAGE); } - - - -//----------------------------------------------------------------------------- - namespace { - - SlideExclusionState GetSlideExclusionState (model::PageEnumeration& rPageSet) { SlideExclusionState eState (UNDEFINED); |