[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source
Michael Stahl
mstahl at redhat.com
Sun Jun 29 05:46:33 PDT 2014
xmloff/source/style/XMLClipPropertyHandler.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit c6fe783c0ebec2ca95463605e7758e80c17d3f7e
Author: Michael Stahl <mstahl at redhat.com>
Date: Sat Jun 28 00:09:43 2014 +0200
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 at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx
index 92f145f..ea5518d 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;
More information about the Libreoffice-commits
mailing list