summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-04-10 12:47:19 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-04-10 12:47:19 +0100
commitbb01f1c1d2b0ed9fbe1203536d6414d9b9355b31 (patch)
tree4c19cfb840ac99ae4304f081d54f3262cd7e6fc1
parentinitial, horrible attempt at slidejockey / search pane. (diff)
downloadcore-bb01f1c1d2b0ed9fbe1203536d6414d9b9355b31.tar.gz
core-bb01f1c1d2b0ed9fbe1203536d6414d9b9355b31.zip
remove un-used code modules.
Change-Id: Icd30d1d88d7ee89b5937ba39470b20ddf6e4290e
-rw-r--r--sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx164
-rw-r--r--sd/source/ui/slidesorter/controller/SlsHideSlideFunction.hxx66
2 files changed, 0 insertions, 230 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx b/sd/source/ui/slidesorter/controller/SlsHideSlideFunction.cxx
deleted file mode 100644
index f63973b09b46..000000000000
--- 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 8cb4054f1a1f..000000000000
--- 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: */