idl/source/objects/basobj.cxx | 1 idl/source/objects/types.cxx | 8 idl/source/prj/database.cxx | 2 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu | 16 sd/inc/app.hrc | 3 sd/inc/sdcommands.h | 2 sd/sdi/SlideSorterController.sdi | 11 sd/sdi/sdraw.sdi | 48 ++ sd/source/ui/app/menuids3_tmpl.src | 16 sd/source/ui/app/popup.src | 2 sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx | 164 ---------- sd/source/ui/slidesorter/controller/SlsHideSlideFunction.hxx | 66 ---- sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx | 2 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 54 --- 14 files changed, 118 insertions(+), 277 deletions(-)
New commits: commit 05ec31ebe0b4a223f33a9c98f6bebba1234e05ea Author: Michael Meeks <michael.me...@suse.com> Date: Wed Apr 10 15:24:31 2013 +0100 add slide grouping / un-grouping hooks. Change-Id: I156dff8d91a073d9e6e281c26434c963456cddce diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index 00e5ed5..5108cc2 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 3fbf9cc..9828825 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 a366370..e012340 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 253b893..f62a023 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 1e83de0..25fa6f9 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 eef4bb9..cfe70f5 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 b027026..d847a5a 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 5d0afac..73d0eec 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 39a66c3..0b6b060 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); commit 0319ebf2426097d0b0cf5df808c8ec5abe42f692 Author: Michael Meeks <michael.me...@suse.com> Date: Wed Apr 10 15:13:22 2013 +0100 svidl: more helpful error message for missing slot / types. Change-Id: I89537f526e465137f5e8c17b4d7fd134ba59af4a diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 491d485..80d4400 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -182,6 +182,7 @@ void SvMetaName::ReadAttributesSvIdl( SvIdlDataBase & rBase, if( !SetName( aName.getString(), &rBase ) ) rInStm.Seek( nTokPos ); } + aHelpContext.ReadSvIdl( rBase, SvHash_HelpContext(), rInStm ); aHelpText.ReadSvIdl( rBase, rInStm ); aConfigName.ReadSvIdl( SvHash_ConfigName(), rInStm ); diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 3416266..d55083f 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -218,7 +218,13 @@ sal_Bool SvMetaAttribute::ReadSvIdl( SvIdlDataBase & rBase, bOk = SvMetaName::ReadSvIdl( rBase, rInStm ); } else - rBase.SetError( "unknown type", rInStm.GetToken() ); + { + SvToken *pTok = rInStm.GetToken(); + rBase.SetError( "unknown type of token. Each new SID needs an " + "item statement in an SDI file, eg. " + "SfxVoidItem FooItem " + pTok->GetTokenAsString() + + " ... which describes the slot more fully", pTok ); + } if( !bOk ) rInStm.Seek( nTokPos ); diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 8850d98..e0c6fe6 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -160,7 +160,7 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags ) void SvIdlDataBase::SetError( const OString& rError, SvToken * pTok ) { if( pTok->GetLine() > 10000 ) - aError.SetText( "hgchcg" ); + aError.SetText( "line count overflow" ); if( aError.nLine < pTok->GetLine() || (aError.nLine == pTok->GetLine() && aError.nColumn < pTok->GetColumn()) ) commit bb01f1c1d2b0ed9fbe1203536d6414d9b9355b31 Author: Michael Meeks <michael.me...@suse.com> Date: Wed Apr 10 12:47:19 2013 +0100 remove un-used code modules. Change-Id: Icd30d1d88d7ee89b5937ba39470b20ddf6e4290e diff --git a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx deleted file mode 100644 index f63973b..0000000 --- a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx +++ /dev/null @@ -1,164 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - - -#include "SlsHideSlideFunction.hxx" - -#include "SlideSorter.hxx" -#include "model/SlsPageEnumerationProvider.hxx" -#include "model/SlsPageDescriptor.hxx" -#include "view/SlideSorterView.hxx" - -#include "app.hrc" -#include "drawdoc.hxx" -#include "sdpage.hxx" -#include "ViewShell.hxx" - -#include <sfx2/viewfrm.hxx> -#include <sfx2/bindings.hxx> -#include <sfx2/request.hxx> -#include <svx/svxids.hrc> - -namespace sd { namespace slidesorter { namespace controller { - -TYPEINIT1(HideSlideFunction, SlideFunction); - -HideSlideFunction::HideSlideFunction ( - SlideSorter& rSlideSorter, - SfxRequest& rRequest) - : SlideFunction( rSlideSorter, rRequest), - mrSlideSorter(rSlideSorter) -{ -} - - - - -HideSlideFunction::~HideSlideFunction (void) -{ -} - - - - -FunctionReference HideSlideFunction::Create ( - SlideSorter& rSlideSorter, - SfxRequest& rRequest ) -{ - FunctionReference xFunc( new HideSlideFunction( rSlideSorter, rRequest ) ); - xFunc->DoExecute(rRequest); - return xFunc; -} - - - - -void HideSlideFunction::DoExecute (SfxRequest& rRequest) -{ - SlideFunction::DoExecute(rRequest); - - model::PageEnumeration aSelectedPages ( - model::PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel())); - - ExclusionState eState (UNDEFINED); - - switch (rRequest.GetSlot()) - { - case SID_HIDE_SLIDE: - eState = EXCLUDED; - break; - - case SID_SHOW_SLIDE: - eState = INCLUDED; - break; - - default: - eState = UNDEFINED; - break; - } - - if (eState != UNDEFINED) - { - // Set status at the selected pages. - aSelectedPages.Rewind (); - while (aSelectedPages.HasMoreElements()) - { - model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement()); - static_cast<view::SlideSorterView*>(mpView)->SetState( - pDescriptor, - model::PageDescriptor::ST_Excluded, - eState==EXCLUDED); - } - } - - SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings(); - rBindings.Invalidate (SID_PRESENTATION); - rBindings.Invalidate (SID_REHEARSE_TIMINGS); - rBindings.Invalidate (SID_HIDE_SLIDE); - rBindings.Invalidate (SID_SHOW_SLIDE); - mpDoc->SetChanged(); -} - - - - -HideSlideFunction::ExclusionState HideSlideFunction::GetExclusionState ( - model::PageEnumeration& rPageSet) -{ - ExclusionState eState (UNDEFINED); - sal_Bool bState; - - // Get toggle state of the selected pages. - while (rPageSet.HasMoreElements() && eState!=MIXED) - { - bState = rPageSet.GetNextElement()->GetPage()->IsExcluded(); - switch (eState) - { - case UNDEFINED: - // Use the first selected page to set the initial value. - eState = bState ? EXCLUDED : INCLUDED; - break; - - case EXCLUDED: - // The pages before where all not part of the show, - // this one is. - if ( ! bState) - eState = MIXED; - break; - - case INCLUDED: - // The pages before where all part of the show, - // this one is not. - if (bState) - eState = MIXED; - break; - - case MIXED: - default: - // No need to change anything. - break; - } - } - - return eState; -} - -} } } // end of namespace ::sd::slidesorter::controller - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.hxx b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.hxx deleted file mode 100644 index 8cb4054..0000000 --- a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.hxx +++ /dev/null @@ -1,66 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef SD_SLIDESORTER_HIDE_SLIDE_FUNCTION_HXX -#define SD_SLIDESORTER_HIDE_SLIDE_FUNCTION_HXX - -#include "controller/SlsSlideFunction.hxx" -#include "model/SlsPageEnumeration.hxx" - - -namespace sd { namespace slidesorter { namespace controller { - -/** Toggle the hidden flag of the selected slides. - When the selected pages have not all the same state they will all set to - hidden. When all selected pages have the same state this state is - toggled for all of them -*/ -class HideSlideFunction - : public SlideFunction -{ -public: - TYPEINFO(); - - virtual ~HideSlideFunction (void); - - static FunctionReference Create( SlideSorter& rSlideSorter, SfxRequest& rRequest ); - virtual void DoExecute( SfxRequest& rReq ); - - // The state of a set of slides with respect to being excluded from the - // slide show. - enum ExclusionState {UNDEFINED, EXCLUDED, INCLUDED, MIXED}; - - /** Return for the given set of slides whether they included are - excluded from the slide show. - */ - static ExclusionState GetExclusionState (model::PageEnumeration& rPageSet); - -protected: - HideSlideFunction ( - SlideSorter& rSlideSorter, - SfxRequest& rRequest); - - SlideSorter& mrSlideSorter; -}; - -} } } // end of namespace ::sd::slidesorter::controller - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits