summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-20 16:03:40 +0200
committerNoel Grandin <noel@peralex.com>2015-10-20 16:16:45 +0200
commitecb79b93717340b67c44e587416222f6d570aac3 (patch)
tree9deca8237eb1cfc7061917a1ea7bae2b4134acad
parentda88c8b78428b30e6a4f9bc3e1e734b37e45cb2d (diff)
remove SlideSorterCache debug facility, and with it, the last Link<>
nobody has used it, or enabled it, in a very long time Change-Id: Ic36ff45086f7f7c9098c618d21cb6fc7cd7a46df
-rw-r--r--sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx184
-rw-r--r--sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx198
-rw-r--r--sd/source/ui/inc/taskpane/TitleBar.hxx1
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx10
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx1
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx1
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx3
7 files changed, 0 insertions, 398 deletions
diff --git a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx b/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
deleted file mode 100644
index d31764da9786..000000000000
--- a/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
+++ /dev/null
@@ -1,184 +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 INCLUDED_SD_SOURCE_UI_INC_TASKPANE_SLIDESORTERCACHEDISPLAY_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_SLIDESORTERCACHEDISPLAY_HXX
-
-// Uncomment the define below to activate the slide sorter cache display in
-// the task pane. Visible slide previews are displayed as large rectangles,
-// off-screen previews as smaller rectangles. The color shows the state:
-// green for no action, different shades of yellow for a request being in
-// the queue, pink for currently being rendered. A diagonal line indicates
-// that the preview is not up-to-date.
-#ifdef DEBUG
-//#define USE_SLIDE_SORTER_CACHE_DISPLAY
-#endif
-
-#ifdef USE_SLIDE_SORTER_CACHE_DISPLAY
-#include <taskpane/TaskPaneTreeNode.hxx>
-
-#include <map>
-#include <vector>
-
-namespace vcl { class Window; }
-
-#include "svx/svdpage.hxx"
-#include "drawdoc.hxx"
-
-namespace sd { namespace toolpanel {
-
-class TreeNode;
-
-/** This panel demonstrates how to create a panel for the task pane.
-*/
-class SlideSorterCacheDisplay
- : public TreeNode
-{
-public:
- SlideSorterCacheDisplay (const SdDrawDocument* pDocument);
- virtual ~SlideSorterCacheDisplay();
-
- void SetParentWindow (vcl::Window* pParentWindow);
-
- virtual void Paint (const Rectangle& rBoundingBox);
- virtual void Resize();
-
- static SlideSorterCacheDisplay* Instance (const SdDrawDocument* pDocument);
-
- void SetPageCount (sal_Int32 nPageCount);
- enum PageStatus {
- NONE,
- IN_QUEUE_PRIORITY_0,
- IN_QUEUE_PRIORITY_1,
- IN_QUEUE_PRIORITY_2,
- RENDERING
- };
- void SetPageStatus (sal_Int32 nPageIndex, PageStatus eStatus);
- void SetPageVisibility (sal_Int32 nPageIndex, bool bVisible);
- void SetUpToDate (sal_Int32 nPageIndex, bool bUpToDate);
-
- virtual Size GetPreferredSize();
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual vcl::Window* GetWindow();
- virtual bool IsResizable();
- virtual bool IsExpandable() const;
- virtual bool IsExpanded() const;
-
-private:
- static ::std::map<const SdDrawDocument*, SlideSorterCacheDisplay*> maDisplays;
- static void AddInstance (const SdDrawDocument* pDocument, SlideSorterCacheDisplay* pControl);
- static void RemoveInstance (SlideSorterCacheDisplay* pControl);
-
- VclPtr<vcl::Window> mpWindow;
- sal_Int32 mnPageCount;
- sal_Int32 mnColumnCount;
- sal_Int32 mnRowCount;
- Size maCellSize;
- sal_Int32 mnHorizontalBorder;
- sal_Int32 mnVerticalBorder;
- sal_Int32 mnHorizontalGap;
- sal_Int32 mnVerticalGap;
-
- class PageDescriptor
- {
- public:
- PageStatus meStatus;
- bool mbVisible;
- bool mbUpToDate;
- };
- typedef ::std::vector<PageDescriptor> PageDescriptorList;
- PageDescriptorList maPageDescriptors;
-
- Rectangle GetPageBox (sal_Int32 nPageIndex);
-
- void ProvideSize (sal_Int32 nPageIndex);
-
- void PaintPage (sal_Int32 nPageIndex);
-};
-
-} } // end of namespace ::sd::toolpanel
-
-namespace {
-
-void SscdSetStatus (const SdrPage* pPage,
- ::sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus)
-{
- ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
- = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
- dynamic_cast<SdDrawDocument*>(pPage->GetModel()));
- if (pDisplay != NULL)
- pDisplay->SetPageStatus((pPage->GetPageNum()-1)/2, eStatus);
-}
-
-void SscdSetRequestClass (const SdrPage* pPage, sal_Int32 nClass)
-{
- sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus;
- switch (nClass)
- {
- case 0:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_0; break;
- case 1:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_1; break;
- case 2:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_2; break;
- default:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::NONE; break;
- }
- SscdSetStatus(pPage,eStatus);
-}
-
-void SscdSetVisibility (const SdrModel* pModel, sal_Int32 nIndex, bool bVisible)
-{
- ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
- = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
- dynamic_cast<const SdDrawDocument*>(pModel));
- if (pDisplay != NULL)
- pDisplay->SetPageVisibility(nIndex, bVisible);
-}
-
-void SscdSetUpToDate (const SdrPage* pPage, bool bUpToDate)
-{
- ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
- = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
- dynamic_cast<const SdDrawDocument*>(pPage->GetModel()));
- if (pDisplay != NULL)
- pDisplay->SetUpToDate((pPage->GetPageNum()-1)/2, bUpToDate);
-}
-
-#define SSCD_SET_REQUEST_CLASS(Page,RequestClass) \
- SscdSetRequestClass(Page,RequestClass)
-#define SSCD_SET_STATUS(RequestData,Status) \
- SscdSetStatus(RequestData,::sd::toolpanel::SlideSorterCacheDisplay::Status)
-#define SSCD_SET_VISIBILITY(Model,Index,Visible) \
- SscdSetVisibility(Model,Index,Visible)
-
-}
-
-#else
-
-#define SSCD_SET_REQUEST_CLASS(Page,RequestClass)
-#define SSCD_SET_STATUS(RequestData,Status)
-#define SSCD_SET_VISIBILITY(Model,Index,Visible)
-
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx b/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
deleted file mode 100644
index 2a1bde9438da..000000000000
--- a/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
+++ /dev/null
@@ -1,198 +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 INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TASKPANETREENODE_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TASKPANETREENODE_HXX
-
-#include "ILayoutableWindow.hxx"
-#include <memory>
-#include <vector>
-#include <com/sun/star/accessibility/XAccessible.hpp>
-#include <tools/link.hxx>
-
-namespace sd { namespace toolpanel {
-
-class ControlContainer;
-class TaskPaneShellManager;
-
-enum TreeNodeStateChangeEventId {
- EID_CHILD_ADDED,
- EID_ALL_CHILDREN_REMOVED,
- EID_EXPANSION_STATE_CHANGED,
- EID_FOCUSED_STATE_CHANGED,
- EID_SHOWING_STATE_CHANGED
-};
-
-/** Base class for all members of the object hierarchy that makes up the
- tool panel. In the task pane, there are multiple hierarchies of such nodes,
- with every panel having an own tree. The pane node is the root of the tree, below
- that there are SubToolPanels and Window/Control objects. At the
- lowest level there are only Window or Control objects.
-
- This class provides the means of communication between objects on
- different levels.
-*/
-class TreeNode
- : public ILayoutableWindow,
- public ILayouter
-{
-public:
- TreeNode (TreeNode* pParent);
- virtual ~TreeNode();
-
- void SetParentNode (TreeNode* pNewParent);
- TreeNode* GetParentNode();
-
- /** Return the Window pointer of a tree node.
- */
- virtual vcl::Window* GetWindow();
-
- /** Return a const pointer to the window of a tree node.
- */
- virtual const vcl::Window* GetConstWindow() const;
-
- /** Return the joined minimum width of all children, i.e. the largest of
- the minimum widths.
- */
- virtual sal_Int32 GetMinimumWidth();
-
- /** The default implementation always returns <FALSE/>
- */
- virtual bool IsResizable();
-
- /** Call this method whenever the size of one of the children of the
- called node has to be changed, e.g. when the layout menu shows more
- or less items than before. As a typical result the node will layout
- and resize its children according to their size requirements.
-
- Please remember that the size of the children can be changed in the
- first place because scroll bars can give a node the space it needs.
-
- The default implementation passes this call to its parent.
- */
- virtual void RequestResize();
-
- /** The default implementation shows the window (when it exists) when
- bExpansionState is <TRUE/>. It hides the window otherwise.
- @return
- Returns <TRUE/> when the expansion state changes. When an
- expansion state is requested that is already in place then
- <FALSE/> is returned.
- */
- virtual bool Expand (bool bExpansionState);
-
- /** The default implementation returns whether the window is showing.
- When there is no window then it returns <FALSE/>.
- */
- virtual bool IsExpanded() const;
-
- /** Return whether the node can be expanded or collapsed. The default
- implementation always returns <TRUE/> when there is window and
- <FALSE/> otherwise. If <FALSE/> is returned
- then Expand() may be called but it will not change the expansion
- state.
- */
- virtual bool IsExpandable() const;
-
- /** The default implementation calls GetWindow()->Show().
- */
- virtual void Show (bool bVisibilityState);
-
- /** The default implementation returns GetWindow()->IsVisible().
- */
- virtual bool IsShowing() const;
-
- ControlContainer& GetControlContainer();
-
- /** Give each node access to a shell manage. This usually is the shell
- manager of the ToolPanelViewShell.
-
- At least the root node has to overwrite this method since the
- default implementation simply returns the shell manager of its
- parent.
- */
- virtual TaskPaneShellManager* GetShellManager();
-
- /** You will rarely need to override this method. To supply your own
- accessible object you should override CreateAccessible() instead.
- */
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> GetAccessibleObject();
-
- /** Override this method in order to supply a class specific accessible
- object.
- The default implementation will return a new instance of
- AccessibleTreeNode.
- @param rxParent
- The accessible parent of the accessible object to create. It is
- not necessaryly the accessible object of the parent window of
- GetWindow().
-
- */
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>&rxParent);
-
- /** Add a listener that will be informatted in the future about state
- changes of the tree node. This includes adding and removing
- children as well as focus, visibility, and expansion state.
- Multiple calls are ignored. Each listener is added only once.
- */
- void AddStateChangeListener (const Link<>& rListener);
-
- /** Call the state change listeners and pass a state change event with
- the specified event id. The source field is set to this.
- @param pChild
- This optional parameter makes sense only with the
- EID_CHILD_ADDED event.
- */
- void FireStateChangeEvent (
- TreeNodeStateChangeEventId eEventId,
- TreeNode* pChild = NULL) const;
-
-protected:
- ::std::unique_ptr<ControlContainer> mpControlContainer;
-
-private:
- TreeNode* mpParent;
-};
-
-/** Objects of this class are sent to listeners to notify them about state
- changes of a tree node.
-*/
-class TreeNodeStateChangeEvent
-{
-public:
-
- TreeNodeStateChangeEvent (
- const TreeNode& rNode,
- TreeNodeStateChangeEventId eEventId,
- TreeNode* pChild = NULL);
-
- const TreeNode& mrSource;
- TreeNodeStateChangeEventId meEventId;
- TreeNode* mpChild;
-};
-
-} } // end of namespace ::sd::toolpanel
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/taskpane/TitleBar.hxx b/sd/source/ui/inc/taskpane/TitleBar.hxx
index bb4088f50976..8f5c1c640ee7 100644
--- a/sd/source/ui/inc/taskpane/TitleBar.hxx
+++ b/sd/source/ui/inc/taskpane/TitleBar.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TITLEBAR_HXX
#define INCLUDED_SD_SOURCE_UI_INC_TASKPANE_TITLEBAR_HXX
-#include "taskpane/TaskPaneTreeNode.hxx"
#include <vcl/image.hxx>
#include <vcl/window.hxx>
#include <memory>
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index 19fbc99cb769..b46a593f94b2 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -127,8 +127,6 @@ void RequestQueue::AddRequest (
pPage->AddPageUser(*this);
}
- SSCD_SET_REQUEST_CLASS(aKey,eRequestClass);
-
#if OSL_DEBUG_LEVEL >=2
SAL_INFO("sd.sls", OSL_THIS_FUNC << ": " << (bRemoved?"replaced":"added")
<< " request for page " << ((aKey->GetPageNum()-1)/2)
@@ -166,11 +164,6 @@ bool RequestQueue::RemoveRequest (
mpRequestQueue->erase(aRequestIterator);
bRequestWasRemoved = true;
-
- if (bRequestWasRemoved)
- {
- SSCD_SET_STATUS(aKey,NONE);
- }
}
else
break;
@@ -195,7 +188,6 @@ void RequestQueue::ChangeClass (
if (iRequest!=mpRequestQueue->end() && iRequest->meClass!=eNewRequestClass)
{
AddRequest(aKey, eNewRequestClass, true);
- SSCD_SET_REQUEST_CLASS(aKey,eNewRequestClass);
}
}
@@ -227,8 +219,6 @@ void RequestQueue::PopFront()
if ( ! mpRequestQueue->empty())
{
- SSCD_SET_STATUS(maRequestQueue.begin()->mpData->GetPage(),NONE);
-
Container::const_iterator aIter(mpRequestQueue->begin());
SdrPage *pPage = const_cast<SdrPage*>(aIter->maKey);
pPage->RemovePageUser(*this);
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
index ac0d5f0d5fbb..01e278db5bfa 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
@@ -22,7 +22,6 @@
#include "SlsRequestPriorityClass.hxx"
#include "cache/SlsCacheContext.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
#include <drawdoc.hxx>
#include <osl/mutex.hxx>
#include <svx/sdrpageuser.hxx>
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 900316600168..94b1aa8272da 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -28,7 +28,6 @@
#include "controller/SlsCurrentSlideManager.hxx"
#include "controller/SlsSlotManager.hxx"
#include "view/SlideSorterView.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index f6f96e0fad17..70b625df6e22 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -39,7 +39,6 @@
#include "cache/SlsPageCache.hxx"
#include "cache/SlsPageCacheManager.hxx"
#include "cache/SlsCacheContext.hxx"
-#include "taskpane/SlideSorterCacheDisplay.hxx"
#include "DrawDocShell.hxx"
#include "PaneDockingWindow.hxx"
@@ -520,8 +519,6 @@ void SlideSorterView::UpdatePreciousFlags()
pCache->SetPreciousFlag(
pDescriptor->GetPage(),
maVisiblePageRange.IsInside(nIndex));
- SSCD_SET_VISIBILITY(mrModel.GetDocument(), nIndex,
- maVisiblePageRange.IsInside(nIndex));
}
else
{