diff options
Diffstat (limited to 'sdext/source/presenter/PresenterScrollBar.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterScrollBar.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx index 5786ccba2a2f..95361d0f6ed3 100644 --- a/sdext/source/presenter/PresenterScrollBar.cxx +++ b/sdext/source/presenter/PresenterScrollBar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -171,14 +171,14 @@ PresenterScrollBar::~PresenterScrollBar (void) void SAL_CALL PresenterScrollBar::disposing (void) { mpMousePressRepeater->Dispose(); - + if (mxWindow.is()) { mxWindow->removeWindowListener(this); mxWindow->removePaintListener(this); mxWindow->removeMouseListener(this); mxWindow->removeMouseMotionListener(this); - + Reference<lang::XComponent> xComponent (mxWindow, UNO_QUERY); mxWindow = NULL; if (xComponent.is()) @@ -323,7 +323,7 @@ void PresenterScrollBar::SetCanvas (const Reference<css::rendering::XCanvas>& rx { mxCanvas = rxCanvas; if (mxCanvas.is()) - { + { if (mpBitmaps.get()==NULL) { if (mpSharedBitmaps.expired()) @@ -422,7 +422,7 @@ void PresenterScrollBar::Paint ( //----- XWindowListener ------------------------------------------------------- - + void SAL_CALL PresenterScrollBar::windowResized (const css::awt::WindowEvent& rEvent) throw (css::uno::RuntimeException) { @@ -432,7 +432,7 @@ void SAL_CALL PresenterScrollBar::windowResized (const css::awt::WindowEvent& rE - + void SAL_CALL PresenterScrollBar::windowMoved (const css::awt::WindowEvent& rEvent) throw (css::uno::RuntimeException) { @@ -481,7 +481,7 @@ void SAL_CALL PresenterScrollBar::windowPaint (const css::awt::PaintEvent& rEven - + //----- XMouseListener -------------------------------------------------------- void SAL_CALL PresenterScrollBar::mousePressed (const css::awt::MouseEvent& rEvent) @@ -541,7 +541,7 @@ void SAL_CALL PresenterScrollBar::mouseExited (const css::awt::MouseEvent& rEven //----- XMouseMotionListener -------------------------------------------------- - + void SAL_CALL PresenterScrollBar::mouseMoved (const css::awt::MouseEvent& rEvent) throw (css::uno::RuntimeException) { @@ -568,7 +568,7 @@ void SAL_CALL PresenterScrollBar::mouseDragged (const css::awt::MouseEvent& rEve return; mpMousePressRepeater->Stop(); - + if (mxPresenterHelper.is()) mxPresenterHelper->captureMouse(mxWindow); @@ -653,7 +653,7 @@ void PresenterScrollBar::PaintBitmap( aBox.Y2 += aWindowBox.Y; Reference<rendering::XBitmap> xBitmap (GetBitmap(eArea,rpBitmaps)); - + if (xBitmap.is()) { Reference<rendering::XPolyPolygon2D> xClipPolygon ( @@ -661,11 +661,11 @@ void PresenterScrollBar::PaintBitmap( PresenterGeometryHelper::Intersection(rUpdateBox, PresenterGeometryHelper::ConvertRectangle(aBox)), mxCanvas->getDevice())); - + const rendering::ViewState aViewState ( geometry::AffineMatrix2D(1,0,0, 0,1,0), xClipPolygon); - + const geometry::IntegerSize2D aBitmapSize (xBitmap->getSize()); rendering::RenderState aRenderState ( geometry::AffineMatrix2D( @@ -698,7 +698,7 @@ void PresenterScrollBar::NotifyThumbPositionChange (void) catch (Exception&) { } - + mbIsNotificationActive = false; } } @@ -709,7 +709,7 @@ void PresenterScrollBar::NotifyThumbPositionChange (void) PresenterScrollBar::Area PresenterScrollBar::GetArea (const double nX, const double nY) const { const geometry::RealPoint2D aPoint(nX, nY); - + if (PresenterGeometryHelper::IsInside(GetRectangle(Pager), aPoint)) { if (PresenterGeometryHelper::IsInside(GetRectangle(Thumb), aPoint)) @@ -883,7 +883,7 @@ void PresenterVerticalScrollBar::UpdateBorders (void) { const awt::Rectangle aWindowBox (mxWindow->getPosSize()); double nBottom = aWindowBox.Height; - + if (mpNextButtonDescriptor.get() != NULL) { Reference<rendering::XBitmap> xBitmap (mpNextButtonDescriptor->GetNormalBitmap()); @@ -912,7 +912,7 @@ void PresenterVerticalScrollBar::UpdateBorders (void) if (mnTotalSize < 1) { maBox[Thumb] = maBox[Pager]; - + // Set up the enabled/disabled states. maEnabledState[PrevButton] = false; maEnabledState[PagerUp] = false; @@ -926,7 +926,7 @@ void PresenterVerticalScrollBar::UpdateBorders (void) const double nThumbPosition = ::std::min(::std::max(0.0,mnThumbPosition), mnTotalSize - nThumbSize); maBox[Thumb] = geometry::RealRectangle2D( 0, nThumbPosition / mnTotalSize * nPagerHeight, - aWindowBox.Width, + aWindowBox.Width, (nThumbPosition+nThumbSize) / mnTotalSize * nPagerHeight); // Set up the enabled/disabled states. @@ -1106,7 +1106,7 @@ 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()); @@ -1129,14 +1129,14 @@ void PresenterHorizontalScrollBar::UpdateBorders (void) 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; @@ -1302,7 +1302,7 @@ void PresenterScrollBar::MousePressRepeater::SetMouseArea(const PresenterScrollB void PresenterScrollBar::MousePressRepeater::Callback (const TimeValue& rCurrentTime) { (void)rCurrentTime; - + if (mpScrollBar.get() == NULL) { Stop(); @@ -1323,7 +1323,7 @@ void PresenterScrollBar::MousePressRepeater::Execute (void) case PrevButton: mpScrollBar->SetThumbPosition(nThumbPosition - mpScrollBar->GetLineHeight(), true); break; - + case NextButton: mpScrollBar->SetThumbPosition(nThumbPosition + mpScrollBar->GetLineHeight(), true); break; |