Kaydet (Commit) b8f5370a authored tarafından Andre Fischer's avatar Andre Fischer

#i118813# Update slide sorter after page format is modified.

üst 961de71f
......@@ -129,6 +129,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
......
......@@ -134,6 +134,28 @@ 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);
mrButtonBar.Paint(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.
......@@ -141,21 +163,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);
mrButtonBar.Paint(rDevice, rpDescriptor);
rDevice.SetAntialiasing(nSavedAntialiasingMode);
else
return true;
}
......@@ -165,7 +176,7 @@ void PageObjectPainter::NotifyResize (const bool bForce)
{
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