summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-10-24 17:58:27 +0200
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-11-01 10:01:04 -0400
commitd7f2cc4d9e4b81a788f178a180e026de365cb43c (patch)
treec9ed5ffc9e16fa804110294bf9189bfad1958fa3
parent124c81037be1a971232c622614a629ca64478dc1 (diff)
fdo#83664: svx: don't try to paint on empty OutputDevice
ObjectContactOfPageView::DoProcessDisplay() initalizes an empty aViewRange, which later code assumes to mean "paint everything", but actually the OutputDevice has 0 size so nothing can be painted. Change-Id: I1e47e8d38c1fad5e08027bb76fce4b54c5b3358b
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index f778df103307..27ae1bb8fb6a 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -141,6 +141,15 @@ namespace sdr
// OutputDevices then the given ones.
void ObjectContactOfPageView::DoProcessDisplay(DisplayInfo& rDisplayInfo)
{
+ OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
+ const Size aOutputSizePixel(rTargetOutDev.GetOutputSizePixel());
+ if (!isOutputToRecordingMetaFile() // do those have outdev too?
+ && (0 == aOutputSizePixel.getWidth() ||
+ 0 == aOutputSizePixel.getHeight()))
+ {
+ return;
+ }
+
// visualize entered group when that feature is switched on and it's not
// a print output. #i29129# No ghosted display for printing.
bool bVisualizeEnteredGroup(DoVisualizeEnteredGroup() && !isOutputToPrinter());
@@ -170,7 +179,6 @@ namespace sdr
// update current ViewInformation2D at the ObjectContact
const double fCurrentTime(getPrimitiveAnimator().GetTime());
- OutputDevice& rTargetOutDev = GetPageWindow().GetPaintWindow().GetTargetOutputDevice();
basegfx::B2DRange aViewRange;
// create ViewRange
@@ -194,7 +202,6 @@ namespace sdr
else
{
// use visible pixels, but transform to world coordinates
- const Size aOutputSizePixel(rTargetOutDev.GetOutputSizePixel());
aViewRange = basegfx::B2DRange(0.0, 0.0, aOutputSizePixel.getWidth(), aOutputSizePixel.getHeight());
// if a clip region is set, use it