summaryrefslogtreecommitdiff
path: root/sd/source/ui/sidebar
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-09 11:59:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-09 13:17:28 +0100
commit69c842a4f3cd274c62b0539eb2bcbd3c0cc8879c (patch)
treeec69b6d52884d0f10e56677a18ffa074cb34a3c6 /sd/source/ui/sidebar
parent5089bdb234a93bcb62b597c18b8ab66048246b13 (diff)
update unusedcode list
Change-Id: I201985753fc53f037807e7870c6786a442717d6e
Diffstat (limited to 'sd/source/ui/sidebar')
-rw-r--r--sd/source/ui/sidebar/AllMasterPagesSelector.cxx1
-rw-r--r--sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx1
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx1
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.hxx1
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx1
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.hxx1
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx1
-rw-r--r--sd/source/ui/sidebar/SidebarShellManager.cxx176
-rw-r--r--sd/source/ui/sidebar/SidebarShellManager.hxx116
9 files changed, 0 insertions, 299 deletions
diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
index 6e83aa23768b..1b74b8f16c66 100644
--- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
@@ -20,7 +20,6 @@
#include "AllMasterPagesSelector.hxx"
#include "PreviewValueSet.hxx"
#include "ViewShellBase.hxx"
-#include "SidebarShellManager.hxx"
#include "MasterPageContainer.hxx"
#include "MasterPageDescriptor.hxx"
#include "app.hrc"
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index dfe4b7c5b073..2295bc90a998 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -20,7 +20,6 @@
#include "CurrentMasterPagesSelector.hxx"
#include "PreviewValueSet.hxx"
#include "ViewShellBase.hxx"
-#include "SidebarShellManager.hxx"
#include "DrawViewShell.hxx"
#include "drawdoc.hxx"
#include "sdpage.hxx"
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index be13bda0fdeb..ea5ad828ba7d 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -19,7 +19,6 @@
#include "LayoutMenu.hxx"
-#include "SidebarShellManager.hxx"
#include "app.hrc"
#include "drawdoc.hxx"
#include "framework/FrameworkHelper.hxx"
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index b61550fc3adc..e35e3c9a7ada 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -58,7 +58,6 @@ namespace sd { namespace sidebar {
class ControlFactory;
class SidebarViewShell;
-class SidebarShellManager;
class LayoutMenu
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 38b9b5cf534c..783d4ed2b5fa 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -21,7 +21,6 @@
#include "MasterPageContainer.hxx"
#include "DocumentHelper.hxx"
-#include "SidebarShellManager.hxx"
#include "pres.hxx"
#include "drawdoc.hxx"
#include "DrawDocShell.hxx"
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.hxx b/sd/source/ui/sidebar/MasterPagesSelector.hxx
index 83e8091a66e7..1c5b085cdcde 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.hxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.hxx
@@ -49,7 +49,6 @@ class ViewShellBase;
namespace sd { namespace sidebar {
class PreviewValueSet;
-class SidebarShellManager;
/** Base class of a menu that lets the user select from a list of
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 29ed781e30d5..6bf653058c87 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -23,7 +23,6 @@
#include "RecentlyUsedMasterPages.hxx"
#include "MasterPageContainerProviders.hxx"
#include "MasterPageObserver.hxx"
-#include "SidebarShellManager.hxx"
#include "sdpage.hxx"
#include "drawdoc.hxx"
#include "app.hrc"
diff --git a/sd/source/ui/sidebar/SidebarShellManager.cxx b/sd/source/ui/sidebar/SidebarShellManager.cxx
deleted file mode 100644
index 526389e42a8e..000000000000
--- a/sd/source/ui/sidebar/SidebarShellManager.cxx
+++ /dev/null
@@ -1,176 +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 "TaskPaneShellManager.hxx"
-
-#include "SidebarShellManager.hxx"
-#include "ViewShellManager.hxx"
-#include <tools/diagnose_ex.h>
-#include <vcl/window.hxx>
-
-#include <algorithm>
-
-namespace sd { namespace sidebar {
-
-SidebarShellManager::SidebarShellManager (
- const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager,
- const ViewShell& rViewShell)
- : mpViewShellManager(rpViewShellManager),
- mrViewShell(rViewShell),
- maSubShells()
-{
-}
-
-
-
-
-SidebarShellManager::~SidebarShellManager (void)
-{
- while ( ! maSubShells.empty())
- RemoveSubShell(maSubShells.begin()->second.mpShell);
-}
-
-
-
-
-SfxShell* SidebarShellManager::CreateShell( ShellId nId, ::Window* , FrameView* )
-{
- SubShells::const_iterator iShell (maSubShells.find(nId));
- if (iShell != maSubShells.end())
- return iShell->second.mpShell;
- else
- return NULL;
-}
-
-
-
-
-void SidebarShellManager::ReleaseShell (SfxShell* )
-{
- // Nothing to do.
-}
-
-void SidebarShellManager::AddSubShell (
- ShellId nId,
- SfxShell* pShell,
- ::Window* pWindow)
-{
- if (pShell != NULL)
- {
- maSubShells[nId] = ShellDescriptor(pShell,pWindow);
- if (pWindow != NULL)
- {
- pWindow->AddEventListener(LINK(this,SidebarShellManager,WindowCallback));
- if (pWindow->IsReallyVisible())
- mpViewShellManager->ActivateSubShell(mrViewShell, nId);
- }
- else
- mpViewShellManager->ActivateSubShell(mrViewShell, nId);
- }
-}
-
-
-
-
-void SidebarShellManager::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, SidebarShellManager, WindowCallback ) );
- }
- mpViewShellManager->DeactivateSubShell( mrViewShell, pos->first );
- maSubShells.erase( pos );
-}
-
-
-
-
-void SidebarShellManager::RemoveSubShell (const SfxShell* pShell)
-{
- if (pShell != NULL)
- {
- SubShells::iterator iShell;
- for (iShell=maSubShells.begin(); iShell!=maSubShells.end(); ++iShell)
- if (iShell->second.mpShell == pShell)
- {
- if (iShell->second.mpWindow != NULL)
- iShell->second.mpWindow->RemoveEventListener(
- LINK(this,SidebarShellManager,WindowCallback));
- mpViewShellManager->DeactivateSubShell(mrViewShell,iShell->first);
- maSubShells.erase(iShell);
- break;
- }
- }
-}
-
-
-
-
-void SidebarShellManager::MoveToTop (SfxShell* pShell)
-{
- SubShells::const_iterator iShell;
- for (iShell=maSubShells.begin(); iShell!=maSubShells.end(); ++iShell)
- if (iShell->second.mpShell == pShell)
- {
- ViewShellManager::UpdateLock aLocker (mpViewShellManager);
- mpViewShellManager->MoveSubShellToTop(mrViewShell,iShell->first);
- mpViewShellManager->MoveToTop(mrViewShell);
- break;
- }
-}
-
-
-
-
-IMPL_LINK(SidebarShellManager, WindowCallback, VclWindowEvent*, pEvent)
-{
- if (pEvent != NULL)
- {
- SubShells::const_iterator iShell;
- ::Window* pWindow = pEvent->GetWindow();
- for (iShell=maSubShells.begin(); iShell!=maSubShells.end(); ++iShell)
- if (iShell->second.mpWindow == pWindow)
- break;
- if (iShell != maSubShells.end())
- switch (pEvent->GetId())
- {
- case VCLEVENT_WINDOW_SHOW:
- mpViewShellManager->ActivateSubShell(mrViewShell,iShell->first);
- break;
-
- case VCLEVENT_WINDOW_HIDE:
- // Do not activate the sub shell. This leads to
- // problems with shapes currently being in text edit
- // mode: Deactivating the shell leads to leaving the
- // text editing mode.
- // mpViewShellManager->DeactivateSubShell(mrViewShell,iShell->first);
- break;
- }
- }
-
- return 0;
-}
-
-
-} } // end of namespace ::sd::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/sidebar/SidebarShellManager.hxx b/sd/source/ui/sidebar/SidebarShellManager.hxx
deleted file mode 100644
index eec84c60620d..000000000000
--- a/sd/source/ui/sidebar/SidebarShellManager.hxx
+++ /dev/null
@@ -1,116 +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_SIDEBAR_SHELL_MANAGER_HXX
-#define SD_SIDEBAR_SHELL_MANAGER_HXX
-
-#include "ShellFactory.hxx"
-#include "ViewShellManager.hxx"
-#include <tools/link.hxx>
-#include <map>
-
-class FrameView;
-class SfxShell;
-class VclWindowEvent;
-class Window;
-
-namespace sd {
-class ViewShell;
-}
-
-namespace sd { namespace sidebar {
-
-/** 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
- ToolPanelViewShell. Life time control of the sub shells is managed by
- the sub shells themselves.
-*/
-class SidebarShellManager
- : public ShellFactory<SfxShell>
-{
-public:
- /** Create a shell manager that manages the stacked shells for the given
- view shell. It works together with the given view shell manager.
- */
- SidebarShellManager (
- const ::boost::shared_ptr<ViewShellManager>& rpViewShellManager,
- const ViewShell& rViewShell);
- ~SidebarShellManager (void);
-
- /** Return the requested sub shell.
- @param nId
- The id of the requested sub shell.
- @return
- When there is no sub shell currently registered under the given
- id then NULL is returned.
- */
- virtual SfxShell* CreateShell (
- ShellId nId,
- ::Window* pParentWindow,
- FrameView* pFrameView = NULL);
-
- virtual void ReleaseShell (SfxShell* pShell);
-
- /** Add a sub shell to the set of sub shells managed by the
- TaskPaneShellManager. Only shells added by this method are returned
- by CreateShell().
- */
- void AddSubShell (ShellId nId, SfxShell* pShell, ::Window* pWindow);
-
- /** Remove the given shell from the set of sub shells managed by the
- TaskPaneShellManager. Following calls to CreateShell() will return
- 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
- to the top of the global shell stack.
- */
- void MoveToTop (SfxShell* pShell);
-
- DECL_LINK(WindowCallback,VclWindowEvent*);
-
-private:
- ::boost::shared_ptr<ViewShellManager> mpViewShellManager;
-
- /// The view shell whose sub-shells this class manages.
- const ViewShell& mrViewShell;
-
- class ShellDescriptor { public:
- SfxShell* mpShell;
- ::Window* mpWindow;
- ShellDescriptor(void) : mpShell(NULL),mpWindow(NULL){}
- ShellDescriptor(SfxShell*pShell,::Window*pWindow) : mpShell(pShell),mpWindow(pWindow){}
- };
- typedef ::std::map<ShellId,ShellDescriptor> SubShells;
- SubShells maSubShells;
-};
-
-} } // end of namespace ::sd::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */