fdo#78149: assert if SwVirtFlyDrawObj is being painted with no ViewPort set
Change-Id: I2f94a28d85fa31c5623ff0c6067edc7060998d9e
This commit is contained in:
parent
638b808646
commit
6dc48ef517
@ -168,7 +168,7 @@ namespace drawinglayer
|
|||||||
|
|
||||||
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
|
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
|
||||||
|
|
||||||
// overloaded to allow callbacks to wrap_DoPaintObject
|
// override to allow callbacks to wrap_DoPaintObject
|
||||||
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
|
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const SAL_OVERRIDE;
|
||||||
|
|
||||||
// data read access
|
// data read access
|
||||||
@ -233,7 +233,7 @@ namespace drawinglayer
|
|||||||
// when they do not know this primitive (and they do not). Inside wrap_DoPaintObject
|
// when they do not know this primitive (and they do not). Inside wrap_DoPaintObject
|
||||||
// there needs to be a test that paint is only done during SW repaints (see there).
|
// there needs to be a test that paint is only done during SW repaints (see there).
|
||||||
// Using this mechanism guarantees the correct Z-Order of the VirtualObject-based FlyFrames.
|
// Using this mechanism guarantees the correct Z-Order of the VirtualObject-based FlyFrames.
|
||||||
getSwVirtFlyDrawObj().wrap_DoPaintObject();
|
getSwVirtFlyDrawObj().wrap_DoPaintObject(rViewInformation);
|
||||||
|
|
||||||
// call parent
|
// call parent
|
||||||
return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation);
|
return BufferedDecompositionPrimitive2D::get2DDecomposition(rViewInformation);
|
||||||
@ -445,7 +445,8 @@ namespace
|
|||||||
}
|
}
|
||||||
// <--
|
// <--
|
||||||
|
|
||||||
void SwVirtFlyDrawObj::wrap_DoPaintObject() const
|
void SwVirtFlyDrawObj::wrap_DoPaintObject(
|
||||||
|
drawinglayer::geometry::ViewInformation2D const& rViewInformation) const
|
||||||
{
|
{
|
||||||
SwViewShell* pShell = pFlyFrm->getRootFrm()->GetCurrShell();
|
SwViewShell* pShell = pFlyFrm->getRootFrm()->GetCurrShell();
|
||||||
|
|
||||||
@ -465,6 +466,9 @@ void SwVirtFlyDrawObj::wrap_DoPaintObject() const
|
|||||||
|
|
||||||
if ( bDrawObject )
|
if ( bDrawObject )
|
||||||
{
|
{
|
||||||
|
// if there's no viewport set, all fly-frames will be painted,
|
||||||
|
// which is slow, wastes memory, and can cause other trouble.
|
||||||
|
assert(!rViewInformation.getViewport().isEmpty());
|
||||||
if ( !pFlyFrm->IsFlyInCntFrm() )
|
if ( !pFlyFrm->IsFlyInCntFrm() )
|
||||||
{
|
{
|
||||||
// it is also necessary to restore the VCL MapMode from ViewInformation since e.g.
|
// it is also necessary to restore the VCL MapMode from ViewInformation since e.g.
|
||||||
|
@ -70,7 +70,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// for paints triggered form ExecutePrimitive
|
// for paints triggered form ExecutePrimitive
|
||||||
void wrap_DoPaintObject() const;
|
void wrap_DoPaintObject(
|
||||||
|
drawinglayer::geometry::ViewInformation2D const&) const;
|
||||||
|
|
||||||
// for simple access to inner and outer bounds
|
// for simple access to inner and outer bounds
|
||||||
basegfx::B2DRange getOuterBound() const;
|
basegfx::B2DRange getOuterBound() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user