From 41cb4f9adeb32ce628e87afaaafef72dbcbcb0ff Mon Sep 17 00:00:00 2001
From: Santiago Martinez <smvarela@gmail.com>
Date: Sat, 14 Apr 2012 20:11:30 +0200
Subject: [PATCH] Remove unused code in sd.

---
 .../controller/SlsSelectionFunction.cxx            |   29 --------------------
 sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx |    1 -
 .../ui/slidesorter/inc/view/SlsFontProvider.hxx    |    8 -----
 sd/source/ui/slidesorter/view/SlsButtonBar.cxx     |    8 -----
 sd/source/ui/slidesorter/view/SlsFontProvider.cxx  |   29 --------------------
 unusedcode.easy                                    |    3 --
 6 files changed, 0 insertions(+), 78 deletions(-)

diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 5849b1c..54aa95b 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -139,9 +139,6 @@ public:
         const AcceptDropEvent& rEvent,
         const sal_Int8 nDragAction,
         SlideSorter& rSlideSorter);
-    EventDescriptor (
-        const KeyEvent& rEvent,
-        SlideSorter& rSlideSorter);
 
 private:
     /** Compute a numerical code that describes a mouse event and that can
@@ -977,32 +974,6 @@ SelectionFunction::EventDescriptor::EventDescriptor (
 
 
 
-SelectionFunction::EventDescriptor::EventDescriptor (
-    const KeyEvent& rEvent,
-    SlideSorter& rSlideSorter)
-    : maMousePosition(),
-      maMouseModelPosition(),
-      mpHitDescriptor(),
-      mpHitPage(),
-      mnEventCode(KEY_EVENT),
-      mbIsOverButton(rSlideSorter.GetView().GetButtonBar().IsMouseOverButton()),
-      meDragMode(InsertionIndicatorHandler::MoveMode),
-      mbMakeSelectionVisible(true),
-      mbIsLeaving(false)
-{
-    model::SharedPageDescriptor pHitDescriptor (
-        rSlideSorter.GetController().GetFocusManager().GetFocusedPageDescriptor());
-    if (pHitDescriptor.get() != NULL)
-    {
-        mpHitPage = pHitDescriptor->GetPage();
-        mpHitDescriptor = pHitDescriptor;
-    }
-
-    mnEventCode |= EncodeKeyEvent(rEvent) | EncodeState();
-}
-
-
-
 
 sal_uInt32 SelectionFunction::EventDescriptor::EncodeMouseEvent (
     const MouseEvent& rEvent) const
diff --git a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
index afa7781..e4ced0b 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsButtonBar.hxx
@@ -218,7 +218,6 @@ public:
     virtual Size GetSize (void) const = 0;
     virtual Size GetSize (const IconSize eIconSize) const = 0;
     ::rtl::OUString GetHelpText (void) const;
-    bool IsDown (void) const;
     void SetActiveState (const bool bIsActive);
     bool IsActive (void) const;
     void SetIconSize (const IconSize eIconSize);
diff --git a/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx b/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx
index 8248747..2e2513c 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsFontProvider.hxx
@@ -54,14 +54,6 @@ public:
     */
     static FontProvider& Instance (void);
 
-    /** Return a font that is scaled according to the current map mode of
-        the given device.  Repeated calls with a device, not necessarily the
-        same device, with the same map mode will return the same font.  The
-        first call with a different map mode will release the old font and
-        create a new one that is correctly scaled.
-    */
-    SharedFontPointer GetFont (const OutputDevice& rDevice);
-
     /** Call this method to tell an object to release its currently used
         font.  The next call to GetFont() will then create a new one.
         Typically called after a DataChange event when for instance a system
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
index 919f812..cade51b 100644
--- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -929,14 +929,6 @@ Rectangle Button::GetBoundingBox (void) const
 
 
 
-bool Button::IsDown (void) const
-{
-    return mbIsActive && meState==State_Down;
-}
-
-
-
-
 void Button::SetActiveState (const bool bIsActive)
 {
     mbIsActive = bIsActive;
diff --git a/sd/source/ui/slidesorter/view/SlsFontProvider.cxx b/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
index 1e28546..9356d68 100644
--- a/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
+++ b/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
@@ -98,35 +98,6 @@ void FontProvider::Invalidate (void)
 
 
 
-
-FontProvider::SharedFontPointer FontProvider::GetFont (const OutputDevice& rDevice)
-{
-    // Reset the font when the map mode has changed since its creation.
-    if (maMapMode != rDevice.GetMapMode())
-        maFont.reset();
-
-    if (maFont.get() == NULL)
-    {
-        // Initialize the font from the application style settings.
-        maFont.reset(new Font (Application::GetSettings().GetStyleSettings().GetAppFont()));
-        maFont->SetTransparent(sal_True);
-        maFont->SetWeight(WEIGHT_NORMAL);
-
-        // Transform the point size to pixel size.
-        MapMode aFontMapMode (MAP_POINT);
-        Size aFontSize (rDevice.LogicToPixel(maFont->GetSize(), aFontMapMode));
-
-        // Transform the font size to the logical coordinates of the device.
-        maFont->SetSize (rDevice.PixelToLogic(aFontSize));
-
-        // Remember the map mode of the given device to detect different
-        // devices or modified zoom scales on future calls.
-        maMapMode = rDevice.GetMapMode();
-    }
-
-    return maFont;
-}
-
 } } }  // end of namespace ::sd::slidesorter::view
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index e92652b..60a5da1 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -768,9 +768,6 @@ sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
 sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
 sd::ToolPanelPaneShell::RegisterInterface(SfxModule*)
 sd::ViewShellBase::RegisterFactory(unsigned short)
-sd::slidesorter::controller::SelectionFunction::EventDescriptor::EventDescriptor(KeyEvent const&, sd::slidesorter::SlideSorter&)
-sd::slidesorter::view::Button::IsDown() const
-sd::slidesorter::view::FontProvider::GetFont(OutputDevice const&)
 sdext::presenter::PresenterAnimation::PresenterAnimation(unsigned long, unsigned long, unsigned long)
 sdr::animation::Scheduler::Reset(unsigned int)
 sdr::contact::ViewContactOfPageObj::GetReferencedPage() const
-- 
1.7.7.6

