diff options
-rw-r--r-- | sdext/source/presenter/PresenterScrollBar.cxx | 185 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterScrollBar.hxx | 32 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.cxx | 221 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.hxx | 1 | ||||
-rwxr-xr-x | unusedcode.easy | 1 |
5 files changed, 43 insertions, 397 deletions
diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index d7ebbad7ec51..da5dfc69503b 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -838,191 +838,6 @@ void PresenterVerticalScrollBar::PaintComposite( GetBitmap(eArea, rpEndBitmaps)); } -//===== PresenterHorizontalScrollBar ============================================ - -PresenterHorizontalScrollBar::PresenterHorizontalScrollBar ( - const Reference<XComponentContext>& rxComponentContext, - const Reference<awt::XWindow>& rxParentWindow, - const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, - const ::boost::function<void(double)>& rThumbMotionListener) - : PresenterScrollBar(rxComponentContext, rxParentWindow, rpPaintManager, rThumbMotionListener), - mnScrollBarHeight(0) -{ -} - -PresenterHorizontalScrollBar::~PresenterHorizontalScrollBar (void) -{ -} - -double PresenterHorizontalScrollBar::GetDragDistance (const sal_Int32 nX, const sal_Int32 nY) const -{ - (void)nY; - const double nDistance (nX - maDragAnchor.X); - if (nDistance == 0) - return 0; - else - { - const awt::Rectangle aWindowBox (mxWindow->getPosSize()); - const double nBarHeight (aWindowBox.Height); - const double nPagerWidth (aWindowBox.Width - 2*nBarHeight); - const double nDragDistance (mnTotalSize / nPagerWidth * nDistance); - if (nDragDistance + mnThumbPosition < 0) - return -mnThumbPosition; - else if (mnThumbPosition + nDragDistance > mnTotalSize-mnThumbSize) - return mnTotalSize-mnThumbSize-mnThumbPosition; - else - return nDragDistance; - } -} - -void PresenterHorizontalScrollBar::UpdateDragAnchor (const double nDragDistance) -{ - const awt::Rectangle aWindowBox (mxWindow->getPosSize()); - const double nBarHeight (aWindowBox.Height); - const double nPagerWidth (aWindowBox.Width - 2*nBarHeight); - maDragAnchor.X += nDragDistance * nPagerWidth / mnTotalSize; -} - -sal_Int32 PresenterHorizontalScrollBar::GetSize (void) const -{ - return mnScrollBarHeight; -} - -geometry::RealPoint2D PresenterHorizontalScrollBar::GetPoint ( - const double nMajor, const double nMinor) const -{ - return geometry::RealPoint2D(nMajor, nMinor); -} - -double PresenterHorizontalScrollBar::GetMajor (const double nX, const double nY) const -{ - (void)nY; - return nX; -} - -double PresenterHorizontalScrollBar::GetMinor (const double nX, const double nY) const -{ - (void)nX; - return nY; -} - -void PresenterHorizontalScrollBar::UpdateBorders (void) -{ - const awt::Rectangle aWindowBox (mxWindow->getPosSize()); - double nRight = aWindowBox.Width; - const double nGap (2); - - if (mpNextButtonDescriptor.get() != NULL) - { - Reference<rendering::XBitmap> xBitmap (mpNextButtonDescriptor->GetNormalBitmap()); - if (xBitmap.is()) - { - geometry::IntegerSize2D aSize (xBitmap->getSize()); - maBox[NextButton] = geometry::RealRectangle2D( - nRight - aSize.Width,0, nRight, aWindowBox.Height); - nRight -= aSize.Width + nGap; - } - } - if (mpPrevButtonDescriptor.get() != NULL) - { - Reference<rendering::XBitmap> xBitmap (mpPrevButtonDescriptor->GetNormalBitmap()); - if (xBitmap.is()) - { - geometry::IntegerSize2D aSize (xBitmap->getSize()); - maBox[PrevButton] = geometry::RealRectangle2D( - nRight - aSize.Width,0, nRight, aWindowBox.Height); - nRight -= aSize.Width + nGap; - } - } - - const double nPagerWidth (nRight); - maBox[Pager] = geometry::RealRectangle2D( - 0,0, nRight, aWindowBox.Height); - if (mnTotalSize == 0) - { - maBox[Thumb] = maBox[Pager]; - - // Set up the enabled/disabled states. - maEnabledState[PrevButton] = false; - maEnabledState[PagerUp] = false; - maEnabledState[NextButton] = false; - maEnabledState[PagerDown] = false; - maEnabledState[Thumb] = false; - } - else - { - const double nThumbSize = ::std::min(mnThumbSize,mnTotalSize); - const double nThumbPosition = ::std::min(::std::max(0.0,mnThumbPosition), mnTotalSize - nThumbSize); - maBox[Thumb] = geometry::RealRectangle2D( - (nThumbPosition) / mnTotalSize * nPagerWidth, 0, - (nThumbPosition+nThumbSize) / mnTotalSize * nPagerWidth, aWindowBox.Height); - - // Set up the enabled/disabled states. - maEnabledState[PrevButton] = nThumbPosition>0; - maEnabledState[PagerUp] = nThumbPosition>0; - maEnabledState[NextButton] = nThumbPosition+nThumbSize < mnTotalSize; - maEnabledState[PagerDown] = nThumbPosition+nThumbSize < mnTotalSize; - maEnabledState[Thumb] = nThumbSize < mnTotalSize; - } - maBox[PagerUp] = geometry::RealRectangle2D( - maBox[Pager].X1, maBox[Pager].Y1, maBox[Thumb].X1-1, maBox[Pager].Y2); - maBox[PagerDown] = geometry::RealRectangle2D( - maBox[Thumb].X2+1, maBox[Pager].Y1, maBox[Pager].X2, maBox[Pager].Y2); - maBox[Total] = PresenterGeometryHelper::Union( - PresenterGeometryHelper::Union(maBox[PrevButton], maBox[NextButton]), - maBox[Pager]); -} - -void PresenterHorizontalScrollBar::UpdateBitmaps (void) -{ - if (mpBitmaps.get() != NULL) - { - mpPrevButtonDescriptor = mpBitmaps->GetBitmap(A2S("Left")); - mpNextButtonDescriptor = mpBitmaps->GetBitmap(A2S("Right")); - mpPagerStartDescriptor = mpBitmaps->GetBitmap(A2S("PagerLeft")); - mpPagerCenterDescriptor = mpBitmaps->GetBitmap(A2S("PagerHorizontal")); - mpPagerEndDescriptor = mpBitmaps->GetBitmap(A2S("PagerRight")); - mpThumbStartDescriptor = mpBitmaps->GetBitmap(A2S("ThumbLeft")); - mpThumbCenterDescriptor = mpBitmaps->GetBitmap(A2S("ThumbHorizontal")); - mpThumbEndDescriptor = mpBitmaps->GetBitmap(A2S("ThumbRight")); - - mnScrollBarHeight = 0; - UpdateWidthOrHeight(mnScrollBarHeight, mpPrevButtonDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpNextButtonDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpPagerStartDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpPagerCenterDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpPagerEndDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpThumbStartDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpThumbCenterDescriptor); - UpdateWidthOrHeight(mnScrollBarHeight, mpThumbEndDescriptor); - if (mnScrollBarHeight == 0) - mnScrollBarHeight = 20; - } -} - -void PresenterHorizontalScrollBar::PaintComposite( - const css::awt::Rectangle& rUpdateBox, - const Area eArea, - const SharedBitmapDescriptor& rpStartBitmaps, - const SharedBitmapDescriptor& rpCenterBitmaps, - const SharedBitmapDescriptor& rpEndBitmaps) -{ - const awt::Rectangle aWindowBox (mxWindow->getPosSize()); - geometry::RealRectangle2D aBox (GetRectangle(eArea)); - aBox.X1 += aWindowBox.X; - aBox.Y1 += aWindowBox.Y; - aBox.X2 += aWindowBox.X; - aBox.Y2 += aWindowBox.Y; - - PresenterUIPainter::PaintHorizontalBitmapComposite( - mxCanvas, - rUpdateBox, - PresenterGeometryHelper::ConvertRectangle(aBox), - GetBitmap(eArea, rpStartBitmaps), - GetBitmap(eArea, rpCenterBitmaps), - GetBitmap(eArea, rpEndBitmaps)); -} - //===== PresenterScrollBar::MousePressRepeater ================================ PresenterScrollBar::MousePressRepeater::MousePressRepeater ( diff --git a/sdext/source/presenter/PresenterScrollBar.hxx b/sdext/source/presenter/PresenterScrollBar.hxx index 2f2144535d84..574bdaac405f 100644 --- a/sdext/source/presenter/PresenterScrollBar.hxx +++ b/sdext/source/presenter/PresenterScrollBar.hxx @@ -285,38 +285,6 @@ private: sal_Int32 mnScrollBarWidth; }; -/** A horizontal scroll bar. -*/ -class PresenterHorizontalScrollBar : public PresenterScrollBar -{ -public: - PresenterHorizontalScrollBar ( - const css::uno::Reference<css::uno::XComponentContext>& rxComponentContext, - const css::uno::Reference<css::awt::XWindow>& rxParentWindow, - const ::boost::shared_ptr<PresenterPaintManager>& rpPaintManager, - const ::boost::function<void(double)>& rThumbMotionListener); - virtual ~PresenterHorizontalScrollBar (void); - virtual sal_Int32 GetSize (void) const; - -protected: - virtual double GetDragDistance (const sal_Int32 nX, const sal_Int32 nY) const; - virtual void UpdateDragAnchor (const double nDragDistance); - virtual css::geometry::RealPoint2D GetPoint (const double nMajor, const double nMinor) const; - virtual double GetMinor (const double nX, const double nY) const; - virtual double GetMajor (const double nX, const double nY) const; - virtual void UpdateBorders (void); - virtual void UpdateBitmaps (void); - virtual void PaintComposite( - const css::awt::Rectangle& rRepaintBox, - const Area eArea, - const SharedBitmapDescriptor& rpStartBitmaps, - const SharedBitmapDescriptor& rpCenterBitmaps, - const SharedBitmapDescriptor& rpEndBitmaps); - -private: - sal_Int32 mnScrollBarHeight; -}; - } } // end of namespace ::sdext::presenter #endif diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index 30e19e630434..4c466cbcb23f 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -94,11 +94,7 @@ namespace { class PresenterSlideSorter::Layout { public: - enum Orientation { Horizontal, Vertical }; - Layout ( - const Orientation eOrientation, - const ::rtl::Reference<PresenterScrollBar>& rpHorizontalScrollBar, - const ::rtl::Reference<PresenterScrollBar>& rpVerticalScrollBar); + Layout (const ::rtl::Reference<PresenterScrollBar>& rpVerticalScrollBar); void Update (const geometry::RealRectangle2D& rBoundingBox, const double nSlideAspectRatio); void SetupVisibleArea (void); @@ -121,7 +117,6 @@ public: sal_Int32 GetLastVisibleSlideIndex (void) const; bool SetHorizontalOffset (const double nOffset); bool SetVerticalOffset (const double nOffset); - Orientation GetOrientation (void) const; css::geometry::RealRectangle2D maBoundingBox; css::geometry::IntegerSize2D maPreviewSize; @@ -141,8 +136,6 @@ public: sal_Int32 mnLastVisibleRow; private: - Orientation meOrientation; - ::rtl::Reference<PresenterScrollBar> mpHorizontalScrollBar; ::rtl::Reference<PresenterScrollBar> mpVerticalScrollBar; sal_Int32 GetIndex (const sal_Int32 nRow, const sal_Int32 nColumn) const; @@ -272,7 +265,6 @@ PresenterSlideSorter::PresenterSlideSorter ( mbIsPaintPending(true), mbIsLayoutPending(true), mpLayout(), - mpHorizontalScrollBar(), mpVerticalScrollBar(), mpCloseButton(), mpMouseOverManager(), @@ -318,24 +310,14 @@ PresenterSlideSorter::PresenterSlideSorter ( // Remember the current slide. mnCurrentSlideIndex = mxSlideShowController->getCurrentSlideIndex(); - // Set the orientation. - const bool bIsVertical (true); - // Create the scroll bar. - if (bIsVertical) - mpVerticalScrollBar = ::rtl::Reference<PresenterScrollBar>( - new PresenterVerticalScrollBar( - rxContext, - mxWindow, - mpPresenterController->GetPaintManager(), - ::boost::bind(&PresenterSlideSorter::SetVerticalOffset,this,_1))); - else - mpHorizontalScrollBar = ::rtl::Reference<PresenterScrollBar>( - new PresenterHorizontalScrollBar( - rxContext, - mxWindow, - mpPresenterController->GetPaintManager(), - ::boost::bind(&PresenterSlideSorter::SetHorizontalOffset,this,_1))); + mpVerticalScrollBar = ::rtl::Reference<PresenterScrollBar>( + new PresenterVerticalScrollBar( + rxContext, + mxWindow, + mpPresenterController->GetPaintManager(), + ::boost::bind(&PresenterSlideSorter::SetVerticalOffset,this,_1))); + mpCloseButton = PresenterButton::Create( rxContext, mpPresenterController, @@ -353,10 +335,7 @@ PresenterSlideSorter::PresenterSlideSorter ( } // Create the layout. - mpLayout.reset(new Layout( - Layout::Vertical, - mpHorizontalScrollBar, - mpVerticalScrollBar)); + mpLayout.reset(new Layout(mpVerticalScrollBar)); // Create the preview cache. mxPreviewCache = Reference<drawing::XSlidePreviewCache>( @@ -415,14 +394,6 @@ void SAL_CALL PresenterSlideSorter::disposing (void) if (xComponent.is()) xComponent->dispose(); } - if (mpHorizontalScrollBar.is()) - { - Reference<lang::XComponent> xComponent ( - static_cast<XWeak*>(mpHorizontalScrollBar.get()), UNO_QUERY); - mpHorizontalScrollBar = NULL; - if (xComponent.is()) - xComponent->dispose(); - } if (mpCloseButton.is()) { Reference<lang::XComponent> xComponent ( @@ -486,8 +457,6 @@ void SAL_CALL PresenterSlideSorter::disposing (const lang::EventObject& rEventOb else if (rEventObject.Source == mxCanvas) { mxCanvas = NULL; - if (mpHorizontalScrollBar.is()) - mpHorizontalScrollBar->SetCanvas(NULL); mbIsLayoutPending = true; mbIsPaintPending = true; @@ -778,57 +747,28 @@ geometry::RealRectangle2D PresenterSlideSorter::PlaceScrollBars ( if (xSlides.is()) bIsScrollBarNeeded = mpLayout->IsScrollBarNeeded(xSlides->getCount()); - if (mpLayout->GetOrientation() == Layout::Vertical) - { - if (mpVerticalScrollBar.get() != NULL) - { - if (bIsScrollBarNeeded) - { - // Place vertical scroll bar at right border. - mpVerticalScrollBar->SetPosSize(geometry::RealRectangle2D( - rUpperBox.X2 - mpVerticalScrollBar->GetSize(), - rUpperBox.Y1, - rUpperBox.X2, - rUpperBox.Y2)); - mpVerticalScrollBar->SetVisible(true); - - // Reduce area covered by the scroll bar from the available - // space. - return geometry::RealRectangle2D( - rUpperBox.X1, - rUpperBox.Y1, - rUpperBox.X2 - mpVerticalScrollBar->GetSize() - gnHorizontalGap, - rUpperBox.Y2); - } - else - mpVerticalScrollBar->SetVisible(false); - } - } - else + if (mpVerticalScrollBar.get() != NULL) { - if (mpHorizontalScrollBar.get() != NULL) + if (bIsScrollBarNeeded) { - if (bIsScrollBarNeeded) - { - // Place horixontal scroll bar at the bottom. - mpHorizontalScrollBar->SetPosSize(geometry::RealRectangle2D( - rUpperBox.X1, - rUpperBox.Y2 - mpHorizontalScrollBar->GetSize(), - rUpperBox.X2, - rUpperBox.Y2)); - mpHorizontalScrollBar->SetVisible(true); - - // Reduce area covered by the scroll bar from the available - // space. - return geometry::RealRectangle2D( - rUpperBox.X1, - rUpperBox.Y1, - rUpperBox.X2, - rUpperBox.Y2 - mpHorizontalScrollBar->GetSize() - gnVerticalGap); - } - else - mpHorizontalScrollBar->SetVisible(false); + // Place vertical scroll bar at right border. + mpVerticalScrollBar->SetPosSize(geometry::RealRectangle2D( + rUpperBox.X2 - mpVerticalScrollBar->GetSize(), + rUpperBox.Y1, + rUpperBox.X2, + rUpperBox.Y2)); + mpVerticalScrollBar->SetVisible(true); + + // Reduce area covered by the scroll bar from the available + // space. + return geometry::RealRectangle2D( + rUpperBox.X1, + rUpperBox.Y1, + rUpperBox.X2 - mpVerticalScrollBar->GetSize() - gnHorizontalGap, + rUpperBox.Y2); } + else + mpVerticalScrollBar->SetVisible(false); } return rUpperBox; @@ -1028,8 +968,6 @@ void PresenterSlideSorter::Paint (const awt::Rectangle& rUpdateBox) // Give the canvas to the controls. if (bCanvasChanged) { - if (mpHorizontalScrollBar.is()) - mpHorizontalScrollBar->SetCanvas(mxCanvas); if (mpVerticalScrollBar.is()) mpVerticalScrollBar->SetCanvas(mxCanvas); if (mpCloseButton.is()) @@ -1106,10 +1044,6 @@ bool PresenterSlideSorter::ProvideCanvas (void) if (xComponent.is()) xComponent->addEventListener(static_cast<awt::XWindowListener*>(this)); - // Tell the scrollbar about the canvas. - if (mpHorizontalScrollBar.is()) - mpHorizontalScrollBar->SetCanvas(mxCanvas); - mpCurrentSlideFrameRenderer.reset( new CurrentSlideFrameRenderer(mxComponentContext, mxCanvas)); } @@ -1131,8 +1065,6 @@ void PresenterSlideSorter::ThrowIfDisposed (void) //===== PresenterSlideSorter::Layout ========================================== PresenterSlideSorter::Layout::Layout ( - const Orientation eOrientation, - const ::rtl::Reference<PresenterScrollBar>& rpHorizontalScrollBar, const ::rtl::Reference<PresenterScrollBar>& rpVerticalScrollBar) : maBoundingBox(), maPreviewSize(), @@ -1150,8 +1082,6 @@ PresenterSlideSorter::Layout::Layout ( mnLastVisibleColumn(-1), mnFirstVisibleRow(-1), mnLastVisibleRow(-1), - meOrientation(eOrientation), - mpHorizontalScrollBar(rpHorizontalScrollBar), mpVerticalScrollBar(rpVerticalScrollBar) { } @@ -1245,60 +1175,30 @@ void PresenterSlideSorter::Layout::Update ( maPreviewSize = geometry::IntegerSize2D(floor(nPreviewWidth), floor(nPreviewHeight)); // Reset the offset. - if (meOrientation == Horizontal) - { - mnVerticalOffset = round(-(nHeight - - mnRowCount*maPreviewSize.Height - (mnRowCount-1)*mnVerticalGap) - / 2); - mnHorizontalOffset = 0; - } - else - { - mnVerticalOffset = 0; - mnHorizontalOffset = round(-(nWidth - - mnColumnCount*maPreviewSize.Width - - (mnColumnCount-1)*mnHorizontalGap) - / 2); - } + mnVerticalOffset = 0; + mnHorizontalOffset = round(-(nWidth + - mnColumnCount*maPreviewSize.Width + - (mnColumnCount-1)*mnHorizontalGap) + / 2); } void PresenterSlideSorter::Layout::SetupVisibleArea (void) { geometry::RealPoint2D aPoint (GetLocalPosition( geometry::RealPoint2D(maBoundingBox.X1, maBoundingBox.Y1))); - if (meOrientation == Horizontal) - { - mnFirstVisibleColumn = ::std::max(sal_Int32(0), GetColumn(aPoint)); - mnFirstVisibleRow = 0; - } - else - { - mnFirstVisibleColumn = 0; - mnFirstVisibleRow = ::std::max(sal_Int32(0), GetRow(aPoint)); - } + mnFirstVisibleColumn = 0; + mnFirstVisibleRow = ::std::max(sal_Int32(0), GetRow(aPoint)); aPoint = GetLocalPosition(geometry::RealPoint2D( maBoundingBox.X2, maBoundingBox.Y2)); - if (meOrientation == Horizontal) - { - mnLastVisibleColumn = GetColumn(aPoint, true); - mnLastVisibleRow = mnRowCount - 1; - } - else - { - mnLastVisibleColumn = mnColumnCount - 1; - mnLastVisibleRow = GetRow(aPoint, true); - } + mnLastVisibleColumn = mnColumnCount - 1; + mnLastVisibleRow = GetRow(aPoint, true); } bool PresenterSlideSorter::Layout::IsScrollBarNeeded (const sal_Int32 nSlideCount) { geometry::RealPoint2D aBottomRight; - if (GetOrientation() == Layout::Vertical) - aBottomRight = GetPoint( - mnColumnCount * (GetRow(nSlideCount)+1) - 1, +1, +1); - else - aBottomRight = GetPoint( - mnRowCount * (GetColumn(nSlideCount)+1) - 1, +1, +1); + aBottomRight = GetPoint( + mnColumnCount * (GetRow(nSlideCount)+1) - 1, +1, +1); return aBottomRight.X > maBoundingBox.X2-maBoundingBox.X1 || aBottomRight.Y > maBoundingBox.Y2-maBoundingBox.Y1; } @@ -1464,37 +1364,11 @@ bool PresenterSlideSorter::Layout::SetVerticalOffset (const double nOffset) return false; } -PresenterSlideSorter::Layout::Orientation - PresenterSlideSorter::Layout::GetOrientation (void) const -{ - return meOrientation; -} - void PresenterSlideSorter::Layout::UpdateScrollBars (void) { - sal_Int32 nTotalColumnCount (0); sal_Int32 nTotalRowCount (0); - if (meOrientation == Horizontal) - { - nTotalColumnCount = sal_Int32(ceil(double(mnSlideCount) / double(mnRowCount))); - nTotalRowCount = mnRowCount; - } - else - { - nTotalColumnCount = mnColumnCount; - nTotalRowCount = sal_Int32(ceil(double(mnSlideCount) / double(mnColumnCount))); - } + nTotalRowCount = sal_Int32(ceil(double(mnSlideCount) / double(mnColumnCount))); - if (mpHorizontalScrollBar.get() != NULL) - { - mpHorizontalScrollBar->SetTotalSize( - nTotalColumnCount * maPreviewSize.Width - + (nTotalColumnCount-1) * mnHorizontalGap - + 2*mnHorizontalBorder); - mpHorizontalScrollBar->SetThumbPosition(mnHorizontalOffset, false); - mpHorizontalScrollBar->SetThumbSize(maBoundingBox.X2 - maBoundingBox.X1 + 1); - mpHorizontalScrollBar->SetLineHeight(maPreviewSize.Width); - } if (mpVerticalScrollBar.get() != NULL) { mpVerticalScrollBar->SetTotalSize( @@ -1513,26 +1387,17 @@ sal_Int32 PresenterSlideSorter::Layout::GetIndex ( const sal_Int32 nRow, const sal_Int32 nColumn) const { - if (meOrientation == Horizontal) - return nColumn * mnRowCount + nRow; - else - return nRow * mnColumnCount + nColumn; + return nRow * mnColumnCount + nColumn; } sal_Int32 PresenterSlideSorter::Layout::GetRow (const sal_Int32 nSlideIndex) const { - if (meOrientation == Horizontal) - return nSlideIndex % mnRowCount; - else - return nSlideIndex / mnColumnCount; + return nSlideIndex / mnColumnCount; } sal_Int32 PresenterSlideSorter::Layout::GetColumn (const sal_Int32 nSlideIndex) const { - if (meOrientation == Horizontal) - return nSlideIndex / mnRowCount; - else - return nSlideIndex % mnColumnCount; + return nSlideIndex % mnColumnCount; } //===== PresenterSlideSorter::MouseOverManager ================================ diff --git a/sdext/source/presenter/PresenterSlideSorter.hxx b/sdext/source/presenter/PresenterSlideSorter.hxx index e10a5ae82960..0b3682ef6be4 100644 --- a/sdext/source/presenter/PresenterSlideSorter.hxx +++ b/sdext/source/presenter/PresenterSlideSorter.hxx @@ -176,7 +176,6 @@ private: bool mbIsLayoutPending; class Layout; ::boost::shared_ptr<Layout> mpLayout; - ::rtl::Reference<PresenterScrollBar> mpHorizontalScrollBar; ::rtl::Reference<PresenterScrollBar> mpVerticalScrollBar; ::rtl::Reference<PresenterButton> mpCloseButton; class MouseOverManager; diff --git a/unusedcode.easy b/unusedcode.easy index aadfa5f40b64..35f8a9fa4c04 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -957,7 +957,6 @@ sdext::presenter::PresenterAnimation::PresenterAnimation(unsigned long, unsigned sdext::presenter::PresenterAnimator::AddAnimation(boost::shared_ptr<sdext::presenter::PresenterAnimation> const&) sdext::presenter::PresenterController::GetAnimator() const sdext::presenter::PresenterGeometryHelper::Union(com::sun::star::awt::Rectangle const&, com::sun::star::awt::Rectangle const&) -sdext::presenter::PresenterHorizontalScrollBar::PresenterHorizontalScrollBar(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, com::sun::star::uno::Reference<com::sun::star::awt::XWindow> const&, boost::shared_ptr<sdext::presenter::PresenterPaintManager> const&, boost::function<void (double)> const&) sdext::presenter::PresenterSprite::GetLocation() const sdext::presenter::PresenterSprite::GetSize() const sdext::presenter::PresenterSprite::SetAlpha(double) |