diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-15 09:25:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-15 10:22:24 +0100 |
commit | 3962122a5810b7679abf03a7e0c15e56f0b3d9ab (patch) | |
tree | af1522f42eac8e4a556c56684f34bafe3b004e41 /sd | |
parent | 0d168764e0299f48ce56970092c990fd44355f8a (diff) |
callcatcher: update unused code
Change-Id: Ia2452eb82139039e1e6dc98e61ffb32b4091b94f
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/framework/configuration/ResourceId.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/framework/factories/TaskPanelResource.cxx | 132 | ||||
-rw-r--r-- | sd/source/ui/framework/tools/FrameworkHelper.cxx | 55 | ||||
-rw-r--r-- | sd/source/ui/inc/framework/FrameworkHelper.hxx | 11 | ||||
-rw-r--r-- | sd/source/ui/inc/framework/ResourceId.hxx | 11 | ||||
-rw-r--r-- | sd/source/ui/inc/framework/TaskPanelResource.hxx | 84 |
6 files changed, 0 insertions, 309 deletions
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx index fb1c771dc687..285ac6bf0edf 100644 --- a/sd/source/ui/framework/configuration/ResourceId.cxx +++ b/sd/source/ui/framework/configuration/ResourceId.cxx @@ -128,22 +128,6 @@ ResourceId::ResourceId ( ResourceId::ResourceId ( const OUString& rsResourceURL, - const ::std::vector<OUString>& rAnchorURLs) - : ResourceIdInterfaceBase(), - maResourceURLs(1+rAnchorURLs.size()), - mpURL() -{ - maResourceURLs[0] = rsResourceURL; - for (sal_uInt32 nIndex=0; nIndex<rAnchorURLs.size(); ++nIndex) - maResourceURLs[nIndex+1] = rAnchorURLs[nIndex]; - ParseResourceURL(); -} - - - - -ResourceId::ResourceId ( - const OUString& rsResourceURL, const OUString& rsFirstAnchorURL, const Sequence<OUString>& rAnchorURLs) : ResourceIdInterfaceBase(), diff --git a/sd/source/ui/framework/factories/TaskPanelResource.cxx b/sd/source/ui/framework/factories/TaskPanelResource.cxx deleted file mode 100644 index 754ae8cac580..000000000000 --- a/sd/source/ui/framework/factories/TaskPanelResource.cxx +++ /dev/null @@ -1,132 +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 "precompiled_sd.hxx" - -#include "framework/TaskPanelResource.hxx" - -#include <vcl/window.hxx> -#include <toolkit/helper/vclunohelper.hxx> - - -using namespace css; -using namespace cssu; -using namespace cssdf; - - -namespace sd { namespace framework { - -namespace { - ::Window* GetWindowForResource ( - ViewShellBase& rViewShellBase, - const cssu::Reference<cssdf::XResourceId>& rxResourceId) - { - ::Window* pWindow = NULL; - if (rxResourceId.is() && rxResourceId->getAnchor().is()) - { - ::boost::shared_ptr<FrameworkHelper> pFrameworkHelper (FrameworkHelper::Instance(rViewShellBase)); - Reference<awt::XWindow> xWindow ( - pFrameworkHelper->GetPaneWindow(rxResourceId->getAnchor()->getAnchor())); - pWindow = VCLUnoHelper::GetWindow(xWindow); - } - return pWindow; - } -} - - - - -TaskPanelResource::TaskPanelResource ( - sidebar::SidebarViewShell& rSidebarViewShell, - sidebar::PanelId ePanelId, - const Reference<XResourceId>& rxResourceId) - : TaskPanelResourceInterfaceBase(m_aMutex), - mxResourceId(rxResourceId), - mpControl(rSidebarViewShell.CreatePanel( - GetWindowForResource(rSidebarViewShell.GetViewShellBase(), rxResourceId), - ePanelId)) -{ - if (mpControl.get() != NULL) - { - mpControl->Show(); - mpControl->GetParent()->Show(); - mpControl->AddEventListener(LINK(this,TaskPanelResource,WindowEventHandler)); - } -} - - - - -TaskPanelResource::~TaskPanelResource (void) -{ - mpControl.reset(); -} - - - - -void SAL_CALL TaskPanelResource::disposing () -{ - mpControl.reset(); -} - - - - -Reference<XResourceId> SAL_CALL TaskPanelResource::getResourceId () - throw (css::uno::RuntimeException) -{ - return mxResourceId; -} - - - - -sal_Bool SAL_CALL TaskPanelResource::isAnchorOnly (void) - throw (RuntimeException) -{ - return false; -} - - - - -::Window* TaskPanelResource::GetControl (void) const -{ - return mpControl.get(); -} - - - - -IMPL_LINK(TaskPanelResource,WindowEventHandler,VclWindowEvent*,pEvent) -{ - if (pEvent!=NULL && pEvent->GetId()==SFX_HINT_DYING) - { - // Somebody else deleted the window. Release our reference so - // that we do not delete it again. - mpControl.release(); - return sal_True; - } - else - return sal_False; -} - -} } // end of namespace sd::framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx index 8d9f2848f9c6..009077679d00 100644 --- a/sd/source/ui/framework/tools/FrameworkHelper.cxx +++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx @@ -509,61 +509,6 @@ Reference<XView> FrameworkHelper::GetView (const Reference<XResourceId>& rxPaneO -Reference<awt::XWindow> FrameworkHelper::GetPaneWindow (const Reference<XResourceId>& rxPaneId) -{ - Reference<awt::XWindow> xWindow; - - if (rxPaneId.is() && mxConfigurationController.is()) - { - try - { - if (rxPaneId->getResourceURL().match(msPaneURLPrefix)) - { - Reference<XPane> xPane (mxConfigurationController->getResource(rxPaneId), UNO_QUERY); - if (xPane.is()) - xWindow = xPane->getWindow(); - } - } - catch (lang::DisposedException&) - { - Dispose(); - } - catch (RuntimeException&) - { - } - } - - return xWindow; -} - - - - -Reference<XResource> FrameworkHelper::GetResource (const Reference<XResourceId>& rxResourceId) -{ - Reference<XResource> xResource; - - if (rxResourceId.is() && mxConfigurationController.is()) - { - try - { - return mxConfigurationController->getResource(rxResourceId); - } - catch (lang::DisposedException&) - { - Dispose(); - } - catch (RuntimeException&) - { - } - } - - return NULL; -} - - - - Reference<XResourceId> FrameworkHelper::RequestView ( const OUString& rsResourceURL, const OUString& rsAnchorURL) diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx index b4778dc32810..ff9acf7dedd2 100644 --- a/sd/source/ui/inc/framework/FrameworkHelper.hxx +++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx @@ -194,17 +194,6 @@ public: cssu::Reference<cssdf::XView> GetView ( const cssu::Reference<cssdf::XResourceId>& rxPaneOrViewId); - /** Return the XWindow that is represented by the pane with the - given resource id. - */ - cssu::Reference<css::awt::XWindow> GetPaneWindow ( - const cssu::Reference<cssdf::XResourceId>& rxPaneId); - - /** Return the XResource object with the given resource id. - */ - cssu::Reference<cssdf::XResource> GetResource ( - const cssu::Reference<cssdf::XResourceId>& rxResourceId); - /** Request the specified view to be displayed in the specified pane. When the pane is not visible its creation is also requested. The update that creates the actual view object is done asynchronously. diff --git a/sd/source/ui/inc/framework/ResourceId.hxx b/sd/source/ui/inc/framework/ResourceId.hxx index a0f763fbc8b2..f851bbf2d210 100644 --- a/sd/source/ui/inc/framework/ResourceId.hxx +++ b/sd/source/ui/inc/framework/ResourceId.hxx @@ -82,17 +82,6 @@ public: const OUString& rsResourceURL, const OUString& rsAnchorURL); - /** Create a new resource id for the specified resource type and the - given list of anchor URLs. - @param rsResourceURL - The URL of the actual resource. - @param rsAnchorURLs - The possibly empty list of anchor URLs. - */ - ResourceId ( - const OUString& rsResourceURL, - const ::std::vector<OUString>& rAnchorURLs); - /** Create a new resource id with an anchor that consists of a sequence of URLs that is extended by a further URL. @param rsResourceURL diff --git a/sd/source/ui/inc/framework/TaskPanelResource.hxx b/sd/source/ui/inc/framework/TaskPanelResource.hxx deleted file mode 100644 index 0ac6356829ef..000000000000 --- a/sd/source/ui/inc/framework/TaskPanelResource.hxx +++ /dev/null @@ -1,84 +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 <cppuhelper/compbase1.hxx> -#include <cppuhelper/basemutex.hxx> - -#include "SidebarPanelId.hxx" - -#include <com/sun/star/drawing/framework/XResource.hpp> -#include <boost/scoped_ptr.hpp> - - -namespace css = ::com::sun::star; -namespace cssu = ::com::sun::star::uno; -namespace cssdf = ::com::sun::star::drawing::framework; - -class Window; - -namespace sd { namespace sidebar { - class SidebarViewShell; -} } - - -namespace sd { namespace framework { - -typedef ::cppu::WeakComponentImplHelper1 < - cssdf::XResource - > TaskPanelResourceInterfaceBase; - - -/** A simple wrapper around a legacy task pane control that gives - access to that control (via GetControl()). -*/ -class TaskPanelResource - : private ::cppu::BaseMutex, - public TaskPanelResourceInterfaceBase -{ -public: - /** Create a resource object that represents the legacy taskpane - panel. - @param rxResourceId - drawing framework resource id - @param pControl - The new TaskPanelResource object takes ownership for this control. - */ - TaskPanelResource ( - sidebar::SidebarViewShell& rSidebarViewShell, - sidebar::PanelId ePanelId, - const cssu::Reference<cssdf::XResourceId>& rxResourceId); - virtual ~TaskPanelResource (void); - virtual void SAL_CALL disposing (void); - - // XResource - virtual cssu::Reference<cssdf::XResourceId> SAL_CALL getResourceId (void) throw (cssu::RuntimeException); - virtual sal_Bool SAL_CALL isAnchorOnly () throw (cssu::RuntimeException); - - ::Window* GetControl (void) const; - -private: - const cssu::Reference<cssdf::XResourceId> mxResourceId; - // Using auto_ptr because it has release(), what scoped_ptr doesn't. - ::std::auto_ptr< ::Window> mpControl; - - DECL_LINK(WindowEventHandler,VclWindowEvent*); -}; - -} } // end of namespace sd::framework - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |