[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 3 commits - xmloff/source

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Nov 16 00:05:52 PST 2010


 xmloff/source/draw/ximpshap.cxx |   30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

New commits:
commit a2f9c7dfc33f98a321abb00257f3194c737c4c12
Merge: ee7f135... 8742380...
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Tue Nov 16 09:00:39 2010 +0100

    Merge commit 'ooo/OOO330_m15' into libreoffice-3-3

commit 87423806b51ed7df5d1575bcb4007e428d896219
Merge: 2773f98... b67b147...
Author: obo <obo at openoffice.org>
Date:   Fri Nov 12 08:08:56 2010 +0100

    CWS-TOOLING: integrate CWS sw33bf12

commit b67b147d7838f41b4d64b4e690f515b85d713635
Author: Oliver-Rainer Wittmann <od at openoffice.org>
Date:   Wed Nov 10 14:08:20 2010 +0100

    sw33bf12: #i115492# method <SdXMLConnectorShapeContext::startElement(..)> - ignore svg:d attribute for text documents from OOo version before OOo 3.3

diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 82285ba..b4ac0d4 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1926,7 +1926,35 @@ void SdXMLConnectorShapeContext::StartElement(const uno::Reference< xml::sax::XA
             SetLayer();
 
             if ( maPath.hasValue() )
-                xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ), maPath );
+            {
+                // --> OD #i115492#
+                // Ignore svg:d attribute for text documents created by OpenOffice.org 
+                // versions before OOo 3.3, because these OOo versions are storing
+                // svg:d values not using the correct unit.
+                bool bApplySVGD( true );
+                if ( uno::Reference< text::XTextDocument >(GetImport().GetModel(), uno::UNO_QUERY).is() )
+                {
+                    sal_Int32 nUPD( 0 );
+                    sal_Int32 nBuild( 0 );
+                    const bool bBuildIdFound = GetImport().getBuildIds( nUPD, nBuild );
+                    if ( GetImport().IsTextDocInOOoFileFormat() ||
+                         ( bBuildIdFound &&
+                           ( ( nUPD == 641 ) || ( nUPD == 645 ) ||  // prior OOo 2.0
+                             ( nUPD == 680 ) ||                     // OOo 2.x
+                             ( nUPD == 300 ) ||                     // OOo 3.0 - OOo 3.0.1
+                             ( nUPD == 310 ) ||                     // OOo 3.1 - OOo 3.1.1
+                             ( nUPD == 320 ) ) ) )                  // OOo 3.2 - OOo 3.2.1
+                    {
+                        bApplySVGD = false;
+                    }    
+                }            
+
+                if ( bApplySVGD )
+                {
+                    xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("PolyPolygonBezier") ), maPath );
+                }                                                                                        
+                // <--
+            }
 
             SdXMLShapeContext::StartElement(xAttrList);
         }


More information about the Libreoffice-commits mailing list