[Libreoffice-commits] core.git: Branch 'feature/slidehack' - 2 commits - sd/source

Michael Meeks michael.meeks at suse.com
Fri Apr 12 09:43:15 PDT 2013


 sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx    |   22 -
 sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx     |    7 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx              |  144 -------
 sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx |    3 
 sd/source/ui/slidesorter/view/SlsLayouter.cxx                  |   23 -
 sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx        |   40 --
 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx         |  188 ++--------
 7 files changed, 98 insertions(+), 329 deletions(-)

New commits:
commit fdb1e019e30a40d81754ddd4c6846d08b19c83fd
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Apr 12 16:31:48 2013 +0100

    slide-sorter: re-factor to improve bbox calcuation
    
    Always use a SlsPageDescriptor to calculate bbox, so we can
    adapt it to merge slides attributes where possible.
    
    Change-Id: Id71945bbbb9adb069654ab712e22ea79fea96c1f

diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
index 1c50da9..16c7a2a 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx
@@ -95,22 +95,30 @@ public:
         @param eCoodinateSystem
             The bounding box can be returned in model and in pixel
             (window) coordinates.
+        @param bIgnoreLocation
+            Return a position ignoring the slides' location, ie. as if
+            we were the first slide.
     */
     Rectangle GetBoundingBox (
         const model::SharedPageDescriptor& rpPageDescriptor,
         const Part ePart,
-        const CoordinateSystem eCoordinateSystem);
+        const CoordinateSystem eCoordinateSystem,
+        bool bIgnoreLocation = false);
+
+    /// the size of the embedded preview: position independent
+    Size GetPreviewSize(const CoordinateSystem eCoordinateSystem);
+
+    /// the maximum size of each tile, also position independent
+    Size GetGridMaxSize(const CoordinateSystem eCoordinateSystem);
+
+    Image GetTransitionEffectIcon (void) const;
+
+private:
     Rectangle GetBoundingBox (
         const Point& rPageObjectLocation,
         const Part ePart,
         const CoordinateSystem eCoordinateSystem);
-    Size GetSize (
-        const Part ePart,
-        const CoordinateSystem eCoordinateSystem);
 
-    Image GetTransitionEffectIcon (void) const;
-
-private:
     SharedSdWindow mpWindow;
     Size maPageObjectSize;
     Rectangle maFocusIndicatorBoundingBox;
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
index 67de31c..6697de4 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
@@ -104,8 +104,12 @@ private:
         OutputDevice& rDevice,
         const Theme::GradientColorType eColorType,
         const Rectangle& rBox) const;
+    void PaintBackgroundDetail(
+        OutputDevice& rDevice,
+        const model::SharedPageDescriptor& rpDescriptor);
+
+#if 0
     Bitmap& GetBackgroundForState (
-        const model::SharedPageDescriptor& rpDescriptor,
         const OutputDevice& rTemplateDevice);
     Bitmap& GetBackground(
         Bitmap& rBackground,
@@ -116,6 +120,7 @@ private:
         const OutputDevice& rReferenceDevice,
         const Theme::GradientColorType eType,
         const bool bHasFocusBorder) const;
+#endif
     Bitmap CreateMarkedPreview(
         const Size& rSize,
         const Bitmap& rPreview,
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 06e15d6..66b1015 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -421,9 +421,7 @@ void SlideSorterView::Layout ()
             mpLayouter->GetPageObjectLayouter());
         if (pPageObjectLayouter)
         {
-            const Size aNewPreviewSize (mpLayouter->GetPageObjectLayouter()->GetSize(
-                PageObjectLayouter::Preview,
-                PageObjectLayouter::WindowCoordinateSystem));
+            const Size aNewPreviewSize (mpLayouter->GetPageObjectLayouter()->GetPreviewSize(PageObjectLayouter::WindowCoordinateSystem));
             if (maPreviewSize != aNewPreviewSize && GetPreviewCache())
             {
                 mpPreviewCache->ChangeSize(aNewPreviewSize, true);
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index fc52483..6ad4c19 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -129,8 +129,7 @@ void InsertionIndicatorOverlay::Create (
     ::boost::shared_ptr<view::PageObjectLayouter> pPageObjectLayouter (
         rLayouter.GetPageObjectLayouter());
     ::boost::shared_ptr<view::Theme> pTheme (mrSlideSorter.GetTheme());
-    const Size aOriginalPreviewSize (pPageObjectLayouter->GetSize(
-        PageObjectLayouter::Preview,
+    const Size aOriginalPreviewSize (pPageObjectLayouter->GetPreviewSize(
         PageObjectLayouter::WindowCoordinateSystem));
 
     const double nPreviewScale (0.5);
diff --git a/sd/source/ui/slidesorter/view/SlsLayouter.cxx b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
index 61105f7..47bd74f 100644
--- a/sd/source/ui/slidesorter/view/SlsLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsLayouter.cxx
@@ -552,7 +552,7 @@ Layouter::Implementation::~Implementation (void)
 
 
 
-bool Layouter::Implementation::Rearrange  (
+bool Layouter::Implementation::Rearrange (
     const Size& rWindowSize,
     const Size& rPreviewModelSize,
     const sal_uInt32 nPageCount)
@@ -595,8 +595,8 @@ bool Layouter::Implementation::Rearrange  (
             rPreviewModelSize,
             mpWindow,
             mnPageCount));
-    maPageObjectSize = mpPageObjectLayouter->GetSize(
-        PageObjectLayouter::FocusIndicator,
+
+    maPageObjectSize = mpPageObjectLayouter->GetGridMaxSize(
         PageObjectLayouter::WindowCoordinateSystem);
 
     CalculateMaxRowAndColumnCount(rWindowSize);
@@ -874,17 +874,14 @@ Rectangle Layouter::Implementation::GetInnerBoundingBox (
     if ( ! pDescriptor)
         return Rectangle();
 
-    const Point aLocation (pDescriptor->GetLocation(true));
+    PageObjectLayouter::Part ePart = PageObjectLayouter::Preview;
+
     if (pDescriptor->HasState(model::PageDescriptor::ST_Selected))
-        return mpPageObjectLayouter->GetBoundingBox(
-            aLocation,
-            PageObjectLayouter::PageObject,
-            PageObjectLayouter::ModelCoordinateSystem);
-    else
-        return mpPageObjectLayouter->GetBoundingBox(
-            aLocation,
-            PageObjectLayouter::Preview,
-            PageObjectLayouter::ModelCoordinateSystem);
+        ePart = PageObjectLayouter::PageObject;
+
+    return mpPageObjectLayouter->GetBoundingBox(
+            pDescriptor, ePart,
+            PageObjectLayouter::ModelCoordinateSystem, true);
 }
 
 
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
index 6840610..f293474 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
@@ -152,22 +152,19 @@ Rectangle PageObjectLayouter::CalculatePreviewBoundingBox (
         nTop + nPreviewHeight);
 }
 
-
-
-
 Rectangle PageObjectLayouter::GetBoundingBox (
     const model::SharedPageDescriptor& rpPageDescriptor,
     const Part ePart,
-    const CoordinateSystem eCoordinateSystem)
+    const CoordinateSystem eCoordinateSystem,
+    bool bIgnoreLocation)
 {
     OSL_ASSERT(rpPageDescriptor);
-    Point aLocation (rpPageDescriptor ? rpPageDescriptor->GetLocation() : Point(0,0));
+    Point aLocation(0,0);
+    if (rpPageDescriptor)
+        aLocation = rpPageDescriptor->GetLocation( bIgnoreLocation );
     return GetBoundingBox(aLocation, ePart, eCoordinateSystem);
 }
 
-
-
-
 Rectangle PageObjectLayouter::GetBoundingBox (
     const Point& rPageObjectLocation,
     const Part ePart,
@@ -212,18 +209,18 @@ Rectangle PageObjectLayouter::GetBoundingBox (
         aBoundingBox.BottomRight() + aLocation);
 }
 
-
-
-
-Size PageObjectLayouter::GetSize (
-    const Part ePart,
+Size PageObjectLayouter::GetPreviewSize (
     const CoordinateSystem eCoordinateSystem)
 {
-    return GetBoundingBox(Point(0,0), ePart, eCoordinateSystem).GetSize();
+    return GetBoundingBox(Point(0,0), PageObjectLayouter::Preview,
+                          eCoordinateSystem).GetSize();
 }
 
-
-
+Size PageObjectLayouter::GetGridMaxSize(const CoordinateSystem eCoordinateSystem)
+{
+    return GetBoundingBox(Point(0,0), PageObjectLayouter::FocusIndicator,
+                          eCoordinateSystem).GetSize();
+}
 
 Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount)
 {
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index b3c2b66..9cb53fa 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -105,10 +105,9 @@ void PageObjectPainter::NotifyResize (const bool bForce)
         InvalidateBitmaps();
     else
     {
-        const Size aSize (mpPageObjectLayouter->GetSize(
-                PageObjectLayouter::FocusIndicator,
+        const Size aSize (mpPageObjectLayouter->GetGridMaxSize(
                 PageObjectLayouter::WindowCoordinateSystem));
-        if ( maSize!=aSize)
+        if (maSize != aSize)
         {
             maSize = aSize;
             InvalidateBitmaps();
@@ -127,29 +126,17 @@ void PageObjectPainter::InvalidateBitmaps (void)
     maMouseOverSelectedAndFocusedBackground.SetEmpty();
 }
 
-
-
-
 void PageObjectPainter::SetTheme (const ::boost::shared_ptr<view::Theme>& rpTheme)
 {
     mpTheme = rpTheme;
     NotifyResize(true);
 }
 
-
-
-
 void PageObjectPainter::PaintBackground (
     OutputDevice& rDevice,
     const model::SharedPageDescriptor& rpDescriptor)
 {
-    const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
-        rpDescriptor,
-        PageObjectLayouter::FocusIndicator,
-        PageObjectLayouter::ModelCoordinateSystem));
-
-    const Bitmap& rBackground (GetBackgroundForState(rpDescriptor, rDevice));
-    rDevice.DrawBitmap(aBox.TopLeft(), rBackground);
+    PaintBackgroundDetail(rDevice, rpDescriptor);
 
     // Fill the interior of the preview area with the default background
     // color of the page.
@@ -319,12 +306,9 @@ void PageObjectPainter::PaintTransitionEffect (
     }
 }
 
-
-
-
-Bitmap& PageObjectPainter::GetBackgroundForState (
-    const model::SharedPageDescriptor& rpDescriptor,
-    const OutputDevice& rReferenceDevice)
+void PageObjectPainter::PaintBackgroundDetail(
+        OutputDevice& rDevice,
+        const model::SharedPageDescriptor& rpDescriptor)
 {
     enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 };
     const int eState =
@@ -332,98 +316,64 @@ Bitmap& PageObjectPainter::GetBackgroundForState (
         | (rpDescriptor->HasState(model::PageDescriptor::ST_MouseOver) ? MouseOver : None)
         | (rpDescriptor->HasState(model::PageDescriptor::ST_Focused) ? Focused : None);
 
+    bool bHasFocusBorder;
+    Theme::GradientColorType eColorType;
+
     switch (eState)
     {
         case MouseOver | Selected | Focused:
-            return GetBackground(
-                maMouseOverSelectedAndFocusedBackground,
-                Theme::Gradient_MouseOverSelectedAndFocusedPage,
-                rReferenceDevice,
-                true);
+            eColorType = Theme::Gradient_MouseOverSelectedAndFocusedPage;
+            bHasFocusBorder = true;
+            break;
 
         case MouseOver | Selected:
         case MouseOver:
-            return GetBackground(
-                maMouseOverBackground,
-                Theme::Gradient_MouseOverPage,
-                rReferenceDevice,
-                false);
+            eColorType = Theme::Gradient_MouseOverPage;
+            bHasFocusBorder = false;
+            break;
 
         case MouseOver | Focused:
-            return GetBackground(
-                maMouseOverFocusedBackground,
-                Theme::Gradient_MouseOverPage,
-                rReferenceDevice,
-                true);
+            eColorType = Theme::Gradient_MouseOverPage;
+            bHasFocusBorder = true;
+            break;
 
         case Selected | Focused:
-            return GetBackground(
-                maFocusedSelectionBackground,
-                Theme::Gradient_SelectedAndFocusedPage,
-                rReferenceDevice,
-                true);
+            eColorType = Theme::Gradient_SelectedAndFocusedPage;
+            bHasFocusBorder = true;
+            break;
 
         case Selected:
-            return GetBackground(
-                maSelectionBackground,
-                Theme::Gradient_SelectedPage,
-                rReferenceDevice,
-                false);
+            eColorType = Theme::Gradient_SelectedPage;
+            bHasFocusBorder = false;
+            break;
 
         case Focused:
-            return GetBackground(
-                maFocusedBackground,
-                Theme::Gradient_FocusedPage,
-                rReferenceDevice,
-                true);
+            eColorType = Theme::Gradient_FocusedPage;
+            bHasFocusBorder = true;
+            break;
 
         case None:
         default:
-            return GetBackground(
-                maNormalBackground,
-                Theme::Gradient_NormalPage,
-                rReferenceDevice,
-                false);
+            eColorType = Theme::Gradient_NormalPage;
+            bHasFocusBorder = false;
+            break;
     }
-}
-
 
+    const Rectangle aFocusSize (mpPageObjectLayouter->GetBoundingBox(
+                                        rpDescriptor,
+                                        PageObjectLayouter::FocusIndicator,
+                                        PageObjectLayouter::ModelCoordinateSystem));
 
-
-Bitmap& PageObjectPainter::GetBackground(
-    Bitmap& rBackground,
-    Theme::GradientColorType eType,
-    const OutputDevice& rReferenceDevice,
-    const bool bHasFocusBorder)
-{
-    if (rBackground.IsEmpty())
-        rBackground = CreateBackgroundBitmap(rReferenceDevice, eType, bHasFocusBorder);
-    return rBackground;
-}
-
-
-
-
-Bitmap PageObjectPainter::CreateBackgroundBitmap(
-    const OutputDevice& rReferenceDevice,
-    const Theme::GradientColorType eColorType,
-    const bool bHasFocusBorder) const
-{
-    const Size aSize (mpPageObjectLayouter->GetSize(
-        PageObjectLayouter::FocusIndicator,
-        PageObjectLayouter::WindowCoordinateSystem));
     const Rectangle aPageObjectBox (mpPageObjectLayouter->GetBoundingBox(
-        Point(0,0),
-        PageObjectLayouter::PageObject,
-        PageObjectLayouter::ModelCoordinateSystem));
-    VirtualDevice aBitmapDevice (rReferenceDevice);
-    aBitmapDevice.SetOutputSizePixel(aSize);
+                                        rpDescriptor,
+                                        PageObjectLayouter::PageObject,
+                                        PageObjectLayouter::ModelCoordinateSystem));
 
     // Fill the background with the background color of the slide sorter.
     const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
-    aBitmapDevice.SetFillColor(aBackgroundColor);
-    aBitmapDevice.SetLineColor(aBackgroundColor);
-    aBitmapDevice.DrawRect(Rectangle(Point(0,0), aSize));
+    rDevice.SetFillColor(aBackgroundColor);
+    rDevice.SetLineColor(aBackgroundColor);
+    rDevice.DrawRect(aFocusSize);
 
     // Paint the slide area with a linear gradient that starts some pixels
     // below the top and ends some pixels above the bottom.
@@ -445,47 +395,42 @@ Bitmap PageObjectPainter::CreateBackgroundBitmap(
         for (sal_Int32 nY=0; nY<nHeight; ++nY)
         {
             if (nY<=nY1)
-                aBitmapDevice.SetLineColor(aTopColor);
+                rDevice.SetLineColor(aTopColor);
             else if (nY>=nY2)
-                aBitmapDevice.SetLineColor(aBottomColor);
+                rDevice.SetLineColor(aBottomColor);
             else
             {
                 Color aColor (aTopColor);
                 aColor.Merge(aBottomColor, 255 * (nY2-nY) / (nY2-nY1));
-                aBitmapDevice.SetLineColor(aColor);
+                rDevice.SetLineColor(aColor);
             }
-            aBitmapDevice.DrawLine(
+            rDevice.DrawLine(
                 Point(aPageObjectBox.Left(), nY+nTop),
                 Point(aPageObjectBox.Right(), nY+nTop));
         }
     }
     else
     {
-        aBitmapDevice.SetFillColor(aTopColor);
-        aBitmapDevice.DrawRect(aPageObjectBox);
+        rDevice.SetFillColor(aTopColor);
+        rDevice.DrawRect(aPageObjectBox);
     }
 
     // Paint the simple border and, for some backgrounds, the focus border.
     if (bHasFocusBorder)
-        mpFocusBorderPainter->PaintFrame(aBitmapDevice, aPageObjectBox);
+        mpFocusBorderPainter->PaintFrame(rDevice, aPageObjectBox);
     else
-        PaintBorder(aBitmapDevice, eColorType, aPageObjectBox);
+        PaintBorder(rDevice, eColorType, aPageObjectBox);
 
     // Get bounding box of the preview around which a shadow is painted.
     // Compensate for the border around the preview.
     const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox(
-        Point(0,0),
-        PageObjectLayouter::Preview,
-        PageObjectLayouter::ModelCoordinateSystem));
+                                rpDescriptor,
+                                PageObjectLayouter::Preview,
+                                PageObjectLayouter::ModelCoordinateSystem));
     Rectangle aFrameBox (aBox.Left()-1,aBox.Top()-1,aBox.Right()+1,aBox.Bottom()+1);
-    mpShadowPainter->PaintFrame(aBitmapDevice, aFrameBox);
-
-    return aBitmapDevice.GetBitmap (Point(0,0),aSize);
+    mpShadowPainter->PaintFrame(rDevice, aFrameBox);
 }
 
-
-
-
 void PageObjectPainter::PaintBorder (
     OutputDevice& rDevice,
     const Theme::GradientColorType eColorType,
commit 482949bcfa4231540def562e7ba5315a0a18b4be
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Fri Apr 12 17:31:58 2013 +0100

    infernal vspace wasteage removal.
    
    Change-Id: Ice0437cac9cd01b484174b1ce16c3118fb76e3e0

diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 1bbe97b..06e15d6 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "slidehack.hxx"
 #include "view/SlideSorterView.hxx"
 
@@ -74,12 +73,10 @@
 #endif
 #include <boost/foreach.hpp>
 
-
 using namespace std;
 using namespace ::sd::slidesorter::model;
 using namespace ::drawinglayer::primitive2d;
 
-
 namespace sd { namespace slidesorter { namespace view {
 
 namespace {
@@ -106,8 +103,6 @@ namespace {
     };
 }
 
-
-
 class BackgroundPainter
     : public ILayerPainter,
       public ::boost::noncopyable
@@ -131,8 +126,6 @@ private:
     Color maBackgroundColor;
 };
 
-
-
 TYPEINIT1(SlideSorterView, ::sd::View);
 
 SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
@@ -183,9 +176,6 @@ SlideSorterView::SlideSorterView (SlideSorter& rSlideSorter)
     mpLayeredDevice->RegisterPainter(pPainter, 1);
 }
 
-
-
-
 SlideSorterView::~SlideSorterView (void)
 {
     if ( ! mbIsDisposed)
@@ -195,17 +185,11 @@ SlideSorterView::~SlideSorterView (void)
     }
 }
 
-
-
-
 void SlideSorterView::Init (void)
 {
     HandleModelChange();
 }
 
-
-
-
 void SlideSorterView::Dispose (void)
 {
     mpSelectionPainter.reset();
@@ -228,9 +212,6 @@ void SlideSorterView::Dispose (void)
     mbIsDisposed = true;
 }
 
-
-
-
 sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rWindowPosition) const
 {
     sal_Int32 nIndex (-1);
@@ -248,35 +229,23 @@ sal_Int32 SlideSorterView::GetPageIndexAtPoint (const Point& rWindowPosition) co
     return nIndex;
 }
 
-
-
-
 Layouter& SlideSorterView::GetLayouter (void)
 {
     return *mpLayouter.get();
 }
 
-
-
-
 void SlideSorterView::ModelHasChanged (void)
 {
     // Ignore this call.  Rely on hints sent by the model to get informed of
     // model changes.
 }
 
-
-
-
 void SlideSorterView::PreModelChange (void)
 {
     // Reset the slide under the mouse.  It will be re-set in PostModelChange().
     SetPageUnderMouse(SharedPageDescriptor());
 }
 
-
-
-
 void SlideSorterView::PostModelChange (void)
 {
     // In PreModelChange() the page objects have been released.  Here we
@@ -291,9 +260,6 @@ void SlideSorterView::PostModelChange (void)
     RequestRepaint();
 }
 
-
-
-
 /** At the moment for every model change all page objects are destroyed and
     re-created again.  This can be optimized by accepting hints that
     describe the type of change so that existing page objects can be
@@ -305,9 +271,6 @@ void SlideSorterView::HandleModelChange (void)
     PostModelChange();
 }
 
-
-
-
 void SlideSorterView::HandleDrawModeChange (void)
 {
     // Replace the preview cache with a new and empty one.  The
@@ -319,9 +282,6 @@ void SlideSorterView::HandleDrawModeChange (void)
     RequestRepaint();
 }
 
-
-
-
 void SlideSorterView::HandleDataChangeEvent (void)
 {
     GetPageObjectPainter()->SetTheme(mrSlideSorter.GetTheme());
@@ -335,9 +295,6 @@ void SlideSorterView::HandleDataChangeEvent (void)
     RequestRepaint();
 }
 
-
-
-
 void SlideSorterView::Resize (void)
 {
     UpdateOrientation();
@@ -346,18 +303,12 @@ void SlideSorterView::Resize (void)
     RequestRearrange();
 }
 
-
-
-
 void SlideSorterView::RequestRearrange (void)
 {
     mbIsRearrangePending = true;
     Rearrange();
 }
 
-
-
-
 void SlideSorterView::Rearrange (void)
 {
     if ( ! mbIsRearrangePending)
@@ -387,9 +338,6 @@ void SlideSorterView::Rearrange (void)
     }
 }
 
-
-
-
 void SlideSorterView::UpdateOrientation (void)
 {
     // The layout of slides depends on whether the slide sorter is
@@ -458,9 +406,6 @@ void SlideSorterView::UpdateOrientation (void)
     }
 }
 
-
-
-
 void SlideSorterView::Layout ()
 {
     SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
@@ -502,17 +447,11 @@ void SlideSorterView::Layout ()
     InvalidatePageObjectVisibilities ();
 }
 
-
-
-
 void SlideSorterView::InvalidatePageObjectVisibilities (void)
 {
     mbPageObjectVisibilitiesValid = false;
 }
 
-
-
-
 void SlideSorterView::DeterminePageObjectVisibilities (void)
 {
     SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
@@ -571,9 +510,6 @@ void SlideSorterView::DeterminePageObjectVisibilities (void)
     }
 }
 
-
-
-
 void SlideSorterView::UpdatePreciousFlags (void)
 {
     if (mbPreciousFlagUpdatePending)
@@ -606,9 +542,6 @@ void SlideSorterView::UpdatePreciousFlags (void)
     }
 }
 
-
-
-
 bool SlideSorterView::SetOrientation (const Layouter::Orientation eOrientation)
 {
     if (meOrientation != eOrientation)
@@ -620,17 +553,11 @@ bool SlideSorterView::SetOrientation (const Layouter::Orientation eOrientation)
         return false;
 }
 
-
-
-
 Layouter::Orientation SlideSorterView::GetOrientation (void) const
 {
     return meOrientation;
 }
 
-
-
-
 void SlideSorterView::RequestRepaint (void)
 {
     SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
@@ -644,18 +571,12 @@ void SlideSorterView::RequestRepaint (void)
     }
 }
 
-
-
-
 void SlideSorterView::RequestRepaint (const model::SharedPageDescriptor& rpDescriptor)
 {
     if (rpDescriptor)
         RequestRepaint(rpDescriptor->GetBoundingBox());
 }
 
-
-
-
 void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox)
 {
     SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
@@ -666,8 +587,6 @@ void SlideSorterView::RequestRepaint (const Rectangle& rRepaintBox)
     }
 }
 
-
-
 void SlideSorterView::RequestRepaint (const Region& rRepaintRegion)
 {
     SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
@@ -678,15 +597,11 @@ void SlideSorterView::RequestRepaint (const Region& rRepaintRegion)
     }
 }
 
-
-
-
 Rectangle SlideSorterView::GetModelArea (void)
 {
     return mpLayouter->GetTotalBoundingBox();
 }
 
-
 #ifdef DEBUG_TIMING
 static ::canvas::tools::ElapsedTime gaTimer;
 static const size_t gFrameTimeCount (10);
@@ -753,9 +668,6 @@ void SlideSorterView::CompleteRedraw (
 #endif
 }
 
-
-
-
 void SlideSorterView::Paint (
     OutputDevice& rDevice,
     const Rectangle& rRepaintArea)
@@ -795,9 +707,6 @@ void SlideSorterView::Paint (
     }
 }
 
-
-
-
 void SlideSorterView::ConfigurationChanged (
     utl::ConfigurationBroadcaster* pBroadcaster,
     sal_uInt32 nHint)
@@ -811,9 +720,6 @@ void SlideSorterView::ConfigurationChanged (
 
 }
 
-
-
-
 ::boost::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache (void)
 {
     SharedSdWindow pWindow (mrSlideSorter.GetContentWindow());
@@ -829,9 +735,6 @@ void SlideSorterView::ConfigurationChanged (
     return mpPreviewCache;
 }
 
-
-
-
 Pair SlideSorterView::GetVisiblePageRange (void)
 {
     if ( ! mbPageObjectVisibilitiesValid)
@@ -839,9 +742,6 @@ Pair SlideSorterView::GetVisiblePageRange (void)
     return maVisiblePageRange;
 }
 
-
-
-
 void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
 {
     if (::std::find (
@@ -853,9 +753,6 @@ void SlideSorterView::AddVisibilityChangeListener (const Link& rListener)
     }
 }
 
-
-
-
 void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
 {
     maVisibilityChangeListeners.erase (
@@ -865,18 +762,12 @@ void SlideSorterView::RemoveVisibilityChangeListener(const Link&rListener)
             rListener));
 }
 
-
-
-
 ToolTip& SlideSorterView::GetToolTip (void) const
 {
     OSL_ASSERT(mpToolTip);
     return *mpToolTip;
 }
 
-
-
-
 void SlideSorterView::DragFinished (sal_Int8 nDropAction)
 {
     mrSlideSorter.GetController().GetClipboard().DragFinished(nDropAction);
@@ -884,9 +775,6 @@ void SlideSorterView::DragFinished (sal_Int8 nDropAction)
     View::DragFinished(nDropAction);
 }
 
-
-
-
 void SlideSorterView::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
 {
     ::sd::DrawDocShell* pDocShell = mrModel.GetDocument()->GetDocSh();
@@ -896,9 +784,6 @@ void SlideSorterView::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint
     ::sd::View::Notify(rBroadcaster, rHint);
 }
 
-
-
-
 void SlideSorterView::UpdatePageUnderMouse ()
 {
     ::boost::shared_ptr<ScrollBar> pVScrollBar (mrSlideSorter.GetVerticalScrollBar());
@@ -927,18 +812,12 @@ void SlideSorterView::UpdatePageUnderMouse ()
     SetPageUnderMouse(SharedPageDescriptor());
 }
 
-
-
-
 void SlideSorterView::UpdatePageUnderMouse (
     const Point& rMousePosition)
 {
     SetPageUnderMouse(mrSlideSorter.GetController().GetPageAt(rMousePosition));
 }
 
-
-
-
 void SlideSorterView::SetPageUnderMouse (
     const model::SharedPageDescriptor& rpDescriptor)
 {
@@ -958,9 +837,6 @@ void SlideSorterView::SetPageUnderMouse (
     }
 }
 
-
-
-
 bool SlideSorterView::SetState (
     const model::SharedPageDescriptor& rpDescriptor,
     const PageDescriptor::State eState,
@@ -987,9 +863,6 @@ bool SlideSorterView::SetState (
     return bModified;
 }
 
-
-
-
 ::boost::shared_ptr<PageObjectPainter> SlideSorterView::GetPageObjectPainter (void)
 {
     if ( ! mpPageObjectPainter)
@@ -997,17 +870,11 @@ bool SlideSorterView::SetState (
     return mpPageObjectPainter;
 }
 
-
-
-
 ::boost::shared_ptr<LayeredDevice> SlideSorterView::GetLayeredDevice (void) const
 {
     return mpLayeredDevice;
 }
 
-
-
-
 //===== SlideSorterView::DrawLock =============================================
 
 SlideSorterView::DrawLock::DrawLock (SlideSorter& rSlideSorter)
@@ -1019,9 +886,6 @@ SlideSorterView::DrawLock::DrawLock (SlideSorter& rSlideSorter)
     ++mrView.mnLockRedrawSmph;
 }
 
-
-
-
 SlideSorterView::DrawLock::~DrawLock (void)
 {
     OSL_ASSERT(mrView.mnLockRedrawSmph>0);
@@ -1034,15 +898,11 @@ SlideSorterView::DrawLock::~DrawLock (void)
         }
 }
 
-
-
-
 void SlideSorterView::DrawLock::Dispose (void)
 {
     mpWindow.reset();
 }
 
-
 } } } // end of namespace ::sd::slidesorter::view
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
index 21c42ad..6840610 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
@@ -17,7 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include "view/SlsPageObjectLayouter.hxx"
 
 #include "model/SlsPageDescriptor.hxx"
@@ -86,16 +85,10 @@ PageObjectLayouter::PageObjectLayouter (
         aIconSize);
 }
 
-
-
-
 PageObjectLayouter::~PageObjectLayouter(void)
 {
 }
 
-
-
-
 Rectangle PageObjectLayouter::CalculatePreviewBoundingBox (
     Size& rPageObjectSize,
     const Size& rPageSize,
@@ -264,15 +257,11 @@ Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount)
     return aSize;
 }
 
-
-
-
 Image PageObjectLayouter::GetTransitionEffectIcon (void) const
 {
     return maTransitionEffectIcon;
 }
 
-
 } } } // end of namespace ::sd::slidesorter::view
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 9bf75e6..b3c2b66 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -68,16 +68,10 @@ PageObjectPainter::PageObjectPainter (
     mpFocusBorderPainter->AdaptColor(aColor, true);
 }
 
-
-
-
 PageObjectPainter::~PageObjectPainter (void)
 {
 }
 
-
-
-
 void PageObjectPainter::PaintPageObject (
     OutputDevice& rDevice,
     const model::SharedPageDescriptor& rpDescriptor)
@@ -104,9 +98,6 @@ void PageObjectPainter::PaintPageObject (
     rDevice.SetAntialiasing(nSavedAntialiasingMode);
 }
 
-
-
-
 void PageObjectPainter::NotifyResize (const bool bForce)
 {
     mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
@@ -125,9 +116,6 @@ void PageObjectPainter::NotifyResize (const bool bForce)
     }
 }
 
-
-
-
 void PageObjectPainter::InvalidateBitmaps (void)
 {
     maNormalBackground.SetEmpty();
@@ -178,9 +166,6 @@ void PageObjectPainter::PaintBackground (
     }
 }
 
-
-
-
 void PageObjectPainter::PaintPreview (
     OutputDevice& rDevice,
     const model::SharedPageDescriptor& rpDescriptor) const
@@ -206,9 +191,6 @@ void PageObjectPainter::PaintPreview (
     }
 }
 
-
-
-
 Bitmap PageObjectPainter::CreateMarkedPreview (
     const Size& rSize,
     const Bitmap& rPreview,
@@ -236,9 +218,6 @@ Bitmap PageObjectPainter::CreateMarkedPreview (
     return pDevice->GetBitmap(Point(0,0), rSize);
 }
 
-
-
-
 Bitmap PageObjectPainter::GetPreviewBitmap (
     const model::SharedPageDescriptor& rpDescriptor,
     const OutputDevice* pReferenceDevice) const
@@ -270,9 +249,6 @@ Bitmap PageObjectPainter::GetPreviewBitmap (
     }
 }
 
-
-
-
 void PageObjectPainter::PaintPageNumber (
     OutputDevice& rDevice,
     const model::SharedPageDescriptor& rpDescriptor) const
@@ -325,9 +301,6 @@ void PageObjectPainter::PaintPageNumber (
     rDevice.DrawText(aBox, sPageNumber, TEXT_DRAW_RIGHT | TEXT_DRAW_VCENTER);
 }
 
-
-
-
 void PageObjectPainter::PaintTransitionEffect (
     OutputDevice& rDevice,
     const model::SharedPageDescriptor& rpDescriptor) const
@@ -541,8 +514,6 @@ void PageObjectPainter::PaintBorder (
     }
 }
 
-
-
 } } } // end of namespace sd::slidesorter::view
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list