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

Radek Doulik rodo at novell.com
Thu Feb 21 20:55:47 PST 2013


 xmloff/source/core/xmlexp.cxx          |    3 ++-
 xmloff/source/draw/sdxmlexp.cxx        |    5 -----
 xmloff/source/draw/shapeexport4.cxx    |    5 ++++-
 xmloff/source/draw/ximpcustomshape.cxx |    7 +++++++
 4 files changed, 13 insertions(+), 7 deletions(-)

New commits:
commit b86778cb002d7302d26e0dfe12c3bee3eeefc5d7
Author: Radek Doulik <rodo at novell.com>
Date:   Thu Jul 19 11:06:50 2012 +0200

    odf: export arcangleto commands in enhanced path (use drawooo namespace)
    
    Change-Id: I43a2c08ee8dfc0abe4d05579b837b5be0944c0fe
    (cherry picked from commit d8720d4e390143279ccae8eed05decf54240e8fa)
    
    Signed-off-by: David Tardon <dtardon at redhat.com>

diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 9dc41e6..553395f 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -376,7 +376,8 @@ void SvXMLExport::_InitCtor()
                 GetXMLToken(XML_NP_TABLE_EXT), GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT);
             mpNamespaceMap->Add(
                 GetXMLToken(XML_NP_CALC_EXT), GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT);
-
+            mpNamespaceMap->Add(
+                GetXMLToken(XML_NP_DRAW_EXT), GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT);
         }
     }
     if( (getExportFlags() & (EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index ce4d418..8927e92 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -641,11 +641,6 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
             GetXMLToken(XML_NP_OFFICE_EXT),
             GetXMLToken(XML_N_OFFICE_EXT),
             XML_NAMESPACE_OFFICE_EXT);
-
-        _GetNamespaceMap().Add(
-            GetXMLToken(XML_NP_DRAW_EXT),
-            GetXMLToken(XML_N_DRAW_EXT),
-            XML_NAMESPACE_DRAW_EXT);
     }
 
     GetShapeExport()->enableLayerExport();
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index aa4701d..43e75f9 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -329,6 +329,7 @@ void ImpExportEnhancedPath( SvXMLExport& rExport,
 
     rtl::OUString       aStr;
     rtl::OUStringBuffer aStrBuffer;
+    sal_uInt16 aNamespace = XML_NAMESPACE_DRAW;
 
     sal_Int32 i, j, k, l;
 
@@ -413,6 +414,8 @@ void ImpExportEnhancedPath( SvXMLExport& rExport,
                 aStrBuffer.append( (sal_Unicode)'Y' ); nParameter = 1; break;
             case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::QUADRATICCURVETO :
                 aStrBuffer.append( (sal_Unicode)'Q' ); nParameter = 2; break;
+            case com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO :
+                aStrBuffer.append( (sal_Unicode)'G' ); nParameter = 2; aNamespace = XML_NAMESPACE_DRAW_EXT; break;
 
             default : // ups, seems to be something wrong
             {
@@ -442,7 +445,7 @@ void ImpExportEnhancedPath( SvXMLExport& rExport,
         }
     }
     aStr = aStrBuffer.makeStringAndClear();
-    rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_ENHANCED_PATH, aStr );
+    rExport.AddAttribute( aNamespace, XML_ENHANCED_PATH, aStr );
 }
 
 void ImpExportEnhancedGeometry( SvXMLExport& rExport, const uno::Reference< beans::XPropertySet >& xPropSet )
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index 0736fe3..f8966a1 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -667,6 +667,13 @@ void GetEnhancedPath( std::vector< com::sun::star::beans::PropertyValue >& rDest
                 nIndex++;
             }
             break;
+            case 'G' :
+            {
+                nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO;
+                nParametersNeeded = 2;
+                nIndex++;
+            }
+            break;
             case 'W' :
             {
                 nLatestSegmentCommand = com::sun::star::drawing::EnhancedCustomShapeSegmentCommand::CLOCKWISEARCTO;


More information about the Libreoffice-commits mailing list