summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-08-12 14:15:29 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-08-12 12:51:18 +0000
commita81d95bbee794757176e811e2e37fc8ce7291450 (patch)
tree7399cfabccf2c7f93d5e103f872cae1cc4b6fb76
parent05bbeebc44c34f4f8938840f96a52afeb4ac49a5 (diff)
tdf#93382: Make HACK more targeted to avoid collateral damage
Change-Id: Ieecad5f244703c4d2436e22a3ab50f719843eef4 (cherry picked from commit 68c6408b1725a8f506a8adb8c9af67a65e667f1c) Reviewed-on: https://gerrit.libreoffice.org/17672 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/unodraw/unoshap4.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 9f07d79327cf..9b9d7500b162 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -429,13 +429,17 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName )
{}
pOle2Obj->SetLogicRect( aRect );
}
- else if (!aRect.IsEmpty()) //HACK: can aRect legally be empty?
+ else
{
awt::Size aSz;
Size aSize = aRect.GetSize();
aSz.Width = aSize.Width();
aSz.Height = aSize.Height();
- xObj->setVisualAreaSize( pOle2Obj->GetAspect(), aSz );
+ if (aSz.Width != 0 || aSz.Height != 0)
+ {
+ //HACK: can aSz legally be empty?
+ xObj->setVisualAreaSize( pOle2Obj->GetAspect(), aSz );
+ }
}
// connect the object after the visual area is set