diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-09 11:59:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-09 13:17:28 +0100 |
commit | 69c842a4f3cd274c62b0539eb2bcbd3c0cc8879c (patch) | |
tree | ec69b6d52884d0f10e56677a18ffa074cb34a3c6 /sd | |
parent | 5089bdb234a93bcb62b597c18b8ab66048246b13 (diff) |
update unusedcode list
Change-Id: I201985753fc53f037807e7870c6786a442717d6e
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/framework/tools/FrameworkHelper.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/inc/ViewShellManager.hxx | 7 | ||||
-rw-r--r-- | sd/source/ui/inc/framework/FrameworkHelper.hxx | 10 | ||||
-rw-r--r-- | sd/source/ui/sidebar/AllMasterPagesSelector.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/MasterPagesSelector.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/RecentMasterPagesSelector.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SidebarShellManager.cxx | 176 | ||||
-rw-r--r-- | sd/source/ui/sidebar/SidebarShellManager.hxx | 116 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellManager.cxx | 40 |
13 files changed, 0 insertions, 370 deletions
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index f46f2aadf68a..8d9f2848f9c6 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -923,20 +923,6 @@ Reference<XResourceId> FrameworkHelper::CreateResourceId ( Reference<XResourceId> FrameworkHelper::CreateResourceId ( const OUString& rsResourceURL, - const OUString& rsFirstAnchorURL, - const OUString& rsSecondAnchorURL) -{ - ::std::vector<OUString> aAnchorURLs (2); - aAnchorURLs[0] = rsFirstAnchorURL; - aAnchorURLs[1] = rsSecondAnchorURL; - return new ::sd::framework::ResourceId(rsResourceURL, aAnchorURLs); -} - - - - -Reference<XResourceId> FrameworkHelper::CreateResourceId ( - const OUString& rsResourceURL, const Reference<XResourceId>& rxAnchorId) { if (rxAnchorId.is()) diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx index f4ba3467e647..fd3f734c1412 100644 --- a/sd/source/ui/inc/ViewShellManager.hxx +++ b/sd/source/ui/inc/ViewShellManager.hxx @@ -129,13 +129,6 @@ public: */ void DeactivateSubShell (const ViewShell& rParentShell, ShellId nId); - /** 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 - taken once off the stack and are then moved back on again.) - */ - void MoveSubShellToTop (const ViewShell& rParentShell, ShellId nId); - /** Send all sub shells of the specified view shell an Invalidate() call. This does not modify the shell stack. */ diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx index 33e88c94c616..b4778dc32810 100644 --- a/sd/source/ui/inc/framework/FrameworkHelper.hxx +++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx @@ -304,16 +304,6 @@ public: const OUString& rsResourceURL, const OUString& rsAnchorURL); - /** Create a new XResourceId object for the given resource URL and the - two given anchor URLs. - */ - static cssu::Reference< - cssdf::XResourceId> - CreateResourceId ( - const OUString& rsResourceURL, - const OUString& rsFirstAnchorURL, - const OUString& rsSecondAnchorURL); - /** Create a new XResourceId object for the given resource URL. */ static cssu::Reference< 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: */ diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx index 093e6e90e6ba..bfb8ef893439 100644 --- a/sd/source/ui/view/ViewShellManager.cxx +++ b/sd/source/ui/view/ViewShellManager.cxx @@ -123,7 +123,6 @@ 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 MoveSubShellToTop (const SfxShell& rParentShell, ShellId nId); void MoveToTop (const SfxShell& rParentShell); SfxShell* GetShell (ShellId nId) const; SfxShell* GetTopShell (void) const; @@ -302,17 +301,6 @@ void ViewShellManager::DeactivateViewShell (const ViewShell* pShell) -void ViewShellManager::MoveSubShellToTop ( - const ViewShell& rParentShell, - ShellId nId) -{ - if (mbValid) - mpImpl->MoveSubShellToTop(rParentShell, nId); -} - - - - void ViewShellManager::SetFormShell ( const ViewShell* pParentShell, FmFormShell* pFormShell, @@ -709,34 +697,6 @@ void ViewShellManager::Implementation::DeactivateSubShell ( -void ViewShellManager::Implementation::MoveSubShellToTop ( - const SfxShell& rParentShell, - ShellId nId) -{ - SubShellList::iterator iList (maActiveSubShells.find(&rParentShell)); - if (iList != maActiveSubShells.end()) - { - // Look up the sub shell. - SubShellSubList& rList (iList->second); - SubShellSubList::iterator iShell ( - ::std::find_if(rList.begin(),rList.end(), IsId(nId))); - if (iShell!=rList.end() && iShell!=rList.begin()) - { - SubShellSubList::value_type aEntry (*iShell); - rList.erase(iShell); - rList.push_front(aEntry); - } - } - else - { - // Ignore this call when there are no sub shells for the given - // parent shell. We could remember the sub shell to move to the top - // but we do not. Do call this method at a later time instead. - } -} - - - void ViewShellManager::Implementation::MoveToTop (const SfxShell& rShell) { ::osl::MutexGuard aGuard (maMutex); |