From 78f6407978aa48c3cbb116bc281940dbf1f2dcbc Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Tue, 24 Jun 2014 21:01:13 +0200 Subject: fix build after rebase Conflicts: sd/source/ui/slidesorter/view/SlideSorterView.cxx sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx Change-Id: Id014a49dbbb33123d2d04f9f33954b77575f2e9e --- .../slidesorter/inc/view/SlsPageObjectLayouter.hxx | 6 +- .../slidesorter/inc/view/SlsPageObjectPainter.hxx | 1 + sd/source/ui/slidesorter/view/SlideSorterView.cxx | 14 ----- .../ui/slidesorter/view/SlsPageObjectLayouter.cxx | 6 -- .../ui/slidesorter/view/SlsPageObjectPainter.cxx | 67 +++++----------------- 5 files changed, 17 insertions(+), 77 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx index dc92d007ec0e..a54e1328ee12 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx @@ -114,7 +114,8 @@ public: /// the maximum size of each tile, also position independent Size GetGridMaxSize(const CoordinateSystem eCoordinateSystem); - Image GetTransitionEffectIcon (void) const; + Image GetTransitionEffectIcon (void) const { return maTransitionEffectIcon;} + Image GetCustomAnimationEffectIcon (void) const { return maCustomAnimationEffectIcon;} private: Rectangle GetBoundingBox ( @@ -122,9 +123,6 @@ private: const Part ePart, const CoordinateSystem eCoordinateSystem); - Image GetTransitionEffectIcon (void) const { return maTransitionEffectIcon;} - Image GetCustomAnimationEffectIcon (void) const { return maCustomAnimationEffectIcon;} - private: SharedSdWindow mpWindow; Size maPageObjectSize; diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx index d47ef2152a06..367db278cf16 100644 --- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx +++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx @@ -103,6 +103,7 @@ private: OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const; void PaintCustomAnimationEffect ( + PageObjectLayouter *pPageObjectLayouter, OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const; void PaintBorder ( diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx index e823e900a568..d6bfbe008eb3 100644 --- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx +++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx @@ -614,13 +614,6 @@ bool SlideSorterView::SetOrientation (const Layouter::Orientation eOrientation) return false; } - - - - - - - void SlideSorterView::RequestRepaint (void) { SharedSdWindow pWindow (mrSlideSorter.GetContentWindow()); @@ -979,13 +972,6 @@ bool SlideSorterView::SetState ( return mpPageObjectPainter; } - - - - - - - //===== SlideSorterView::DrawLock ============================================= SlideSorterView::DrawLock::DrawLock (SlideSorter& rSlideSorter) diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx index 3bc173685a39..1c35614df8d8 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx @@ -270,12 +270,6 @@ Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount) return aSize; } - - - - - - } } } // 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 bd6c509bf68d..5f0d8ecedad0 100644 --- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx @@ -77,17 +77,18 @@ void PageObjectPainter::PaintPageObject ( { if (UpdatePageObjectLayouter()) { + PageObjectLayouter *pPageObjectLayouter = mrLayouter.GetPageObjectLayouter().get(); // Turn off antialiasing to avoid the bitmaps from being // shifted by fractions of a pixel and thus show blurry edges. const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing()); rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW); - PaintBackground(rDevice, rpDescriptor); - PaintPreview(rDevice, rpDescriptor); - PaintPageNumber(rDevice, rpDescriptor); - PaintTransitionEffect(rDevice, rpDescriptor); + PaintBackground(pPageObjectLayouter, rDevice, rpDescriptor); + PaintPreview(pPageObjectLayouter, rDevice, rpDescriptor); + PaintPageNumber(pPageObjectLayouter, rDevice, rpDescriptor); + PaintTransitionEffect(pPageObjectLayouter, rDevice, rpDescriptor); if (rpDescriptor->GetPage()->hasAnimationNode()) - PaintCustomAnimationEffect(rDevice, rpDescriptor); + PaintCustomAnimationEffect(pPageObjectLayouter, rDevice, rpDescriptor); rDevice.SetAntialiasing(nSavedAntialiasingMode); } } @@ -106,44 +107,9 @@ bool PageObjectPainter::UpdatePageObjectLayouter (void) return false; } - // Turn off antialiasing to avoid the bitmaps from being shifted by - // fractions of a pixel and thus show blurry edges. - const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing()); - rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW); - - PaintBackground(pPageObjectLayouter, rDevice, rpDescriptor); - PaintPreview(pPageObjectLayouter, rDevice, rpDescriptor); - PaintPageNumber(pPageObjectLayouter, rDevice, rpDescriptor); - PaintTransitionEffect(pPageObjectLayouter, rDevice, rpDescriptor); - - rDevice.SetAntialiasing(nSavedAntialiasingMode); - return true; } - - - -void PageObjectPainter::NotifyResize (const bool bForce) -{ - mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter(); - if (bForce || ! mpPageObjectLayouter) - InvalidateBitmaps(); - else if (UpdatePageObjectLayouter()) - { - const Size aSize (mpPageObjectLayouter->GetGridMaxSize( - PageObjectLayouter::WindowCoordinateSystem)); - if (maSize != aSize) - { - maSize = aSize; - InvalidateBitmaps(); - } - } -} - - - - void PageObjectPainter::InvalidateBitmaps (void) { maNormalBackground.SetEmpty(); @@ -156,7 +122,6 @@ void PageObjectPainter::InvalidateBitmaps (void) maMouseOverSelectedAndFocusedBackground.SetEmpty(); } ->>>>>>> slidesorter - cleanup redundant caches and notifications. void PageObjectPainter::SetTheme (const ::boost::shared_ptr& rpTheme) { mpTheme = rpTheme; @@ -353,11 +318,12 @@ void PageObjectPainter::PaintTransitionEffect ( rDevice.DrawBitmapEx( aBox.TopCenter(), - mpPageObjectLayouter->GetTransitionEffectIcon().GetBitmapEx()); + pPageObjectLayouter->GetTransitionEffectIcon().GetBitmapEx()); } } void PageObjectPainter::PaintCustomAnimationEffect ( + PageObjectLayouter *pPageObjectLayouter, OutputDevice& rDevice, const model::SharedPageDescriptor& rpDescriptor) const { @@ -367,19 +333,20 @@ void PageObjectPainter::PaintCustomAnimationEffect ( EffectSequence::iterator aEnd = aMainSequence->getEnd(); if ( aIter != aEnd ) { - const Rectangle aBox (mpPageObjectLayouter->GetBoundingBox( + const Rectangle aBox (pPageObjectLayouter->GetBoundingBox( rpDescriptor, PageObjectLayouter::CustomAnimationEffectIndicator, PageObjectLayouter::ModelCoordinateSystem)); rDevice.DrawBitmapEx( aBox.TopCenter(), - mpPageObjectLayouter->GetCustomAnimationEffectIcon().GetBitmapEx()); + pPageObjectLayouter->GetCustomAnimationEffectIcon().GetBitmapEx()); } } -Bitmap& PageObjectPainter::GetBackgroundForState ( - const model::SharedPageDescriptor& rpDescriptor, - const OutputDevice& rReferenceDevice) +void PageObjectPainter::PaintBackgroundDetail ( + PageObjectLayouter *pPageObjectLayouter, + OutputDevice& rDevice, + const model::SharedPageDescriptor& rpDescriptor) const { enum State { None = 0x00, Selected = 0x01, MouseOver = 0x02, Focused = 0x04 }; const int eState = @@ -398,12 +365,6 @@ Bitmap& PageObjectPainter::GetBackgroundForState ( break; case MouseOver | Selected: - return GetBackground( - maMouseOverSelectedBackground, - Theme::Gradient_MouseOverSelected, - rReferenceDevice, - false); - case MouseOver: eColorType = Theme::Gradient_MouseOverPage; bHasFocusBorder = false; -- cgit