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:
const BitmapEx& rOverlay,
const OutputDevice* pReferenceDevice) const;
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
......
......@@ -81,6 +81,27 @@ PageObjectPainter::~PageObjectPainter (void)
void PageObjectPainter::PaintPageObject (
OutputDevice& rDevice,
const model::SharedPageDescriptor& rpDescriptor)
{
if (UpdatePageObjectLayouter())
{
// 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);
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.
......@@ -88,20 +109,10 @@ void PageObjectPainter::PaintPageObject (
if ( ! mpPageObjectLayouter)
{
OSL_ASSERT(mpPageObjectLayouter);
return;
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(rDevice, rpDescriptor);
PaintPreview(rDevice, rpDescriptor);
PaintPageNumber(rDevice, rpDescriptor);
PaintTransitionEffect(rDevice, rpDescriptor);
rDevice.SetAntialiasing(nSavedAntialiasingMode);
else
return true;
}
......@@ -112,7 +123,7 @@ void PageObjectPainter::NotifyResize (const bool bForce)
mpPageObjectLayouter = mrLayouter.GetPageObjectLayouter();
if (bForce || ! mpPageObjectLayouter)
InvalidateBitmaps();
else
else if (UpdatePageObjectLayouter())
{
const Size aSize (mpPageObjectLayouter->GetSize(
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