Kaydet (Commit) 1bfb9dbb authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1309261 Unchecked dynamic_cast

Change-Id: Idea3a9f3465387680b814dc53ed4c0b13265f9f6
üst d03bdab6
......@@ -201,9 +201,9 @@ void SdrPaintWindow::impCreateOverlayManager()
// is it a window?
if(OUTDEV_WINDOW == GetOutputDevice().GetOutDevType())
{
vcl::Window* pWindow = dynamic_cast<vcl::Window*>(&GetOutputDevice());
vcl::Window& rWindow = dynamic_cast<vcl::Window&>(GetOutputDevice());
// decide which OverlayManager to use
if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer && !pWindow->SupportsDoubleBuffering())
if(GetPaintView().IsBufferedOverlayAllowed() && mbUseBuffer && !rWindow.SupportsDoubleBuffering())
{
// buffered OverlayManager, buffers its background and refreshes from there
// for pure overlay changes (no system redraw). The 3rd parameter specifies
......@@ -226,8 +226,7 @@ void SdrPaintWindow::impCreateOverlayManager()
// Request a repaint so that the buffered overlay manager fills
// its buffer properly. This is a workaround for missing buffer
// updates.
if (pWindow != NULL)
pWindow->Invalidate();
rWindow.Invalidate();
Color aColA(GetPaintView().getOptionsDrawinglayer().GetStripeColorA());
Color aColB(GetPaintView().getOptionsDrawinglayer().GetStripeColorB());
......
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