Kaydet (Commit) 8056d926 authored tarafından Andre Fischer's avatar Andre Fischer Kaydeden (comit) Caolán McNamara

Resolves: #i118813# Update slide sorter after page format is modified

(cherry picked from commit b8f5370a)

Conflicts:
	sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx

Change-Id: I42553defdce1636190e8c5c226774135e179e25d
üst dbec45e8
...@@ -122,6 +122,12 @@ private: ...@@ -122,6 +122,12 @@ private:
const BitmapEx& rOverlay, const BitmapEx& rOverlay,
const OutputDevice* pReferenceDevice) const; const OutputDevice* pReferenceDevice) const;
void InvalidateBitmaps (void); void InvalidateBitmaps (void);
/** Update the local pointer to the page object layouter to the
one owned by the general layouter.
Return <TRUE/> when after the call we have a valid page object layouter.
*/
bool UpdatePageObjectLayouter (void);
}; };
} } } // end of namespace sd::slidesorter::view } } } // end of namespace sd::slidesorter::view
......
...@@ -82,17 +82,10 @@ void PageObjectPainter::PaintPageObject ( ...@@ -82,17 +82,10 @@ void PageObjectPainter::PaintPageObject (
OutputDevice& rDevice, OutputDevice& rDevice,
const model::SharedPageDescriptor& rpDescriptor) const model::SharedPageDescriptor& rpDescriptor)
{ {
// The page object layouter is quite volatile. It may have been replaced if (UpdatePageObjectLayouter())
// since the last call. Update it now.
mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
if ( ! mpPageObjectLayouter)
{ {
OSL_ASSERT(mpPageObjectLayouter); // Turn off antialiasing to avoid the bitmaps from being
return; // shifted by fractions of a pixel and thus show blurry edges.
}
// 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()); const sal_uInt16 nSavedAntialiasingMode (rDevice.GetAntialiasing());
rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW); rDevice.SetAntialiasing(nSavedAntialiasingMode & ~ANTIALIASING_ENABLE_B2DDRAW);
...@@ -102,6 +95,24 @@ void PageObjectPainter::PaintPageObject ( ...@@ -102,6 +95,24 @@ void PageObjectPainter::PaintPageObject (
PaintTransitionEffect(rDevice, rpDescriptor); PaintTransitionEffect(rDevice, rpDescriptor);
rDevice.SetAntialiasing(nSavedAntialiasingMode); rDevice.SetAntialiasing(nSavedAntialiasingMode);
}
}
bool PageObjectPainter::UpdatePageObjectLayouter (void)
{
// The page object layouter is quite volatile. It may have been replaced
// since the last call. Update it now.
mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
if ( ! mpPageObjectLayouter)
{
OSL_ASSERT(mpPageObjectLayouter);
return false;
}
else
return true;
} }
...@@ -112,7 +123,7 @@ void PageObjectPainter::NotifyResize (const bool bForce) ...@@ -112,7 +123,7 @@ void PageObjectPainter::NotifyResize (const bool bForce)
mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter(); mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
if (bForce || ! mpPageObjectLayouter) if (bForce || ! mpPageObjectLayouter)
InvalidateBitmaps(); InvalidateBitmaps();
else else if (UpdatePageObjectLayouter())
{ {
const Size aSize (mpPageObjectLayouter->GetSize( const Size aSize (mpPageObjectLayouter->GetSize(
PageObjectLayouter::FocusIndicator, PageObjectLayouter::FocusIndicator,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment