summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-29 11:26:41 +0100
committerAndras Timar <andras.timar@collabora.com>2015-07-08 12:04:09 +0200
commitf518469adfb5a7e6985d8b1989dedafa393ee985 (patch)
tree551c4571569d3c52d83607a2a95953ef379985e3 /svx
parentb9e717d769cc930364b9536b1c3d437890bb7e8d (diff)
Resolves: tdf#92275 impress grinds to a halt constant swapping images
This reverts commit 6c84442f99de109b585d3ba8964deb8dcf261c0f. "tdf#87820 Images not displayed properly in Calc" and replaces it with an alternative solution Change-Id: Iecb560d43767f0e41e442a307eefcdcecb7589ef (cherry picked from commit 2d196d0ee26b3840e56ec6537066a3b4a2f08691) (cherry picked from commit 72da6ef835982e1927fd7405bb42f403c2fee5f9) Reviewed-on: https://gerrit.libreoffice.org/16574 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofgraphic.cxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
index 4a8f469c4574..df3e06ebcc6c 100644
--- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx
@@ -134,22 +134,30 @@ namespace sdr
rGrafObj.mbInsidePaint = false;
}
- // Invalidate paint areas.
- GetViewContact().ActionChanged();
-
bRetval = true;
}
}
}
else
{
- // it is not swapped out, somehow it was loaded. In that case, forget
+ // it is not swapped out, somehow[1] it was loaded. In that case, forget
// about an existing triggered event
- if(mpAsynchLoadEvent)
+ if (mpAsynchLoadEvent)
{
// just delete it, this will remove it from the EventHandler and
// will trigger forgetAsynchGraphicLoadingEvent from the destructor
delete mpAsynchLoadEvent;
+
+ // Invalidate paint areas.
+ // [1] If a calc document with graphics is loaded then OnLoad will
+ // be emitted before the graphic are due to be swapped in asynchronously
+ // In sfx2 we generate a preview on receiving onload, which forces
+ // the graphics to be swapped in to generate the preview. When
+ // the timer triggers it find the graphics already swapped in. So
+ // we should still invalidate the paint area on finding the graphic
+ // swapped in seeing as we're still waiting in calc to draw the
+ // graphics on receipt of their contents.
+ GetViewContact().ActionChanged();
}
}
@@ -189,9 +197,6 @@ namespace sdr
rGrafObj.mbInsidePaint = false;
}
- // Invalidate paint areas.
- GetViewContact().ActionChanged();
-
bRetval = true;
}
}