summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-29 13:12:12 +0100
committerAndras Timar <andras.timar@collabora.com>2018-06-27 12:37:32 +0200
commitac981fce182a6e7c0393fa128e2243c062746191 (patch)
tree9e30b0a0103a354e10919c255089b670157f9061
parent9d00f5034eef7867d8973a9d7b124e531bfccd7d (diff)
forcepoint#43 endless update ole2 preview recursion
Change-Id: I7a6a52d2ea63f840a8a1800fdf7039b1e7b24cdc Reviewed-on: https://gerrit.libreoffice.org/55004 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 1663a364c80fde2ac8396dd2fbcbee4240231271) (cherry picked from commit 3ca78fd4d5c710c9f6baff2b975969d9d2ff41db)
-rw-r--r--svtools/source/misc/embedhlp.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 564b5a096479..9c432a02af8c 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -235,6 +235,7 @@ struct EmbeddedObjectRef_Impl
sal_Int64 nViewAspect;
bool bIsLocked:1;
bool bNeedUpdate:1;
+ bool bUpdating:1;
// #i104867#
sal_uInt32 mnGraphicVersion;
@@ -247,6 +248,7 @@ struct EmbeddedObjectRef_Impl
nViewAspect(embed::Aspects::MSOLE_CONTENT),
bIsLocked(false),
bNeedUpdate(false),
+ bUpdating(false),
mnGraphicVersion(0),
aDefaultSizeForChart_In_100TH_MM(awt::Size(8000,7000))
{}
@@ -261,6 +263,7 @@ struct EmbeddedObjectRef_Impl
nViewAspect(r.nViewAspect),
bIsLocked(r.bIsLocked),
bNeedUpdate(r.bNeedUpdate),
+ bUpdating(r.bUpdating),
mnGraphicVersion(0),
aDefaultSizeForChart_In_100TH_MM(r.aDefaultSizeForChart_In_100TH_MM)
{
@@ -832,7 +835,14 @@ bool EmbeddedObjectRef::IsGLChart(const css::uno::Reference < css::embed::XEmbed
void EmbeddedObjectRef::UpdateReplacement()
{
- GetReplacement( true );
+ if (mpImpl->bUpdating)
+ {
+ SAL_WARN("svtools.misc", "UpdateReplacement called while UpdateReplacement already underway");
+ return;
+ }
+ mpImpl->bUpdating = true;
+ GetReplacement(true);
+ mpImpl->bUpdating = false;
}
void EmbeddedObjectRef::UpdateReplacementOnDemand()