summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-06-28 00:09:43 +0200
committerAndras Timar <andras.timar@collabora.com>2014-06-29 14:49:56 -0700
commitf443923eaa3b24757a399bbb66cd66b54dd80c75 (patch)
tree128bafa68ef0b412155d89aeab1b95733e95b947 /xmloff
parent4db014a70efbf6f25a63348390c79827caf1c12d (diff)
fdo#80009: xmloff: ignore excessive fo:clip values
These cause problems in drawinglayer, and nobody needs a 5km clip. Change-Id: Ic485250413194adbcd0ccf855f12e89e532d7120 (cherry picked from commit 924a28a7b1dc2f89e6940630057557f5f03494df) Reviewed-on: https://gerrit.libreoffice.org/9947 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/XMLClipPropertyHandler.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx
index 92f145fc69f7..ea5518d09b36 100644
--- a/xmloff/source/style/XMLClipPropertyHandler.cxx
+++ b/xmloff/source/style/XMLClipPropertyHandler.cxx
@@ -81,6 +81,13 @@ bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::Any&
!rUnitConverter.convertMeasureToCore( nVal, aToken ) )
break;
+ // fdo#80009 such nonsense could be written via WW8 import fdo#77454
+ if (abs(nVal) > 400000)
+ {
+ SAL_INFO("xmloff.style", "ignoring excessive clip " << aToken);
+ nVal = 0;
+ }
+
switch( nPos )
{
case 0: aCrop.Top = nVal; break;