summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-07-19 11:06:50 +0200
committerRadek Doulik <rodo@novell.com>2012-07-19 11:09:07 +0200
commitd8720d4e390143279ccae8eed05decf54240e8fa (patch)
tree3d42f2839bc96fe29b747938480c681dcf2466b8 /xmloff
parentcf08e8a2ee18c3d1b26647489d16443b8cf617ad (diff)
odf: export arcangleto commands in enhanced path (use drawooo namespace)
Change-Id: I43a2c08ee8dfc0abe4d05579b837b5be0944c0fe
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/xmlexp.cxx3
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx5
-rw-r--r--xmloff/source/draw/shapeexport4.cxx5
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx7
4 files changed, 13 insertions, 7 deletions
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 82c414ef2a83..cbf9ef374356 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -375,7 +375,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 ce4d4180a24c..8927e922d470 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 aa4701d36993..43e75f97e72c 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 0736fe30a2be..f8966a1f275f 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;