Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E4BB7D356 for ; Tue, 30 Oct 2012 15:06:43 +0000 (UTC) Received: (qmail 67590 invoked by uid 500); 30 Oct 2012 15:06:43 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 67442 invoked by uid 500); 30 Oct 2012 15:06:41 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 67413 invoked by uid 99); 30 Oct 2012 15:06:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 15:06:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 15:06:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 47D2123888E3; Tue, 30 Oct 2012 15:05:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1403730 - in /incubator/ooo/trunk/main/svgio: inc/svgio/svgreader/svgstyleattributes.hxx source/svgreader/svgstyleattributes.cxx Date: Tue, 30 Oct 2012 15:05:54 -0000 To: ooo-commits@incubator.apache.org From: alg@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121030150554.47D2123888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: alg Date: Tue Oct 30 15:05:53 2012 New Revision: 1403730 URL: http://svn.apache.org/viewvc?rev=1403730&view=rev Log: #121221# added boolean state to remember when the StrokeDasharray was set to empty by purpose Modified: incubator/ooo/trunk/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx incubator/ooo/trunk/main/svgio/source/svgreader/svgstyleattributes.cxx Modified: incubator/ooo/trunk/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx?rev=1403730&r1=1403729&r2=1403730&view=diff ============================================================================== --- incubator/ooo/trunk/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx (original) +++ incubator/ooo/trunk/main/svgio/inc/svgio/svgreader/svgstyleattributes.hxx Tue Oct 30 15:05:53 2012 @@ -206,6 +206,9 @@ namespace svgio // vaules for fill, stroke, strokeWidth and others bool mbIsClipPathContent : 1; + // #121221# Defines if evtl. an empty array *is* set + bool mbStrokeDasharraySet : 1; + /// internal helpers void add_fillGradient( const basegfx::B2DPolyPolygon& rPath, @@ -322,6 +325,10 @@ namespace svgio const SvgNumberVector& getStrokeDasharray() const; void setStrokeDasharray(const SvgNumberVector& rStrokeDasharray = SvgNumberVector()) { maStrokeDasharray = rStrokeDasharray; } + /// #121221# StrokeDasharray needs a set state, it *may* be set to empty by purpose + bool getStrokeDasharraySet() const { return mbStrokeDasharraySet; } + void setStrokeDasharraySet(bool bNew) { mbStrokeDasharraySet = bNew; } + /// StrokeDashOffset content const SvgNumber getStrokeDashOffset() const; void setStrokeDashOffset(const SvgNumber& rStrokeDashOffset = SvgNumber()) { maStrokeDashOffset = rStrokeDashOffset; } Modified: incubator/ooo/trunk/main/svgio/source/svgreader/svgstyleattributes.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svgio/source/svgreader/svgstyleattributes.cxx?rev=1403730&r1=1403729&r2=1403730&view=diff ============================================================================== --- incubator/ooo/trunk/main/svgio/source/svgreader/svgstyleattributes.cxx (original) +++ incubator/ooo/trunk/main/svgio/source/svgreader/svgstyleattributes.cxx Tue Oct 30 15:05:53 2012 @@ -1165,7 +1165,8 @@ namespace svgio mpMarkerEndXLink(0), maFillRule(FillRule_notset), maClipRule(FillRule_nonzero), - mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()) + mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()), + mbStrokeDasharraySet(false) { if(!mbIsClipPathContent) { @@ -1272,9 +1273,18 @@ namespace svgio { if(aContent.getLength()) { + static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none")); SvgNumberVector aVector; - if(readSvgNumberVector(aContent, aVector)) + if(aContent.match(aStrNone)) + { + // #121221# The special value 'none' needs to be handled + // in the sense that *when* it is set, the parent shall not + // be used. Before this was only dependent on the array being + // empty + setStrokeDasharraySet(true); + } + else if(readSvgNumberVector(aContent, aVector)) { setStrokeDasharray(aVector); } @@ -2029,7 +2039,12 @@ namespace svgio { return maStrokeDasharray; } - + else if(getStrokeDasharraySet()) + { + // #121221# is set to empty *by purpose*, do not visit parent styles + return maStrokeDasharray; + } + const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle(); if(pSvgStyleAttributes)